SVN_SILENT made messages (.desktop file)
[kdeadmin.git] / kpackage / kpTerm.h
blob81a5709f086675a18fe45edc8413f204ba628bdb
1 /*
2 ** Copyright (C) 1999,2000 Toivo Pedaste <toivo@ucs.uwa.edu.au>
3 **
4 */
6 /*
7 ** This program is free software; you can redistribute it and/or modify
8 ** it under the terms of the GNU General Public License as published by
9 ** the Free Software Foundation; either version 2 of the License, or
10 ** (at your option) any later version.
12 ** This program is distributed in the hope that it will be useful,
13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ** GNU General Public License for more details.
17 ** You should have received a copy of the GNU General Public License
18 ** along with this program in a file called COPYING; if not, write to
19 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 ** MA 02110-1301, USA.
24 ** Bug reports and questions can be sent to kde-devel@kde.org
27 #ifndef KPTERM_H
28 #define KPTERM_H
30 #include <Qt3Support/Q3TextEdit>
31 #include <QtCore/QStringList>
32 #include <QtGui/QLayout>
33 #include <QtGui/QLabel>
34 //Added by qt3to4:
35 #include <QtGui/QKeyEvent>
37 #include <klocale.h>
38 #include <kdialog.h>
39 #include <kpackage.h>
40 #include <kpPty.h>
42 //////////////////////////////////////////////////////////////////////////////
43 class kpTerm: public Q3TextEdit
45 Q_OBJECT
47 public:
48 kpTerm(kpPty *pt, QWidget * parent=0, const char * name=0);
49 void keyPressEvent ( QKeyEvent * e );
50 bool run(const QString &cmd, QStringList &r);
51 void doConnect();
52 void doUnconnect();
53 void insert ( const QString & str, bool mark=false );
54 kpPty *pty;
55 void cancel();
56 void done();
58 public slots:
59 void textIn(const QString &, bool);
60 void slotResult(QStringList &, int);
62 signals:
63 void keyOut(QString);
64 void result(QStringList &, int);
68 //////////////////////////////////////////////////////////////////////////////
70 class kpRun: public KDialog
72 Q_OBJECT
74 public:
75 kpRun(QWidget *parent = 0);
76 bool run(QString cmd, QString title);
77 void addText(const QStringList &ret);
79 public slots:
80 void slotResult(QStringList &, int);
81 void slotCancel();
83 private:
84 kpTerm *term;
85 QLabel *title;
86 };
87 //////////////////////////////////////////////////////////////////////////////
88 #endif // KPTERM_H