author | waspe <waspe> | 2004-02-22 12:57:58 (UTC) |
---|---|---|
committer | waspe <waspe> | 2004-02-22 12:57:58 (UTC) |
commit | 5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8 (patch) (unidiff) | |
tree | b97f5281b807b4218f437150a4e9082694e7a642 /core/apps/embeddedkonsole/konsole.h | |
parent | 908f9c9f0c68d1c3e5a620a69bbf0d05684e2ab3 (diff) | |
download | opie-5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8.zip opie-5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8.tar.gz opie-5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8.tar.bz2 |
merged changes form qkonsole back into opie-embeddedkonsole (most likely not bugfree !)
Diffstat (limited to 'core/apps/embeddedkonsole/konsole.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/konsole.h | 80 |
1 files changed, 71 insertions, 9 deletions
diff --git a/core/apps/embeddedkonsole/konsole.h b/core/apps/embeddedkonsole/konsole.h index 7d5a908..37babbb 100644 --- a/core/apps/embeddedkonsole/konsole.h +++ b/core/apps/embeddedkonsole/konsole.h | |||
@@ -46,24 +46,43 @@ class Konsole : public QMainWindow | |||
46 | Q_OBJECT | 46 | Q_OBJECT |
47 | 47 | ||
48 | public: | 48 | public: |
49 | static QString appName() { return QString::fromLatin1("embeddedkonsole"); } | 49 | |
50 | static QString appName() | ||
51 | { | ||
52 | return QString::fromLatin1("embeddedkonsole"); | ||
53 | } | ||
50 | 54 | ||
51 | Konsole(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); | 55 | Konsole(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); |
56 | Konsole(const char * name, const char* pgm, QStrList & _args, int histon); | ||
52 | ~Konsole(); | 57 | ~Konsole(); |
53 | void setColLin(int columns, int lines); | 58 | void setColLin(int columns, int lines); |
54 | QToolBar *secondToolBar; | 59 | QToolBar *secondToolBar; |
55 | void show(); | 60 | void show(); |
56 | void setColor(); | 61 | void setColor(int); |
57 | int lastSelectedMenu; | 62 | int lastSelectedMenu; |
58 | int startUp; | 63 | int startUp; |
64 | |||
65 | public slots: | ||
66 | void changeFontSize(int); | ||
67 | void toggleFullScreen(); | ||
68 | void setFullScreen(bool); | ||
69 | void changeSession(int); | ||
70 | void cycleZoom(); | ||
71 | void newSession(); | ||
72 | |||
59 | private slots: | 73 | private slots: |
60 | void setDocument(const QString &); | 74 | void setDocument(const QString &); |
61 | void doneSession(TESession*,int); | 75 | void doneSession(TEWidget*,int); |
76 | void changeTitle(TEWidget*,QString); | ||
62 | void changeColumns(int); | 77 | void changeColumns(int); |
63 | void fontChanged(int); | 78 | void setFont(int); |
79 | // void fontChanged(int); | ||
64 | void configMenuSelected(int ); | 80 | void configMenuSelected(int ); |
65 | void colorMenuSelected(int); | 81 | void colorMenuSelected(int); |
66 | void colorMenuIsSelected(int); | 82 | void colorMenuIsSelected(int); |
83 | void tabMenuSelected(int); | ||
84 | void sessionListSelected(int); | ||
85 | |||
67 | void enterCommand(int); | 86 | void enterCommand(int); |
68 | void hitEnter(); | 87 | void hitEnter(); |
69 | void hitSpace(); | 88 | void hitSpace(); |
@@ -72,7 +91,6 @@ private slots: | |||
72 | void hitUp(); | 91 | void hitUp(); |
73 | void hitDown(); | 92 | void hitDown(); |
74 | void switchSession(QWidget *); | 93 | void switchSession(QWidget *); |
75 | void newSession(); | ||
76 | void changeCommand(const QString &, int); | 94 | void changeCommand(const QString &, int); |
77 | void initCommandList(); | 95 | void initCommandList(); |
78 | void scrollMenuSelected(int); | 96 | void scrollMenuSelected(int); |
@@ -80,6 +98,10 @@ private slots: | |||
80 | void parseCommandLine(); | 98 | void parseCommandLine(); |
81 | void changeForegroundColor(const QColor &); | 99 | void changeForegroundColor(const QColor &); |
82 | void changeBackgroundColor(const QColor &); | 100 | void changeBackgroundColor(const QColor &); |
101 | |||
102 | void historyDialog(); | ||
103 | void fullscreenTimeout(); | ||
104 | |||
83 | private: | 105 | private: |
84 | void doWrap(); | 106 | void doWrap(); |
85 | void init(const char* _pgm, QStrList & _args); | 107 | void init(const char* _pgm, QStrList & _args); |
@@ -87,46 +109,86 @@ private: | |||
87 | void runSession(TESession* s); | 109 | void runSession(TESession* s); |
88 | void setColorPixmaps(); | 110 | void setColorPixmaps(); |
89 | void setHistory(bool); | 111 | void setHistory(bool); |
112 | void setColors(QColor foreground, QColor background); | ||
113 | int findFont(QString name, int size, bool exact = false); | ||
90 | QSize calcSize(int columns, int lines); | 114 | QSize calcSize(int columns, int lines); |
91 | TEWidget* getTe(); | 115 | TEWidget* getTe(); |
92 | QStringList commands; | 116 | QStringList commands; |
93 | QLabel * msgLabel; | 117 | QLabel * msgLabel; |
94 | QColor foreground, background; | 118 | QColor foreground, background; |
95 | bool fromMenu; | 119 | bool fromMenu; |
120 | |||
121 | bool fullscreen; | ||
122 | |||
96 | private: | 123 | private: |
97 | class VTFont | 124 | class VTFont |
98 | { | 125 | { |
99 | public: | 126 | public: |
100 | VTFont(QString name, QFont& font) | 127 | VTFont(QString name, QFont& font, QString family, int familyNum, int size) |
101 | { | 128 | { |
102 | this->name = name; | 129 | this->name = name; |
103 | this->font = font; | 130 | this->font = font; |
131 | this->family = family; | ||
132 | this->size = size; | ||
133 | this->familyNum = familyNum; | ||
104 | } | 134 | } |
105 | 135 | ||
106 | QFont& getFont() | 136 | QFont& getFont() |
107 | { | 137 | { |
108 | return font; | 138 | return font; |
109 | } | 139 | } |
110 | |||
111 | QString getName() | 140 | QString getName() |
112 | { | 141 | { |
113 | return name; | 142 | return name; |
114 | } | 143 | } |
144 | int getSize() | ||
145 | { | ||
146 | return(size); | ||
147 | } | ||
148 | QString getFamily() | ||
149 | { | ||
150 | return(family); | ||
151 | } | ||
152 | int getFamilyNum() | ||
153 | { | ||
154 | return(familyNum); | ||
155 | } | ||
115 | 156 | ||
116 | private: | 157 | private: |
117 | QString name; | ||
118 | QFont font; | 158 | QFont font; |
159 | QString name; | ||
160 | QString family; | ||
161 | int familyNum; | ||
162 | int size; | ||
119 | }; | 163 | }; |
120 | 164 | ||
121 | EKNumTabWidget* tab; | 165 | EKNumTabWidget* tab; |
166 | int tabPos; | ||
122 | int nsessions; | 167 | int nsessions; |
123 | QList<VTFont> fonts; | 168 | QList<VTFont> fonts; |
124 | int cfont; | 169 | int cfont; |
125 | QCString se_pgm; | 170 | QCString se_pgm; |
126 | QStrList se_args; | 171 | QStrList se_args; |
127 | 172 | ||
128 | QPopupMenu *fontList,*configMenu,*colorMenu,*scrollMenu,*editCommandListMenu; | 173 | QToolBar *menuToolBar; |
174 | QToolBar *toolBar; | ||
129 | QComboBox *commonCombo; | 175 | QComboBox *commonCombo; |
176 | |||
177 | QPopupMenu *fontList,*configMenu,*colorMenu,*scrollMenu,*editCommandListMenu; | ||
178 | QPopupMenu *sessionList, *tabMenu; | ||
179 | |||
180 | int sm_none, sm_left, sm_right; | ||
181 | int cm_beep, cm_wrap; | ||
182 | int cm_default; | ||
183 | int cm_bw, cm_wb, cm_gb, cm_bt, cm_br, cm_rb, cm_gy, cm_bm, cm_mb, cm_cw, cm_wc, cm_bb, cm_ab; | ||
184 | int tm_top, tm_bottom, tm_hidden; | ||
185 | int ec_edit, ec_cmdlist, ec_quick; | ||
186 | |||
187 | bool show_fullscreen_msg; | ||
188 | QTimer *fullscreen_timer; | ||
189 | QLabel *fullscreen_msg; | ||
190 | |||
191 | |||
130 | // history scrolling I think | 192 | // history scrolling I think |
131 | bool b_scroll; | 193 | bool b_scroll; |
132 | 194 | ||