summaryrefslogtreecommitdiffstats
path: root/extra/kde330/kaccelbase.h
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-02-01 15:09:42 -0600
committerTimothy Pearson <[email protected]>2013-02-01 15:09:42 -0600
commit2df6bde18ab40472f2df8637cf6456cb80dc2329 (patch)
tree5a4362124ff46786fce835d2f1e7d583c92a5670 /extra/kde330/kaccelbase.h
parentbe6cfa4b990910e65e8d2f4f212eba3f7da6ee72 (diff)
downloadpytde-2df6bde18ab40472f2df8637cf6456cb80dc2329.tar.gz
pytde-2df6bde18ab40472f2df8637cf6456cb80dc2329.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'extra/kde330/kaccelbase.h')
-rw-r--r--extra/kde330/kaccelbase.h64
1 files changed, 32 insertions, 32 deletions
diff --git a/extra/kde330/kaccelbase.h b/extra/kde330/kaccelbase.h
index 30aeebe..ea654cc 100644
--- a/extra/kde330/kaccelbase.h
+++ b/extra/kde330/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
@@ -119,23 +119,23 @@ class TQWidget;
* @version $Id: kaccelbase.h,v 1.26 2003/08/16 19:44:57 coolo 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,46 +185,46 @@ class 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