diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:13:01 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:13:01 -0600 |
commit | deac2ca49faed824fe83066080714eb6d653615b (patch) | |
tree | 8b5bf97c5acaaf5285985b87fa76dbea0f35e4fa /tdeui/kactioncollection.cpp | |
parent | 0c9d97065a3d6ceb12d687555a1a33d90db96238 (diff) | |
download | tdelibs-deac2ca49faed824fe83066080714eb6d653615b.tar.gz tdelibs-deac2ca49faed824fe83066080714eb6d653615b.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'tdeui/kactioncollection.cpp')
-rw-r--r-- | tdeui/kactioncollection.cpp | 360 |
1 files changed, 180 insertions, 180 deletions
diff --git a/tdeui/kactioncollection.cpp b/tdeui/kactioncollection.cpp index c841b2730..74f273994 100644 --- a/tdeui/kactioncollection.cpp +++ b/tdeui/kactioncollection.cpp @@ -38,17 +38,17 @@ #include <tqptrdict.h> #include <tqvariant.h> -class KActionCollection::KActionCollectionPrivate +class TDEActionCollection::TDEActionCollectionPrivate { public: - KActionCollectionPrivate() + TDEActionCollectionPrivate() { m_instance = 0; - //m_bOneKAccelOnly = false; + //m_bOneTDEAccelOnly = false; //m_iWidgetCurrent = 0; m_bAutoConnectShortcuts = true; m_widget = 0; - m_kaccel = m_builderKAccel = 0; + m_kaccel = m_builderTDEAccel = 0; m_dctHighlightContainers.setAutoDelete( true ); m_highlight = false; m_currentHighlightAction = 0; @@ -59,169 +59,169 @@ public: TDEInstance *m_instance; TQString m_sXMLFile; bool m_bAutoConnectShortcuts; - //bool m_bOneKAccelOnly; + //bool m_bOneTDEAccelOnly; //int m_iWidgetCurrent; //TQValueList<TQWidget*> m_widgetList; - //TQValueList<KAccel*> m_kaccelList; - TQValueList<KActionCollection*> m_docList; + //TQValueList<TDEAccel*> m_kaccelList; + TQValueList<TDEActionCollection*> m_docList; TQWidget *m_widget; - KAccel *m_kaccel; - KAccel *m_builderKAccel; + TDEAccel *m_kaccel; + TDEAccel *m_builderTDEAccel; - TQAsciiDict<KAction> m_actionDict; - TQPtrDict< TQPtrList<KAction> > m_dctHighlightContainers; + TQAsciiDict<TDEAction> m_actionDict; + TQPtrDict< TQPtrList<TDEAction> > m_dctHighlightContainers; bool m_highlight; - KAction *m_currentHighlightAction; + TDEAction *m_currentHighlightAction; bool m_statusCleared; const KXMLGUIClient *m_parentGUIClient; }; -KActionCollection::KActionCollection( TQWidget *parent, const char *name, +TDEActionCollection::TDEActionCollection( TQWidget *parent, const char *name, TDEInstance *instance ) : TQObject( parent, name ) { - kdDebug(129) << "KActionCollection::KActionCollection( " << parent << ", " << name << " ): this = " << this << endl; // ellis - d = new KActionCollectionPrivate; + kdDebug(129) << "TDEActionCollection::TDEActionCollection( " << parent << ", " << name << " ): this = " << this << endl; // ellis + d = new TDEActionCollectionPrivate; if( parent ) setWidget( parent ); - //d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0); + //d->m_bOneTDEAccelOnly = (d->m_kaccelList.count() > 0); setInstance( instance ); } -KActionCollection::KActionCollection( TQWidget *watch, TQObject* parent, const char *name, +TDEActionCollection::TDEActionCollection( TQWidget *watch, TQObject* parent, const char *name, TDEInstance *instance ) : TQObject( parent, name ) { - kdDebug(129) << "KActionCollection::KActionCollection( " << watch << ", " << parent << ", " << name << " ): this = " << this << endl; //ellis - d = new KActionCollectionPrivate; + kdDebug(129) << "TDEActionCollection::TDEActionCollection( " << watch << ", " << parent << ", " << name << " ): this = " << this << endl; //ellis + d = new TDEActionCollectionPrivate; if( watch ) setWidget( watch ); - //d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0); + //d->m_bOneTDEAccelOnly = (d->m_kaccelList.count() > 0); setInstance( instance ); } #ifndef KDE_NO_COMPAT // KDE 4: remove -KActionCollection::KActionCollection( TQObject *parent, const char *name, +TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, TDEInstance *instance ) : TQObject( parent, name ) { - kdWarning(129) << "KActionCollection::KActionCollection( TQObject *parent, const char *name, TDEInstance *instance )" << endl; //ellis + kdWarning(129) << "TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, TDEInstance *instance )" << endl; //ellis kdDebug(129) << kdBacktrace() << endl; - d = new KActionCollectionPrivate; + d = new TDEActionCollectionPrivate; TQWidget* w = tqt_dynamic_cast<TQWidget*>( parent ); if( w ) setWidget( w ); - //d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0); + //d->m_bOneTDEAccelOnly = (d->m_kaccelList.count() > 0); setInstance( instance ); } -KActionCollection::KActionCollection( const KActionCollection © ) +TDEActionCollection::TDEActionCollection( const TDEActionCollection © ) : TQObject() { - kdWarning(129) << "KActionCollection::KActionCollection( const KActionCollection & ): function is severely deprecated." << endl; - d = new KActionCollectionPrivate; + kdWarning(129) << "TDEActionCollection::TDEActionCollection( const TDEActionCollection & ): function is severely deprecated." << endl; + d = new TDEActionCollectionPrivate; *this = copy; } #endif // KDE 4: remove end -KActionCollection::KActionCollection( const char *name, const KXMLGUIClient *parent ) +TDEActionCollection::TDEActionCollection( const char *name, const KXMLGUIClient *parent ) : TQObject( 0L, name ) { - d = new KActionCollectionPrivate; + d = new TDEActionCollectionPrivate; d->m_parentGUIClient=parent; d->m_instance=parent->instance(); } -KActionCollection::~KActionCollection() +TDEActionCollection::~TDEActionCollection() { - kdDebug(129) << "KActionCollection::~KActionCollection(): this = " << this << endl; - for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); + kdDebug(129) << "TDEActionCollection::~TDEActionCollection(): this = " << this << endl; + for ( TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); it.current(); ++it ) { + TDEAction* pAction = it.current(); if ( pAction->m_parentCollection == this ) pAction->m_parentCollection = 0L; } delete d->m_kaccel; - delete d->m_builderKAccel; + delete d->m_builderTDEAccel; delete d; d = 0; } -void KActionCollection::setWidget( TQWidget* w ) +void TDEActionCollection::setWidget( TQWidget* w ) { //if ( d->m_actionDict.count() > 0 ) { - // kdError(129) << "KActionCollection::setWidget(): must be called before any actions are added to collection!" << endl; + // kdError(129) << "TDEActionCollection::setWidget(): must be called before any actions are added to collection!" << endl; // kdDebug(129) << kdBacktrace() << endl; //} //else if ( !d->m_widget ) { d->m_widget = w; - d->m_kaccel = new KAccel( w, this, "KActionCollection-KAccel" ); + d->m_kaccel = new TDEAccel( w, this, "TDEActionCollection-TDEAccel" ); } else if ( d->m_widget != w ) - kdWarning(129) << "KActionCollection::setWidget(): tried to change widget from " << d->m_widget << " to " << w << endl; + kdWarning(129) << "TDEActionCollection::setWidget(): tried to change widget from " << d->m_widget << " to " << w << endl; } -void KActionCollection::setAutoConnectShortcuts( bool b ) +void TDEActionCollection::setAutoConnectShortcuts( bool b ) { d->m_bAutoConnectShortcuts = b; } -bool KActionCollection::isAutoConnectShortcuts() +bool TDEActionCollection::isAutoConnectShortcuts() { return d->m_bAutoConnectShortcuts; } -bool KActionCollection::addDocCollection( KActionCollection* pDoc ) +bool TDEActionCollection::addDocCollection( TDEActionCollection* pDoc ) { d->m_docList.append( pDoc ); return true; } -void KActionCollection::beginXMLPlug( TQWidget *widget ) +void TDEActionCollection::beginXMLPlug( TQWidget *widget ) { - kdDebug(129) << "KActionCollection::beginXMLPlug( buildWidget = " << widget << " ): this = " << this << " d->m_builderKAccel = " << d->m_builderKAccel << endl; + kdDebug(129) << "TDEActionCollection::beginXMLPlug( buildWidget = " << widget << " ): this = " << this << " d->m_builderTDEAccel = " << d->m_builderTDEAccel << endl; - if( widget && !d->m_builderKAccel ) { - d->m_builderKAccel = new KAccel( widget, this, "KActionCollection-BuilderKAccel" ); + if( widget && !d->m_builderTDEAccel ) { + d->m_builderTDEAccel = new TDEAccel( widget, this, "TDEActionCollection-BuilderTDEAccel" ); } } -void KActionCollection::endXMLPlug() +void TDEActionCollection::endXMLPlug() { - kdDebug(129) << "KActionCollection::endXMLPlug(): this = " << this << endl; + kdDebug(129) << "TDEActionCollection::endXMLPlug(): this = " << this << endl; //s_kaccelXML = 0; } -void KActionCollection::prepareXMLUnplug() +void TDEActionCollection::prepareXMLUnplug() { - kdDebug(129) << "KActionCollection::prepareXMLUnplug(): this = " << this << endl; + kdDebug(129) << "TDEActionCollection::prepareXMLUnplug(): this = " << this << endl; unplugShortcuts( d->m_kaccel ); - if( d->m_builderKAccel ) { - unplugShortcuts( d->m_builderKAccel ); - delete d->m_builderKAccel; - d->m_builderKAccel = 0; + if( d->m_builderTDEAccel ) { + unplugShortcuts( d->m_builderTDEAccel ); + delete d->m_builderTDEAccel; + d->m_builderTDEAccel = 0; } } -void KActionCollection::unplugShortcuts( KAccel* kaccel ) +void TDEActionCollection::unplugShortcuts( TDEAccel* kaccel ) { - for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); - pAction->removeKAccel( kaccel ); + for ( TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); it.current(); ++it ) { + TDEAction* pAction = it.current(); + pAction->removeTDEAccel( kaccel ); } for( uint i = 0; i < d->m_docList.count(); i++ ) d->m_docList[i]->unplugShortcuts( kaccel ); } -/*void KActionCollection::addWidget( TQWidget* w ) +/*void TDEActionCollection::addWidget( TQWidget* w ) { - if( !d->m_bOneKAccelOnly ) { - kdDebug(129) << "KActionCollection::addWidget( " << w << " ): this = " << this << endl; + if( !d->m_bOneTDEAccelOnly ) { + kdDebug(129) << "TDEActionCollection::addWidget( " << w << " ): this = " << this << endl; for( uint i = 0; i < d->m_widgetList.count(); i++ ) { if( d->m_widgetList[i] == w ) { d->m_iWidgetCurrent = i; @@ -230,25 +230,25 @@ void KActionCollection::unplugShortcuts( KAccel* kaccel ) } d->m_iWidgetCurrent = d->m_widgetList.count(); d->m_widgetList.append( w ); - d->m_kaccelList.append( new KAccel( w, this, "KActionCollection-KAccel" ) ); + d->m_kaccelList.append( new TDEAccel( w, this, "TDEActionCollection-TDEAccel" ) ); } } -void KActionCollection::removeWidget( TQWidget* w ) +void TDEActionCollection::removeWidget( TQWidget* w ) { - if( !d->m_bOneKAccelOnly ) { - kdDebug(129) << "KActionCollection::removeWidget( " << w << " ): this = " << this << endl; + if( !d->m_bOneTDEAccelOnly ) { + kdDebug(129) << "TDEActionCollection::removeWidget( " << w << " ): this = " << this << endl; for( uint i = 0; i < d->m_widgetList.count(); i++ ) { if( d->m_widgetList[i] == w ) { - // Remove KAccel object from children. - KAccel* pKAccel = d->m_kaccelList[i]; - for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); + // Remove TDEAccel object from children. + TDEAccel* pTDEAccel = d->m_kaccelList[i]; + for ( TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); it.current(); ++it ) { + TDEAction* pAction = it.current(); if ( pAction->m_parentCollection == this ) { - pAction->removeKAccel( pKAccel ); + pAction->removeTDEAccel( pTDEAccel ); } } - delete pKAccel; + delete pTDEAccel; d->m_widgetList.remove( d->m_widgetList.at( i ) ); d->m_kaccelList.remove( d->m_kaccelList.at( i ) ); @@ -260,26 +260,26 @@ void KActionCollection::removeWidget( TQWidget* w ) return; } } - kdWarning(129) << "KActionCollection::removeWidget( " << w << " ): widget not in list." << endl; + kdWarning(129) << "TDEActionCollection::removeWidget( " << w << " ): widget not in list." << endl; } } -bool KActionCollection::ownsKAccel() const +bool TDEActionCollection::ownsTDEAccel() const { - return d->m_bOneKAccelOnly; + return d->m_bOneTDEAccelOnly; } -uint KActionCollection::widgetCount() const +uint TDEActionCollection::widgetCount() const { return d->m_widgetList.count(); } -const KAccel* KActionCollection::widgetKAccel( uint i ) const +const TDEAccel* TDEActionCollection::widgetTDEAccel( uint i ) const { return d->m_kaccelList[i]; }*/ -KAccel* KActionCollection::kaccel() +TDEAccel* TDEActionCollection::kaccel() { //if( d->m_kaccelList.count() > 0 ) // return d->m_kaccelList[d->m_iWidgetCurrent]; @@ -288,7 +288,7 @@ KAccel* KActionCollection::kaccel() return d->m_kaccel; } -const KAccel* KActionCollection::kaccel() const +const TDEAccel* TDEActionCollection::kaccel() const { //if( d->m_kaccelList.count() > 0 ) // return d->m_kaccelList[d->m_iWidgetCurrent]; @@ -299,7 +299,7 @@ const KAccel* KActionCollection::kaccel() const // Return the key to use in d->m_actionDict for the given action. // Usually name(), except when unnamed. -static const char* actionDictKey( KAction* action, char* buffer ) +static const char* actionDictKey( TDEAction* action, char* buffer ) { const char* name = action->name(); if( !qstrcmp( name, "unnamed" ) ) @@ -310,11 +310,11 @@ static const char* actionDictKey( KAction* action, char* buffer ) return name; } -void KActionCollection::_insert( KAction* action ) +void TDEActionCollection::_insert( TDEAction* action ) { char unnamed_name[100]; const char *name = actionDictKey( action, unnamed_name ); - KAction *a = d->m_actionDict[ name ]; + TDEAction *a = d->m_actionDict[ name ]; if ( a == action ) return; @@ -323,12 +323,12 @@ void KActionCollection::_insert( KAction* action ) emit inserted( action ); } -void KActionCollection::_remove( KAction* action ) +void TDEActionCollection::_remove( TDEAction* action ) { char unnamed_name[100]; const char *name = actionDictKey( action, unnamed_name ); - KAction *a = d->m_actionDict.take( name ); + TDEAction *a = d->m_actionDict.take( name ); if ( !a || a != action ) return; @@ -338,12 +338,12 @@ void KActionCollection::_remove( KAction* action ) delete a; } -KAction* KActionCollection::_take( KAction* action ) +TDEAction* TDEActionCollection::_take( TDEAction* action ) { char unnamed_name[100]; const char *name = actionDictKey( action, unnamed_name ); - KAction *a = d->m_actionDict.take( name ); + TDEAction *a = d->m_actionDict.take( name ); if ( !a || a != action ) return 0; @@ -355,30 +355,30 @@ KAction* KActionCollection::_take( KAction* action ) return a; } -void KActionCollection::_clear() +void TDEActionCollection::_clear() { - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); while ( it.current() ) _remove( it.current() ); } -void KActionCollection::insert( KAction* action ) { _insert( action ); } -void KActionCollection::remove( KAction* action ) { _remove( action ); } -KAction* KActionCollection::take( KAction* action ) { return _take( action ); } -void KActionCollection::clear() { _clear(); } -KAccel* KActionCollection::accel() { return kaccel(); } -const KAccel* KActionCollection::accel() const { return kaccel(); } -KAccel* KActionCollection::builderKAccel() const { return d->m_builderKAccel; } +void TDEActionCollection::insert( TDEAction* action ) { _insert( action ); } +void TDEActionCollection::remove( TDEAction* action ) { _remove( action ); } +TDEAction* TDEActionCollection::take( TDEAction* action ) { return _take( action ); } +void TDEActionCollection::clear() { _clear(); } +TDEAccel* TDEActionCollection::accel() { return kaccel(); } +const TDEAccel* TDEActionCollection::accel() const { return kaccel(); } +TDEAccel* TDEActionCollection::builderTDEAccel() const { return d->m_builderTDEAccel; } -KAction* KActionCollection::action( const char* name, const char* classname ) const +TDEAction* TDEActionCollection::action( const char* name, const char* classname ) const { - KAction* pAction = 0; + TDEAction* pAction = 0; if ( !classname && name ) pAction = d->m_actionDict[ name ]; else { - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); for( ; it.current(); ++it ) { if ( ( !name || !strcmp( it.current()->name(), name ) ) && @@ -397,34 +397,34 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co return pAction; } -KAction* KActionCollection::action( int index ) const +TDEAction* TDEActionCollection::action( int index ) const { - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); it += index; return it.current(); // return d->m_actions.at( index ); } -bool KActionCollection::readShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) +bool TDEActionCollection::readShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) { - return KActionShortcutList(this).readSettings( sConfigGroup, pConfig ); + return TDEActionShortcutList(this).readSettings( sConfigGroup, pConfig ); } -bool KActionCollection::writeShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) const +bool TDEActionCollection::writeShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) const { - return KActionShortcutList((KActionCollection*)this).writeSettings( sConfigGroup, pConfig ); + return TDEActionShortcutList((TDEActionCollection*)this).writeSettings( sConfigGroup, pConfig ); } -uint KActionCollection::count() const +uint TDEActionCollection::count() const { return d->m_actionDict.count(); } -TQStringList KActionCollection::groups() const +TQStringList TDEActionCollection::groups() const { TQStringList lst; - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); for( ; it.current(); ++it ) if ( !it.current()->group().isEmpty() && !lst.contains( it.current()->group() ) ) lst.append( it.current()->group() ); @@ -432,11 +432,11 @@ TQStringList KActionCollection::groups() const return lst; } -KActionPtrList KActionCollection::actions( const TQString& group ) const +TDEActionPtrList TDEActionCollection::actions( const TQString& group ) const { - KActionPtrList lst; + TDEActionPtrList lst; - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); for( ; it.current(); ++it ) if ( it.current()->group() == group ) lst.append( it.current() ); @@ -446,18 +446,18 @@ KActionPtrList KActionCollection::actions( const TQString& group ) const return lst; } -KActionPtrList KActionCollection::actions() const +TDEActionPtrList TDEActionCollection::actions() const { - KActionPtrList lst; + TDEActionPtrList lst; - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); for( ; it.current(); ++it ) lst.append( it.current() ); return lst; } -void KActionCollection::setInstance( TDEInstance *instance ) +void TDEActionCollection::setInstance( TDEInstance *instance ) { if ( instance ) d->m_instance = instance; @@ -465,41 +465,41 @@ void KActionCollection::setInstance( TDEInstance *instance ) d->m_instance = TDEGlobal::instance(); } -TDEInstance *KActionCollection::instance() const +TDEInstance *TDEActionCollection::instance() const { return d->m_instance; } -void KActionCollection::setXMLFile( const TQString& sXMLFile ) +void TDEActionCollection::setXMLFile( const TQString& sXMLFile ) { d->m_sXMLFile = sXMLFile; } -const TQString& KActionCollection::xmlFile() const +const TQString& TDEActionCollection::xmlFile() const { return d->m_sXMLFile; } -void KActionCollection::setHighlightingEnabled( bool enable ) +void TDEActionCollection::setHighlightingEnabled( bool enable ) { d->m_highlight = enable; } -bool KActionCollection::highlightingEnabled() const +bool TDEActionCollection::highlightingEnabled() const { return d->m_highlight; } -void KActionCollection::connectHighlight( TQWidget *container, KAction *action ) +void TDEActionCollection::connectHighlight( TQWidget *container, TDEAction *action ) { if ( !d->m_highlight ) return; - TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; + TQPtrList<TDEAction> *actionList = d->m_dctHighlightContainers[ container ]; if ( !actionList ) { - actionList = new TQPtrList<KAction>; + actionList = new TQPtrList<TDEAction>; if ( ::tqqt_cast<TQPopupMenu *>( container ) ) { @@ -508,7 +508,7 @@ void KActionCollection::connectHighlight( TQWidget *container, KAction *action ) connect( container, TQT_SIGNAL( aboutToHide() ), this, TQT_SLOT( slotMenuAboutToHide() ) ); } - else if ( ::tqqt_cast<KToolBar *>( container ) ) + else if ( ::tqqt_cast<TDEToolBar *>( container ) ) { connect( container, TQT_SIGNAL( highlighted( int, bool ) ), this, TQT_SLOT( slotToolBarButtonHighlighted( int, bool ) ) ); @@ -523,12 +523,12 @@ void KActionCollection::connectHighlight( TQWidget *container, KAction *action ) actionList->append( action ); } -void KActionCollection::disconnectHighlight( TQWidget *container, KAction *action ) +void TDEActionCollection::disconnectHighlight( TQWidget *container, TDEAction *action ) { if ( !d->m_highlight ) return; - TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; + TQPtrList<TDEAction> *actionList = d->m_dctHighlightContainers[ container ]; if ( !actionList ) return; @@ -539,7 +539,7 @@ void KActionCollection::disconnectHighlight( TQWidget *container, KAction *actio d->m_dctHighlightContainers.remove( container ); } -void KActionCollection::slotMenuItemHighlighted( int id ) +void TDEActionCollection::slotMenuItemHighlighted( int id ) { if ( !d->m_highlight ) return; @@ -565,7 +565,7 @@ void KActionCollection::slotMenuItemHighlighted( int id ) emit actionStatusText( d->m_currentHighlightAction->toolTip() ); } -void KActionCollection::slotMenuAboutToHide() +void TDEActionCollection::slotMenuAboutToHide() { if ( d->m_currentHighlightAction ) emit actionHighlighted( d->m_currentHighlightAction, false ); @@ -576,14 +576,14 @@ void KActionCollection::slotMenuAboutToHide() d->m_statusCleared = true; } -void KActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) +void TDEActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) { if ( !d->m_highlight ) return; TQWidget *container = const_cast<TQWidget*>(TQT_TQWIDGET_CONST( sender() )); - KAction *action = findAction( container, id ); + TDEAction *action = findAction( container, id ); if ( !action ) { @@ -604,19 +604,19 @@ void KActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) } } -void KActionCollection::slotDestroyed() +void TDEActionCollection::slotDestroyed() { d->m_dctHighlightContainers.remove( reinterpret_cast<void *>( const_cast<TQObject*>(TQT_TQOBJECT_CONST(sender())) ) ); } -KAction *KActionCollection::findAction( TQWidget *container, int id ) +TDEAction *TDEActionCollection::findAction( TQWidget *container, int id ) { - TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ]; + TQPtrList<TDEAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ]; if ( !actionList ) return 0; - TQPtrListIterator<KAction> it( *actionList ); + TQPtrListIterator<TDEAction> it( *actionList ); for (; it.current(); ++it ) if ( it.current()->isPlugged( container, id ) ) return it.current(); @@ -624,31 +624,31 @@ KAction *KActionCollection::findAction( TQWidget *container, int id ) return 0; } -const KXMLGUIClient *KActionCollection::parentGUIClient() const +const KXMLGUIClient *TDEActionCollection::parentGUIClient() const { return d->m_parentGUIClient; } #ifndef KDE_NO_COMPAT // KDE 4: remove -KActionCollection KActionCollection::operator+(const KActionCollection &c ) const +TDEActionCollection TDEActionCollection::operator+(const TDEActionCollection &c ) const { - kdWarning(129) << "KActionCollection::operator+(): function is severely deprecated." << endl; - KActionCollection ret( *this ); + kdWarning(129) << "TDEActionCollection::operator+(): function is severely deprecated." << endl; + TDEActionCollection ret( *this ); - TQValueList<KAction *> actions = c.actions(); - TQValueList<KAction *>::ConstIterator it = actions.begin(); - TQValueList<KAction *>::ConstIterator end = actions.end(); + TQValueList<TDEAction *> actions = c.actions(); + TQValueList<TDEAction *>::ConstIterator it = actions.begin(); + TQValueList<TDEAction *>::ConstIterator end = actions.end(); for (; it != end; ++it ) ret.insert( *it ); return ret; } -KActionCollection &KActionCollection::operator=( const KActionCollection © ) +TDEActionCollection &TDEActionCollection::operator=( const TDEActionCollection © ) { - kdWarning(129) << "KActionCollection::operator=(): function is severely deprecated." << endl; - //d->m_bOneKAccelOnly = copy.d->m_bOneKAccelOnly; + kdWarning(129) << "TDEActionCollection::operator=(): function is severely deprecated." << endl; + //d->m_bOneTDEAccelOnly = copy.d->m_bOneTDEAccelOnly; //d->m_iWidgetCurrent = copy.d->m_iWidgetCurrent; //d->m_widgetList = copy.d->m_widgetList; //d->m_kaccelList = copy.d->m_kaccelList; @@ -659,10 +659,10 @@ KActionCollection &KActionCollection::operator=( const KActionCollection © ) return *this; } -KActionCollection &KActionCollection::operator+=( const KActionCollection &c ) +TDEActionCollection &TDEActionCollection::operator+=( const TDEActionCollection &c ) { - kdWarning(129) << "KActionCollection::operator+=(): function is severely deprecated." << endl; - TQAsciiDictIterator<KAction> it(c.d->m_actionDict); + kdWarning(129) << "TDEActionCollection::operator+=(): function is severely deprecated." << endl; + TQAsciiDictIterator<TDEAction> it(c.d->m_actionDict); for ( ; it.current(); ++it ) insert( it.current() ); @@ -671,44 +671,44 @@ KActionCollection &KActionCollection::operator+=( const KActionCollection &c ) #endif // KDE 4: remove end //--------------------------------------------------------------------- -// KActionShortcutList +// TDEActionShortcutList //--------------------------------------------------------------------- -KActionShortcutList::KActionShortcutList( KActionCollection* pColl ) +TDEActionShortcutList::TDEActionShortcutList( TDEActionCollection* pColl ) : m_actions( *pColl ) { } -KActionShortcutList::~KActionShortcutList() +TDEActionShortcutList::~TDEActionShortcutList() { } -uint KActionShortcutList::count() const +uint TDEActionShortcutList::count() const { return m_actions.count(); } -TQString KActionShortcutList::name( uint i ) const +TQString TDEActionShortcutList::name( uint i ) const { return m_actions.action(i)->name(); } -TQString KActionShortcutList::label( uint i ) const +TQString TDEActionShortcutList::label( uint i ) const { return m_actions.action(i)->text(); } -TQString KActionShortcutList::whatsThis( uint i ) const +TQString TDEActionShortcutList::whatsThis( uint i ) const { return m_actions.action(i)->whatsThis(); } -const KShortcut& KActionShortcutList::shortcut( uint i ) const +const TDEShortcut& TDEActionShortcutList::shortcut( uint i ) const { return m_actions.action(i)->shortcut(); } -const KShortcut& KActionShortcutList::shortcutDefault( uint i ) const +const TDEShortcut& TDEActionShortcutList::shortcutDefault( uint i ) const { return m_actions.action(i)->shortcutDefault(); } -bool KActionShortcutList::isConfigurable( uint i ) const +bool TDEActionShortcutList::isConfigurable( uint i ) const { return m_actions.action(i)->isShortcutConfigurable(); } -bool KActionShortcutList::setShortcut( uint i, const KShortcut& cut ) +bool TDEActionShortcutList::setShortcut( uint i, const TDEShortcut& cut ) { return m_actions.action(i)->setShortcut( cut ); } -const TDEInstance* KActionShortcutList::instance() const +const TDEInstance* TDEActionShortcutList::instance() const { return m_actions.instance(); } -TQVariant KActionShortcutList::getOther( Other, uint ) const +TQVariant TDEActionShortcutList::getOther( Other, uint ) const { return TQVariant(); } -bool KActionShortcutList::setOther( Other, uint, TQVariant ) +bool TDEActionShortcutList::setOther( Other, uint, TQVariant ) { return false; } -const KAction *KActionShortcutList::action( uint i) const +const TDEAction *TDEActionShortcutList::action( uint i) const { return m_actions.action(i); } -bool KActionShortcutList::save() const +bool TDEActionShortcutList::save() const { const KXMLGUIClient* guiClient=m_actions.parentGUIClient(); const TQString xmlFile=guiClient ? guiClient->xmlFile() : m_actions.xmlFile(); - kdDebug(129) << "KActionShortcutList::save(): xmlFile = " << xmlFile << endl; + kdDebug(129) << "TDEActionShortcutList::save(): xmlFile = " << xmlFile << endl; if( m_actions.xmlFile().isEmpty() ) return writeSettings(); @@ -756,44 +756,44 @@ bool KActionShortcutList::save() const } //--------------------------------------------------------------------- -// KActionPtrShortcutList +// TDEActionPtrShortcutList //--------------------------------------------------------------------- -KActionPtrShortcutList::KActionPtrShortcutList( KActionPtrList& list ) +TDEActionPtrShortcutList::TDEActionPtrShortcutList( TDEActionPtrList& list ) : m_actions( list ) { } -KActionPtrShortcutList::~KActionPtrShortcutList() +TDEActionPtrShortcutList::~TDEActionPtrShortcutList() { } -uint KActionPtrShortcutList::count() const +uint TDEActionPtrShortcutList::count() const { return m_actions.count(); } -TQString KActionPtrShortcutList::name( uint i ) const +TQString TDEActionPtrShortcutList::name( uint i ) const { return m_actions[i]->name(); } -TQString KActionPtrShortcutList::label( uint i ) const +TQString TDEActionPtrShortcutList::label( uint i ) const { return m_actions[i]->text(); } -TQString KActionPtrShortcutList::whatsThis( uint i ) const +TQString TDEActionPtrShortcutList::whatsThis( uint i ) const { return m_actions[i]->whatsThis(); } -const KShortcut& KActionPtrShortcutList::shortcut( uint i ) const +const TDEShortcut& TDEActionPtrShortcutList::shortcut( uint i ) const { return m_actions[i]->shortcut(); } -const KShortcut& KActionPtrShortcutList::shortcutDefault( uint i ) const +const TDEShortcut& TDEActionPtrShortcutList::shortcutDefault( uint i ) const { return m_actions[i]->shortcutDefault(); } -bool KActionPtrShortcutList::isConfigurable( uint i ) const +bool TDEActionPtrShortcutList::isConfigurable( uint i ) const { return m_actions[i]->isShortcutConfigurable(); } -bool KActionPtrShortcutList::setShortcut( uint i, const KShortcut& cut ) +bool TDEActionPtrShortcutList::setShortcut( uint i, const TDEShortcut& cut ) { return m_actions[i]->setShortcut( cut ); } -TQVariant KActionPtrShortcutList::getOther( Other, uint ) const +TQVariant TDEActionPtrShortcutList::getOther( Other, uint ) const { return TQVariant(); } -bool KActionPtrShortcutList::setOther( Other, uint, TQVariant ) +bool TDEActionPtrShortcutList::setOther( Other, uint, TQVariant ) { return false; } -bool KActionPtrShortcutList::save() const +bool TDEActionPtrShortcutList::save() const { return false; } -void KActionShortcutList::virtual_hook( int id, void* data ) -{ KShortcutList::virtual_hook( id, data ); } +void TDEActionShortcutList::virtual_hook( int id, void* data ) +{ TDEShortcutList::virtual_hook( id, data ); } -void KActionPtrShortcutList::virtual_hook( int id, void* data ) -{ KShortcutList::virtual_hook( id, data ); } +void TDEActionPtrShortcutList::virtual_hook( int id, void* data ) +{ TDEShortcutList::virtual_hook( id, data ); } -void KActionCollection::virtual_hook( int, void* ) +void TDEActionCollection::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } /* vim: et sw=2 ts=2 |