summaryrefslogtreecommitdiff
path: root/libopie2/opieui/okeyconfigwidget.h
Unidiff
Diffstat (limited to 'libopie2/opieui/okeyconfigwidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/okeyconfigwidget.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/libopie2/opieui/okeyconfigwidget.h b/libopie2/opieui/okeyconfigwidget.h
index 9e26719..f75ed99 100644
--- a/libopie2/opieui/okeyconfigwidget.h
+++ b/libopie2/opieui/okeyconfigwidget.h
@@ -40,26 +40,26 @@ namespace Private {
40 * functions. 40 * functions.
41 * There are also static methods to get special keys. 41 * There are also static methods to get special keys.
42 * OKeyPair will be used with \see OKeyConfigItem 42 * OKeyPair will be used with \see OKeyConfigItem
43 * 43 *
44 * @since 1.2 44 * @since 1.2
45 */ 45 */
46class OKeyPair { 46class OKeyPair {
47public: 47public:
48 typedef QValueList<OKeyPair> List; 48 typedef QValueList<OKeyPair> List;
49 OKeyPair( int key = -1, int modifier = -1); 49 OKeyPair( int key = -1, int modifier = -1);
50 ~OKeyPair(); 50 ~OKeyPair();
51 51
52 bool operator==( const OKeyPair& ); 52 bool operator==( const OKeyPair& )const;
53 bool operator!=( const OKeyPair& ); 53 bool operator!=( const OKeyPair& )const;
54 54
55 bool isEmpty()const; 55 bool isEmpty()const;
56 56
57 int keycode()const; 57 int keycode()const;
58 int modifier()const; 58 int modifier()const;
59 59
60 void setKeycode( int ); 60 void setKeycode( int );
61 void setModifier( int ); 61 void setModifier( int );
62 62
63 static OKeyPair returnKey(); 63 static OKeyPair returnKey();
64 static OKeyPair leftArrowKey(); 64 static OKeyPair leftArrowKey();
65 static OKeyPair rightArrowKey(); 65 static OKeyPair rightArrowKey();
@@ -86,26 +86,26 @@ private:
86class OKeyConfigItem { 86class OKeyConfigItem {
87 friend class OKeyConfigManager; 87 friend class OKeyConfigManager;
88public: 88public:
89 typedef QValueList<OKeyConfigItem> List; 89 typedef QValueList<OKeyConfigItem> List;
90 OKeyConfigItem( const QString& text = QString::null , const QCString& config_key = QCString(), 90 OKeyConfigItem( const QString& text = QString::null , const QCString& config_key = QCString(),
91 const QPixmap& symbol = QPixmap(), 91 const QPixmap& symbol = QPixmap(),
92 int id = -1, 92 int id = -1,
93 const OKeyPair& def = OKeyPair::emptyKey(), 93 const OKeyPair& def = OKeyPair::emptyKey(),
94 QObject *caller = 0, const char* slot = 0); 94 QObject *caller = 0, const char* slot = 0);
95 OKeyConfigItem( const Opie::Core::ODeviceButton& ); 95 OKeyConfigItem( const Opie::Core::ODeviceButton& );
96 ~OKeyConfigItem(); 96 ~OKeyConfigItem();
97 97
98 bool operator==( const OKeyConfigItem& ); 98 bool operator==( const OKeyConfigItem& )const;
99 bool operator!=( const OKeyConfigItem& ); 99 bool operator!=( const OKeyConfigItem& )const;
100 100
101 QString text()const; 101 QString text()const;
102 QPixmap pixmap()const; 102 QPixmap pixmap()const;
103 int id()const; 103 int id()const;
104 104
105 105
106 106
107 OKeyPair keyPair()const; 107 OKeyPair keyPair()const;
108 OKeyPair defaultKeyPair()const; 108 OKeyPair defaultKeyPair()const;
109 QCString configKey()const; 109 QCString configKey()const;
110 110
111 111
@@ -244,26 +244,28 @@ public:
244 244
245 void load(); 245 void load();
246 void save(); 246 void save();
247 247
248private slots: 248private slots:
249 void slotListViewItem( QListViewItem* ); 249 void slotListViewItem( QListViewItem* );
250 void slotNoKey(); 250 void slotNoKey();
251 void slotDefaultKey(); 251 void slotDefaultKey();
252 void slotCustomKey(); 252 void slotCustomKey();
253 void slotConfigure(); 253 void slotConfigure();
254 254
255private: 255private:
256 static bool sanityCheck( Opie::Ui::Private::OKeyListViewItem* man,
257 const OKeyPair& newItem );
256 void updateItem( Opie::Ui::Private::OKeyListViewItem* man, 258 void updateItem( Opie::Ui::Private::OKeyListViewItem* man,
257 const OKeyPair& newItem); 259 const OKeyPair& newItem);
258 void initUi(); 260 void initUi();
259 Opie::Ui::OListView *m_view; 261 Opie::Ui::OListView *m_view;
260 Opie::Ui::Private::OKeyConfigWidgetPrivateList m_list; 262 Opie::Ui::Private::OKeyConfigWidgetPrivateList m_list;
261 QLabel *m_lbl; 263 QLabel *m_lbl;
262 QPushButton *m_btn; 264 QPushButton *m_btn;
263 QRadioButton *m_def, *m_cus, *m_none; 265 QRadioButton *m_def, *m_cus, *m_none;
264 QWidget* m_box; 266 QWidget* m_box;
265 ChangeMode m_mode; 267 ChangeMode m_mode;
266 class Private; 268 class Private;
267 Private *d; 269 Private *d;
268}; 270};
269 271