Diffstat (limited to 'noncore/apps/opie-console/TEWidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/TEWidget.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/TEWidget.h b/noncore/apps/opie-console/TEWidget.h index f03a16e..6ff731b 100644 --- a/noncore/apps/opie-console/TEWidget.h +++ b/noncore/apps/opie-console/TEWidget.h | |||
@@ -48,48 +48,50 @@ class TEWidget : public QFrame | |||
48 | // friend class Konsole; | 48 | // friend class Konsole; |
49 | 49 | ||
50 | public: | 50 | public: |
51 | 51 | ||
52 | TEWidget(QWidget *parent=0, const char *name=0); | 52 | TEWidget(QWidget *parent=0, const char *name=0); |
53 | virtual ~TEWidget(); | 53 | virtual ~TEWidget(); |
54 | 54 | ||
55 | public: | 55 | public: |
56 | 56 | ||
57 | QColor getDefaultBackColor(); | 57 | QColor getDefaultBackColor(); |
58 | QPushButton *cornerButton(); | 58 | QPushButton *cornerButton(); |
59 | 59 | ||
60 | const ColorEntry* getColorTable() const; | 60 | const ColorEntry* getColorTable() const; |
61 | const ColorEntry* getdefaultColorTable() const; | 61 | const ColorEntry* getdefaultColorTable() const; |
62 | void setColorTable(const ColorEntry table[]); | 62 | void setColorTable(const ColorEntry table[]); |
63 | 63 | ||
64 | void setScrollbarLocation(int loc); | 64 | void setScrollbarLocation(int loc); |
65 | enum { SCRNONE=0, SCRLEFT=1, SCRRIGHT=2 }; | 65 | enum { SCRNONE=0, SCRLEFT=1, SCRRIGHT=2 }; |
66 | 66 | ||
67 | void setScroll(int cursor, int lines); | 67 | void setScroll(int cursor, int lines); |
68 | void doScroll(int lines); | 68 | void doScroll(int lines); |
69 | 69 | ||
70 | void emitSelection(); | 70 | void emitSelection(); |
71 | 71 | ||
72 | void setWrapAt(int columns); | ||
73 | |||
72 | public: | 74 | public: |
73 | 75 | ||
74 | void setImage(const ca* const newimg, int lines, int columns); | 76 | void setImage(const ca* const newimg, int lines, int columns); |
75 | 77 | ||
76 | int Lines() { return lines; } | 78 | int Lines() { return lines; } |
77 | int Columns() { return columns; } | 79 | int Columns() { return columns; } |
78 | 80 | ||
79 | void calcGeometry(); | 81 | void calcGeometry(); |
80 | void propagateSize(); | 82 | void propagateSize(); |
81 | QSize calcSize(int cols, int lins) const; | 83 | QSize calcSize(int cols, int lins) const; |
82 | 84 | ||
83 | QSize sizeHint() const; | 85 | QSize sizeHint() const; |
84 | 86 | ||
85 | public: | 87 | public: |
86 | 88 | ||
87 | void Bell(); | 89 | void Bell(); |
88 | void emitText(QString text); | 90 | void emitText(QString text); |
89 | void pasteClipboard(); | 91 | void pasteClipboard(); |
90 | 92 | ||
91 | signals: | 93 | signals: |
92 | 94 | ||
93 | void keyPressedSignal(QKeyEvent *e); | 95 | void keyPressedSignal(QKeyEvent *e); |
94 | void mouseSignal(int cb, int cx, int cy); | 96 | void mouseSignal(int cb, int cx, int cy); |
95 | void changedImageSizeSignal(int lines, int columns); | 97 | void changedImageSizeSignal(int lines, int columns); |
@@ -133,78 +135,80 @@ protected: | |||
133 | #endif | 135 | #endif |
134 | 136 | ||
135 | virtual int charClass(char) const; | 137 | virtual int charClass(char) const; |
136 | 138 | ||
137 | void clearImage(); | 139 | void clearImage(); |
138 | 140 | ||
139 | public: | 141 | public: |
140 | const QPixmap *backgroundPixmap(); | 142 | const QPixmap *backgroundPixmap(); |
141 | 143 | ||
142 | void setSelection(const QString &t); | 144 | void setSelection(const QString &t); |
143 | 145 | ||
144 | virtual void setFont(const QFont &); | 146 | virtual void setFont(const QFont &); |
145 | void setVTFont(const QFont &); | 147 | void setVTFont(const QFont &); |
146 | QFont getVTFont(); | 148 | QFont getVTFont(); |
147 | 149 | ||
148 | void setMouseMarks(bool on); | 150 | void setMouseMarks(bool on); |
149 | 151 | ||
150 | public slots: | 152 | public slots: |
151 | 153 | ||
152 | void onClearSelection(); | 154 | void onClearSelection(); |
153 | 155 | ||
154 | protected slots: | 156 | protected slots: |
155 | 157 | ||
156 | void scrollChanged(int value); | 158 | void scrollChanged(int value); |
159 | void hscrollChanged(int value); | ||
157 | void blinkEvent(); | 160 | void blinkEvent(); |
158 | 161 | ||
159 | private: | 162 | private: |
160 | 163 | ||
161 | QChar (*fontMap)(QChar); // possible vt100 font extention | 164 | QChar (*fontMap)(QChar); // possible vt100 font extention |
162 | 165 | ||
163 | bool fixed_font; // has fixed pitch | 166 | bool fixed_font; // has fixed pitch |
164 | int font_h; // height | 167 | int font_h; // height |
165 | int font_w; // width | 168 | int font_w; // width |
166 | int font_a; // ascend | 169 | int font_a; // ascend |
167 | 170 | ||
168 | int blX; // actual offset (left) | 171 | int blX; // actual offset (left) |
169 | int brX; // actual offset (right) | 172 | int brX; // actual offset (right) |
170 | int bY; // actual offset | 173 | int bY; // actual offset |
171 | 174 | ||
172 | int lines; | 175 | int lines; |
173 | int columns; | 176 | int columns; |
174 | ca *image; // [lines][columns] | 177 | ca *image; // [lines][columns] |
175 | 178 | ||
176 | ColorEntry color_table[TABLE_COLORS]; | 179 | ColorEntry color_table[TABLE_COLORS]; |
177 | 180 | ||
178 | BOOL resizing; | 181 | BOOL resizing; |
179 | bool mouse_marks; | 182 | bool mouse_marks; |
180 | 183 | ||
181 | void makeImage(); | 184 | void makeImage(); |
182 | 185 | ||
183 | QPoint iPntSel; // initial selection point | 186 | QPoint iPntSel; // initial selection point |
184 | QPoint pntSel; // current selection point | 187 | QPoint pntSel; // current selection point |
185 | int actSel; // selection state | 188 | int actSel; // selection state |
186 | BOOL word_selection_mode; | 189 | BOOL word_selection_mode; |
187 | BOOL preserve_line_breaks; | 190 | BOOL preserve_line_breaks; |
188 | 191 | ||
189 | QPushButton *m_cornerButton; | 192 | QPushButton *m_cornerButton; |
190 | QClipboard* cb; | 193 | QClipboard* cb; |
191 | QScrollBar* scrollbar; | 194 | QScrollBar* scrollbar, *hscrollbar; |
192 | int scrollLoc; | 195 | int scrollLoc; |
196 | int hposition, vcolumns; | ||
193 | 197 | ||
194 | //#define SCRNONE 0 | 198 | //#define SCRNONE 0 |
195 | //#define SCRLEFT 1 | 199 | //#define SCRLEFT 1 |
196 | //#define SCRRIGHT 2 | 200 | //#define SCRRIGHT 2 |
197 | 201 | ||
198 | BOOL blinking; // hide text in paintEvent | 202 | BOOL blinking; // hide text in paintEvent |
199 | BOOL hasBlinker; // has characters to blink | 203 | BOOL hasBlinker; // has characters to blink |
200 | QTimer* blinkT; // active when hasBlinker | 204 | QTimer* blinkT; // active when hasBlinker |
201 | QPopupMenu* m_drop; | 205 | QPopupMenu* m_drop; |
202 | QString dropText; | 206 | QString dropText; |
203 | public: | 207 | public: |
204 | // current session in this widget | 208 | // current session in this widget |
205 | TESession *currentSession; | 209 | TESession *currentSession; |
206 | private slots: | 210 | private slots: |
207 | void drop_menu_activated(int item); | 211 | void drop_menu_activated(int item); |
208 | }; | 212 | }; |
209 | 213 | ||
210 | #endif // TE_WIDGET_H | 214 | #endif // TE_WIDGET_H |