summaryrefslogtreecommitdiff
path: root/libopie2/opieui/okeyconfigwidget.h
Unidiff
Diffstat (limited to 'libopie2/opieui/okeyconfigwidget.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opieui/okeyconfigwidget.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libopie2/opieui/okeyconfigwidget.h b/libopie2/opieui/okeyconfigwidget.h
index f75ed99..bb8eb6c 100644
--- a/libopie2/opieui/okeyconfigwidget.h
+++ b/libopie2/opieui/okeyconfigwidget.h
@@ -4,49 +4,49 @@
4 */ 4 */
5 5
6 6
7#ifndef ODP_KEY_CONFIG_WIDGET_H 7#ifndef ODP_KEY_CONFIG_WIDGET_H
8#define ODP_KEY_CONFIG_WIDGET_H 8#define ODP_KEY_CONFIG_WIDGET_H
9 9
10#include <opie2/oconfig.h> 10#include <opie2/oconfig.h>
11#include <opie2/odevice.h> 11#include <opie2/odevice.h>
12 12
13#include <qstring.h> 13#include <qstring.h>
14#include <qpixmap.h> 14#include <qpixmap.h>
15#include <qcstring.h> 15#include <qcstring.h>
16#include <qhbox.h> 16#include <qhbox.h>
17#include <qvaluelist.h> 17#include <qvaluelist.h>
18 18
19class QKeyEvent; 19class QKeyEvent;
20class QLabel; 20class QLabel;
21class QPushButton; 21class QPushButton;
22class QListViewItem; 22class QListViewItem;
23class QRadioButton; 23class QRadioButton;
24class QTimer; 24class QTimer;
25 25
26namespace Opie { 26namespace Opie {
27namespace Ui { 27namespace Ui {
28namespace Private { 28namespace Internal {
29 class OKeyConfigWidgetPrivate; 29 class OKeyConfigWidgetPrivate;
30 typedef QValueList<OKeyConfigWidgetPrivate> OKeyConfigWidgetPrivateList; 30 typedef QValueList<OKeyConfigWidgetPrivate> OKeyConfigWidgetPrivateList;
31 class OKeyListViewItem; 31 class OKeyListViewItem;
32} 32}
33 class OListViewItem; 33 class OListViewItem;
34 class OListView; 34 class OListView;
35 35
36/** 36/**
37 * \brief small class representing a Key with possible modifiers 37 * \brief small class representing a Key with possible modifiers
38 * This class holds information about key code and possible 38 * This class holds information about key code and possible
39 * modifier state. That is the lowest level of the key input 39 * modifier state. That is the lowest level of the key input
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& )const; 52 bool operator==( const OKeyPair& )const;
@@ -232,55 +232,55 @@ public:
232 /** 232 /**
233 * Immediate Apply the change directly to the underlying OKeyConfigManager 233 * Immediate Apply the change directly to the underlying OKeyConfigManager
234 * Queue Save all items and then apply when you save() 234 * Queue Save all items and then apply when you save()
235 */ 235 */
236 enum ChangeMode { Imediate, Queue }; 236 enum ChangeMode { Imediate, Queue };
237 OKeyConfigWidget( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 237 OKeyConfigWidget( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
238 ~OKeyConfigWidget(); 238 ~OKeyConfigWidget();
239 239
240 void setChangeMode( enum ChangeMode ); 240 void setChangeMode( enum ChangeMode );
241 ChangeMode changeMode()const; 241 ChangeMode changeMode()const;
242 242
243 void insert( const QString& name, OKeyConfigManager* ); 243 void insert( const QString& name, OKeyConfigManager* );
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, 256 static bool sanityCheck( Opie::Ui::Internal::OKeyListViewItem* man,
257 const OKeyPair& newItem ); 257 const OKeyPair& newItem );
258 void updateItem( Opie::Ui::Private::OKeyListViewItem* man, 258 void updateItem( Opie::Ui::Internal::OKeyListViewItem* man,
259 const OKeyPair& newItem); 259 const OKeyPair& newItem);
260 void initUi(); 260 void initUi();
261 Opie::Ui::OListView *m_view; 261 Opie::Ui::OListView *m_view;
262 Opie::Ui::Private::OKeyConfigWidgetPrivateList m_list; 262 Opie::Ui::Internal::OKeyConfigWidgetPrivateList m_list;
263 QLabel *m_lbl; 263 QLabel *m_lbl;
264 QPushButton *m_btn; 264 QPushButton *m_btn;
265 QRadioButton *m_def, *m_cus, *m_none; 265 QRadioButton *m_def, *m_cus, *m_none;
266 QWidget* m_box; 266 QWidget* m_box;
267 ChangeMode m_mode; 267 ChangeMode m_mode;
268 class Private; 268 class Private;
269 Private *d; 269 Private *d;
270}; 270};
271 271
272 272
273/** 273/**
274 * This is a small dialog that allows you to 274 * This is a small dialog that allows you to
275 * capture a key sequence. 275 * capture a key sequence.
276 * If you want it to close after a key was captured you 276 * If you want it to close after a key was captured you
277 * can use this code snippet. 277 * can use this code snippet.
278 * 278 *
279 * \code 279 * \code
280 * OKeyChooserConfigDialog diag(0,0,true); 280 * OKeyChooserConfigDialog diag(0,0,true);
281 * connect(&diag,SIGNAL(keyCaptured()), 281 * connect(&diag,SIGNAL(keyCaptured()),
282 * this,SLOT(accept())); 282 * this,SLOT(accept()));
283 * if( QPEApplication::execDialog(&diag) == QDialog::Accept ){ 283 * if( QPEApplication::execDialog(&diag) == QDialog::Accept ){
284 * take_the_key_and_do_something 284 * take_the_key_and_do_something
285 * } 285 * }
286 * 286 *