diff options
Diffstat (limited to 'extra/kde340/kaccelbase.h')
-rw-r--r-- | extra/kde340/kaccelbase.h | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/extra/kde340/kaccelbase.h b/extra/kde340/kaccelbase.h index 861ec68..00ab632 100644 --- a/extra/kde340/kaccelbase.h +++ b/extra/kde340/kaccelbase.h @@ -42,7 +42,7 @@ class TQWidget; * key bindings through application configuration files or through the * KKeyChooser GUI. * - * A KAccel contains a list of accelerator items. Each accelerator item + * A TDEAccel contains a list of accelerator items. Each accelerator item * consists of an action name and a keyboard code combined with modifiers * (Shift, Ctrl and Alt.) * @@ -55,7 +55,7 @@ class TQWidget; * connected. Accelerator items can be connected so that a key will activate * two different slots. * - * A KAccel object handles key events sent to its parent widget and to all + * A TDEAccel object handles key events sent to its parent widget and to all * children of this parent widget. * * Key binding reconfiguration during run time can be prevented by specifying @@ -74,33 +74,33 @@ class TQWidget; * The translated first argument for insertItem() is used only * in the configuration dialog. *\code - * KAccel *a = new KAccel( myWindow ); + * TDEAccel *a = new TDEAccel( myWindow ); * // Insert an action "Scroll Up" which is associated with the "Up" key: * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" ); * // Insert an action "Scroll Down" which is not associated with any key: * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0); * a->connectItem( "Scroll up", myWindow, SLOT( scrollUp() ) ); - * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it + * // a->insertStdItem( TDEStdAccel::Print ); //not necessary, since it * // is done automatially with the * // connect below! - * a->connectItem(KStdAccel::Print, myWindow, SLOT( printDoc() ) ); + * a->connectItem(TDEStdAccel::Print, myWindow, SLOT( printDoc() ) ); * * a->readSettings(); *\endcode * * If a shortcut has a menu entry as well, you could insert them like - * this. The example is again the KStdAccel::Print from above. + * this. The example is again the TDEStdAccel::Print from above. * * \code * int id; * id = popup->insertItem("&Print",this, SLOT(printDoc())); - * a->changeMenuAccel(popup, id, KStdAccel::Print ); + * a->changeMenuAccel(popup, id, TDEStdAccel::Print ); * \endcode * * If you want a somewhat "exotic" name for your standard print action, like * id = popup->insertItem(i18n("Print &Document"),this, SLOT(printDoc())); * it might be a good idea to insert the standard action before as - * a->insertStdItem( KStdAccel::Print, i18n("Print Document") ) + * a->insertStdItem( TDEStdAccel::Print, i18n("Print Document") ) * as well, so that the user can easily find the corresponding function. * * This technique works for other actions as well. Your "scroll up" function @@ -118,23 +118,23 @@ class TQWidget; * @short Configurable key binding support. */ -class TDECORE_EXPORT KAccelBase +class TDECORE_EXPORT TDEAccelBase { public: enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 }; enum Signal { KEYCODE_CHANGED }; - KAccelBase( int fInitCode ); - virtual ~KAccelBase(); + TDEAccelBase( int fInitCode ); + virtual ~TDEAccelBase(); uint actionCount() const; - KAccelActions& actions(); + TDEAccelActions& actions(); bool isEnabled() const; - KAccelAction* actionPtr( const TQString& sAction ); - const KAccelAction* actionPtr( const TQString& sAction ) const; - KAccelAction* actionPtr( const KKey& key ); - KAccelAction* actionPtr( const KKeyServer::Key& key ); + TDEAccelAction* actionPtr( const TQString& sAction ); + const TDEAccelAction* actionPtr( const TQString& sAction ) const; + TDEAccelAction* actionPtr( const KKey& key ); + TDEAccelAction* actionPtr( const KKeyServer::Key& key ); const TQString& configGroup() const { return m_sConfigGroup; } void setConfigGroup( const TQString& group ); @@ -147,10 +147,10 @@ class TDECORE_EXPORT KAccelBase // Procedures for manipulating Actions. //void clearActions(); - KAccelAction* insert( const TQString& sName, const TQString& sDesc ); - KAccelAction* insert( + TDEAccelAction* insert( const TQString& sName, const TQString& sDesc ); + TDEAccelAction* insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp, - const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4, + const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable = true, bool bEnabled = true ); bool remove( const TQString& sAction ); @@ -158,7 +158,7 @@ class TDECORE_EXPORT KAccelBase bool updateConnections(); - bool setShortcut( const TQString& sAction, const KShortcut& cut ); + bool setShortcut( const TQString& sAction, const TDEShortcut& cut ); // Modify individual Action sub-items bool setActionEnabled( const TQString& sAction, bool bEnable ); @@ -184,46 +184,46 @@ class TDECORE_EXPORT KAccelBase // Protected methods protected: - void slotRemoveAction( KAccelAction* ); + void slotRemoveAction( TDEAccelAction* ); struct X; void createKeyList( TQValueVector<struct X>& rgKeys ); - bool insertConnection( KAccelAction* ); - bool removeConnection( KAccelAction* ); + bool insertConnection( TDEAccelAction* ); + bool removeConnection( TDEAccelAction* ); virtual bool emitSignal( Signal ) = 0; - virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0; + virtual bool connectKey( TDEAccelAction&, const KKeyServer::Key& ) = 0; virtual bool connectKey( const KKeyServer::Key& ) = 0; - virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0; + virtual bool disconnectKey( TDEAccelAction&, const KKeyServer::Key& ) = 0; virtual bool disconnectKey( const KKeyServer::Key& ) = 0; protected: struct ActionInfo { - KAccelAction* pAction; + TDEAccelAction* pAction; uint iSeq, iVariation; //ActionInfo* pInfoNext; // nil if only one action uses this key. ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; } - ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation ) + ActionInfo( TDEAccelAction* _pAction, uint _iSeq, uint _iVariation ) { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; } }; typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap; - KAccelActions m_rgActions; + TDEAccelActions m_rgActions; KKeyToActionMap m_mapKeyToAction; - TQValueList<KAccelAction*> m_rgActionsNonUnique; + TQValueList<TDEAccelAction*> m_rgActionsNonUnique; bool m_bNativeKeys; // Use native key codes instead of TQt codes bool m_bEnabled; bool m_bConfigIsGlobal; TQString m_sConfigGroup; bool m_bAutoUpdate; - KAccelAction* mtemp_pActionRemoving; + TDEAccelAction* mtemp_pActionRemoving; private: - KAccelBase& operator =( const KAccelBase& ); + TDEAccelBase& operator =( const TDEAccelBase& ); - friend class KAccelActions; + friend class TDEAccelActions; }; #endif // _KACCELBASE_H |