Diffstat (limited to 'libopie2/opiecore/okeyconfigmanager.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/okeyconfigmanager.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libopie2/opiecore/okeyconfigmanager.h b/libopie2/opiecore/okeyconfigmanager.h index d0a6247..12804ee 100644 --- a/libopie2/opiecore/okeyconfigmanager.h +++ b/libopie2/opiecore/okeyconfigmanager.h @@ -45,49 +45,49 @@ public: void setKeycode( int ); void setModifier( int ); static OKeyPair returnKey(); static OKeyPair leftArrowKey(); static OKeyPair rightArrowKey(); static OKeyPair upArrowKey(); static OKeyPair downArrowKey(); static OKeyPair emptyKey(); static OKeyPair::List hardwareKeys(); private: int m_key; int m_mod; class Private; Private* d; }; /** * A class to represent an OKeyPair. * It consists out of a Text exposed to the user, Config Key Item, * Pixmap, A default OKeyPair and the set OKeyPair. * You can also pass an id to it * - * @since 1.1.2 + * @since 1.2 */ class OKeyConfigItem { friend class OKeyConfigManager; public: typedef QValueList<OKeyConfigItem> List; OKeyConfigItem( const QString& text = QString::null , const QCString& config_key = QCString(), const QPixmap& symbol = QPixmap(), int id = -1, const OKeyPair& def = OKeyPair::emptyKey(), QObject *caller = 0, const char* slot = 0); OKeyConfigItem( const Opie::Core::ODeviceButton& ); ~OKeyConfigItem(); bool operator==( const OKeyConfigItem& )const; bool operator!=( const OKeyConfigItem& )const; QString text()const; QPixmap pixmap()const; int id()const; OKeyPair keyPair()const; OKeyPair defaultKeyPair()const; @@ -135,65 +135,66 @@ private: * handled by your action and let give you the action. Or you can install * the event filter and get a signal. * You need to load and save yourself! * * Again if you want to extend it and I missed a virtual, tell me so I can improve (zecke@handhelds.org) * * @since 1.1.2 */ class OKeyConfigManager : public QObject { Q_OBJECT typedef QMap<int, OKeyConfigItem::List> OKeyMapConfigPrivate; public: enum EventMask { MaskPressed = 0x1, MaskReleased = 0x2, }; OKeyConfigManager(Opie::Core::OConfig *conf = 0, const QString& group = QString::null, const OKeyPair::List &block = OKeyPair::List(), bool grabkeyboard = false, QObject * par = 0, const char* name = 0 ); virtual ~OKeyConfigManager(); +public slots: virtual void load(); virtual void save(); + void handleWidget( QWidget* ); +public: virtual OKeyConfigItem handleKeyEvent( QKeyEvent* ); int handleKeyEventId( QKeyEvent* ); void addKeyConfig( const OKeyConfigItem& ); void removeKeyConfig( const OKeyConfigItem& ); void clearKeyConfig(); void addToBlackList( const OKeyPair& ); void removeFromBlackList( const OKeyPair& ); void clearBlackList(); OKeyPair::List blackList()const; - void handleWidget( QWidget* ); - bool eventFilter( QObject*, QEvent* ); /** * Sets the event mask flags aMask. * * aMask is a combination of OKeyConfigManager::EventMask * * @see eventMask(), testEventMask(), addEventMask(), clearEventMask() */ void setEventMask(uint aMask); /** * Returns the event mask flags set. * * aMask is a combination of OKeyConfigManager::EventMask * * @see setEventMask(), testEventMask(), addEventMask(), clearEventMask() */ uint eventMask()const; /** * Test if the event mask flag aMask is set. * * @param aMask one of OKeyConfigManager::EventMask * * @see eventMask(), setEventMask(), addEventMask(), clearEventMask() |