Diffstat (limited to 'noncore/apps/opie-console/emulation_widget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/emulation_widget.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/emulation_widget.h b/noncore/apps/opie-console/emulation_widget.h index 56ea15f..e185534 100644 --- a/noncore/apps/opie-console/emulation_widget.h +++ b/noncore/apps/opie-console/emulation_widget.h | |||
@@ -8,12 +8,13 @@ | |||
8 | #include <qpainter.h> | 8 | #include <qpainter.h> |
9 | #include <qstring.h> | 9 | #include <qstring.h> |
10 | #include <qarray.h> | 10 | #include <qarray.h> |
11 | #include <qrect.h> | 11 | #include <qrect.h> |
12 | 12 | ||
13 | 13 | ||
14 | |||
14 | /** | 15 | /** |
15 | * EmulationWidget | 16 | * EmulationWidget |
16 | * simple implementation of EmulationLayer | 17 | * simple implementation of EmulationLayer |
17 | * (doesn't support scrollbar, history, etc, yet) | 18 | * (doesn't support scrollbar, history, etc, yet) |
18 | */ | 19 | */ |
19 | class EmulationWidget : public WidgetLayer | 20 | class EmulationWidget : public WidgetLayer |
@@ -37,19 +38,19 @@ public: | |||
37 | /** | 38 | /** |
38 | * sets the image | 39 | * sets the image |
39 | * @param QArray<Character> const newimg, the new image | 40 | * @param QArray<Character> const newimg, the new image |
40 | * @param int lines, lines of the new image | 41 | * @param int lines, lines of the new image |
41 | * @param int columns, columns of the new image | 42 | * @param int columns, columns of the new image |
42 | */ | 43 | */ |
43 | virtual void setImage( QArray<Character> const newimg, int columns, int lines ) {}; | 44 | virtual void setImage( QArray<Character> const newimg, int columns, int lines ); |
44 | 45 | ||
45 | /** | 46 | /** |
46 | * reloads configuration | 47 | * reloads configuration |
47 | * @param const Profile& config, configuration | 48 | * @param const Profile& config, configuration |
48 | */ | 49 | */ |
49 | virtual void reloadConfig( const Profile& config ) {}; | 50 | virtual void reloadConfig( const Profile& config ); |
50 | 51 | ||
51 | /** | 52 | /** |
52 | * sets the scrollbar (not yet implemented) | 53 | * sets the scrollbar (not yet implemented) |
53 | */ | 54 | */ |
54 | virtual void setScroll( int cursor, int slines ); | 55 | virtual void setScroll( int cursor, int slines ); |
55 | 56 | ||
@@ -61,20 +62,51 @@ public: | |||
61 | 62 | ||
62 | protected: | 63 | protected: |
63 | 64 | ||
64 | /** | 65 | /** |
65 | * calculates current image bounds | 66 | * calculates current image bounds |
66 | */ | 67 | */ |
67 | virtual void calcGeometry() {}; | 68 | virtual void calcGeometry(); |
69 | |||
70 | |||
71 | /** | ||
72 | * @param const ColorEntry* table, the new color table | ||
73 | */ | ||
74 | void setColorTable( const ColorEntry table[] ); | ||
68 | 75 | ||
69 | /** | 76 | /** |
70 | * draws a String | 77 | * draws a String |
71 | * @param QString& string, string to be drawn | 78 | * @param QString& string, string to be drawn |
72 | * @param QPainter& painter, painter, that should draw | 79 | * @param QPainter& painter, painter, that should draw |
73 | * @param QRect rect, rect to be drawn into | 80 | * @param QRect rect, rect to be drawn into |
74 | * @param Character attr, attributes of Characters | 81 | * @param Character attr, attributes of Characters |
75 | * @param bool usePixmap, if to use the background pixmap (currently not supported) | 82 | * @param bool usePixmap, if to use the background pixmap (currently not supported) |
76 | * @param bool clear, if rect should be cleared | 83 | * @param bool clear, if rect should be cleared |
77 | */ | 84 | */ |
78 | void drawAttrString( QString& string, QPainter& painter, QRect rect, Character attr, bool pm, bool clear ); | 85 | void drawAttrString( QString& string, QPainter& painter, QRect rect, Character attr, bool pm, bool clear ); |
79 | 86 | ||
87 | protected: | ||
88 | |||
89 | enum ScrollLocation | ||
90 | { | ||
91 | SCRNONE, | ||
92 | SCRLEFT, | ||
93 | SCRIGHT | ||
94 | }; | ||
95 | |||
96 | int f_height; | ||
97 | int f_width; | ||
98 | int f_ascent; | ||
99 | int m_blX; | ||
100 | int m_blY; | ||
101 | int m_brX; | ||
102 | |||
103 | int m_bY; | ||
104 | int m_bX; | ||
105 | QScrollBar* m_scrollbar; | ||
106 | |||
107 | ScrollLocation scrollLoc; | ||
108 | |||
109 | ColorEntry* color_table; | ||
110 | |||
111 | bool blinking; | ||
80 | }; | 112 | }; |