~ubuntu-branches/ubuntu/vivid/kate/vivid-updates

« back to all changes in this revision

Viewing changes to addons/kate/gdbplugin/ioview.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2014-12-04 16:49:41 UTC
  • mfrom: (1.6.6)
  • Revision ID: package-import@ubuntu.com-20141204164941-l3qbvsly83hhlw2v
Tags: 4:14.11.97-0ubuntu1
* New upstream release
* Update build-deps and use pkg-kde v3 for Qt 5 build
* kate-data now kate5-data for co-installability

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//
2
 
// ioview.h
3
 
//
4
 
// Description: Widget that interacts with the debugged application
5
 
//
6
 
//
7
 
// Copyright (c) 2010 Kåre Särs <kare.sars@iki.fi>
8
 
//
9
 
//  This library is free software; you can redistribute it and/or
10
 
//  modify it under the terms of the GNU Library General Public
11
 
//  License version 2 as published by the Free Software Foundation.
12
 
//
13
 
//  This library is distributed in the hope that it will be useful,
14
 
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
 
//  Library General Public License for more details.
17
 
//
18
 
//  You should have received a copy of the GNU Library General Public License
19
 
//  along with this library; see the file COPYING.LIB.  If not, write to
20
 
//  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
 
//  Boston, MA 02110-1301, USA.
22
 
 
23
 
#ifndef IOVIEW_H
24
 
#define IOVIEW_H
25
 
 
26
 
#include <QtGui/QWidget>
27
 
#include <QtCore/QFile>
28
 
 
29
 
class QTextEdit;
30
 
class QLineEdit;
31
 
class QSocketNotifier;
32
 
 
33
 
class IOView : public QWidget
34
 
{
35
 
Q_OBJECT
36
 
public:
37
 
    IOView(QWidget *parent = 0);
38
 
    ~IOView();
39
 
 
40
 
    const QString stdinFifo();
41
 
    const QString stdoutFifo();
42
 
    const QString stderrFifo();
43
 
 
44
 
    void enableInput(bool enable);
45
 
 
46
 
    void clearOutput();
47
 
 
48
 
public Q_SLOTS:
49
 
    void addStdOutText(const QString &text);
50
 
    void addStdErrText(const QString &text);
51
 
 
52
 
private Q_SLOTS:
53
 
    void returnPressed();
54
 
    void readOutput();
55
 
    void readErrors();
56
 
 
57
 
Q_SIGNALS:
58
 
    void stdOutText(const QString &text);
59
 
    void stdErrText(const QString &text);
60
 
 
61
 
private:
62
 
    void createFifos();
63
 
    QString createFifo(const QString &prefix);
64
 
 
65
 
    QTextEdit       *m_output;
66
 
    QLineEdit       *m_input;
67
 
 
68
 
    QString          m_stdinFifo;
69
 
    QString          m_stdoutFifo;
70
 
    QString          m_stderrFifo;
71
 
 
72
 
    QFile            m_stdin;
73
 
    QFile            m_stdout;
74
 
    QFile            m_stderr;
75
 
 
76
 
    QFile            m_stdoutD;
77
 
    QFile            m_stderrD;
78
 
 
79
 
    int              m_stdoutFD;
80
 
    int              m_stderrFD;
81
 
 
82
 
    QSocketNotifier *m_stdoutNotifier;
83
 
    QSocketNotifier *m_stderrNotifier;
84
 
};
85
 
 
86
 
#endif