diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:09:42 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:09:42 -0600 |
commit | 2df6bde18ab40472f2df8637cf6456cb80dc2329 (patch) | |
tree | 5a4362124ff46786fce835d2f1e7d583c92a5670 /extra/kde301/kaccelbase.h | |
parent | be6cfa4b990910e65e8d2f4f212eba3f7da6ee72 (diff) | |
download | pytde-2df6bde18ab40472f2df8637cf6456cb80dc2329.tar.gz pytde-2df6bde18ab40472f2df8637cf6456cb80dc2329.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'extra/kde301/kaccelbase.h')
-rw-r--r-- | extra/kde301/kaccelbase.h | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/extra/kde301/kaccelbase.h b/extra/kde301/kaccelbase.h index 5405a1f..0fbbe79 100644 --- a/extra/kde301/kaccelbase.h +++ b/extra/kde301/kaccelbase.h @@ -34,7 +34,7 @@ class TQWidget; //---------------------------------------------------- -class KAccelBasePrivate; +class TDEAccelBasePrivate; /** * Handle keyboard accelerators. * @@ -42,7 +42,7 @@ class KAccelBasePrivate; * key bindings through application configuration files or through the * @ref KKeyChooser GUI. * - * A @ref KAccel contains a list of accelerator items. Each accelerator item + * A @ref 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 KAccelBasePrivate; * 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 KAccelBasePrivate; * The translated first argument for @ref insertItem() is used only * in the configuration dialog. *<pre> - * 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(); *</pre> * * If a shortcut has a menu entry as well, you could insert them like - * this. The example is again the @ref KStdAccel::Print from above. + * this. The example is again the @ref TDEStdAccel::Print from above. * * <pre> * int id; * id = popup->insertItem("&Print",this, SLOT(printDoc())); - * a->changeMenuAccel(popup, id, KStdAccel::Print ); + * a->changeMenuAccel(popup, id, TDEStdAccel::Print ); * </pre> * * 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 @@ -119,23 +119,23 @@ class KAccelBasePrivate; * @version $Id: kaccelbase.h,v 1.20 2002/03/03 21:20:25 lunakl Exp $ */ -class KAccelBase +class 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 ); @@ -148,10 +148,10 @@ class 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 ); @@ -159,7 +159,7 @@ class 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 ); @@ -185,49 +185,49 @@ class KAccelBase // Protected methods protected: - void slotRemoveAction( KAccelAction* ); + void slotRemoveAction( TDEAccelAction* ); 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; protected: virtual void virtual_hook( int id, void* data ); private: - KAccelBasePrivate* d; + TDEAccelBasePrivate* d; }; #endif // _KACCELBASE_H |