author | ibotty <ibotty> | 2002-10-06 12:40:48 (UTC) |
---|---|---|
committer | ibotty <ibotty> | 2002-10-06 12:40:48 (UTC) |
commit | fb0027ea0649aa5bf4c3880dc84df459425c0642 (patch) (unidiff) | |
tree | d8fd30a024db5788ab5618557cd141f529a28ad2 | |
parent | 13ed195192154a82fd07dde602f27d478007a27f (diff) | |
download | opie-fb0027ea0649aa5bf4c3880dc84df459425c0642.zip opie-fb0027ea0649aa5bf4c3880dc84df459425c0642.tar.gz opie-fb0027ea0649aa5bf4c3880dc84df459425c0642.tar.bz2 |
made setImage virual
// setImage should be the only virtual public method.
// feel free to flame... ;)
added first protected var, more will follow
-rw-r--r-- | noncore/apps/opie-console/widget_layer.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/noncore/apps/opie-console/widget_layer.h b/noncore/apps/opie-console/widget_layer.h index 5474c64..cf2a1e5 100644 --- a/noncore/apps/opie-console/widget_layer.h +++ b/noncore/apps/opie-console/widget_layer.h | |||
@@ -1,121 +1,130 @@ | |||
1 | /* -------------------------------------------------------------------------- */ | 1 | |
2 | /* */ | 2 | /* */ |
3 | /* [widget_layer.h] Widget Layer */ | 3 | /* [widget_layer.h] Widget Layer */ |
4 | /* */ | 4 | /* */ |
5 | /* -------------------------------------------------------------------------- */ | 5 | /* -------------------------------------------------------------------------- */ |
6 | 6 | ||
7 | // proposal of a widget Layer in opie-console | 7 | // proposal of a widget Layer in opie-console |
8 | // | 8 | // |
9 | // fellow devels: | 9 | // fellow devels: |
10 | // just mail me (ibotty@web.de), what you additionally need from the main widget | 10 | // just mail me (ibotty@web.de), what you additionally need from the main widget |
11 | // (or say in chat) | 11 | // (or say in chat) |
12 | 12 | ||
13 | 13 | ||
14 | |||
15 | class WidgetLayer : public QObject | 14 | class WidgetLayer : public QObject |
16 | { QObject | 15 | { QObject |
17 | 16 | ||
18 | public: | 17 | public: |
19 | /** | 18 | /** |
20 | * constructor | 19 | * constructor |
21 | */ | 20 | */ |
22 | WidgetLayer(); | 21 | WidgetLayer(); |
23 | 22 | ||
24 | /** | 23 | /** |
25 | * destructor | 24 | * destructor |
26 | */ | 25 | */ |
27 | virtual ~WidgetLayer(); | 26 | virtual ~WidgetLayer(); |
28 | 27 | ||
29 | /** | 28 | /** |
30 | * sets the image | 29 | * sets the image |
31 | */ | 30 | */ |
32 | void setImage( const Character* const newimg, int lines, int colums ); | 31 | virtual void setImage( const Character* const newimg, int lines, int colums ); |
33 | 32 | ||
34 | /** | 33 | /** |
35 | * annoy the user | 34 | * annoy the user |
36 | */ | 35 | */ |
37 | void bell(); | 36 | void bell(); |
38 | 37 | ||
39 | /** | 38 | /** |
40 | * return the lines count | 39 | * return the lines count |
41 | */ | 40 | */ |
42 | int lines(){ return _lines; } | 41 | int lines(){ return m_lines; } |
43 | 42 | ||
44 | /** | 43 | /** |
45 | * return the columns count | 44 | * return the columns count |
46 | */ | 45 | */ |
47 | int columns(){ return _columns } | 46 | int columns(){ return m_columns } |
48 | 47 | ||
49 | /** | 48 | /** |
50 | * copy selection into clipboard, etc | 49 | * copy selection into clipboard, etc |
51 | */ | 50 | */ |
52 | void emitSelection(); | 51 | void emitSelection(); |
53 | 52 | ||
54 | /** | 53 | /** |
55 | * set selection (clipboard) to text | 54 | * set selection (clipboard) to text |
56 | */ | 55 | */ |
57 | void setSelection( QString &text ) | 56 | void setSelection( QString &text ) |
58 | 57 | ||
59 | /** | 58 | /** |
60 | * paste content of clipboard | 59 | * paste content of clipboard |
61 | */ | 60 | */ |
62 | void pasteClipboard(); | 61 | void pasteClipboard(); |
63 | 62 | ||
64 | 63 | ||
65 | signals: | 64 | signals: |
66 | 65 | ||
67 | /** | 66 | /** |
68 | * key was pressed | 67 | * key was pressed |
69 | */ | 68 | */ |
70 | keyPressed( QKeyEvent *e ); | 69 | keyPressed( QKeyEvent *e ); |
71 | 70 | ||
72 | /** | 71 | /** |
73 | * whenever Mouse selects something | 72 | * whenever Mouse selects something |
74 | * 0left Button | 73 | * 0left Button |
75 | * 3Button released | 74 | * 3Button released |
76 | * // numbering due to layout in old TEWidget | 75 | * // numbering due to layout in old TEWidget |
77 | */ | 76 | */ |
78 | mousePressed( int button, int x, int y ); | 77 | mousePressed( int button, int x, int y ); |
79 | 78 | ||
80 | /** | 79 | /** |
81 | * size of image changed | 80 | * size of image changed |
82 | */ | 81 | */ |
83 | imageSizeChanged( int lines, int columns ); | 82 | imageSizeChanged( int lines, int columns ); |
84 | 83 | ||
85 | /** | 84 | /** |
86 | * cursor in history changed | 85 | * cursor in history changed |
87 | */ | 86 | */ |
88 | historyCursorChanged( int value ); | 87 | historyCursorChanged( int value ); |
89 | 88 | ||
90 | /** | 89 | /** |
91 | * selection should be cleared | 90 | * selection should be cleared |
92 | */ | 91 | */ |
93 | void selectionCleared(); | 92 | void selectionCleared(); |
94 | 93 | ||
95 | /** | 94 | /** |
96 | * selection begin | 95 | * selection begin |
97 | */ | 96 | */ |
98 | void selectionBegin( const int x, const int y ) | 97 | void selectionBegin( const int x, const int y ) |
99 | 98 | ||
100 | /** | 99 | /** |
101 | * selection extended | 100 | * selection extended |
102 | * (from begin s.a. to x, y) | 101 | * (from begin s.a. to x, y) |
103 | */ | 102 | */ |
104 | void selectionExtended( const int x, const int y ); | 103 | void selectionExtended( const int x, const int y ); |
105 | 104 | ||
106 | /** | 105 | /** |
107 | * selection end | 106 | * selection end |
108 | * bool: preserve line breaks in selection | 107 | * bool: preserve line breaks in selection |
109 | */ | 108 | */ |
110 | void selectionEnd( const bool lineBreakPreserve ); | 109 | void selectionEnd( const bool lineBreakPreserve ); |
111 | 110 | ||
112 | slots: | 111 | slots: |
113 | 112 | ||
114 | /** | 113 | /** |
115 | * clear selection | 114 | * clear selection |
116 | */ | 115 | */ |
117 | onClearSelection(); | 116 | onClearSelection(); |
118 | 117 | ||
119 | }; | 118 | // protected vars |
119 | protected: | ||
120 | |||
121 | /** | ||
122 | * current Session | ||
123 | */ | ||
124 | Session m_session; | ||
120 | 125 | ||
126 | /** | ||
127 | * other misc vars | ||
128 | */ | ||
121 | 129 | ||
130 | }; | ||