summaryrefslogtreecommitdiff
path: root/libopie2/opieui/okeyconfigwidget.h
authorzecke <zecke>2004-03-29 01:19:31 (UTC)
committer zecke <zecke>2004-03-29 01:19:31 (UTC)
commite8dd4582051e07a049ae8b3cd04b4463ecc33790 (patch) (side-by-side diff)
treeab7d4d71eb460f0c1afff2d326c0447f5b986814 /libopie2/opieui/okeyconfigwidget.h
parent28648c47d06c339ee893f8cef740bae9d54863bf (diff)
downloadopie-e8dd4582051e07a049ae8b3cd04b4463ecc33790.zip
opie-e8dd4582051e07a049ae8b3cd04b4463ecc33790.tar.gz
opie-e8dd4582051e07a049ae8b3cd04b4463ecc33790.tar.bz2
-Bugfixes on compare operator and isEmpty
-Implement saving from the widget to the manager -Fix Ctrl vs Alt mixup Yeah now the user can select between none and default A OKeyChooserDialog will soon be implemented
Diffstat (limited to 'libopie2/opieui/okeyconfigwidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/okeyconfigwidget.h41
1 files changed, 40 insertions, 1 deletions
diff --git a/libopie2/opieui/okeyconfigwidget.h b/libopie2/opieui/okeyconfigwidget.h
index a7a5f48..8d2a1ef 100644
--- a/libopie2/opieui/okeyconfigwidget.h
+++ b/libopie2/opieui/okeyconfigwidget.h
@@ -248,7 +248,7 @@ private slots:
void slotNoKey();
void slotDefaultKey();
void slotCustomKey();
-
+ void slotConfigure();
private:
void initUi();
@@ -263,6 +263,45 @@ private:
Private *d;
};
+
+/**
+ * This is a small dialog that allows you to
+ * capture a key sequence.
+ * If you want it to close after a key was captured you
+ * can use this code snippet.
+ *
+ * \code
+ * OKeyChooserConfigDialog diag(0,0,true);
+ * connect(&diag,SIGNAL(keyCaptured()),
+ * this,SLOT(accept()));
+ * if( QPEApplication::execDialog(&diag) == QDialog::Accept ){
+ * take_the_key_and_do_something
+ * }
+ *
+ * \endcode
+ *
+ */
+class OKeyChooserConfigDialog : public QDialog {
+ Q_OBJECT
+public:
+ OKeyChooserConfigDialog( QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
+ ~OKeyChooserConfigDialog();
+
+ OKeyPair keyPair()const;
+
+protected:
+ void keyPressEvent( QKeyEvent* );
+ void keyReleaseEvent( QKeyEvent* );
+
+signals:
+ void keyCaptured();
+
+private:
+ OKeyPair m_keyPair;
+ class Private;
+ Private *d;
+};
+
}
}