author | hash <hash> | 2002-08-15 19:29:19 (UTC) |
---|---|---|
committer | hash <hash> | 2002-08-15 19:29:19 (UTC) |
commit | d9cc9bedf72e921f8f7d8edeb189db127c5651e3 (patch) (unidiff) | |
tree | e43631d8b74db204d9c60c34b0782aa37df185c2 /inputmethods/multikey/keyboard.h | |
parent | f568b83e0ef16a0e3b46d41b2cfaa5fdda9d1d45 (diff) | |
download | opie-d9cc9bedf72e921f8f7d8edeb189db127c5651e3.zip opie-d9cc9bedf72e921f8f7d8edeb189db127c5651e3.tar.gz opie-d9cc9bedf72e921f8f7d8edeb189db127c5651e3.tar.bz2 |
changed the keymap selector widget style
Diffstat (limited to 'inputmethods/multikey/keyboard.h') (more/less context) (show whitespace changes)
-rw-r--r-- | inputmethods/multikey/keyboard.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/inputmethods/multikey/keyboard.h b/inputmethods/multikey/keyboard.h index c2efe10..8ca50ea 100644 --- a/inputmethods/multikey/keyboard.h +++ b/inputmethods/multikey/keyboard.h | |||
@@ -71,48 +71,49 @@ public: | |||
71 | QString title; | 71 | QString title; |
72 | 72 | ||
73 | private: | 73 | private: |
74 | 74 | ||
75 | typedef struct Key { | 75 | typedef struct Key { |
76 | int qcode; // are qt key codes just unicode values? | 76 | int qcode; // are qt key codes just unicode values? |
77 | ushort unicode; | 77 | ushort unicode; |
78 | int width; // not pixels but relative key width. normal key is 2 | 78 | int width; // not pixels but relative key width. normal key is 2 |
79 | 79 | ||
80 | // only needed for keys like ctrl that can have multiple keys pressed at once | 80 | // only needed for keys like ctrl that can have multiple keys pressed at once |
81 | bool *pressed; | 81 | bool *pressed; |
82 | QPixmap *pix; | 82 | QPixmap *pix; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | QList<Key> keys[6]; | 85 | QList<Key> keys[6]; |
86 | QMap<ushort,ushort> shiftMap; | 86 | QMap<ushort,ushort> shiftMap; |
87 | 87 | ||
88 | }; | 88 | }; |
89 | 89 | ||
90 | class Keyboard : public QFrame | 90 | class Keyboard : public QFrame |
91 | { | 91 | { |
92 | Q_OBJECT | 92 | Q_OBJECT |
93 | public: | 93 | public: |
94 | Keyboard( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 94 | Keyboard( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
95 | ~Keyboard(); | ||
95 | 96 | ||
96 | void resetState(); | 97 | void resetState(); |
97 | 98 | ||
98 | void mousePressEvent(QMouseEvent*); | 99 | void mousePressEvent(QMouseEvent*); |
99 | void mouseReleaseEvent(QMouseEvent*); | 100 | void mouseReleaseEvent(QMouseEvent*); |
100 | void resizeEvent(QResizeEvent*); | 101 | void resizeEvent(QResizeEvent*); |
101 | void paintEvent(QPaintEvent* e); | 102 | void paintEvent(QPaintEvent* e); |
102 | //void timerEvent(QTimerEvent* e); | 103 | //void timerEvent(QTimerEvent* e); |
103 | void drawKeyboard( QPainter &p, int row = -1, int col = -1); | 104 | void drawKeyboard( QPainter &p, int row = -1, int col = -1); |
104 | 105 | ||
105 | QSize sizeHint() const; | 106 | QSize sizeHint() const; |
106 | 107 | ||
107 | signals: | 108 | signals: |
108 | void key( ushort scancode, ushort unicode, ushort modifiers, bool, bool ); | 109 | void key( ushort scancode, ushort unicode, ushort modifiers, bool, bool ); |
109 | 110 | ||
110 | private slots: | 111 | private slots: |
111 | void repeat(); | 112 | void repeat(); |
112 | void togglePickboard(bool on_off); | 113 | void togglePickboard(bool on_off); |
113 | void setMapToDefault(); | 114 | void setMapToDefault(); |
114 | void setMapToFile(QString file); | 115 | void setMapToFile(QString file); |
115 | 116 | ||
116 | private: | 117 | private: |
117 | int getKey( int &w, int j = -1 ); | 118 | int getKey( int &w, int j = -1 ); |
118 | void clearHighlight(); | 119 | void clearHighlight(); |