author | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
commit | 15318cad33835e4e2dc620d033e43cd930676cdd (patch) (unidiff) | |
tree | c2fa0399a2c47fda8e2cd0092c73a809d17f68eb /core/apps/embeddedkonsole/konsole.h | |
download | opie-15318cad33835e4e2dc620d033e43cd930676cdd.zip opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2 |
Initial revision
Diffstat (limited to 'core/apps/embeddedkonsole/konsole.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/konsole.h | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/core/apps/embeddedkonsole/konsole.h b/core/apps/embeddedkonsole/konsole.h new file mode 100644 index 0000000..819ea5d --- a/dev/null +++ b/core/apps/embeddedkonsole/konsole.h | |||
@@ -0,0 +1,125 @@ | |||
1 | /* ----------------------------------------------------------------------- */ | ||
2 | /* */ | ||
3 | /* [konsole.h] Konsole */ | ||
4 | /* */ | ||
5 | /* -------------------------------------------------------------------------- */ | ||
6 | /* */ | ||
7 | /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ | ||
8 | /* */ | ||
9 | /* This file is part of Konsole, an X terminal. */ | ||
10 | /* */ | ||
11 | /* The material contained in here more or less directly orginates from */ | ||
12 | /* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */ | ||
13 | /* */ | ||
14 | /* -------------------------------------------------------------------------- */ | ||
15 | /* */ | ||
16 | /* Ported Konsole to Qt/Embedded */ | ||
17 | /* */ | ||
18 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ | ||
19 | /* */ | ||
20 | /* -------------------------------------------------------------------------- */ | ||
21 | |||
22 | #ifndef KONSOLE_H | ||
23 | #define KONSOLE_H | ||
24 | |||
25 | |||
26 | #include <qmainwindow.h> | ||
27 | #include <qaction.h> | ||
28 | #include <qpopupmenu.h> | ||
29 | #include <qstrlist.h> | ||
30 | #include <qintdict.h> | ||
31 | #include <qptrdict.h> | ||
32 | #include <qtabwidget.h> | ||
33 | |||
34 | #include "MyPty.h" | ||
35 | #include "TEWidget.h" | ||
36 | #include "TEmuVt102.h" | ||
37 | #include "session.h" | ||
38 | |||
39 | class EKNumTabWidget; | ||
40 | |||
41 | class Konsole : public QMainWindow | ||
42 | { | ||
43 | Q_OBJECT | ||
44 | |||
45 | public: | ||
46 | |||
47 | Konsole(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); | ||
48 | Konsole(const char * name, const char* pgm, QStrList & _args, int histon); | ||
49 | ~Konsole(); | ||
50 | void setColLin(int columns, int lines); | ||
51 | |||
52 | void show(); | ||
53 | |||
54 | private slots: | ||
55 | void doneSession(TESession*,int); | ||
56 | void changeColumns(int); | ||
57 | void fontChanged(int); | ||
58 | void enterCommand(int); | ||
59 | void hitEnter(); | ||
60 | void hitSpace(); | ||
61 | void hitTab(); | ||
62 | void hitPaste(); | ||
63 | void hitUp(); | ||
64 | void hitDown(); | ||
65 | void switchSession(QWidget *); | ||
66 | void newSession(); | ||
67 | |||
68 | private: | ||
69 | void init(const char* _pgm, QStrList & _args); | ||
70 | void initSession(const char* _pgm, QStrList & _args); | ||
71 | void runSession(TESession* s); | ||
72 | void setColorPixmaps(); | ||
73 | void setHistory(bool); | ||
74 | QSize calcSize(int columns, int lines); | ||
75 | TEWidget* getTe(); | ||
76 | |||
77 | private: | ||
78 | class VTFont | ||
79 | { | ||
80 | public: | ||
81 | VTFont(QString name, QFont& font) | ||
82 | { | ||
83 | this->name = name; | ||
84 | this->font = font; | ||
85 | } | ||
86 | |||
87 | QFont& getFont() | ||
88 | { | ||
89 | return font; | ||
90 | } | ||
91 | |||
92 | QString getName() | ||
93 | { | ||
94 | return name; | ||
95 | } | ||
96 | |||
97 | private: | ||
98 | QString name; | ||
99 | QFont font; | ||
100 | }; | ||
101 | |||
102 | EKNumTabWidget* tab; | ||
103 | int nsessions; | ||
104 | QList<VTFont> fonts; | ||
105 | int cfont; | ||
106 | QCString se_pgm; | ||
107 | QStrList se_args; | ||
108 | |||
109 | QPopupMenu* fontList; | ||
110 | |||
111 | // history scrolling I think | ||
112 | bool b_scroll; | ||
113 | |||
114 | int n_keytab; | ||
115 | int n_scroll; | ||
116 | int n_render; | ||
117 | QString pmPath; // pixmap path | ||
118 | QString dropText; | ||
119 | QFont defaultFont; | ||
120 | QSize defaultSize; | ||
121 | |||
122 | }; | ||
123 | |||
124 | #endif | ||
125 | |||