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.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:
248 void slotNoKey(); 248 void slotNoKey();
249 void slotDefaultKey(); 249 void slotDefaultKey();
250 void slotCustomKey(); 250 void slotCustomKey();
251 251 void slotConfigure();
252 252
253private: 253private:
254 void initUi(); 254 void initUi();
@@ -263,6 +263,45 @@ private:
263 Private *d; 263 Private *d;
264}; 264};
265 265
266
267/**
268 * This is a small dialog that allows you to
269 * capture a key sequence.
270 * If you want it to close after a key was captured you
271 * can use this code snippet.
272 *
273 * \code
274 * OKeyChooserConfigDialog diag(0,0,true);
275 * connect(&diag,SIGNAL(keyCaptured()),
276 * this,SLOT(accept()));
277 * if( QPEApplication::execDialog(&diag) == QDialog::Accept ){
278 * take_the_key_and_do_something
279 * }
280 *
281 * \endcode
282 *
283 */
284class OKeyChooserConfigDialog : public QDialog {
285 Q_OBJECT
286public:
287 OKeyChooserConfigDialog( QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
288 ~OKeyChooserConfigDialog();
289
290 OKeyPair keyPair()const;
291
292protected:
293 void keyPressEvent( QKeyEvent* );
294 void keyReleaseEvent( QKeyEvent* );
295
296signals:
297 void keyCaptured();
298
299private:
300 OKeyPair m_keyPair;
301 class Private;
302 Private *d;
303};
304
266} 305}
267} 306}
268 307