author | ibotty <ibotty> | 2002-10-13 10:27:40 (UTC) |
---|---|---|
committer | ibotty <ibotty> | 2002-10-13 10:27:40 (UTC) |
commit | b8377d9c462d7edbc92c6809503cb53a09f8fd98 (patch) (unidiff) | |
tree | 87e592def2ca4838665de93ba0e93125cffec1d8 /noncore/apps/opie-console/widget_layer.h | |
parent | 034504c65f8115f6a2fbd4f022082cc867aa2605 (diff) | |
download | opie-b8377d9c462d7edbc92c6809503cb53a09f8fd98.zip opie-b8377d9c462d7edbc92c6809503cb53a09f8fd98.tar.gz opie-b8377d9c462d7edbc92c6809503cb53a09f8fd98.tar.bz2 |
added call to calcGeometry in constructor of EmulationWidget.
hopefully fixes the 50x1 size problem
Diffstat (limited to 'noncore/apps/opie-console/widget_layer.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/widget_layer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/widget_layer.h b/noncore/apps/opie-console/widget_layer.h index bc8fe36..067f3da 100644 --- a/noncore/apps/opie-console/widget_layer.h +++ b/noncore/apps/opie-console/widget_layer.h | |||
@@ -1,124 +1,126 @@ | |||
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 | #ifndef WIDGET_LAYER_H | 13 | #ifndef WIDGET_LAYER_H |
14 | #define WIDGET_LAYER_H | 14 | #define WIDGET_LAYER_H |
15 | 15 | ||
16 | // qt includes | 16 | // qt includes |
17 | #include <qapplication.h> | 17 | #include <qapplication.h> |
18 | #include <qframe.h> | 18 | #include <qframe.h> |
19 | #include <qarray.h> | 19 | #include <qarray.h> |
20 | #include <qtimer.h> | 20 | #include <qtimer.h> |
21 | #include <qkeycode.h> | 21 | #include <qkeycode.h> |
22 | #include <qclipboard.h> | 22 | #include <qclipboard.h> |
23 | 23 | ||
24 | 24 | ||
25 | // opie-console includes | 25 | // opie-console includes |
26 | #include "session.h" | 26 | #include "session.h" |
27 | #include "common.h" | 27 | #include "common.h" |
28 | #include "profile.h" | 28 | #include "profile.h" |
29 | |||
30 | |||
29 | /* | 31 | /* |
30 | * given a pseudo location ( column, line ), | 32 | * given a pseudo location ( column, line ), |
31 | * returns the actual index, in the QArray<Character> | 33 | * returns the actual index, in the QArray<Character> |
32 | */ | 34 | */ |
33 | #define loc(X,Y) ((Y)*m_columns+(X)) | 35 | #define loc(X,Y) ((Y)*m_columns+(X)) |
34 | 36 | ||
35 | 37 | ||
36 | 38 | ||
37 | extern unsigned short vt100_graphics[32]; | 39 | extern unsigned short vt100_graphics[32]; |
38 | 40 | ||
39 | class WidgetLayer : public QFrame | 41 | class WidgetLayer : public QFrame |
40 | { Q_OBJECT | 42 | { Q_OBJECT |
41 | 43 | ||
42 | public: | 44 | public: |
43 | 45 | ||
44 | /** | 46 | /** |
45 | * constructor | 47 | * constructor |
46 | * @param const Profile &config, the configuration for this widget | 48 | * @param const Profile &config, the configuration for this widget |
47 | * @param QWidget *parent, the parent widget | 49 | * @param QWidget *parent, the parent widget |
48 | * @param const char *name, the name of the widget, defaults to "" | 50 | * @param const char *name, the name of the widget, defaults to "" |
49 | */ | 51 | */ |
50 | WidgetLayer( const Profile& config, QWidget *parent=0, const char *name=0 ); | 52 | WidgetLayer( const Profile& config, QWidget *parent=0, const char *name=0 ); |
51 | 53 | ||
52 | /** | 54 | /** |
53 | * destructor | 55 | * destructor |
54 | */ | 56 | */ |
55 | virtual ~WidgetLayer(); | 57 | virtual ~WidgetLayer(); |
56 | 58 | ||
57 | public: | 59 | public: |
58 | /** | 60 | /** |
59 | * sets the image | 61 | * sets the image |
60 | * @param QArray<Character> const newimg, the new image | 62 | * @param QArray<Character> const newimg, the new image |
61 | * @param int lines, lines count of newimg | 63 | * @param int lines, lines count of newimg |
62 | * @param int columns, columns count of newimg | 64 | * @param int columns, columns count of newimg |
63 | */ | 65 | */ |
64 | virtual void setImage( QArray<Character> const newimg, int lines, int colums ) = 0; | 66 | virtual void setImage( QArray<Character> const newimg, int lines, int colums ) = 0; |
65 | 67 | ||
66 | /** | 68 | /** |
67 | * annoy the user | 69 | * annoy the user |
68 | */ | 70 | */ |
69 | void bell(); | 71 | void bell(); |
70 | 72 | ||
71 | /** | 73 | /** |
72 | * @return int m_lines, the lines count | 74 | * @return int m_lines, the lines count |
73 | */ | 75 | */ |
74 | int lines(){ return m_lines; } | 76 | int lines(){ return m_lines; } |
75 | 77 | ||
76 | /** | 78 | /** |
77 | * @return int m_columns, the columns count | 79 | * @return int m_columns, the columns count |
78 | */ | 80 | */ |
79 | int columns(){ return m_columns; } | 81 | int columns(){ return m_columns; } |
80 | 82 | ||
81 | /** | 83 | /** |
82 | * insert current selection (currently this is only the clipboard) | 84 | * insert current selection (currently this is only the clipboard) |
83 | */ | 85 | */ |
84 | void insertSelection(); | 86 | void insertSelection(); |
85 | 87 | ||
86 | /** | 88 | /** |
87 | * insert text | 89 | * insert text |
88 | * @param QString text, the text to be inserted | 90 | * @param QString text, the text to be inserted |
89 | */ | 91 | */ |
90 | void insertText( QString text ); | 92 | void insertText( QString text ); |
91 | 93 | ||
92 | /** | 94 | /** |
93 | * set selection (clipboard) to text | 95 | * set selection (clipboard) to text |
94 | * @param const QString &text, the text to be selected | 96 | * @param const QString &text, the text to be selected |
95 | */ | 97 | */ |
96 | void setSelection( const QString &text ); | 98 | void setSelection( const QString &text ); |
97 | 99 | ||
98 | /** | 100 | /** |
99 | * paste content of clipboard | 101 | * paste content of clipboard |
100 | */ | 102 | */ |
101 | void pasteClipboard(); | 103 | void pasteClipboard(); |
102 | 104 | ||
103 | 105 | ||
104 | /** | 106 | /** |
105 | * reload configuration | 107 | * reload configuration |
106 | * @param const Profile& config, the config to be used (may be the same as in constructor) | 108 | * @param const Profile& config, the config to be used (may be the same as in constructor) |
107 | */ | 109 | */ |
108 | virtual void reloadConfig( const Profile& config ) = 0; | 110 | virtual void reloadConfig( const Profile& config ) = 0; |
109 | 111 | ||
110 | 112 | ||
111 | /** | 113 | /** |
112 | * sets the scrollbar (if implemented by successor of this class) | 114 | * sets the scrollbar (if implemented by successor of this class) |
113 | */ | 115 | */ |
114 | virtual void setScroll( int cursor, int slines ) = 0; | 116 | virtual void setScroll( int cursor, int slines ) = 0; |
115 | 117 | ||
116 | /** | 118 | /** |
117 | * scrolls (if implemented, by successor of this class) | 119 | * scrolls (if implemented, by successor of this class) |
118 | * @param int value, how much the widget should scroll up (positive value) or down (negative value) | 120 | * @param int value, how much the widget should scroll up (positive value) or down (negative value) |
119 | */ | 121 | */ |
120 | virtual void scroll( int value ) = 0; | 122 | virtual void scroll( int value ) = 0; |
121 | 123 | ||
122 | signals: | 124 | signals: |
123 | 125 | ||
124 | /** | 126 | /** |