summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole/konsole.h
authorwaspe <waspe>2004-02-22 12:57:58 (UTC)
committer waspe <waspe>2004-02-22 12:57:58 (UTC)
commit5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8 (patch) (unidiff)
treeb97f5281b807b4218f437150a4e9082694e7a642 /core/apps/embeddedkonsole/konsole.h
parent908f9c9f0c68d1c3e5a620a69bbf0d05684e2ab3 (diff)
downloadopie-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) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.h224
1 files changed, 143 insertions, 81 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,97 +46,159 @@ class Konsole : public QMainWindow
46 Q_OBJECT 46 Q_OBJECT
47 47
48public: 48public:
49 static QString appName() { return QString::fromLatin1("embeddedkonsole"); } 49
50 50 static QString appName()
51 Konsole(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); 51 {
52 ~Konsole(); 52 return QString::fromLatin1("embeddedkonsole");
53 void setColLin(int columns, int lines); 53 }
54 QToolBar *secondToolBar; 54
55 void show(); 55 Konsole(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
56 void setColor(); 56 Konsole(const char * name, const char* pgm, QStrList & _args, int histon);
57 int lastSelectedMenu; 57 ~Konsole();
58 int startUp; 58 void setColLin(int columns, int lines);
59 QToolBar *secondToolBar;
60 void show();
61 void setColor(int);
62 int lastSelectedMenu;
63 int startUp;
64
65public slots:
66 void changeFontSize(int);
67 void toggleFullScreen();
68 void setFullScreen(bool);
69 void changeSession(int);
70 void cycleZoom();
71 void newSession();
72
59private slots: 73private slots:
60 void setDocument(const QString &); 74 void setDocument(const QString &);
61 void doneSession(TESession*,int); 75 void doneSession(TEWidget*,int);
62 void changeColumns(int); 76 void changeTitle(TEWidget*,QString);
63 void fontChanged(int); 77 void changeColumns(int);
64 void configMenuSelected(int ); 78 void setFont(int);
65 void colorMenuSelected(int); 79 // void fontChanged(int);
66 void colorMenuIsSelected(int); 80 void configMenuSelected(int );
67 void enterCommand(int); 81 void colorMenuSelected(int);
68 void hitEnter(); 82 void colorMenuIsSelected(int);
69 void hitSpace(); 83 void tabMenuSelected(int);
70 void hitTab(); 84 void sessionListSelected(int);
71 void hitPaste(); 85
72 void hitUp(); 86 void enterCommand(int);
73 void hitDown(); 87 void hitEnter();
74 void switchSession(QWidget *); 88 void hitSpace();
75 void newSession(); 89 void hitTab();
76 void changeCommand(const QString &, int); 90 void hitPaste();
77 void initCommandList(); 91 void hitUp();
78 void scrollMenuSelected(int); 92 void hitDown();
79 void editCommandListMenuSelected(int); 93 void switchSession(QWidget *);
80 void parseCommandLine(); 94 void changeCommand(const QString &, int);
95 void initCommandList();
96 void scrollMenuSelected(int);
97 void editCommandListMenuSelected(int);
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
83private: 105private:
84 void doWrap(); 106 void doWrap();
85 void init(const char* _pgm, QStrList & _args); 107 void init(const char* _pgm, QStrList & _args);
86 void initSession(const char* _pgm, QStrList & _args); 108 void initSession(const char* _pgm, QStrList & _args);
87 void runSession(TESession* s); 109 void runSession(TESession* s);
88 void setColorPixmaps(); 110 void setColorPixmaps();
89 void setHistory(bool); 111 void setHistory(bool);
90 QSize calcSize(int columns, int lines); 112 void setColors(QColor foreground, QColor background);
91 TEWidget* getTe(); 113 int findFont(QString name, int size, bool exact = false);
92 QStringList commands; 114 QSize calcSize(int columns, int lines);
93 QLabel * msgLabel; 115 TEWidget* getTe();
94 QColor foreground, background; 116 QStringList commands;
95bool fromMenu; 117 QLabel * msgLabel;
96private: 118 QColor foreground, background;
97 class VTFont 119 bool fromMenu;
98 { 120
99 public: 121 bool fullscreen;
100 VTFont(QString name, QFont& font)
101 {
102 this->name = name;
103 this->font = font;
104 }
105
106 QFont& getFont()
107 {
108 return font;
109 }
110 122
111 QString getName() 123private:
124 class VTFont
112 { 125 {
113 return name; 126 public:
114 } 127 VTFont(QString name, QFont& font, QString family, int familyNum, int size)
115 128 {
116 private: 129 this->name = name;
117 QString name; 130 this->font = font;
118 QFont font; 131 this->family = family;
119 }; 132 this->size = size;
133 this->familyNum = familyNum;
134 }
135
136 QFont& getFont()
137 {
138 return font;
139 }
140 QString getName()
141 {
142 return name;
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 }
156
157 private:
158 QFont font;
159 QString name;
160 QString family;
161 int familyNum;
162 int size;
163 };
164
165 EKNumTabWidget* tab;
166 int tabPos;
167 int nsessions;
168 QList<VTFont> fonts;
169 int cfont;
170 QCString se_pgm;
171 QStrList se_args;
172
173 QToolBar *menuToolBar;
174 QToolBar *toolBar;
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;
120 190
121 EKNumTabWidget* tab;
122 int nsessions;
123 QList<VTFont> fonts;
124 int cfont;
125 QCString se_pgm;
126 QStrList se_args;
127 191
128 QPopupMenu *fontList,*configMenu,*colorMenu,*scrollMenu,*editCommandListMenu;
129 QComboBox *commonCombo;
130 // history scrolling I think 192 // history scrolling I think
131 bool b_scroll; 193 bool b_scroll;
132 194
133 int n_keytab; 195 int n_keytab;
134 int n_scroll; 196 int n_scroll;
135 int n_render; 197 int n_render;
136 QString pmPath; // pixmap path 198 QString pmPath; // pixmap path
137 QString dropText; 199 QString dropText;
138 QFont defaultFont; 200 QFont defaultFont;
139 QSize defaultSize; 201 QSize defaultSize;
140 202
141}; 203};
142 204