From deac2ca49faed824fe83066080714eb6d653615b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:13:01 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- tdeui/AUTHORS | 12 +- tdeui/Mainpage.dox | 2 +- tdeui/TODO.xmlgui | 8 +- tdeui/kaboutapplication.h | 4 +- tdeui/kaboutkde.h | 4 +- tdeui/kaccelgen.h | 4 +- tdeui/kaction.cpp | 492 ++++++++-------- tdeui/kaction.h | 134 ++--- tdeui/kactionclasses.cpp | 998 ++++++++++++++++---------------- tdeui/kactionclasses.h | 316 +++++----- tdeui/kactioncollection.cpp | 360 ++++++------ tdeui/kactioncollection.h | 152 ++--- tdeui/kactionselector.cpp | 88 +-- tdeui/kactionselector.h | 10 +- tdeui/kactionshortcutlist.h | 42 +- tdeui/kanimwidget.cpp | 6 +- tdeui/kanimwidget.h | 2 +- tdeui/kcmenumngr.cpp | 2 +- tdeui/kcolorbutton.cpp | 4 +- tdeui/kcolordialog.cpp | 8 +- tdeui/kcolordialog.h | 8 +- tdeui/kcombobox.cpp | 8 +- tdeui/kcombobox.h | 4 +- tdeui/kcommand.cpp | 10 +- tdeui/kcommand.h | 12 +- tdeui/kcompletionbox.cpp | 14 +- tdeui/kcompletionbox.h | 4 +- tdeui/kdatepicker.cpp | 2 +- tdeui/kdatetbl.cpp | 44 +- tdeui/kdatetbl.h | 14 +- tdeui/kdcopactionproxy.cpp | 22 +- tdeui/kdcopactionproxy.h | 26 +- tdeui/kdetrayproxy/kdetrayproxy.h | 2 +- tdeui/kdockwidget.cpp | 12 +- tdeui/kdockwidget.h | 8 +- tdeui/keditcl1.cpp | 32 +- tdeui/kedittoolbar.cpp | 46 +- tdeui/kedittoolbar.h | 28 +- tdeui/kfontcombo.cpp | 80 +-- tdeui/kfontcombo.h | 12 +- tdeui/kfontdialog.cpp | 80 +-- tdeui/kfontdialog.h | 56 +- tdeui/kfontrequester.cpp | 16 +- tdeui/kfontrequester.h | 10 +- tdeui/khelpmenu.cpp | 20 +- tdeui/khelpmenu.h | 20 +- tdeui/kinputdialog.cpp | 8 +- tdeui/kinputdialog.h | 2 +- tdeui/kjanuswidget.cpp | 8 +- tdeui/kjanuswidget.h | 6 +- tdeui/kkeybutton.cpp | 10 +- tdeui/kkeybutton.h | 10 +- tdeui/kkeydialog.cpp | 164 +++--- tdeui/kkeydialog.h | 84 +-- tdeui/klineedit.cpp | 70 +-- tdeui/klineedit.h | 2 +- tdeui/klistbox.cpp | 26 +- tdeui/klistbox.h | 8 +- tdeui/klistview.cpp | 334 +++++------ tdeui/klistview.h | 56 +- tdeui/klistviewlineedit.h | 10 +- tdeui/klistviewsearchline.cpp | 86 +-- tdeui/klistviewsearchline.h | 56 +- tdeui/kmainwindow.cpp | 236 ++++---- tdeui/kmainwindow.h | 126 ++-- tdeui/kmainwindowiface.cpp | 66 +-- tdeui/kmainwindowiface.h | 20 +- tdeui/kmenubar.cpp | 4 +- tdeui/kmessagebox.cpp | 4 +- tdeui/kpanelmenu.cpp | 8 +- tdeui/kpanelmenu.h | 2 +- tdeui/kpartgui.dtd | 6 +- tdeui/kpixmapregionselectorwidget.cpp | 10 +- tdeui/kpixmapregionselectorwidget.h | 6 +- tdeui/kpopupmenu.cpp | 174 +++--- tdeui/kpopupmenu.h | 40 +- tdeui/kselect.cpp | 34 +- tdeui/kselect.h | 16 +- tdeui/kshortcutdialog.cpp | 42 +- tdeui/kshortcutdialog.h | 24 +- tdeui/kshortcutdialog_advanced.ui | 6 +- tdeui/kshortcutdialog_simple.ui | 6 +- tdeui/kstatusbar.h | 8 +- tdeui/kstdaction.cpp | 174 +++--- tdeui/kstdaction.h | 292 +++++----- tdeui/kstdaction_p.h | 144 ++--- tdeui/ksystemtray.cpp | 18 +- tdeui/ksystemtray.h | 12 +- tdeui/ktextedit.cpp | 32 +- tdeui/ktimezonewidget.cpp | 4 +- tdeui/ktimezonewidget.h | 4 +- tdeui/ktoolbar.cpp | 430 +++++++------- tdeui/ktoolbar.h | 74 +-- tdeui/ktoolbarbutton.cpp | 138 ++--- tdeui/ktoolbarbutton.h | 28 +- tdeui/ktoolbarhandler.cpp | 50 +- tdeui/ktoolbarhandler.h | 20 +- tdeui/ktoolbarlabelaction.cpp | 42 +- tdeui/ktoolbarlabelaction.h | 28 +- tdeui/ktoolbarradiogroup.cpp | 18 +- tdeui/ktoolbarradiogroup.h | 26 +- tdeui/kwhatsthismanager_p.h | 2 +- tdeui/kxmlgui.xsd | 4 +- tdeui/kxmlguibuilder.cpp | 56 +- tdeui/kxmlguibuilder.h | 4 +- tdeui/kxmlguiclient.cpp | 24 +- tdeui/kxmlguiclient.h | 24 +- tdeui/kxmlguifactory.cpp | 10 +- tdeui/kxmlguifactory.h | 10 +- tdeui/kxmlguifactory_p.cpp | 4 +- tdeui/kxmlguifactory_p.h | 12 +- tdeui/tdespelldlg.h | 4 +- tdeui/tests/itemcontainertest.cpp | 24 +- tdeui/tests/itemcontainertest.h | 8 +- tdeui/tests/kaccelgentest.cpp | 8 +- tdeui/tests/kactiontest.cpp | 18 +- tdeui/tests/kdockwidgettest.cpp | 2 +- tdeui/tests/kfontdialogtest.cpp | 8 +- tdeui/tests/klistviewtest.cpp | 26 +- tdeui/tests/kmainwindowrestoretest.h | 24 +- tdeui/tests/kmainwindowtest.h | 2 +- tdeui/tests/kpopuptest.cpp | 4 +- tdeui/tests/krulertest.cpp | 2 +- tdeui/tests/krulertest.h | 2 +- tdeui/tests/kstatusbartest.cpp | 2 +- tdeui/tests/kstatusbartest.h | 2 +- tdeui/tests/ktoolbarlabelactiontest.cpp | 10 +- tdeui/tests/kxmlguitest.cpp | 8 +- tdeui/tests/twindowtest.cpp | 14 +- tdeui/tests/twindowtest.h | 10 +- tdeui/twindowlistmenu.cpp | 4 +- tdeui/twindowlistmenu.h | 2 +- 132 files changed, 3442 insertions(+), 3442 deletions(-) (limited to 'tdeui') diff --git a/tdeui/AUTHORS b/tdeui/AUTHORS index 61087b1f0..511733bba 100644 --- a/tdeui/AUTHORS +++ b/tdeui/AUTHORS @@ -27,17 +27,17 @@ DnD stuff, TDESocket and TDEServerSocket classes, KPixmap Alexander Sanda Read and write numerical config entries, KPanner, KTabControl, -KPopupMenu, KMessageBox, KEdit widgets. +TDEPopupMenu, KMessageBox, KEdit widgets. Martin Jones -Bugfixes in KPixmap and KURL, KColorDialog, KSelector +Bugfixes in KPixmap and KURL, KColorDialog, TDESelector KColorButton Keith Brown KTreeList class Bernd Johannes Wuebben -KFontDialog class +TDEFontDialog class Tim D. Gilman KDatePicker, KDateTable class @@ -49,7 +49,7 @@ Christoph Neerfeld KIconLoader class Sven Radej -KLineEdit, KCombo, KToolbar, KStatusBar +KLineEdit, KCombo, TDEToolbar, KStatusBar Rainer Bawidamann Rubberbanding in KTreeList @@ -65,7 +65,7 @@ KWMModuleApplication, tearing/docking of ktoolbar and kmenubar, heavy modifications to kbutton Stephan Kulow -first versions of KTopLevelWidget and KToolBar, heavy modifications to +first versions of KTopLevelWidget and TDEToolBar, heavy modifications to automake and autoconf Joerg Habenicht @@ -93,5 +93,5 @@ Falk Brettschneider contributes for the Dockwidget class set Holger Freyther -KDialogBase, KGuiItem, KStdGuiItem, KAction, +KDialogBase, KGuiItem, KStdGuiItem, TDEAction, added KMessageBox::questionYesNoCancel( ) diff --git a/tdeui/Mainpage.dox b/tdeui/Mainpage.dox index 778c962f1..cf656363e 100644 --- a/tdeui/Mainpage.dox +++ b/tdeui/Mainpage.dox @@ -13,7 +13,7 @@ * certainly link to libtdeui. * * Most applications with single or multiple toplevel widgets -* should use the KMainWindow class in this library, which +* should use the TDEMainWindow class in this library, which * automatically provides features like session management and simplified * toolbar/menubar/statusbar creation. * diff --git a/tdeui/TODO.xmlgui b/tdeui/TODO.xmlgui index 3c3d4f8a4..0c0753685 100644 --- a/tdeui/TODO.xmlgui +++ b/tdeui/TODO.xmlgui @@ -4,15 +4,15 @@ When removing an xmlgui-client involves destroying toolbars, we need to save the whole set of toolbar positions of the mainwindow, into the xmlgui-client. Data structure: -struct KToolBarPos { +struct TDEToolBarPos { short int index; short int offset; bool newLine; }; -typedef QValueVector KToolBarPosList; +typedef QValueVector TDEToolBarPosList; API: -KToolBarPosList KMainWindow::toolBarPositionList() const; +TDEToolBarPosList TDEMainWindow::toolBarPositionList() const; The remaining problem is to know when to call it: * when we know in advance that we'll be able to remove toolbars? @@ -74,7 +74,7 @@ which would forward the action() and domElement() calls - because a client can be in only one factory at a time. This custom builder needs to know about action plugging too, we don't really want -to call KAction::plug here. So this would be 'virtualized' (new virtual, in a new +to call TDEAction::plug here. So this would be 'virtualized' (new virtual, in a new interface to keep BC, that by default calls plug, but does something else in kedittoolbar's builder). diff --git a/tdeui/kaboutapplication.h b/tdeui/kaboutapplication.h index 7fe088d02..487ef5a20 100644 --- a/tdeui/kaboutapplication.h +++ b/tdeui/kaboutapplication.h @@ -34,9 +34,9 @@ * TDEAboutData that is specified at the start of your program in * main(). Normally you should not use this class directly but rather * the KHelpMenu class or even better just subclass your toplevel - * window from KMainWindow. If you do the latter, the help menu and + * window from TDEMainWindow. If you do the latter, the help menu and * thereby this dialog box is available through the - * KMainWindow::helpMenu() function. + * TDEMainWindow::helpMenu() function. * * @author Waldo Bastian (bastian@kde.org) and Espen Sand (espen@kde.org) */ diff --git a/tdeui/kaboutkde.h b/tdeui/kaboutkde.h index 017d0f220..e2fce6f28 100644 --- a/tdeui/kaboutkde.h +++ b/tdeui/kaboutkde.h @@ -30,9 +30,9 @@ * This class provides the standard "About KDE" dialog box that is used * KHelpMenu Normally you should not use this class directly but * rather the KHelpMenu class or even better just subclass your - * toplevel window from KMainWindow. If you do the latter, the help + * toplevel window from TDEMainWindow. If you do the latter, the help * menu and thereby this dialog box is available through the - * KMainWindow::helpMenu() function. + * TDEMainWindow::helpMenu() function. * * @author Espen Sand (espen@kde.org) */ diff --git a/tdeui/kaccelgen.h b/tdeui/kaccelgen.h index 222d948ba..d1e761876 100644 --- a/tdeui/kaccelgen.h +++ b/tdeui/kaccelgen.h @@ -77,7 +77,7 @@ * + Add more Deref classes so that we can access a wider variety of * collections. * */ -namespace KAccelGen +namespace TDEAccelGen { // HELPERS @@ -274,7 +274,7 @@ generateFromKeys(const TQMap& source, TQStringList& target) } -} // end namespace KAccelGen +} // end namespace TDEAccelGen #endif diff --git a/tdeui/kaction.cpp b/tdeui/kaction.cpp index 6fad7d34b..24a940c2f 100644 --- a/tdeui/kaction.cpp +++ b/tdeui/kaction.cpp @@ -54,52 +54,52 @@ /** * How it works. -* KActionCollection is an organizing container for KActions. -* KActionCollection keeps track of the information necessary to handle +* TDEActionCollection is an organizing container for TDEActions. +* TDEActionCollection keeps track of the information necessary to handle * configuration and shortcuts. * * Focus Widget pointer: * This is the widget which is the focus for action shortcuts. -* It is set either by passing a TQWidget* to the KActionCollection constructor +* It is set either by passing a TQWidget* to the TDEActionCollection constructor * or by calling setWidget() if the widget wasn't known when the object was * initially constructed (as in KXMLGUIClient and KParts::PartBase) * * Shortcuts: * An action's shortcut will not not be connected unless a focus widget has -* been specified in KActionCollection. +* been specified in TDEActionCollection. * * XML Filename: * This is used to save user-modified settings back to the *ui.rc file. * It is set by KXMLGUIFactory. */ -int KAction::getToolButtonID() +int TDEAction::getToolButtonID() { static int toolbutton_no = -2; return toolbutton_no--; } //--------------------------------------------------------------------- -// KAction::KActionPrivate +// TDEAction::TDEActionPrivate //--------------------------------------------------------------------- -class KAction::KActionPrivate : public KGuiItem +class TDEAction::TDEActionPrivate : public KGuiItem { public: - KActionPrivate() : KGuiItem() + TDEActionPrivate() : KGuiItem() { m_kaccel = 0; m_configurable = true; } - KAccel *m_kaccel; - TQValueList m_kaccelList; + TDEAccel *m_kaccel; + TQValueList m_kaccelList; TQString m_groupText; TQString m_group; - KShortcut m_cut; - KShortcut m_cutDefault; + TDEShortcut m_cut; + TDEShortcut m_cutDefault; bool m_configurable; @@ -117,39 +117,39 @@ public: }; //--------------------------------------------------------------------- -// KAction +// TDEAction //--------------------------------------------------------------------- -KAction::KAction( const TQString& text, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) + TDEActionCollection* parent, const char* name ) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); } -KAction::KAction( const TQString& text, const TQString& sIconName, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQString& sIconName, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) + TDEActionCollection* parent, const char* name ) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); d->setIconName( sIconName ); } -KAction::KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) + TDEActionCollection* parent, const char* name ) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); d->setIconSet( pix ); } -KAction::KAction( const KGuiItem& item, const KShortcut& cut, +TDEAction::TDEAction( const KGuiItem& item, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) + TDEActionCollection* parent, const char* name ) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( item.text(), cut, receiver, slot ); if( item.hasIcon() ) @@ -159,69 +159,69 @@ KAction::KAction( const KGuiItem& item, const KShortcut& cut, } #ifndef KDE_NO_COMPAT // KDE 4: remove -KAction::KAction( const TQString& text, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, 0, 0 ); } -KAction::KAction( const TQString& text, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); } -KAction::KAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, 0, 0 ); setIconSet( pix ); } -KAction::KAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, 0, 0 ); d->setIconName( pix ); } -KAction::KAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); setIconSet( pix ); } -KAction::KAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); d->setIconName(pix); } -KAction::KAction( TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) +TDEAction::TDEAction( TQObject* parent, const char* name ) + : TQObject( parent, name ), d(new TDEActionPrivate) { - initPrivate( TQString::null, KShortcut(), 0, 0 ); + initPrivate( TQString::null, TDEShortcut(), 0, 0 ); } #endif // KDE 4: remove end -KAction::~KAction() +TDEAction::~TDEAction() { - kdDebug(129) << "KAction::~KAction( this = \"" << name() << "\" )" << endl; // -- ellis + kdDebug(129) << "TDEAction::~TDEAction( this = \"" << name() << "\" )" << endl; // -- ellis #ifndef KDE_NO_COMPAT if (d->m_kaccel) unplugAccel(); @@ -231,9 +231,9 @@ KAction::~KAction() if ( m_parentCollection ) { m_parentCollection->take( this ); - const TQValueList & accelList = d->m_kaccelList; - TQValueList::const_iterator itr = accelList.constBegin(); - const TQValueList::const_iterator itrEnd = accelList.constEnd(); + const TQValueList & accelList = d->m_kaccelList; + TQValueList::const_iterator itr = accelList.constBegin(); + const TQValueList::const_iterator itrEnd = accelList.constEnd(); const char * const namePtr = name(); for (; itr != itrEnd; ++itr ) @@ -242,7 +242,7 @@ KAction::~KAction() } // Do not call unplugAll from here, as tempting as it sounds. - // KAction is designed around the idea that you need to plug + // TDEAction is designed around the idea that you need to plug // _and_ to unplug it "manually". Unplugging leads to an important // slowdown when e.g. closing the window, in which case we simply // want to destroy everything asap, not to remove actions one by one @@ -251,13 +251,13 @@ KAction::~KAction() delete d; } -void KAction::initPrivate( const TQString& text, const KShortcut& cut, +void TDEAction::initPrivate( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot ) { d->m_cutDefault = cut; - m_parentCollection = tqt_dynamic_cast( parent() ); - kdDebug(129) << "KAction::initPrivate(): this = " << this << " name = \"" << name() << "\" cut = " << cut.toStringInternal() << " m_parentCollection = " << m_parentCollection << endl; + m_parentCollection = tqt_dynamic_cast( parent() ); + kdDebug(129) << "TDEAction::initPrivate(): this = " << this << " name = \"" << name() << "\" cut = " << cut.toStringInternal() << " m_parentCollection = " << m_parentCollection << endl; if ( m_parentCollection ) m_parentCollection->insert( this ); @@ -265,28 +265,28 @@ void KAction::initPrivate( const TQString& text, const KShortcut& cut, connect( this, TQT_SIGNAL( activated() ), receiver, slot ); if( !cut.isNull() && !qstrcmp( name(), "unnamed" ) ) - kdWarning(129) << "KAction::initPrivate(): trying to assign a shortcut (" << cut.toStringInternal() << ") to an unnamed action." << endl; + kdWarning(129) << "TDEAction::initPrivate(): trying to assign a shortcut (" << cut.toStringInternal() << ") to an unnamed action." << endl; d->setText( text ); initShortcut( cut ); } -bool KAction::isPlugged() const +bool TDEAction::isPlugged() const { return (!d->m_containers.empty()) || d->m_kaccel; } -bool KAction::isPlugged( const TQWidget *container ) const +bool TDEAction::isPlugged( const TQWidget *container ) const { return findContainer( container ) > -1; } -bool KAction::isPlugged( const TQWidget *container, int id ) const +bool TDEAction::isPlugged( const TQWidget *container, int id ) const { int i = findContainer( container ); return ( i > -1 && itemId( i ) == id ); } -bool KAction::isPlugged( const TQWidget *container, const TQWidget *_representative ) const +bool TDEAction::isPlugged( const TQWidget *container, const TQWidget *_representative ) const { int i = findContainer( container ); return ( i > -1 && representative( i ) == _representative ); @@ -295,8 +295,8 @@ bool KAction::isPlugged( const TQWidget *container, const TQWidget *_representat /* Three actionCollection conditions: - 1) Scope is known on creation and KAccel object is created (e.g. KMainWindow) - 2) Scope is unknown and no KAccel object is available (e.g. KXMLGUIClient) + 1) Scope is known on creation and TDEAccel object is created (e.g. TDEMainWindow) + 2) Scope is unknown and no TDEAccel object is available (e.g. KXMLGUIClient) a) addClient() will be called on object b) we just want to add the actions to another KXMLGUIClient object @@ -310,7 +310,7 @@ Undo and Redo should be available in both KoView objects, and calling the undo->setEnabled() should affect both KoViews When addClient is called, it needs to be able to find the undo and redo actions -When it calls plug() on them, they need to be inserted into the KAccel object of the appropriate KoView +When it calls plug() on them, they need to be inserted into the TDEAccel object of the appropriate KoView In this case, the actionCollection belongs to KoDoc and we need to let it know that its shortcuts have the same scope as the KoView actionCollection @@ -325,9 +325,9 @@ View add document actionCollection as sub-collection A parentCollection is created -Scenario 1: parentCollection has a focus widget set (e.g. via KMainWindow) - A KAccel object is created in the parentCollection - A KAction is created with parent=parentCollection +Scenario 1: parentCollection has a focus widget set (e.g. via TDEMainWindow) + A TDEAccel object is created in the parentCollection + A TDEAction is created with parent=parentCollection The shortcut is inserted into this actionCollection Scenario 1a: xml isn't used done @@ -335,13 +335,13 @@ Scenario 1: parentCollection has a focus widget set (e.g. via KMainWindow) setWidget is called -- ignore shortcuts are set Scenario 2: parentCollection has no focus widget (e.g., KParts) - A KAction is created with parent=parentCollection + A TDEAction is created with parent=parentCollection Scenario 2a: xml isn't used no shortcuts Scenario 2b: KXMLGUIBuilder::addClient() called setWidget is called - shortcuts are inserted into current KAccel - shortcuts are set in all other KAccels, if the action is present in the other KAccels + shortcuts are inserted into current TDEAccel + shortcuts are set in all other TDEAccels, if the action is present in the other TDEAccels */ /* @@ -352,21 +352,21 @@ shortcut may be set: - on plugAccel (deprecated) On Construction: [via initShortcut()] - insert into KAccel of m_parentCollection, + insert into TDEAccel of m_parentCollection, if kaccel() && isAutoConnectShortcuts() exists On Plug: [via plug() -> plugShortcut()] - insert into KAccel of m_parentCollection, if exists and not already inserted into + insert into TDEAccel of m_parentCollection, if exists and not already inserted into On Read XML: [via setShortcut()] - set in all current KAccels - insert into KAccel of m_parentCollection, if exists and not already inserted into + set in all current TDEAccels + insert into TDEAccel of m_parentCollection, if exists and not already inserted into */ -KAccel* KAction::kaccelCurrent() +TDEAccel* TDEAction::kaccelCurrent() { - if( m_parentCollection && m_parentCollection->builderKAccel() ) - return m_parentCollection->builderKAccel(); + if( m_parentCollection && m_parentCollection->builderTDEAccel() ) + return m_parentCollection->builderTDEAccel(); else if( m_parentCollection && m_parentCollection->kaccel() ) return m_parentCollection->kaccel(); else @@ -374,55 +374,55 @@ KAccel* KAction::kaccelCurrent() } // Only to be called from initPrivate() -bool KAction::initShortcut( const KShortcut& cut ) +bool TDEAction::initShortcut( const TDEShortcut& cut ) { d->m_cut = cut; - // Only insert action into KAccel if it has a valid name, + // Only insert action into TDEAccel if it has a valid name, if( qstrcmp( name(), "unnamed" ) && m_parentCollection && m_parentCollection->isAutoConnectShortcuts() && m_parentCollection->kaccel() ) { - insertKAccel( m_parentCollection->kaccel() ); + insertTDEAccel( m_parentCollection->kaccel() ); return true; } return false; } // Only to be called from plug() -void KAction::plugShortcut() +void TDEAction::plugShortcut() { - KAccel* const kaccel = kaccelCurrent(); + TDEAccel* const kaccel = kaccelCurrent(); - //kdDebug(129) << "KAction::plugShortcut(): this = " << this << " kaccel() = " << (m_parentCollection ? m_parentCollection->kaccel() : 0) << endl; + //kdDebug(129) << "TDEAction::plugShortcut(): this = " << this << " kaccel() = " << (m_parentCollection ? m_parentCollection->kaccel() : 0) << endl; if( kaccel && qstrcmp( name(), "unnamed" ) ) { - // Check if already plugged into current KAccel object - const TQValueList & accelList = d->m_kaccelList; - TQValueList::const_iterator itr = accelList.constBegin(); - const TQValueList::const_iterator itrEnd = accelList.constEnd(); + // Check if already plugged into current TDEAccel object + const TQValueList & accelList = d->m_kaccelList; + TQValueList::const_iterator itr = accelList.constBegin(); + const TQValueList::const_iterator itrEnd = accelList.constEnd(); for( ; itr != itrEnd; ++itr) { if( (*itr) == kaccel ) return; } - insertKAccel( kaccel ); + insertTDEAccel( kaccel ); } } -bool KAction::setShortcut( const KShortcut& cut ) +bool TDEAction::setShortcut( const TDEShortcut& cut ) { bool bChanged = (d->m_cut != cut); d->m_cut = cut; - KAccel* const kaccel = kaccelCurrent(); + TDEAccel* const kaccel = kaccelCurrent(); bool bInsertRequired = true; - // Apply new shortcut to all existing KAccel objects + // Apply new shortcut to all existing TDEAccel objects - const TQValueList & accelList = d->m_kaccelList; - TQValueList::const_iterator itr = accelList.constBegin(); - const TQValueList::const_iterator itrEnd = accelList.constEnd(); + const TQValueList & accelList = d->m_kaccelList; + TQValueList::const_iterator itr = accelList.constBegin(); + const TQValueList::const_iterator itrEnd = accelList.constEnd(); for( ; itr != itrEnd; ++itr) { // Check whether shortcut has already been plugged into @@ -430,12 +430,12 @@ bool KAction::setShortcut( const KShortcut& cut ) if( (*itr) == kaccel ) bInsertRequired = false; if( bChanged ) - updateKAccelShortcut( *itr ); + updateTDEAccelShortcut( *itr ); } - // Only insert action into KAccel if it has a valid name, + // Only insert action into TDEAccel if it has a valid name, if( kaccel && bInsertRequired && qstrcmp( name(), "unnamed" ) ) - insertKAccel( kaccel ); + insertTDEAccel( kaccel ); if( bChanged ) { #ifndef KDE_NO_COMPAT // KDE 4: remove @@ -449,10 +449,10 @@ bool KAction::setShortcut( const KShortcut& cut ) return true; } -bool KAction::updateKAccelShortcut( KAccel* kaccel ) +bool TDEAction::updateTDEAccelShortcut( TDEAccel* kaccel ) { // Check if action is permitted - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return false; bool b = true; @@ -472,25 +472,25 @@ bool KAction::updateKAccelShortcut( KAccel* kaccel ) return b; } -void KAction::insertKAccel( KAccel* kaccel ) +void TDEAction::insertTDEAccel( TDEAccel* kaccel ) { - //kdDebug(129) << "KAction::insertKAccel( " << kaccel << " ): this = " << this << endl; + //kdDebug(129) << "TDEAction::insertTDEAccel( " << kaccel << " ): this = " << this << endl; if ( !kaccel->actions().actionPtr( name() ) ) { - if( updateKAccelShortcut( kaccel ) ) { + if( updateTDEAccelShortcut( kaccel ) ) { d->m_kaccelList.append( kaccel ); connect( kaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); } } else - kdWarning(129) << "KAction::insertKAccel( kaccel = " << kaccel << " ): KAccel object already contains an action name \"" << name() << "\"" << endl; // -- ellis + kdWarning(129) << "TDEAction::insertTDEAccel( kaccel = " << kaccel << " ): TDEAccel object already contains an action name \"" << name() << "\"" << endl; // -- ellis } -void KAction::removeKAccel( KAccel* kaccel ) +void TDEAction::removeTDEAccel( TDEAccel* kaccel ) { - //kdDebug(129) << "KAction::removeKAccel( " << i << " ): this = " << this << endl; - TQValueList & accelList = d->m_kaccelList; - TQValueList::iterator itr = accelList.begin(); - const TQValueList::iterator itrEnd = accelList.end(); + //kdDebug(129) << "TDEAction::removeTDEAccel( " << i << " ): this = " << this << endl; + TQValueList & accelList = d->m_kaccelList; + TQValueList::iterator itr = accelList.begin(); + const TQValueList::iterator itrEnd = accelList.end(); for( ; itr != itrEnd; ++itr) { if( (*itr) == kaccel ) { @@ -504,13 +504,13 @@ void KAction::removeKAccel( KAccel* kaccel ) #ifndef KDE_NO_COMPAT // KDE 4: remove -void KAction::setAccel( int keyQt ) +void TDEAction::setAccel( int keyQt ) { - setShortcut( KShortcut(keyQt) ); + setShortcut( TDEShortcut(keyQt) ); } #endif // KDE 4: remove end -void KAction::updateShortcut( int i ) +void TDEAction::updateShortcut( int i ) { int id = itemId( i ); @@ -523,10 +523,10 @@ void KAction::updateShortcut( int i ) static_cast(w)->setAccel( d->m_cut.keyCodeQt(), id ); } -void KAction::updateShortcut( TQPopupMenu* menu, int id ) +void TDEAction::updateShortcut( TQPopupMenu* menu, int id ) { - //kdDebug(129) << "KAction::updateShortcut(): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl; - // If the action has a KAccel object, + //kdDebug(129) << "TDEAction::updateShortcut(): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl; + // If the action has a TDEAccel object, // show the string representation of its shortcut. if ( d->m_kaccel || d->m_kaccelList.count() ) { TQString s = menu->text( id ); @@ -540,41 +540,41 @@ void KAction::updateShortcut( TQPopupMenu* menu, int id ) } // Otherwise insert the shortcut itself into the popup menu. else { - // This is a fall-hack in case the KAction is missing a proper parent collection. + // This is a fall-hack in case the TDEAction is missing a proper parent collection. // It should be removed eventually. --ellis menu->setAccel( d->m_cut.keyCodeQt(), id ); - kdDebug(129) << "KAction::updateShortcut(): name = \"" << name() << "\", cut = " << d->m_cut.toStringInternal() << "; No KAccel, probably missing a parent collection." << endl; + kdDebug(129) << "TDEAction::updateShortcut(): name = \"" << name() << "\", cut = " << d->m_cut.toStringInternal() << "; No TDEAccel, probably missing a parent collection." << endl; } } -const KShortcut& KAction::shortcut() const +const TDEShortcut& TDEAction::shortcut() const { return d->m_cut; } -const KShortcut& KAction::shortcutDefault() const +const TDEShortcut& TDEAction::shortcutDefault() const { return d->m_cutDefault; } -TQString KAction::shortcutText() const +TQString TDEAction::shortcutText() const { return d->m_cut.toStringInternal(); } -void KAction::setShortcutText( const TQString& s ) +void TDEAction::setShortcutText( const TQString& s ) { - setShortcut( KShortcut(s) ); + setShortcut( TDEShortcut(s) ); } #ifndef KDE_NO_COMPAT // Remove in KDE 4 -int KAction::accel() const +int TDEAction::accel() const { return d->m_cut.keyCodeQt(); } #endif -void KAction::setGroup( const TQString& grp ) +void TDEAction::setGroup( const TQString& grp ) { d->m_group = grp; @@ -583,27 +583,27 @@ void KAction::setGroup( const TQString& grp ) updateGroup( i ); } -void KAction::updateGroup( int ) +void TDEAction::updateGroup( int ) { // DO SOMETHING } -TQString KAction::group() const +TQString TDEAction::group() const { return d->m_group; } -bool KAction::isEnabled() const +bool TDEAction::isEnabled() const { return d->isEnabled(); } -bool KAction::isShortcutConfigurable() const +bool TDEAction::isShortcutConfigurable() const { return d->m_configurable; } -void KAction::setToolTip( const TQString& tt ) +void TDEAction::setToolTip( const TQString& tt ) { d->setToolTip( tt ); @@ -612,39 +612,39 @@ void KAction::setToolTip( const TQString& tt ) updateToolTip( i ); } -void KAction::updateToolTip( int i ) +void TDEAction::updateToolTip( int i ) { TQWidget *w = container( i ); - if ( ::tqqt_cast( w ) ) - TQToolTip::add( static_cast(w)->getWidget( itemId( i ) ), d->toolTip() ); + if ( ::tqqt_cast( w ) ) + TQToolTip::add( static_cast(w)->getWidget( itemId( i ) ), d->toolTip() ); } -TQString KAction::toolTip() const +TQString TDEAction::toolTip() const { return d->toolTip(); } -int KAction::plug( TQWidget *w, int index ) +int TDEAction::plug( TQWidget *w, int index ) { - //kdDebug(129) << "KAction::plug( " << w << ", " << index << " )" << endl; + //kdDebug(129) << "TDEAction::plug( " << w << ", " << index << " )" << endl; if (!w ) { - kdWarning(129) << "KAction::plug called with 0 argument\n"; + kdWarning(129) << "TDEAction::plug called with 0 argument\n"; return -1; } - // Ellis: print warning if there is a shortcut, but no KAccel available (often due to no widget available in the actioncollection) + // Ellis: print warning if there is a shortcut, but no TDEAccel available (often due to no widget available in the actioncollection) // David: Well, it doesn't matter much, things still work (e.g. Undo in koffice) via TQAccel. - // We should probably re-enable the warning for things that only KAccel can do, though - e.g. WIN key (mapped to Meta). + // We should probably re-enable the warning for things that only TDEAccel can do, though - e.g. WIN key (mapped to Meta). #if 0 //ndef NDEBUG - KAccel* kaccel = kaccelCurrent(); + TDEAccel* kaccel = kaccelCurrent(); if( !d->m_cut.isNull() && !kaccel ) { - kdDebug(129) << "KAction::plug(): has no KAccel object; this = " << this << " name = " << name() << " parentCollection = " << m_parentCollection << endl; // ellis + kdDebug(129) << "TDEAction::plug(): has no TDEAccel object; this = " << this << " name = " << name() << " parentCollection = " << m_parentCollection << endl; // ellis } #endif // Check if action is permitted - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; plugShortcut(); @@ -653,7 +653,7 @@ int KAction::plug( TQWidget *w, int index ) { TQPopupMenu* menu = static_cast( w ); int id; - // Don't insert shortcut into menu if it's already in a KAccel object. + // Don't insert shortcut into menu if it's already in a TDEAccel object. int keyQt = (d->m_kaccelList.count() || d->m_kaccel) ? 0 : d->m_cut.keyCodeQt(); if ( d->hasIcon() ) @@ -672,7 +672,7 @@ int KAction::plug( TQWidget *w, int index ) TQT_SLOT( slotPopupActivated() ), keyQt, -1, index ); - // If the shortcut is already in a KAccel object, then + // If the shortcut is already in a TDEAccel object, then // we need to set the menu item's shortcut text. if ( d->m_kaccelList.count() || d->m_kaccel ) updateShortcut( menu, id ); @@ -693,9 +693,9 @@ int KAction::plug( TQWidget *w, int index ) return d->m_containers.count() - 1; } - else if ( ::tqqt_cast( w ) ) + else if ( ::tqqt_cast( w ) ) { - KToolBar *bar = static_cast( w ); + TDEToolBar *bar = static_cast( w ); int id_ = getToolButtonID(); TDEInstance *instance; @@ -720,7 +720,7 @@ int KAction::plug( TQWidget *w, int index ) d->isEnabled(), d->plainText(), index, instance ); } - KToolBarButton* ktb = bar->getButton(id_); + TDEToolBarButton* ktb = bar->getButton(id_); ktb->setName( TQCString("toolbutton_")+name() ); if ( !d->whatsThis().isEmpty() ) @@ -742,7 +742,7 @@ int KAction::plug( TQWidget *w, int index ) return -1; } -void KAction::unplug( TQWidget *w ) +void TDEAction::unplug( TQWidget *w ) { int i = findContainer( w ); if ( i == -1 ) @@ -754,9 +754,9 @@ void KAction::unplug( TQWidget *w ) TQPopupMenu *menu = static_cast( w ); menu->removeItem( id ); } - else if ( ::tqqt_cast( w ) ) + else if ( ::tqqt_cast( w ) ) { - KToolBar *bar = static_cast( w ); + TDEToolBar *bar = static_cast( w ); bar->removeItemDelayed( id ); } else if ( ::tqqt_cast( w ) ) @@ -770,11 +770,11 @@ void KAction::unplug( TQWidget *w ) m_parentCollection->disconnectHighlight( w, this ); } -void KAction::plugAccel(KAccel *kacc, bool configurable) +void TDEAction::plugAccel(TDEAccel *kacc, bool configurable) { - kdWarning(129) << "KAction::plugAccel(): call to deprecated action." << endl; + kdWarning(129) << "TDEAction::plugAccel(): call to deprecated action." << endl; kdDebug(129) << kdBacktrace() << endl; - //kdDebug(129) << "KAction::plugAccel( kacc = " << kacc << " ): name \"" << name() << "\"" << endl; + //kdDebug(129) << "TDEAction::plugAccel( kacc = " << kacc << " ): name \"" << name() << "\"" << endl; if ( d->m_kaccel ) unplugAccel(); @@ -782,25 +782,25 @@ void KAction::plugAccel(KAccel *kacc, bool configurable) //if ( m_parentCollection && !m_parentCollection->accel() ) // m_parentCollection->setAccel( kacc ); - // We can only plug this action into the given KAccel object + // We can only plug this action into the given TDEAccel object // if it does not already contain an action with the same name. if ( !kacc->actions().actionPtr(name()) ) { d->m_kaccel = kacc; d->m_kaccel->insert(name(), d->plainText(), TQString::null, - KShortcut(d->m_cut), + TDEShortcut(d->m_cut), this, TQT_SLOT(slotActivated()), configurable, isEnabled()); connect(d->m_kaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed())); //connect(d->m_kaccel, TQT_SIGNAL(keycodeChanged()), this, TQT_SLOT(slotKeycodeChanged())); } else - kdWarning(129) << "KAction::plugAccel( kacc = " << kacc << " ): KAccel object already contains an action name \"" << name() << "\"" << endl; // -- ellis + kdWarning(129) << "TDEAction::plugAccel( kacc = " << kacc << " ): TDEAccel object already contains an action name \"" << name() << "\"" << endl; // -- ellis } -void KAction::unplugAccel() +void TDEAction::unplugAccel() { - //kdDebug(129) << "KAction::unplugAccel() " << this << " " << name() << endl; + //kdDebug(129) << "TDEAction::unplugAccel() " << this << " " << name() << endl; if ( d->m_kaccel ) { d->m_kaccel->remove(name()); @@ -808,7 +808,7 @@ void KAction::unplugAccel() } } -void KAction::plugMainWindowAccel( TQWidget *w ) +void TDEAction::plugMainWindowAccel( TQWidget *w ) { // Note: topLevelWidget() stops too early, we can't use it. TQWidget * tl = w; @@ -816,16 +816,16 @@ void KAction::plugMainWindowAccel( TQWidget *w ) while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store tl = n; - KMainWindow * mw = tqt_dynamic_cast(tl); // try to see if it's a kmainwindow + TDEMainWindow * mw = tqt_dynamic_cast(tl); // try to see if it's a kmainwindow if (mw) plugAccel( mw->accel() ); else - kdDebug(129) << "KAction::plugMainWindowAccel: Toplevel widget isn't a KMainWindow, can't plug accel. " << tl << endl; + kdDebug(129) << "TDEAction::plugMainWindowAccel: Toplevel widget isn't a TDEMainWindow, can't plug accel. " << tl << endl; } -void KAction::setEnabled(bool enable) +void TDEAction::setEnabled(bool enable) { - //kdDebug(129) << "KAction::setEnabled( " << enable << " ): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl; + //kdDebug(129) << "TDEAction::setEnabled( " << enable << " ): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl; if ( enable == d->isEnabled() ) return; @@ -835,9 +835,9 @@ void KAction::setEnabled(bool enable) d->m_kaccel->setEnabled(name(), enable); #endif // KDE 4: remove end - const TQValueList & accelList = d->m_kaccelList; - TQValueList::const_iterator itr = accelList.constBegin(); - const TQValueList::const_iterator itrEnd = accelList.constEnd(); + const TQValueList & accelList = d->m_kaccelList; + TQValueList::const_iterator itr = accelList.constBegin(); + const TQValueList::const_iterator itrEnd = accelList.constEnd(); const char * const namePtr = name(); @@ -853,7 +853,7 @@ void KAction::setEnabled(bool enable) emit enabled( d->isEnabled() ); } -void KAction::updateEnabled( int i ) +void TDEAction::updateEnabled( int i ) { TQWidget *w = container( i ); @@ -861,33 +861,33 @@ void KAction::updateEnabled( int i ) static_cast(w)->setItemEnabled( itemId( i ), d->isEnabled() ); else if ( ::tqqt_cast( w ) ) static_cast(w)->setItemEnabled( itemId( i ), d->isEnabled() ); - else if ( ::tqqt_cast( w ) ) - static_cast(w)->setItemEnabled( itemId( i ), d->isEnabled() ); + else if ( ::tqqt_cast( w ) ) + static_cast(w)->setItemEnabled( itemId( i ), d->isEnabled() ); } -void KAction::setShortcutConfigurable( bool b ) +void TDEAction::setShortcutConfigurable( bool b ) { d->m_configurable = b; } -void KAction::setText( const TQString& text ) +void TDEAction::setText( const TQString& text ) { #ifndef KDE_NO_COMPAT // KDE 4: remove if (d->m_kaccel) { - KAccelAction* pAction = d->m_kaccel->actions().actionPtr(name()); + TDEAccelAction* pAction = d->m_kaccel->actions().actionPtr(name()); if (pAction) pAction->setLabel( text ); } #endif // KDE 4: remove end - const TQValueList & accelList = d->m_kaccelList; - TQValueList::const_iterator itr = accelList.constBegin(); - const TQValueList::const_iterator itrEnd = accelList.constEnd(); + const TQValueList & accelList = d->m_kaccelList; + TQValueList::const_iterator itr = accelList.constBegin(); + const TQValueList::const_iterator itrEnd = accelList.constEnd(); const char * const namePtr = name(); for( ; itr != itrEnd; ++itr ) { - KAccelAction* const pAction = (*itr)->actions().actionPtr(namePtr); + TDEAccelAction* const pAction = (*itr)->actions().actionPtr(namePtr); if (pAction) pAction->setLabel( text ); } @@ -899,7 +899,7 @@ void KAction::setText( const TQString& text ) updateText( i ); } -void KAction::updateText( int i ) +void TDEAction::updateText( int i ) { TQWidget *w = container( i ); @@ -911,25 +911,25 @@ void KAction::updateText( int i ) } else if ( ::tqqt_cast( w ) ) static_cast(w)->changeItem( itemId( i ), d->text() ); - else if ( ::tqqt_cast( w ) ) + else if ( ::tqqt_cast( w ) ) { - TQWidget *button = static_cast(w)->getWidget( itemId( i ) ); - if ( ::tqqt_cast( button ) ) - static_cast(button)->setText( d->plainText() ); + TQWidget *button = static_cast(w)->getWidget( itemId( i ) ); + if ( ::tqqt_cast( button ) ) + static_cast(button)->setText( d->plainText() ); } } -TQString KAction::text() const +TQString TDEAction::text() const { return d->text(); } -TQString KAction::plainText() const +TQString TDEAction::plainText() const { return d->plainText( ); } -void KAction::setIcon( const TQString &icon ) +void TDEAction::setIcon( const TQString &icon ) { d->setIconName( icon ); @@ -939,7 +939,7 @@ void KAction::setIcon( const TQString &icon ) updateIcon( i ); } -void KAction::updateIcon( int id ) +void TDEAction::updateIcon( int id ) { TQWidget* w = container( id ); @@ -951,16 +951,16 @@ void KAction::updateIcon( int id ) } else if ( ::tqqt_cast( w ) ) static_cast(w)->changeItem( itemId( id ), d->iconSet( KIcon::Small ), d->text() ); - else if ( ::tqqt_cast( w ) ) - static_cast(w)->setButtonIcon( itemId( id ), d->iconName() ); + else if ( ::tqqt_cast( w ) ) + static_cast(w)->setButtonIcon( itemId( id ), d->iconName() ); } -TQString KAction::icon() const +TQString TDEAction::icon() const { return d->iconName( ); } -void KAction::setIconSet( const TQIconSet &iconset ) +void TDEAction::setIconSet( const TQIconSet &iconset ) { d->setIconSet( iconset ); @@ -970,7 +970,7 @@ void KAction::setIconSet( const TQIconSet &iconset ) } -void KAction::updateIconSet( int id ) +void TDEAction::updateIconSet( int id ) { TQWidget *w = container( id ); @@ -983,26 +983,26 @@ void KAction::updateIconSet( int id ) } else if ( ::tqqt_cast( w ) ) static_cast(w)->changeItem( itemId( id ), d->iconSet(), d->text() ); - else if ( ::tqqt_cast( w ) ) + else if ( ::tqqt_cast( w ) ) { if ( icon().isEmpty() && d->hasIcon() ) // only if there is no named icon ( scales better ) - static_cast(w)->setButtonIconSet( itemId( id ), d->iconSet() ); + static_cast(w)->setButtonIconSet( itemId( id ), d->iconSet() ); else - static_cast(w)->setButtonIconSet( itemId( id ), d->iconSet( KIcon::Small ) ); + static_cast(w)->setButtonIconSet( itemId( id ), d->iconSet( KIcon::Small ) ); } } -TQIconSet KAction::iconSet( KIcon::Group group, int size ) const +TQIconSet TDEAction::iconSet( KIcon::Group group, int size ) const { return d->iconSet( group, size ); } -bool KAction::hasIcon() const +bool TDEAction::hasIcon() const { return d->hasIcon(); } -void KAction::setWhatsThis( const TQString& text ) +void TDEAction::setWhatsThis( const TQString& text ) { d->setWhatsThis( text ); @@ -1011,7 +1011,7 @@ void KAction::setWhatsThis( const TQString& text ) updateWhatsThis( i ); } -void KAction::updateWhatsThis( int i ) +void TDEAction::updateWhatsThis( int i ) { TQPopupMenu* pm = popupMenu( i ); if ( pm ) @@ -1020,7 +1020,7 @@ void KAction::updateWhatsThis( int i ) return; } - KToolBar *tb = toolBar( i ); + TDEToolBar *tb = toolBar( i ); if ( tb ) { TQWidget *w = tb->getButton( itemId( i ) ); @@ -1030,12 +1030,12 @@ void KAction::updateWhatsThis( int i ) } } -TQString KAction::whatsThis() const +TQString TDEAction::whatsThis() const { return d->whatsThis(); } -TQString KAction::whatsThisWithIcon() const +TQString TDEAction::whatsThisWithIcon() const { TQString text = whatsThis(); if (!d->iconName().isEmpty()) @@ -1043,80 +1043,80 @@ TQString KAction::whatsThisWithIcon() const return text; } -TQWidget* KAction::container( int index ) const +TQWidget* TDEAction::container( int index ) const { assert( index < containerCount() ); return d->m_containers[ index ].m_container; } -KToolBar* KAction::toolBar( int index ) const +TDEToolBar* TDEAction::toolBar( int index ) const { - return tqt_dynamic_cast( d->m_containers[ index ].m_container ); + return tqt_dynamic_cast( d->m_containers[ index ].m_container ); } -TQPopupMenu* KAction::popupMenu( int index ) const +TQPopupMenu* TDEAction::popupMenu( int index ) const { return tqt_dynamic_cast( d->m_containers[ index ].m_container ); } -TQWidget* KAction::representative( int index ) const +TQWidget* TDEAction::representative( int index ) const { return d->m_containers[ index ].m_representative; } -int KAction::itemId( int index ) const +int TDEAction::itemId( int index ) const { return d->m_containers[ index ].m_id; } -int KAction::containerCount() const +int TDEAction::containerCount() const { return d->m_containers.count(); } -uint KAction::kaccelCount() const +uint TDEAction::kaccelCount() const { return d->m_kaccelList.count(); } -void KAction::addContainer( TQWidget* c, int id ) +void TDEAction::addContainer( TQWidget* c, int id ) { - KActionPrivate::Container p; + TDEActionPrivate::Container p; p.m_container = c; p.m_id = id; d->m_containers.append( p ); } -void KAction::addContainer( TQWidget* c, TQWidget* w ) +void TDEAction::addContainer( TQWidget* c, TQWidget* w ) { - KActionPrivate::Container p; + TDEActionPrivate::Container p; p.m_container = c; p.m_representative = w; d->m_containers.append( p ); } -void KAction::activate() +void TDEAction::activate() { - emit activated( KAction::EmulatedActivation, Qt::NoButton ); + emit activated( TDEAction::EmulatedActivation, Qt::NoButton ); slotActivated(); } -void KAction::slotActivated() +void TDEAction::slotActivated() { const TQObject *senderObj = TQT_TQOBJECT_CONST(sender()); if ( senderObj ) { - if ( ::tqqt_cast( senderObj ) ) - emit activated( KAction::AccelActivation, Qt::NoButton ); + if ( ::tqqt_cast( senderObj ) ) + emit activated( TDEAction::AccelActivation, Qt::NoButton ); } emit activated(); } -// This catches signals emitted by KActions inserted into QPopupMenu +// This catches signals emitted by TDEActions inserted into QPopupMenu // We do crude things inside it, because we need to know which // TQPopupMenu emitted the signal. We need to be sure that it is // only called by QPopupMenus, we plugged us in. -void KAction::slotPopupActivated() +void TDEAction::slotPopupActivated() { if( ::tqqt_cast(sender())) { @@ -1127,30 +1127,30 @@ void KAction::slotPopupActivated() TQPopupMenu* qpm = tqt_dynamic_cast( container(pos) ); if(qpm) { - KPopupMenu* kpm = tqt_dynamic_cast( qpm ); + TDEPopupMenu* kpm = tqt_dynamic_cast( qpm ); TQt::ButtonState state; - if ( kpm ) // KPopupMenu? Nice, it stores the state. + if ( kpm ) // TDEPopupMenu? Nice, it stores the state. state = kpm->state(); else { // just a QPopupMenu? We'll ask for the state now then (small race condition?) - kdDebug(129) << "KAction::slotPopupActivated not a KPopupMenu -> using keyboardMouseState()" << endl; + kdDebug(129) << "TDEAction::slotPopupActivated not a TDEPopupMenu -> using keyboardMouseState()" << endl; state = TDEApplication::keyboardMouseState(); } - emit activated( KAction::PopupMenuActivation, state ); + emit activated( TDEAction::PopupMenuActivation, state ); slotActivated(); return; } } } - kdWarning(129)<<"Don't connect KAction::slotPopupActivated() to anything, expect into QPopupMenus which are in containers. Use slotActivated instead."<m_kaccel->actions().actionPtr(name()); + kdDebug(129) << "TDEAction::slotKeycodeChanged()" << endl; // -- ellis + TDEAccelAction* pAction = d->m_kaccel->actions().actionPtr(name()); if( pAction ) setShortcut(pAction->shortcut()); } -KActionCollection *KAction::parentCollection() const +TDEActionCollection *TDEAction::parentCollection() const { return m_parentCollection; } -void KAction::unplugAll() +void TDEAction::unplugAll() { while ( containerCount() != 0 ) unplug( container( 0 ) ); } -const KGuiItem& KAction::guiItem() const +const KGuiItem& TDEAction::guiItem() const { return *d; } -void KAction::virtual_hook( int, void* ) +void TDEAction::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } /* vim: et sw=2 ts=2 diff --git a/tdeui/kaction.h b/tdeui/kaction.h index f2860679f..b68ded272 100644 --- a/tdeui/kaction.h +++ b/tdeui/kaction.h @@ -41,39 +41,39 @@ class TQComboBox; class TQPoint; class TQIconSet; class TQString; -class KToolBar; +class TDEToolBar; -class KAccel; -class KAccelActions; +class TDEAccel; +class TDEAccelActions; class TDEConfig; class TDEConfigBase; class KURL; class TDEInstance; -class KToolBar; -class KActionCollection; -class KPopupMenu; -class KMainWindow; +class TDEToolBar; +class TDEActionCollection; +class TDEPopupMenu; +class TDEMainWindow; /** * @short Class to encapsulate user-driven action or event * - * The KAction class (and derived and super classes) provides a way to + * The TDEAction class (and derived and super classes) provides a way to * easily encapsulate a "real" user-selected action or event in your * program. * * For instance, a user may want to @p paste the contents of * the clipboard or @p scroll @p down a document or @p quit the * application. These are all @p actions -- events that the - * user causes to happen. The KAction class allows the developer to + * user causes to happen. The TDEAction class allows the developer to * deal with these actions in an easy and intuitive manner. * - * Specifically, the KAction class encapsulated the various attributes + * Specifically, the TDEAction class encapsulated the various attributes * to an event/action. For instance, an action might have an icon * that goes along with it (a clipboard for a "paste" action or * scissors for a "cut" action). The action might have some text to * describe the action. It will certainly have a method or function * that actually @p executes the action! All these attributes - * are contained within the KAction object. + * are contained within the TDEAction object. * * The advantage of dealing with Actions is that you can manipulate * the Action without regard to the GUI representation of it. For @@ -86,7 +86,7 @@ class KMainWindow; * similar code - but has to be done twice! * * With the Action concept, you simply "plug" the Action into whatever - * GUI element you want. The KAction class will then take care of + * GUI element you want. The TDEAction class will then take care of * correctly defining the menu item (with icons, accelerators, text, * etc) or toolbar button.. or whatever. From then on, if you * manipulate the Action at all, the effect will propogate through all @@ -99,7 +99,7 @@ class KMainWindow; * one-to-one relationship between the "real" action and @p all * GUI representations of it. * - * KAction emits the activated() signal if the user activated the + * TDEAction emits the activated() signal if the user activated the * corresponding GUI element ( menu item, toolbar button, etc. ) * * If you are in the situation of wanting to map the activated() @@ -113,7 +113,7 @@ class KMainWindow; * this, TQT_SLOT( moveWindowToDesktop( int ) ) ); * * for ( uint i = 0; i < numberOfDesktops; ++i ) { - * KAction *desktopAction = new KAction( i18n( "Move Window to Desktop %i" ).arg( i ), ... ); + * TDEAction *desktopAction = new TDEAction( i18n( "Move Window to Desktop %i" ).arg( i ), ... ); * connect( desktopAction, TQT_SIGNAL( activated() ), desktopNumberMapper, TQT_SLOT( map() ) ); * desktopNumberMapper->setMapping( desktopAction, i ); * } @@ -125,7 +125,7 @@ class KMainWindow; * * @li Decide which attributes you want to associate with a given * action (icons, text, keyboard shortcut, etc) - * @li Create the action using KAction (or derived or super class). + * @li Create the action using TDEAction (or derived or super class). * @li "Plug" the Action into whatever GUI element you want. Typically, * this will be a menu or toolbar. * @@ -133,8 +133,8 @@ class KMainWindow; * * Here is an example of enabling a "New [document]" action * \code - * KAction *newAct = new KAction(i18n("&New"), "filenew", - * KStdAccel::shortcut(KStdAccel::New), + * TDEAction *newAct = new TDEAction(i18n("&New"), "filenew", + * TDEStdAccel::shortcut(TDEStdAccel::New), * this, TQT_SLOT(fileNew()), * actionCollection(), "new"); * \endcode @@ -166,14 +166,14 @@ class KMainWindow; * and both the menuitem in File and the toolbar button will instantly * be disabled. * - * Do not delete a KAction object without unplugging it from all its + * Do not delete a TDEAction object without unplugging it from all its * containers. The simplest way to do that is to use the unplugAll() * as in the following example: * \code * newAct->unplugAll(); * delete newAct; * \endcode - * Normally you will not need to do this as KActionCollection manages + * Normally you will not need to do this as TDEActionCollection manages * everything for you. * * Note: if you are using a "standard" action like "new", "paste", @@ -183,10 +183,10 @@ class KMainWindow; * * Usage Within the XML Framework:\n * - * If you are using KAction within the context of the XML menu and + * If you are using TDEAction within the context of the XML menu and * toolbar building framework, then there are a few tiny changes. The * first is that you must insert your new action into an action - * collection. The action collection (a KActionCollection) is, + * collection. The action collection (a TDEActionCollection) is, * logically enough, a central collection of all of the actions * defined in your application. The XML UI framework code in KXMLGUI * classes needs access to this collection in order to build up the @@ -199,9 +199,9 @@ class KMainWindow; * * @see KStdAction */ -class TDEUI_EXPORT KAction : public TQObject +class TDEUI_EXPORT TDEAction : public TQObject { - friend class KActionCollection; + friend class TDEActionCollection; Q_OBJECT TQ_PROPERTY( int containerCount READ containerCount ) TQ_PROPERTY( TQString plainText READ plainText ) @@ -221,7 +221,7 @@ public: * If you do not want or have a keyboard shortcut, * set the @p cut param to 0. * - * This is the most common KAction used when you do not have a + * This is the most common TDEAction used when you do not have a * corresponding icon (note that it won't appear in the current version * of the "Edit ToolBar" dialog, because an action needs an icon to be * plugged in a toolbar...). @@ -233,9 +233,9 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KAction( const TQString& text, const KShortcut& cut, + TDEAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); /** * Constructs an action with text, icon, potential keyboard @@ -245,7 +245,7 @@ public: * If you do not want or have a keyboard shortcut, set the * @p cut param to 0. * - * This is the other common KAction used. Use it when you + * This is the other common TDEAction used. Use it when you * @p do have a corresponding icon. * * @param text The text that will be displayed. @@ -256,9 +256,9 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); /** * Constructs an action with text, icon, potential keyboard @@ -269,7 +269,7 @@ public: * If you do not want or have a keyboard shortcut, set the * @p cut param to 0. * - * This is the other common KAction used. Use it when you + * This is the other common TDEAction used. Use it when you * @p do have a corresponding icon. * * @param text The text that will be displayed. @@ -280,9 +280,9 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); /** * The same as the above constructor, but with a KGuiItem providing @@ -295,49 +295,49 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KAction( const KGuiItem& item, const KShortcut& cut, + TDEAction( const KGuiItem& item, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); /** * @obsolete */ - KAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 ); + TDEAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const KShortcut& cut, + TDEAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** * @obsolete */ - KAction( TQObject* parent = 0, const char* name = 0 ); + TDEAction( TQObject* parent = 0, const char* name = 0 ); /** * Standard destructor */ - virtual ~KAction(); + virtual ~TDEAction(); /** * "Plug" or insert this action into a given widget. @@ -346,7 +346,7 @@ public: * typically be a menu or a toolbar. From this point on, you will * never need to directly manipulate the item in the menu or * toolbar. You do all enabling/disabling/manipulation directly - * with your KAction object. + * with your TDEAction object. * * @param widget The GUI element to display this action * @param index The position into which the action is plugged. If @@ -357,14 +357,14 @@ public: /** * @deprecated. Shouldn't be used. No substitute available. * - * "Plug" or insert this action into a given KAccel. + * "Plug" or insert this action into a given TDEAccel. * - * @param accel The KAccel collection which holds this accel + * @param accel The TDEAccel collection which holds this accel * @param configurable If the shortcut is configurable via - * the KAccel configuration dialog (this is somehow deprecated since - * there is now a KAction key configuration dialog). + * the TDEAccel configuration dialog (this is somehow deprecated since + * there is now a TDEAction key configuration dialog). */ - virtual void plugAccel(KAccel *accel, bool configurable = true) KDE_DEPRECATED; + virtual void plugAccel(TDEAccel *accel, bool configurable = true) KDE_DEPRECATED; /** * "Unplug" or remove this action from a given widget. @@ -382,7 +382,7 @@ public: /** * @deprecated. Complement method to plugAccel(). - * Disconnect this action from the KAccel. + * Disconnect this action from the TDEAccel. */ virtual void unplugAccel() KDE_DEPRECATED; @@ -430,11 +430,11 @@ public: /** * Get the keyboard shortcut associated with this action. */ - virtual const KShortcut& shortcut() const; + virtual const TDEShortcut& shortcut() const; /** * Get the default shortcut for this action. */ - virtual const KShortcut& shortcutDefault() const; + virtual const TDEShortcut& shortcutDefault() const; // These two methods are for TQ_PROPERTY TQString shortcutText() const; @@ -477,7 +477,7 @@ public: virtual TQString icon() const; - KActionCollection *parentCollection() const; + TDEActionCollection *parentCollection() const; /** * @internal @@ -503,7 +503,7 @@ public slots: /** * Sets the keyboard shortcut associated with this action. */ - virtual bool setShortcut( const KShortcut& ); + virtual bool setShortcut( const TDEShortcut& ); virtual void setGroup( const TQString& ); @@ -525,9 +525,9 @@ public slots: * For the tooltip to show up on the statusbar you will need to connect * a couple of the actionclass signals to the toolbar. * The easiest way of doing this is in your main window class, when you create - * a statusbar. See the KActionCollection class for more details. + * a statusbar. See the TDEActionCollection class for more details. * - * @see KActionCollection + * @see TDEActionCollection * */ virtual void setToolTip( const TQString& ); @@ -573,7 +573,7 @@ protected slots: void slotButtonClicked( int, TQt::ButtonState state ); // KDE4: make virtual protected: - KToolBar* toolBar( int index ) const; + TDEToolBar* toolBar( int index ) const; TQPopupMenu* popupMenu( int index ) const; void removeContainer( int index ); int findContainer( const TQWidget* widget ) const; @@ -593,7 +593,7 @@ protected: virtual void updateToolTip( int id ); virtual void updateWhatsThis( int i ); - KActionCollection *m_parentCollection; + TDEActionCollection *m_parentCollection; TQString whatsThisWithIcon() const; /** * Return the underlying KGuiItem @@ -620,19 +620,19 @@ signals: * * @since 3.4 */ - void activated( KAction::ActivationReason reason, TQt::ButtonState state ); + void activated( TDEAction::ActivationReason reason, TQt::ButtonState state ); void enabled( bool ); private: - void initPrivate( const TQString& text, const KShortcut& cut, + void initPrivate( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot ); - KAccel* kaccelCurrent(); - bool initShortcut( const KShortcut& ); + TDEAccel* kaccelCurrent(); + bool initShortcut( const TDEShortcut& ); void plugShortcut(); - bool updateKAccelShortcut( KAccel* kaccel ); - void insertKAccel( KAccel* ); - /** @internal To be used exclusively by KActionCollection::removeWidget(). */ - void removeKAccel( KAccel* ); + bool updateTDEAccelShortcut( TDEAccel* kaccel ); + void insertTDEAccel( TDEAccel* ); + /** @internal To be used exclusively by TDEActionCollection::removeWidget(). */ + void removeTDEAccel( TDEAccel* ); #ifndef KDE_NO_COMPAT public: @@ -666,8 +666,8 @@ public: protected: virtual void virtual_hook( int id, void* data ); private: - class KActionPrivate; - KActionPrivate* const d; + class TDEActionPrivate; + TDEActionPrivate* const d; }; #include diff --git a/tdeui/kactionclasses.cpp b/tdeui/kactionclasses.cpp index 52b3441c2..87c9932a3 100644 --- a/tdeui/kactionclasses.cpp +++ b/tdeui/kactionclasses.cpp @@ -57,10 +57,10 @@ #include #include -class KToggleAction::KToggleActionPrivate +class TDEToggleAction::TDEToggleActionPrivate { public: - KToggleActionPrivate() + TDEToggleActionPrivate() { m_checked = false; m_checkedGuiItem = 0; @@ -71,86 +71,86 @@ public: KGuiItem* m_checkedGuiItem; }; -KToggleAction::KToggleAction( const TQString& text, const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, cut, parent, name ) + : TDEAction( text, cut, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, cut, receiver, slot, parent, name ) + : TDEAction( text, cut, receiver, slot, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, pix, cut, parent, name ) + : TDEAction( text, pix, cut, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, pix, cut, parent, name ) + : TDEAction( text, pix, cut, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, pix, cut, receiver, slot, parent, name ) + : TDEAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, pix, cut, receiver, slot, parent, name ) + : TDEAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( TQObject* parent, const char* name ) - : KAction( parent, name ) +TDEToggleAction::TDEToggleAction( TQObject* parent, const char* name ) + : TDEAction( parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::~KToggleAction() +TDEToggleAction::~TDEToggleAction() { delete d->m_checkedGuiItem; delete d; } -int KToggleAction::plug( TQWidget* widget, int index ) +int TDEToggleAction::plug( TQWidget* widget, int index ) { - if ( !::tqqt_cast( widget ) && !::tqqt_cast( widget ) ) + if ( !::tqqt_cast( widget ) && !::tqqt_cast( widget ) ) { - kdWarning() << "Can not plug KToggleAction in " << widget->className() << endl; + kdWarning() << "Can not plug TDEToggleAction in " << widget->className() << endl; return -1; } - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - int _index = KAction::plug( widget, index ); + int _index = TDEAction::plug( widget, index ); if ( _index == -1 ) return _index; - if ( ::tqqt_cast( widget ) ) { - KToolBar *bar = static_cast( widget ); + if ( ::tqqt_cast( widget ) ) { + TDEToolBar *bar = static_cast( widget ); bar->setToggle( itemId( _index ), true ); bar->setButton( itemId( _index ), isChecked() ); @@ -162,11 +162,11 @@ int KToggleAction::plug( TQWidget* widget, int index ) return _index; } -void KToggleAction::setChecked( bool c ) +void TDEToggleAction::setChecked( bool c ) { if ( c == d->m_checked ) return; - //kdDebug(129) << "KToggleAction::setChecked(" << c << ") " << this << " " << name() << endl; + //kdDebug(129) << "TDEToggleAction::setChecked(" << c << ") " << this << " " << name() << endl; d->m_checked = c; @@ -180,9 +180,9 @@ void KToggleAction::setChecked( bool c ) if ( !list.isEmpty() ) { TQObjectListIt it( list ); for( ; it.current(); ++it ) { - if ( ::tqqt_cast( it.current() ) && it.current() != this && - static_cast(it.current())->exclusiveGroup() == exclusiveGroup() ) { - KToggleAction *a = static_cast(it.current()); + if ( ::tqqt_cast( it.current() ) && it.current() != this && + static_cast(it.current())->exclusiveGroup() == exclusiveGroup() ) { + TDEToggleAction *a = static_cast(it.current()); if( a->isChecked() ) { a->setChecked( false ); emit a->toggled( false ); @@ -193,7 +193,7 @@ void KToggleAction::setChecked( bool c ) } } -void KToggleAction::updateChecked( int id ) +void TDEToggleAction::updateChecked( int id ) { TQWidget *w = container( id ); @@ -221,124 +221,124 @@ void KToggleAction::updateChecked( int id ) } else if ( ::tqqt_cast( w ) ) // not handled in plug... static_cast(w)->setItemChecked( itemId( id ), d->m_checked ); - else if ( ::tqqt_cast( w ) ) + else if ( ::tqqt_cast( w ) ) { - TQWidget* r = static_cast( w )->getButton( itemId( id ) ); - if ( r && ::tqqt_cast( r ) ) { - static_cast( w )->setButton( itemId( id ), d->m_checked ); + TQWidget* r = static_cast( w )->getButton( itemId( id ) ); + if ( r && ::tqqt_cast( r ) ) { + static_cast( w )->setButton( itemId( id ), d->m_checked ); if ( d->m_checkedGuiItem && d->m_checkedGuiItem->hasIcon() ) { const KGuiItem* gui = d->m_checked ? d->m_checkedGuiItem : &guiItem(); - static_cast( w )->setButtonIconSet( itemId( id ), gui->iconSet( KIcon::Toolbar ) ); + static_cast( w )->setButtonIconSet( itemId( id ), gui->iconSet( KIcon::Toolbar ) ); } } } } -void KToggleAction::slotActivated() +void TDEToggleAction::slotActivated() { setChecked( !isChecked() ); - KAction::slotActivated(); + TDEAction::slotActivated(); emit toggled( isChecked() ); } -bool KToggleAction::isChecked() const +bool TDEToggleAction::isChecked() const { return d->m_checked; } -void KToggleAction::setExclusiveGroup( const TQString& name ) +void TDEToggleAction::setExclusiveGroup( const TQString& name ) { d->m_exclusiveGroup = name; } -TQString KToggleAction::exclusiveGroup() const +TQString TDEToggleAction::exclusiveGroup() const { return d->m_exclusiveGroup; } -void KToggleAction::setCheckedState( const KGuiItem& checkedItem ) +void TDEToggleAction::setCheckedState( const KGuiItem& checkedItem ) { delete d->m_checkedGuiItem; d->m_checkedGuiItem = new KGuiItem( checkedItem ); } -TQString KToggleAction::toolTip() const +TQString TDEToggleAction::toolTip() const { if ( d->m_checkedGuiItem && d->m_checked ) return d->m_checkedGuiItem->toolTip(); else - return KAction::toolTip(); + return TDEAction::toolTip(); } -KRadioAction::KRadioAction( const TQString& text, const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) -: KToggleAction( text, cut, parent, name ) +: TDEToggleAction( text, cut, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) -: KToggleAction( text, cut, receiver, slot, parent, name ) +: TDEToggleAction( text, cut, receiver, slot, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) -: KToggleAction( text, pix, cut, parent, name ) +: TDEToggleAction( text, pix, cut, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) -: KToggleAction( text, pix, cut, parent, name ) +: TDEToggleAction( text, pix, cut, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) -: KToggleAction( text, pix, cut, receiver, slot, parent, name ) +: TDEToggleAction( text, pix, cut, receiver, slot, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) -: KToggleAction( text, pix, cut, receiver, slot, parent, name ) +: TDEToggleAction( text, pix, cut, receiver, slot, parent, name ) { } -KRadioAction::KRadioAction( TQObject* parent, const char* name ) -: KToggleAction( parent, name ) +TDERadioAction::TDERadioAction( TQObject* parent, const char* name ) +: TDEToggleAction( parent, name ) { } -void KRadioAction::slotActivated() +void TDERadioAction::slotActivated() { if ( isChecked() ) { const TQObject *senderObj = TQT_TQOBJECT_CONST(sender()); - if ( !senderObj || !::tqqt_cast( senderObj ) ) + if ( !senderObj || !::tqqt_cast( senderObj ) ) return; - const_cast( static_cast( TQT_TQWIDGET_CONST(senderObj) ) )->on( true ); + const_cast( static_cast( TQT_TQWIDGET_CONST(senderObj) ) )->on( true ); return; } - KToggleAction::slotActivated(); + TDEToggleAction::slotActivated(); } -class KSelectAction::KSelectActionPrivate +class TDESelectAction::TDESelectActionPrivate { public: - KSelectActionPrivate() + TDESelectActionPrivate() { m_edit = false; m_menuAccelsEnabled = true; @@ -373,71 +373,71 @@ public: } }; -KSelectAction::KSelectAction( const TQString& text, const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, cut, parent, name ) + : TDEAction( text, cut, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, cut, receiver, slot, parent, name ) + : TDEAction( text, cut, receiver, slot, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, pix, cut, parent, name ) + : TDEAction( text, pix, cut, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, pix, cut, parent, name ) + : TDEAction( text, pix, cut, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, pix, cut, receiver, slot, parent, name ) + : TDEAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, pix, cut, receiver, slot, parent, name ) + : TDEAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( TQObject* parent, const char* name ) - : KAction( parent, name ) +TDESelectAction::TDESelectAction( TQObject* parent, const char* name ) + : TDEAction( parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::~KSelectAction() +TDESelectAction::~TDESelectAction() { assert(d); delete d->m_menu; delete d; d = 0; } -void KSelectAction::setCurrentItem( int id ) +void TDESelectAction::setCurrentItem( int id ) { if ( id >= (int)d->m_list.count() ) { Q_ASSERT(id < (int)d->m_list.count()); @@ -459,12 +459,12 @@ void KSelectAction::setCurrentItem( int id ) for( int i = 0; i < len; ++i ) updateCurrentItem( i ); - // emit KAction::activated(); + // emit TDEAction::activated(); // emit activated( currentItem() ); // emit activated( currentText() ); } -void KSelectAction::setComboWidth( int width ) +void TDESelectAction::setComboWidth( int width ) { if ( width < 0 ) return; @@ -478,17 +478,17 @@ void KSelectAction::setComboWidth( int width ) } -void KSelectAction::setMaxComboViewCount( int n ) +void TDESelectAction::setMaxComboViewCount( int n ) { d->m_maxComboViewCount = n; } -TQPopupMenu* KSelectAction::popupMenu() const +TQPopupMenu* TDESelectAction::popupMenu() const { - kdDebug(129) << "KAction::popupMenu()" << endl; // remove -- ellis + kdDebug(129) << "TDEAction::popupMenu()" << endl; // remove -- ellis if ( !d->m_menu ) { - d->m_menu = new KPopupMenu(0L, "KSelectAction::popupMenu()"); + d->m_menu = new TDEPopupMenu(0L, "TDESelectAction::popupMenu()"); setupMenu(); if ( d->m_current >= 0 ) d->m_menu->setItemChecked( d->m_current, true ); @@ -497,7 +497,7 @@ TQPopupMenu* KSelectAction::popupMenu() const return d->m_menu; } -void KSelectAction::setupMenu() const +void TDESelectAction::setupMenu() const { if ( !d->m_menu ) return; @@ -513,11 +513,11 @@ void KSelectAction::setupMenu() const } } -void KSelectAction::changeItem( int index, const TQString& text ) +void TDESelectAction::changeItem( int index, const TQString& text ) { if ( index < 0 || index >= (int)d->m_list.count() ) { - kdWarning() << "KSelectAction::changeItem Index out of scope" << endl; + kdWarning() << "TDESelectAction::changeItem Index out of scope" << endl; return; } @@ -531,15 +531,15 @@ void KSelectAction::changeItem( int index, const TQString& text ) changeItem( i, index, text ); } -void KSelectAction::changeItem( int id, int index, const TQString& text) +void TDESelectAction::changeItem( int id, int index, const TQString& text) { if ( index < 0 ) return; TQWidget* w = container( id ); - if ( ::tqqt_cast( w ) ) + if ( ::tqqt_cast( w ) ) { - TQWidget* r = (static_cast( w ))->getWidget( itemId( id ) ); + TQWidget* r = (static_cast( w ))->getWidget( itemId( id ) ); if ( ::tqqt_cast( r ) ) { TQComboBox *b = static_cast( r ); @@ -548,7 +548,7 @@ void KSelectAction::changeItem( int id, int index, const TQString& text) } } -void KSelectAction::setItems( const TQStringList &lst ) +void TDESelectAction::setItems( const TQStringList &lst ) { d->m_list = lst; d->m_current = -1; @@ -563,12 +563,12 @@ void KSelectAction::setItems( const TQStringList &lst ) setEnabled ( lst.count() > 0 || d->m_edit ); } -TQStringList KSelectAction::items() const +TQStringList TDESelectAction::items() const { return d->m_list; } -TQString KSelectAction::currentText() const +TQString TDESelectAction::currentText() const { if ( currentItem() < 0 ) return TQString::null; @@ -576,19 +576,19 @@ TQString KSelectAction::currentText() const return d->m_list[ currentItem() ]; } -int KSelectAction::currentItem() const +int TDESelectAction::currentItem() const { return d->m_current; } -void KSelectAction::updateCurrentItem( int id ) +void TDESelectAction::updateCurrentItem( int id ) { if ( d->m_current < 0 ) return; TQWidget* w = container( id ); - if ( ::tqqt_cast( w ) ) { - TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast( w ) ) { + TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast( r ) ) { TQComboBox *b = static_cast( r ); b->setCurrentItem( d->m_current ); @@ -596,16 +596,16 @@ void KSelectAction::updateCurrentItem( int id ) } } -int KSelectAction::comboWidth() const +int TDESelectAction::comboWidth() const { return d->m_comboWidth; } -void KSelectAction::updateComboWidth( int id ) +void TDESelectAction::updateComboWidth( int id ) { TQWidget* w = container( id ); - if ( ::tqqt_cast( w ) ) { - TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast( w ) ) { + TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast( r ) ) { TQComboBox *cb = static_cast( r ); cb->setMinimumWidth( d->m_comboWidth ); @@ -614,12 +614,12 @@ void KSelectAction::updateComboWidth( int id ) } } -void KSelectAction::updateItems( int id ) +void TDESelectAction::updateItems( int id ) { - kdDebug(129) << "KAction::updateItems( " << id << ", lst )" << endl; // remove -- ellis + kdDebug(129) << "TDEAction::updateItems( " << id << ", lst )" << endl; // remove -- ellis TQWidget* w = container( id ); - if ( ::tqqt_cast( w ) ) { - TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast( w ) ) { + TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast( r ) ) { TQComboBox *cb = static_cast( r ); cb->clear(); @@ -636,11 +636,11 @@ void KSelectAction::updateItems( int id ) } } -int KSelectAction::plug( TQWidget *widget, int index ) +int TDESelectAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - kdDebug(129) << "KSelectAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis + kdDebug(129) << "TDESelectAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis if ( ::tqqt_cast( widget) ) { // Create the PopupMenu and store it in m_menu @@ -665,10 +665,10 @@ int KSelectAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - else if ( ::tqqt_cast( widget ) ) + else if ( ::tqqt_cast( widget ) ) { - KToolBar* bar = static_cast( widget ); - int id_ = KAction::getToolButtonID(); + TDEToolBar* bar = static_cast( widget ); + int id_ = TDEAction::getToolButtonID(); bar->insertCombo( comboItems(), id_, isEditable(), TQT_SIGNAL( activated( const TQString & ) ), this, TQT_SLOT( slotActivated( const TQString & ) ), isEnabled(), @@ -718,11 +718,11 @@ int KSelectAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - kdWarning() << "Can not plug KAction in " << widget->className() << endl; + kdWarning() << "Can not plug TDEAction in " << widget->className() << endl; return -1; } -TQStringList KSelectAction::comboItems() const +TQStringList TDESelectAction::comboItems() const { if( d->m_menuAccelsEnabled ) { TQStringList lst; @@ -741,7 +741,7 @@ TQStringList KSelectAction::comboItems() const return d->m_list; } -void KSelectAction::clear() +void TDESelectAction::clear() { if ( d->m_menu ) d->m_menu->clear(); @@ -751,11 +751,11 @@ void KSelectAction::clear() updateClear( i ); } -void KSelectAction::updateClear( int id ) +void TDESelectAction::updateClear( int id ) { TQWidget* w = container( id ); - if ( ::tqqt_cast( w ) ) { - TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast( w ) ) { + TQWidget* r = static_cast( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast( r ) ) { TQComboBox *b = static_cast( r ); b->clear(); @@ -763,7 +763,7 @@ void KSelectAction::updateClear( int id ) } } -void KSelectAction::slotActivated( int id ) +void TDESelectAction::slotActivated( int id ) { if ( d->m_current == id ) return; @@ -774,7 +774,7 @@ void KSelectAction::slotActivated( int id ) TQTimer::singleShot( 0, this, TQT_SLOT( slotActivated() ) ); } -void KSelectAction::slotActivated( const TQString &text ) +void TDESelectAction::slotActivated( const TQString &text ) { if ( isEditable() ) { @@ -796,175 +796,175 @@ void KSelectAction::slotActivated( const TQString &text ) TQTimer::singleShot( 0, this, TQT_SLOT( slotActivated() ) ); } -void KSelectAction::slotActivated() +void TDESelectAction::slotActivated() { - KAction::slotActivated(); - kdDebug(129) << "KSelectAction::slotActivated currentItem=" << currentItem() << " currentText=" << currentText() << endl; + TDEAction::slotActivated(); + kdDebug(129) << "TDESelectAction::slotActivated currentItem=" << currentItem() << " currentText=" << currentText() << endl; emit activated( currentItem() ); emit activated( currentText() ); } -void KSelectAction::setEditable( bool edit ) +void TDESelectAction::setEditable( bool edit ) { d->m_edit = edit; } -bool KSelectAction::isEditable() const +bool TDESelectAction::isEditable() const { return d->m_edit; } -void KSelectAction::setRemoveAmpersandsInCombo( bool b ) +void TDESelectAction::setRemoveAmpersandsInCombo( bool b ) { setMenuAccelsEnabled( b ); } -bool KSelectAction::removeAmpersandsInCombo() const +bool TDESelectAction::removeAmpersandsInCombo() const { return menuAccelsEnabled( ); } -void KSelectAction::setMenuAccelsEnabled( bool b ) +void TDESelectAction::setMenuAccelsEnabled( bool b ) { d->m_menuAccelsEnabled = b; } -bool KSelectAction::menuAccelsEnabled() const +bool TDESelectAction::menuAccelsEnabled() const { return d->m_menuAccelsEnabled; } -class KListAction::KListActionPrivate +class TDEListAction::TDEListActionPrivate { public: - KListActionPrivate() + TDEListActionPrivate() { m_current = 0; } int m_current; }; -KListAction::KListAction( const TQString& text, const KShortcut& cut, +TDEListAction::TDEListAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; } -KListAction::KListAction( const TQString& text, const KShortcut& cut, +TDEListAction::TDEListAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; if ( receiver ) connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot ); } -KListAction::KListAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEListAction::TDEListAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; } -KListAction::KListAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEListAction::TDEListAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; } -KListAction::KListAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, const TQObject* receiver, +TDEListAction::TDEListAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; if ( receiver ) connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot ); } -KListAction::KListAction( const TQString& text, const TQString& pix, - const KShortcut& cut, const TQObject* receiver, +TDEListAction::TDEListAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; if ( receiver ) connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot ); } -KListAction::KListAction( TQObject* parent, const char* name ) - : KSelectAction( parent, name ) +TDEListAction::TDEListAction( TQObject* parent, const char* name ) + : TDESelectAction( parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; } -KListAction::~KListAction() +TDEListAction::~TDEListAction() { delete d; d = 0; } -void KListAction::setCurrentItem( int index ) +void TDEListAction::setCurrentItem( int index ) { - KSelectAction::setCurrentItem( index ); + TDESelectAction::setCurrentItem( index ); d->m_current = index; - // emit KAction::activated(); + // emit TDEAction::activated(); // emit activated( currentItem() ); // emit activated( currentText() ); } -TQString KListAction::currentText() const +TQString TDEListAction::currentText() const { - return KSelectAction::currentText(); + return TDESelectAction::currentText(); } -int KListAction::currentItem() const +int TDEListAction::currentItem() const { return d->m_current; } -class KRecentFilesAction::KRecentFilesActionPrivate +class TDERecentFilesAction::TDERecentFilesActionPrivate { public: - KRecentFilesActionPrivate() + TDERecentFilesActionPrivate() { m_maxItems = 0; m_popup = 0; } uint m_maxItems; - KPopupMenu *m_popup; + TDEPopupMenu *m_popup; TQMap m_shortNames; TQMap m_urls; }; -KRecentFilesAction::KRecentFilesAction( const TQString& text, - const KShortcut& cut, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, + const TDEShortcut& cut, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, cut, parent, name) + : TDEListAction( text, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, - const KShortcut& cut, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, cut, parent, name) + : TDEListAction( text, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); @@ -974,42 +974,42 @@ KRecentFilesAction::KRecentFilesAction( const TQString& text, receiver, slot ); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, + const TDEShortcut& cut, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, pix, cut, parent, name) + : TDEListAction( text, pix, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, const TQString& pix, - const KShortcut& cut, + const TDEShortcut& cut, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, pix, cut, parent, name) + : TDEListAction( text, pix, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, pix, cut, parent, name) + : TDEListAction( text, pix, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); @@ -1019,16 +1019,16 @@ KRecentFilesAction::KRecentFilesAction( const TQString& text, receiver, slot ); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, const TQString& pix, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, pix, cut, parent, name) + : TDEListAction( text, pix, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); @@ -1038,20 +1038,20 @@ KRecentFilesAction::KRecentFilesAction( const TQString& text, receiver, slot ); } -KRecentFilesAction::KRecentFilesAction( TQObject* parent, const char* name, +TDERecentFilesAction::TDERecentFilesAction( TQObject* parent, const char* name, uint maxItems ) - : KListAction( parent, name ) + : TDEListAction( parent, name ) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); } -void KRecentFilesAction::init() +void TDERecentFilesAction::init() { - KRecentFilesAction *that = const_cast(this); - that->d->m_popup = new KPopupMenu; + TDERecentFilesAction *that = const_cast(this); + that->d->m_popup = new TDEPopupMenu; connect(d->m_popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(menuAboutToShow())); connect(d->m_popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int))); connect( this, TQT_SIGNAL( activated( const TQString& ) ), @@ -1060,20 +1060,20 @@ void KRecentFilesAction::init() setMenuAccelsEnabled( false ); } -KRecentFilesAction::~KRecentFilesAction() +TDERecentFilesAction::~TDERecentFilesAction() { delete d->m_popup; delete d; d = 0; } -uint KRecentFilesAction::maxItems() const +uint TDERecentFilesAction::maxItems() const { return d->m_maxItems; } -void KRecentFilesAction::setMaxItems( uint maxItems ) +void TDERecentFilesAction::setMaxItems( uint maxItems ) { - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); uint oldCount = lst.count(); // set new maxItems @@ -1094,17 +1094,17 @@ void KRecentFilesAction::setMaxItems( uint maxItems ) setItems( lst ); } -void KRecentFilesAction::addURL( const KURL& url ) +void TDERecentFilesAction::addURL( const KURL& url ) { addURL( url, url.fileName() ); } -void KRecentFilesAction::addURL( const KURL& url, const TQString& name ) +void TDERecentFilesAction::addURL( const KURL& url, const TQString& name ) { if ( url.isLocalFile() && !TDEGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/")) return; const TQString file = url.pathOrURL(); - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); // remove file if already in list const TQStringList::Iterator end = lst.end(); @@ -1137,9 +1137,9 @@ void KRecentFilesAction::addURL( const KURL& url, const TQString& name ) setItems( lst ); } -void KRecentFilesAction::removeURL( const KURL& url ) +void TDERecentFilesAction::removeURL( const KURL& url ) { - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); TQString file = url.pathOrURL(); // remove url @@ -1157,14 +1157,14 @@ void KRecentFilesAction::removeURL( const KURL& url ) } } -void KRecentFilesAction::clearURLList() +void TDERecentFilesAction::clearURLList() { clear(); d->m_shortNames.clear(); d->m_urls.clear(); } -void KRecentFilesAction::loadEntries( TDEConfig* config, TQString groupname) +void TDERecentFilesAction::loadEntries( TDEConfig* config, TQString groupname) { TQString key; TQString value; @@ -1209,12 +1209,12 @@ void KRecentFilesAction::loadEntries( TDEConfig* config, TQString groupname) config->setGroup( oldGroup ); } -void KRecentFilesAction::saveEntries( TDEConfig* config, TQString groupname ) +void TDERecentFilesAction::saveEntries( TDEConfig* config, TQString groupname ) { TQString key; TQString value; TQString oldGroup; - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); oldGroup = config->group(); @@ -1238,7 +1238,7 @@ void KRecentFilesAction::saveEntries( TDEConfig* config, TQString groupname ) config->setGroup( oldGroup ); } -void KRecentFilesAction::itemSelected( const TQString& text ) +void TDERecentFilesAction::itemSelected( const TQString& text ) { //return a copy of the URL since the slot where it is connected might call //addURL or removeURL where the d->m_urls.erase( title ) could destroy the @@ -1246,7 +1246,7 @@ void KRecentFilesAction::itemSelected( const TQString& text ) emit urlSelected( KURL(d->m_urls[ text ]) ); } -void KRecentFilesAction::menuItemActivated( int id ) +void TDERecentFilesAction::menuItemActivated( int id ) { TQString text = d->m_popup->text(id); //return a copy of the URL since the slot where it is connected might call @@ -1255,28 +1255,28 @@ void KRecentFilesAction::menuItemActivated( int id ) emit urlSelected( KURL(d->m_urls[ text ]) ); } -void KRecentFilesAction::menuAboutToShow() +void TDERecentFilesAction::menuAboutToShow() { - KPopupMenu *menu = d->m_popup; + TDEPopupMenu *menu = d->m_popup; menu->clear(); - TQStringList list = KSelectAction::items(); + TQStringList list = TDESelectAction::items(); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { menu->insertItem(*it); } } -int KRecentFilesAction::plug( TQWidget *widget, int index ) +int TDERecentFilesAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - // This is very related to KActionMenu::plug. - // In fact this class could be an interesting base class for KActionMenu - if ( ::tqqt_cast( widget ) ) + // This is very related to TDEActionMenu::plug. + // In fact this class could be an interesting base class for TDEActionMenu + if ( ::tqqt_cast( widget ) ) { - KToolBar *bar = (KToolBar *)widget; + TDEToolBar *bar = (TDEToolBar *)widget; - int id_ = KAction::getToolButtonID(); + int id_ = TDEAction::getToolButtonID(); TDEInstance * instance; if ( m_parentCollection ) @@ -1300,36 +1300,36 @@ int KRecentFilesAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - return KListAction::plug( widget, index ); + return TDEListAction::plug( widget, index ); } -void KRecentFilesAction::slotClicked() +void TDERecentFilesAction::slotClicked() { - KAction::slotActivated(); + TDEAction::slotActivated(); } -void KRecentFilesAction::slotActivated(const TQString& text) +void TDERecentFilesAction::slotActivated(const TQString& text) { - KListAction::slotActivated(text); + TDEListAction::slotActivated(text); } -void KRecentFilesAction::slotActivated(int id) +void TDERecentFilesAction::slotActivated(int id) { - KListAction::slotActivated(id); + TDEListAction::slotActivated(id); } -void KRecentFilesAction::slotActivated() +void TDERecentFilesAction::slotActivated() { emit activated( currentItem() ); emit activated( currentText() ); } //KDE4: rename to urls() and return a KURL::List -TQStringList KRecentFilesAction::items() const +TQStringList TDERecentFilesAction::items() const { - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); TQStringList result; for( unsigned int i = 1 ; i <= lst.count() ; i++ ) @@ -1341,130 +1341,130 @@ TQStringList KRecentFilesAction::items() const } //KDE4: remove -TQStringList KRecentFilesAction::completeItems() const +TQStringList TDERecentFilesAction::completeItems() const { - return KSelectAction::items(); + return TDESelectAction::items(); } -class KFontAction::KFontActionPrivate +class TDEFontAction::TDEFontActionPrivate { public: - KFontActionPrivate() + TDEFontActionPrivate() { } TQStringList m_fonts; }; -KFontAction::KFontAction( const TQString& text, - const KShortcut& cut, TQObject* parent, +TDEFontAction::TDEFontAction( const TQString& text, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, cut, receiver, slot, parent, name ) + : TDESelectAction( text, cut, receiver, slot, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, receiver, slot, parent, name ) + : TDESelectAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, receiver, slot, parent, name ) + : TDESelectAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( uint fontListCriteria, const TQString& text, - const KShortcut& cut, TQObject* parent, +TDEFontAction::TDEFontAction( uint fontListCriteria, const TQString& text, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, fontListCriteria ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, fontListCriteria ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( uint fontListCriteria, const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( uint fontListCriteria, const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, fontListCriteria ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, fontListCriteria ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( TQObject* parent, const char* name ) - : KSelectAction( parent, name ) +TDEFontAction::TDEFontAction( TQObject* parent, const char* name ) + : TDESelectAction( parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::~KFontAction() +TDEFontAction::~TDEFontAction() { delete d; d = 0; } /* - * Maintenance note: Keep in sync with KFontCombo::setCurrentFont() + * Maintenance note: Keep in sync with TDEFontCombo::setCurrentFont() */ -void KFontAction::setFont( const TQString &family ) +void TDEFontAction::setFont( const TQString &family ) { TQString lowerName = family.lower(); int i = 0; @@ -1521,15 +1521,15 @@ void KFontAction::setFont( const TQString &family ) kdDebug(129) << "Font not found " << family.lower() << endl; } -int KFontAction::plug( TQWidget *w, int index ) +int TDEFontAction::plug( TQWidget *w, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - if ( ::tqqt_cast( w ) ) + if ( ::tqqt_cast( w ) ) { - KToolBar* bar = static_cast( w ); - int id_ = KAction::getToolButtonID(); - KFontCombo *cb = new KFontCombo( items(), bar ); + TDEToolBar* bar = static_cast( w ); + int id_ = TDEAction::getToolButtonID(); + TDEFontCombo *cb = new TDEFontCombo( items(), bar ); connect( cb, TQT_SIGNAL( activated( const TQString & ) ), TQT_SLOT( slotActivated( const TQString & ) ) ); cb->setEnabled( isEnabled() ); @@ -1544,85 +1544,85 @@ int KFontAction::plug( TQWidget *w, int index ) return containerCount() - 1; } - else return KSelectAction::plug( w, index ); + else return TDESelectAction::plug( w, index ); } -class KFontSizeAction::KFontSizeActionPrivate +class TDEFontSizeAction::TDEFontSizeActionPrivate { public: - KFontSizeActionPrivate() + TDEFontSizeActionPrivate() { } }; -KFontSizeAction::KFontSizeAction( const TQString& text, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, cut, receiver, slot, parent, name ) + : TDESelectAction( text, cut, receiver, slot, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, receiver, slot, parent, name ) + : TDESelectAction( text, pix, cut, receiver, slot, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, receiver, slot, parent, name ) + : TDESelectAction( text, pix, cut, receiver, slot, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( TQObject* parent, const char* name ) - : KSelectAction( parent, name ) +TDEFontSizeAction::TDEFontSizeAction( TQObject* parent, const char* name ) + : TDESelectAction( parent, name ) { init(); } -KFontSizeAction::~KFontSizeAction() +TDEFontSizeAction::~TDEFontSizeAction() { delete d; d = 0; } -void KFontSizeAction::init() +void TDEFontSizeAction::init() { - d = new KFontSizeActionPrivate; + d = new TDEFontSizeActionPrivate; setEditable( true ); TQFontDatabase fontDB; @@ -1634,7 +1634,7 @@ void KFontSizeAction::init() setItems( lst ); } -void KFontSizeAction::setFontSize( int size ) +void TDEFontSizeAction::setFontSize( int size ) { if ( size == fontSize() ) { setCurrentItem( items().findIndex( TQString::number( size ) ) ); @@ -1642,7 +1642,7 @@ void KFontSizeAction::setFontSize( int size ) } if ( size < 1 ) { - kdWarning() << "KFontSizeAction: Size " << size << " is out of range" << endl; + kdWarning() << "TDEFontSizeAction: Size " << size << " is out of range" << endl; return; } @@ -1662,7 +1662,7 @@ void KFontSizeAction::setFontSize( int size ) TQStringList strLst; for (TQValueList::Iterator it = lst.begin() ; it != lst.end() ; ++it) strLst.append( TQString::number(*it) ); - KSelectAction::setItems( strLst ); + TDESelectAction::setItems( strLst ); // Find new current item index = lst.findIndex( size ); setCurrentItem( index ); @@ -1671,130 +1671,130 @@ void KFontSizeAction::setFontSize( int size ) setCurrentItem( index ); - //emit KAction::activated(); + //emit TDEAction::activated(); //emit activated( index ); //emit activated( TQString::number( size ) ); //emit fontSizeChanged( size ); } -int KFontSizeAction::fontSize() const +int TDEFontSizeAction::fontSize() const { return currentText().toInt(); } -void KFontSizeAction::slotActivated( int index ) +void TDEFontSizeAction::slotActivated( int index ) { - KSelectAction::slotActivated( index ); + TDESelectAction::slotActivated( index ); emit fontSizeChanged( items()[ index ].toInt() ); } -void KFontSizeAction::slotActivated( const TQString& size ) +void TDEFontSizeAction::slotActivated( const TQString& size ) { setFontSize( size.toInt() ); // insert sorted first - KSelectAction::slotActivated( size ); + TDESelectAction::slotActivated( size ); emit fontSizeChanged( size.toInt() ); } -class KActionMenu::KActionMenuPrivate +class TDEActionMenu::TDEActionMenuPrivate { public: - KActionMenuPrivate() + TDEActionMenuPrivate() { - m_popup = new KPopupMenu(0L,"KActionMenu::KActionMenuPrivate"); + m_popup = new TDEPopupMenu(0L,"TDEActionMenu::TDEActionMenuPrivate"); m_delayed = true; m_stickyMenu = true; } - ~KActionMenuPrivate() + ~TDEActionMenuPrivate() { delete m_popup; m_popup = 0; } - KPopupMenu *m_popup; + TDEPopupMenu *m_popup; bool m_delayed; bool m_stickyMenu; }; -KActionMenu::KActionMenu( TQObject* parent, const char* name ) - : KAction( parent, name ) +TDEActionMenu::TDEActionMenu( TQObject* parent, const char* name ) + : TDEAction( parent, name ) { - d = new KActionMenuPrivate; + d = new TDEActionMenuPrivate; setShortcutConfigurable( false ); } -KActionMenu::KActionMenu( const TQString& text, TQObject* parent, +TDEActionMenu::TDEActionMenu( const TQString& text, TQObject* parent, const char* name ) - : KAction( text, 0, parent, name ) + : TDEAction( text, 0, parent, name ) { - d = new KActionMenuPrivate; + d = new TDEActionMenuPrivate; setShortcutConfigurable( false ); } -KActionMenu::KActionMenu( const TQString& text, const TQIconSet& icon, +TDEActionMenu::TDEActionMenu( const TQString& text, const TQIconSet& icon, TQObject* parent, const char* name ) - : KAction( text, icon, 0, parent, name ) + : TDEAction( text, icon, 0, parent, name ) { - d = new KActionMenuPrivate; + d = new TDEActionMenuPrivate; setShortcutConfigurable( false ); } -KActionMenu::KActionMenu( const TQString& text, const TQString& icon, +TDEActionMenu::TDEActionMenu( const TQString& text, const TQString& icon, TQObject* parent, const char* name ) - : KAction( text, icon, 0, parent, name ) + : TDEAction( text, icon, 0, parent, name ) { - d = new KActionMenuPrivate; + d = new TDEActionMenuPrivate; setShortcutConfigurable( false ); } -KActionMenu::~KActionMenu() +TDEActionMenu::~TDEActionMenu() { unplugAll(); - kdDebug(129) << "KActionMenu::~KActionMenu()" << endl; // ellis + kdDebug(129) << "TDEActionMenu::~TDEActionMenu()" << endl; // ellis delete d; d = 0; } -void KActionMenu::popup( const TQPoint& global ) +void TDEActionMenu::popup( const TQPoint& global ) { popupMenu()->popup( global ); } -KPopupMenu* KActionMenu::popupMenu() const +TDEPopupMenu* TDEActionMenu::popupMenu() const { return d->m_popup; } -void KActionMenu::insert( KAction* cmd, int index ) +void TDEActionMenu::insert( TDEAction* cmd, int index ) { if ( cmd ) cmd->plug( d->m_popup, index ); } -void KActionMenu::remove( KAction* cmd ) +void TDEActionMenu::remove( TDEAction* cmd ) { if ( cmd ) cmd->unplug( d->m_popup ); } -bool KActionMenu::delayed() const { +bool TDEActionMenu::delayed() const { return d->m_delayed; } -void KActionMenu::setDelayed(bool _delayed) { +void TDEActionMenu::setDelayed(bool _delayed) { d->m_delayed = _delayed; } -bool KActionMenu::stickyMenu() const { +bool TDEActionMenu::stickyMenu() const { return d->m_stickyMenu; } -void KActionMenu::setStickyMenu(bool sticky) { +void TDEActionMenu::setStickyMenu(bool sticky) { d->m_stickyMenu = sticky; } -int KActionMenu::plug( TQWidget* widget, int index ) +int TDEActionMenu::plug( TQWidget* widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - kdDebug(129) << "KActionMenu::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis + kdDebug(129) << "TDEActionMenu::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis if ( ::tqqt_cast( widget ) ) { TQPopupMenu* menu = static_cast( widget ); @@ -1815,11 +1815,11 @@ int KActionMenu::plug( TQWidget* widget, int index ) return containerCount() - 1; } - else if ( ::tqqt_cast( widget ) ) + else if ( ::tqqt_cast( widget ) ) { - KToolBar *bar = static_cast( widget ); + TDEToolBar *bar = static_cast( widget ); - int id_ = KAction::getToolButtonID(); + int id_ = TDEAction::getToolButtonID(); if ( icon().isEmpty() && !iconSet().isNull() ) bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( clicked() ), this, @@ -1879,74 +1879,74 @@ int KActionMenu::plug( TQWidget* widget, int index ) //////// -KToolBarPopupAction::KToolBarPopupAction( const TQString& text, +TDEToolBarPopupAction::TDEToolBarPopupAction( const TQString& text, const TQString& icon, - const KShortcut& cut, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, icon, cut, parent, name ) + : TDEAction( text, icon, cut, parent, name ) { m_popup = 0; m_delayed = true; m_stickyMenu = true; } -KToolBarPopupAction::KToolBarPopupAction( const TQString& text, +TDEToolBarPopupAction::TDEToolBarPopupAction( const TQString& text, const TQString& icon, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, icon, cut, receiver, slot, parent, name ) + : TDEAction( text, icon, cut, receiver, slot, parent, name ) { m_popup = 0; m_delayed = true; m_stickyMenu = true; } -KToolBarPopupAction::KToolBarPopupAction( const KGuiItem& item, - const KShortcut& cut, +TDEToolBarPopupAction::TDEToolBarPopupAction( const KGuiItem& item, + const TDEShortcut& cut, const TQObject* receiver, - const char* slot, KActionCollection* parent, + const char* slot, TDEActionCollection* parent, const char* name ) - : KAction( item, cut, receiver, slot, parent, name ) + : TDEAction( item, cut, receiver, slot, parent, name ) { m_popup = 0; m_delayed = true; m_stickyMenu = true; } -KToolBarPopupAction::~KToolBarPopupAction() +TDEToolBarPopupAction::~TDEToolBarPopupAction() { delete m_popup; } -bool KToolBarPopupAction::delayed() const { +bool TDEToolBarPopupAction::delayed() const { return m_delayed; } -void KToolBarPopupAction::setDelayed(bool delayed) { +void TDEToolBarPopupAction::setDelayed(bool delayed) { m_delayed = delayed; } -bool KToolBarPopupAction::stickyMenu() const { +bool TDEToolBarPopupAction::stickyMenu() const { return m_stickyMenu; } -void KToolBarPopupAction::setStickyMenu(bool sticky) { +void TDEToolBarPopupAction::setStickyMenu(bool sticky) { m_stickyMenu = sticky; } -int KToolBarPopupAction::plug( TQWidget *widget, int index ) +int TDEToolBarPopupAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - // This is very related to KActionMenu::plug. - // In fact this class could be an interesting base class for KActionMenu - if ( ::tqqt_cast( widget ) ) + // This is very related to TDEActionMenu::plug. + // In fact this class could be an interesting base class for TDEActionMenu + if ( ::tqqt_cast( widget ) ) { - KToolBar *bar = (KToolBar *)widget; + TDEToolBar *bar = (TDEToolBar *)widget; - int id_ = KAction::getToolButtonID(); + int id_ = TDEAction::getToolButtonID(); if ( icon().isEmpty() && !iconSet().isNull() ) { bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( buttonClicked(int, TQt::ButtonState) ), this, @@ -1982,42 +1982,42 @@ int KToolBarPopupAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - return KAction::plug( widget, index ); + return TDEAction::plug( widget, index ); } -KPopupMenu *KToolBarPopupAction::popupMenu() const +TDEPopupMenu *TDEToolBarPopupAction::popupMenu() const { if ( !m_popup ) { - KToolBarPopupAction *that = const_cast(this); - that->m_popup = new KPopupMenu; + TDEToolBarPopupAction *that = const_cast(this); + that->m_popup = new TDEPopupMenu; } return m_popup; } //////// -KToggleToolBarAction::KToggleToolBarAction( const char* toolBarName, - const TQString& text, KActionCollection* parent, const char* name ) - : KToggleAction( text, KShortcut(), parent, name ) +TDEToggleToolBarAction::TDEToggleToolBarAction( const char* toolBarName, + const TQString& text, TDEActionCollection* parent, const char* name ) + : TDEToggleAction( text, TDEShortcut(), parent, name ) , m_toolBarName( toolBarName ) , m_toolBar( 0L ) { } -KToggleToolBarAction::KToggleToolBarAction( KToolBar *toolBar, const TQString &text, - KActionCollection *parent, const char *name ) - : KToggleAction( text, KShortcut(), parent, name ) +TDEToggleToolBarAction::TDEToggleToolBarAction( TDEToolBar *toolBar, const TQString &text, + TDEActionCollection *parent, const char *name ) + : TDEToggleAction( text, TDEShortcut(), parent, name ) , m_toolBarName( 0 ), m_toolBar( toolBar ) { } -KToggleToolBarAction::~KToggleToolBarAction() +TDEToggleToolBarAction::~TDEToggleToolBarAction() { } -int KToggleToolBarAction::plug( TQWidget* w, int index ) +int TDEToggleToolBarAction::plug( TQWidget* w, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; if ( !m_toolBar ) { @@ -2027,7 +2027,7 @@ int KToggleToolBarAction::plug( TQWidget* w, int index ) while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store tl = n; - KMainWindow * mw = tqt_dynamic_cast(tl); // try to see if it's a kmainwindow + TDEMainWindow * mw = tqt_dynamic_cast(tl); // try to see if it's a kmainwindow if ( mw ) m_toolBar = mw->toolBar( m_toolBarName ); @@ -2042,10 +2042,10 @@ int KToggleToolBarAction::plug( TQWidget* w, int index ) setEnabled( false ); } - return KToggleAction::plug( w, index ); + return TDEToggleAction::plug( w, index ); } -void KToggleToolBarAction::setChecked( bool c ) +void TDEToggleToolBarAction::setChecked( bool c ) { if( m_toolBar && c != m_toolBar->isVisible() ) { if( c ) { @@ -2054,29 +2054,29 @@ void KToggleToolBarAction::setChecked( bool c ) m_toolBar->hide(); } TQMainWindow* mw = m_toolBar->mainWindow(); - if ( mw && ::tqqt_cast( mw ) ) - static_cast( mw )->setSettingsDirty(); + if ( mw && ::tqqt_cast( mw ) ) + static_cast( mw )->setSettingsDirty(); } - KToggleAction::setChecked( c ); + TDEToggleAction::setChecked( c ); } //////// -KToggleFullScreenAction::KToggleFullScreenAction( const KShortcut &cut, +TDEToggleFullScreenAction::TDEToggleFullScreenAction( const TDEShortcut &cut, const TQObject* receiver, const char* slot, TQObject* parent, TQWidget* window, const char* name ) - : KToggleAction( TQString::null, cut, receiver, slot, parent, name ), + : TDEToggleAction( TQString::null, cut, receiver, slot, parent, name ), window( NULL ) { setWindow( window ); } -KToggleFullScreenAction::~KToggleFullScreenAction() +TDEToggleFullScreenAction::~TDEToggleFullScreenAction() { } -void KToggleFullScreenAction::setWindow( TQWidget* w ) +void TDEToggleFullScreenAction::setWindow( TQWidget* w ) { if( window ) window->removeEventFilter( this ); @@ -2085,7 +2085,7 @@ void KToggleFullScreenAction::setWindow( TQWidget* w ) window->installEventFilter( this ); } -void KToggleFullScreenAction::setChecked( bool c ) +void TDEToggleFullScreenAction::setChecked( bool c ) { if (c) { @@ -2097,10 +2097,10 @@ void KToggleFullScreenAction::setChecked( bool c ) setText(i18n("F&ull Screen Mode")); setIcon("window_fullscreen"); } - KToggleAction::setChecked( c ); + TDEToggleAction::setChecked( c ); } -bool KToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e ) +bool TDEToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e ) { if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(window) ) if( e->type() == TQEvent::WindowStateChange ) @@ -2114,10 +2114,10 @@ bool KToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e ) //////// KWidgetAction::KWidgetAction( TQWidget* widget, - const TQString& text, const KShortcut& cut, + const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) - : KAction( text, cut, receiver, slot, parent, name ) + TDEActionCollection* parent, const char* name ) + : TDEAction( text, cut, receiver, slot, parent, name ) , m_widget( widget ) , m_autoSized( false ) { @@ -2138,7 +2138,7 @@ void KWidgetAction::setAutoSized( bool autoSized ) if( !m_widget || !isPlugged() ) return; - KToolBar* toolBar = (KToolBar*)m_widget->parent(); + TDEToolBar* toolBar = (TDEToolBar*)m_widget->parent(); int i = findContainer( toolBar ); if ( i == -1 ) return; @@ -2149,11 +2149,11 @@ void KWidgetAction::setAutoSized( bool autoSized ) int KWidgetAction::plug( TQWidget* w, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - if ( !::tqqt_cast( w ) ) { - kdError() << "KWidgetAction::plug: KWidgetAction must be plugged into KToolBar." << endl; + if ( !::tqqt_cast( w ) ) { + kdError() << "KWidgetAction::plug: KWidgetAction must be plugged into TDEToolBar." << endl; return -1; } if ( !m_widget ) { @@ -2161,9 +2161,9 @@ int KWidgetAction::plug( TQWidget* w, int index ) return -1; } - KToolBar* toolBar = static_cast( w ); + TDEToolBar* toolBar = static_cast( w ); - int id = KAction::getToolButtonID(); + int id = TDEAction::getToolButtonID(); m_widget->reparent( toolBar, TQPoint() ); toolBar->insertWidget( id, 0, m_widget, index ); @@ -2183,13 +2183,13 @@ void KWidgetAction::unplug( TQWidget *w ) if( !m_widget || !isPlugged() ) return; - KToolBar* toolBar = (KToolBar*)m_widget->parent(); + TDEToolBar* toolBar = (TDEToolBar*)m_widget->parent(); if ( toolBar == w ) { disconnect( toolBar, TQT_SIGNAL( toolbarDestroyed() ), this, TQT_SLOT( slotToolbarDestroyed() ) ); m_widget->reparent( 0L, TQPoint(), false /*showIt*/ ); } - KAction::unplug( w ); + TDEAction::unplug( w ); } void KWidgetAction::slotToolbarDestroyed() @@ -2205,16 +2205,16 @@ void KWidgetAction::slotToolbarDestroyed() //////// -KActionSeparator::KActionSeparator( TQObject *parent, const char *name ) - : KAction( parent, name ) +TDEActionSeparator::TDEActionSeparator( TQObject *parent, const char *name ) + : TDEAction( parent, name ) { } -KActionSeparator::~KActionSeparator() +TDEActionSeparator::~TDEActionSeparator() { } -int KActionSeparator::plug( TQWidget *widget, int index ) +int TDEActionSeparator::plug( TQWidget *widget, int index ) { if ( ::tqqt_cast( widget) ) { @@ -2239,9 +2239,9 @@ int KActionSeparator::plug( TQWidget *widget, int index ) return containerCount() - 1; } - else if ( ::tqqt_cast( widget ) ) + else if ( ::tqqt_cast( widget ) ) { - KToolBar *toolBar = static_cast( widget ); + TDEToolBar *toolBar = static_cast( widget ); int id = toolBar->insertSeparator( index ); @@ -2255,40 +2255,40 @@ int KActionSeparator::plug( TQWidget *widget, int index ) return -1; } -KPasteTextAction::KPasteTextAction( const TQString& text, +TDEPasteTextAction::TDEPasteTextAction( const TQString& text, const TQString& icon, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name) - : KAction( text, icon, cut, receiver, slot, parent, name ) + : TDEAction( text, icon, cut, receiver, slot, parent, name ) { - m_popup = new KPopupMenu; + m_popup = new TDEPopupMenu; connect(m_popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(menuAboutToShow())); connect(m_popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int))); m_popup->setCheckable(true); m_mixedMode = true; } -KPasteTextAction::~KPasteTextAction() +TDEPasteTextAction::~TDEPasteTextAction() { delete m_popup; } -void KPasteTextAction::setMixedMode(bool mode) +void TDEPasteTextAction::setMixedMode(bool mode) { m_mixedMode = mode; } -int KPasteTextAction::plug( TQWidget *widget, int index ) +int TDEPasteTextAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - if ( ::tqqt_cast( widget ) ) + if ( ::tqqt_cast( widget ) ) { - KToolBar *bar = (KToolBar *)widget; + TDEToolBar *bar = (TDEToolBar *)widget; - int id_ = KAction::getToolButtonID(); + int id_ = TDEAction::getToolButtonID(); TDEInstance * instance; if ( m_parentCollection ) @@ -2312,10 +2312,10 @@ int KPasteTextAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - return KAction::plug( widget, index ); + return TDEAction::plug( widget, index ); } -void KPasteTextAction::menuAboutToShow() +void TDEPasteTextAction::menuAboutToShow() { m_popup->clear(); TQStringList list; @@ -2343,7 +2343,7 @@ void KPasteTextAction::menuAboutToShow() } } -void KPasteTextAction::menuItemActivated( int id) +void TDEPasteTextAction::menuItemActivated( int id) { DCOPClient *client = kapp->dcopClient(); if (client->isAttached() && client->isApplicationRegistered("klipper")) { @@ -2359,7 +2359,7 @@ void KPasteTextAction::menuItemActivated( int id) TQTimer::singleShot(20, this, TQT_SLOT(slotActivated())); } -void KPasteTextAction::slotActivated() +void TDEPasteTextAction::slotActivated() { if (!m_mixedMode) { TQWidget *w = tqApp->widgetAt(TQCursor::pos(), true); @@ -2367,53 +2367,53 @@ void KPasteTextAction::slotActivated() if (!data->provides("text/plain") && w) { m_popup->popup(w->mapToGlobal(TQPoint(0, w->height()))); } else - KAction::slotActivated(); + TDEAction::slotActivated(); } else - KAction::slotActivated(); + TDEAction::slotActivated(); } -void KToggleAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEToggleAction::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KRadioAction::virtual_hook( int id, void* data ) -{ KToggleAction::virtual_hook( id, data ); } +void TDERadioAction::virtual_hook( int id, void* data ) +{ TDEToggleAction::virtual_hook( id, data ); } -void KSelectAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDESelectAction::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KListAction::virtual_hook( int id, void* data ) -{ KSelectAction::virtual_hook( id, data ); } +void TDEListAction::virtual_hook( int id, void* data ) +{ TDESelectAction::virtual_hook( id, data ); } -void KRecentFilesAction::virtual_hook( int id, void* data ) -{ KListAction::virtual_hook( id, data ); } +void TDERecentFilesAction::virtual_hook( int id, void* data ) +{ TDEListAction::virtual_hook( id, data ); } -void KFontAction::virtual_hook( int id, void* data ) -{ KSelectAction::virtual_hook( id, data ); } +void TDEFontAction::virtual_hook( int id, void* data ) +{ TDESelectAction::virtual_hook( id, data ); } -void KFontSizeAction::virtual_hook( int id, void* data ) -{ KSelectAction::virtual_hook( id, data ); } +void TDEFontSizeAction::virtual_hook( int id, void* data ) +{ TDESelectAction::virtual_hook( id, data ); } -void KActionMenu::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEActionMenu::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KToolBarPopupAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEToolBarPopupAction::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KToggleToolBarAction::virtual_hook( int id, void* data ) -{ KToggleAction::virtual_hook( id, data ); } +void TDEToggleToolBarAction::virtual_hook( int id, void* data ) +{ TDEToggleAction::virtual_hook( id, data ); } -void KToggleFullScreenAction::virtual_hook( int id, void* data ) -{ KToggleAction::virtual_hook( id, data ); } +void TDEToggleFullScreenAction::virtual_hook( int id, void* data ) +{ TDEToggleAction::virtual_hook( id, data ); } void KWidgetAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +{ TDEAction::virtual_hook( id, data ); } -void KActionSeparator::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEActionSeparator::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KPasteTextAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEPasteTextAction::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } /* vim: et sw=2 ts=2 */ diff --git a/tdeui/kactionclasses.h b/tdeui/kactionclasses.h index ec63cd36b..07078a722 100644 --- a/tdeui/kactionclasses.h +++ b/tdeui/kactionclasses.h @@ -44,18 +44,18 @@ class TQComboBox; class TQPoint; class TQIconSet; class TQString; -class KToolBar; +class TDEToolBar; -class KAccel; -class KAccelActions; +class TDEAccel; +class TDEAccelActions; class TDEConfig; class TDEConfigBase; class KURL; class TDEInstance; -class KToolBar; -class KActionCollection; -class KPopupMenu; -class KMainWindow; +class TDEToolBar; +class TDEActionCollection; +class TDEPopupMenu; +class TDEMainWindow; /** * @short Checkbox like action. @@ -65,7 +65,7 @@ class KMainWindow; * This action provides two states: checked or not. * */ -class TDEUI_EXPORT KToggleAction : public KAction +class TDEUI_EXPORT TDEToggleAction : public TDEAction { Q_OBJECT @@ -83,7 +83,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 ); + TDEToggleAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @param text The text that will be displayed. @@ -93,7 +93,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const KShortcut& cut, + TDEToggleAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -103,7 +103,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEToggleAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -113,7 +113,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEToggleAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -125,7 +125,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEToggleAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -137,7 +137,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEToggleAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -145,12 +145,12 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( TQObject* parent = 0, const char* name = 0 ); + TDEToggleAction( TQObject* parent = 0, const char* name = 0 ); /** * Destructor */ - virtual ~KToggleAction(); + virtual ~TDEToggleAction(); /** * "Plug" or insert this action into a given widget. @@ -158,7 +158,7 @@ public: * This will typically be a menu or a toolbar. From this point * on, you will never need to directly manipulate the item in the * menu or toolbar. You do all enabling/disabling/manipulation - * directly with your KToggleAction object. + * directly with your TDEToggleAction object. * * @param widget The GUI element to display this action. * @param index The index of the item. @@ -218,8 +218,8 @@ signals: protected: virtual void virtual_hook( int id, void* data ); private: - class KToggleActionPrivate; - KToggleActionPrivate *d; + class TDEToggleActionPrivate; + TDEToggleActionPrivate *d; }; /** @@ -228,7 +228,7 @@ private: * An action that operates like a radio button. At any given time * only a single action from the group will be active. */ -class TDEUI_EXPORT KRadioAction : public KToggleAction +class TDEUI_EXPORT TDERadioAction : public TDEToggleAction { Q_OBJECT @@ -243,7 +243,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 ); + TDERadioAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @param text The text that will be displayed. @@ -253,7 +253,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const KShortcut& cut, + TDERadioAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -263,7 +263,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDERadioAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -273,7 +273,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDERadioAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -285,7 +285,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDERadioAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -297,7 +297,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDERadioAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -305,7 +305,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( TQObject* parent = 0, const char* name = 0 ); + TDERadioAction( TQObject* parent = 0, const char* name = 0 ); protected: virtual void slotActivated(); @@ -313,8 +313,8 @@ protected: protected: virtual void virtual_hook( int id, void* data ); private: - class KRadioActionPrivate; - KRadioActionPrivate *d; + class TDERadioActionPrivate; + TDERadioActionPrivate *d; }; /** @@ -328,7 +328,7 @@ private: * the formerly checked item becomes unchecked. * There can be only one item checked at a time. */ -class TDEUI_EXPORT KSelectAction : public KAction +class TDEUI_EXPORT TDESelectAction : public TDEAction { Q_OBJECT @@ -350,7 +350,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 ); + TDESelectAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @param text The text that will be displayed. @@ -360,7 +360,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const KShortcut& cut, + TDESelectAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -370,7 +370,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDESelectAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -380,7 +380,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDESelectAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -392,7 +392,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDESelectAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -404,7 +404,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDESelectAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -412,12 +412,12 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( TQObject* parent = 0, const char* name = 0 ); + TDESelectAction( TQObject* parent = 0, const char* name = 0 ); /** * Destructor */ - virtual ~KSelectAction(); + virtual ~TDESelectAction(); /** * "Plug" or insert this action into a given widget. @@ -425,7 +425,7 @@ public: * This will typically be a menu or a toolbar. * From this point on, you will never need to directly * manipulate the item in the menu or toolbar. - * You do all enabling/disabling/manipulation directly with your KSelectAction object. + * You do all enabling/disabling/manipulation directly with your TDESelectAction object. * * @param widget The GUI element to display this action. * @param index The index of the item. @@ -572,16 +572,16 @@ protected: virtual void virtual_hook( int id, void* data ); private: void setupMenu() const; - class KSelectActionPrivate; - KSelectActionPrivate *d; + class TDESelectActionPrivate; + TDESelectActionPrivate *d; }; -/// Remove this class in KDE-4.0. It doesn't add _anything_ to KSelectAction +/// Remove this class in KDE-4.0. It doesn't add _anything_ to TDESelectAction /** - * @deprecated Use KSelectAction instead. + * @deprecated Use TDESelectAction instead. */ -class TDEUI_EXPORT_DEPRECATED KListAction : public KSelectAction +class TDEUI_EXPORT_DEPRECATED TDEListAction : public TDESelectAction { Q_OBJECT @@ -596,7 +596,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, + TDEListAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -607,7 +607,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const KShortcut& cut, const TQObject* receiver, + TDEListAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -617,7 +617,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEListAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -627,7 +627,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEListAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -639,7 +639,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEListAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -652,7 +652,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEListAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -660,12 +660,12 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( TQObject* parent = 0, const char* name = 0 ); + TDEListAction( TQObject* parent = 0, const char* name = 0 ); /** * Destructor */ - virtual ~KListAction(); + virtual ~TDEListAction(); virtual TQString currentText() const; @@ -683,8 +683,8 @@ public slots: protected: virtual void virtual_hook( int id, void* data ); private: - class KListActionPrivate; - KListActionPrivate *d; + class TDEListActionPrivate; + TDEListActionPrivate *d; }; /** @@ -697,7 +697,7 @@ private: * * @author Michael Koch */ -class TDEUI_EXPORT KRecentFilesAction : public KListAction // TODO public KSelectAction +class TDEUI_EXPORT TDERecentFilesAction : public TDEListAction // TODO public TDESelectAction { Q_OBJECT @@ -710,7 +710,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -724,7 +724,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -737,7 +737,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -749,7 +749,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -764,7 +764,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -780,7 +780,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -790,13 +790,13 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( TQObject* parent = 0, const char* name = 0, + TDERecentFilesAction( TQObject* parent = 0, const char* name = 0, uint maxItems = 10 ); /** * Destructor. */ - virtual ~KRecentFilesAction(); + virtual ~TDERecentFilesAction(); virtual int plug( TQWidget *widget, int index = -1 ); @@ -903,44 +903,44 @@ protected: private: void init(); - class KRecentFilesActionPrivate; - KRecentFilesActionPrivate *d; + class TDERecentFilesActionPrivate; + TDERecentFilesActionPrivate *d; }; -class TDEUI_EXPORT KFontAction : public KSelectAction +class TDEUI_EXPORT TDEFontAction : public TDESelectAction { Q_OBJECT TQ_PROPERTY( TQString font READ font WRITE setFont ) public: - KFontAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, + TDEFontAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( const TQString& text, const KShortcut& cut, + TDEFontAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEFontAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEFontAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEFontAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEFontAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); // The ctors with fontListCriteria were added after 3.3-beta1. // This define is used in koffice. Remove when koffice has a dependency on tdelibs-3.3 or more. #define KFONTACTION_HAS_CRITERIA_ARG - KFontAction( uint fontListCriteria, const TQString& text, - const KShortcut& cut = KShortcut(), TQObject* parent = 0, + TDEFontAction( uint fontListCriteria, const TQString& text, + const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( uint fontListCriteria, const TQString& text, const TQString& pix, - const KShortcut& cut = KShortcut(), + TDEFontAction( uint fontListCriteria, const TQString& text, const TQString& pix, + const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( TQObject* parent = 0, const char* name = 0 ); - ~KFontAction(); + TDEFontAction( TQObject* parent = 0, const char* name = 0 ); + ~TDEFontAction(); TQString font() const { return currentText(); @@ -954,33 +954,33 @@ public slots: protected: virtual void virtual_hook( int id, void* data ); private: - class KFontActionPrivate; - KFontActionPrivate *d; + class TDEFontActionPrivate; + TDEFontActionPrivate *d; }; -class TDEUI_EXPORT KFontSizeAction : public KSelectAction +class TDEUI_EXPORT TDEFontSizeAction : public TDESelectAction { Q_OBJECT TQ_PROPERTY( int fontSize READ fontSize WRITE setFontSize ) public: - KFontSizeAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, + TDEFontSizeAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontSizeAction( const TQString& text, const KShortcut& cut, const TQObject* receiver, + TDEFontSizeAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontSizeAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEFontSizeAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontSizeAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEFontSizeAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontSizeAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEFontSizeAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontSizeAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEFontSizeAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontSizeAction( TQObject* parent = 0, const char* name = 0 ); + TDEFontSizeAction( TQObject* parent = 0, const char* name = 0 ); - virtual ~KFontSizeAction(); + virtual ~TDEFontSizeAction(); virtual int fontSize() const; @@ -990,7 +990,7 @@ public slots: protected slots: virtual void slotActivated( int ); virtual void slotActivated( const TQString& ); - virtual void slotActivated() { KAction::slotActivated(); } + virtual void slotActivated() { TDEAction::slotActivated(); } signals: void fontSizeChanged( int ); @@ -1002,22 +1002,22 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KFontSizeActionPrivate; - KFontSizeActionPrivate *d; + class TDEFontSizeActionPrivate; + TDEFontSizeActionPrivate *d; }; /** - * A KActionMenu is an action that holds a sub-menu of other actions. + * A TDEActionMenu is an action that holds a sub-menu of other actions. * insert() and remove() allow to insert and remove actions into this action-menu. * Plugged in a popupmenu, it will create a submenu. * Plugged in a toolbar, it will create a button with a popup menu. * * This is the action used by the XMLGUI since it holds other actions. - * If you want a submenu for selecting one tool among many (without icons), see KSelectAction. + * If you want a submenu for selecting one tool among many (without icons), see TDESelectAction. * See also setDelayed about the main action. */ -class TDEUI_EXPORT KActionMenu : public KAction +class TDEUI_EXPORT TDEActionMenu : public TDEAction { Q_OBJECT @@ -1025,29 +1025,29 @@ class TDEUI_EXPORT KActionMenu : public KAction TQ_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu ) public: - KActionMenu( const TQString& text, TQObject* parent = 0, + TDEActionMenu( const TQString& text, TQObject* parent = 0, const char* name = 0 ); - KActionMenu( const TQString& text, const TQIconSet& icon, + TDEActionMenu( const TQString& text, const TQIconSet& icon, TQObject* parent = 0, const char* name = 0 ); - KActionMenu( const TQString& text, const TQString& icon, + TDEActionMenu( const TQString& text, const TQString& icon, TQObject* parent = 0, const char* name = 0 ); - KActionMenu( TQObject* parent = 0, const char* name = 0 ); - virtual ~KActionMenu(); + TDEActionMenu( TQObject* parent = 0, const char* name = 0 ); + virtual ~TDEActionMenu(); - virtual void insert( KAction*, int index = -1 ); - virtual void remove( KAction* ); + virtual void insert( TDEAction*, int index = -1 ); + virtual void remove( TDEAction* ); - KPopupMenu* popupMenu() const; + TDEPopupMenu* popupMenu() const; void popup( const TQPoint& global ); /** * Returns true if this action creates a delayed popup menu - * when plugged in a KToolbar. + * when plugged in a TDEToolbar. */ bool delayed() const; /** * If set to true, this action will create a delayed popup menu - * when plugged in a KToolbar. Otherwise it creates a normal popup. + * when plugged in a TDEToolbar. Otherwise it creates a normal popup. * Default: delayed * * Remember that if the "main" action (the toolbar button itself) @@ -1056,7 +1056,7 @@ public: * On the opposite, if the main action can be clicked, it can only happen * in a toolbar: in a menu, the parent of a submenu can't be activated. * To get a "normal" menu item when plugged a menu (and no submenu) - * use KToolBarPopupAction. + * use TDEToolBarPopupAction. */ void setDelayed(bool _delayed); @@ -1067,7 +1067,7 @@ public: bool stickyMenu() const; /** * If set to true, this action will create a sticky popup menu - * when plugged in a KToolbar. + * when plugged in a TDEToolbar. * "Sticky", means it's visible until a selection is made or the mouse is * clicked elsewhere. This feature allows you to make a selection without * having to press and hold down the mouse while making a selection. @@ -1080,8 +1080,8 @@ public: protected: virtual void virtual_hook( int id, void* data ); private: - class KActionMenuPrivate; - KActionMenuPrivate *d; + class TDEActionMenuPrivate; + TDEActionMenuPrivate *d; }; /** @@ -1091,7 +1091,7 @@ private: * that has more detail in a toolbar than in a menu (e.g. tool chooser * with "Other" leading to a dialog...). */ -class TDEUI_EXPORT KToolBarPopupAction : public KAction +class TDEUI_EXPORT TDEToolBarPopupAction : public TDEAction { Q_OBJECT @@ -1102,7 +1102,7 @@ public: //Not all constructors - because we need an icon, since this action only makes // sense when being plugged at least in a toolbar. /** - * Create a KToolBarPopupAction, with a text, an icon, an optional accelerator, + * Create a TDEToolBarPopupAction, with a text, an icon, an optional accelerator, * parent and name. * * @param text The text that will be displayed. @@ -1111,11 +1111,11 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarPopupAction( const TQString& text, const TQString& icon, const KShortcut& cut = KShortcut(), + TDEToolBarPopupAction( const TQString& text, const TQString& icon, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** - * Create a KToolBarPopupAction, with a text, an icon, an accelerator, + * Create a TDEToolBarPopupAction, with a text, an icon, an accelerator, * a slot connected to the action, parent and name. * * If you do not want or have a keyboard accelerator, set the @@ -1129,12 +1129,12 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarPopupAction( const TQString& text, const TQString& icon, const KShortcut& cut, + TDEToolBarPopupAction( const TQString& text, const TQString& icon, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent = 0, const char* name = 0 ); /** - * Create a KToolBarPopupAction, with a KGuiItem, an accelerator, + * Create a TDEToolBarPopupAction, with a KGuiItem, an accelerator, * a slot connected to the action, parent and name. The text and the * icon are taken from the KGuiItem. * @@ -1148,11 +1148,11 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarPopupAction( const KGuiItem& item, const KShortcut& cut, + TDEToolBarPopupAction( const KGuiItem& item, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); - virtual ~KToolBarPopupAction(); + virtual ~TDEToolBarPopupAction(); virtual int plug( TQWidget *widget, int index = -1 ); @@ -1161,16 +1161,16 @@ public: * button. You may want to plug items into it on creation, or connect to * aboutToShow for a more dynamic menu. */ - KPopupMenu *popupMenu() const; + TDEPopupMenu *popupMenu() const; /** * Returns true if this action creates a delayed popup menu - * when plugged in a KToolbar. + * when plugged in a TDEToolbar. */ bool delayed() const; /** * If set to true, this action will create a delayed popup menu - * when plugged in a KToolbar. Otherwise it creates a normal popup. + * when plugged in a TDEToolbar. Otherwise it creates a normal popup. * Default: delayed. */ void setDelayed(bool delayed); @@ -1181,7 +1181,7 @@ public: bool stickyMenu() const; /** * If set to true, this action will create a sticky popup menu - * when plugged in a KToolbar. + * when plugged in a TDEToolbar. * "Sticky", means it's visible until a selection is made or the mouse is * clicked elsewhere. This feature allows you to make a selection without * having to press and hold down the mouse while making a selection. @@ -1191,14 +1191,14 @@ public: void setStickyMenu(bool sticky); private: - KPopupMenu *m_popup; + TDEPopupMenu *m_popup; bool m_delayed:1; bool m_stickyMenu:1; protected: virtual void virtual_hook( int id, void* data ); private: - class KToolBarPopupActionPrivate; - KToolBarPopupActionPrivate *d; + class TDEToolBarPopupActionPrivate; + TDEToolBarPopupActionPrivate *d; }; /** @@ -1214,38 +1214,38 @@ private: * visibility has changed, whenever it changes. * @since 3.1 */ -class TDEUI_EXPORT KToggleToolBarAction : public KToggleAction +class TDEUI_EXPORT TDEToggleToolBarAction : public TDEToggleAction { Q_OBJECT public: /** - * Create a KToggleToolbarAction that manages the toolbar + * Create a TDEToggleToolbarAction that manages the toolbar * named toolBarName. This can be either the name of a * toolbar in an xml ui file, or a toolbar programmatically * created with that name. */ - KToggleToolBarAction( const char* toolBarName, const TQString& text, - KActionCollection* parent, const char* name ); - KToggleToolBarAction( KToolBar *toolBar, const TQString &text, - KActionCollection *parent, const char *name ); - virtual ~KToggleToolBarAction(); + TDEToggleToolBarAction( const char* toolBarName, const TQString& text, + TDEActionCollection* parent, const char* name ); + TDEToggleToolBarAction( TDEToolBar *toolBar, const TQString &text, + TDEActionCollection *parent, const char *name ); + virtual ~TDEToggleToolBarAction(); virtual int plug( TQWidget * widget, int index = -1 ); - KToolBar *toolBar() { return m_toolBar; } + TDEToolBar *toolBar() { return m_toolBar; } public slots: virtual void setChecked( bool ); private: TQCString m_toolBarName; - TQGuardedPtr m_toolBar; + TQGuardedPtr m_toolBar; protected: virtual void virtual_hook( int id, void* data ); private: - class KToggleToolBarActionPrivate; - KToggleToolBarActionPrivate *d; + class TDEToggleToolBarActionPrivate; + TDEToggleToolBarActionPrivate *d; }; /** @@ -1261,13 +1261,13 @@ private: * still needs to explicitly set the window state though. * @since 3.2 */ -class TDEUI_EXPORT KToggleFullScreenAction : public KToggleAction +class TDEUI_EXPORT TDEToggleFullScreenAction : public TDEToggleAction { Q_OBJECT public: /** - * Create a KToggleFullScreenAction + * Create a TDEToggleFullScreenAction * @param cut The corresponding keyboard accelerator (shortcut). * @param receiver The SLOT's parent. * @param slot The TQT_SLOT to invoke to execute this action. @@ -1275,11 +1275,11 @@ public: * @param window the window that will switch to/from full screen mode * @param name An internal name for this action. */ - KToggleFullScreenAction( const KShortcut &cut, + TDEToggleFullScreenAction( const TDEShortcut &cut, const TQObject* receiver, const char* slot, TQObject* parent, TQWidget* window, const char* name ); - virtual ~KToggleFullScreenAction(); + virtual ~TDEToggleFullScreenAction(); /** * Sets the window that will be related to this action. @@ -1297,8 +1297,8 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KToggleFullScreenActionPrivate; - KToggleFullScreenActionPrivate *d; + class TDEToggleFullScreenActionPrivate; + TDEToggleFullScreenActionPrivate *d; }; @@ -1306,7 +1306,7 @@ private: * An action that automatically embeds a widget into a * toolbar. */ -class TDEUI_EXPORT KWidgetAction : public KAction +class TDEUI_EXPORT KWidgetAction : public TDEAction { Q_OBJECT @@ -1317,9 +1317,9 @@ public: * a toolbar. */ KWidgetAction( TQWidget* widget, const TQString& text, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); virtual ~KWidgetAction(); /** @@ -1331,7 +1331,7 @@ public: /** * Plug the action. The widget passed to the constructor - * will be reparented to w, which must inherit KToolBar. + * will be reparented to w, which must inherit TDEToolBar. */ virtual int plug( TQWidget* widget, int index = -1 ); /** @@ -1351,21 +1351,21 @@ private: KWidgetActionPrivate *d; }; -class TDEUI_EXPORT KActionSeparator : public KAction +class TDEUI_EXPORT TDEActionSeparator : public TDEAction { Q_OBJECT public: - KActionSeparator( TQObject* parent = 0, const char* name = 0 ); - virtual ~KActionSeparator(); + TDEActionSeparator( TQObject* parent = 0, const char* name = 0 ); + virtual ~TDEActionSeparator(); virtual int plug( TQWidget *widget, int index = -1 ); protected: virtual void virtual_hook( int id, void* data ); private: - class KActionSeparatorPrivate; - KActionSeparatorPrivate *d; + class TDEActionSeparatorPrivate; + TDEActionSeparatorPrivate *d; }; /** @@ -1378,13 +1378,13 @@ private: * * @since 3.2 */ -class TDEUI_EXPORT KPasteTextAction: public KAction +class TDEUI_EXPORT TDEPasteTextAction: public TDEAction { Q_OBJECT public: /** - * Create a KPasteTextAction, with a text, an icon, an accelerator, + * Create a TDEPasteTextAction, with a text, an icon, an accelerator, * a slot connected to the action, parent and name. * * If you do not want or have a keyboard accelerator, set the @@ -1398,11 +1398,11 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KPasteTextAction( const TQString& text, const TQString& icon, const KShortcut& cut, + TDEPasteTextAction( const TQString& text, const TQString& icon, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent = 0, const char* name = 0 ); - virtual ~KPasteTextAction(); + virtual ~TDEPasteTextAction(); /** * Controls the behavior of the clipboard history menu popup. @@ -1427,10 +1427,10 @@ protected: virtual void virtual_hook( int id, void* data ); private: - KPopupMenu *m_popup; + TDEPopupMenu *m_popup; bool m_mixedMode; - class KPasteTextActionPrivate; - KPasteTextActionPrivate *d; + class TDEPasteTextActionPrivate; + TDEPasteTextActionPrivate *d; }; #endif 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 #include -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 m_widgetList; - //TQValueList m_kaccelList; - TQValueList m_docList; + //TQValueList m_kaccelList; + TQValueList m_docList; TQWidget *m_widget; - KAccel *m_kaccel; - KAccel *m_builderKAccel; + TDEAccel *m_kaccel; + TDEAccel *m_builderTDEAccel; - TQAsciiDict m_actionDict; - TQPtrDict< TQPtrList > m_dctHighlightContainers; + TQAsciiDict m_actionDict; + TQPtrDict< TQPtrList > 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( 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 it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); + kdDebug(129) << "TDEActionCollection::~TDEActionCollection(): this = " << this << endl; + for ( TQAsciiDictIterator 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 it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); - pAction->removeKAccel( kaccel ); + for ( TQAsciiDictIterator 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 it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); + // Remove TDEAccel object from children. + TDEAccel* pTDEAccel = d->m_kaccelList[i]; + for ( TQAsciiDictIterator 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 it( d->m_actionDict ); + TQAsciiDictIterator 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 it( d->m_actionDict ); + TQAsciiDictIterator 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 it( d->m_actionDict ); + TQAsciiDictIterator 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 it( d->m_actionDict ); + TQAsciiDictIterator 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 it( d->m_actionDict ); + TQAsciiDictIterator 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 it( d->m_actionDict ); + TQAsciiDictIterator 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 *actionList = d->m_dctHighlightContainers[ container ]; + TQPtrList *actionList = d->m_dctHighlightContainers[ container ]; if ( !actionList ) { - actionList = new TQPtrList; + actionList = new TQPtrList; if ( ::tqqt_cast( 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( container ) ) + else if ( ::tqqt_cast( 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 *actionList = d->m_dctHighlightContainers[ container ]; + TQPtrList *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(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( const_cast(TQT_TQOBJECT_CONST(sender())) ) ); } -KAction *KActionCollection::findAction( TQWidget *container, int id ) +TDEAction *TDEActionCollection::findAction( TQWidget *container, int id ) { - TQPtrList *actionList = d->m_dctHighlightContainers[ reinterpret_cast( container ) ]; + TQPtrList *actionList = d->m_dctHighlightContainers[ reinterpret_cast( container ) ]; if ( !actionList ) return 0; - TQPtrListIterator it( *actionList ); + TQPtrListIterator 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 actions = c.actions(); - TQValueList::ConstIterator it = actions.begin(); - TQValueList::ConstIterator end = actions.end(); + TQValueList actions = c.actions(); + TQValueList::ConstIterator it = actions.begin(); + TQValueList::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 it(c.d->m_actionDict); + kdWarning(129) << "TDEActionCollection::operator+=(): function is severely deprecated." << endl; + TQAsciiDictIterator 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 diff --git a/tdeui/kactioncollection.h b/tdeui/kactioncollection.h index 35dd5dc2d..9ef517579 100644 --- a/tdeui/kactioncollection.h +++ b/tdeui/kactioncollection.h @@ -42,29 +42,29 @@ class TQComboBox; class TQPoint; class TQIconSet; class TQString; -class KToolBar; +class TDEToolBar; -class KAccel; -class KAccelActions; +class TDEAccel; +class TDEAccelActions; class TDEConfig; class TDEConfigBase; class KURL; class TDEInstance; -class KToolBar; -class KActionCollection; -class KPopupMenu; -class KMainWindow; +class TDEToolBar; +class TDEActionCollection; +class TDEPopupMenu; +class TDEMainWindow; class KXMLGUIClient; -typedef TQValueList KActionPtrList; +typedef TQValueList TDEActionPtrList; /** - * A managed set of KAction objects. + * A managed set of TDEAction objects. * - * If you set the tooltips on KActions and want the tooltip to show in statusbar + * If you set the tooltips on TDEActions and want the tooltip to show in statusbar * (recommended) then you will need to connect a couple of the actionclass signals * to the toolbar. - * The easiest way of doing this is in your KMainWindow subclass, where you create + * The easiest way of doing this is in your TDEMainWindow subclass, where you create * a statusbar, do: * * \code @@ -75,25 +75,25 @@ typedef TQValueList KActionPtrList; * statusBar(), TQT_SLOT( clear() ) ); * \endcode */ -class TDEUI_EXPORT KActionCollection : public TQObject +class TDEUI_EXPORT TDEActionCollection : public TQObject { - friend class KAction; + friend class TDEAction; friend class KXMLGUIClient; Q_OBJECT public: - KActionCollection( TQWidget *parent, const char *name = 0, TDEInstance *instance = 0 ); + TDEActionCollection( TQWidget *parent, const char *name = 0, TDEInstance *instance = 0 ); /** * Use this constructor if you want the collection's actions to restrict * their accelerator keys to @p watch rather than the @p parent. If * you don't require shortcuts, you can pass a null to the @p watch parameter. */ - KActionCollection( TQWidget *watch, TQObject* parent, const char *name = 0, TDEInstance *instance = 0 ); + TDEActionCollection( TQWidget *watch, TQObject* parent, const char *name = 0, TDEInstance *instance = 0 ); #ifndef KDE_NO_COMPAT - KActionCollection( const KActionCollection © ); + TDEActionCollection( const TDEActionCollection © ); #endif - virtual ~KActionCollection(); + virtual ~TDEActionCollection(); /** * This sets the widget to which the keyboard shortcuts should be attached. @@ -124,69 +124,69 @@ public: * would have been ScopeWidget, but that would cause some backwards * compatibility problems. */ - //void setDefaultScope( KAction::Scope ); + //void setDefaultScope( TDEAction::Scope ); /** * Doc/View model. This lets you add the action collection of a document * to a view's action collection. */ - bool addDocCollection( KActionCollection* pDoc ); + bool addDocCollection( TDEActionCollection* pDoc ); /** Returns the number of widgets which this collection is associated with. */ //uint widgetCount() const; /** - * Returns true if the collection has its own KAccel object. This will be + * Returns true if the collection has its own TDEAccel object. This will be * the case if it was constructed with a valid widget ptr or if setWidget() * was called. */ - //bool ownsKAccel() const; + //bool ownsTDEAccel() const; /** @deprecated Deprecated because of ambiguous name. Use kaccel() */ - virtual KAccel* accel() KDE_DEPRECATED; + virtual TDEAccel* accel() KDE_DEPRECATED; /** @deprecated Deprecated because of ambiguous name. Use kaccel() */ - virtual const KAccel* accel() const KDE_DEPRECATED; + virtual const TDEAccel* accel() const KDE_DEPRECATED; - /** Returns the KAccel object of the most recently set widget. */ - KAccel* kaccel(); - /** Returns the KAccel object of the most recently set widget. Const version for convenience. */ - const KAccel* kaccel() const; + /** Returns the TDEAccel object of the most recently set widget. */ + TDEAccel* kaccel(); + /** Returns the TDEAccel object of the most recently set widget. Const version for convenience. */ + const TDEAccel* kaccel() const; - /** @internal, for KAction::kaccelCurrent() */ - KAccel* builderKAccel() const; - /** Returns the KAccel object associated with widget #. */ - //KAccel* widgetKAccel( uint i ); - //const KAccel* widgetKAccel( uint i ) const; + /** @internal, for TDEAction::kaccelCurrent() */ + TDEAccel* builderTDEAccel() const; + /** Returns the TDEAccel object associated with widget #. */ + //TDEAccel* widgetTDEAccel( uint i ); + //const TDEAccel* widgetTDEAccel( uint i ) const; /** Returns the number of actions in the collection */ virtual uint count() const; bool isEmpty() const { return (count() == 0); } /** - * Return the KAction* at position "index" in the action collection. + * Return the TDEAction* at position "index" in the action collection. * @see count() */ - virtual KAction* action( int index ) const; + virtual TDEAction* action( int index ) const; /** - * Find an action (optionally, of a given subclass of KAction) in the action collection. - * @param name Name of the KAction. - * @param classname Name of the KAction subclass. - * @return A pointer to the first KAction in the collection which matches the parameters or + * Find an action (optionally, of a given subclass of TDEAction) in the action collection. + * @param name Name of the TDEAction. + * @param classname Name of the TDEAction subclass. + * @return A pointer to the first TDEAction in the collection which matches the parameters or * null if nothing matches. */ - virtual KAction* action( const char* name, const char* classname = 0 ) const; + virtual TDEAction* action( const char* name, const char* classname = 0 ) const; - /** Returns a list of all the groups of all the KActions in this action collection. - * @see KAction::group() - * @see KAction::setGroup() + /** Returns a list of all the groups of all the TDEActions in this action collection. + * @see TDEAction::group() + * @see TDEAction::setGroup() */ virtual TQStringList groups() const; /** * Returns the list of actions in a particular group managed by this action collection. * @param group The name of the group. */ - virtual KActionPtrList actions( const TQString& group ) const; + virtual TDEActionPtrList actions( const TQString& group ) const; /** Returns the list of actions managed by this action collection. */ - virtual KActionPtrList actions() const; + virtual TDEActionPtrList actions() const; /** * Used for reading shortcut configuration from a non-XML rc file. @@ -212,7 +212,7 @@ public: //TODO FOR KDE4 make this default true /** - * Enable highlighting notification for specific KActions. + * Enable highlighting notification for specific TDEActions. * This is false by default, so, by default, the highlighting * signals will not be emitted. * @@ -234,11 +234,11 @@ public: bool highlightingEnabled() const; /** - * Call this function if you want to receive a signal whenever a KAction is highlighted in a menu or a toolbar. + * Call this function if you want to receive a signal whenever a TDEAction is highlighted in a menu or a toolbar. * This is only needed if you do not add this action to this container. * You will generally not need to call this function. * - * @param container A container in which the KAction is plugged (must inherit TQPopupMenu or KToolBar) + * @param container A container in which the TDEAction is plugged (must inherit TQPopupMenu or TDEToolBar) * @param action The action you are interested in * @see disconnectHighlight() * @see actionHighlighted() @@ -246,13 +246,13 @@ public: * @see highlightingEnabled() * @see actionHighlighted() */ - void connectHighlight( TQWidget *container, KAction *action ); + void connectHighlight( TQWidget *container, TDEAction *action ); /** * Disconnect highlight notifications for a particular pair of contianer and action. * This is only needed if you do not add this action to this container. * You will generally not need to call this function. * - * @param container A container in which the KAction is plugged (must inherit TQPopupMenu or KToolBar) + * @param container A container in which the TDEAction is plugged (must inherit TQPopupMenu or TDEToolBar) * @param action The action you are interested in * @see connectHighlight() * @see actionHighlighted() @@ -260,7 +260,7 @@ public: * @see highlightingEnabled() * @see actionHighlighted() */ - void disconnectHighlight( TQWidget *container, KAction *action ); + void disconnectHighlight( TQWidget *container, TDEAction *action ); /** * The parent KXMLGUIClient, return 0L if not available. @@ -268,8 +268,8 @@ public: const KXMLGUIClient *parentGUIClient() const; signals: - void inserted( KAction* ); - void removed( KAction* ); + void inserted( TDEAction* ); + void removed( TDEAction* ); /** Emitted when @p action is highlighted. * This is only emitted if you have setHighlightingEnabled() @@ -279,7 +279,7 @@ signals: * @see setHighlightingEnabled() * @see highlightingEnabled() */ - void actionHighlighted( KAction *action ); + void actionHighlighted( TDEAction *action ); /** Emitted when @p action is highlighed or loses highlighting. * This is only emitted if you have setHighlightingEnabled() * @see connectHighlight() @@ -288,7 +288,7 @@ signals: * @see setHighlightingEnabled() * @see highlightingEnabled() */ - void actionHighlighted( KAction *action, bool highlight ); + void actionHighlighted( TDEAction *action, bool highlight ); /** Emitted when an action is highlighted, with text * being the tooltip for the action. * This is only emitted if you have setHighlightingEnabled() @@ -309,7 +309,7 @@ signals: private: /** * @internal Only to be called by KXMLGUIFactory::addClient(). - * When actions are being connected, KAction needs to know what + * When actions are being connected, TDEAction needs to know what * widget it should connect widget-scope actions to, and what * main window it should connect */ @@ -317,12 +317,12 @@ private: void endXMLPlug(); /** @internal. Only to be called by KXMLGUIFactory::removeClient() */ void prepareXMLUnplug(); - void unplugShortcuts( KAccel* kaccel ); + void unplugShortcuts( TDEAccel* kaccel ); void _clear(); - void _insert( KAction* ); - void _remove( KAction* ); - KAction* _take( KAction* ); + void _insert( TDEAction* ); + void _remove( TDEAction* ); + TDEAction* _take( TDEAction* ); private slots: void slotMenuItemHighlighted( int id ); @@ -331,11 +331,11 @@ private slots: void slotDestroyed(); private: - KAction *findAction( TQWidget *container, int id ); + TDEAction *findAction( TQWidget *container, int id ); #ifndef KDE_NO_COMPAT public: - KActionCollection( TQObject *parent, const char *name = 0, TDEInstance *instance = 0 ); + TDEActionCollection( TQObject *parent, const char *name = 0, TDEInstance *instance = 0 ); #endif public: @@ -344,34 +344,34 @@ public: * Generally you don't have to call this. The action inserts itself automatically * into its parent collection. This can be useful however for a short-lived * collection (e.g. for a popupmenu, where the signals from the collection are needed too). - * (don't forget that in the simple case, a list of actions should be a simple KActionPtrList). + * (don't forget that in the simple case, a list of actions should be a simple TDEActionPtrList). * If you manually insert actions into a 2nd collection, don't forget to take them out * again before destroying the collection. - * @param action The KAction to add. + * @param action The TDEAction to add. */ - void insert( KAction* action); + void insert( TDEAction* action); /** * Removes an action from the collection and deletes it. - * Since the KAction destructor removes the action from the collection, you generally + * Since the TDEAction destructor removes the action from the collection, you generally * don't have to call this. - * @param action The KAction to remove. + * @param action The TDEAction to remove. */ - void remove( KAction* action ); + void remove( TDEAction* action ); /** * Removes an action from the collection. - * Since the KAction destructor removes the action from the collection, you generally + * Since the TDEAction destructor removes the action from the collection, you generally * don't have to call this. * @return NULL if not found else returns action. - * @param action the KAction to remove. + * @param action the TDEAction to remove. */ - KAction* take( KAction* action ); + TDEAction* take( TDEAction* action ); #ifndef KDE_NO_COMPAT - KActionCollection operator+ ( const KActionCollection& ) const; - KActionCollection& operator= ( const KActionCollection& ); - KActionCollection& operator+= ( const KActionCollection& ); + TDEActionCollection operator+ ( const TDEActionCollection& ) const; + TDEActionCollection& operator= ( const TDEActionCollection& ); + TDEActionCollection& operator+= ( const TDEActionCollection& ); #endif // !KDE_NO_COMPAT // KDE4: clear() doesn't need to be a slot @@ -385,9 +385,9 @@ public slots: protected: virtual void virtual_hook( int id, void* data ); private: - KActionCollection( const char* name, const KXMLGUIClient* parent ); - class KActionCollectionPrivate; - KActionCollectionPrivate *d; + TDEActionCollection( const char* name, const KXMLGUIClient* parent ); + class TDEActionCollectionPrivate; + TDEActionCollectionPrivate *d; }; #endif diff --git a/tdeui/kactionselector.cpp b/tdeui/kactionselector.cpp index ebaffd48e..e913f01f6 100644 --- a/tdeui/kactionselector.cpp +++ b/tdeui/kactionselector.cpp @@ -31,24 +31,24 @@ #include #include -class KActionSelectorPrivate { +class TDEActionSelectorPrivate { public: TQListBox *availableListBox, *selectedListBox; TQToolButton *btnAdd, *btnRemove, *btnUp, *btnDown; TQLabel *lAvailable, *lSelected; bool moveOnDoubleClick, keyboardEnabled; - KActionSelector::ButtonIconSize iconSize; + TDEActionSelector::ButtonIconSize iconSize; TQString addIcon, removeIcon, upIcon, downIcon; - KActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy; + TDEActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy; bool showUpDownButtons; }; //BEGIN Constructor/destructor -KActionSelector::KActionSelector( TQWidget *parent, const char *name ) +TDEActionSelector::TDEActionSelector( TQWidget *parent, const char *name ) : TQWidget( parent, name ) { - d = new KActionSelectorPrivate(); + d = new TDEActionSelectorPrivate(); d->moveOnDoubleClick = true; d->keyboardEnabled = true; d->iconSize = SmallIcon; @@ -116,7 +116,7 @@ KActionSelector::KActionSelector( TQWidget *parent, const char *name ) d->selectedListBox->installEventFilter( this ); } -KActionSelector::~KActionSelector() +TDEActionSelector::~TDEActionSelector() { delete d; } @@ -125,17 +125,17 @@ KActionSelector::~KActionSelector() //BEGIN Public Methods -TQListBox *KActionSelector::availableListBox() const +TQListBox *TDEActionSelector::availableListBox() const { return d->availableListBox; } -TQListBox *KActionSelector::selectedListBox() const +TQListBox *TDEActionSelector::selectedListBox() const { return d->selectedListBox; } -void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) +void TDEActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) { switch ( button ) { @@ -156,11 +156,11 @@ void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) d->btnDown->setIconSet( SmallIconSet( icon, d->iconSize ) ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonIcon: DAINBREAD!"<btnDown->setIconSet( iconset ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonIconSet: DAINBREAD!"<btnDown->setTextLabel( tip ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonToolTip: DAINBREAD!"<btnDown, text ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonWhatsThis: DAINBREAD!"<btnAdd->setEnabled( d->availableListBox->currentItem() > -1 ); d->btnRemove->setEnabled( d->selectedListBox->currentItem() > -1 ); @@ -236,84 +236,84 @@ void KActionSelector::setButtonsEnabled() //BEGIN Properties -bool KActionSelector::moveOnDoubleClick() const +bool TDEActionSelector::moveOnDoubleClick() const { return d->moveOnDoubleClick; } -void KActionSelector::setMoveOnDoubleClick( bool b ) +void TDEActionSelector::setMoveOnDoubleClick( bool b ) { d->moveOnDoubleClick = b; } -bool KActionSelector::keyboardEnabled() const +bool TDEActionSelector::keyboardEnabled() const { return d->keyboardEnabled; } -void KActionSelector::setKeyboardEnabled( bool b ) +void TDEActionSelector::setKeyboardEnabled( bool b ) { d->keyboardEnabled = b; } -TQString KActionSelector::availableLabel() const +TQString TDEActionSelector::availableLabel() const { return d->lAvailable->text(); } -void KActionSelector::setAvailableLabel( const TQString &text ) +void TDEActionSelector::setAvailableLabel( const TQString &text ) { d->lAvailable->setText( text ); } -TQString KActionSelector::selectedLabel() const +TQString TDEActionSelector::selectedLabel() const { return d->lSelected->text(); } -void KActionSelector::setSelectedLabel( const TQString &text ) +void TDEActionSelector::setSelectedLabel( const TQString &text ) { d->lSelected->setText( text ); } -KActionSelector::ButtonIconSize KActionSelector::buttonIconSize() const +TDEActionSelector::ButtonIconSize TDEActionSelector::buttonIconSize() const { return d->iconSize; } -void KActionSelector::setButtonIconSize( ButtonIconSize size ) +void TDEActionSelector::setButtonIconSize( ButtonIconSize size ) { d->iconSize = size; // reload icons loadIcons(); } -KActionSelector::InsertionPolicy KActionSelector::availableInsertionPolicy() const +TDEActionSelector::InsertionPolicy TDEActionSelector::availableInsertionPolicy() const { return d->availableInsertionPolicy; } -void KActionSelector::setAvailableInsertionPolicy( InsertionPolicy p ) +void TDEActionSelector::setAvailableInsertionPolicy( InsertionPolicy p ) { d->availableInsertionPolicy = p; } -KActionSelector::InsertionPolicy KActionSelector::selectedInsertionPolicy() const +TDEActionSelector::InsertionPolicy TDEActionSelector::selectedInsertionPolicy() const { return d->selectedInsertionPolicy; } -void KActionSelector::setSelectedInsertionPolicy( InsertionPolicy p ) +void TDEActionSelector::setSelectedInsertionPolicy( InsertionPolicy p ) { d->selectedInsertionPolicy = p; } -bool KActionSelector::showUpDownButtons() const +bool TDEActionSelector::showUpDownButtons() const { return d->showUpDownButtons; } -void KActionSelector::setShowUpDownButtons( bool show ) +void TDEActionSelector::setShowUpDownButtons( bool show ) { d->showUpDownButtons = show; if ( show ) @@ -332,7 +332,7 @@ void KActionSelector::setShowUpDownButtons( bool show ) //BEGIN Public Slots -void KActionSelector::polish() +void TDEActionSelector::polish() { setButtonsEnabled(); } @@ -340,7 +340,7 @@ void KActionSelector::polish() //END Public Slots //BEGIN Protected -void KActionSelector::keyPressEvent( TQKeyEvent *e ) +void TDEActionSelector::keyPressEvent( TQKeyEvent *e ) { if ( ! d->keyboardEnabled ) return; if ( (e->state() & TQt::ControlButton) ) @@ -366,7 +366,7 @@ void KActionSelector::keyPressEvent( TQKeyEvent *e ) } } -bool KActionSelector::eventFilter( TQObject *o, TQEvent *e ) +bool TDEActionSelector::eventFilter( TQObject *o, TQEvent *e ) { if ( d->keyboardEnabled && e->type() == TQEvent::KeyPress ) { @@ -413,7 +413,7 @@ bool KActionSelector::eventFilter( TQObject *o, TQEvent *e ) //BEGIN Private Slots -void KActionSelector::buttonAddClicked() +void TDEActionSelector::buttonAddClicked() { // move all selected items from available to selected listbox TQListBoxItem *item = d->availableListBox->firstItem(); @@ -432,7 +432,7 @@ void KActionSelector::buttonAddClicked() d->selectedListBox->setFocus(); } -void KActionSelector::buttonRemoveClicked() +void TDEActionSelector::buttonRemoveClicked() { // move all selected items from selected to available listbox TQListBoxItem *item = d->selectedListBox->firstItem(); @@ -451,7 +451,7 @@ void KActionSelector::buttonRemoveClicked() d->availableListBox->setFocus(); } -void KActionSelector::buttonUpClicked() +void TDEActionSelector::buttonUpClicked() { int c = d->selectedListBox->currentItem(); if ( c < 1 ) return; @@ -462,7 +462,7 @@ void KActionSelector::buttonUpClicked() emit movedUp( item ); } -void KActionSelector::buttonDownClicked() +void TDEActionSelector::buttonDownClicked() { int c = d->selectedListBox->currentItem(); if ( c < 0 || c == int( d->selectedListBox->count() ) - 1 ) return; @@ -473,7 +473,7 @@ void KActionSelector::buttonDownClicked() emit movedDown( item ); } -void KActionSelector::itemDoubleClicked( TQListBoxItem *item ) +void TDEActionSelector::itemDoubleClicked( TQListBoxItem *item ) { if ( d->moveOnDoubleClick ) moveItem( item ); @@ -483,7 +483,7 @@ void KActionSelector::itemDoubleClicked( TQListBoxItem *item ) //BEGIN Private Methods -void KActionSelector::loadIcons() +void TDEActionSelector::loadIcons() { d->btnAdd->setIconSet( SmallIconSet( d->addIcon, d->iconSize ) ); d->btnRemove->setIconSet( SmallIconSet( d->removeIcon, d->iconSize ) ); @@ -491,7 +491,7 @@ void KActionSelector::loadIcons() d->btnDown->setIconSet( SmallIconSet( d->downIcon, d->iconSize ) ); } -void KActionSelector::moveItem( TQListBoxItem *item ) +void TDEActionSelector::moveItem( TQListBoxItem *item ) { TQListBox *lbFrom = item->listBox(); TQListBox *lbTo; @@ -518,7 +518,7 @@ void KActionSelector::moveItem( TQListBoxItem *item ) emit removed( item ); } -int KActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy ) +int TDEActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy ) { int index; switch ( policy ) diff --git a/tdeui/kactionselector.h b/tdeui/kactionselector.h index 5ac58b0ed..7cdd20116 100644 --- a/tdeui/kactionselector.h +++ b/tdeui/kactionselector.h @@ -29,7 +29,7 @@ class TQKeyEvent; class TQEvent; class TQIconSet; -class KActionSelectorPrivate; +class TDEActionSelectorPrivate; /** @short A widget for selecting and arranging actions/objects @@ -76,7 +76,7 @@ class KActionSelectorPrivate; @author Anders Lund */ -class TDEUI_EXPORT KActionSelector : public TQWidget { +class TDEUI_EXPORT TDEActionSelector : public TQWidget { Q_OBJECT TQ_ENUMS( ButtonIconSize InsertionPolicy ) TQ_PROPERTY( bool moveOnDoubleClick READ moveOnDoubleClick WRITE setMoveOnDoubleClick ) @@ -89,8 +89,8 @@ class TDEUI_EXPORT KActionSelector : public TQWidget { TQ_PROPERTY( bool showUpDownButtons READ showUpDownButtons WRITE setShowUpDownButtons ) public: - KActionSelector( TQWidget *parent=0, const char *name=0 ); - ~KActionSelector(); + TDEActionSelector( TQWidget *parent=0, const char *name=0 ); + ~TDEActionSelector(); /** @return The TQListBox holding the available actions @@ -396,7 +396,7 @@ private: /** @private Private data storage */ - KActionSelectorPrivate *d; + TDEActionSelectorPrivate *d; }; #endif // _KACTION_SELECTOR_H_ diff --git a/tdeui/kactionshortcutlist.h b/tdeui/kactionshortcutlist.h index 7c5f5b0dd..ac8ac020d 100644 --- a/tdeui/kactionshortcutlist.h +++ b/tdeui/kactionshortcutlist.h @@ -5,24 +5,24 @@ #include //--------------------------------------------------------------------- -// class KActionShortcutList +// class TDEActionShortcutList //--------------------------------------------------------------------- -class KAccelShortcutListPrivate; -class TDEUI_EXPORT KActionShortcutList : public KShortcutList +class TDEAccelShortcutListPrivate; +class TDEUI_EXPORT TDEActionShortcutList : public TDEShortcutList { public: - KActionShortcutList( KActionCollection* ); - virtual ~KActionShortcutList(); + TDEActionShortcutList( TDEActionCollection* ); + virtual ~TDEActionShortcutList(); virtual uint count() const; virtual TQString name( uint index ) const; virtual TQString label( uint index ) const; virtual TQString whatsThis( uint index ) const; - virtual const KShortcut& shortcut( uint index ) const; - virtual const KShortcut& shortcutDefault( uint index ) const; + virtual const TDEShortcut& shortcut( uint index ) const; + virtual const TDEShortcut& shortcutDefault( uint index ) const; virtual bool isConfigurable( uint index ) const; - virtual bool setShortcut( uint index, const KShortcut& shortcut ); + virtual bool setShortcut( uint index, const TDEShortcut& shortcut ); virtual const TDEInstance* instance() const; @@ -31,36 +31,36 @@ class TDEUI_EXPORT KActionShortcutList : public KShortcutList virtual bool save() const; - const KAction *action( uint ) const; + const TDEAction *action( uint ) const; protected: - KActionCollection& m_actions; + TDEActionCollection& m_actions; protected: virtual void virtual_hook( int id, void* data ); private: - KAccelShortcutListPrivate* d; + TDEAccelShortcutListPrivate* d; }; //--------------------------------------------------------------------- -// class KActionPtrShortcutList +// class TDEActionPtrShortcutList //--------------------------------------------------------------------- -class KAccelShortcutListPrivate; -class TDEUI_EXPORT KActionPtrShortcutList : public KShortcutList +class TDEAccelShortcutListPrivate; +class TDEUI_EXPORT TDEActionPtrShortcutList : public TDEShortcutList { public: - KActionPtrShortcutList( KActionPtrList& ); - virtual ~KActionPtrShortcutList(); + TDEActionPtrShortcutList( TDEActionPtrList& ); + virtual ~TDEActionPtrShortcutList(); virtual uint count() const; virtual TQString name( uint index ) const; virtual TQString label( uint index ) const; virtual TQString whatsThis( uint index ) const; - virtual const KShortcut& shortcut( uint index ) const; - virtual const KShortcut& shortcutDefault( uint index ) const; + virtual const TDEShortcut& shortcut( uint index ) const; + virtual const TDEShortcut& shortcutDefault( uint index ) const; virtual bool isConfigurable( uint index ) const; - virtual bool setShortcut( uint index, const KShortcut& shortcut); + virtual bool setShortcut( uint index, const TDEShortcut& shortcut); virtual TQVariant getOther( Other, uint index ) const; virtual bool setOther( Other, uint index, TQVariant ); @@ -68,12 +68,12 @@ class TDEUI_EXPORT KActionPtrShortcutList : public KShortcutList virtual bool save() const; protected: - KActionPtrList& m_actions; + TDEActionPtrList& m_actions; protected: virtual void virtual_hook( int id, void* data ); private: - KAccelShortcutListPrivate* d; + TDEAccelShortcutListPrivate* d; }; #endif // !_KACTIONSHORTCUTLIST_H diff --git a/tdeui/kanimwidget.cpp b/tdeui/kanimwidget.cpp index 7a5928ab3..9f069a259 100644 --- a/tdeui/kanimwidget.cpp +++ b/tdeui/kanimwidget.cpp @@ -47,7 +47,7 @@ KAnimWidget::KAnimWidget( const TQString& icons, int size, TQWidget *parent, { connect( &d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimerUpdate())); - if (parent && parent->inherits( "KToolBar" )) + if (parent && parent->inherits( "TDEToolBar" )) connect(parent, TQT_SIGNAL(modechange()), this, TQT_SLOT(updateIcons())); d->loadingCompleted = false; @@ -182,8 +182,8 @@ void KAnimWidget::updateIcons() if (!d->initDone) return; - if (parent()->inherits( "KToolBar" )) - d->size = ((KToolBar*)parent())->iconSize(); + if (parent()->inherits( "TDEToolBar" )) + d->size = ((TDEToolBar*)parent())->iconSize(); if (!d->size) d->size = TDEGlobal::iconLoader()->currentSize(KIcon::MainToolbar); diff --git a/tdeui/kanimwidget.h b/tdeui/kanimwidget.h index 74f663463..2275f2cf9 100644 --- a/tdeui/kanimwidget.h +++ b/tdeui/kanimwidget.h @@ -68,7 +68,7 @@ public: * @param icons The icons name (e.g., "kde") to use for the animation * @param size The size to load * You don't have to set it if the parent is a - * KToolBar; in this case it will use the toolbar's + * TDEToolBar; in this case it will use the toolbar's * size. * @param parent The standard parent * @param name The standard internal name diff --git a/tdeui/kcmenumngr.cpp b/tdeui/kcmenumngr.cpp index f71a88f79..cedaadde8 100644 --- a/tdeui/kcmenumngr.cpp +++ b/tdeui/kcmenumngr.cpp @@ -36,7 +36,7 @@ KContextMenuManager::KContextMenuManager( TQObject* parent, const char* name ) : TQObject( parent, name) { TDEConfigGroupSaver saver ( TDEGlobal::config(), TQString::fromLatin1("Shortcuts") ) ; - menuKey = KShortcut( saver.config()->readEntry(TQString::fromLatin1("PopupContextMenu"), TQString::fromLatin1("Menu") ) ).keyCodeQt(); + menuKey = TDEShortcut( saver.config()->readEntry(TQString::fromLatin1("PopupContextMenu"), TQString::fromLatin1("Menu") ) ).keyCodeQt(); saver.config()->setGroup( TQString::fromLatin1("ContextMenus") ) ; showOnPress = saver.config()->readBoolEntry(TQString::fromLatin1("ShowOnPress"), true ); } diff --git a/tdeui/kcolorbutton.cpp b/tdeui/kcolorbutton.cpp index b28002ebc..91e53ea62 100644 --- a/tdeui/kcolorbutton.cpp +++ b/tdeui/kcolorbutton.cpp @@ -153,11 +153,11 @@ void KColorButton::keyPressEvent( TQKeyEvent *e ) { KKey key( e ); - if ( KStdAccel::copy().contains( key ) ) { + if ( TDEStdAccel::copy().contains( key ) ) { TQMimeSource* mime = new KColorDrag( color() ); TQApplication::clipboard()->setData( mime, TQClipboard::Clipboard ); } - else if ( KStdAccel::paste().contains( key ) ) { + else if ( TDEStdAccel::paste().contains( key ) ) { TQColor color; KColorDrag::decode( TQApplication::clipboard()->data( TQClipboard::Clipboard ), color ); setColor( color ); diff --git a/tdeui/kcolordialog.cpp b/tdeui/kcolordialog.cpp index 7182e9ddc..874b63d9c 100644 --- a/tdeui/kcolordialog.cpp +++ b/tdeui/kcolordialog.cpp @@ -260,7 +260,7 @@ void KHSSelector::drawPalette( TQPixmap *pixmap ) //----------------------------------------------------------------------------- KValueSelector::KValueSelector( TQWidget *parent, const char *name ) - : KSelector( Qt::Vertical, parent, name ), _hue(0), _sat(0) + : TDESelector( Qt::Vertical, parent, name ), _hue(0), _sat(0) { setRange( 0, 255 ); pixmap.setOptimization( TQPixmap::BestOptim ); @@ -268,7 +268,7 @@ KValueSelector::KValueSelector( TQWidget *parent, const char *name ) KValueSelector::KValueSelector(Orientation o, TQWidget *parent, const char *name ) - : KSelector( o, parent, name), _hue(0), _sat(0) + : TDESelector( o, parent, name), _hue(0), _sat(0) { setRange( 0, 255 ); pixmap.setOptimization( TQPixmap::BestOptim ); @@ -590,7 +590,7 @@ KPaletteTable::KPaletteTable( TQWidget *parent, int minWidth, int cols) sv->setFixedSize(minSize); layout->addWidget(sv); - mNamedColorList = new KListBox( this, "namedColorList", 0 ); + mNamedColorList = new TDEListBox( this, "namedColorList", 0 ); mNamedColorList->setFixedSize(minSize); mNamedColorList->hide(); layout->addWidget(mNamedColorList); @@ -1597,7 +1597,7 @@ void KHSSelector::virtual_hook( int id, void* data ) { KXYSelector::virtual_hook( id, data ); } void KValueSelector::virtual_hook( int id, void* data ) -{ KSelector::virtual_hook( id, data ); } +{ TDESelector::virtual_hook( id, data ); } void KPaletteTable::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } diff --git a/tdeui/kcolordialog.h b/tdeui/kcolordialog.h index 20c9f799d..7f04d6d17 100644 --- a/tdeui/kcolordialog.h +++ b/tdeui/kcolordialog.h @@ -39,7 +39,7 @@ class TQComboBox; class TQLineEdit; -class KListBox; +class TDEListBox; class KPalette; class KColorCells; @@ -99,7 +99,7 @@ class KValueSelectorPrivate; * @see KHSSelector, KColorDialog * @author Martin Jones (mjones@kde.org) */ -class TDEUI_EXPORT KValueSelector : public KSelector +class TDEUI_EXPORT KValueSelector : public TDESelector { Q_OBJECT @@ -132,7 +132,7 @@ protected: virtual void resizeEvent( TQResizeEvent * ); /** - * Reimplemented from KSelector. The drawing is + * Reimplemented from TDESelector. The drawing is * buffered in a pixmap here. As real drawing * routine, drawPalette() is used. */ @@ -229,7 +229,7 @@ protected: TQComboBox *combo; KColorCells *cells; TQScrollView *sv; - KListBox *mNamedColorList; + TDEListBox *mNamedColorList; KPalette *mPalette; int mMinWidth; int mCols; diff --git a/tdeui/kcombobox.cpp b/tdeui/kcombobox.cpp index 5d3914327..6fe8d1946 100644 --- a/tdeui/kcombobox.cpp +++ b/tdeui/kcombobox.cpp @@ -616,12 +616,12 @@ void KHistoryCombo::keyPressEvent( TQKeyEvent *e ) KKey event_key( e ); // going up in the history, rotating when reaching TQListBox::count() - if ( KStdAccel::rotateUp().contains(event_key) ) + if ( TDEStdAccel::rotateUp().contains(event_key) ) rotateUp(); // going down in the history, no rotation possible. Last item will be // the text that was in the lineedit before Up was called. - else if ( KStdAccel::rotateDown().contains(event_key) ) + else if ( TDEStdAccel::rotateDown().contains(event_key) ) rotateDown(); else KComboBox::keyPressEvent( e ); @@ -745,12 +745,12 @@ KHistoryComboEditor::KHistoryComboEditor( const TQStringList& entries, TQWidget clearSearch->setTextLabel(i18n("Clear Search"), true); clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); TQLabel* slbl = new TQLabel(i18n("&Search:"), searchbox); - KListViewSearchLine* listViewSearch = new KListViewSearchLine(searchbox); + TDEListViewSearchLine* listViewSearch = new TDEListViewSearchLine(searchbox); slbl->setBuddy(listViewSearch); connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear())); // Add ListView - m_pListView = new KListView( box ); + m_pListView = new TDEListView( box ); listViewSearch->setListView(m_pListView); m_pListView->setAllColumnsShowFocus(true); m_pListView->header()->hide(); diff --git a/tdeui/kcombobox.h b/tdeui/kcombobox.h index 247217aaf..edb090f06 100644 --- a/tdeui/kcombobox.h +++ b/tdeui/kcombobox.h @@ -77,7 +77,7 @@ class KURL; * and consider using TQGuardedPtr. * * The default key-bindings for completion and rotation is determined from the - * global settings in KStdAccel. These values, however, can be overridden + * global settings in TDEStdAccel. These values, however, can be overridden * locally by invoking KCompletionBase::setKeyBinding(). The values can * easily be reverted back to the default setting, by simply calling * useGlobalSettings(). An alternate method would be to default individual @@ -815,7 +815,7 @@ protected: virtual void virtual_hook( int id, void* data ); private: - KListView *m_pListView; + TDEListView *m_pListView; class KHistoryComboEditorPrivate; KHistoryComboEditorPrivate* const d; diff --git a/tdeui/kcommand.cpp b/tdeui/kcommand.cpp index 2c76b21cd..9de26e062 100644 --- a/tdeui/kcommand.cpp +++ b/tdeui/kcommand.cpp @@ -77,22 +77,22 @@ KCommandHistory::KCommandHistory() : clear(); } -KCommandHistory::KCommandHistory(KActionCollection * actionCollection, bool withMenus) : +KCommandHistory::KCommandHistory(TDEActionCollection * actionCollection, bool withMenus) : m_undoLimit(50), m_redoLimit(30), m_first(false) { d=new KCommandHistoryPrivate(); if (withMenus) { - KToolBarPopupAction * undo = new KToolBarPopupAction( i18n("&Undo"), "undo", - KStdAccel::shortcut(KStdAccel::Undo), this, TQT_SLOT( undo() ), + TDEToolBarPopupAction * undo = new TDEToolBarPopupAction( i18n("&Undo"), "undo", + TDEStdAccel::shortcut(TDEStdAccel::Undo), this, TQT_SLOT( undo() ), actionCollection, KStdAction::stdName( KStdAction::Undo ) ); connect( undo->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotUndoAboutToShow() ) ); connect( undo->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotUndoActivated( int ) ) ); m_undo = undo; m_undoPopup = undo->popupMenu(); - KToolBarPopupAction * redo = new KToolBarPopupAction( i18n("&Redo"), "redo", - KStdAccel::shortcut(KStdAccel::Redo), this, TQT_SLOT( redo() ), + TDEToolBarPopupAction * redo = new TDEToolBarPopupAction( i18n("&Redo"), "redo", + TDEStdAccel::shortcut(TDEStdAccel::Redo), this, TQT_SLOT( redo() ), actionCollection, KStdAction::stdName( KStdAction::Redo ) ); connect( redo->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotRedoAboutToShow() ) ); connect( redo->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotRedoActivated( int ) ) ); diff --git a/tdeui/kcommand.h b/tdeui/kcommand.h index f802f8d64..e27e5178b 100644 --- a/tdeui/kcommand.h +++ b/tdeui/kcommand.h @@ -26,8 +26,8 @@ #include #include -class KAction; -class KActionCollection; +class TDEAction; +class TDEActionCollection; class TQPopupMenu; /** @@ -171,7 +171,7 @@ public: * into a toolbar. * @param actionCollection the parent collection */ - KCommandHistory(KActionCollection *actionCollection, bool withMenus = true); + KCommandHistory(TDEActionCollection *actionCollection, bool withMenus = true); /** * Destructs the command history object. @@ -222,12 +222,12 @@ public: public slots: /** * Undoes the last action. - * Call this if you don't use the builtin KActions. + * Call this if you don't use the builtin TDEActions. */ virtual void undo(); /** * Redoes the last undone action. - * Call this if you don't use the builtin KActions. + * Call this if you don't use the builtin TDEActions. */ virtual void redo(); /** @@ -275,7 +275,7 @@ private: void clipCommands(); // ensures that the limits are kept TQPtrList m_commands; - KAction *m_undo, *m_redo; + TDEAction *m_undo, *m_redo; TQPopupMenu *m_undoPopup, *m_redoPopup; int m_undoLimit, m_redoLimit; bool m_first; // attention: it's the first command in the list! diff --git a/tdeui/kcompletionbox.cpp b/tdeui/kcompletionbox.cpp index 2e63cb21f..086df247c 100644 --- a/tdeui/kcompletionbox.cpp +++ b/tdeui/kcompletionbox.cpp @@ -45,7 +45,7 @@ public: }; KCompletionBox::KCompletionBox( TQWidget *parent, const char *name ) - :KListBox( parent, name, (WFlags)WType_Popup ), d(new KCompletionBoxPrivate) + :TDEListBox( parent, name, (WFlags)WType_Popup ), d(new KCompletionBoxPrivate) { d->m_parent = parent; @@ -243,7 +243,7 @@ bool KCompletionBox::eventFilter( TQObject *o, TQEvent *e ) } } - return KListBox::eventFilter( o, e ); + return TDEListBox::eventFilter( o, e ); } @@ -318,7 +318,7 @@ void KCompletionBox::show() // of the parent, and calls hide() - and this hide() happen in the middle // of show(), causing inconsistent state. I'll try to submit a Qt patch too. tqApp->sendPostedEvents(); - KListBox::show(); + TDEListBox::show(); } void KCompletionBox::hide() @@ -326,7 +326,7 @@ void KCompletionBox::hide() if ( d->m_parent ) tqApp->removeEventFilter( this ); d->cancelText = TQString::null; - KListBox::hide(); + TDEListBox::hide(); } TQRect KCompletionBox::calculateGeometry() const @@ -335,8 +335,8 @@ TQRect KCompletionBox::calculateGeometry() const int ih = itemHeight(); int h = QMIN( 15 * ih, (int) count() * ih ) + 2*frameWidth(); - int w = (d->m_parent) ? d->m_parent->width() : KListBox::minimumSizeHint().width(); - w = QMAX( KListBox::minimumSizeHint().width(), w ); + int w = (d->m_parent) ? d->m_parent->width() : TDEListBox::minimumSizeHint().width(); + w = QMAX( TDEListBox::minimumSizeHint().width(), w ); //If we're inside a combox, Qt by default makes the dropdown // as wide as the combo, and gives the style a chance @@ -557,6 +557,6 @@ bool KCompletionBox::activateOnSelect() const } void KCompletionBox::virtual_hook( int id, void* data ) -{ KListBox::virtual_hook( id, data ); } +{ TDEListBox::virtual_hook( id, data ); } #include "kcompletionbox.moc" diff --git a/tdeui/kcompletionbox.h b/tdeui/kcompletionbox.h index 5f2f5b660..da853a6c3 100644 --- a/tdeui/kcompletionbox.h +++ b/tdeui/kcompletionbox.h @@ -40,7 +40,7 @@ class TQEvent; * * @author Carsten Pfeiffer */ -class TDEUI_EXPORT KCompletionBox : public KListBox +class TDEUI_EXPORT KCompletionBox : public TDEListBox { Q_OBJECT TQ_PROPERTY( bool isTabHandling READ isTabHandling WRITE setTabHandling ) @@ -216,7 +216,7 @@ protected: void sizeAndPosition(); /** - * Reimplemented from KListBox to get events from the viewport (to hide + * Reimplemented from TDEListBox to get events from the viewport (to hide * this widget on mouse-click, Escape-presses, etc. */ virtual bool eventFilter( TQObject *, TQEvent * ); diff --git a/tdeui/kdatepicker.cpp b/tdeui/kdatepicker.cpp index 1ba83bad1..a7d3cb303 100644 --- a/tdeui/kdatepicker.cpp +++ b/tdeui/kdatepicker.cpp @@ -387,7 +387,7 @@ KDatePicker::selectYearClicked() } int year; - KPopupFrame* popup = new KPopupFrame(this); + TDEPopupFrame* popup = new TDEPopupFrame(this); KDateInternalYearSelector* picker = new KDateInternalYearSelector(popup); // ----- picker->resize(picker->sizeHint()); diff --git a/tdeui/kdatetbl.cpp b/tdeui/kdatetbl.cpp index b73b8b4eb..529b7dac3 100644 --- a/tdeui/kdatetbl.cpp +++ b/tdeui/kdatetbl.cpp @@ -157,13 +157,13 @@ KDateTable::~KDateTable() void KDateTable::initAccels() { - KAccel* accel = new KAccel(this, "date table accel"); - accel->insert(KStdAccel::Next, TQT_TQOBJECT(this), TQT_SLOT(nextMonth())); - accel->insert(KStdAccel::Prior, TQT_TQOBJECT(this), TQT_SLOT(previousMonth())); - accel->insert(KStdAccel::Home, TQT_TQOBJECT(this), TQT_SLOT(beginningOfMonth())); - accel->insert(KStdAccel::End, TQT_TQOBJECT(this), TQT_SLOT(endOfMonth())); - accel->insert(KStdAccel::BeginningOfLine, TQT_TQOBJECT(this), TQT_SLOT(beginningOfWeek())); - accel->insert(KStdAccel::EndOfLine, TQT_TQOBJECT(this), TQT_SLOT(endOfWeek())); + TDEAccel* accel = new TDEAccel(this, "date table accel"); + accel->insert(TDEStdAccel::Next, TQT_TQOBJECT(this), TQT_SLOT(nextMonth())); + accel->insert(TDEStdAccel::Prior, TQT_TQOBJECT(this), TQT_SLOT(previousMonth())); + accel->insert(TDEStdAccel::Home, TQT_TQOBJECT(this), TQT_SLOT(beginningOfMonth())); + accel->insert(TDEStdAccel::End, TQT_TQOBJECT(this), TQT_SLOT(endOfMonth())); + accel->insert(TDEStdAccel::BeginningOfLine, TQT_TQOBJECT(this), TQT_SLOT(beginningOfWeek())); + accel->insert(TDEStdAccel::EndOfLine, TQT_TQOBJECT(this), TQT_SLOT(endOfWeek())); accel->readSettings(); } @@ -499,7 +499,7 @@ KDateTable::contentsMousePressEvent(TQMouseEvent *e) if ( e->button() == Qt::RightButton && d->popupMenuEnabled ) { - KPopupMenu *menu = new KPopupMenu(); + TDEPopupMenu *menu = new TDEPopupMenu(); menu->insertTitle( TDEGlobal::locale()->formatDate(clickedDate) ); emit aboutToShowContextMenu( menu, clickedDate ); menu->popup(e->globalPos()); @@ -905,31 +905,31 @@ KDateInternalYearSelector::setYear(int year) setText(temp); } -class KPopupFrame::KPopupFramePrivate +class TDEPopupFrame::TDEPopupFramePrivate { public: - KPopupFramePrivate() : exec(false) {} + TDEPopupFramePrivate() : exec(false) {} bool exec; }; -KPopupFrame::KPopupFrame(TQWidget* parent, const char* name) +TDEPopupFrame::TDEPopupFrame(TQWidget* parent, const char* name) : TQFrame(parent, name, (WFlags)WType_Popup), result(0), // rejected main(0), - d(new KPopupFramePrivate) + d(new TDEPopupFramePrivate) { setFrameStyle(TQFrame::Box|TQFrame::Raised); setMidLineWidth(2); } -KPopupFrame::~KPopupFrame() +TDEPopupFrame::~TDEPopupFrame() { delete d; } void -KPopupFrame::keyPressEvent(TQKeyEvent* e) +TDEPopupFrame::keyPressEvent(TQKeyEvent* e) { if(e->key()==Key_Escape) { @@ -940,7 +940,7 @@ KPopupFrame::keyPressEvent(TQKeyEvent* e) } void -KPopupFrame::close(int r) +TDEPopupFrame::close(int r) { result=r; d->exec = false; @@ -948,7 +948,7 @@ KPopupFrame::close(int r) } void -KPopupFrame::hide() +TDEPopupFrame::hide() { TQFrame::hide(); if (d->exec) @@ -959,7 +959,7 @@ KPopupFrame::hide() } void -KPopupFrame::setMainWidget(TQWidget* m) +TDEPopupFrame::setMainWidget(TQWidget* m) { main=m; if(main) @@ -969,7 +969,7 @@ KPopupFrame::setMainWidget(TQWidget* m) } void -KPopupFrame::resizeEvent(TQResizeEvent*) +TDEPopupFrame::resizeEvent(TQResizeEvent*) { if(main) { @@ -979,7 +979,7 @@ KPopupFrame::resizeEvent(TQResizeEvent*) } void -KPopupFrame::popup(const TQPoint &pos) +TDEPopupFrame::popup(const TQPoint &pos) { // Make sure the whole popup is visible. TQRect d = TDEGlobalSettings::desktopGeometry(pos); @@ -1003,7 +1003,7 @@ KPopupFrame::popup(const TQPoint &pos) } int -KPopupFrame::exec(TQPoint pos) +TDEPopupFrame::exec(TQPoint pos) { popup(pos); repaint(); @@ -1017,12 +1017,12 @@ KPopupFrame::exec(TQPoint pos) } int -KPopupFrame::exec(int x, int y) +TDEPopupFrame::exec(int x, int y) { return exec(TQPoint(x, y)); } -void KPopupFrame::virtual_hook( int, void* ) +void TDEPopupFrame::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void KDateTable::virtual_hook( int, void* ) diff --git a/tdeui/kdatetbl.h b/tdeui/kdatetbl.h index 5e9adbd15..649dae73c 100644 --- a/tdeui/kdatetbl.h +++ b/tdeui/kdatetbl.h @@ -30,7 +30,7 @@ #include -class KPopupMenu; +class TDEPopupMenu; /** Week selection widget. * @internal @@ -163,7 +163,7 @@ private: * @author Tim Gilman, Mirko Boehm * @version $Id$ */ -class TDEUI_EXPORT KPopupFrame : public TQFrame +class TDEUI_EXPORT TDEPopupFrame : public TQFrame { Q_OBJECT protected: @@ -194,11 +194,11 @@ public: /** * The contructor. Creates a dialog without buttons. */ - KPopupFrame(TQWidget* parent=0, const char* name=0); + TDEPopupFrame(TQWidget* parent=0, const char* name=0); /** * The destructor. */ - ~KPopupFrame(); + ~TDEPopupFrame(); /** * Set the main widget. You cannot set the main widget from the constructor, * since it must be a child of the frame itselfes. @@ -231,8 +231,8 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KPopupFramePrivate; - KPopupFramePrivate *d; + class TDEPopupFramePrivate; + TDEPopupFramePrivate *d; }; /** @@ -425,7 +425,7 @@ signals: * * @since 3.2 */ - void aboutToShowContextMenu( KPopupMenu * menu, const TQDate &date); + void aboutToShowContextMenu( TDEPopupMenu * menu, const TQDate &date); private slots: void nextMonth(); diff --git a/tdeui/kdcopactionproxy.cpp b/tdeui/kdcopactionproxy.cpp index 2b20e8bd3..730cdacb3 100644 --- a/tdeui/kdcopactionproxy.cpp +++ b/tdeui/kdcopactionproxy.cpp @@ -37,13 +37,13 @@ public: { } - KActionCollection *m_actionCollection; + TDEActionCollection *m_actionCollection; DCOPObject *m_parent; TQCString m_prefix; int m_pos; }; -KDCOPActionProxy::KDCOPActionProxy( KActionCollection *actionCollection, DCOPObject *parent ) +KDCOPActionProxy::KDCOPActionProxy( TDEActionCollection *actionCollection, DCOPObject *parent ) { init( actionCollection, parent ); } @@ -53,7 +53,7 @@ KDCOPActionProxy::KDCOPActionProxy( DCOPObject *parent ) init( 0, parent ); } -void KDCOPActionProxy::init( KActionCollection *collection, DCOPObject *parent ) +void KDCOPActionProxy::init( TDEActionCollection *collection, DCOPObject *parent ) { d = new KDCOPActionProxyPrivate; d->m_actionCollection = collection; @@ -67,15 +67,15 @@ KDCOPActionProxy::~KDCOPActionProxy() delete d; } -TQValueListKDCOPActionProxy::actions() const +TQValueListKDCOPActionProxy::actions() const { if ( !d->m_actionCollection ) - return TQValueList(); + return TQValueList(); return d->m_actionCollection->actions(); } -KAction *KDCOPActionProxy::action( const char *name ) const +TDEAction *KDCOPActionProxy::action( const char *name ) const { if ( !d->m_actionCollection ) return 0; @@ -96,9 +96,9 @@ TQMap KDCOPActionProxy::actionMap( const TQCString &appId ) c if ( id.isEmpty() ) id = kapp->dcopClient()->appId(); - TQValueList lst = actions(); - TQValueList::ConstIterator it = lst.begin(); - TQValueList::ConstIterator end = lst.end(); + TQValueList lst = actions(); + TQValueList::ConstIterator it = lst.begin(); + TQValueList::ConstIterator end = lst.end(); for (; it != end; ++it ) res.insert( (*it)->name(), DCOPRef( id, actionObjectId( (*it)->name() ) ) ); @@ -111,7 +111,7 @@ bool KDCOPActionProxy::process( const TQCString &obj, const TQCString &fun, cons if ( obj.left( d->m_pos ) != d->m_prefix ) return false; - KAction *act = action( obj.mid( d->m_pos ) ); + TDEAction *act = action( obj.mid( d->m_pos ) ); if ( !act ) return false; @@ -119,7 +119,7 @@ bool KDCOPActionProxy::process( const TQCString &obj, const TQCString &fun, cons } bool KDCOPActionProxy::processAction( const TQCString &, const TQCString &fun, const TQByteArray &data, - TQCString &replyType, TQByteArray &replyData, KAction *action ) + TQCString &replyType, TQByteArray &replyData, TDEAction *action ) { if ( fun == "activate()" ) { diff --git a/tdeui/kdcopactionproxy.h b/tdeui/kdcopactionproxy.h index 429264899..0bb80fec1 100644 --- a/tdeui/kdcopactionproxy.h +++ b/tdeui/kdcopactionproxy.h @@ -23,15 +23,15 @@ #include #include -class KActionCollection; -class KAction; +class TDEActionCollection; +class TDEAction; /** * @short A proxy class publishing a DCOP interface for actions. * - * The KDCOPActionProxy class provides an easy way to publish a collection of KAction objects + * The KDCOPActionProxy class provides an easy way to publish a collection of TDEAction objects * through DCOP. For the DCOP client the exported actions behave like full-fledged DCOP objects, - * providing full access to the KAction object functionality in the server. + * providing full access to the TDEAction object functionality in the server. * * This class can generate DCOP object ids for given action objects, which it automatically * processes, as being a DCOPObjectProxy . @@ -41,13 +41,13 @@ class TDEUI_EXPORT KDCOPActionProxy : public DCOPObjectProxy public: /** * Constructs a dcop action proxy, being able to export the actions of the provided - * KActionCollection through DCOP, using the parent DCOPObject's object id to + * TDEActionCollection through DCOP, using the parent DCOPObject's object id to * generate unique object ids for the actions. */ - KDCOPActionProxy( KActionCollection *actionCollection, DCOPObject *parent ); + KDCOPActionProxy( TDEActionCollection *actionCollection, DCOPObject *parent ); /** * Use this constructor if do not want to provide the exportable actions through a - * KActionCollection . You have to reimplement the virtual actions() and + * TDEActionCollection . You have to reimplement the virtual actions() and * action() methods if you use this constructor. */ KDCOPActionProxy( DCOPObject *parent ); @@ -58,14 +58,14 @@ public: /** * Returns a list of exportable actions. The default implementation returns a list of actions - * provided by a KActionCollection, if the first constructor has been used. + * provided by a TDEActionCollection, if the first constructor has been used. */ - virtual TQValueList actions() const; + virtual TQValueList actions() const; /** * Returns an action object with the given name. The default implementation queries the action object - * from the KActionCollection, if the first constructor has been used. + * from the TDEActionCollection, if the first constructor has been used. */ - virtual KAction *action( const char *name ) const; + virtual TDEAction *action( const char *name ) const; /** * Use this method to retrieve a DCOP object id for an action with the given name. @@ -98,9 +98,9 @@ public: * action object. */ virtual bool processAction( const TQCString &obj, const TQCString &fun, const TQByteArray &data, - TQCString &replyType, TQByteArray &replyData, KAction *action ); + TQCString &replyType, TQByteArray &replyData, TDEAction *action ); private: - void init( KActionCollection *collection, DCOPObject *parent ); + void init( TDEActionCollection *collection, DCOPObject *parent ); protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdeui/kdetrayproxy/kdetrayproxy.h b/tdeui/kdetrayproxy/kdetrayproxy.h index 640ae322b..9331aad5c 100644 --- a/tdeui/kdetrayproxy/kdetrayproxy.h +++ b/tdeui/kdetrayproxy/kdetrayproxy.h @@ -40,7 +40,7 @@ class KDETrayProxy void dockWindow( Window w, Window owner ); void withdrawWindow( Window w ); static Atom makeSelectionAtom(); - KSelectionWatcher selection; + TDESelectionWatcher selection; KWinModule module; TQValueList< Window > pending_windows; TQValueList< Window > tray_windows; diff --git a/tdeui/kdockwidget.cpp b/tdeui/kdockwidget.cpp index 0bfebe0ab..fc668e6d4 100644 --- a/tdeui/kdockwidget.cpp +++ b/tdeui/kdockwidget.cpp @@ -91,7 +91,7 @@ static const char* const not_close_xpm[]={ "#####"}; /** - * A special kind of KMainWindow that is able to have dockwidget child widgets. + * A special kind of TDEMainWindow that is able to have dockwidget child widgets. * * The main widget should be a dockwidget where other dockwidgets can be docked to * the left, right, top, bottom or to the middle. @@ -100,7 +100,7 @@ static const char* const not_close_xpm[]={ * @author Max Judin. */ KDockMainWindow::KDockMainWindow( TQWidget* parent, const char *name, WFlags f) -:KMainWindow( parent, name, f ) +:TDEMainWindow( parent, name, f ) { TQString new_name = TQString(name) + TQString("_DockManager"); dockManager = new KDockManager( this, new_name.latin1() ); @@ -126,7 +126,7 @@ void KDockMainWindow::setView( TQWidget *view ) } #ifndef NO_KDE2 - KMainWindow::setCentralWidget(view); + TDEMainWindow::setCentralWidget(view); #else TQMainWindow::setCentralWidget(view); #endif @@ -1653,7 +1653,7 @@ KDockManager::KDockManager( TQWidget* mainWindow , const char* name ) menuData->setAutoDelete( true ); #ifndef NO_KDE2 - menu = new KPopupMenu(); + menu = new TDEPopupMenu(); #else menu = new TQPopupMenu(); #endif @@ -3320,10 +3320,10 @@ void KDockManager::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void KDockMainWindow::virtual_hook( int id, void* data ) -{ KMainWindow::virtual_hook( id, data ); } +{ TDEMainWindow::virtual_hook( id, data ); } void KDockArea::virtual_hook( int, void* ) -{ /*KMainWindow::virtual_hook( id, data );*/ } +{ /*TDEMainWindow::virtual_hook( id, data );*/ } #ifndef NO_INCLUDE_MOCFILES // for Qt-only projects, because tmake doesn't take this name diff --git a/tdeui/kdockwidget.h b/tdeui/kdockwidget.h index 27b7f2b74..7d52d354c 100644 --- a/tdeui/kdockwidget.h +++ b/tdeui/kdockwidget.h @@ -36,7 +36,7 @@ - KDockTabGroup - minor helper class - KDockWidget - IMPORTANT CLASS: the one and only dockwidget class - KDockManager - helper class - - KDockMainWindow - IMPORTANT CLASS: a special KMainWindow that can have dockwidgets + - KDockMainWindow - IMPORTANT CLASS: a special TDEMainWindow that can have dockwidgets - KDockArea - like KDockMainWindow but inherits just QWidget IMPORTANT Note: This file compiles also in Qt-only mode by using the NO_KDE2 precompiler definition! @@ -80,7 +80,7 @@ class TQHBoxLayout; class TQPixmap; #ifndef NO_KDE2 -class KToolBar; +class TDEToolBar; class TDEConfig; #else class TQToolBar; @@ -1269,7 +1269,7 @@ private: }; /** - * A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwidget class set). + * A special kind of TDEMainWindow that is able to have dockwidget child widgets (and member of the dockwidget class set). * * The main widget should be a KDockWidget where other KDockWidget can be docked to * the left, right, top, bottom or to the middle. @@ -1311,7 +1311,7 @@ private: * * @author Max Judin (documentation: Falk Brettschneider). */ -class TDEUI_EXPORT KDockMainWindow : public KMainWindow +class TDEUI_EXPORT KDockMainWindow : public TDEMainWindow { Q_OBJECT diff --git a/tdeui/keditcl1.cpp b/tdeui/keditcl1.cpp index 5b4c21883..69bdc8aab 100644 --- a/tdeui/keditcl1.cpp +++ b/tdeui/keditcl1.cpp @@ -466,48 +466,48 @@ void KEdit::keyPressEvent ( TQKeyEvent *e) killing = false; - if ( KStdAccel::copy().contains( key ) ) + if ( TDEStdAccel::copy().contains( key ) ) copy(); else if ( isReadOnly() ) TQMultiLineEdit::keyPressEvent( e ); // If this is an unmodified printable key, send it directly to TQMultiLineEdit. else if ( !(key.keyCodeQt() & (CTRL | ALT)) && !e->text().isEmpty() && TQString(e->text()).unicode()->isPrint() ) TQMultiLineEdit::keyPressEvent( e ); - else if ( KStdAccel::paste().contains( key ) ) { + else if ( TDEStdAccel::paste().contains( key ) ) { paste(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::cut().contains( key ) ) { + else if ( TDEStdAccel::cut().contains( key ) ) { cut(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::undo().contains( key ) ) { + else if ( TDEStdAccel::undo().contains( key ) ) { undo(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::redo().contains( key ) ) { + else if ( TDEStdAccel::redo().contains( key ) ) { redo(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::deleteWordBack().contains( key ) ) { + else if ( TDEStdAccel::deleteWordBack().contains( key ) ) { moveCursor(MoveWordBackward, true); if (hasSelectedText()) del(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::deleteWordForward().contains( key ) ) { + else if ( TDEStdAccel::deleteWordForward().contains( key ) ) { moveCursor(MoveWordForward, true); if (hasSelectedText()) del(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::backwardWord().contains( key ) ) { + else if ( TDEStdAccel::backwardWord().contains( key ) ) { CursorAction action = MoveWordBackward; int para, index; getCursorPosition( ¶, & index ); @@ -516,7 +516,7 @@ void KEdit::keyPressEvent ( TQKeyEvent *e) moveCursor(action, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::forwardWord().contains( key ) ) { + else if ( TDEStdAccel::forwardWord().contains( key ) ) { CursorAction action = MoveWordForward; int para, index; getCursorPosition( ¶, & index ); @@ -525,27 +525,27 @@ void KEdit::keyPressEvent ( TQKeyEvent *e) moveCursor( action, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::next().contains( key ) ) { + else if ( TDEStdAccel::next().contains( key ) ) { moveCursor( MovePgDown, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::prior().contains( key ) ) { + else if ( TDEStdAccel::prior().contains( key ) ) { moveCursor( MovePgUp, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::home().contains( key ) ) { + else if ( TDEStdAccel::home().contains( key ) ) { moveCursor( MoveHome, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::end().contains( key ) ) { + else if ( TDEStdAccel::end().contains( key ) ) { moveCursor( MoveEnd, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::beginningOfLine().contains( key ) ) { + else if ( TDEStdAccel::beginningOfLine().contains( key ) ) { moveCursor( MoveLineStart, false); slotCursorPositionChanged(); } - else if ( KStdAccel::endOfLine().contains( key ) ) { + else if ( TDEStdAccel::endOfLine().contains( key ) ) { moveCursor( MoveLineEnd, false); slotCursorPositionChanged(); } @@ -567,7 +567,7 @@ void KEdit::installRBPopup(TQPopupMenu *p) { void KEdit::selectFont(){ TQFont font = this->font(); - KFontDialog::getFont(font); + TDEFontDialog::getFont(font); this->setFont(font); } diff --git a/tdeui/kedittoolbar.cpp b/tdeui/kedittoolbar.cpp index 5f9d71c0f..5b16e19df 100644 --- a/tdeui/kedittoolbar.cpp +++ b/tdeui/kedittoolbar.cpp @@ -78,7 +78,7 @@ public: TQDomDocument m_document; XmlType m_type; bool m_isModified; - KActionCollection* m_actionCollection; + TDEActionCollection* m_actionCollection; ToolbarList m_barList; }; @@ -88,7 +88,7 @@ typedef TQValueList XmlDataList; class ToolbarItem : public TQListViewItem { public: - ToolbarItem(KListView *parent, const TQString& tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null) + ToolbarItem(TDEListView *parent, const TQString& tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null) : TQListViewItem(parent), m_tag(tag), m_name(name), @@ -96,7 +96,7 @@ public: { } - ToolbarItem(KListView *parent, TQListViewItem *item, const TQString &tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null) + ToolbarItem(TDEListView *parent, TQListViewItem *item, const TQString &tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null) : TQListViewItem(parent, item), m_tag(tag), m_name(name), @@ -175,11 +175,11 @@ public: } }; -class ToolbarListView : public KListView +class ToolbarListView : public TDEListView { public: ToolbarListView(TQWidget *parent=0, const char *name=0) - : KListView(parent, name) + : TDEListView(parent, name) { } protected: @@ -214,7 +214,7 @@ public: * In a KParts application we let create a KXMLGUIClient create a dummy one, * but it probably isn't used. */ - KEditToolbarWidgetPrivate(TDEInstance *instance, KActionCollection* collection) + KEditToolbarWidgetPrivate(TDEInstance *instance, TDEActionCollection* collection) : m_collection( collection ) { m_instance = instance; @@ -337,8 +337,8 @@ public: } #endif - //TQValueList m_actionList; - KActionCollection* m_collection; + //TQValueList m_actionList; + TDEActionCollection* m_collection; TDEInstance *m_instance; XmlData* m_currentXmlData; @@ -368,14 +368,14 @@ public: // Save parameters for recreating widget after resetting toolbar bool m_global; - KActionCollection* m_collection; + TDEActionCollection* m_collection; TQString m_file; KXMLGUIFactory* m_factory; }; const char *KEditToolbar::s_defaultToolbar = 0L; -KEditToolbar::KEditToolbar(KActionCollection *collection, const TQString& file, +KEditToolbar::KEditToolbar(TDEActionCollection *collection, const TQString& file, bool global, TQWidget* parent, const char* name) : KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name), m_widget(new KEditToolbarWidget(TQString::fromLatin1(s_defaultToolbar), collection, file, global, this)) @@ -386,7 +386,7 @@ KEditToolbar::KEditToolbar(KActionCollection *collection, const TQString& file, d->m_file = file; } -KEditToolbar::KEditToolbar(const TQString& defaultToolbar, KActionCollection *collection, +KEditToolbar::KEditToolbar(const TQString& defaultToolbar, TDEActionCollection *collection, const TQString& file, bool global, TQWidget* parent, const char* name) : KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name), @@ -537,7 +537,7 @@ void KEditToolbar::setDefaultToolbar(const char *toolbarName) s_defaultToolbar = toolbarName; } -KEditToolbarWidget::KEditToolbarWidget(KActionCollection *collection, +KEditToolbarWidget::KEditToolbarWidget(TDEActionCollection *collection, const TQString& file, bool global, TQWidget *parent) : TQWidget(parent), @@ -551,7 +551,7 @@ KEditToolbarWidget::KEditToolbarWidget(KActionCollection *collection, } KEditToolbarWidget::KEditToolbarWidget(const TQString& defaultToolbar, - KActionCollection *collection, + TDEActionCollection *collection, const TQString& file, bool global, TQWidget *parent) : TQWidget(parent), @@ -594,7 +594,7 @@ KEditToolbarWidget::~KEditToolbarWidget() delete d; } -void KEditToolbarWidget::initNonKPart(KActionCollection *collection, +void KEditToolbarWidget::initNonKPart(TDEActionCollection *collection, const TQString& file, bool global) { //d->m_actionList = collection->actions(); @@ -805,10 +805,10 @@ void KEditToolbarWidget::setupLayout() m_activeList->setSorting(-1); active_label->setBuddy(m_activeList); - connect(m_inactiveList, TQT_SIGNAL(dropped(KListView*,TQDropEvent*,TQListViewItem*)), - this, TQT_SLOT(slotDropped(KListView*,TQDropEvent*,TQListViewItem*))); - connect(m_activeList, TQT_SIGNAL(dropped(KListView*,TQDropEvent*,TQListViewItem*)), - this, TQT_SLOT(slotDropped(KListView*,TQDropEvent*,TQListViewItem*))); + connect(m_inactiveList, TQT_SIGNAL(dropped(TDEListView*,TQDropEvent*,TQListViewItem*)), + this, TQT_SLOT(slotDropped(TDEListView*,TQDropEvent*,TQListViewItem*))); + connect(m_activeList, TQT_SIGNAL(dropped(TDEListView*,TQDropEvent*,TQListViewItem*)), + this, TQT_SLOT(slotDropped(TDEListView*,TQDropEvent*,TQListViewItem*))); connect(m_activeList, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(slotActiveSelected(TQListViewItem *))); connect(m_activeList, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int )), @@ -960,7 +960,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) m_downAction->setEnabled(false); // We'll use this action collection - KActionCollection* actionCollection = d->m_currentXmlData->m_actionCollection; + TDEActionCollection* actionCollection = d->m_currentXmlData->m_actionCollection; // store the names of our active actions TQMap active_list; @@ -1008,7 +1008,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) // putting any action into any client... for (unsigned int i = 0; i < actionCollection->count(); i++) { - KAction *action = actionCollection->action( i ); + TDEAction *action = actionCollection->action( i ); // do we have a match? if (it.attribute( attrName ) == action->name()) @@ -1031,7 +1031,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) // go through the rest of the collection for (int i = actionCollection->count() - 1; i > -1; --i) { - KAction *action = actionCollection->action( i ); + TDEAction *action = actionCollection->action( i ); // skip our active ones if (active_list.contains(action->name())) @@ -1053,7 +1053,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) act->setText(1, SEPARATORSTRING); } -KActionCollection *KEditToolbarWidget::actionCollection() const +TDEActionCollection *KEditToolbarWidget::actionCollection() const { return d->m_collection; } @@ -1135,7 +1135,7 @@ void KEditToolbarWidget::slotActiveSelected(TQListViewItem *item) } } -void KEditToolbarWidget::slotDropped(KListView *list, TQDropEvent *e, TQListViewItem *after) +void KEditToolbarWidget::slotDropped(TDEListView *list, TQDropEvent *e, TQListViewItem *after) { ToolbarItem *item = new ToolbarItem(m_inactiveList); // needs parent, use inactiveList temporarily if(!ToolbarItemDrag::decode(e, *item)) { diff --git a/tdeui/kedittoolbar.h b/tdeui/kedittoolbar.h index cc1a0069a..829cdd347 100644 --- a/tdeui/kedittoolbar.h +++ b/tdeui/kedittoolbar.h @@ -24,10 +24,10 @@ #include class TDEProcess; -class KActionCollection; +class TDEActionCollection; class TQComboBox; class TQToolButton; -class KListView; +class TDEListView; class TQListViewItem; class KEditToolbarWidget; @@ -61,7 +61,7 @@ namespace * That code snippet also takes care of redrawing the menu and * toolbars if you have made any changes. * - * If you are using KMainWindow's settings methods (either save/apply manually + * If you are using TDEMainWindow's settings methods (either save/apply manually * or autoSaveSettings), you should write something like: * \code * void MyClass::slotConfigureToolbars() @@ -123,7 +123,7 @@ public: * relative) of your application's UI resource file. If it is * left blank, then the resource file: share/apps/appname/appnameui.rc * is used. This is the same resource file that is used by the - * default createGUI() function in KMainWindow so you're usually + * default createGUI() function in TDEMainWindow so you're usually * pretty safe in leaving it blank. * * The third parameter, global(), controls whether or not the @@ -141,7 +141,7 @@ public: * @param parent The parent of the dialog. * @param name An internal name. */ - KEditToolbar(KActionCollection *collection, + KEditToolbar(TDEActionCollection *collection, const TQString& xmlfile = TQString::null, bool global = true, TQWidget* parent = 0, const char* name = 0); @@ -157,7 +157,7 @@ public: * @param name An internal name. * @since 3.2 */ - KEditToolbar(const TQString& defaultToolbar, KActionCollection *collection, + KEditToolbar(const TQString& defaultToolbar, TDEActionCollection *collection, const TQString& xmlfile = TQString::null, bool global = true, TQWidget* parent = 0, const char* name = 0); /** @@ -179,9 +179,9 @@ public: * @param parent The usual parent for the dialog. * @param name An internal name. * - * Some people seem tempted to use this also in non-KParts apps, using KMainWindow::guiFactory(). + * Some people seem tempted to use this also in non-KParts apps, using TDEMainWindow::guiFactory(). * This works, but only _if_ setting conserveMemory to false when calling - * KMainWindow::createGUI()! If not, use the other KEditToolbar constructor. + * TDEMainWindow::createGUI()! If not, use the other KEditToolbar constructor. */ KEditToolbar(KXMLGUIFactory* factory, TQWidget* parent = 0, const char* name = 0); @@ -281,7 +281,7 @@ public: * relative) of your application's UI resource file. If it is * left blank, then the resource file: share/apps/appname/appnameui.rc * is used. This is the same resource file that is used by the - * default createGUI function in KMainWindow so you're usually + * default createGUI function in TDEMainWindow so you're usually * pretty safe in leaving it blank. * * The third parameter, global, controls whether or not the @@ -300,7 +300,7 @@ public: * be parsed * @param parent This widget's parent */ - KEditToolbarWidget(KActionCollection *collection, + KEditToolbarWidget(TDEActionCollection *collection, const TQString& xmlfile = TQString::null, bool global = true, TQWidget *parent = 0L); @@ -316,7 +316,7 @@ public: * @since 3.2 */ KEditToolbarWidget(const TQString& defaultToolbar, - KActionCollection *collection, + TDEActionCollection *collection, const TQString& file = TQString::null, bool global = true, TQWidget *parent = 0L); @@ -366,7 +366,7 @@ public: /** * @internal Reimplemented for internal purposes. */ - virtual KActionCollection *actionCollection() const; + virtual TDEActionCollection *actionCollection() const; /** * Save any changes the user made. The file will be in the user's @@ -396,7 +396,7 @@ protected slots: void slotInactiveSelected(TQListViewItem *item); void slotActiveSelected(TQListViewItem *item); - void slotDropped(KListView *list, TQDropEvent *e, TQListViewItem *after); + void slotDropped(TDEListView *list, TQDropEvent *e, TQListViewItem *after); void slotInsertButton(); void slotRemoveButton(); @@ -414,7 +414,7 @@ protected: // KDE4: make private void insertActive(ToolbarItem *item, TQListViewItem *before, bool prepend = false); void removeActive(ToolbarItem *item); void moveActive(ToolbarItem *item, TQListViewItem *before); - void initNonKPart(KActionCollection *collection, const TQString& file, bool global); + void initNonKPart(TDEActionCollection *collection, const TQString& file, bool global); void initKPart(KXMLGUIFactory* factory); void loadToolbarCombo(const TQString& defaultToolbar = TQString::null); void loadActionList(TQDomElement& elem); diff --git a/tdeui/kfontcombo.cpp b/tdeui/kfontcombo.cpp index f36b18510..8ce088f8b 100644 --- a/tdeui/kfontcombo.cpp +++ b/tdeui/kfontcombo.cpp @@ -41,9 +41,9 @@ #include -struct KFontComboPrivate +struct TDEFontComboPrivate { - KFontComboPrivate() + TDEFontComboPrivate() : bold(false), italic(false), underline(false), @@ -65,11 +65,11 @@ struct KFontComboPrivate TQString defaultFamily; }; -class KFontListItem : public TQListBoxItem +class TDEFontListItem : public TQListBoxItem { public: - KFontListItem(const TQString &fontName, KFontCombo *combo); - virtual ~KFontListItem(); + TDEFontListItem(const TQString &fontName, TDEFontCombo *combo); + virtual ~TDEFontListItem(); virtual int width(const TQListBox *) const; virtual int height(const TQListBox *) const; @@ -83,13 +83,13 @@ private: void createFont(); private: - KFontCombo *m_combo; + TDEFontCombo *m_combo; TQString m_fontName; TQFont *m_font; bool m_canPaintName; }; -KFontListItem::KFontListItem(const TQString &fontName, KFontCombo *combo) +TDEFontListItem::TDEFontListItem(const TQString &fontName, TDEFontCombo *combo) : TQListBoxItem(combo->listBox()), m_combo(combo), m_fontName(fontName), @@ -99,19 +99,19 @@ KFontListItem::KFontListItem(const TQString &fontName, KFontCombo *combo) setText(fontName); } -KFontListItem::~KFontListItem() +TDEFontListItem::~TDEFontListItem() { delete m_font; } -int KFontListItem::width(const TQListBox *lb) const +int TDEFontListItem::width(const TQListBox *lb) const { if (m_font) return TQFontMetrics(*m_font).width(text()) + 6; return lb->fontMetrics().width(text()) + 6; } -int KFontListItem::height(const TQListBox *lb) const +int TDEFontListItem::height(const TQListBox *lb) const { if (m_combo->d->displayFonts) return m_combo->d->lineSpacing + 2; @@ -119,7 +119,7 @@ int KFontListItem::height(const TQListBox *lb) const return fm.lineSpacing() + 2; } -void KFontListItem::paint(TQPainter *p) +void TDEFontListItem::paint(TQPainter *p) { if (m_combo->d->displayFonts) { @@ -144,7 +144,7 @@ void KFontListItem::paint(TQPainter *p) } } -void KFontListItem::updateFont() +void TDEFontListItem::updateFont() { if (!m_font) return; @@ -156,7 +156,7 @@ void KFontListItem::updateFont() m_font->setPointSize(m_combo->d->size); } -void KFontListItem::createFont() +void TDEFontListItem::createFont() { if (m_font) return; @@ -172,33 +172,33 @@ void KFontListItem::createFont() updateFont(); } -KFontCombo::KFontCombo(TQWidget *parent, const char *name) +TDEFontCombo::TDEFontCombo(TQWidget *parent, const char *name) : KComboBox(true, parent, name) { init(); TQStringList families; - KFontChooser::getFontList(families, 0); + TDEFontChooser::getFontList(families, 0); setFonts(families); } -KFontCombo::KFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name) +TDEFontCombo::TDEFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name) : KComboBox(true, parent, name) { init(); setFonts(fonts); } -void KFontCombo::setFonts(const TQStringList &fonts) +void TDEFontCombo::setFonts(const TQStringList &fonts) { clear(); for (TQStringList::ConstIterator it = fonts.begin(); it != fonts.end(); ++it) - new KFontListItem(*it, this); + new TDEFontListItem(*it, this); } /* - * Maintenance note: Keep in sync with KFontAction::setFont() + * Maintenance note: Keep in sync with TDEFontAction::setFont() */ -void KFontCombo::setCurrentFont(const TQString &family) +void TDEFontCombo::setCurrentFont(const TQString &family) { TQString lowerName = family.lower(); int c = count(); @@ -257,27 +257,27 @@ void KFontCombo::setCurrentFont(const TQString &family) setCurrentFont( realFamily ); } -void KFontCombo::slotModified( int ) +void TDEFontCombo::slotModified( int ) { d->modified = 1; } -TQString KFontCombo::currentFont() const +TQString TDEFontCombo::currentFont() const { if (d->modified) return currentText(); return d->defaultFamily; } -void KFontCombo::setCurrentItem(int i) +void TDEFontCombo::setCurrentItem(int i) { d->modified = true; TQComboBox::setCurrentItem(i); } -void KFontCombo::init() +void TDEFontCombo::init() { - d = new KFontComboPrivate; + d = new TDEFontComboPrivate; d->displayFonts = displayFonts(); setInsertionPolicy(NoInsertion); setAutoCompletion(true); @@ -285,12 +285,12 @@ void KFontCombo::init() connect( this, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotModified(int))); } -KFontCombo::~KFontCombo() +TDEFontCombo::~TDEFontCombo() { delete d; } -void KFontCombo::setBold(bool bold) +void TDEFontCombo::setBold(bool bold) { if (d->bold == bold) return; @@ -298,12 +298,12 @@ void KFontCombo::setBold(bool bold) updateFonts(); } -bool KFontCombo::bold() const +bool TDEFontCombo::bold() const { return d->bold; } -void KFontCombo::setItalic(bool italic) +void TDEFontCombo::setItalic(bool italic) { if (d->italic == italic) return; @@ -311,12 +311,12 @@ void KFontCombo::setItalic(bool italic) updateFonts(); } -bool KFontCombo::italic() const +bool TDEFontCombo::italic() const { return d->italic; } -void KFontCombo::setUnderline(bool underline) +void TDEFontCombo::setUnderline(bool underline) { if (d->underline == underline) return; @@ -324,12 +324,12 @@ void KFontCombo::setUnderline(bool underline) updateFonts(); } -bool KFontCombo::underline() const +bool TDEFontCombo::underline() const { return d->underline; } -void KFontCombo::setStrikeOut(bool strikeOut) +void TDEFontCombo::setStrikeOut(bool strikeOut) { if (d->strikeOut == strikeOut) return; @@ -337,12 +337,12 @@ void KFontCombo::setStrikeOut(bool strikeOut) updateFonts(); } -bool KFontCombo::strikeOut() const +bool TDEFontCombo::strikeOut() const { return d->strikeOut; } -void KFontCombo::setSize(int size) +void TDEFontCombo::setSize(int size) { if (d->size == size) return; @@ -354,29 +354,29 @@ void KFontCombo::setSize(int size) updateFonts(); } -int KFontCombo::size() const +int TDEFontCombo::size() const { return d->size; } -void KFontCombo::updateFonts() +void TDEFontCombo::updateFonts() { if (!d->displayFonts) return; for (unsigned int i = 0; i < listBox()->count(); ++i) { - KFontListItem *item = static_cast(listBox()->item(i)); + TDEFontListItem *item = static_cast(listBox()->item(i)); item->updateFont(); } } -bool KFontCombo::displayFonts() +bool TDEFontCombo::displayFonts() { TDEConfigGroupSaver saver(TDEGlobal::config(), "KDE"); return TDEGlobal::config()->readBoolEntry("DisplayFontItems", true); } -void KFontCombo::virtual_hook( int id, void* data ) +void TDEFontCombo::virtual_hook( int id, void* data ) { KComboBox::virtual_hook( id, data ); } diff --git a/tdeui/kfontcombo.h b/tdeui/kfontcombo.h index 9b480ff18..13c55215b 100644 --- a/tdeui/kfontcombo.h +++ b/tdeui/kfontcombo.h @@ -32,7 +32,7 @@ * * @author Malte Starostik */ -class TDEUI_EXPORT KFontCombo : public KComboBox +class TDEUI_EXPORT TDEFontCombo : public KComboBox { Q_OBJECT TQ_PROPERTY(TQString family READ currentFont WRITE setCurrentFont) @@ -48,7 +48,7 @@ public: * @param parent The parent widget * @param name The object name for the widget */ - KFontCombo(TQWidget *parent, const char *name = 0); + TDEFontCombo(TQWidget *parent, const char *name = 0); /** * Constructor that takes an already initialzed font list * @@ -56,11 +56,11 @@ public: * @param parent The parent widget * @param name The object name for the widget */ - KFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name = 0); + TDEFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name = 0); /** * Destructor */ - virtual ~KFontCombo(); + virtual ~TDEFontCombo(); /** * Sets the font list. @@ -168,11 +168,11 @@ private: void init(); private: - friend class KFontListItem; + friend class TDEFontListItem; protected: virtual void virtual_hook( int id, void* data ); private: - struct KFontComboPrivate *d; + struct TDEFontComboPrivate *d; }; #endif diff --git a/tdeui/kfontdialog.cpp b/tdeui/kfontdialog.cpp index 97f43544c..107755e7f 100644 --- a/tdeui/kfontdialog.cpp +++ b/tdeui/kfontdialog.cpp @@ -80,16 +80,16 @@ static int minimumListHeight( const TQListBox *list, int numVisibleEntry ) return ( w * numVisibleEntry + 2 * list->frameWidth() ); } -class KFontChooser::KFontChooserPrivate +class TDEFontChooser::TDEFontChooserPrivate { public: - KFontChooserPrivate() + TDEFontChooserPrivate() { m_palette.setColor(TQPalette::Active, TQColorGroup::Text, Qt::black); m_palette.setColor(TQPalette::Active, TQColorGroup::Base, Qt::white); } TQPalette m_palette; }; -KFontChooser::KFontChooser(TQWidget *parent, const char *name, +TDEFontChooser::TDEFontChooser(TQWidget *parent, const char *name, bool onlyFixed, const TQStringList &fontList, bool makeFrame, int visibleListSize, bool diff, TQButton::ToggleState *sizeIsRelativeState ) @@ -101,7 +101,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, i18n( "Here you can choose the font to be used." ); TQWhatsThis::add( this, mainWhatsThisText ); - d = new KFontChooserPrivate; + d = new TDEFontChooserPrivate; TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); int checkBoxGap = KDialog::spacingHint() / 2; @@ -192,7 +192,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, // // now create the actual boxes that hold the info // - familyListBox = new KListBox( page, "familyListBox"); + familyListBox = new TDEListBox( page, "familyListBox"); familyListBox->setEnabled( !diff ); gridLayout->addWidget( familyListBox, row, 0 ); TQString fontFamilyWhatsThisText = @@ -214,7 +214,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, familyListBox->setMinimumHeight( minimumListHeight( familyListBox, visibleListSize ) ); - styleListBox = new KListBox( page, "styleListBox"); + styleListBox = new TDEListBox( page, "styleListBox"); styleListBox->setEnabled( !diff ); gridLayout->addWidget(styleListBox, row, 1); TQString fontStyleWhatsThisText = @@ -233,7 +233,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, TQT_SLOT(style_chosen_slot(const TQString &))); - sizeListBox = new KListBox( page, "sizeListBox"); + sizeListBox = new TDEListBox( page, "sizeListBox"); sizeOfFont = new KIntNumInput( page, "sizeOfFont"); sizeOfFont->setMinValue(4); @@ -335,12 +335,12 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false)); } -KFontChooser::~KFontChooser() +TDEFontChooser::~TDEFontChooser() { delete d; } -void KFontChooser::fillSizeList() { +void TDEFontChooser::fillSizeList() { if(! sizeListBox) return; //assertion. static const int c[] = @@ -359,7 +359,7 @@ void KFontChooser::fillSizeList() { } } -void KFontChooser::setColor( const TQColor & col ) +void TDEFontChooser::setColor( const TQColor & col ) { d->m_palette.setColor( TQPalette::Active, TQColorGroup::Text, col ); TQPalette pal = sampleEdit->palette(); @@ -367,12 +367,12 @@ void KFontChooser::setColor( const TQColor & col ) sampleEdit->setPalette( pal ); } -TQColor KFontChooser::color() const +TQColor TDEFontChooser::color() const { return d->m_palette.color( TQPalette::Active, TQColorGroup::Text ); } -void KFontChooser::setBackgroundColor( const TQColor & col ) +void TDEFontChooser::setBackgroundColor( const TQColor & col ) { d->m_palette.setColor( TQPalette::Active, TQColorGroup::Base, col ); TQPalette pal = sampleEdit->palette(); @@ -380,12 +380,12 @@ void KFontChooser::setBackgroundColor( const TQColor & col ) sampleEdit->setPalette( pal ); } -TQColor KFontChooser::backgroundColor() const +TQColor TDEFontChooser::backgroundColor() const { return d->m_palette.color( TQPalette::Active, TQColorGroup::Base ); } -void KFontChooser::setSizeIsRelative( TQButton::ToggleState relative ) +void TDEFontChooser::setSizeIsRelative( TQButton::ToggleState relative ) { // check or uncheck or gray out the "relative" checkbox if( sizeIsRelativeCheckBox ) { @@ -396,20 +396,20 @@ void KFontChooser::setSizeIsRelative( TQButton::ToggleState relative ) } } -TQButton::ToggleState KFontChooser::sizeIsRelative() const +TQButton::ToggleState TDEFontChooser::sizeIsRelative() const { return sizeIsRelativeCheckBox ? sizeIsRelativeCheckBox->state() : TQButton::NoChange; } -TQSize KFontChooser::sizeHint( void ) const +TQSize TDEFontChooser::sizeHint( void ) const { return minimumSizeHint(); } -void KFontChooser::enableColumn( int column, bool state ) +void TDEFontChooser::enableColumn( int column, bool state ) { if( column & FamilyList ) { @@ -426,7 +426,7 @@ void KFontChooser::enableColumn( int column, bool state ) } -void KFontChooser::setFont( const TQFont& aFont, bool onlyFixed ) +void TDEFontChooser::setFont( const TQFont& aFont, bool onlyFixed ) { selFont = aFont; selectedSize=aFont.pointSize(); @@ -443,7 +443,7 @@ void KFontChooser::setFont( const TQFont& aFont, bool onlyFixed ) } -int KFontChooser::fontDiffFlags() { +int TDEFontChooser::fontDiffFlags() { int diffFlags = 0; if (familyCheckbox && styleCheckbox && sizeCheckbox) { diffFlags = (int)(familyCheckbox->isChecked() ? FontDiffFamily : 0) @@ -453,7 +453,7 @@ int KFontChooser::fontDiffFlags() { return diffFlags; } -void KFontChooser::toggled_checkbox() +void TDEFontChooser::toggled_checkbox() { familyListBox->setEnabled( familyCheckbox->isChecked() ); styleListBox->setEnabled( styleCheckbox->isChecked() ); @@ -461,7 +461,7 @@ void KFontChooser::toggled_checkbox() sizeOfFont->setEnabled( sizeCheckbox->isChecked() ); } -void KFontChooser::family_chosen_slot(const TQString& family) +void TDEFontChooser::family_chosen_slot(const TQString& family) { TQFontDatabase dbase; TQStringList styles = TQStringList(dbase.styles(family)); @@ -496,7 +496,7 @@ void KFontChooser::family_chosen_slot(const TQString& family) style_chosen_slot(TQString::null); } -void KFontChooser::size_chosen_slot(const TQString& size){ +void TDEFontChooser::size_chosen_slot(const TQString& size){ selectedSize=size.toInt(); sizeOfFont->setValue(selectedSize); @@ -504,12 +504,12 @@ void KFontChooser::size_chosen_slot(const TQString& size){ emit fontSelected(selFont); } -void KFontChooser::size_value_slot(int val) { +void TDEFontChooser::size_value_slot(int val) { selFont.setPointSize(val); emit fontSelected(selFont); } -void KFontChooser::style_chosen_slot(const TQString& style) +void TDEFontChooser::style_chosen_slot(const TQString& style) { TQString currentStyle; if (style.isEmpty()) @@ -549,7 +549,7 @@ void KFontChooser::style_chosen_slot(const TQString& style) selectedStyle = style; } -void KFontChooser::displaySample(const TQFont& font) +void TDEFontChooser::displaySample(const TQFont& font) { sampleEdit->setFont(font); sampleEdit->setCursorPosition(0); @@ -561,7 +561,7 @@ void KFontChooser::displaySample(const TQFont& font) //kdDebug() << " (" << font.toString() << ")\n"; } -void KFontChooser::setupDisplay() +void TDEFontChooser::setupDisplay() { // Calling familyListBox->setCurrentItem() causes the value of selFont // to change, so we save the family, style and size beforehand. @@ -638,7 +638,7 @@ void KFontChooser::setupDisplay() } -void KFontChooser::getFontList( TQStringList &list, uint fontListCriteria) +void TDEFontChooser::getFontList( TQStringList &list, uint fontListCriteria) { TQFontDatabase dbase; TQStringList lstSys(dbase.families()); @@ -671,7 +671,7 @@ void KFontChooser::getFontList( TQStringList &list, uint fontListCriteria) list = lstSys; } -void KFontChooser::addFont( TQStringList &list, const char *xfont ) +void TDEFontChooser::addFont( TQStringList &list, const char *xfont ) { const char *ptr = strchr( xfont, '-' ); if ( !ptr ) @@ -699,7 +699,7 @@ void KFontChooser::addFont( TQStringList &list, const char *xfont ) } } -void KFontChooser::fillFamilyListBox(bool onlyFixedFonts) +void TDEFontChooser::fillFamilyListBox(bool onlyFixedFonts) { TQStringList fontList; getFontList(fontList, onlyFixedFonts?FixedWidthFonts:0); @@ -707,7 +707,7 @@ void KFontChooser::fillFamilyListBox(bool onlyFixedFonts) familyListBox->insertStringList(fontList); } -void KFontChooser::showXLFDArea(bool show) +void TDEFontChooser::showXLFDArea(bool show) { if( show ) { @@ -721,24 +721,24 @@ void KFontChooser::showXLFDArea(bool show) /////////////////////////////////////////////////////////////////////////////// -KFontDialog::KFontDialog( TQWidget *parent, const char* name, +TDEFontDialog::TDEFontDialog( TQWidget *parent, const char* name, bool onlyFixed, bool modal, const TQStringList &fontList, bool makeFrame, bool diff, TQButton::ToggleState *sizeIsRelativeState ) : KDialogBase( parent, name, modal, i18n("Select Font"), Ok|Cancel, Ok ) { - chooser = new KFontChooser( this, "fontChooser", + chooser = new TDEFontChooser( this, "fontChooser", onlyFixed, fontList, makeFrame, 8, diff, sizeIsRelativeState ); setMainWidget(chooser); } -int KFontDialog::getFontDiff( TQFont &theFont, int &diffFlags, bool onlyFixed, +int TDEFontDialog::getFontDiff( TQFont &theFont, int &diffFlags, bool onlyFixed, TQWidget *parent, bool makeFrame, TQButton::ToggleState *sizeIsRelativeState ) { - KFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(), + TDEFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(), makeFrame, true, sizeIsRelativeState ); dlg.setFont( theFont, onlyFixed ); @@ -753,11 +753,11 @@ int KFontDialog::getFontDiff( TQFont &theFont, int &diffFlags, bool onlyFixed, return result; } -int KFontDialog::getFont( TQFont &theFont, bool onlyFixed, +int TDEFontDialog::getFont( TQFont &theFont, bool onlyFixed, TQWidget *parent, bool makeFrame, TQButton::ToggleState *sizeIsRelativeState ) { - KFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(), + TDEFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(), makeFrame, false, sizeIsRelativeState ); dlg.setFont( theFont, onlyFixed ); @@ -772,12 +772,12 @@ int KFontDialog::getFont( TQFont &theFont, bool onlyFixed, } -int KFontDialog::getFontAndText( TQFont &theFont, TQString &theString, +int TDEFontDialog::getFontAndText( TQFont &theFont, TQString &theString, bool onlyFixed, TQWidget *parent, bool makeFrame, TQButton::ToggleState *sizeIsRelativeState ) { - KFontDialog dlg( parent, "Font and Text Selector", onlyFixed, true, + TDEFontDialog dlg( parent, "Font and Text Selector", onlyFixed, true, TQStringList(), makeFrame, false, sizeIsRelativeState ); dlg.setFont( theFont, onlyFixed ); @@ -792,8 +792,8 @@ int KFontDialog::getFontAndText( TQFont &theFont, TQString &theString, return result; } -void KFontChooser::virtual_hook( int, void* ) +void TDEFontChooser::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KFontDialog::virtual_hook( int id, void* data ) +void TDEFontDialog::virtual_hook( int id, void* data ) { KDialogBase::virtual_hook( id, data ); } diff --git a/tdeui/kfontdialog.h b/tdeui/kfontdialog.h index 7f859543c..cce427eba 100644 --- a/tdeui/kfontdialog.h +++ b/tdeui/kfontdialog.h @@ -36,22 +36,22 @@ class TQFont; class TQGroupBox; class TQLabel; class TQStringList; -class KListBox; +class TDEListBox; class KIntNumInput; /** * @short A font selection widget. * - * While KFontChooser as an ordinary widget can be embedded in + * While TDEFontChooser as an ordinary widget can be embedded in * custom dialogs and therefore is very flexible, in most cases * it is preferable to use the convenience functions in - * KFontDialog. + * TDEFontDialog. * * \image html kfontchooser.png "KDE Font Chooser" * * @author Preston Brown , Bernd Wuebben * @version $Id$ */ -class TDEUI_EXPORT KFontChooser : public TQWidget +class TDEUI_EXPORT TDEFontChooser : public TQWidget { Q_OBJECT TQ_PROPERTY( TQFont font READ font WRITE setFont ) @@ -79,8 +79,8 @@ public: *

Consider the following code snippet; * \code * TQStringList list; - * KFontChooser::getFontList(list,SmoothScalableFonts); - * KFontChooser chooseFont = new KFontChooser(0, "FontList", false, list); + * TDEFontChooser::getFontList(list,SmoothScalableFonts); + * TDEFontChooser chooseFont = new TDEFontChooser(0, "FontList", false, list); * \endcode *

* The above creates a font chooser dialog with only SmoothScaleble fonts. @@ -94,7 +94,7 @@ public: * If that has not been created, X is queried, and all fonts * available on the system are displayed. * @param diff Display the difference version dialog. - * See KFontDialog::getFontDiff(). + * See TDEFontDialog::getFontDiff(). * @param makeFrame Draws a frame with titles around the contents. * @param visibleListSize The minimum number of visible entries in the * fontlists. @@ -105,7 +105,7 @@ public: * *sizeIsRelativeState, user choice may be retrieved by * calling sizeIsRelative(). */ - KFontChooser(TQWidget *parent = 0L, const char *name = 0L, + TDEFontChooser(TQWidget *parent = 0L, const char *name = 0L, bool onlyFixed = false, const TQStringList &fontList = TQStringList(), bool makeFrame = true, int visibleListSize=8, @@ -114,7 +114,7 @@ public: /** * Destructs the font chooser. */ - virtual ~KFontChooser(); + virtual ~TDEFontChooser(); /** * Enables or disable a font column in the chooser. @@ -245,7 +245,7 @@ public: * * @param list The list is returned here. * @param fontListCriteria should contain all the restrictions for font selection as OR-ed values - * @see KFontChooser::FontListCriteria for the individual values + * @see TDEFontChooser::FontListCriteria for the individual values */ static void getFontList( TQStringList &list, uint fontListCriteria); @@ -291,9 +291,9 @@ private: TQCheckBox *styleCheckbox; TQCheckBox *sizeCheckbox; TQLabel *sizeLabel; - KListBox *familyListBox; - KListBox *styleListBox; - KListBox *sizeListBox; + TDEListBox *familyListBox; + TDEListBox *styleListBox; + TDEListBox *sizeListBox; TQComboBox *charsetsCombo; // BIC: remove in KDE4 TQCheckBox *sizeIsRelativeCheckBox; @@ -308,17 +308,17 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KFontChooserPrivate; - KFontChooserPrivate *d; + class TDEFontChooserPrivate; + TDEFontChooserPrivate *d; }; /** * @short A font selection dialog. * - * The KFontDialog provides a dialog for interactive font selection. - * It is basically a thin wrapper around the KFontChooser widget, + * The TDEFontDialog provides a dialog for interactive font selection. + * It is basically a thin wrapper around the TDEFontChooser widget, * which can also be used standalone. In most cases, the simplest - * use of this class is the static method KFontDialog::getFont(), + * use of this class is the static method TDEFontDialog::getFont(), * which pops up the dialog, allows the user to select a font, and * returns when the dialog is closed. * @@ -326,8 +326,8 @@ private: * * \code * TQFont myFont; - * int result = KFontDialog::getFont( myFont ); - * if ( result == KFontDialog::Accepted ) + * int result = TDEFontDialog::getFont( myFont ); + * if ( result == TDEFontDialog::Accepted ) * ... * \endcode * @@ -336,7 +336,7 @@ private: * @author Preston Brown , Bernd Wuebben * @version $Id$ */ -class TDEUI_EXPORT KFontDialog : public KDialogBase { +class TDEUI_EXPORT TDEFontDialog : public KDialogBase { Q_OBJECT public: @@ -362,7 +362,7 @@ public: * calling sizeIsRelative(). * */ - KFontDialog( TQWidget *parent = 0L, const char *name = 0, + TDEFontDialog( TQWidget *parent = 0L, const char *name = 0, bool onlyFixed = false, bool modal = false, const TQStringList &fontlist = TQStringList(), bool makeFrame = true, bool diff = false, @@ -434,11 +434,11 @@ public: * difference selection bitmask should be written. * Check the returned bitmask like: * \code - * if ( diffFlags & KFontChooser::FontDiffFamily ) + * if ( diffFlags & TDEFontChooser::FontDiffFamily ) * [...] - * if ( diffFlags & KFontChooser::FontDiffStyle ) + * if ( diffFlags & TDEFontChooser::FontDiffStyle ) * [...] - * if ( diffFlags & KFontChooser::FontDiffSize ) + * if ( diffFlags & TDEFontChooser::FontDiffSize ) * [...] * \endcode * @param onlyFixed if true, only select from fixed-width fonts. @@ -491,13 +491,13 @@ signals: void fontSelected( const TQFont &font ); protected: - KFontChooser *chooser; + TDEFontChooser *chooser; protected: virtual void virtual_hook( int id, void* data ); private: - class KFontDialogPrivate; - KFontDialogPrivate *d; + class TDEFontDialogPrivate; + TDEFontDialogPrivate *d; }; diff --git a/tdeui/kfontrequester.cpp b/tdeui/kfontrequester.cpp index 293f9d546..8ae0d705d 100644 --- a/tdeui/kfontrequester.cpp +++ b/tdeui/kfontrequester.cpp @@ -28,7 +28,7 @@ #include #include -KFontRequester::KFontRequester( TQWidget *parent, const char *name, +TDEFontRequester::TDEFontRequester( TQWidget *parent, const char *name, bool onlyFixed ) : TQWidget( parent, name ), m_onlyFixed( onlyFixed ) { @@ -49,7 +49,7 @@ KFontRequester::KFontRequester( TQWidget *parent, const char *name, setToolTip(); } -void KFontRequester::setFont( const TQFont &font, bool onlyFixed ) +void TDEFontRequester::setFont( const TQFont &font, bool onlyFixed ) { m_selFont = font; m_onlyFixed = onlyFixed; @@ -58,21 +58,21 @@ void KFontRequester::setFont( const TQFont &font, bool onlyFixed ) emit fontSelected( m_selFont ); } -void KFontRequester::setSampleText( const TQString &text ) +void TDEFontRequester::setSampleText( const TQString &text ) { m_sampleText = text; displaySampleText(); } -void KFontRequester::setTitle( const TQString &title ) +void TDEFontRequester::setTitle( const TQString &title ) { m_title = title; setToolTip(); } -void KFontRequester::buttonClicked() +void TDEFontRequester::buttonClicked() { - int result = KFontDialog::getFont( m_selFont, m_onlyFixed, parentWidget() ); + int result = TDEFontDialog::getFont( m_selFont, m_onlyFixed, parentWidget() ); if ( result == KDialog::Accepted ) { @@ -81,7 +81,7 @@ void KFontRequester::buttonClicked() } } -void KFontRequester::displaySampleText() +void TDEFontRequester::displaySampleText() { m_sampleLabel->setFont( m_selFont ); @@ -96,7 +96,7 @@ void KFontRequester::displaySampleText() m_sampleLabel->setText( m_sampleText ); } -void KFontRequester::setToolTip() +void TDEFontRequester::setToolTip() { TQToolTip::remove( m_button ); TQToolTip::add( m_button, i18n( "Click to select a font" ) ); diff --git a/tdeui/kfontrequester.h b/tdeui/kfontrequester.h index 5d59f5897..b686cf178 100644 --- a/tdeui/kfontrequester.h +++ b/tdeui/kfontrequester.h @@ -31,7 +31,7 @@ class TQPushButton; /** * This class provides a widget with a lineedit and a button, which invokes - * a font dialog (KFontDialog). + * a font dialog (TDEFontDialog). * * The lineedit provides a preview of the selected font. The preview text can * be customized. You can also have the font dialog show only the fixed fonts. @@ -41,7 +41,7 @@ class TQPushButton; * @author Nadeem Hasan * */ -class TDEUI_EXPORT KFontRequester : public TQWidget +class TDEUI_EXPORT TDEFontRequester : public TQWidget { Q_OBJECT @@ -59,7 +59,7 @@ class TDEUI_EXPORT KFontRequester : public TQWidget * @param onlyFixed Only display fonts which have fixed-width character * sizes. */ - KFontRequester( TQWidget *parent=0L, const char *name=0L, + TDEFontRequester( TQWidget *parent=0L, const char *name=0L, bool onlyFixed=false ); /** @@ -147,8 +147,8 @@ class TDEUI_EXPORT KFontRequester : public TQWidget private: - class KFontRequesterPrivate; - KFontRequesterPrivate *d; + class TDEFontRequesterPrivate; + TDEFontRequesterPrivate *d; }; #endif // KFONTREQUESTER_H diff --git a/tdeui/khelpmenu.cpp b/tdeui/khelpmenu.cpp index 0faa137e4..33e6210ff 100644 --- a/tdeui/khelpmenu.cpp +++ b/tdeui/khelpmenu.cpp @@ -75,7 +75,7 @@ KHelpMenu::KHelpMenu( TQWidget *parent, const TQString &aboutAppText, } KHelpMenu::KHelpMenu( TQWidget *parent, const TDEAboutData *aboutData, - bool showWhatsThis, KActionCollection *actions ) + bool showWhatsThis, TDEActionCollection *actions ) : TQObject(parent), mMenu(0), mAboutApp(0), mAboutKDE(0), mBugReport(0), d(new KHelpMenuPrivate) { @@ -109,7 +109,7 @@ KHelpMenu::~KHelpMenu() } -KPopupMenu* KHelpMenu::menu() +TDEPopupMenu* KHelpMenu::menu() { if( !mMenu ) { @@ -121,20 +121,20 @@ KPopupMenu* KHelpMenu::menu() const TDEAboutData *aboutData = d->mAboutData ? d->mAboutData : TDEGlobal::instance()->aboutData(); TQString appName = (aboutData)? aboutData->programName() : TQString::fromLatin1(tqApp->name()); - mMenu = new KPopupMenu(); + mMenu = new TDEPopupMenu(); connect( mMenu, TQT_SIGNAL(destroyed()), this, TQT_SLOT(menuDestroyed())); bool need_separator = false; - if (kapp->authorizeKAction("help_contents")) + if (kapp->authorizeTDEAction("help_contents")) { mMenu->insertItem( BarIcon( "contents", KIcon::SizeSmall), TQString(i18n( "%1 &Handbook" ).arg( appName)) ,menuHelpContents ); mMenu->connectItem( menuHelpContents, this, TQT_SLOT(appHelpActivated()) ); - mMenu->setAccel( KStdAccel::shortcut(KStdAccel::Help), menuHelpContents ); + mMenu->setAccel( TDEStdAccel::shortcut(TDEStdAccel::Help), menuHelpContents ); need_separator = true; } - if( mShowWhatsThis && kapp->authorizeKAction("help_whats_this") ) + if( mShowWhatsThis && kapp->authorizeTDEAction("help_whats_this") ) { TQToolButton* wtb = TQWhatsThis::whatsThisButton(0); mMenu->insertItem( wtb->iconSet(),i18n( "What's &This" ), menuWhatsThis); @@ -144,7 +144,7 @@ KPopupMenu* KHelpMenu::menu() need_separator = true; } - if (kapp->authorizeKAction("help_report_bug") && aboutData && !aboutData->bugAddress().isEmpty() ) + if (kapp->authorizeTDEAction("help_report_bug") && aboutData && !aboutData->bugAddress().isEmpty() ) { if (need_separator) mMenu->insertSeparator(); @@ -153,7 +153,7 @@ KPopupMenu* KHelpMenu::menu() need_separator = true; } - if (kapp->authorizeKAction("switch_application_language")) + if (kapp->authorizeTDEAction("switch_application_language")) { if (need_separator) mMenu->insertSeparator(); @@ -165,14 +165,14 @@ KPopupMenu* KHelpMenu::menu() if (need_separator) mMenu->insertSeparator(); - if (kapp->authorizeKAction("help_about_app")) + if (kapp->authorizeTDEAction("help_about_app")) { mMenu->insertItem( kapp->miniIcon(), TQString(i18n( "&About %1" ).arg(appName)), menuAboutApp ); mMenu->connectItem( menuAboutApp, this, TQT_SLOT( aboutApplication() ) ); } - if (kapp->authorizeKAction("help_about_kde")) + if (kapp->authorizeTDEAction("help_about_kde")) { mMenu->insertItem( SmallIcon("about_kde"), i18n( "About &Trinity" ), menuAboutKDE ); mMenu->connectItem( menuAboutKDE, this, TQT_SLOT( aboutKDE() ) ); diff --git a/tdeui/khelpmenu.h b/tdeui/khelpmenu.h index 0f2a7078f..64745d79d 100644 --- a/tdeui/khelpmenu.h +++ b/tdeui/khelpmenu.h @@ -27,8 +27,8 @@ #include -class KActionCollection; -class KPopupMenu; +class TDEActionCollection; +class TDEPopupMenu; class TQWidget; class TDEAboutData; @@ -44,10 +44,10 @@ class KHelpMenuPrivate; * This class provides the standard %KDE help menu with the default "about" * dialog boxes and help entry. * - * This class is used in KMainWindow so + * This class is used in TDEMainWindow so * normally you don't need to use this class yourself. However, if you * need the help menu or any of its dialog boxes in your code that is - * not subclassed from KMainWindow you should use this class. + * not subclassed from TDEMainWindow you should use this class. * * The usage is simple: * @@ -64,7 +64,7 @@ class KHelpMenuPrivate; * \endcode * * IMPORTANT: - * The first time you use KHelpMenu::menu(), a KPopupMenu object is + * The first time you use KHelpMenu::menu(), a TDEPopupMenu object is * allocated. Only one object is created by the class so if you call * KHelpMenu::menu() twice or more, the same pointer is returned. The class * will destroy the popupmenu in the destructor so do not delete this @@ -115,7 +115,7 @@ class KHelpMenuPrivate; * void MyClass::myFunc() * { * KHelpMenu *helpMenu = new KHelpMenu( this ); - * KPopupMenu *help = mHelpMenu->menu(); + * TDEPopupMenu *help = mHelpMenu->menu(); * help->connectItem( KHelpMenu::menuAboutApp, this, TQT_SLOT(myDialogSlot()) ); * } * @@ -171,12 +171,12 @@ class TDEUI_EXPORT KHelpMenu : public TQObject * @param aboutData User and app data used in the About app dialog * @param showWhatsThis Decides whether a "Whats this" entry will be * added to the dialog. - * @param actions KActionCollection that is used instead of the + * @param actions TDEActionCollection that is used instead of the * standard actions. * */ KHelpMenu( TQWidget *parent, const TDEAboutData *aboutData, - bool showWhatsThis=true, KActionCollection *actions = 0 ); + bool showWhatsThis=true, TDEActionCollection *actions = 0 ); /** * Destructor @@ -192,7 +192,7 @@ class TDEUI_EXPORT KHelpMenu : public TQObject * Note: This method will only create one instance of the menu. If * you call this method twice or more the same pointer is returned */ - KPopupMenu *menu(); + TDEPopupMenu *menu(); public slots: /** @@ -261,7 +261,7 @@ class TDEUI_EXPORT KHelpMenu : public TQObject void showAboutApplication(); private: - KPopupMenu *mMenu; + TDEPopupMenu *mMenu; KDialogBase *mAboutApp; KAboutKDE *mAboutKDE; KBugReport *mBugReport; diff --git a/tdeui/kinputdialog.cpp b/tdeui/kinputdialog.cpp index 61b30cce1..948cdd393 100644 --- a/tdeui/kinputdialog.cpp +++ b/tdeui/kinputdialog.cpp @@ -44,7 +44,7 @@ class KInputDialogPrivate KIntSpinBox *m_intSpinBox; KDoubleSpinBox *m_doubleSpinBox; KComboBox *m_comboBox; - KListBox *m_listBox; + TDEListBox *m_listBox; KTextEdit *m_textEdit; }; @@ -187,7 +187,7 @@ KInputDialog::KInputDialog( const TQString &caption, const TQString &label, slotUpdateButtons( d->m_comboBox->currentText() ); d->m_comboBox->setFocus(); } else { - d->m_listBox = new KListBox( frame ); + d->m_listBox = new TDEListBox( frame ); d->m_listBox->insertStringList( list ); d->m_listBox->setSelected( current, true ); d->m_listBox->ensureCurrentVisible(); @@ -217,7 +217,7 @@ KInputDialog::KInputDialog( const TQString &caption, const TQString &label, d->m_label = new TQLabel( label, frame ); layout->addWidget( d->m_label ); - d->m_listBox = new KListBox( frame ); + d->m_listBox = new TDEListBox( frame ); d->m_listBox->insertStringList( list ); layout->addWidget( d->m_listBox ); @@ -456,7 +456,7 @@ KComboBox *KInputDialog::comboBox() const return d->m_comboBox; } -KListBox *KInputDialog::listBox() const +TDEListBox *KInputDialog::listBox() const { return d->m_listBox; } diff --git a/tdeui/kinputdialog.h b/tdeui/kinputdialog.h index f7326460d..7a039ac45 100644 --- a/tdeui/kinputdialog.h +++ b/tdeui/kinputdialog.h @@ -79,7 +79,7 @@ class TDEUI_EXPORT KInputDialog : public KDialogBase KIntSpinBox *intSpinBox() const; KDoubleSpinBox *doubleSpinBox() const; KComboBox *comboBox() const; - KListBox *listBox() const; + TDEListBox *listBox() const; KTextEdit *textEdit() const; private slots: diff --git a/tdeui/kjanuswidget.cpp b/tdeui/kjanuswidget.cpp index 6cf02e75e..fd413742d 100644 --- a/tdeui/kjanuswidget.cpp +++ b/tdeui/kjanuswidget.cpp @@ -110,7 +110,7 @@ KJanusWidget::KJanusWidget( TQWidget *parent, const char *name, int face ) d->mListFrame = new TQWidget( d->mSplitter ); TQVBoxLayout *dummy = new TQVBoxLayout( d->mListFrame, 0, KDialog::spacingHint() ); dummy->setAutoAdd( true ); - mTreeList = new KListView( d->mListFrame ); + mTreeList = new TDEListView( d->mListFrame ); mTreeList->addColumn( TQString::null ); mTreeList->header()->hide(); mTreeList->setRootIsDecorated(true); @@ -939,7 +939,7 @@ bool KJanusWidget::eventFilter( TQObject *o, TQEvent *e ) KJanusWidget::IconListBox::IconListBox( TQWidget *parent, const char *name, WFlags f ) - :KListBox( parent, name, f ), mShowAll(false), mHeightValid(false), + :TDEListBox( parent, name, f ), mShowAll(false), mHeightValid(false), mWidthValid(false), mOldItem(0) { @@ -1008,7 +1008,7 @@ void KJanusWidget::IconListBox::setShowAll( bool showAll ) void KJanusWidget::IconListBox::leaveEvent( TQEvent *ev ) { - KListBox::leaveEvent( ev ); + TDEListBox::leaveEvent( ev ); if ( mOldItem && !mOldItem->isSelected() ) { @@ -1020,7 +1020,7 @@ void KJanusWidget::IconListBox::leaveEvent( TQEvent *ev ) // hack because qt does not support Q_OBJECT in nested classes void KJanusWidget::IconListBox::slotOnItem(TQListBoxItem *qitem) { - KListBox::slotOnItem( qitem ); + TDEListBox::slotOnItem( qitem ); if ( qitem == mOldItem ) { diff --git a/tdeui/kjanuswidget.h b/tdeui/kjanuswidget.h index 8cc0c667c..d5bec6142 100644 --- a/tdeui/kjanuswidget.h +++ b/tdeui/kjanuswidget.h @@ -28,7 +28,7 @@ #include #include -class KListView; +class TDEListView; class TQGrid; class TQHBox; @@ -69,7 +69,7 @@ class TDEUI_EXPORT KJanusWidget : public TQWidget Q_OBJECT private: - class IconListBox : public KListBox + class IconListBox : public TDEListBox { friend class KJanusWidget; @@ -586,7 +586,7 @@ class TDEUI_EXPORT KJanusWidget : public TQWidget TQStringList *mTitleList; int mFace; - KListView *mTreeList; + TDEListView *mTreeList; IconListBox *mIconList; TQWidgetStack *mPageStack; TQLabel *mTitleLabel; diff --git a/tdeui/kkeybutton.cpp b/tdeui/kkeybutton.cpp index 6626a9a46..1568ea684 100644 --- a/tdeui/kkeybutton.cpp +++ b/tdeui/kkeybutton.cpp @@ -72,7 +72,7 @@ KKeyButton::KKeyButton(TQWidget *parent, const char *name) setFocusPolicy( TQ_StrongFocus ); m_bEditing = false; connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(captureShortcut()) ); - setShortcut( KShortcut(), true ); + setShortcut( TDEShortcut(), true ); } KKeyButton::~KKeyButton () @@ -80,7 +80,7 @@ KKeyButton::~KKeyButton () delete d; } -void KKeyButton::setShortcut( const KShortcut& cut, bool bQtShortcut ) +void KKeyButton::setShortcut( const TDEShortcut& cut, bool bQtShortcut ) { d->bQtShortcut = bQtShortcut; m_cut = cut; @@ -90,7 +90,7 @@ void KKeyButton::setShortcut( const KShortcut& cut, bool bQtShortcut ) } // deprecated // -void KKeyButton::setShortcut( const KShortcut& cut ) +void KKeyButton::setShortcut( const TDEShortcut& cut ) { setShortcut( cut, false ); } @@ -103,13 +103,13 @@ void KKeyButton::setText( const TQString& text ) void KKeyButton::captureShortcut() { - KShortcut cut; + TDEShortcut cut; m_bEditing = true; repaint(); { - KShortcutDialog dlg( m_cut, d->bQtShortcut, this ); + TDEShortcutDialog dlg( m_cut, d->bQtShortcut, this ); if( dlg.exec() == KDialog::Accepted ) cut = dlg.shortcut(); } // emit the signal after the dialog is destroyed, otherwise it still has grab diff --git a/tdeui/kkeybutton.h b/tdeui/kkeybutton.h index 34f5f1ac9..9dd806095 100644 --- a/tdeui/kkeybutton.h +++ b/tdeui/kkeybutton.h @@ -52,10 +52,10 @@ class TDEUI_EXPORT KKeyButton: public TQPushButton virtual ~KKeyButton(); /** @deprecated Use setShortcut( cut, false ) instead */ - void setShortcut( const KShortcut& cut ) KDE_DEPRECATED; + void setShortcut( const TDEShortcut& cut ) KDE_DEPRECATED; /// @since 3.1 - void setShortcut( const KShortcut& cut, bool bQtShortcut ); - const KShortcut& shortcut() const + void setShortcut( const TDEShortcut& cut, bool bQtShortcut ); + const TDEShortcut& shortcut() const { return m_cut; } /** @@ -64,7 +64,7 @@ class TDEUI_EXPORT KKeyButton: public TQPushButton void setText( const TQString& text ); signals: - void capturedShortcut( const KShortcut& ); + void capturedShortcut( const TDEShortcut& ); public slots: /** @@ -74,7 +74,7 @@ class TDEUI_EXPORT KKeyButton: public TQPushButton void captureShortcut(); protected: - KShortcut m_cut; + TDEShortcut m_cut; bool m_bEditing; /** diff --git a/tdeui/kkeydialog.cpp b/tdeui/kkeydialog.cpp index 8de6a6e59..d6375d039 100644 --- a/tdeui/kkeydialog.cpp +++ b/tdeui/kkeydialog.cpp @@ -77,32 +77,32 @@ const int XKeyRelease = KeyRelease; // KKeyChooserItem //--------------------------------------------------------------------- -class KKeyChooserItem : public KListViewItem +class KKeyChooserItem : public TDEListViewItem { public: - KKeyChooserItem( KListView* parent, TQListViewItem* after, KShortcutList* pList, uint iAction ); - KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, KShortcutList* pList, uint iAction ); + KKeyChooserItem( TDEListView* parent, TQListViewItem* after, TDEShortcutList* pList, uint iAction ); + KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, TDEShortcutList* pList, uint iAction ); TQString actionName() const; - const KShortcut& shortcut() const; + const TDEShortcut& shortcut() const; bool isConfigurable() const { return m_pList->isConfigurable( m_iAction ); } - const KShortcut& shortcutDefault() const + const TDEShortcut& shortcutDefault() const { return m_pList->shortcutDefault( m_iAction ); } TQString whatsThis() const { return m_pList->whatsThis( m_iAction ); } - void setShortcut( const KShortcut& cut ); + void setShortcut( const TDEShortcut& cut ); void commitChanges(); virtual TQString text( int iCol ) const; virtual int compare( TQListViewItem*, int iCol, bool bAscending ) const; protected: - KShortcutList* m_pList; + TDEShortcutList* m_pList; uint m_iAction; bool m_bModified; - KShortcut m_cut; + TDEShortcut m_cut; }; // WhatsThis on KKeyChooserItems @@ -126,16 +126,16 @@ private: class KKeyChooserPrivate { public: - TQValueList rgpLists; - TQValueList rgpListsAllocated; + TQValueList rgpLists; + TQValueList rgpListsAllocated; - KListView *pList; + TDEListView *pList; TQLabel *lInfo; KKeyButton *pbtnShortcut; TQGroupBox *fCArea; TQButtonGroup *kbGroup; - TQMap mapGlobals; + TQMap mapGlobals; // If this is set, then shortcuts require a modifier: // so 'A' would not be valid, whereas 'Ctrl+A' would be. @@ -157,14 +157,14 @@ KKeyChooser::KKeyChooser( TQWidget* parent, ActionType type, bool bAllowLetterSh initGUI( type, bAllowLetterShortcuts ); } -KKeyChooser::KKeyChooser( KActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts ) +KKeyChooser::KKeyChooser( TDEActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts ) : TQWidget( parent ) { initGUI( Application, bAllowLetterShortcuts ); insert( coll ); } -KKeyChooser::KKeyChooser( KAccel* pAccel, TQWidget* parent, bool bAllowLetterShortcuts ) +KKeyChooser::KKeyChooser( TDEAccel* pAccel, TQWidget* parent, bool bAllowLetterShortcuts ) : TQWidget( parent ) { initGUI( Application, bAllowLetterShortcuts ); @@ -178,14 +178,14 @@ KKeyChooser::KKeyChooser( TDEGlobalAccel* pAccel, TQWidget* parent ) insert( pAccel ); } -KKeyChooser::KKeyChooser( KShortcutList* pList, TQWidget* parent, ActionType type, bool bAllowLetterShortcuts ) +KKeyChooser::KKeyChooser( TDEShortcutList* pList, TQWidget* parent, ActionType type, bool bAllowLetterShortcuts ) : TQWidget( parent ) { initGUI( type, bAllowLetterShortcuts ); insert( pList ); } -KKeyChooser::KKeyChooser( KAccel* actions, TQWidget* parent, +KKeyChooser::KKeyChooser( TDEAccel* actions, TQWidget* parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey ) @@ -224,46 +224,46 @@ static KStaticDeleter< TQValueList< KKeyChooser* > > allChoosersDeleter; KKeyChooser::~KKeyChooser() { allChoosers->remove( this ); - // Delete allocated KShortcutLists + // Delete allocated TDEShortcutLists for( uint i = 0; i < d->rgpListsAllocated.count(); i++ ) delete d->rgpListsAllocated[i]; delete d; } -bool KKeyChooser::insert( KActionCollection *pColl) +bool KKeyChooser::insert( TDEActionCollection *pColl) { return insert(pColl, TQString::null); } -bool KKeyChooser::insert( KActionCollection* pColl, const TQString &title ) +bool KKeyChooser::insert( TDEActionCollection* pColl, const TQString &title ) { TQString str = title; if ( title.isEmpty() && pColl->instance() && pColl->instance()->aboutData() ) str = pColl->instance()->aboutData()->programName(); - KShortcutList* pList = new KActionShortcutList( pColl ); + TDEShortcutList* pList = new TDEActionShortcutList( pColl ); d->rgpListsAllocated.append( pList ); d->rgpLists.append( pList ); buildListView(d->rgpLists.count() - 1, str); return true; } -bool KKeyChooser::insert( KAccel* pAccel ) +bool KKeyChooser::insert( TDEAccel* pAccel ) { - KShortcutList* pList = new KAccelShortcutList( pAccel ); + TDEShortcutList* pList = new TDEAccelShortcutList( pAccel ); d->rgpListsAllocated.append( pList ); return insert( pList ); } bool KKeyChooser::insert( TDEGlobalAccel* pAccel ) { - KShortcutList* pList = new KAccelShortcutList( pAccel ); + TDEShortcutList* pList = new TDEAccelShortcutList( pAccel ); d->rgpListsAllocated.append( pList ); return insert( pList ); } -bool KKeyChooser::insert( KShortcutList* pList ) +bool KKeyChooser::insert( TDEShortcutList* pList ) { d->rgpLists.append( pList ); buildListView( d->rgpLists.count() - 1, TQString::null ); @@ -323,7 +323,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) searchLayout->addWidget(clearSearch); TQLabel* slbl = new TQLabel(i18n("&Search:"), this); searchLayout->addWidget(slbl); - KListViewSearchLine* listViewSearch = new KListViewSearchLine(this); + TDEListViewSearchLine* listViewSearch = new TDEListViewSearchLine(this); searchLayout->addWidget(listViewSearch); slbl->setBuddy(listViewSearch); connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear())); @@ -343,7 +343,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) topLayout->addLayout( TQT_TQLAYOUT(stackLayout), 10 ); stackLayout->setRowStretch( 1, 10 ); // Only list will stretch - d->pList = new KListView( this ); + d->pList = new TDEListView( this ); listViewSearch->setListView(d->pList); // Plug into search line TQValueList columns; columns.append(0); @@ -422,7 +422,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) d->pbtnShortcut = new KKeyButton(d->fCArea, "key"); d->pbtnShortcut->setEnabled( false ); - connect( d->pbtnShortcut, TQT_SIGNAL(capturedShortcut(const KShortcut&)), TQT_SLOT(capturedShortcut(const KShortcut&)) ); + connect( d->pbtnShortcut, TQT_SIGNAL(capturedShortcut(const TDEShortcut&)), TQT_SLOT(capturedShortcut(const TDEShortcut&)) ); grid->addRowSpacing( 1, d->pbtnShortcut->sizeHint().height() + 5 ); wtstr = i18n("Use this button to choose a new shortcut key. Once you click it, " @@ -460,15 +460,15 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) // Add all shortcuts to the list void KKeyChooser::buildListView( uint iList, const TQString &title ) { - KShortcutList* pList = d->rgpLists[iList]; - KActionShortcutList *pAList = dynamic_cast(pList); + TDEShortcutList* pList = d->rgpLists[iList]; + TDEActionShortcutList *pAList = dynamic_cast(pList); if( m_type == Global || m_type == ApplicationGlobal ) d->pList->setSorting( -1 ); - KListViewItem *pProgramItem, *pGroupItem = 0, *pParentItem, *pItem; + TDEListViewItem *pProgramItem, *pGroupItem = 0, *pParentItem, *pItem; TQString str = (title.isEmpty() ? i18n("Shortcuts") : title); - pParentItem = pProgramItem = pItem = new KListViewItem( d->pList, str ); + pParentItem = pProgramItem = pItem = new TDEListViewItem( d->pList, str ); pParentItem->setExpandable( true ); pParentItem->setOpen( true ); pParentItem->setSelectable( false ); @@ -477,7 +477,7 @@ void KKeyChooser::buildListView( uint iList, const TQString &title ) TQString sName = pList->name(iAction); kdDebug(125) << "Key: " << sName << endl; if( sName.startsWith( "Program:" ) ) { - pItem = new KListViewItem( d->pList, pProgramItem, pList->label(iAction) ); + pItem = new TDEListViewItem( d->pList, pProgramItem, pList->label(iAction) ); pItem->setSelectable( false ); pItem->setExpandable( true ); pItem->setOpen( true ); @@ -485,7 +485,7 @@ void KKeyChooser::buildListView( uint iList, const TQString &title ) delete pProgramItem; pProgramItem = pParentItem = pItem; } else if( sName.startsWith( "Group:" ) ) { - pItem = new KListViewItem( pProgramItem, pParentItem, pList->label(iAction) ); + pItem = new TDEListViewItem( pProgramItem, pParentItem, pList->label(iAction) ); pItem->setSelectable( false ); pItem->setExpandable( true ); pItem->setOpen( true ); @@ -520,11 +520,11 @@ void KKeyChooser::updateButtons() m_prbDef->setEnabled( false ); m_prbCustom->setEnabled( false ); d->pbtnShortcut->setEnabled( false ); - d->pbtnShortcut->setShortcut( KShortcut(), false ); + d->pbtnShortcut->setShortcut( TDEShortcut(), false ); } else { bool bConfigurable = pItem->isConfigurable(); bool bQtShortcut = (m_type == Application || m_type == Standard); - const KShortcut& cutDef = pItem->shortcutDefault(); + const TDEShortcut& cutDef = pItem->shortcutDefault(); // Set key strings TQString keyStrCfg = pItem->shortcut().toString(); @@ -558,7 +558,7 @@ void KKeyChooser::slotNoKey() KKeyChooserItem* pItem = dynamic_cast( d->pList->currentItem() ); if( pItem ) { //kdDebug(125) << "no Key" << d->pList->currentItem()->text(0) << endl; - pItem->setShortcut( KShortcut() ); + pItem->setShortcut( TDEShortcut() ); updateButtons(); emit keyChange(); } @@ -585,12 +585,12 @@ void KKeyChooser::readGlobalKeys() readGlobalKeys( d->mapGlobals ); } -void KKeyChooser::readGlobalKeys( TQMap< TQString, KShortcut >& map ) +void KKeyChooser::readGlobalKeys( TQMap< TQString, TDEShortcut >& map ) { TQMap mapEntry = TDEGlobal::config()->entryMap( "Global Shortcuts" ); TQMap::Iterator it( mapEntry.begin() ); for( uint i = 0; it != mapEntry.end(); ++it, i++ ) - map[it.key()] = KShortcut(*it); + map[it.key()] = TDEShortcut(*it); } void KKeyChooser::slotSettingsChanged( int category ) @@ -649,7 +649,7 @@ void KKeyChooser::setPreferFourModifierKeys( bool bPreferFourModifierKeys ) d->bPreferFourModifierKeys = bPreferFourModifierKeys; } -void KKeyChooser::capturedShortcut( const KShortcut& cut ) +void KKeyChooser::capturedShortcut( const TDEShortcut& cut ) { if( cut.isNull() ) slotNoKey(); @@ -665,7 +665,7 @@ void KKeyChooser::listSync() if( d->pColl ) { // TODO: This is very inefficient. Come up with something better. - KAccelActions aa; + TDEAccelActions aa; d->pColl->createKeyMap( aa ); d->actionsNew.updateShortcuts( aa ); } else if( d->pActionsOrig ) { @@ -699,7 +699,7 @@ void KKeyChooser::syncToConfig( const TQString& sConfigGroup, TDEConfigBase* pCo kdDebug(125) << "KKeyChooser::syncToConfig() done" << endl; } -void KKeyChooser::setShortcut( const KShortcut& cut ) +void KKeyChooser::setShortcut( const TDEShortcut& cut ) { kdDebug(125) << "KKeyChooser::setShortcut( " << cut.toString() << " )" << endl; KKeyChooserItem* pItem = dynamic_cast(d->pList->currentItem()); @@ -732,7 +732,7 @@ void KKeyChooser::setShortcut( const KShortcut& cut ) // Returns iSeq index if cut2 has a sequence of equal or higher priority to a sequence in cut. // else -1 -static int keyConflict( const KShortcut& cut, const KShortcut& cut2 ) +static int keyConflict( const TDEShortcut& cut, const TDEShortcut& cut2 ) { for( uint iSeq = 0; iSeq < cut.count(); iSeq++ ) { for( uint iSeq2 = 0; iSeq2 < cut2.count(); iSeq2++ ) { @@ -744,13 +744,13 @@ static int keyConflict( const KShortcut& cut, const KShortcut& cut2 ) } // Removes the sequences in cut2 from cut1 -static void removeFromShortcut( KShortcut & cut1, const KShortcut &cut2) +static void removeFromShortcut( TDEShortcut & cut1, const TDEShortcut &cut2) { for( uint iSeq2 = 0; iSeq2 < cut2.count(); iSeq2++ ) cut1.remove(cut2.seq(iSeq2)); } -bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser ) +bool KKeyChooser::isKeyPresent( const TDEShortcut& cut, bool bWarnUser ) { KKeyChooserItem* pItem = dynamic_cast(d->pList->currentItem()); @@ -796,12 +796,12 @@ bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser ) } // KDE4 remove -bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText ) +bool KKeyChooser::isKeyPresentLocally( const TDEShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText ) { return isKeyPresentLocally( cut, ignoreItem, !warnText.isNull()); } -bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser ) +bool KKeyChooser::isKeyPresentLocally( const TDEShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser ) { if ( cut.toString().isEmpty()) return false; @@ -816,7 +816,7 @@ bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ig if( !promptForReassign( cut.seq(iSeq), pItem2->text(0), Application, this )) return true; // else remove the shortcut from it - KShortcut cut2 = pItem2->shortcut(); + TDEShortcut cut2 = pItem2->shortcut(); removeFromShortcut(cut2, cut); pItem2->setShortcut(cut2); updateButtons(); @@ -828,35 +828,35 @@ bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ig return false; } -bool KKeyChooser::checkStandardShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent ) +bool KKeyChooser::checkStandardShortcutsConflict( const TDEShortcut& cut, bool bWarnUser, TQWidget* parent ) { // For each key sequence in the shortcut, for( uint i = 0; i < cut.count(); i++ ) { const KKeySequence& seq = cut.seq(i); - KStdAccel::StdAccel id = KStdAccel::findStdAccel( seq ); - if( id != KStdAccel::AccelNone - && keyConflict( cut, KStdAccel::shortcut( id ) ) > -1 ) { + TDEStdAccel::StdAccel id = TDEStdAccel::findStdAccel( seq ); + if( id != TDEStdAccel::AccelNone + && keyConflict( cut, TDEStdAccel::shortcut( id ) ) > -1 ) { if( bWarnUser ) { - if( !promptForReassign( seq, KStdAccel::label(id), Standard, parent )) + if( !promptForReassign( seq, TDEStdAccel::label(id), Standard, parent )) return true; - removeStandardShortcut( KStdAccel::label(id), dynamic_cast< KKeyChooser* > ( parent ), KStdAccel::shortcut( id ), cut); + removeStandardShortcut( TDEStdAccel::label(id), dynamic_cast< KKeyChooser* > ( parent ), TDEStdAccel::shortcut( id ), cut); } } } return false; } -bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent ) +bool KKeyChooser::checkGlobalShortcutsConflict( const TDEShortcut& cut, bool bWarnUser, TQWidget* parent ) { - TQMap< TQString, KShortcut > map; + TQMap< TQString, TDEShortcut > map; readGlobalKeys( map ); return checkGlobalShortcutsConflict( cut, bWarnUser, parent, map, TQString::null ); } -bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent, - const TQMap< TQString, KShortcut >& map, const TQString& ignoreAction ) +bool KKeyChooser::checkGlobalShortcutsConflict( const TDEShortcut& cut, bool bWarnUser, TQWidget* parent, + const TQMap< TQString, TDEShortcut >& map, const TQString& ignoreAction ) { - TQMap::ConstIterator it; + TQMap::ConstIterator it; for( it = map.begin(); it != map.end(); ++it ) { int iSeq = keyConflict( cut, (*it) ); if( iSeq > -1 ) { @@ -872,7 +872,7 @@ bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarn return false; } -void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut ) +void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const TDEShortcut &origCut, const TDEShortcut &cut ) { bool was_in_choosers = false; if( allChoosers != NULL ) { @@ -885,8 +885,8 @@ void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* cho } } if( !was_in_choosers ) { // not edited, needs to be changed in config file - KStdAccel::ShortcutList std_list; - KShortcut newCut = origCut; + TDEStdAccel::ShortcutList std_list; + TDEShortcut newCut = origCut; removeFromShortcut(newCut, cut); int index = std_list.index( name ); if ( index >= 0 ) { @@ -896,7 +896,7 @@ void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* cho } } -void KKeyChooser::removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut ) +void KKeyChooser::removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const TDEShortcut &origCut, const TDEShortcut &cut ) { bool was_in_choosers = false; if( allChoosers != NULL ) { @@ -909,21 +909,21 @@ void KKeyChooser::removeGlobalShortcut( const TQString& name, KKeyChooser* choos } } if( !was_in_choosers ) { // not edited, needs to be changed in config file - KAccelActions actions; - KShortcut newCut = origCut; + TDEAccelActions actions; + TDEShortcut newCut = origCut; removeFromShortcut(newCut, cut); actions.insert( name, "", "", newCut, newCut); actions.writeActions( "Global Shortcuts", 0, true, true ); } } -bool KKeyChooser::removeShortcut( const TQString& name, const KShortcut &cut ) +bool KKeyChooser::removeShortcut( const TQString& name, const TDEShortcut &cut ) { for( TQListViewItemIterator it( d->pList ); it.current(); ++it ) { KKeyChooserItem* pItem2 = dynamic_cast(it.current()); if( pItem2 && pItem2->actionName() == name ) { // remove the shortcut from it - KShortcut cut2 = pItem2->shortcut(); + TDEShortcut cut2 = pItem2->shortcut(); removeFromShortcut(cut2, cut); pItem2->setShortcut(cut2); updateButtons(); @@ -978,8 +978,8 @@ bool KKeyChooser::promptForReassign( const KKeySequence& cut, const TQString& sA } //--------------------------------------------------- -KKeyChooserItem::KKeyChooserItem( KListView* parent, TQListViewItem* after, KShortcutList* pList, uint iAction ) -: KListViewItem( parent, after ) +KKeyChooserItem::KKeyChooserItem( TDEListView* parent, TQListViewItem* after, TDEShortcutList* pList, uint iAction ) +: TDEListViewItem( parent, after ) { m_pList = pList; m_iAction = iAction; @@ -987,8 +987,8 @@ KKeyChooserItem::KKeyChooserItem( KListView* parent, TQListViewItem* after, KSho m_cut = m_pList->shortcut(m_iAction); } -KKeyChooserItem::KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, KShortcutList* pList, uint iAction ) -: KListViewItem( parent, after ) +KKeyChooserItem::KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, TDEShortcutList* pList, uint iAction ) +: TDEListViewItem( parent, after ) { m_pList = pList; m_iAction = iAction; @@ -1001,12 +1001,12 @@ TQString KKeyChooserItem::actionName() const return m_pList->name(m_iAction); } -const KShortcut& KKeyChooserItem::shortcut() const +const TDEShortcut& KKeyChooserItem::shortcut() const { return m_cut; } -void KKeyChooserItem::setShortcut( const KShortcut& cut ) +void KKeyChooserItem::setShortcut( const TDEShortcut& cut ) { m_cut = cut; m_bModified = (m_cut != m_pList->shortcut(m_iAction)); @@ -1117,12 +1117,12 @@ KKeyDialog::~KKeyDialog() group.writeEntry( "Dialog Size", size(), true, true ); } -bool KKeyDialog::insert( KActionCollection* pColl ) +bool KKeyDialog::insert( TDEActionCollection* pColl ) { return m_pKeyChooser->insert( pColl ); } -bool KKeyDialog::insert(KActionCollection *pColl, const TQString &title) +bool KKeyDialog::insert(TDEActionCollection *pColl, const TQString &title) { return m_pKeyChooser->insert(pColl, title); } @@ -1144,12 +1144,12 @@ void KKeyDialog::commitChanges() m_pKeyChooser->commitChanges(); } -int KKeyDialog::configure( KActionCollection* coll, TQWidget* parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEActionCollection* coll, TQWidget* parent, bool bSaveSettings ) { return configure( coll, true, parent, bSaveSettings); } -int KKeyDialog::configure( KAccel* keys, TQWidget* parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEAccel* keys, TQWidget* parent, bool bSaveSettings ) { return configure( keys, true, parent, bSaveSettings); } @@ -1159,7 +1159,7 @@ int KKeyDialog::configure( TDEGlobalAccel* keys, TQWidget* parent, bool bSaveSet return configure( keys, true, parent, bSaveSettings); } -int KKeyDialog::configure( KAccel* keys, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEAccel* keys, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) { KKeyDialog dlg( bAllowLetterShortcuts, parent ); dlg.m_pKeyChooser->insert( keys ); @@ -1179,18 +1179,18 @@ int KKeyDialog::configure( TDEGlobalAccel* keys, bool bAllowLetterShortcuts, TQW return b; } -int KKeyDialog::configure( KActionCollection* coll, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEActionCollection* coll, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) { - kdDebug(125) << "KKeyDialog::configureKeys( KActionCollection*, " << bSaveSettings << " )" << endl; + kdDebug(125) << "KKeyDialog::configureKeys( TDEActionCollection*, " << bSaveSettings << " )" << endl; KKeyDialog dlg( bAllowLetterShortcuts, parent ); dlg.m_pKeyChooser->insert( coll ); return dlg.configure( bSaveSettings ); } -/*int KKeyDialog::configure( KActionPtrList* coll, const TQString& file, TQWidget *parent, bool bSaveSettings ) +/*int KKeyDialog::configure( TDEActionPtrList* coll, const TQString& file, TQWidget *parent, bool bSaveSettings ) { - kdDebug(125) << "KKeyDialog::configureKeys( KActionCollection*, " << file << ", " << bSaveSettings << " )" << endl; - KAccelActions actions; + kdDebug(125) << "KKeyDialog::configureKeys( TDEActionCollection*, " << file << ", " << bSaveSettings << " )" << endl; + TDEAccelActions actions; coll->createKeyMap( actions ); int retcode = configure( actions, file, parent, bSaveSettings ); diff --git a/tdeui/kkeydialog.h b/tdeui/kkeydialog.h index eba8d0069..c6468e7c1 100644 --- a/tdeui/kkeydialog.h +++ b/tdeui/kkeydialog.h @@ -31,20 +31,20 @@ class TQGroupBox; class TQLabel; class TQLineEdit; class TQRadioButton; -class KAccel; -class KAccelActions; -class KActionCollection; +class TDEAccel; +class TDEAccelActions; +class TDEActionCollection; class TDEConfigBase; class TDEGlobalAccel; class KKeySequence; -class KShortcut; -class KShortcutList; +class TDEShortcut; +class TDEShortcutList; class KKeyChooserItem; /** - * @short Widget for configuration of KAccel and TDEGlobalAccel. + * @short Widget for configuration of TDEAccel and TDEGlobalAccel. * - * Configure dictionaries of key/action associations for KAccel and + * Configure dictionaries of key/action associations for TDEAccel and * TDEGlobalAccel. * * The class takes care of all aspects of configuration, including @@ -73,15 +73,15 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget /** * \overload * @param parent parent widget - * @param coll the KActionCollection to configure + * @param coll the TDEActionCollection to configure * @param bAllowLetterShortcuts Set to false if unmodified alphanumeric * keys ('A', '1', etc.) are not permissible shortcuts. */ - KKeyChooser( KActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts = true ); + KKeyChooser( TDEActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts = true ); - KKeyChooser( KAccel* actions, TQWidget* parent, bool bAllowLetterShortcuts = true ); + KKeyChooser( TDEAccel* actions, TQWidget* parent, bool bAllowLetterShortcuts = true ); KKeyChooser( TDEGlobalAccel* actions, TQWidget* parent ); - KKeyChooser( KShortcutList*, TQWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true ); + KKeyChooser( TDEShortcutList*, TQWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true ); virtual ~KKeyChooser(); @@ -89,14 +89,14 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget * Insert an action collection, i.e. add all its actions to the ones * already associated with the KKeyChooser object. */ - bool insert( KActionCollection* ); // #### KDE4 : remove me + bool insert( TDEActionCollection* ); // #### KDE4 : remove me /** * Insert an action collection, i.e. add all its actions to the ones * already associated with the KKeyChooser object. * @param title subtree title of this collection of shortcut. * @since 3.1 */ - bool insert( KActionCollection *, const TQString &title); + bool insert( TDEActionCollection *, const TQString &title); void syncToConfig( const TQString& sConfigGroup, TDEConfigBase* pConfig, bool bClearUnset ); @@ -108,7 +108,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget /** * This commits and then saves the actions to disk. - * Any KActionCollection objects with the xmlFile() value set + * Any TDEActionCollection objects with the xmlFile() value set * will be written to an XML file. All other will be written * to the application's rc file. */ @@ -127,7 +127,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget * * @since 3.2 */ - static bool checkGlobalShortcutsConflict( const KShortcut& cut, bool warnUser, TQWidget* parent ); + static bool checkGlobalShortcutsConflict( const TDEShortcut& cut, bool warnUser, TQWidget* parent ); /** * Checks whether the given shortcut conflicts with standard keyboard shortcuts. @@ -142,7 +142,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget * * @since 3.2 */ - static bool checkStandardShortcutsConflict( const KShortcut& cut, bool warnUser, TQWidget* parent ); + static bool checkStandardShortcutsConflict( const TDEShortcut& cut, bool warnUser, TQWidget* parent ); signals: /** @@ -168,9 +168,9 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget enum { NoKey = 1, DefaultKey, CustomKey }; void initGUI( ActionType type, bool bAllowLetterShortcuts ); - bool insert( KAccel* ); + bool insert( TDEAccel* ); bool insert( TDEGlobalAccel* ); - bool insert( KShortcutList* ); + bool insert( TDEShortcutList* ); /// @since 3.1 void buildListView( uint iList, const TQString &title = TQString::null ); @@ -178,9 +178,9 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget void updateButtons(); void fontChange( const TQFont& _font ); - void setShortcut( const KShortcut& cut ); - bool isKeyPresent( const KShortcut& cut, bool warnuser = true ); - bool isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText ); + void setShortcut( const TDEShortcut& cut ); + bool isKeyPresent( const TDEShortcut& cut, bool warnuser = true ); + bool isKeyPresentLocally( const TDEShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText ); void _warning( const KKeySequence& seq, TQString sAction, TQString sTitle ); protected slots: @@ -188,7 +188,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget void slotDefaultKey(); void slotCustomKey(); void slotListItemSelected( TQListViewItem *item ); - void capturedShortcut( const KShortcut& cut ); + void capturedShortcut( const TDEShortcut& cut ); void slotSettingsChanged( int ); void slotListItemDoubleClicked ( TQListViewItem * ipoQListViewItem, const TQPoint & ipoQPoint, int c ); @@ -205,19 +205,19 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget TQRadioButton* m_prbCustom; private: - bool isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser ); + bool isKeyPresentLocally( const TDEShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser ); static bool promptForReassign( const KKeySequence& cut, const TQString& sAction, ActionType action, TQWidget* parent ); // Remove the key sequences contained in cut from the standard shortcut @p name // which currently has @p origCut as shortcut. - static void removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut ); + static void removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const TDEShortcut &origCut, const TDEShortcut &cut ); // Remove the key sequences contained in cut from the global shortcut @p name // which currently has @p origCut as shortcut. - static void removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut ); - static void readGlobalKeys( TQMap< TQString, KShortcut >& map ); - static bool checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent, - const TQMap< TQString, KShortcut >& map, const TQString& ignoreAction ); + static void removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const TDEShortcut &origCut, const TDEShortcut &cut ); + static void readGlobalKeys( TQMap< TQString, TDEShortcut >& map ); + static bool checkGlobalShortcutsConflict( const TDEShortcut& cut, bool bWarnUser, TQWidget* parent, + const TQMap< TQString, TDEShortcut >& map, const TQString& ignoreAction ); // Remove the key sequences contained in cut from this item - bool removeShortcut( const TQString& name, const KShortcut &cut ); + bool removeShortcut( const TQString& name, const TDEShortcut &cut ); private slots: void captureCurrentItem(); @@ -227,7 +227,7 @@ private slots: /** * @obsolete */ - KKeyChooser( KAccel* actions, TQWidget* parent, + KKeyChooser( TDEAccel* actions, TQWidget* parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey = false ); @@ -256,14 +256,14 @@ private slots: typedef KKeyChooser KKeyChooser; /** - * @short Dialog for configuration of KActionCollection, KAccel, and TDEGlobalAccel. + * @short Dialog for configuration of TDEActionCollection, TDEAccel, and TDEGlobalAccel. * * The KKeyDialog class is used for configuring dictionaries of key/action - * associations for KActionCollection, KAccel, and TDEGlobalAccel. It uses the KKeyChooser widget + * associations for TDEActionCollection, TDEAccel, and TDEGlobalAccel. It uses the KKeyChooser widget * and offers buttons to set all keys to defaults and invoke on-line help. * * Several static methods are supplied which provide the most convenient interface - * to the dialog. The most common and most encouraged use is with KActionCollection. + * to the dialog. The most common and most encouraged use is with TDEActionCollection. * * \code * KKeyDialog::configure( actionCollection() ); @@ -296,7 +296,7 @@ public: * Simply call insert with the action collections of each one in turn. * @return true :) */ - bool insert( KActionCollection* ); // #### KDE4: remove me + bool insert( TDEActionCollection* ); // #### KDE4: remove me /** * Insert an action collection, i.e. add all its actions to the ones @@ -310,7 +310,7 @@ public: * @return true :) * @since 3.1 */ - bool insert(KActionCollection *, const TQString &title); + bool insert(TDEActionCollection *, const TQString &title); /** * Run the dialog and call commitChanges() if @p bSaveSettings @@ -332,14 +332,14 @@ public: * the *uirc file which they were intially read from. * @return Accept if the dialog was closed with OK, Reject otherwise. */ - static int configure( KActionCollection* coll, TQWidget* parent = 0, bool bSaveSettings = true ); + static int configure( TDEActionCollection* coll, TQWidget* parent = 0, bool bSaveSettings = true ); /** * This is an overloaded member function, provided for convenience. * It behaves essentially like the above function, except that settings * are saved to a *.rc file using TDEConfig. */ - static int configure( KAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true ); + static int configure( TDEAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true ); /** * This is an overloaded member function, provided for convenience. @@ -352,20 +352,20 @@ public: * This is an overloaded member function, provided for convenience. * It behaves essentially like the above function. * - * @param coll the KActionCollection to configure + * @param coll the TDEActionCollection to configure * @param bAllowLetterShortcuts Set to false if unmodified alphanumeric * keys ('A', '1', etc.) are not permissible shortcuts. * @param parent the parent widget to attach to * @param bSaveSettings if true, the settings will also be saved back to * the *uirc file which they were intially read from. */ - static int configure( KActionCollection* coll, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true + static int configure( TDEActionCollection* coll, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true /** * This is an overloaded member function, provided for convenience. * It behaves essentially like the above function. **/ - static int configure( KAccel* keys, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true + static int configure( TDEAccel* keys, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true /** * This is an overloaded member function, provided for convenience. @@ -377,7 +377,7 @@ public: * @deprecated Obsolete. * Please use KKeyDialog::configure instead */ - static KDE_DEPRECATED int configureKeys( KAccel* keys, bool save_settings = true, TQWidget* parent = 0 ) + static KDE_DEPRECATED int configureKeys( TDEAccel* keys, bool save_settings = true, TQWidget* parent = 0 ) { return configure( keys, parent, save_settings ); } /** * @deprecated Obsolete. @@ -389,7 +389,7 @@ public: * @deprecated Obsolete. * Please use KKeyDialog::configure instead */ - static KDE_DEPRECATED int configureKeys( KActionCollection* coll, const TQString& /*xmlfile*/, + static KDE_DEPRECATED int configureKeys( TDEActionCollection* coll, const TQString& /*xmlfile*/, bool save_settings = true, TQWidget* parent = 0 ) { return configure( coll, parent, save_settings ); } diff --git a/tdeui/klineedit.cpp b/tdeui/klineedit.cpp index f6fa42611..61d0daf26 100644 --- a/tdeui/klineedit.cpp +++ b/tdeui/klineedit.cpp @@ -441,17 +441,17 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) { KKey key( e ); - if ( KStdAccel::copy().contains( key ) ) + if ( TDEStdAccel::copy().contains( key ) ) { copy(); return; } - else if ( KStdAccel::paste().contains( key ) ) + else if ( TDEStdAccel::paste().contains( key ) ) { paste(); return; } - else if ( KStdAccel::pasteSelection().contains( key ) ) + else if ( TDEStdAccel::pasteSelection().contains( key ) ) { TQString text = TQApplication::clipboard()->text( TQClipboard::Selection); insert( text ); @@ -459,22 +459,22 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) return; } - else if ( KStdAccel::cut().contains( key ) ) + else if ( TDEStdAccel::cut().contains( key ) ) { cut(); return; } - else if ( KStdAccel::undo().contains( key ) ) + else if ( TDEStdAccel::undo().contains( key ) ) { undo(); return; } - else if ( KStdAccel::redo().contains( key ) ) + else if ( TDEStdAccel::redo().contains( key ) ) { redo(); return; } - else if ( KStdAccel::deleteWordBack().contains( key ) ) + else if ( TDEStdAccel::deleteWordBack().contains( key ) ) { cursorWordBackward(true); if ( hasSelectedText() ) @@ -483,7 +483,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) e->accept(); return; } - else if ( KStdAccel::deleteWordForward().contains( key ) ) + else if ( TDEStdAccel::deleteWordForward().contains( key ) ) { // Workaround for QT bug where cursorWordForward(true); @@ -493,25 +493,25 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) e->accept(); return; } - else if ( KStdAccel::backwardWord().contains( key ) ) + else if ( TDEStdAccel::backwardWord().contains( key ) ) { cursorWordBackward(false); e->accept(); return; } - else if ( KStdAccel::forwardWord().contains( key ) ) + else if ( TDEStdAccel::forwardWord().contains( key ) ) { cursorWordForward(false); e->accept(); return; } - else if ( KStdAccel::beginningOfLine().contains( key ) ) + else if ( TDEStdAccel::beginningOfLine().contains( key ) ) { home(false); e->accept(); return; } - else if ( KStdAccel::endOfLine().contains( key ) ) + else if ( TDEStdAccel::endOfLine().contains( key ) ) { end(false); e->accept(); @@ -723,9 +723,9 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) else if ( mode == TDEGlobalSettings::CompletionShell ) { // Handles completion. - KShortcut cut; + TDEShortcut cut; if ( keys[TextCompletion].isNull() ) - cut = KStdAccel::shortcut(KStdAccel::TextCompletion); + cut = TDEStdAccel::shortcut(TDEStdAccel::TextCompletion); else cut = keys[TextCompletion]; @@ -752,9 +752,9 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) if ( mode != TDEGlobalSettings::CompletionNone ) { // Handles previous match - KShortcut cut; + TDEShortcut cut; if ( keys[PrevCompletionMatch].isNull() ) - cut = KStdAccel::shortcut(KStdAccel::PrevCompletion); + cut = TDEStdAccel::shortcut(TDEStdAccel::PrevCompletion); else cut = keys[PrevCompletionMatch]; @@ -769,7 +769,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) // Handles next match if ( keys[NextCompletionMatch].isNull() ) - cut = KStdAccel::shortcut(KStdAccel::NextCompletion); + cut = TDEStdAccel::shortcut(TDEStdAccel::NextCompletion); else cut = keys[NextCompletionMatch]; @@ -786,9 +786,9 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) // substring completion if ( compObj() ) { - KShortcut cut; + TDEShortcut cut; if ( keys[SubstringCompletion].isNull() ) - cut = KStdAccel::shortcut(KStdAccel::SubstringCompletion); + cut = TDEStdAccel::shortcut(TDEStdAccel::SubstringCompletion); else cut = keys[SubstringCompletion]; @@ -893,7 +893,7 @@ TQPopupMenu *KLineEdit::createPopupMenu() subMenu->insertItem( i18n("Short Automatic"), ShortAutoCompletion ); subMenu->insertItem( i18n("Dropdown List && Automatic"), PopupAutoCompletion ); - subMenu->setAccel( KStdAccel::completion(), ShellCompletion ); + subMenu->setAccel( TDEStdAccel::completion(), ShellCompletion ); TDEGlobalSettings::Completion mode = completionMode(); subMenu->setItemChecked( NoCompletion, @@ -1124,13 +1124,13 @@ void KLineEdit::userCancelled(const TQString & cancelText) bool KLineEdit::overrideAccel (const TQKeyEvent* e) { - KShortcut scKey; + TDEShortcut scKey; KKey key( e ); KeyBindingMap keys = getKeyBindings(); if (keys[TextCompletion].isNull()) - scKey = KStdAccel::shortcut(KStdAccel::TextCompletion); + scKey = TDEStdAccel::shortcut(TDEStdAccel::TextCompletion); else scKey = keys[TextCompletion]; @@ -1138,7 +1138,7 @@ bool KLineEdit::overrideAccel (const TQKeyEvent* e) return true; if (keys[NextCompletionMatch].isNull()) - scKey = KStdAccel::shortcut(KStdAccel::NextCompletion); + scKey = TDEStdAccel::shortcut(TDEStdAccel::NextCompletion); else scKey = keys[NextCompletionMatch]; @@ -1146,7 +1146,7 @@ bool KLineEdit::overrideAccel (const TQKeyEvent* e) return true; if (keys[PrevCompletionMatch].isNull()) - scKey = KStdAccel::shortcut(KStdAccel::PrevCompletion); + scKey = TDEStdAccel::shortcut(TDEStdAccel::PrevCompletion); else scKey = keys[PrevCompletionMatch]; @@ -1154,27 +1154,27 @@ bool KLineEdit::overrideAccel (const TQKeyEvent* e) return true; // Override all the text manupilation accelerators... - if ( KStdAccel::copy().contains( key ) ) + if ( TDEStdAccel::copy().contains( key ) ) return true; - else if ( KStdAccel::paste().contains( key ) ) + else if ( TDEStdAccel::paste().contains( key ) ) return true; - else if ( KStdAccel::cut().contains( key ) ) + else if ( TDEStdAccel::cut().contains( key ) ) return true; - else if ( KStdAccel::undo().contains( key ) ) + else if ( TDEStdAccel::undo().contains( key ) ) return true; - else if ( KStdAccel::redo().contains( key ) ) + else if ( TDEStdAccel::redo().contains( key ) ) return true; - else if (KStdAccel::deleteWordBack().contains( key )) + else if (TDEStdAccel::deleteWordBack().contains( key )) return true; - else if (KStdAccel::deleteWordForward().contains( key )) + else if (TDEStdAccel::deleteWordForward().contains( key )) return true; - else if (KStdAccel::forwardWord().contains( key )) + else if (TDEStdAccel::forwardWord().contains( key )) return true; - else if (KStdAccel::backwardWord().contains( key )) + else if (TDEStdAccel::backwardWord().contains( key )) return true; - else if (KStdAccel::beginningOfLine().contains( key )) + else if (TDEStdAccel::beginningOfLine().contains( key )) return true; - else if (KStdAccel::endOfLine().contains( key )) + else if (TDEStdAccel::endOfLine().contains( key )) return true; if (d->completionBox && d->completionBox->isVisible ()) diff --git a/tdeui/klineedit.h b/tdeui/klineedit.h index 84e554316..be25a35d9 100644 --- a/tdeui/klineedit.h +++ b/tdeui/klineedit.h @@ -72,7 +72,7 @@ class KURL; * the above functions to false. * * The default key-bindings for completion and rotation is determined - * from the global settings in KStdAccel. These values, however, can + * from the global settings in TDEStdAccel. These values, however, can * be overridden locally by invoking @p setKeyBinding(). You can easily * revert these settings back to the default by simply calling * @p useGlobalSettings(). An alternate method would be to default diff --git a/tdeui/klistbox.cpp b/tdeui/klistbox.cpp index d4fb92ef2..bc31f020d 100644 --- a/tdeui/klistbox.cpp +++ b/tdeui/klistbox.cpp @@ -27,7 +27,7 @@ #include "klistbox.h" -KListBox::KListBox( TQWidget *parent, const char *name, WFlags f ) +TDEListBox::TDEListBox( TQWidget *parent, const char *name, WFlags f ) : TQListBox( parent, name, f ), d(0) { connect( this, TQT_SIGNAL( onViewport() ), @@ -48,7 +48,7 @@ KListBox::KListBox( TQWidget *parent, const char *name, WFlags f ) this, TQT_SLOT( slotAutoSelect() ) ); } -void KListBox::slotOnItem( TQListBoxItem *item ) +void TDEListBox::slotOnItem( TQListBoxItem *item ) { if ( item && m_bChangeCursorOverItem && m_bUseSingle ) viewport()->setCursor( KCursor().handCursor() ); @@ -59,7 +59,7 @@ void KListBox::slotOnItem( TQListBoxItem *item ) } } -void KListBox::slotOnViewport() +void TDEListBox::slotOnViewport() { if ( m_bChangeCursorOverItem ) viewport()->unsetCursor(); @@ -69,7 +69,7 @@ void KListBox::slotOnViewport() } -void KListBox::slotSettingsChanged(int category) +void TDEListBox::slotSettingsChanged(int category) { if (category != TDEApplication::SETTINGS_MOUSE) return; @@ -106,7 +106,7 @@ void KListBox::slotSettingsChanged(int category) viewport()->unsetCursor(); } -void KListBox::slotAutoSelect() +void TDEListBox::slotAutoSelect() { // check that the item still exists if( index( m_pCurrentItem ) == -1 ) @@ -176,7 +176,7 @@ void KListBox::slotAutoSelect() kdDebug() << "That´s not supposed to happen!!!!" << endl; } -void KListBox::emitExecute( TQListBoxItem *item, const TQPoint &pos ) +void TDEListBox::emitExecute( TQListBoxItem *item, const TQPoint &pos ) { ButtonState keybstate = TDEApplication::keyboardMouseState(); @@ -196,7 +196,7 @@ void KListBox::emitExecute( TQListBoxItem *item, const TQPoint &pos ) // to start help or close the dialog. This functionality // should be done in TQListView but it is not (at least now) // -void KListBox::keyPressEvent(TQKeyEvent *e) +void TDEListBox::keyPressEvent(TQKeyEvent *e) { if( e->key() == Key_Escape ) { @@ -212,21 +212,21 @@ void KListBox::keyPressEvent(TQKeyEvent *e) } } -void KListBox::focusOutEvent( TQFocusEvent *fe ) +void TDEListBox::focusOutEvent( TQFocusEvent *fe ) { m_pAutoSelect->stop(); TQListBox::focusOutEvent( fe ); } -void KListBox::leaveEvent( TQEvent *e ) +void TDEListBox::leaveEvent( TQEvent *e ) { m_pAutoSelect->stop(); TQListBox::leaveEvent( e ); } -void KListBox::contentsMousePressEvent( TQMouseEvent *e ) +void TDEListBox::contentsMousePressEvent( TQMouseEvent *e ) { if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) { bool block = signalsBlocked(); @@ -240,7 +240,7 @@ void KListBox::contentsMousePressEvent( TQMouseEvent *e ) TQListBox::contentsMousePressEvent( e ); } -void KListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) +void TDEListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) { TQListBox::contentsMouseDoubleClickEvent( e ); @@ -254,13 +254,13 @@ void KListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) } } -void KListBox::slotMouseButtonClicked( int btn, TQListBoxItem *item, const TQPoint &pos ) +void TDEListBox::slotMouseButtonClicked( int btn, TQListBoxItem *item, const TQPoint &pos ) { if( (btn == Qt::LeftButton) && item ) emitExecute( item, pos ); } -void KListBox::virtual_hook( int, void* ) +void TDEListBox::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "klistbox.moc" diff --git a/tdeui/klistbox.h b/tdeui/klistbox.h index 981cfa3a3..8ef949527 100644 --- a/tdeui/klistbox.h +++ b/tdeui/klistbox.h @@ -37,12 +37,12 @@ * settings. If you want to get informed when the user selects * something connect to the TQListBox::selectionChanged() signal. **/ -class TDEUI_EXPORT KListBox : public TQListBox +class TDEUI_EXPORT TDEListBox : public TQListBox { Q_OBJECT public: - KListBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); + TDEListBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); signals: @@ -121,8 +121,8 @@ private slots: protected: virtual void virtual_hook( int id, void* data ); private: - class KListBoxPrivate; - KListBoxPrivate* const d; + class TDEListBoxPrivate; + TDEListBoxPrivate* const d; }; #endif diff --git a/tdeui/klistview.cpp b/tdeui/klistview.cpp index 24c5f3a4b..b3eb2222c 100644 --- a/tdeui/klistview.cpp +++ b/tdeui/klistview.cpp @@ -37,10 +37,10 @@ #include "klistview.h" #include "klistviewlineedit.h" -class KListView::Tooltip : public TQToolTip +class TDEListView::Tooltip : public TQToolTip { public: - Tooltip (KListView* parent, TQToolTipGroup* group = 0L); + Tooltip (TDEListView* parent, TQToolTipGroup* group = 0L); virtual ~Tooltip () {} protected: @@ -50,29 +50,29 @@ protected: virtual void maybeTip (const TQPoint&); private: - KListView* mParent; + TDEListView* mParent; }; -KListView::Tooltip::Tooltip (KListView* parent, TQToolTipGroup* group) +TDEListView::Tooltip::Tooltip (TDEListView* parent, TQToolTipGroup* group) : TQToolTip (parent, group), mParent (parent) { } -void KListView::Tooltip::maybeTip (const TQPoint&) +void TDEListView::Tooltip::maybeTip (const TQPoint&) { // FIXME } -class KListView::KListViewPrivate +class TDEListView::TDEListViewPrivate { public: - KListViewPrivate (KListView* listview) + TDEListViewPrivate (TDEListView* listview) : pCurrentItem (0), autoSelectDelay(0), dragOverItem(0), dragDelay (TDEGlobalSettings::dndEventDelay()), - editor (new KListViewLineEdit (listview)), + editor (new TDEListViewLineEdit (listview)), cursorInExecuteArea(false), itemsMovable (true), selectedBySimpleMove(false), @@ -107,7 +107,7 @@ public: connect(editor, TQT_SIGNAL(done(TQListViewItem*,int)), listview, TQT_SLOT(doneEditing(TQListViewItem*,int))); } - ~KListViewPrivate () + ~TDEListViewPrivate () { delete editor; } @@ -124,7 +124,7 @@ public: TQPoint startDragPos; int dragDelay; - KListViewLineEdit *editor; + TDEListViewLineEdit *editor; TQValueList renameable; bool cursorInExecuteArea:1; @@ -173,7 +173,7 @@ public: }; -KListViewLineEdit::KListViewLineEdit(KListView *parent) +TDEListViewLineEdit::TDEListViewLineEdit(TDEListView *parent) : KLineEdit(parent->viewport()), item(0), col(0), p(parent) { setFrame( false ); @@ -183,16 +183,16 @@ KListViewLineEdit::KListViewLineEdit(KListView *parent) TQT_SLOT( slotItemRemoved( TQListViewItem * ) )); } -KListViewLineEdit::~KListViewLineEdit() +TDEListViewLineEdit::~TDEListViewLineEdit() { } -TQListViewItem *KListViewLineEdit::currentItem() const +TQListViewItem *TDEListViewLineEdit::currentItem() const { return item; } -void KListViewLineEdit::load(TQListViewItem *i, int c) +void TDEListViewLineEdit::load(TQListViewItem *i, int c) { item=i; col=c; @@ -232,7 +232,7 @@ void KListViewLineEdit::load(TQListViewItem *i, int c) * tabOrderedRename functionality. */ -static int nextCol (KListView *pl, TQListViewItem *pi, int start, int dir) +static int nextCol (TDEListView *pl, TQListViewItem *pi, int start, int dir) { if (pi) { @@ -273,7 +273,7 @@ static TQListViewItem *lastQChild (TQListViewItem *pi) return pi; } -void KListViewLineEdit::selectNextCell (TQListViewItem *pitem, int column, bool forward) +void TDEListViewLineEdit::selectNextCell (TQListViewItem *pitem, int column, bool forward) { const int ncols = p->columns(); const int dir = forward ? +1 : -1; @@ -321,7 +321,7 @@ void KListViewLineEdit::selectNextCell (TQListViewItem *pitem, int column, bool #undef KeyPress #endif -bool KListViewLineEdit::event (TQEvent *pe) +bool TDEListViewLineEdit::event (TQEvent *pe) { if (pe->type() == TQEvent::KeyPress) { @@ -340,7 +340,7 @@ bool KListViewLineEdit::event (TQEvent *pe) return KLineEdit::event(pe); } -void KListViewLineEdit::keyPressEvent(TQKeyEvent *e) +void TDEListViewLineEdit::keyPressEvent(TQKeyEvent *e) { if(e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) terminate(true); @@ -355,16 +355,16 @@ void KListViewLineEdit::keyPressEvent(TQKeyEvent *e) KLineEdit::keyPressEvent(e); } -void KListViewLineEdit::terminate() +void TDEListViewLineEdit::terminate() { terminate(true); } -void KListViewLineEdit::terminate(bool commit) +void TDEListViewLineEdit::terminate(bool commit) { if ( item ) { - //kdDebug() << "KListViewLineEdit::terminate " << commit << endl; + //kdDebug() << "TDEListViewLineEdit::terminate " << commit << endl; if (commit) item->setText(col, text()); int c=col; @@ -378,7 +378,7 @@ void KListViewLineEdit::terminate(bool commit) } } -void KListViewLineEdit::focusOutEvent(TQFocusEvent *ev) +void TDEListViewLineEdit::focusOutEvent(TQFocusEvent *ev) { TQFocusEvent * focusEv = static_cast(ev); // Don't let a RMB close the editor @@ -388,7 +388,7 @@ void KListViewLineEdit::focusOutEvent(TQFocusEvent *ev) KLineEdit::focusOutEvent(ev); } -void KListViewLineEdit::paintEvent( TQPaintEvent *e ) +void TDEListViewLineEdit::paintEvent( TQPaintEvent *e ) { KLineEdit::paintEvent( e ); @@ -402,7 +402,7 @@ void KListViewLineEdit::paintEvent( TQPaintEvent *e ) // selection changed -> terminate. As our "item" can be already deleted, // we can't call terminate(false), because that would emit done() with // a dangling pointer to "item". -void KListViewLineEdit::slotSelectionChanged() +void TDEListViewLineEdit::slotSelectionChanged() { item = 0; col = 0; @@ -411,7 +411,7 @@ void KListViewLineEdit::slotSelectionChanged() // if the current item was removed -> terminate. Can't call terminate(false) // due to same reason as slotSelectionChanged(). -void KListViewLineEdit::slotItemRemoved(TQListViewItem *i) +void TDEListViewLineEdit::slotItemRemoved(TQListViewItem *i) { if (currentItem() != i) return; @@ -422,9 +422,9 @@ void KListViewLineEdit::slotItemRemoved(TQListViewItem *i) } -KListView::KListView( TQWidget *parent, const char *name ) +TDEListView::TDEListView( TQWidget *parent, const char *name ) : TQListView( parent, name ), - d (new KListViewPrivate (this)) + d (new TDEListViewPrivate (this)) { setDragAutoScroll(true); @@ -462,17 +462,17 @@ KListView::KListView( TQWidget *parent, const char *name ) this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); } - connect (this, TQT_SIGNAL (menuShortCutPressed (KListView*, TQListViewItem*)), - this, TQT_SLOT (emitContextMenu (KListView*, TQListViewItem*))); + connect (this, TQT_SIGNAL (menuShortCutPressed (TDEListView*, TQListViewItem*)), + this, TQT_SLOT (emitContextMenu (TDEListView*, TQListViewItem*))); d->alternateBackground = TDEGlobalSettings::alternateBackgroundColor(); } -KListView::~KListView() +TDEListView::~TDEListView() { delete d; } -bool KListView::isExecuteArea( const TQPoint& point ) +bool TDEListView::isExecuteArea( const TQPoint& point ) { TQListViewItem* item = itemAt( point ); if ( item ) { @@ -482,12 +482,12 @@ bool KListView::isExecuteArea( const TQPoint& point ) return false; } -bool KListView::isExecuteArea( int x ) +bool TDEListView::isExecuteArea( int x ) { return isExecuteArea( x, 0 ); } -bool KListView::isExecuteArea( int x, TQListViewItem* item ) +bool TDEListView::isExecuteArea( int x, TQListViewItem* item ) { if( allColumnsShowFocus() ) return true; @@ -521,7 +521,7 @@ bool KListView::isExecuteArea( int x, TQListViewItem* item ) } } -void KListView::slotOnItem( TQListViewItem *item ) +void TDEListView::slotOnItem( TQListViewItem *item ) { TQPoint vp = viewport()->mapFromGlobal( TQCursor::pos() ); if ( item && isExecuteArea( vp.x() ) && (d->autoSelectDelay > -1) && d->bUseSingle ) { @@ -530,7 +530,7 @@ void KListView::slotOnItem( TQListViewItem *item ) } } -void KListView::slotOnViewport() +void TDEListView::slotOnViewport() { if ( d->bChangeCursorOverItem ) viewport()->unsetCursor(); @@ -539,7 +539,7 @@ void KListView::slotOnViewport() d->pCurrentItem = 0L; } -void KListView::slotSettingsChanged(int category) +void TDEListView::slotSettingsChanged(int category) { switch (category) { @@ -588,7 +588,7 @@ void KListView::slotSettingsChanged(int category) } } -void KListView::slotAutoSelect() +void TDEListView::slotAutoSelect() { // check that the item still exists if( itemIndex( d->pCurrentItem ) == -1 ) @@ -661,10 +661,10 @@ void KListView::slotAutoSelect() } } else - kdDebug() << "KListView::slotAutoSelect: That�s not supposed to happen!!!!" << endl; + kdDebug() << "TDEListView::slotAutoSelect: That�s not supposed to happen!!!!" << endl; } -void KListView::slotHeaderChanged() +void TDEListView::slotHeaderChanged() { const int colCount = columns(); @@ -677,7 +677,7 @@ void KListView::slotHeaderChanged() } } -void KListView::emitExecute( TQListViewItem *item, const TQPoint &pos, int c ) +void TDEListView::emitExecute( TQListViewItem *item, const TQPoint &pos, int c ) { if( isExecuteArea( viewport()->mapFromGlobal(pos) ) ) { d->validDrag=false; @@ -705,9 +705,9 @@ void KListView::emitExecute( TQListViewItem *item, const TQPoint &pos, int c ) } } -void KListView::focusInEvent( TQFocusEvent *fe ) +void TDEListView::focusInEvent( TQFocusEvent *fe ) { - // kdDebug()<<"KListView::focusInEvent()"<selectedBySimpleMove) && (d->selectionMode == FileManager) @@ -721,7 +721,7 @@ void KListView::focusInEvent( TQFocusEvent *fe ) }; } -void KListView::focusOutEvent( TQFocusEvent *fe ) +void TDEListView::focusOutEvent( TQFocusEvent *fe ) { cleanDropVisualizer(); cleanItemHighlighter(); @@ -743,14 +743,14 @@ void KListView::focusOutEvent( TQFocusEvent *fe ) TQListView::focusOutEvent( fe ); } -void KListView::leaveEvent( TQEvent *e ) +void TDEListView::leaveEvent( TQEvent *e ) { d->autoSelect.stop(); TQListView::leaveEvent( e ); } -bool KListView::event( TQEvent *e ) +bool TDEListView::event( TQEvent *e ) { if (e->type() == TQEvent::ApplicationPaletteChange) d->alternateBackground=TDEGlobalSettings::alternateBackgroundColor(); @@ -758,7 +758,7 @@ bool KListView::event( TQEvent *e ) return TQListView::event(e); } -void KListView::contentsMousePressEvent( TQMouseEvent *e ) +void TDEListView::contentsMousePressEvent( TQMouseEvent *e ) { if( (selectionModeExt() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) { @@ -805,7 +805,7 @@ void KListView::contentsMousePressEvent( TQMouseEvent *e ) TQListView::contentsMousePressEvent( e ); } -void KListView::contentsMouseMoveEvent( TQMouseEvent *e ) +void TDEListView::contentsMouseMoveEvent( TQMouseEvent *e ) { if (!dragEnabled() || d->startDragPos.isNull() || !d->validDrag) TQListView::contentsMouseMoveEvent (e); @@ -845,7 +845,7 @@ void KListView::contentsMouseMoveEvent( TQMouseEvent *e ) } } -void KListView::contentsMouseReleaseEvent( TQMouseEvent *e ) +void TDEListView::contentsMouseReleaseEvent( TQMouseEvent *e ) { if (e->button() == Qt::LeftButton) { @@ -878,7 +878,7 @@ void KListView::contentsMouseReleaseEvent( TQMouseEvent *e ) TQListView::contentsMouseReleaseEvent( e ); } -void KListView::contentsMouseDoubleClickEvent ( TQMouseEvent *e ) +void TDEListView::contentsMouseDoubleClickEvent ( TQMouseEvent *e ) { // We don't want to call the parent method because it does setOpen, // whereas we don't do it in single click mode... (David) @@ -900,13 +900,13 @@ void KListView::contentsMouseDoubleClickEvent ( TQMouseEvent *e ) } } -void KListView::slotMouseButtonClicked( int btn, TQListViewItem *item, const TQPoint &pos, int c ) +void TDEListView::slotMouseButtonClicked( int btn, TQListViewItem *item, const TQPoint &pos, int c ) { if( (btn == Qt::LeftButton) && item ) emitExecute(item, pos, c); } -void KListView::contentsDropEvent(TQDropEvent* e) +void TDEListView::contentsDropEvent(TQDropEvent* e) { cleanDropVisualizer(); cleanItemHighlighter(); @@ -932,7 +932,7 @@ void KListView::contentsDropEvent(TQDropEvent* e) } } -void KListView::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme) +void TDEListView::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme) { TQPtrList items, afterFirsts, afterNows; TQListViewItem *current=currentItem(); @@ -982,7 +982,7 @@ void KListView::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterm emit moved(); } -void KListView::contentsDragMoveEvent(TQDragMoveEvent *event) +void TDEListView::contentsDragMoveEvent(TQDragMoveEvent *event) { if (acceptDrag(event)) { @@ -1026,20 +1026,20 @@ void KListView::contentsDragMoveEvent(TQDragMoveEvent *event) event->ignore(); } -void KListView::slotDragExpand() +void TDEListView::slotDragExpand() { if ( itemAt( d->dragOverPoint ) == d->dragOverItem ) d->dragOverItem->setOpen( true ); } -void KListView::contentsDragLeaveEvent (TQDragLeaveEvent*) +void TDEListView::contentsDragLeaveEvent (TQDragLeaveEvent*) { d->dragExpand.stop(); cleanDropVisualizer(); cleanItemHighlighter(); } -void KListView::cleanDropVisualizer() +void TDEListView::cleanDropVisualizer() { if (d->mOldDropVisualizer.isValid()) { @@ -1049,12 +1049,12 @@ void KListView::cleanDropVisualizer() } } -int KListView::depthToPixels( int depth ) +int TDEListView::depthToPixels( int depth ) { return treeStepSize() * ( depth + (rootIsDecorated() ? 1 : 0) ) + itemMargin(); } -void KListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after) +void TDEListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after) { TQPoint p (contentsToViewport(pos)); @@ -1123,7 +1123,7 @@ void KListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListView parent = after ? after->parent() : 0L ; } -TQListViewItem* KListView::lastChild () const +TQListViewItem* TDEListView::lastChild () const { TQListViewItem* lastchild = firstChild(); @@ -1133,7 +1133,7 @@ TQListViewItem* KListView::lastChild () const return lastchild; } -TQListViewItem *KListView::lastItem() const +TQListViewItem *TDEListView::lastItem() const { TQListViewItem* last = lastChild(); @@ -1143,12 +1143,12 @@ TQListViewItem *KListView::lastItem() const return last; } -KLineEdit *KListView::renameLineEdit() const +KLineEdit *TDEListView::renameLineEdit() const { return d->editor; } -void KListView::startDrag() +void TDEListView::startDrag() { TQDragObject *drag = dragObject(); @@ -1159,7 +1159,7 @@ void KListView::startDrag() emit moved(); } -TQDragObject *KListView::dragObject() +TQDragObject *TDEListView::dragObject() { if (!currentItem()) return 0; @@ -1168,63 +1168,63 @@ TQDragObject *KListView::dragObject() return new TQStoredDrag("application/x-qlistviewitem", viewport()); } -void KListView::setItemsMovable(bool b) +void TDEListView::setItemsMovable(bool b) { d->itemsMovable=b; } -bool KListView::itemsMovable() const +bool TDEListView::itemsMovable() const { return d->itemsMovable; } -void KListView::setItemsRenameable(bool b) +void TDEListView::setItemsRenameable(bool b) { d->itemsRenameable=b; } -bool KListView::itemsRenameable() const +bool TDEListView::itemsRenameable() const { return d->itemsRenameable; } -void KListView::setDragEnabled(bool b) +void TDEListView::setDragEnabled(bool b) { d->dragEnabled=b; } -bool KListView::dragEnabled() const +bool TDEListView::dragEnabled() const { return d->dragEnabled; } -void KListView::setAutoOpen(bool b) +void TDEListView::setAutoOpen(bool b) { d->autoOpen=b; } -bool KListView::autoOpen() const +bool TDEListView::autoOpen() const { return d->autoOpen; } -bool KListView::dropVisualizer() const +bool TDEListView::dropVisualizer() const { return d->dropVisualizer; } -void KListView::setDropVisualizer(bool b) +void TDEListView::setDropVisualizer(bool b) { d->dropVisualizer=b; } -TQPtrList KListView::selectedItems() const +TQPtrList TDEListView::selectedItems() const { return selectedItems(true); } -TQPtrList KListView::selectedItems(bool includeHiddenItems) const +TQPtrList TDEListView::selectedItems(bool includeHiddenItems) const { TQPtrList list; @@ -1248,7 +1248,7 @@ TQPtrList KListView::selectedItems(bool includeHiddenItems) cons flags |= TQListViewItemIterator::Visible; } - TQListViewItemIterator it(const_cast(this), flags); + TQListViewItemIterator it(const_cast(this), flags); for(; it.current(); ++it) list.append(it.current()); @@ -1261,7 +1261,7 @@ TQPtrList KListView::selectedItems(bool includeHiddenItems) cons } -void KListView::moveItem(TQListViewItem *item, TQListViewItem *parent, TQListViewItem *after) +void TDEListView::moveItem(TQListViewItem *item, TQListViewItem *parent, TQListViewItem *after) { // sanity check - don't move a item into its own child structure TQListViewItem *i = parent; @@ -1291,18 +1291,18 @@ void KListView::moveItem(TQListViewItem *item, TQListViewItem *parent, TQListVie insertItem(item); } -void KListView::contentsDragEnterEvent(TQDragEnterEvent *event) +void TDEListView::contentsDragEnterEvent(TQDragEnterEvent *event) { if (acceptDrag (event)) event->accept(); } -void KListView::setDropVisualizerWidth (int w) +void TDEListView::setDropVisualizerWidth (int w) { d->mDropVisualizerWidth = w > 0 ? w : 1; } -TQRect KListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, +TQRect TDEListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, TQListViewItem *after) { TQRect insertmarker; @@ -1341,7 +1341,7 @@ TQRect KListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, insertmarker.setBottom (insertmarker.bottom() + d->mDropVisualizerWidth/2); } - // This is not used anymore, at least by KListView itself (see viewportPaintEvent) + // This is not used anymore, at least by TDEListView itself (see viewportPaintEvent) // Remove for KDE 4.0. if (p) p->fillRect(insertmarker, Dense4Pattern); @@ -1349,7 +1349,7 @@ TQRect KListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, return insertmarker; } -TQRect KListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item) +TQRect TDEListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item) { TQRect r; @@ -1365,7 +1365,7 @@ TQRect KListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item) return r; } -void KListView::cleanItemHighlighter () +void TDEListView::cleanItemHighlighter () { if (d->mOldDropHighlighter.isValid()) { @@ -1375,7 +1375,7 @@ void KListView::cleanItemHighlighter () } } -void KListView::rename(TQListViewItem *item, int c) +void TDEListView::rename(TQListViewItem *item, int c) { if (d->renameable.contains(c)) { @@ -1384,12 +1384,12 @@ void KListView::rename(TQListViewItem *item, int c) } } -bool KListView::isRenameable (int col) const +bool TDEListView::isRenameable (int col) const { return d->renameable.contains(col); } -void KListView::setRenameable (int col, bool renameable) +void TDEListView::setRenameable (int col, bool renameable) { if (col>=header()->count()) return; @@ -1398,69 +1398,69 @@ void KListView::setRenameable (int col, bool renameable) d->renameable+=col; } -void KListView::doneEditing(TQListViewItem *item, int row) +void TDEListView::doneEditing(TQListViewItem *item, int row) { emit itemRenamed(item, item->text(row), row); emit itemRenamed(item); } -bool KListView::acceptDrag(TQDropEvent* e) const +bool TDEListView::acceptDrag(TQDropEvent* e) const { return acceptDrops() && itemsMovable() && (e->source()==viewport()); } -void KListView::setCreateChildren(bool b) +void TDEListView::setCreateChildren(bool b) { d->createChildren=b; } -bool KListView::createChildren() const +bool TDEListView::createChildren() const { return d->createChildren; } -int KListView::tooltipColumn() const +int TDEListView::tooltipColumn() const { return d->tooltipColumn; } -void KListView::setTooltipColumn(int column) +void TDEListView::setTooltipColumn(int column) { d->tooltipColumn=column; } -void KListView::setDropHighlighter(bool b) +void TDEListView::setDropHighlighter(bool b) { d->dropHighlighter=b; } -bool KListView::dropHighlighter() const +bool TDEListView::dropHighlighter() const { return d->dropHighlighter; } -bool KListView::showTooltip(TQListViewItem *item, const TQPoint &, int column) const +bool TDEListView::showTooltip(TQListViewItem *item, const TQPoint &, int column) const { return ((column==tooltipColumn()) && !tooltip(item, column).isEmpty()); } -TQString KListView::tooltip(TQListViewItem *item, int column) const +TQString TDEListView::tooltip(TQListViewItem *item, int column) const { return item->text(column); } -void KListView::setTabOrderedRenaming(bool b) +void TDEListView::setTabOrderedRenaming(bool b) { d->tabRename = b; } -bool KListView::tabOrderedRenaming() const +bool TDEListView::tabOrderedRenaming() const { return d->tabRename; } -void KListView::keyPressEvent (TQKeyEvent* e) +void TDEListView::keyPressEvent (TQKeyEvent* e) { //don't we need a contextMenuModifier too ? (aleXXX) if (e->key() == d->contextMenuKey) @@ -1475,7 +1475,7 @@ void KListView::keyPressEvent (TQKeyEvent* e) fileManagerKeyPressEvent (e); } -void KListView::activateAutomaticSelection() +void TDEListView::activateAutomaticSelection() { d->selectedBySimpleMove=true; d->selectedUsingMouse=false; @@ -1487,17 +1487,17 @@ void KListView::activateAutomaticSelection() }; } -void KListView::deactivateAutomaticSelection() +void TDEListView::deactivateAutomaticSelection() { d->selectedBySimpleMove=false; } -bool KListView::automaticSelection() const +bool TDEListView::automaticSelection() const { return d->selectedBySimpleMove; } -void KListView::fileManagerKeyPressEvent (TQKeyEvent* e) +void TDEListView::fileManagerKeyPressEvent (TQKeyEvent* e) { //don't care whether it's on the keypad or not int e_state=(e->state() & ~Keypad); @@ -1827,7 +1827,7 @@ void KListView::fileManagerKeyPressEvent (TQKeyEvent* e) emit selectionChanged(); } -void KListView::setSelectionModeExt (SelectionModeExt mode) +void TDEListView::setSelectionModeExt (SelectionModeExt mode) { d->selectionMode = mode; @@ -1850,12 +1850,12 @@ void KListView::setSelectionModeExt (SelectionModeExt mode) } } -KListView::SelectionModeExt KListView::selectionModeExt () const +TDEListView::SelectionModeExt TDEListView::selectionModeExt () const { return d->selectionMode; } -int KListView::itemIndex( const TQListViewItem *item ) const +int TDEListView::itemIndex( const TQListViewItem *item ) const { if ( !item ) return -1; @@ -1874,7 +1874,7 @@ int KListView::itemIndex( const TQListViewItem *item ) const } } -TQListViewItem* KListView::itemAtIndex(int index) +TQListViewItem* TDEListView::itemAtIndex(int index) { if (index<0) return 0; @@ -1890,7 +1890,7 @@ TQListViewItem* KListView::itemAtIndex(int index) } -void KListView::emitContextMenu (KListView*, TQListViewItem* i) +void TDEListView::emitContextMenu (TDEListView*, TQListViewItem* i) { TQPoint p; @@ -1902,24 +1902,24 @@ void KListView::emitContextMenu (KListView*, TQListViewItem* i) emit contextMenu (this, i, p); } -void KListView::emitContextMenu (TQListViewItem* i, const TQPoint& p, int) +void TDEListView::emitContextMenu (TQListViewItem* i, const TQPoint& p, int) { emit contextMenu (this, i, p); } -void KListView::setAcceptDrops (bool val) +void TDEListView::setAcceptDrops (bool val) { TQListView::setAcceptDrops (val); viewport()->setAcceptDrops (val); } -int KListView::dropVisualizerWidth () const +int TDEListView::dropVisualizerWidth () const { return d->mDropVisualizerWidth; } -void KListView::viewportPaintEvent(TQPaintEvent *e) +void TDEListView::viewportPaintEvent(TQPaintEvent *e) { d->paintAbove = 0; d->paintCurrent = 0; @@ -1946,23 +1946,23 @@ void KListView::viewportPaintEvent(TQPaintEvent *e) d->painting = false; } -void KListView::setFullWidth() +void TDEListView::setFullWidth() { setFullWidth(true); } -void KListView::setFullWidth(bool fullWidth) +void TDEListView::setFullWidth(bool fullWidth) { d->fullWidth = fullWidth; header()->setStretchEnabled(fullWidth, columns()-1); } -bool KListView::fullWidth() const +bool TDEListView::fullWidth() const { return d->fullWidth; } -int KListView::addColumn(const TQString& label, int width) +int TDEListView::addColumn(const TQString& label, int width) { int result = TQListView::addColumn(label, width); if (d->fullWidth) { @@ -1972,7 +1972,7 @@ int KListView::addColumn(const TQString& label, int width) return result; } -int KListView::addColumn(const TQIconSet& iconset, const TQString& label, int width) +int TDEListView::addColumn(const TQIconSet& iconset, const TQString& label, int width) { int result = TQListView::addColumn(iconset, label, width); if (d->fullWidth) { @@ -1982,40 +1982,40 @@ int KListView::addColumn(const TQIconSet& iconset, const TQString& label, int wi return result; } -void KListView::removeColumn(int index) +void TDEListView::removeColumn(int index) { TQListView::removeColumn(index); if (d->fullWidth && index == columns()) header()->setStretchEnabled(true, columns()-1); } -void KListView::viewportResizeEvent(TQResizeEvent* e) +void TDEListView::viewportResizeEvent(TQResizeEvent* e) { TQListView::viewportResizeEvent(e); } -const TQColor &KListView::alternateBackground() const +const TQColor &TDEListView::alternateBackground() const { return d->alternateBackground; } -void KListView::setAlternateBackground(const TQColor &c) +void TDEListView::setAlternateBackground(const TQColor &c) { d->alternateBackground = c; repaint(); } -void KListView::setShadeSortColumn(bool shadeSortColumn) +void TDEListView::setShadeSortColumn(bool shadeSortColumn) { d->shadeSortColumn = shadeSortColumn; repaint(); } -bool KListView::shadeSortColumn() const +bool TDEListView::shadeSortColumn() const { return d->shadeSortColumn; } -void KListView::saveLayout(TDEConfig *config, const TQString &group) const +void TDEListView::saveLayout(TDEConfig *config, const TQString &group) const { TDEConfigGroupSaver saver(config, group); TQStringList widths, order; @@ -2033,7 +2033,7 @@ void KListView::saveLayout(TDEConfig *config, const TQString &group) const config->writeEntry("SortAscending", d->sortAscending); } -void KListView::restoreLayout(TDEConfig *config, const TQString &group) +void TDEListView::restoreLayout(TDEConfig *config, const TQString &group) { TDEConfigGroupSaver saver(config, group); TQStringList cols = config->readListEntry("ColumnWidths"); @@ -2068,7 +2068,7 @@ void KListView::restoreLayout(TDEConfig *config, const TQString &group) setSorting(config->readNumEntry("SortColumn"), config->readBoolEntry("SortAscending", true)); } -void KListView::setSorting(int column, bool ascending) +void TDEListView::setSorting(int column, bool ascending) { TQListViewItem *selected = 0; @@ -2095,23 +2095,23 @@ void KListView::setSorting(int column, bool ascending) TQListViewItem* item = firstChild(); while ( item ) { - KListViewItem *kItem = dynamic_cast(item); + TDEListViewItem *kItem = dynamic_cast(item); if (kItem) kItem->m_known = false; item = item->itemBelow(); } } -int KListView::columnSorted(void) const +int TDEListView::columnSorted(void) const { return d->sortColumn; } -bool KListView::ascendingSort(void) const +bool TDEListView::ascendingSort(void) const { return d->sortAscending; } -void KListView::takeItem(TQListViewItem *item) +void TDEListView::takeItem(TQListViewItem *item) { if(item && item == d->editor->currentItem()) d->editor->terminate(); @@ -2119,7 +2119,7 @@ void KListView::takeItem(TQListViewItem *item) TQListView::takeItem(item); } -void KListView::disableAutoSelection() +void TDEListView::disableAutoSelection() { if ( d->disableAutoSelection ) return; @@ -2129,7 +2129,7 @@ void KListView::disableAutoSelection() d->autoSelectDelay = -1; } -void KListView::resetAutoSelection() +void TDEListView::resetAutoSelection() { if ( !d->disableAutoSelection ) return; @@ -2138,36 +2138,36 @@ void KListView::resetAutoSelection() d->autoSelectDelay = TDEGlobalSettings::autoSelectDelay(); } -void KListView::doubleClicked( TQListViewItem *item, const TQPoint &pos, int c ) +void TDEListView::doubleClicked( TQListViewItem *item, const TQPoint &pos, int c ) { emit TQListView::doubleClicked( item, pos, c ); } -KListViewItem::KListViewItem(TQListView *parent) +TDEListViewItem::TDEListViewItem(TQListView *parent) : TQListViewItem(parent) { init(); } -KListViewItem::KListViewItem(TQListViewItem *parent) +TDEListViewItem::TDEListViewItem(TQListViewItem *parent) : TQListViewItem(parent) { init(); } -KListViewItem::KListViewItem(TQListView *parent, TQListViewItem *after) +TDEListViewItem::TDEListViewItem(TQListView *parent, TQListViewItem *after) : TQListViewItem(parent, after) { init(); } -KListViewItem::KListViewItem(TQListViewItem *parent, TQListViewItem *after) +TDEListViewItem::TDEListViewItem(TQListViewItem *parent, TQListViewItem *after) : TQListViewItem(parent, after) { init(); } -KListViewItem::KListViewItem(TQListView *parent, +TDEListViewItem::TDEListViewItem(TQListView *parent, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) : TQListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) @@ -2175,7 +2175,7 @@ KListViewItem::KListViewItem(TQListView *parent, init(); } -KListViewItem::KListViewItem(TQListViewItem *parent, +TDEListViewItem::TDEListViewItem(TQListViewItem *parent, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) : TQListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) @@ -2183,7 +2183,7 @@ KListViewItem::KListViewItem(TQListViewItem *parent, init(); } -KListViewItem::KListViewItem(TQListView *parent, TQListViewItem *after, +TDEListViewItem::TDEListViewItem(TQListView *parent, TQListViewItem *after, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) : TQListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) @@ -2191,7 +2191,7 @@ KListViewItem::KListViewItem(TQListView *parent, TQListViewItem *after, init(); } -KListViewItem::KListViewItem(TQListViewItem *parent, TQListViewItem *after, +TDEListViewItem::TDEListViewItem(TQListViewItem *parent, TQListViewItem *after, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) : TQListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) @@ -2199,44 +2199,44 @@ KListViewItem::KListViewItem(TQListViewItem *parent, TQListViewItem *after, init(); } -KListViewItem::~KListViewItem() +TDEListViewItem::~TDEListViewItem() { if(listView()) - emit static_cast(listView())->itemRemoved(this); + emit static_cast(listView())->itemRemoved(this); } -void KListViewItem::init() +void TDEListViewItem::init() { m_odd = m_known = false; - KListView *lv = static_cast(listView()); + TDEListView *lv = static_cast(listView()); setDragEnabled( dragEnabled() || lv->dragEnabled() ); emit lv->itemAdded(this); } -void KListViewItem::insertItem(TQListViewItem *item) +void TDEListViewItem::insertItem(TQListViewItem *item) { TQListViewItem::insertItem(item); if(listView()) - emit static_cast(listView())->itemAdded(item); + emit static_cast(listView())->itemAdded(item); } -void KListViewItem::takeItem(TQListViewItem *item) +void TDEListViewItem::takeItem(TQListViewItem *item) { TQListViewItem::takeItem(item); if(listView()) - emit static_cast(listView())->itemRemoved(item); + emit static_cast(listView())->itemRemoved(item); } -const TQColor &KListViewItem::backgroundColor() +const TQColor &TDEListViewItem::backgroundColor() { if (isAlternate()) - return static_cast< KListView* >(listView())->alternateBackground(); + return static_cast< TDEListView* >(listView())->alternateBackground(); return listView()->viewport()->colorGroup().base(); } -TQColor KListViewItem::backgroundColor(int column) +TQColor TDEListViewItem::backgroundColor(int column) { - KListView* view = static_cast< KListView* >(listView()); + TDEListView* view = static_cast< TDEListView* >(listView()); TQColor color = isAlternate() ? view->alternateBackground() : view->viewport()->colorGroup().base(); @@ -2260,14 +2260,14 @@ TQColor KListViewItem::backgroundColor(int column) return color; } -bool KListViewItem::isAlternate() +bool TDEListViewItem::isAlternate() { - KListView* const lv = static_cast(listView()); + TDEListView* const lv = static_cast(listView()); if (lv && lv->alternateBackground().isValid()) { - KListViewItem *above; + TDEListViewItem *above; - KListView::KListViewPrivate* const lvD = lv->d; + TDEListView::TDEListViewPrivate* const lvD = lv->d; // Ok, there's some weirdness here that requires explanation as this is a // speed hack. itemAbove() is a O(n) operation (though this isn't @@ -2294,11 +2294,11 @@ bool KListViewItem::isAlternate() lvD->paintBelow = itemBelow(); } - above = dynamic_cast(lvD->paintAbove); + above = dynamic_cast(lvD->paintAbove); } else { - above = dynamic_cast(itemAbove()); + above = dynamic_cast(itemAbove()); } m_known = above ? above->m_known : true; @@ -2308,18 +2308,18 @@ bool KListViewItem::isAlternate() } else { - KListViewItem *item; + TDEListViewItem *item; bool previous = true; if (parent()) { - item = dynamic_cast(parent()); + item = dynamic_cast(parent()); if (item) previous = item->m_odd; - item = dynamic_cast(parent()->firstChild()); + item = dynamic_cast(parent()->firstChild()); } else { - item = dynamic_cast(lv->firstChild()); + item = dynamic_cast(lv->firstChild()); } while(item) @@ -2327,7 +2327,7 @@ bool KListViewItem::isAlternate() previous = !previous; item->m_odd = previous; item->m_known = true; - item = dynamic_cast(item->nextSibling()); + item = dynamic_cast(item->nextSibling()); } } return m_odd; @@ -2335,7 +2335,7 @@ bool KListViewItem::isAlternate() return false; } -void KListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) +void TDEListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { TQColorGroup _cg = cg; TQListView* lv = listView(); @@ -2363,7 +2363,7 @@ void KListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, selection of the current item is just set to \a select. */ -void KListView::selectAll( bool select ) +void TDEListView::selectAll( bool select ) { if ( selectionMode() == Multi || selectionMode() == Extended ) { bool b = signalsBlocked(); @@ -2402,7 +2402,7 @@ void KListView::selectAll( bool select ) } } -void KListView::virtual_hook( int, void* ) +void TDEListView::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "klistview.moc" diff --git a/tdeui/klistview.h b/tdeui/klistview.h index ee283aa5f..750100b8c 100644 --- a/tdeui/klistview.h +++ b/tdeui/klistview.h @@ -46,13 +46,13 @@ class KLineEdit; * To see where you are dropping, setDropVisualizer(true). * And also you'll need acceptDrag(TQDropEvent*) * - * KListView is drag-enabled, too: to benefit from that you have to derive from it. + * TDEListView is drag-enabled, too: to benefit from that you have to derive from it. * Reimplement dragObject() and (possibly) startDrag(), * and setDragEnabled(true). */ -class TDEUI_EXPORT KListView : public TQListView +class TDEUI_EXPORT TDEListView : public TQListView { - friend class KListViewItem; + friend class TDEListViewItem; Q_OBJECT @@ -116,12 +116,12 @@ public: * The parameters @p parent and @p name are handled by * TQListView, as usual. */ - KListView (TQWidget *parent = 0, const char *name = 0); + TDEListView (TQWidget *parent = 0, const char *name = 0); /** * Destructor. */ - virtual ~KListView(); + virtual ~TDEListView(); /** * Reimplemented for internal reasons. @@ -333,7 +333,7 @@ public: /** * sets the alternate background background color. - * This only has an effect if the items are KListViewItems + * This only has an effect if the items are TDEListViewItems * * @param c the color to use for every other item. Set to an invalid * color to disable alternate colors. @@ -452,7 +452,7 @@ signals: * @param after is the item after which the drop occurred (or 0L, if * the drop was above all items */ - void dropped (KListView* list, TQDropEvent* e, TQListViewItem* after); + void dropped (TDEListView* list, TQDropEvent* e, TQListViewItem* after); /** * This signal gets emitted whenever something acceptable is @@ -466,7 +466,7 @@ signals: * @param after is the item after which the drop occurred (or 0L, if * the drop was above all items */ - void dropped (KListView* list, TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after); + void dropped (TDEListView* list, TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after); /** * This signal gets emitted whenever something acceptable is @@ -494,7 +494,7 @@ signals: * a move is made, for example, to disable sorting * * This is sent only once per each groups of moves. That is, for each - * drop that is a move this will be emitted once, before KListView calls + * drop that is a move this will be emitted once, before TDEListView calls * @see moveItem() */ void aboutToMove(); @@ -538,13 +538,13 @@ signals: * This signal is emitted when the shortcut key for popup-menus is pressed. * * Normally you should not use this, just connect a slot to signal - * contextMenu (KListView*, TQListViewItem*, const TQPoint&) to correctly + * contextMenu (TDEListView*, TQListViewItem*, const TQPoint&) to correctly * handle showing context menus regardless of settings. * * @param list is this listview. * @param item is the currentItem() at the time the key was pressed. May be 0L. */ - void menuShortCutPressed (KListView* list, TQListViewItem* item); + void menuShortCutPressed (TDEListView* list, TQListViewItem* item); /** * This signal is emitted whenever a context-menu should be shown for item @p i. @@ -554,7 +554,7 @@ signals: * @param i is the item for which the menu should be shown. May be 0L. * @param p is the point at which the menu should be shown. */ - void contextMenu (KListView* l, TQListViewItem* i, const TQPoint& p); + void contextMenu (TDEListView* l, TQListViewItem* i, const TQPoint& p); void itemAdded(TQListViewItem *item); void itemRemoved(TQListViewItem *item); @@ -571,7 +571,7 @@ public slots: * Use this function to enable the feature on other columns. * * If you want more intelligent (dynamic) selection, - * you'll have to derive from KListView, + * you'll have to derive from TDEListView, * and override rename() and call only call it * if you want the item to be renamed. */ @@ -947,7 +947,7 @@ protected slots: /** * Emit the contextMenu signal. This slot is for key presses. */ - void emitContextMenu (KListView*, TQListViewItem*); + void emitContextMenu (TDEListView*, TQListViewItem*); /** * Accessory slot for AutoSelect @@ -1004,8 +1004,8 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KListViewPrivate; - KListViewPrivate* const d; + class TDEListViewPrivate; + TDEListViewPrivate* const d; bool isExecuteArea( int x, TQListViewItem* item ); }; @@ -1015,46 +1015,46 @@ private: * * @short listview item with alternate background color support */ -class TDEUI_EXPORT KListViewItem : public TQListViewItem +class TDEUI_EXPORT TDEListViewItem : public TQListViewItem { - friend class KListView; + friend class TDEListView; public: /** * constructors. The semantics remain as in TQListViewItem. * Although they accept a TQListViewItem as parent, please - * don't mix KListViewItem (or subclasses) with QListViewItem + * don't mix TDEListViewItem (or subclasses) with QListViewItem * (or subclasses). */ - KListViewItem(TQListView *parent); - KListViewItem(TQListViewItem *parent); - KListViewItem(TQListView *parent, TQListViewItem *after); - KListViewItem(TQListViewItem *parent, TQListViewItem *after); + TDEListViewItem(TQListView *parent); + TDEListViewItem(TQListViewItem *parent); + TDEListViewItem(TQListView *parent, TQListViewItem *after); + TDEListViewItem(TQListViewItem *parent, TQListViewItem *after); - KListViewItem(TQListView *parent, + TDEListViewItem(TQListView *parent, TQString, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null); - KListViewItem(TQListViewItem *parent, + TDEListViewItem(TQListViewItem *parent, TQString, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null); - KListViewItem(TQListView *parent, TQListViewItem *after, + TDEListViewItem(TQListView *parent, TQListViewItem *after, TQString, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null); - KListViewItem(TQListViewItem *parent, TQListViewItem *after, + TDEListViewItem(TQListViewItem *parent, TQListViewItem *after, TQString, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null); - virtual ~KListViewItem(); + virtual ~TDEListViewItem(); virtual void insertItem(TQListViewItem *item); virtual void takeItem(TQListViewItem *item); diff --git a/tdeui/klistviewlineedit.h b/tdeui/klistviewlineedit.h index f08997925..d0019698e 100644 --- a/tdeui/klistviewlineedit.h +++ b/tdeui/klistviewlineedit.h @@ -22,15 +22,15 @@ #include /** - * the editor for a KListView. please don't use this. + * the editor for a TDEListView. please don't use this. * @internal **/ -class TDEUI_EXPORT KListViewLineEdit : public KLineEdit +class TDEUI_EXPORT TDEListViewLineEdit : public KLineEdit { Q_OBJECT public: - KListViewLineEdit(KListView *parent); - ~KListViewLineEdit(); + TDEListViewLineEdit(TDEListView *parent); + ~TDEListViewLineEdit(); TQListViewItem *currentItem() const; @@ -52,7 +52,7 @@ protected: void terminate(bool commit); TQListViewItem *item; int col; - KListView* const p; + TDEListView* const p; protected slots: void slotSelectionChanged(); diff --git a/tdeui/klistviewsearchline.cpp b/tdeui/klistviewsearchline.cpp index 7f96ed94d..96bf82370 100644 --- a/tdeui/klistviewsearchline.cpp +++ b/tdeui/klistviewsearchline.cpp @@ -33,17 +33,17 @@ #define KLISTVIEWSEARCHLINE_ALLVISIBLECOLUMNS_ID 2004 -class KListViewSearchLine::KListViewSearchLinePrivate +class TDEListViewSearchLine::TDEListViewSearchLinePrivate { public: - KListViewSearchLinePrivate() : + TDEListViewSearchLinePrivate() : listView(0), caseSensitive(false), activeSearch(false), keepParentsVisible(true), queuedSearches(0) {} - KListView *listView; + TDEListView *listView; bool caseSensitive; bool activeSearch; bool keepParentsVisible; @@ -56,10 +56,10 @@ public: // public methods //////////////////////////////////////////////////////////////////////////////// -KListViewSearchLine::KListViewSearchLine(TQWidget *parent, KListView *listView, const char *name) : +TDEListViewSearchLine::TDEListViewSearchLine(TQWidget *parent, TDEListView *listView, const char *name) : KLineEdit(parent, name) { - d = new KListViewSearchLinePrivate; + d = new TDEListViewSearchLinePrivate; d->listView = listView; @@ -77,10 +77,10 @@ KListViewSearchLine::KListViewSearchLine(TQWidget *parent, KListView *listView, setEnabled(false); } -KListViewSearchLine::KListViewSearchLine(TQWidget *parent, const char *name) : +TDEListViewSearchLine::TDEListViewSearchLine(TQWidget *parent, const char *name) : KLineEdit(parent, name) { - d = new KListViewSearchLinePrivate; + d = new TDEListViewSearchLinePrivate; d->listView = 0; @@ -90,27 +90,27 @@ KListViewSearchLine::KListViewSearchLine(TQWidget *parent, const char *name) : setEnabled(false); } -KListViewSearchLine::~KListViewSearchLine() +TDEListViewSearchLine::~TDEListViewSearchLine() { delete d; } -bool KListViewSearchLine::caseSensitive() const +bool TDEListViewSearchLine::caseSensitive() const { return d->caseSensitive; } -TQValueList KListViewSearchLine::searchColumns() const +TQValueList TDEListViewSearchLine::searchColumns() const { return d->searchColumns; } -bool KListViewSearchLine::keepParentsVisible() const +bool TDEListViewSearchLine::keepParentsVisible() const { return d->keepParentsVisible; } -KListView *KListViewSearchLine::listView() const +TDEListView *TDEListViewSearchLine::listView() const { return d->listView; } @@ -119,7 +119,7 @@ KListView *KListViewSearchLine::listView() const // public slots //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::updateSearch(const TQString &s) +void TDEListViewSearchLine::updateSearch(const TQString &s) { if(!d->listView) return; @@ -133,9 +133,9 @@ void KListViewSearchLine::updateSearch(const TQString &s) switch(d->listView->selectionMode()) { - case KListView::NoSelection: + case TDEListView::NoSelection: break; - case KListView::Single: + case TDEListView::Single: currentItem = d->listView->selectedItem(); break; default: @@ -160,22 +160,22 @@ void KListViewSearchLine::updateSearch(const TQString &s) d->listView->ensureItemVisible(currentItem); } -void KListViewSearchLine::setCaseSensitive(bool cs) +void TDEListViewSearchLine::setCaseSensitive(bool cs) { d->caseSensitive = cs; } -void KListViewSearchLine::setKeepParentsVisible(bool v) +void TDEListViewSearchLine::setKeepParentsVisible(bool v) { d->keepParentsVisible = v; } -void KListViewSearchLine::setSearchColumns(const TQValueList &columns) +void TDEListViewSearchLine::setSearchColumns(const TQValueList &columns) { d->searchColumns = columns; } -void KListViewSearchLine::setListView(KListView *lv) +void TDEListViewSearchLine::setListView(TDEListView *lv) { if(d->listView) { disconnect(d->listView, TQT_SIGNAL(destroyed()), @@ -202,7 +202,7 @@ void KListViewSearchLine::setListView(KListView *lv) // protected members //////////////////////////////////////////////////////////////////////////////// -bool KListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString &s) const +bool TDEListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString &s) const { if(s.isEmpty()) return true; @@ -231,7 +231,7 @@ bool KListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString return false; } -TQPopupMenu *KListViewSearchLine::createPopupMenu() +TQPopupMenu *TDEListViewSearchLine::createPopupMenu() { TQPopupMenu *popup = KLineEdit::createPopupMenu(); @@ -281,14 +281,14 @@ TQPopupMenu *KListViewSearchLine::createPopupMenu() // protected slots //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::queueSearch(const TQString &search) +void TDEListViewSearchLine::queueSearch(const TQString &search) { d->queuedSearches++; d->search = search; TQTimer::singleShot(200, this, TQT_SLOT(activateSearch())); } -void KListViewSearchLine::activateSearch() +void TDEListViewSearchLine::activateSearch() { --(d->queuedSearches); @@ -300,18 +300,18 @@ void KListViewSearchLine::activateSearch() // private slots //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::itemAdded(TQListViewItem *item) const +void TDEListViewSearchLine::itemAdded(TQListViewItem *item) const { item->setVisible(itemMatches(item, text())); } -void KListViewSearchLine::listViewDeleted() +void TDEListViewSearchLine::listViewDeleted() { d->listView = 0; setEnabled(false); } -void KListViewSearchLine::searchColumnsMenuActivated(int id) +void TDEListViewSearchLine::searchColumnsMenuActivated(int id) { if(id == KLISTVIEWSEARCHLINE_ALLVISIBLECOLUMNS_ID) { if(d->searchColumns.isEmpty()) @@ -340,7 +340,7 @@ void KListViewSearchLine::searchColumnsMenuActivated(int id) // private methods //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::checkItemParentsNotVisible() +void TDEListViewSearchLine::checkItemParentsNotVisible() { TQListViewItemIterator it(d->listView); for(; it.current(); ++it) @@ -364,7 +364,7 @@ void KListViewSearchLine::checkItemParentsNotVisible() * \return \c true if an item which should be visible is found, \c false if all items found should be hidden. If this function * returns true and \p highestHiddenParent was not 0, highestHiddenParent will have been shown. */ -bool KListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent) +bool TDEListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent) { bool visible = false; TQListViewItem * first = item; @@ -403,24 +403,24 @@ bool KListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListVi } //////////////////////////////////////////////////////////////////////////////// -// KListViewSearchLineWidget +// TDEListViewSearchLineWidget //////////////////////////////////////////////////////////////////////////////// -class KListViewSearchLineWidget::KListViewSearchLineWidgetPrivate +class TDEListViewSearchLineWidget::TDEListViewSearchLineWidgetPrivate { public: - KListViewSearchLineWidgetPrivate() : listView(0), searchLine(0), clearButton(0) {} - KListView *listView; - KListViewSearchLine *searchLine; + TDEListViewSearchLineWidgetPrivate() : listView(0), searchLine(0), clearButton(0) {} + TDEListView *listView; + TDEListViewSearchLine *searchLine; TQToolButton *clearButton; }; -KListViewSearchLineWidget::KListViewSearchLineWidget(KListView *listView, +TDEListViewSearchLineWidget::TDEListViewSearchLineWidget(TDEListView *listView, TQWidget *parent, const char *name) : TQHBox(parent, name) { - d = new KListViewSearchLineWidgetPrivate; + d = new TDEListViewSearchLineWidgetPrivate; d->listView = listView; setSpacing(5); @@ -428,19 +428,19 @@ KListViewSearchLineWidget::KListViewSearchLineWidget(KListView *listView, TQTimer::singleShot(0, this, TQT_SLOT(createWidgets())); } -KListViewSearchLineWidget::~KListViewSearchLineWidget() +TDEListViewSearchLineWidget::~TDEListViewSearchLineWidget() { delete d; } -KListViewSearchLine *KListViewSearchLineWidget::createSearchLine(KListView *listView) +TDEListViewSearchLine *TDEListViewSearchLineWidget::createSearchLine(TDEListView *listView) { if(!d->searchLine) - d->searchLine = new KListViewSearchLine(this, listView); + d->searchLine = new TDEListViewSearchLine(this, listView); return d->searchLine; } -void KListViewSearchLineWidget::createWidgets() +void TDEListViewSearchLineWidget::createWidgets() { positionInToolBar(); @@ -463,14 +463,14 @@ void KListViewSearchLineWidget::createWidgets() connect(d->clearButton, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(clear())); } -KListViewSearchLine *KListViewSearchLineWidget::searchLine() const +TDEListViewSearchLine *TDEListViewSearchLineWidget::searchLine() const { return d->searchLine; } -void KListViewSearchLineWidget::positionInToolBar() +void TDEListViewSearchLineWidget::positionInToolBar() { - KToolBar *toolBar = tqt_dynamic_cast(parent()); + TDEToolBar *toolBar = tqt_dynamic_cast(parent()); if(toolBar) { @@ -486,7 +486,7 @@ void KListViewSearchLineWidget::positionInToolBar() toolBar->setItemAutoSized(id); if(!d->clearButton) { TQString icon = TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase"; - d->clearButton = new KToolBarButton(icon, 2005, toolBar); + d->clearButton = new TDEToolBarButton(icon, 2005, toolBar); } toolBar->insertWidget(2005, d->clearButton->width(), d->clearButton, index); break; diff --git a/tdeui/klistviewsearchline.h b/tdeui/klistviewsearchline.h index f763aad72..4c278a9d9 100644 --- a/tdeui/klistviewsearchline.h +++ b/tdeui/klistviewsearchline.h @@ -22,7 +22,7 @@ #include #include -class KListView; +class TDEListView; class TQListViewItem; class TQToolButton; @@ -31,12 +31,12 @@ class TQToolButton; * listview based on a simple text search. * * No changes to the application other than instantiating this class with an - * appropriate KListView should be needed. + * appropriate TDEListView should be needed. * * If you want the clear button and the search label, you should take a look at - * the KListViewSearchLineWidget + * the TDEListViewSearchLineWidget * - * @note { When iterating over items in the KListView, make sure that + * @note { When iterating over items in the TDEListView, make sure that * the iterator only includes visible items (for example, by adding * TQListViewItemIterator::Visible to the iterator flags). Otherwise, * actions (such as deletion) may be taken on items that have been @@ -44,31 +44,31 @@ class TQToolButton; * @since 3.3 */ -class TDEUI_EXPORT KListViewSearchLine : public KLineEdit +class TDEUI_EXPORT TDEListViewSearchLine : public KLineEdit { Q_OBJECT public: /** - * Constructs a KListViewSearchLine with \a listView being the KListView to + * Constructs a TDEListViewSearchLine with \a listView being the TDEListView to * be filtered. * * If \a listView is null then the widget will be disabled until a listview * is set with setListView(). */ - KListViewSearchLine(TQWidget *parent = 0, KListView *listView = 0, const char *name = 0); + TDEListViewSearchLine(TQWidget *parent = 0, TDEListView *listView = 0, const char *name = 0); /** - * Constructs a KListViewSearchLine without any KListView to filter. The - * KListView object has to be set later with setListView(). + * Constructs a TDEListViewSearchLine without any TDEListView to filter. The + * TDEListView object has to be set later with setListView(). */ - KListViewSearchLine(TQWidget *parent, const char *name); + TDEListViewSearchLine(TQWidget *parent, const char *name); /** - * Destroys the KListViewSearchLine. + * Destroys the TDEListViewSearchLine. */ - virtual ~KListViewSearchLine(); + virtual ~TDEListViewSearchLine(); /** * Returns true if the search is case sensitive. This defaults to false. @@ -98,7 +98,7 @@ public: * * @see setListView() */ - KListView *listView() const; + TDEListView *listView() const; public slots: /** @@ -136,12 +136,12 @@ public slots: void setSearchColumns(const TQValueList &columns); /** - * Sets the KListView that is filtered by this search line. If \a lv is null + * Sets the TDEListView that is filtered by this search line. If \a lv is null * then the widget will be disabled. * * @see listView() */ - void setListView(KListView *lv); + void setListView(TDEListView *lv); protected: @@ -206,43 +206,43 @@ private slots: void searchColumnsMenuActivated(int); private: - class KListViewSearchLinePrivate; - KListViewSearchLinePrivate *d; + class TDEListViewSearchLinePrivate; + TDEListViewSearchLinePrivate *d; }; /** - * Creates a widget featuring a KListViewSearchLine, a label with the text + * Creates a widget featuring a TDEListViewSearchLine, a label with the text * "Search" and a button to clear the search. * * @since 3.4 */ -class TDEUI_EXPORT KListViewSearchLineWidget : public TQHBox +class TDEUI_EXPORT TDEListViewSearchLineWidget : public TQHBox { Q_OBJECT public: /** - * Creates a KListViewSearchLineWidget for \a listView with \a parent as the + * Creates a TDEListViewSearchLineWidget for \a listView with \a parent as the * parent with and \a name. */ - KListViewSearchLineWidget(KListView *listView = 0, TQWidget *parent = 0, + TDEListViewSearchLineWidget(TDEListView *listView = 0, TQWidget *parent = 0, const char *name = 0); /** - * Destroys the KListViewSearchLineWidget + * Destroys the TDEListViewSearchLineWidget */ - ~KListViewSearchLineWidget(); + ~TDEListViewSearchLineWidget(); /** * Creates the search line. This can be useful to reimplement in cases where - * a KListViewSearchLine subclass is used. + * a TDEListViewSearchLine subclass is used. */ - virtual KListViewSearchLine *createSearchLine(KListView *listView); + virtual TDEListViewSearchLine *createSearchLine(TDEListView *listView); /** * Returns a pointer to the search line. */ - KListViewSearchLine *searchLine() const; + TDEListViewSearchLine *searchLine() const; protected slots: /** @@ -257,8 +257,8 @@ private slots: void positionInToolBar(); private: - class KListViewSearchLineWidgetPrivate; - KListViewSearchLineWidgetPrivate *d; + class TDEListViewSearchLineWidgetPrivate; + TDEListViewSearchLineWidgetPrivate *d; }; #endif diff --git a/tdeui/kmainwindow.cpp b/tdeui/kmainwindow.cpp index de9bb8f8f..743c273cc 100644 --- a/tdeui/kmainwindow.cpp +++ b/tdeui/kmainwindow.cpp @@ -57,7 +57,7 @@ #include #include -class KMainWindowPrivate { +class TDEMainWindowPrivate { public: bool showHelpMenu:1; @@ -67,16 +67,16 @@ public: bool care_about_geometry:1; bool shuttingDown:1; TQString autoSaveGroup; - KAccel * kaccel; - KMainWindowInterface *m_interface; + TDEAccel * kaccel; + TDEMainWindowInterface *m_interface; KDEPrivate::ToolBarHandler *toolBarHandler; TQTimer* settingsTimer; - KToggleAction *showStatusBarAction; + TDEToggleAction *showStatusBarAction; TQRect defaultWindowSize; TQPtrList hiddenDockWindows; }; -TQPtrList* KMainWindow::memberList = 0L; +TQPtrList* TDEMainWindow::memberList = 0L; static bool no_query_exit = false; static KMWSessionManaged* ksm = 0; static KStaticDeleter ksmd; @@ -93,13 +93,13 @@ public: bool saveState( TQSessionManager& ) { TDEConfig* config = TDEApplication::kApplication()->sessionConfig(); - if ( KMainWindow::memberList->first() ){ + if ( TDEMainWindow::memberList->first() ){ // According to Jochen Wilhelmy , this // hook is useful for better document orientation - KMainWindow::memberList->first()->saveGlobalProperties(config); + TDEMainWindow::memberList->first()->saveGlobalProperties(config); } - TQPtrListIterator it(*KMainWindow::memberList); + TQPtrListIterator it(*TDEMainWindow::memberList); int n = 0; for (it.toFirst(); it.current(); ++it){ n++; @@ -115,10 +115,10 @@ public: // not really a fast method but the only compatible one if ( sm.allowsInteraction() ) { bool canceled = false; - TQPtrListIterator it(*KMainWindow::memberList); + TQPtrListIterator it(*TDEMainWindow::memberList); ::no_query_exit = true; for (it.toFirst(); it.current() && !canceled;){ - KMainWindow *window = *it; + TDEMainWindow *window = *it; ++it; // Update now, the current window might get deleted if ( !window->testWState( TQt::WState_ForceHide ) ) { TQCloseEvent e; @@ -144,9 +144,9 @@ public: if (canceled) return false; - KMainWindow* last = 0; + TDEMainWindow* last = 0; for (it.toFirst(); it.current() && !canceled; ++it){ - KMainWindow *window = *it; + TDEMainWindow *window = *it; if ( !window->testWState( TQt::WState_ForceHide ) ) { last = window; } @@ -164,19 +164,19 @@ public: static bool being_first = true; -KMainWindow::KMainWindow( TQWidget* parent, const char *name, WFlags f ) +TDEMainWindow::TDEMainWindow( TQWidget* parent, const char *name, WFlags f ) : TQMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 ) { - initKMainWindow(name, 0); + initTDEMainWindow(name, 0); } -KMainWindow::KMainWindow( int cflags, TQWidget* parent, const char *name, WFlags f ) +TDEMainWindow::TDEMainWindow( int cflags, TQWidget* parent, const char *name, WFlags f ) : TQMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 ) { - initKMainWindow(name, cflags); + initTDEMainWindow(name, cflags); } -void KMainWindow::initKMainWindow(const char *name, int cflags) +void TDEMainWindow::initTDEMainWindow(const char *name, int cflags) { KWhatsThisManager::init (); setDockMenuEnabled( false ); @@ -185,7 +185,7 @@ void KMainWindow::initKMainWindow(const char *name, int cflags) actionCollection()->setWidget( this ); connect(kapp, TQT_SIGNAL(shutDown()), this, TQT_SLOT(shuttingDown())); if( !memberList ) - memberList = new TQPtrList; + memberList = new TQPtrList; if ( !ksm ) ksm = ksmd.setObject(ksm, new KMWSessionManaged()); @@ -233,7 +233,7 @@ void KMainWindow::initKMainWindow(const char *name, int cflags) memberList->append( this ); - d = new KMainWindowPrivate; + d = new TDEMainWindowPrivate; d->showHelpMenu = true; d->settingsDirty = false; d->autoSaveSettings = false; @@ -255,13 +255,13 @@ void KMainWindow::initKMainWindow(const char *name, int cflags) if ( cflags & NoDCOPObject) d->m_interface = 0; else - d->m_interface = new KMainWindowInterface(this); + d->m_interface = new TDEMainWindowInterface(this); if (!kapp->authorize("movable_toolbars")) setDockWindowsMovable(false); } -KAction *KMainWindow::toolBarMenuAction() +TDEAction *TDEMainWindow::toolBarMenuAction() { if ( !d->toolBarHandler ) return 0; @@ -270,13 +270,13 @@ KAction *KMainWindow::toolBarMenuAction() } -void KMainWindow::setupToolbarMenuActions() +void TDEMainWindow::setupToolbarMenuActions() { if ( d->toolBarHandler ) d->toolBarHandler->setupActions(); } -void KMainWindow::parseGeometry(bool parsewidth) +void TDEMainWindow::parseGeometry(bool parsewidth) { assert ( !kapp->geometryArgument().isNull() ); assert ( d->care_about_geometry ); @@ -311,7 +311,7 @@ void KMainWindow::parseGeometry(bool parsewidth) #endif } -KMainWindow::~KMainWindow() +TDEMainWindow::~TDEMainWindow() { delete d->settingsTimer; TQMenuBar* mb = internalMenuBar(); @@ -321,7 +321,7 @@ KMainWindow::~KMainWindow() memberList->remove( this ); } -KPopupMenu* KMainWindow::helpMenu( const TQString &aboutAppText, bool showWhatsThis ) +TDEPopupMenu* TDEMainWindow::helpMenu( const TQString &aboutAppText, bool showWhatsThis ) { if( !mHelpMenu ) { if ( aboutAppText.isEmpty() ) @@ -338,7 +338,7 @@ KPopupMenu* KMainWindow::helpMenu( const TQString &aboutAppText, bool showWhatsT return mHelpMenu->menu(); } -KPopupMenu* KMainWindow::customHelpMenu( bool showWhatsThis ) +TDEPopupMenu* TDEMainWindow::customHelpMenu( bool showWhatsThis ) { if( !mHelpMenu ) { mHelpMenu = new KHelpMenu( this, TQString::null, showWhatsThis ); @@ -349,7 +349,7 @@ KPopupMenu* KMainWindow::customHelpMenu( bool showWhatsThis ) return mHelpMenu->menu(); } -bool KMainWindow::canBeRestored( int number ) +bool TDEMainWindow::canBeRestored( int number ) { if ( !kapp->isRestored() ) return false; @@ -361,7 +361,7 @@ bool KMainWindow::canBeRestored( int number ) return number >= 1 && number <= n; } -const TQString KMainWindow::classNameOfToplevel( int number ) +const TQString TDEMainWindow::classNameOfToplevel( int number ) { if ( !kapp->isRestored() ) return TQString::null; @@ -378,7 +378,7 @@ const TQString KMainWindow::classNameOfToplevel( int number ) return config->readEntry( TQString::fromLatin1("ClassName") ); } -void KMainWindow::show() +void TDEMainWindow::show() { TQMainWindow::show(); @@ -388,7 +388,7 @@ void KMainWindow::show() d->hiddenDockWindows.clear(); } -void KMainWindow::hide() +void TDEMainWindow::hide() { if ( isVisible() ) { @@ -408,27 +408,27 @@ void KMainWindow::hide() TQWidget::hide(); } -bool KMainWindow::restore( int number, bool show ) +bool TDEMainWindow::restore( int number, bool show ) { if ( !canBeRestored( number ) ) return false; TDEConfig *config = kapp->sessionConfig(); if ( readPropertiesInternal( config, number ) ){ if ( show ) - KMainWindow::show(); + TDEMainWindow::show(); return false; } return false; } -KXMLGUIFactory *KMainWindow::guiFactory() +KXMLGUIFactory *TDEMainWindow::guiFactory() { if ( !factory_ ) factory_ = new KXMLGUIFactory( this, TQT_TQOBJECT(this), "guifactory" ); return factory_; } -int KMainWindow::configureToolbars() +int TDEMainWindow::configureToolbars() { saveMainWindowSettings(TDEGlobal::config()); KEditToolbar dlg(actionCollection(), xmlFile(), true, this); @@ -436,17 +436,17 @@ int KMainWindow::configureToolbars() return dlg.exec(); } -void KMainWindow::saveNewToolbarConfig() +void TDEMainWindow::saveNewToolbarConfig() { createGUI(xmlFile()); applyMainWindowSettings( TDEGlobal::config() ); } -void KMainWindow::setupGUI( int options, const TQString & xmlfile ) { +void TDEMainWindow::setupGUI( int options, const TQString & xmlfile ) { setupGUI(TQSize(), options, xmlfile); } -void KMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xmlfile ) { +void TDEMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xmlfile ) { if( options & Keys ){ KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); @@ -488,7 +488,7 @@ void KMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xm } -void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) +void TDEMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) { // disabling the updates prevents unnecessary redraws setUpdatesEnabled( false ); @@ -544,7 +544,7 @@ void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) // using stuff like the toolbar editor ). // In addition we have to take care of not removing containers // like popupmenus, defined in the XML document. - // this code should probably go into a separate method in KMainWindow. + // this code should probably go into a separate method in TDEMainWindow. // there's just one problem: I'm bad in finding names ;-) , so // I skipped this ;-) @@ -568,27 +568,27 @@ void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) updateGeometry(); } -void KMainWindow::setHelpMenuEnabled(bool showHelpMenu) +void TDEMainWindow::setHelpMenuEnabled(bool showHelpMenu) { d->showHelpMenu = showHelpMenu; } -bool KMainWindow::isHelpMenuEnabled() +bool TDEMainWindow::isHelpMenuEnabled() { return d->showHelpMenu; } -void KMainWindow::setCaption( const TQString &caption ) +void TDEMainWindow::setCaption( const TQString &caption ) { setPlainCaption( kapp->makeStdCaption(caption) ); } -void KMainWindow::setCaption( const TQString &caption, bool modified ) +void TDEMainWindow::setCaption( const TQString &caption, bool modified ) { setPlainCaption( kapp->makeStdCaption(caption, true, modified) ); } -void KMainWindow::setPlainCaption( const TQString &caption ) +void TDEMainWindow::setPlainCaption( const TQString &caption ) { TQMainWindow::setCaption( caption ); #if defined Q_WS_X11 @@ -597,7 +597,7 @@ void KMainWindow::setPlainCaption( const TQString &caption ) #endif } -void KMainWindow::appHelpActivated( void ) +void TDEMainWindow::appHelpActivated( void ) { if( !mHelpMenu ) { mHelpMenu = new KHelpMenu( this ); @@ -607,7 +607,7 @@ void KMainWindow::appHelpActivated( void ) mHelpMenu->appHelpActivated(); } -void KMainWindow::slotStateChanged(const TQString &newstate) +void TDEMainWindow::slotStateChanged(const TQString &newstate) { stateChanged(newstate, KXMLGUIClient::StateNoReverse); } @@ -615,7 +615,7 @@ void KMainWindow::slotStateChanged(const TQString &newstate) /* * Get rid of this for KDE 4.0 */ -void KMainWindow::slotStateChanged(const TQString &newstate, +void TDEMainWindow::slotStateChanged(const TQString &newstate, KXMLGUIClient::ReverseStateChange reverse) { stateChanged(newstate, reverse); @@ -624,14 +624,14 @@ void KMainWindow::slotStateChanged(const TQString &newstate, /* * Enable this for KDE 4.0 */ -// void KMainWindow::slotStateChanged(const TQString &newstate, +// void TDEMainWindow::slotStateChanged(const TQString &newstate, // bool reverse) // { // stateChanged(newstate, // reverse ? KXMLGUIClient::StateReverse : KXMLGUIClient::StateNoReverse); // } -void KMainWindow::closeEvent ( TQCloseEvent *e ) +void TDEMainWindow::closeEvent ( TQCloseEvent *e ) { // Save settings if auto-save is enabled, and settings have changed if (d->settingsDirty && d->autoSaveSettings) @@ -641,7 +641,7 @@ void KMainWindow::closeEvent ( TQCloseEvent *e ) e->accept(); int not_withdrawn = 0; - TQPtrListIterator it(*KMainWindow::memberList); + TQPtrListIterator it(*TDEMainWindow::memberList); for (it.toFirst(); it.current(); ++it){ if ( !it.current()->isHidden() && it.current()->isTopLevel() && it.current() != this ) not_withdrawn++; @@ -661,35 +661,35 @@ void KMainWindow::closeEvent ( TQCloseEvent *e ) } } -bool KMainWindow::queryExit() +bool TDEMainWindow::queryExit() { return true; } -bool KMainWindow::queryClose() +bool TDEMainWindow::queryClose() { return true; } -void KMainWindow::saveGlobalProperties( TDEConfig* ) +void TDEMainWindow::saveGlobalProperties( TDEConfig* ) { } -void KMainWindow::readGlobalProperties( TDEConfig* ) +void TDEMainWindow::readGlobalProperties( TDEConfig* ) { } #if defined(KDE_COMPAT) -void KMainWindow::updateRects() +void TDEMainWindow::updateRects() { } #endif -void KMainWindow::showAboutApplication() +void TDEMainWindow::showAboutApplication() { } -void KMainWindow::savePropertiesInternal( TDEConfig *config, int number ) +void TDEMainWindow::savePropertiesInternal( TDEConfig *config, int number ) { bool oldASWS = d->autoSaveWindowSize; d->autoSaveWindowSize = true; // make saveMainWindowSettings save the window size @@ -713,9 +713,9 @@ void KMainWindow::savePropertiesInternal( TDEConfig *config, int number ) d->autoSaveWindowSize = oldASWS; } -void KMainWindow::saveMainWindowSettings(TDEConfig *config, const TQString &configGroup) +void TDEMainWindow::saveMainWindowSettings(TDEConfig *config, const TQString &configGroup) { - kdDebug(200) << "KMainWindow::saveMainWindowSettings " << configGroup << endl; + kdDebug(200) << "TDEMainWindow::saveMainWindowSettings " << configGroup << endl; TQString oldGroup; if (!configGroup.isEmpty()) @@ -746,8 +746,8 @@ void KMainWindow::saveMainWindowSettings(TDEConfig *config, const TQString &conf } int n = 1; // Toolbar counter. toolbars are counted from 1, - KToolBar *toolbar = 0; - TQPtrListIterator it( toolBarIterator() ); + TDEToolBar *toolbar = 0; + TQPtrListIterator it( toolBarIterator() ); while ( ( toolbar = it.current() ) ) { ++it; TQString group; @@ -766,7 +766,7 @@ void KMainWindow::saveMainWindowSettings(TDEConfig *config, const TQString &conf config->setGroup(oldGroup); } -void KMainWindow::setStandardToolBarMenuEnabled( bool enable ) +void TDEMainWindow::setStandardToolBarMenuEnabled( bool enable ) { if ( enable ) { if ( d->toolBarHandler ) @@ -788,12 +788,12 @@ void KMainWindow::setStandardToolBarMenuEnabled( bool enable ) } } -bool KMainWindow::isStandardToolBarMenuEnabled() const +bool TDEMainWindow::isStandardToolBarMenuEnabled() const { return ( d->toolBarHandler ); } -void KMainWindow::createStandardStatusBarAction(){ +void TDEMainWindow::createStandardStatusBarAction(){ if(!d->showStatusBarAction){ d->showStatusBarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(setSettingsDirty()), actionCollection()); KStatusBar *sb = statusBar(); // Creates statusbar if it doesn't exist already. @@ -802,7 +802,7 @@ void KMainWindow::createStandardStatusBarAction(){ } } -bool KMainWindow::readPropertiesInternal( TDEConfig *config, int number ) +bool TDEMainWindow::readPropertiesInternal( TDEConfig *config, int number ) { if ( number == 1 ) readGlobalProperties( config ); @@ -826,14 +826,14 @@ bool KMainWindow::readPropertiesInternal( TDEConfig *config, int number ) return true; } -void KMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup) +void TDEMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup) { return applyMainWindowSettings(config,configGroup,false); } -void KMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup,bool force) +void TDEMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup,bool force) { - kdDebug(200) << "KMainWindow::applyMainWindowSettings" << endl; + kdDebug(200) << "TDEMainWindow::applyMainWindowSettings" << endl; TDEConfigGroupSaver saver( config, configGroup.isEmpty() ? config->group() : configGroup ); @@ -860,8 +860,8 @@ void KMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &con } int n = 1; // Toolbar counter. toolbars are counted from 1, - KToolBar *toolbar; - TQPtrListIterator it( toolBarIterator() ); // must use own iterator + TDEToolBar *toolbar; + TQPtrListIterator it( toolBarIterator() ); // must use own iterator for ( ; it.current(); ++it) { toolbar= it.current(); @@ -881,9 +881,9 @@ void KMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &con finalizeGUI( true ); } -void KMainWindow::finalizeGUI( bool force ) +void TDEMainWindow::finalizeGUI( bool force ) { - //kdDebug(200) << "KMainWindow::finalizeGUI force=" << force << endl; + //kdDebug(200) << "TDEMainWindow::finalizeGUI force=" << force << endl; // The whole reason for this is that moveToolBar relies on the indexes // of the other toolbars, so in theory it should be called only once per // toolbar, but in increasing order of indexes. @@ -891,7 +891,7 @@ void KMainWindow::finalizeGUI( bool force ) // we call positionYourself again for each of them, but this time // the toolbariterator should give them in the proper order. // Both the XMLGUI and applySettings call this, hence "force" for the latter. - TQPtrListIterator it( toolBarIterator() ); + TQPtrListIterator it( toolBarIterator() ); for ( ; it.current() ; ++it ) { it.current()->positionYourself( force ); } @@ -899,7 +899,7 @@ void KMainWindow::finalizeGUI( bool force ) d->settingsDirty = false; } -void KMainWindow::saveWindowSize( TDEConfig * config ) const +void TDEMainWindow::saveWindowSize( TDEConfig * config ) const { int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); @@ -931,7 +931,7 @@ void KMainWindow::saveWindowSize( TDEConfig * config ) const config->writeEntry(heightString, h ); } -void KMainWindow::restoreWindowSize( TDEConfig * config ) +void TDEMainWindow::restoreWindowSize( TDEConfig * config ) { if (d->care_about_geometry) { parseGeometry(true); @@ -977,19 +977,19 @@ void KMainWindow::restoreWindowSize( TDEConfig * config ) } } -bool KMainWindow::initialGeometrySet() const +bool TDEMainWindow::initialGeometrySet() const { return d->care_about_geometry; } -void KMainWindow::ignoreInitialGeometry() +void TDEMainWindow::ignoreInitialGeometry() { d->care_about_geometry = false; } -void KMainWindow::setSettingsDirty() +void TDEMainWindow::setSettingsDirty() { - //kdDebug(200) << "KMainWindow::setSettingsDirty" << endl; + //kdDebug(200) << "TDEMainWindow::setSettingsDirty" << endl; d->settingsDirty = true; if ( d->autoSaveSettings ) { @@ -1004,17 +1004,17 @@ void KMainWindow::setSettingsDirty() } } -bool KMainWindow::settingsDirty() const +bool TDEMainWindow::settingsDirty() const { return d->settingsDirty; } -TQString KMainWindow::settingsGroup() const +TQString TDEMainWindow::settingsGroup() const { return d->autoSaveGroup; } -void KMainWindow::setAutoSaveSettings( const TQString & groupName, bool saveWindowSize ) +void TDEMainWindow::setAutoSaveSettings( const TQString & groupName, bool saveWindowSize ) { d->autoSaveSettings = true; d->autoSaveGroup = groupName; @@ -1029,27 +1029,27 @@ void KMainWindow::setAutoSaveSettings( const TQString & groupName, bool saveWind applyMainWindowSettings( TDEGlobal::config(), groupName ); } -void KMainWindow::resetAutoSaveSettings() +void TDEMainWindow::resetAutoSaveSettings() { d->autoSaveSettings = false; if ( d->settingsTimer ) d->settingsTimer->stop(); } -bool KMainWindow::autoSaveSettings() const +bool TDEMainWindow::autoSaveSettings() const { return d->autoSaveSettings; } -TQString KMainWindow::autoSaveGroup() const +TQString TDEMainWindow::autoSaveGroup() const { return d->autoSaveGroup; } -void KMainWindow::saveAutoSaveSettings() +void TDEMainWindow::saveAutoSaveSettings() { Q_ASSERT( d->autoSaveSettings ); - //kdDebug(200) << "KMainWindow::saveAutoSaveSettings -> saving settings" << endl; + //kdDebug(200) << "TDEMainWindow::saveAutoSaveSettings -> saving settings" << endl; saveMainWindowSettings( TDEGlobal::config(), d->autoSaveGroup ); TDEGlobal::config()->sync(); d->settingsDirty = false; @@ -1057,18 +1057,18 @@ void KMainWindow::saveAutoSaveSettings() d->settingsTimer->stop(); } -void KMainWindow::resizeEvent( TQResizeEvent * ) +void TDEMainWindow::resizeEvent( TQResizeEvent * ) { if ( d->autoSaveWindowSize ) setSettingsDirty(); } -bool KMainWindow::hasMenuBar() +bool TDEMainWindow::hasMenuBar() { return (internalMenuBar()); } -KMenuBar *KMainWindow::menuBar() +KMenuBar *TDEMainWindow::menuBar() { KMenuBar * mb = internalMenuBar(); if ( !mb ) { @@ -1080,7 +1080,7 @@ KMenuBar *KMainWindow::menuBar() return mb; } -KStatusBar *KMainWindow::statusBar() +KStatusBar *TDEMainWindow::statusBar() { KStatusBar * sb = internalStatusBar(); if ( !sb ) { @@ -1092,7 +1092,7 @@ KStatusBar *KMainWindow::statusBar() return sb; } -void KMainWindow::shuttingDown() +void TDEMainWindow::shuttingDown() { // Needed for Qt <= 3.0.3 at least to prevent reentrancy // when queryExit() shows a dialog. Check before removing! @@ -1107,7 +1107,7 @@ void KMainWindow::shuttingDown() } -KMenuBar *KMainWindow::internalMenuBar() +KMenuBar *TDEMainWindow::internalMenuBar() { TQObjectList *l = queryList( "KMenuBar", 0, false, false ); if ( !l || !l->first() ) { @@ -1120,7 +1120,7 @@ KMenuBar *KMainWindow::internalMenuBar() return m; } -KStatusBar *KMainWindow::internalStatusBar() +KStatusBar *TDEMainWindow::internalStatusBar() { TQObjectList *l = queryList( "KStatusBar", 0, false, false ); if ( !l || !l->first() ) { @@ -1133,70 +1133,70 @@ KStatusBar *KMainWindow::internalStatusBar() return s; } -void KMainWindow::childEvent( TQChildEvent* e) +void TDEMainWindow::childEvent( TQChildEvent* e) { TQMainWindow::childEvent( e ); } -KToolBar *KMainWindow::toolBar( const char * name ) +TDEToolBar *TDEMainWindow::toolBar( const char * name ) { if (!name) name = "mainToolBar"; - KToolBar *tb = (KToolBar*)child( name, "KToolBar" ); + TDEToolBar *tb = (TDEToolBar*)child( name, "TDEToolBar" ); if ( tb ) return tb; bool honor_mode = (!strcmp(name, "mainToolBar")); if ( builderClient() ) - return new KToolBar(this, name, honor_mode); // XMLGUI constructor + return new TDEToolBar(this, name, honor_mode); // XMLGUI constructor else - return new KToolBar(this, DockTop, false, name, honor_mode ); // non-XMLGUI + return new TDEToolBar(this, DockTop, false, name, honor_mode ); // non-XMLGUI } -TQPtrListIterator KMainWindow::toolBarIterator() +TQPtrListIterator TDEMainWindow::toolBarIterator() { toolbarList.clear(); TQPtrList lst; for ( int i = (int)TQMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) { lst = toolBars( (ToolBarDock)i ); for ( TQToolBar *tb = lst.first(); tb; tb = lst.next() ) { - if ( !tb->inherits( "KToolBar" ) ) + if ( !tb->inherits( "TDEToolBar" ) ) continue; - toolbarList.append( (KToolBar*)tb ); + toolbarList.append( (TDEToolBar*)tb ); } } - return TQPtrListIterator( toolbarList ); + return TQPtrListIterator( toolbarList ); } -KAccel * KMainWindow::accel() +TDEAccel * TDEMainWindow::accel() { if ( !d->kaccel ) - d->kaccel = new KAccel( this, "kmw-kaccel" ); + d->kaccel = new TDEAccel( this, "kmw-kaccel" ); return d->kaccel; } -void KMainWindow::paintEvent( TQPaintEvent * pe ) +void TDEMainWindow::paintEvent( TQPaintEvent * pe ) { TQMainWindow::paintEvent(pe); //Upcall to handle SH_MainWindow_SpaceBelowMenuBar rendering } -TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size) +TQSize TDEMainWindow::sizeForCentralWidgetSize(TQSize size) { - KToolBar *tb = (KToolBar*)child( "mainToolBar", "KToolBar" ); + TDEToolBar *tb = (TDEToolBar*)child( "mainToolBar", "TDEToolBar" ); if (tb && !tb->isHidden()) { switch( tb->barPos() ) { - case KToolBar::Top: - case KToolBar::Bottom: + case TDEToolBar::Top: + case TDEToolBar::Bottom: size += TQSize(0, tb->sizeHint().height()); break; - case KToolBar::Left: - case KToolBar::Right: + case TDEToolBar::Left: + case TDEToolBar::Right: size += TQSize(toolBar()->sizeHint().width(), 0); break; - case KToolBar::Flat: + case TDEToolBar::Flat: size += TQSize(0, 3+kapp->style().pixelMetric( TQStyle::PM_DockWindowHandleExtent )); break; @@ -1222,24 +1222,24 @@ TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size) #warning Remove, should be in Qt #endif #endif -void KMainWindow::setIcon( const TQPixmap& p ) +void TDEMainWindow::setIcon( const TQPixmap& p ) { TQMainWindow::setIcon( p ); #ifdef Q_WS_X11 // Qt3 doesn't support _NET_WM_ICON, but TDEApplication::setTopWidget(), which - // is used by KMainWindow, sets it + // is used by TDEMainWindow, sets it KWin::setIcons( winId(), p, TQPixmap()); #endif } -TQPtrList* KMainWindow::getMemberList() { return memberList; } +TQPtrList* TDEMainWindow::getMemberList() { return memberList; } // why do we support old gcc versions? using KXMLGUIBuilder::finalizeGUI; // DF: because they compile KDE much faster :) -void KMainWindow::finalizeGUI( KXMLGUIClient *client ) +void TDEMainWindow::finalizeGUI( KXMLGUIClient *client ) { KXMLGUIBuilder::finalizeGUI( client ); } -void KMainWindow::virtual_hook( int id, void* data ) +void TDEMainWindow::virtual_hook( int id, void* data ) { KXMLGUIBuilder::virtual_hook( id, data ); KXMLGUIClient::virtual_hook( id, data ); } diff --git a/tdeui/kmainwindow.h b/tdeui/kmainwindow.h index 5ddb669ee..9ad7dedc6 100644 --- a/tdeui/kmainwindow.h +++ b/tdeui/kmainwindow.h @@ -28,7 +28,7 @@ #include #include -class KPopupMenu; +class TDEPopupMenu; class KXMLGUIFactory; class TDEConfig; class KHelpMenu; @@ -36,9 +36,9 @@ class KStatusBar; class TQStatusBar; class KMenuBar; class KMWSessionManaged; -class KMainWindowPrivate; -class KAccel; -class KToolBarMenuAction; +class TDEMainWindowPrivate; +class TDEAccel; +class TDEToolBarMenuAction; class DCOPObject; #define KDE_DEFAULT_WINDOWFLAGS WType_TopLevel | WDestructiveClose @@ -53,7 +53,7 @@ class DCOPObject; * It manages the geometry for all its children, including your * main widget. * - * Normally, you will inherit from KMainWindow, + * Normally, you will inherit from TDEMainWindow, * then construct (or use some existing) widget as * your main view. You can set only one main view. * @@ -61,18 +61,18 @@ class DCOPObject; * and only one statusbar. * * The toolbars, menubar, and statusbar can be created by the - * KMainWindow and - unlike the old KMainWindow - may, but do not - * have to, be deleted by you. KMainWindow will handle that internally. + * TDEMainWindow and - unlike the old TDEMainWindow - may, but do not + * have to, be deleted by you. TDEMainWindow will handle that internally. * * Height and width can be operated independently from each other. Simply * define the minimum/maximum height/width of your main widget and - * KMainWindow will take this into account. For fixed size windows set + * TDEMainWindow will take this into account. For fixed size windows set * your main widget to a fixed size. * * Fixed aspect ratios (heightForWidth()) and fixed width widgets are * not supported. * - * KMainWindow will set icon, mini icon and caption, which it gets + * TDEMainWindow will set icon, mini icon and caption, which it gets * from TDEApplication. It provides full session management, and * will save its position, geometry and positions of toolbars and * menubar on logout. If you want to save additional data, reimplement @@ -85,7 +85,7 @@ class DCOPObject; * There are also kRestoreMainWindows convenience functions which * can restore all your windows on next login. * - * Note that a KMainWindow per-default is created with the + * Note that a TDEMainWindow per-default is created with the * WDestructiveClose flag, i.e. it is automatically destroyed when the * window is closed. If you do not want this behavior, specify 0 as * widget flag in the constructor. @@ -95,7 +95,7 @@ class DCOPObject; */ -class TDEUI_EXPORT KMainWindow : public TQMainWindow, public KXMLGUIBuilder, virtual public KXMLGUIClient +class TDEUI_EXPORT TDEMainWindow : public TQMainWindow, public KXMLGUIBuilder, virtual public KXMLGUIClient { friend class KMWSessionManaged; Q_OBJECT @@ -105,15 +105,15 @@ public: * Construct a main window. * * @param parent The widget parent. This is usually 0 but it may also be the window - * group leader. In that case, the KMainWindow becomes sort of a + * group leader. In that case, the TDEMainWindow becomes sort of a * secondary window. * * @param name The object name. For session management and window management to work * properly, all main windows in the application should have a - * different name. When passing 0 (the default), KMainWindow will create + * different name. When passing 0 (the default), TDEMainWindow will create * a unique name, but it's recommended to explicitly pass a window name that will * also describe the type of the window. If there can be several windows of the same - * type, append '#' (hash) to the name, and KMainWindow will append numbers to make + * type, append '#' (hash) to the name, and TDEMainWindow will append numbers to make * the names unique. For example, for a mail client which has one main window showing * the mails and folders, and which can also have one or more windows for composing * mails, the name for the folders window should be e.g. "mainwindow" and @@ -128,25 +128,25 @@ public: * * @see http://doc.trolltech.com/3.2/tqt.html#WidgetFlags-enum * - * KMainWindows must be created on the heap with 'new', like: + * TDEMainWindows must be created on the heap with 'new', like: * \code - * KMainWindow *kmw = new KMainWindow (...); + * TDEMainWindow *kmw = new TDEMainWindow (...); * \endcode **/ #ifdef qdoc - KMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); + TDEMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); #else - KMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = (WFlags)(WType_TopLevel | WDestructiveClose) ); + TDEMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = (WFlags)(WType_TopLevel | WDestructiveClose) ); #endif /** * Flags that can be passed in an argument to the constructor to * change the behavior. * - * NoDCOPObject tells KMainWindow not to create a KMainWindowInterface. + * NoDCOPObject tells TDEMainWindow not to create a TDEMainWindowInterface. * This can be useful in particular for inherited classes, which * might want to create more specific dcop interfaces. It's a good - * idea to use KMainWindowInterface as the base class for such interfaces + * idea to use TDEMainWindowInterface as the base class for such interfaces * though (to provide the standard mainwindow functionality via DCOP). */ enum CreationFlags @@ -155,14 +155,14 @@ public: }; /** - * Overloaded constructor which allows passing some KMainWindow::CreationFlags. + * Overloaded constructor which allows passing some TDEMainWindow::CreationFlags. * * @since 3.2 */ #ifdef qdoc - KMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); + TDEMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); #else - KMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = (WFlags)(WType_TopLevel | WDestructiveClose) ); + TDEMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = (WFlags)(WType_TopLevel | WDestructiveClose) ); #endif /** @@ -171,7 +171,7 @@ public: * Will also destroy the toolbars, and menubar if * needed. */ - virtual ~KMainWindow(); + virtual ~TDEMainWindow(); /** * Retrieve the standard help menu. @@ -183,7 +183,7 @@ public: * * Example (adding a standard help menu to your application): * \code - * KPopupMenu *help = helpMenu( ); + * TDEPopupMenu *help = helpMenu( ); * menuBar()->insertItem( i18n("&Help"), help ); * \endcode * @@ -197,7 +197,7 @@ public: * * @return A standard help menu. */ - KPopupMenu* helpMenu( const TQString &aboutAppText = TQString::null, + TDEPopupMenu* helpMenu( const TQString &aboutAppText = TQString::null, bool showWhatsThis = true ); /** @@ -222,7 +222,7 @@ public: * * @return A standard help menu. */ - KPopupMenu* customHelpMenu( bool showWhatsThis = true ); + TDEPopupMenu* customHelpMenu( bool showWhatsThis = true ); /** * Session Management @@ -236,7 +236,7 @@ public: * \code * if (kapp->isRestored()){ * int n = 1; - * while (KMainWindow::canBeRestored(n)){ + * while (TDEMainWindow::canBeRestored(n)){ * (new childMW)->restore(n); * n++; * } @@ -250,7 +250,7 @@ public: * application. * * If your application uses different kinds of toplevel - * windows, then you can use KMainWindow::classNameOfToplevel(n) + * windows, then you can use TDEMainWindow::classNameOfToplevel(n) * to determine the exact type before calling the childMW * constructor in the example from above. * @@ -270,7 +270,7 @@ public: * less code to write. * * For new code or if you have more than one kind of toplevel - * widget (each derived from KMainWindow, of course), you can + * widget (each derived from TDEMainWindow, of course), you can * use the templated kRestoreMainWindows global functions: * * \code @@ -381,23 +381,23 @@ public: * * Note that tooltips for kactions in actionCollection() are not * automatically connected to this statusBar. - * See the KActionCollection documentation for more details. + * See the TDEActionCollection documentation for more details. * - * @see KActionCollection + * @see TDEActionCollection */ KStatusBar *statusBar(); /** - * List of members of KMainWindow class. + * List of members of TDEMainWindow class. */ - static TQPtrList* memberList; + static TQPtrList* memberList; //KDE4: replace with memberList() and make memberList member private /** - * List of members of KMainWindow class. + * List of members of TDEMainWindow class. * @since 3.4 */ - static TQPtrList* getMemberList(); + static TQPtrList* getMemberList(); /** * Returns a pointer to the toolbar with the specified name. @@ -409,18 +409,18 @@ public: * * @return A pointer to the toolbar **/ - KToolBar *toolBar( const char *name=0 ); + TDEToolBar *toolBar( const char *name=0 ); /** * @return An iterator over the list of all toolbars for this window. */ - TQPtrListIterator toolBarIterator(); + TQPtrListIterator toolBarIterator(); /** - * @return A KAccel instance bound to this mainwindow. Used automatically - * by KAction to make keybindings work in all cases. + * @return A TDEAccel instance bound to this mainwindow. Used automatically + * by TDEAction to make keybindings work in all cases. */ - KAccel *accel(); + TDEAccel *accel(); void setFrameBorderWidth( int ) {} @@ -437,11 +437,11 @@ public: * when saving. * * Typically, you will call setAutoSaveSettings() in your - * KMainWindow-inherited class constructor, and it will take care + * TDEMainWindow-inherited class constructor, and it will take care * of restoring and saving automatically. Make sure you call this * _after all_ your *bars have been created. * - * To make sure that KMainWindow propertly obtains the default + * To make sure that TDEMainWindow propertly obtains the default * size of the window you should do the following: * - Remove hard coded resize() calls in the constructor or main, they * should be removed in favor of letting the automatic resizing @@ -504,8 +504,8 @@ public: void saveMainWindowSettings(TDEConfig *config, const TQString &groupName = TQString::null); /** - * Sets whether KMainWindow should provide a menu that allows showing/hiding - * the available toolbars ( using KToggleToolBarAction ) . In case there + * Sets whether TDEMainWindow should provide a menu that allows showing/hiding + * the available toolbars ( using TDEToggleToolBarAction ) . In case there * is only one toolbar configured a simple 'Show \' menu item * is shown. * @@ -527,8 +527,8 @@ public: /** - * Sets whether KMainWindow should provide a menu that allows showing/hiding - * of the statusbar ( using KToggleStatusBarAction ). + * Sets whether TDEMainWindow should provide a menu that allows showing/hiding + * of the statusbar ( using TDEToggleStatusBarAction ). * * The menu / menu item is implemented using xmlgui. It will be inserted * in your menu structure in the 'Settings' menu. @@ -537,13 +537,13 @@ public: * ( or similar ). * * If an application maintains the action on its own (i.e. never calls - * this function) a connection needs to be made to let KMainWindow + * this function) a connection needs to be made to let TDEMainWindow * know when that status (hidden/shown) of the statusbar has changed. * For example: * connect(action, TQT_SIGNAL(activated()), * kmainwindow, TQT_SLOT(setSettingsDirty())); * Otherwise the status (hidden/show) of the statusbar might not be saved - * by KMainWindow. + * by TDEMainWindow. * @since 3.2 */ void createStandardStatusBarAction(); @@ -622,10 +622,10 @@ public: * Returns a pointer to the mainwindows action responsible for the toolbars menu * @since 3.1 */ - KAction *toolBarMenuAction(); + TDEAction *toolBarMenuAction(); /** - * @internal for KToolBar + * @internal for TDEToolBar * @since 3.3.1 */ void setupToolbarMenuActions(); @@ -874,7 +874,7 @@ protected: * to save its state. * * You @em must @em not change the group of the @p tdeconfig object, since - * KMainWindow uses one group for each window. Please + * TDEMainWindow uses one group for each window. Please * reimplement these function in childclasses. * * Note: No user interaction is allowed @@ -1007,16 +1007,16 @@ private: KStatusBar *internalStatusBar(); KHelpMenu *mHelpMenu, *helpMenu2; KXMLGUIFactory *factory_; - TQPtrList toolbarList; + TQPtrList toolbarList; protected: virtual void virtual_hook( int id, void* data ); private: - KMainWindowPrivate *d; - void initKMainWindow(const char *name, int cflags); + TDEMainWindowPrivate *d; + void initTDEMainWindow(const char *name, int cflags); }; #define RESTORE(type) { int n = 1;\ - while (KMainWindow::canBeRestored(n)){\ + while (TDEMainWindow::canBeRestored(n)){\ (new type)->restore(n);\ n++;}} @@ -1027,15 +1027,15 @@ private: * number of template arguments) are a replacement for the RESTORE * macro provided in earlier versions of KDE. The old RESTORE macro * is still provided for backwards compatibility. See - * KMainWindow documentation for more. + * TDEMainWindow documentation for more. * * \since KDE 3.2 * **/ template inline void kRestoreMainWindows() { - for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { - const TQString className = KMainWindow::classNameOfToplevel( n ); + for ( int n = 1 ; TDEMainWindow::canBeRestored( n ) ; ++n ) { + const TQString className = TDEMainWindow::classNameOfToplevel( n ); if ( className == TQString::fromLatin1( T::staticMetaObject()->className() ) ) (new T)->restore( n ); } @@ -1046,8 +1046,8 @@ inline void kRestoreMainWindows() { const char * classNames[2]; classNames[0] = T0::staticMetaObject()->className(); classNames[1] = T1::staticMetaObject()->className(); - for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { - const TQString className = KMainWindow::classNameOfToplevel( n ); + for ( int n = 1 ; TDEMainWindow::canBeRestored( n ) ; ++n ) { + const TQString className = TDEMainWindow::classNameOfToplevel( n ); if ( className == TQString::fromLatin1( classNames[0] ) ) (new T0)->restore( n ); else if ( className == TQString::fromLatin1( classNames[1] ) ) @@ -1061,8 +1061,8 @@ inline void kRestoreMainWindows() { classNames[0] = T0::staticMetaObject()->className(); classNames[1] = T1::staticMetaObject()->className(); classNames[2] = T2::staticMetaObject()->className(); - for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { - const TQString className = KMainWindow::classNameOfToplevel( n ); + for ( int n = 1 ; TDEMainWindow::canBeRestored( n ) ; ++n ) { + const TQString className = TDEMainWindow::classNameOfToplevel( n ); if ( className == TQString::fromLatin1( classNames[0] ) ) (new T0)->restore( n ); else if ( className == TQString::fromLatin1( classNames[1] ) ) diff --git a/tdeui/kmainwindowiface.cpp b/tdeui/kmainwindowiface.cpp index f8ef88c31..ec8ee3630 100644 --- a/tdeui/kmainwindowiface.cpp +++ b/tdeui/kmainwindowiface.cpp @@ -28,7 +28,7 @@ #include -KMainWindowInterface::KMainWindowInterface(KMainWindow * mainWindow) +TDEMainWindowInterface::TDEMainWindowInterface(TDEMainWindow * mainWindow) : DCOPObject( mainWindow->name()) { m_MainWindow = mainWindow; @@ -36,30 +36,30 @@ KMainWindowInterface::KMainWindowInterface(KMainWindow * mainWindow) m_dcopPropertyProxy = new KDCOPPropertyProxy(TQT_TQOBJECT(m_MainWindow)); } -KMainWindowInterface::~KMainWindowInterface() +TDEMainWindowInterface::~TDEMainWindowInterface() { delete m_dcopActionProxy; delete m_dcopPropertyProxy; } -QCStringList KMainWindowInterface::actions() +QCStringList TDEMainWindowInterface::actions() { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); QCStringList tmp_actions; - TQValueList lst = m_dcopActionProxy->actions(); - TQValueList::ConstIterator it = lst.begin(); - TQValueList::ConstIterator end = lst.end(); + TQValueList lst = m_dcopActionProxy->actions(); + TQValueList::ConstIterator it = lst.begin(); + TQValueList::ConstIterator end = lst.end(); for (; it != end; ++it ) if ((*it)->isPlugged()) tmp_actions.append( (TQCString)(*it)->name() ); return tmp_actions; } -bool KMainWindowInterface::activateAction( TQCString action) +bool TDEMainWindowInterface::activateAction( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { tmp_Action->activate(); @@ -68,11 +68,11 @@ bool KMainWindowInterface::activateAction( TQCString action) else return false; } -bool KMainWindowInterface::disableAction( TQCString action) +bool TDEMainWindowInterface::disableAction( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { tmp_Action->setEnabled(false); @@ -81,11 +81,11 @@ bool KMainWindowInterface::disableAction( TQCString action) else return false; } -bool KMainWindowInterface::enableAction( TQCString action) +bool TDEMainWindowInterface::enableAction( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { tmp_Action->setEnabled(true); @@ -94,11 +94,11 @@ bool KMainWindowInterface::enableAction( TQCString action) else return false; } -bool KMainWindowInterface::actionIsEnabled( TQCString action) +bool TDEMainWindowInterface::actionIsEnabled( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { return tmp_Action->isEnabled(); @@ -106,11 +106,11 @@ bool KMainWindowInterface::actionIsEnabled( TQCString action) else return false; } -TQCString KMainWindowInterface::actionToolTip( TQCString action) +TQCString TDEMainWindowInterface::actionToolTip( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { return tmp_Action->toolTip().utf8(); @@ -119,74 +119,74 @@ TQCString KMainWindowInterface::actionToolTip( TQCString action) return "Error no such object!"; } -DCOPRef KMainWindowInterface::action( const TQCString &name ) +DCOPRef TDEMainWindowInterface::action( const TQCString &name ) { return DCOPRef( kapp->dcopClient()->appId(), m_dcopActionProxy->actionObjectId( name ) ); } -TQMap KMainWindowInterface::actionMap() +TQMap TDEMainWindowInterface::actionMap() { return m_dcopActionProxy->actionMap(); } -int KMainWindowInterface::getWinID() +int TDEMainWindowInterface::getWinID() { return (int) m_MainWindow->winId(); } -void KMainWindowInterface::grabWindowToClipBoard() +void TDEMainWindowInterface::grabWindowToClipBoard() { TQClipboard *clipboard = TQApplication::clipboard(); clipboard->setPixmap(TQPixmap::grabWidget(m_MainWindow)); } -void KMainWindowInterface::hide() +void TDEMainWindowInterface::hide() { m_MainWindow->hide(); } -void KMainWindowInterface::maximize() +void TDEMainWindowInterface::maximize() { m_MainWindow->showMaximized(); } -void KMainWindowInterface::minimize() +void TDEMainWindowInterface::minimize() { m_MainWindow->showMinimized(); } -void KMainWindowInterface::resize(int newX, int newY) +void TDEMainWindowInterface::resize(int newX, int newY) { m_MainWindow->resize(newX, newY); } -void KMainWindowInterface::move(int newX, int newY) +void TDEMainWindowInterface::move(int newX, int newY) { m_MainWindow->move(newX, newY); } -void KMainWindowInterface::setGeometry(int newX, int newY, int newWidth, int newHeight) +void TDEMainWindowInterface::setGeometry(int newX, int newY, int newWidth, int newHeight) { m_MainWindow->setGeometry(newX, newY, newWidth, newHeight); } -void KMainWindowInterface::raise() +void TDEMainWindowInterface::raise() { m_MainWindow->raise(); } -void KMainWindowInterface::lower() +void TDEMainWindowInterface::lower() { m_MainWindow->lower(); } -void KMainWindowInterface::restore() +void TDEMainWindowInterface::restore() { m_MainWindow->showNormal(); } -void KMainWindowInterface::close() +void TDEMainWindowInterface::close() { m_MainWindow->close(); } -void KMainWindowInterface::show() +void TDEMainWindowInterface::show() { m_MainWindow->show(); } -QCStringList KMainWindowInterface::functionsDynamic() +QCStringList TDEMainWindowInterface::functionsDynamic() { return m_dcopPropertyProxy->functions(); } -bool KMainWindowInterface::processDynamic(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData) +bool TDEMainWindowInterface::processDynamic(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData) { return m_dcopPropertyProxy->processPropertyRequest( fun, data, replyType, replyData); diff --git a/tdeui/kmainwindowiface.h b/tdeui/kmainwindowiface.h index 58ca74e2c..9ba1c4da9 100644 --- a/tdeui/kmainwindowiface.h +++ b/tdeui/kmainwindowiface.h @@ -27,32 +27,32 @@ class KDCOPActionProxy; class KDCOPPropertyProxy; -class KMainWindow; +class TDEMainWindow; /** - * @short DCOP interface to KMainWindow. + * @short DCOP interface to TDEMainWindow. * - * This is the main interface to the KMainWindow. This will provide a consistent + * This is the main interface to the TDEMainWindow. This will provide a consistent * DCOP interface to all KDE applications that use it. * * @author Ian Reinhart Geiser */ -class TDEUI_EXPORT KMainWindowInterface : virtual public DCOPObject +class TDEUI_EXPORT TDEMainWindowInterface : virtual public DCOPObject { K_DCOP public: /** Construct a new interface object. - @param mainWindow - The parent KMainWindow object - that will provide us with the KAction objects. + @param mainWindow - The parent TDEMainWindow object + that will provide us with the TDEAction objects. */ - KMainWindowInterface( KMainWindow * mainWindow ); + TDEMainWindowInterface( TDEMainWindow * mainWindow ); /** Destructor Cleans up the dcop action proxy object. **/ - ~KMainWindowInterface(); + ~TDEMainWindowInterface(); QCStringList functionsDynamic(); bool processDynamic(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData); @@ -106,7 +106,7 @@ k_dcop: TQCString actionToolTip( TQCString action); /** - Returns a dcop reference to the selected KAction + Returns a dcop reference to the selected TDEAction @param name The name of the action. The names of valid actions can be found by calling actions(). @return A DCOPRef for the kaction. @@ -151,7 +151,7 @@ k_dcop: // QCStringList getQTProperties(); private: - KMainWindow *m_MainWindow; + TDEMainWindow *m_MainWindow; KDCOPActionProxy *m_dcopActionProxy; KDCOPPropertyProxy *m_dcopPropertyProxy; }; diff --git a/tdeui/kmenubar.cpp b/tdeui/kmenubar.cpp index d2b97f3b0..9f21ce300 100644 --- a/tdeui/kmenubar.cpp +++ b/tdeui/kmenubar.cpp @@ -94,7 +94,7 @@ public: int margin; // dtto bool fallback_mode; // dtto #ifdef Q_WS_X11 - KSelectionWatcher* selection; + TDESelectionWatcher* selection; #endif TQTimer selection_timer; TQSize min_size; @@ -177,7 +177,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level) if ( isTopLevelMenu() ) { #ifdef Q_WS_X11 - d->selection = new KSelectionWatcher( KMenuBarPrivate::makeSelectionAtom(), + d->selection = new TDESelectionWatcher( KMenuBarPrivate::makeSelectionAtom(), DefaultScreen( tqt_xdisplay())); connect( d->selection, TQT_SIGNAL( newOwner( Window )), this, TQT_SLOT( updateFallbackSize())); diff --git a/tdeui/kmessagebox.cpp b/tdeui/kmessagebox.cpp index d0c4f0a11..69020eae7 100644 --- a/tdeui/kmessagebox.cpp +++ b/tdeui/kmessagebox.cpp @@ -224,10 +224,10 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, TQPixmap icon, lay->addWidget( label2 ); lay->addStretch(); - KListBox *listbox = 0; + TDEListBox *listbox = 0; if (!strlist.isEmpty()) { - listbox=new KListBox( topcontents ); + listbox=new TDEListBox( topcontents ); listbox->insertStringList( strlist ); listbox->setSelectionMode( TQListBox::NoSelection ); topcontents->setStretchFactor(listbox, 1); diff --git a/tdeui/kpanelmenu.cpp b/tdeui/kpanelmenu.cpp index a995661c3..c266079c7 100644 --- a/tdeui/kpanelmenu.cpp +++ b/tdeui/kpanelmenu.cpp @@ -41,13 +41,13 @@ public: }; KPanelMenu::KPanelMenu(const TQString &startDir, TQWidget *parent, const char *name) - : KPopupMenu(parent, name) + : TDEPopupMenu(parent, name) { init(startDir); } KPanelMenu::KPanelMenu(TQWidget *parent, const char *name) - : KPopupMenu(parent, name) + : TDEPopupMenu(parent, name) { init(); } @@ -67,7 +67,7 @@ void KPanelMenu::init(const TQString& path) config->setGroup("menus"); d->clearDelay = config->readNumEntry("MenuCacheTime", 60000); // 1 minute - //KAcceleratorManager::manage(this); + //TDEAcceleratorManager::manage(this); setKeyboardShortcutsEnabled(true); } @@ -154,5 +154,5 @@ void KPanelMenu::internalInitialize() } void KPanelMenu::virtual_hook( int id, void* data ) -{ KPopupMenu::virtual_hook( id, data ); } +{ TDEPopupMenu::virtual_hook( id, data ); } diff --git a/tdeui/kpanelmenu.h b/tdeui/kpanelmenu.h index 2e28010fb..0c03d6fd4 100644 --- a/tdeui/kpanelmenu.h +++ b/tdeui/kpanelmenu.h @@ -50,7 +50,7 @@ class KPanelMenuPrivate; * * @author The kicker maintainers, Michael Goffioul */ -class TDEUI_EXPORT KPanelMenu : public KPopupMenu +class TDEUI_EXPORT KPanelMenu : public TDEPopupMenu { Q_OBJECT diff --git a/tdeui/kpartgui.dtd b/tdeui/kpartgui.dtd index a3cbb8121..4b36929e2 100644 --- a/tdeui/kpartgui.dtd +++ b/tdeui/kpartgui.dtd @@ -83,17 +83,17 @@ - insertTitle(i18n("Image Operations")); - KAction *action = new KAction(i18n("&Rotate Clockwise"), "rotate_cw", + TDEAction *action = new TDEAction(i18n("&Rotate Clockwise"), "rotate_cw", 0, TQT_TQOBJECT(this), TQT_SLOT(rotateClockwise()), TQT_TQOBJECT(popup), "rotateclockwise"); action->plug(popup); - action = new KAction(i18n("Rotate &Counterclockwise"), "rotate_ccw", + action = new TDEAction(i18n("Rotate &Counterclockwise"), "rotate_ccw", 0, TQT_TQOBJECT(this), TQT_SLOT(rotateCounterclockwise()), TQT_TQOBJECT(popup), "rotatecounterclockwise"); action->plug(popup); @@ -215,7 +215,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev) if ( mev->button() == Qt::RightButton ) { - KPopupMenu *popup = createPopupMenu( ); + TDEPopupMenu *popup = createPopupMenu( ); popup->exec( mev->globalPos() ); delete popup; return TRUE; diff --git a/tdeui/kpixmapregionselectorwidget.h b/tdeui/kpixmapregionselectorwidget.h index 344580ff4..0277a0d10 100644 --- a/tdeui/kpixmapregionselectorwidget.h +++ b/tdeui/kpixmapregionselectorwidget.h @@ -25,7 +25,7 @@ #include #include -class KPopupMenu; +class TDEPopupMenu; #include @@ -135,9 +135,9 @@ public slots: protected: /** - * Creates a KPopupMenu with the menu that appears when clicking with the right button on the label + * Creates a TDEPopupMenu with the menu that appears when clicking with the right button on the label */ - virtual KPopupMenu *createPopupMenu(); + virtual TDEPopupMenu *createPopupMenu(); private: bool eventFilter(TQObject *obj, TQEvent *ev); diff --git a/tdeui/kpopupmenu.cpp b/tdeui/kpopupmenu.cpp index d910b7781..5547d9316 100644 --- a/tdeui/kpopupmenu.cpp +++ b/tdeui/kpopupmenu.cpp @@ -32,13 +32,13 @@ #include #include -KPopupTitle::KPopupTitle(TQWidget *parent, const char *name) +TDEPopupTitle::TDEPopupTitle(TQWidget *parent, const char *name) : TQWidget(parent, name) { setMinimumSize(16, fontMetrics().height()+8); } -KPopupTitle::KPopupTitle(KPixmapEffect::GradientType /* gradient */, +TDEPopupTitle::TDEPopupTitle(KPixmapEffect::GradientType /* gradient */, const TQColor &/* color */, const TQColor &/* textColor */, TQWidget *parent, const char *name) : TQWidget(parent, name) @@ -46,7 +46,7 @@ KPopupTitle::KPopupTitle(KPixmapEffect::GradientType /* gradient */, calcSize(); } -KPopupTitle::KPopupTitle(const KPixmap & /* background */, const TQColor &/* color */, +TDEPopupTitle::TDEPopupTitle(const KPixmap & /* background */, const TQColor &/* color */, const TQColor &/* textColor */, TQWidget *parent, const char *name) : TQWidget(parent, name) @@ -54,7 +54,7 @@ KPopupTitle::KPopupTitle(const KPixmap & /* background */, const TQColor &/* col calcSize(); } -void KPopupTitle::setTitle(const TQString &text, const TQPixmap *icon) +void TDEPopupTitle::setTitle(const TQString &text, const TQPixmap *icon) { titleStr = text; if (icon) @@ -65,19 +65,19 @@ void KPopupTitle::setTitle(const TQString &text, const TQPixmap *icon) calcSize(); } -void KPopupTitle::setText( const TQString &text ) +void TDEPopupTitle::setText( const TQString &text ) { titleStr = text; calcSize(); } -void KPopupTitle::setIcon( const TQPixmap &pix ) +void TDEPopupTitle::setIcon( const TQPixmap &pix ) { miniicon = pix; calcSize(); } -void KPopupTitle::calcSize() +void TDEPopupTitle::calcSize() { TQFont f = font(); f.setBold(true); @@ -86,7 +86,7 @@ void KPopupTitle::calcSize() setMinimumSize( w+16, h+8 ); } -void KPopupTitle::paintEvent(TQPaintEvent *) +void TDEPopupTitle::paintEvent(TQPaintEvent *) { TQRect r(rect()); TQPainter p(this); @@ -115,15 +115,15 @@ void KPopupTitle::paintEvent(TQPaintEvent *) } } -TQSize KPopupTitle::sizeHint() const +TQSize TDEPopupTitle::sizeHint() const { return minimumSize(); } -class KPopupMenu::KPopupMenuPrivate +class TDEPopupMenu::TDEPopupMenuPrivate { public: - KPopupMenuPrivate () + TDEPopupMenuPrivate () : noMatches(false) , shortcuts(false) , autoExec(false) @@ -132,7 +132,7 @@ public: , m_ctxMenu(0) {} - ~KPopupMenuPrivate () + ~TDEPopupMenuPrivate () { delete m_ctxMenu; } @@ -156,112 +156,112 @@ public: TQPopupMenu* m_ctxMenu; static bool s_continueCtxMenuShow; static int s_highlightedItem; - static KPopupMenu* s_contextedMenu; + static TDEPopupMenu* s_contextedMenu; }; -int KPopupMenu::KPopupMenuPrivate::s_highlightedItem(-1); -KPopupMenu* KPopupMenu::KPopupMenuPrivate::s_contextedMenu(0); -bool KPopupMenu::KPopupMenuPrivate::s_continueCtxMenuShow(true); +int TDEPopupMenu::TDEPopupMenuPrivate::s_highlightedItem(-1); +TDEPopupMenu* TDEPopupMenu::TDEPopupMenuPrivate::s_contextedMenu(0); +bool TDEPopupMenu::TDEPopupMenuPrivate::s_continueCtxMenuShow(true); -KPopupMenu::KPopupMenu(TQWidget *parent, const char *name) +TDEPopupMenu::TDEPopupMenu(TQWidget *parent, const char *name) : TQPopupMenu(parent, name) { - d = new KPopupMenuPrivate; + d = new TDEPopupMenuPrivate; resetKeyboardVars(); connect(&(d->clearTimer), TQT_SIGNAL(timeout()), TQT_SLOT(resetKeyboardVars())); } -KPopupMenu::~KPopupMenu() +TDEPopupMenu::~TDEPopupMenu() { - if (KPopupMenuPrivate::s_contextedMenu == this) + if (TDEPopupMenuPrivate::s_contextedMenu == this) { - KPopupMenuPrivate::s_contextedMenu = 0; - KPopupMenuPrivate::s_highlightedItem = -1; + TDEPopupMenuPrivate::s_contextedMenu = 0; + TDEPopupMenuPrivate::s_highlightedItem = -1; } delete d; } -int KPopupMenu::insertTitle(const TQString &text, int id, int index) +int TDEPopupMenu::insertTitle(const TQString &text, int id, int index) { - KPopupTitle *titleItem = new KPopupTitle(); + TDEPopupTitle *titleItem = new TDEPopupTitle(); titleItem->setTitle(text); int ret = insertItem(titleItem, id, index); setItemEnabled(ret, false); return ret; } -int KPopupMenu::insertTitle(const TQPixmap &icon, const TQString &text, int id, +int TDEPopupMenu::insertTitle(const TQPixmap &icon, const TQString &text, int id, int index) { - KPopupTitle *titleItem = new KPopupTitle(); + TDEPopupTitle *titleItem = new TDEPopupTitle(); titleItem->setTitle(text, &icon); int ret = insertItem(titleItem, id, index); setItemEnabled(ret, false); return ret; } -void KPopupMenu::changeTitle(int id, const TQString &text) +void TDEPopupMenu::changeTitle(int id, const TQString &text) { TQMenuItem *item = findItem(id); if(item){ if(item->widget()) - ((KPopupTitle *)item->widget())->setTitle(text); + ((TDEPopupTitle *)item->widget())->setTitle(text); #ifndef NDEBUG else - kdWarning() << "KPopupMenu: changeTitle() called with non-title id "<< id << endl; + kdWarning() << "TDEPopupMenu: changeTitle() called with non-title id "<< id << endl; #endif } #ifndef NDEBUG else - kdWarning() << "KPopupMenu: changeTitle() called with invalid id " << id << endl; + kdWarning() << "TDEPopupMenu: changeTitle() called with invalid id " << id << endl; #endif } -void KPopupMenu::changeTitle(int id, const TQPixmap &icon, const TQString &text) +void TDEPopupMenu::changeTitle(int id, const TQPixmap &icon, const TQString &text) { TQMenuItem *item = findItem(id); if(item){ if(item->widget()) - ((KPopupTitle *)item->widget())->setTitle(text, &icon); + ((TDEPopupTitle *)item->widget())->setTitle(text, &icon); #ifndef NDEBUG else - kdWarning() << "KPopupMenu: changeTitle() called with non-title id "<< id << endl; + kdWarning() << "TDEPopupMenu: changeTitle() called with non-title id "<< id << endl; #endif } #ifndef NDEBUG else - kdWarning() << "KPopupMenu: changeTitle() called with invalid id " << id << endl; + kdWarning() << "TDEPopupMenu: changeTitle() called with invalid id " << id << endl; #endif } -TQString KPopupMenu::title(int id) const +TQString TDEPopupMenu::title(int id) const { if(id == -1) // obsolete return d->m_lastTitle; TQMenuItem *item = findItem(id); if(item){ if(item->widget()) - return ((KPopupTitle *)item->widget())->title(); + return ((TDEPopupTitle *)item->widget())->title(); else - tqWarning("KPopupMenu: title() called with non-title id %d.", id); + tqWarning("TDEPopupMenu: title() called with non-title id %d.", id); } else - tqWarning("KPopupMenu: title() called with invalid id %d.", id); + tqWarning("TDEPopupMenu: title() called with invalid id %d.", id); return TQString::null; } -TQPixmap KPopupMenu::titlePixmap(int id) const +TQPixmap TDEPopupMenu::titlePixmap(int id) const { TQMenuItem *item = findItem(id); if(item){ if(item->widget()) - return ((KPopupTitle *)item->widget())->icon(); + return ((TDEPopupTitle *)item->widget())->icon(); else - tqWarning("KPopupMenu: titlePixmap() called with non-title id %d.", id); + tqWarning("TDEPopupMenu: titlePixmap() called with non-title id %d.", id); } else - tqWarning("KPopupMenu: titlePixmap() called with invalid id %d.", id); + tqWarning("TDEPopupMenu: titlePixmap() called with invalid id %d.", id); TQPixmap tmp; return tmp; } @@ -269,25 +269,25 @@ TQPixmap KPopupMenu::titlePixmap(int id) const /** * This is re-implemented for keyboard navigation. */ -void KPopupMenu::closeEvent(TQCloseEvent*e) +void TDEPopupMenu::closeEvent(TQCloseEvent*e) { if (d->shortcuts) resetKeyboardVars(); TQPopupMenu::closeEvent(e); } -void KPopupMenu::activateItemAt(int index) +void TDEPopupMenu::activateItemAt(int index) { d->state = Qt::NoButton; TQPopupMenu::activateItemAt(index); } -TQt::ButtonState KPopupMenu::state() const +TQt::ButtonState TDEPopupMenu::state() const { return d->state; } -void KPopupMenu::keyPressEvent(TQKeyEvent* e) +void TDEPopupMenu::keyPressEvent(TQKeyEvent* e) { d->state = Qt::NoButton; if (!d->shortcuts) { @@ -445,13 +445,13 @@ void KPopupMenu::keyPressEvent(TQKeyEvent* e) TQPopupMenu::keyPressEvent(e); } -bool KPopupMenu::focusNextPrevChild( bool next ) +bool TDEPopupMenu::focusNextPrevChild( bool next ) { resetKeyboardVars(); return TQPopupMenu::focusNextPrevChild( next ); } -TQString KPopupMenu::underlineText(const TQString& text, uint length) +TQString TDEPopupMenu::underlineText(const TQString& text, uint length) { TQString ret = text; for (uint i = 0; i < length; i++) { @@ -461,7 +461,7 @@ TQString KPopupMenu::underlineText(const TQString& text, uint length) return ret; } -void KPopupMenu::resetKeyboardVars(bool noMatches /* = false */) +void TDEPopupMenu::resetKeyboardVars(bool noMatches /* = false */) { // Clean up keyboard variables if (d->lastHitIndex != -1) { @@ -476,12 +476,12 @@ void KPopupMenu::resetKeyboardVars(bool noMatches /* = false */) d->noMatches = noMatches; } -void KPopupMenu::setKeyboardShortcutsEnabled(bool enable) +void TDEPopupMenu::setKeyboardShortcutsEnabled(bool enable) { d->shortcuts = enable; } -void KPopupMenu::setKeyboardShortcutsExecute(bool enable) +void TDEPopupMenu::setKeyboardShortcutsExecute(bool enable) { d->autoExec = enable; } @@ -493,7 +493,7 @@ void KPopupMenu::setKeyboardShortcutsExecute(bool enable) * RMB menus on menus */ -void KPopupMenu::mousePressEvent(TQMouseEvent* e) +void TDEPopupMenu::mousePressEvent(TQMouseEvent* e) { if (d->m_ctxMenu && d->m_ctxMenu->isVisible()) { @@ -504,7 +504,7 @@ void KPopupMenu::mousePressEvent(TQMouseEvent* e) TQPopupMenu::mousePressEvent(e); } -void KPopupMenu::mouseReleaseEvent(TQMouseEvent* e) +void TDEPopupMenu::mouseReleaseEvent(TQMouseEvent* e) { // Save the button, and the modifiers from state() d->state = TQt::ButtonState(e->button() | (e->state() & KeyButtonMask)); @@ -513,7 +513,7 @@ void KPopupMenu::mouseReleaseEvent(TQMouseEvent* e) TQPopupMenu::mouseReleaseEvent(e); } -TQPopupMenu* KPopupMenu::contextMenu() +TQPopupMenu* TDEPopupMenu::contextMenu() { if (!d->m_ctxMenu) { @@ -524,27 +524,27 @@ TQPopupMenu* KPopupMenu::contextMenu() return d->m_ctxMenu; } -const TQPopupMenu* KPopupMenu::contextMenu() const +const TQPopupMenu* TDEPopupMenu::contextMenu() const { - return const_cast< KPopupMenu* >( this )->contextMenu(); + return const_cast< TDEPopupMenu* >( this )->contextMenu(); } -void KPopupMenu::hideContextMenu() +void TDEPopupMenu::hideContextMenu() { - KPopupMenuPrivate::s_continueCtxMenuShow = false; + TDEPopupMenuPrivate::s_continueCtxMenuShow = false; } -int KPopupMenu::contextMenuFocusItem() +int TDEPopupMenu::contextMenuFocusItem() { - return KPopupMenuPrivate::s_highlightedItem; + return TDEPopupMenuPrivate::s_highlightedItem; } -KPopupMenu* KPopupMenu::contextMenuFocus() +TDEPopupMenu* TDEPopupMenu::contextMenuFocus() { - return KPopupMenuPrivate::s_contextedMenu; + return TDEPopupMenuPrivate::s_contextedMenu; } -void KPopupMenu::itemHighlighted(int /* whichItem */) +void TDEPopupMenu::itemHighlighted(int /* whichItem */) { if (!d->m_ctxMenu || !d->m_ctxMenu->isVisible()) { @@ -555,9 +555,9 @@ void KPopupMenu::itemHighlighted(int /* whichItem */) showCtxMenu(mapFromGlobal(TQCursor::pos())); } -void KPopupMenu::showCtxMenu(TQPoint pos) +void TDEPopupMenu::showCtxMenu(TQPoint pos) { - TQMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem); + TQMenuItem* item = findItem(TDEPopupMenuPrivate::s_highlightedItem); if (item) { TQPopupMenu* subMenu = item->popup(); @@ -567,30 +567,30 @@ void KPopupMenu::showCtxMenu(TQPoint pos) } } - KPopupMenuPrivate::s_highlightedItem = idAt(pos); + TDEPopupMenuPrivate::s_highlightedItem = idAt(pos); - if (KPopupMenuPrivate::s_highlightedItem == -1) + if (TDEPopupMenuPrivate::s_highlightedItem == -1) { - KPopupMenuPrivate::s_contextedMenu = 0; + TDEPopupMenuPrivate::s_contextedMenu = 0; return; } - emit aboutToShowContextMenu(this, KPopupMenuPrivate::s_highlightedItem, d->m_ctxMenu); + emit aboutToShowContextMenu(this, TDEPopupMenuPrivate::s_highlightedItem, d->m_ctxMenu); - TQPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup(); + TQPopupMenu* subMenu = findItem(TDEPopupMenuPrivate::s_highlightedItem)->popup(); if (subMenu) { connect(subMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(ctxMenuHideShowingMenu())); TQTimer::singleShot(100, subMenu, TQT_SLOT(hide())); } - if (!KPopupMenuPrivate::s_continueCtxMenuShow) + if (!TDEPopupMenuPrivate::s_continueCtxMenuShow) { - KPopupMenuPrivate::s_continueCtxMenuShow = true; + TDEPopupMenuPrivate::s_continueCtxMenuShow = true; return; } - KPopupMenuPrivate::s_contextedMenu = this; + TDEPopupMenuPrivate::s_contextedMenu = this; d->m_ctxMenu->popup(this->mapToGlobal(pos)); connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(itemHighlighted(int))); } @@ -599,9 +599,9 @@ void KPopupMenu::showCtxMenu(TQPoint pos) * this method helps prevent submenus popping up while we have a context menu * showing */ -void KPopupMenu::ctxMenuHideShowingMenu() +void TDEPopupMenu::ctxMenuHideShowingMenu() { - TQMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem); + TQMenuItem* item = findItem(TDEPopupMenuPrivate::s_highlightedItem); if (item) { TQPopupMenu* subMenu = item->popup(); @@ -612,11 +612,11 @@ void KPopupMenu::ctxMenuHideShowingMenu() } } -void KPopupMenu::ctxMenuHiding() +void TDEPopupMenu::ctxMenuHiding() { - if (KPopupMenuPrivate::s_highlightedItem) + if (TDEPopupMenuPrivate::s_highlightedItem) { - TQPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup(); + TQPopupMenu* subMenu = findItem(TDEPopupMenuPrivate::s_highlightedItem)->popup(); if (subMenu) { disconnect(subMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(ctxMenuHideShowingMenu())); @@ -624,10 +624,10 @@ void KPopupMenu::ctxMenuHiding() } disconnect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(itemHighlighted(int))); - KPopupMenuPrivate::s_continueCtxMenuShow = true; + TDEPopupMenuPrivate::s_continueCtxMenuShow = true; } -void KPopupMenu::contextMenuEvent(TQContextMenuEvent* e) +void TDEPopupMenu::contextMenuEvent(TQContextMenuEvent* e) { if (d->m_ctxMenu) { @@ -647,7 +647,7 @@ void KPopupMenu::contextMenuEvent(TQContextMenuEvent* e) TQPopupMenu::contextMenuEvent(e); } -void KPopupMenu::hideEvent(TQHideEvent*) +void TDEPopupMenu::hideEvent(TQHideEvent*) { if (d->m_ctxMenu && d->m_ctxMenu->isVisible()) { @@ -669,26 +669,26 @@ void KPopupMenu::hideEvent(TQHideEvent*) */ // Obsolete -KPopupMenu::KPopupMenu(const TQString& title, TQWidget *parent, const char *name) +TDEPopupMenu::TDEPopupMenu(const TQString& title, TQWidget *parent, const char *name) : TQPopupMenu(parent, name) { - d = new KPopupMenuPrivate; + d = new TDEPopupMenuPrivate; insertTitle(title); } // Obsolete -void KPopupMenu::setTitle(const TQString &title) +void TDEPopupMenu::setTitle(const TQString &title) { - KPopupTitle *titleItem = new KPopupTitle(); + TDEPopupTitle *titleItem = new TDEPopupTitle(); titleItem->setTitle(title); insertItem(titleItem); d->m_lastTitle = title; } -void KPopupTitle::virtual_hook( int, void* ) +void TDEPopupTitle::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KPopupMenu::virtual_hook( int, void* ) +void TDEPopupMenu::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "kpopupmenu.moc" diff --git a/tdeui/kpopupmenu.h b/tdeui/kpopupmenu.h index 5c29fd2f9..2d50e2d56 100644 --- a/tdeui/kpopupmenu.h +++ b/tdeui/kpopupmenu.h @@ -25,17 +25,17 @@ #include #include /** - * @short KPopupMenu title widget. + * @short TDEPopupMenu title widget. * - * Title widget for use in KPopupMenu. + * Title widget for use in TDEPopupMenu. * * You usually don't have to create this manually since - * KPopupMenu::insertTitle will do it for you, but it is allowed if + * TDEPopupMenu::insertTitle will do it for you, but it is allowed if * you wish to customize it's look. * * @author Daniel M. Duley */ -class TDEUI_EXPORT KPopupTitle : public TQWidget +class TDEUI_EXPORT TDEPopupTitle : public TQWidget { Q_OBJECT @@ -44,19 +44,19 @@ public: * Constructs a title widget with the user specified gradient, pixmap, * and colors. */ - KPopupTitle(TQWidget *parent=0, const char *name=0); + TDEPopupTitle(TQWidget *parent=0, const char *name=0); /** * @deprecated * Constructs a title widget with the specified gradient and colors. */ - KPopupTitle(KPixmapEffect::GradientType gradient, const TQColor &color, + TDEPopupTitle(KPixmapEffect::GradientType gradient, const TQColor &color, const TQColor &textColor, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; /** * @deprecated * Constructs a title widget with the specified pixmap and colors. */ - KPopupTitle(const KPixmap &background, const TQColor &color, + TDEPopupTitle(const KPixmap &background, const TQColor &color, const TQColor &textColor, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; /** @@ -98,14 +98,14 @@ protected: protected: virtual void virtual_hook( int id, void* data ); private: - class KPopupTitlePrivate; - KPopupTitlePrivate *d; + class TDEPopupTitlePrivate; + TDEPopupTitlePrivate *d; }; /** * @short A menu with title items. * - * KPopupMenu is a class for menus with standard title items and keyboard + * TDEPopupMenu is a class for menus with standard title items and keyboard * accessibility for popups with many options and/or varying options. It acts * identically to TQPopupMenu, with the addition of insertTitle(), * changeTitle(), setKeyboardShortcutsEnabled() and @@ -120,19 +120,19 @@ private: * @author Daniel M. Duley * @author Hamish Rodda */ -class TDEUI_EXPORT KPopupMenu : public TQPopupMenu { +class TDEUI_EXPORT TDEPopupMenu : public TQPopupMenu { Q_OBJECT public: /** - * Constructs a KPopupMenu. + * Constructs a TDEPopupMenu. */ - KPopupMenu(TQWidget *parent=0, const char *name=0); + TDEPopupMenu(TQWidget *parent=0, const char *name=0); /** * Destructs the object */ - ~KPopupMenu(); + ~TDEPopupMenu(); /** * Inserts a title item with no icon. @@ -191,7 +191,7 @@ public: * Obsolete method provided for backwards compatibility only. Use the * normal constructor and insertTitle instead. */ - KPopupMenu(const TQString &title, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; + TDEPopupMenu(const TQString &title, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; /** * @deprecated @@ -219,10 +219,10 @@ public: void hideContextMenu(); /** - * Returns the KPopupMenu associated with the current context menu + * Returns the TDEPopupMenu associated with the current context menu * @since 3.2 */ - static KPopupMenu* contextMenuFocus(); + static TDEPopupMenu* contextMenuFocus(); /** * returns the ID of the menuitem associated with the current context menu @@ -250,7 +250,7 @@ signals: * @param ctxMenu The context menu itself * @since 3.2 */ - void aboutToShowContextMenu(KPopupMenu* menu, int menuItem, TQPopupMenu* ctxMenu); + void aboutToShowContextMenu(TDEPopupMenu* menu, int menuItem, TQPopupMenu* ctxMenu); protected: virtual void closeEvent(TQCloseEvent *); @@ -275,8 +275,8 @@ protected slots: void ctxMenuHideShowingMenu(); private: - class KPopupMenuPrivate; - KPopupMenuPrivate *d; + class TDEPopupMenuPrivate; + TDEPopupMenuPrivate *d; }; #endif diff --git a/tdeui/kselect.cpp b/tdeui/kselect.cpp index 70a63a9a8..19214ede3 100644 --- a/tdeui/kselect.cpp +++ b/tdeui/kselect.cpp @@ -235,14 +235,14 @@ void KXYSelector::drawCursor( TQPainter *p, int xp, int yp ) */ -KSelector::KSelector( TQWidget *parent, const char *name ) +TDESelector::TDESelector( TQWidget *parent, const char *name ) : TQWidget( parent, name ), TQRangeControl() { _orientation = Qt::Horizontal; _indent = true; } -KSelector::KSelector( Orientation o, TQWidget *parent, const char *name ) +TDESelector::TDESelector( Orientation o, TQWidget *parent, const char *name ) : TQWidget( parent, name ), TQRangeControl() { _orientation = o; @@ -250,11 +250,11 @@ KSelector::KSelector( Orientation o, TQWidget *parent, const char *name ) } -KSelector::~KSelector() +TDESelector::~TDESelector() {} -TQRect KSelector::contentsRect() const +TQRect TDESelector::contentsRect() const { int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; @@ -264,7 +264,7 @@ TQRect KSelector::contentsRect() const return TQRect( iw, w, width() - 2 * iw, height() - w * 2 - 5 ); } -void KSelector::paintEvent( TQPaintEvent * ) +void TDESelector::paintEvent( TQPaintEvent * ) { TQPainter painter; int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth); @@ -292,23 +292,23 @@ void KSelector::paintEvent( TQPaintEvent * ) painter.end(); } -void KSelector::mousePressEvent( TQMouseEvent *e ) +void TDESelector::mousePressEvent( TQMouseEvent *e ) { moveArrow( e->pos() ); } -void KSelector::mouseMoveEvent( TQMouseEvent *e ) +void TDESelector::mouseMoveEvent( TQMouseEvent *e ) { moveArrow( e->pos() ); } -void KSelector::wheelEvent( TQWheelEvent *e ) +void TDESelector::wheelEvent( TQWheelEvent *e ) { int val = value() + e->delta()/120; setValue( val ); } -void KSelector::valueChange() +void TDESelector::valueChange() { TQPainter painter; TQPoint pos; @@ -326,7 +326,7 @@ void KSelector::valueChange() emit valueChanged( value() ); } -void KSelector::moveArrow( const TQPoint &pos ) +void TDESelector::moveArrow( const TQPoint &pos ) { int val; int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth); @@ -342,7 +342,7 @@ void KSelector::moveArrow( const TQPoint &pos ) setValue( val ); } -TQPoint KSelector::calcArrowPos( int val ) +TQPoint TDESelector::calcArrowPos( int val ) { TQPoint p; @@ -364,10 +364,10 @@ TQPoint KSelector::calcArrowPos( int val ) return p; } -void KSelector::drawContents( TQPainter * ) +void TDESelector::drawContents( TQPainter * ) {} -void KSelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) +void TDESelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) { if ( show ) { @@ -404,7 +404,7 @@ void KSelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) //---------------------------------------------------------------------------- KGradientSelector::KGradientSelector( TQWidget *parent, const char *name ) - : KSelector( parent, name ) + : TDESelector( parent, name ) { init(); } @@ -412,7 +412,7 @@ KGradientSelector::KGradientSelector( TQWidget *parent, const char *name ) KGradientSelector::KGradientSelector( Orientation o, TQWidget *parent, const char *name ) - : KSelector( o, parent, name ) + : TDESelector( o, parent, name ) { init(); } @@ -524,11 +524,11 @@ void KGradientSelector::drawContents( TQPainter *painter ) void KXYSelector::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KSelector::virtual_hook( int, void* ) +void TDESelector::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void KGradientSelector::virtual_hook( int id, void* data ) -{ KSelector::virtual_hook( id, data ); } +{ TDESelector::virtual_hook( id, data ); } #include "kselect.moc" diff --git a/tdeui/kselect.h b/tdeui/kselect.h index 77b35a175..fd9a90ccd 100644 --- a/tdeui/kselect.h +++ b/tdeui/kselect.h @@ -148,7 +148,7 @@ private: /** - * KSelector is the base class for other widgets which + * TDESelector is the base class for other widgets which * provides the ability to choose from a one-dimensional * range of values. An example is the KGradientSelector * which allows to choose from a range of colors. @@ -156,7 +156,7 @@ private: * A custom drawing routine for the widget surface has * to be provided by the subclass. */ -class TDEUI_EXPORT KSelector : public TQWidget, public TQRangeControl +class TDEUI_EXPORT TDESelector : public TQWidget, public TQRangeControl { Q_OBJECT TQ_PROPERTY( int value READ value WRITE setValue ) @@ -167,16 +167,16 @@ public: /** * Constructs a horizontal one-dimensional selection widget. */ - KSelector( TQWidget *parent=0, const char *name=0 ); + TDESelector( TQWidget *parent=0, const char *name=0 ); /** * Constructs a one-dimensional selection widget with * a given orientation. */ - KSelector( Orientation o, TQWidget *parent = 0L, const char *name = 0L ); + TDESelector( Orientation o, TQWidget *parent = 0L, const char *name = 0L ); /* * Destructs the widget. */ - ~KSelector(); + ~TDESelector(); /** * @return the orientation of the widget. @@ -277,8 +277,8 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KSelectorPrivate; - KSelectorPrivate *d; + class TDESelectorPrivate; + TDESelectorPrivate *d; }; @@ -290,7 +290,7 @@ private: * \image html kgradientselector.png "KDE Gradient Selector Widget" * **/ -class TDEUI_EXPORT KGradientSelector : public KSelector +class TDEUI_EXPORT KGradientSelector : public TDESelector { Q_OBJECT diff --git a/tdeui/kshortcutdialog.cpp b/tdeui/kshortcutdialog.cpp index db5e32322..14cdd9190 100644 --- a/tdeui/kshortcutdialog.cpp +++ b/tdeui/kshortcutdialog.cpp @@ -62,9 +62,9 @@ #include #include -bool KShortcutDialog::s_showMore = false; +bool TDEShortcutDialog::s_showMore = false; -KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, TQWidget* parent, const char* name ) +TDEShortcutDialog::TDEShortcutDialog( const TDEShortcut& shortcut, bool bQtShortcut, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n("Configure Shortcut"), KDialogBase::Details|KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Cancel, true ) { @@ -75,9 +75,9 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, T m_stack->setMargin(0); setMainWidget(m_stack); - m_simple = new KShortcutDialogSimple(m_stack); + m_simple = new TDEShortcutDialogSimple(m_stack); - m_adv = new KShortcutDialogAdvanced(m_stack); + m_adv = new TDEShortcutDialogAdvanced(m_stack); m_adv->hide(); m_bQtShortcut = bQtShortcut; @@ -127,19 +127,19 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, T #endif } -KShortcutDialog::~KShortcutDialog() +TDEShortcutDialog::~TDEShortcutDialog() { TDEConfigGroup group(TDEGlobal::config(), "General"); group.writeEntry("ShowAlternativeShortcutConfig", s_showMore); } -void KShortcutDialog::setShortcut( const KShortcut & shortcut ) +void TDEShortcutDialog::setShortcut( const TDEShortcut & shortcut ) { m_shortcut = shortcut; updateShortcutDisplay(); } -void KShortcutDialog::updateShortcutDisplay() +void TDEShortcutDialog::updateShortcutDisplay() { TQString s[2] = { m_shortcut.seq(0).toString(), m_shortcut.seq(1).toString() }; @@ -190,13 +190,13 @@ void KShortcutDialog::updateShortcutDisplay() enableButton(Details, bLessOk); } -void KShortcutDialog::slotDetails() +void TDEShortcutDialog::slotDetails() { s_showMore = (m_adv->isHidden()); updateDetails(); } -void KShortcutDialog::updateDetails() +void TDEShortcutDialog::updateDetails() { bool showAdvanced = s_showMore || (m_shortcut.count() > 1); setDetails(showAdvanced); @@ -224,7 +224,7 @@ void KShortcutDialog::updateDetails() adjustSize(); } -void KShortcutDialog::slotSelectPrimary() +void TDEShortcutDialog::slotSelectPrimary() { m_bRecording = false; m_iSeq = 0; @@ -235,7 +235,7 @@ void KShortcutDialog::slotSelectPrimary() updateShortcutDisplay(); } -void KShortcutDialog::slotSelectAlternate() +void TDEShortcutDialog::slotSelectAlternate() { m_bRecording = false; m_iSeq = 1; @@ -246,20 +246,20 @@ void KShortcutDialog::slotSelectAlternate() updateShortcutDisplay(); } -void KShortcutDialog::slotClearShortcut() +void TDEShortcutDialog::slotClearShortcut() { m_shortcut.setSeq( 0, KKeySequence() ); updateShortcutDisplay(); } -void KShortcutDialog::slotClearPrimary() +void TDEShortcutDialog::slotClearPrimary() { m_shortcut.setSeq( 0, KKeySequence() ); m_adv->m_btnPrimary->setChecked( true ); slotSelectPrimary(); } -void KShortcutDialog::slotClearAlternate() +void TDEShortcutDialog::slotClearAlternate() { if( m_shortcut.count() == 2 ) m_shortcut.init( m_shortcut.seq(0) ); @@ -267,7 +267,7 @@ void KShortcutDialog::slotClearAlternate() slotSelectAlternate(); } -void KShortcutDialog::slotMultiKeyMode( bool bOn ) +void TDEShortcutDialog::slotMultiKeyMode( bool bOn ) { // If turning off multi-key mode during a recording, if( !bOn && m_bRecording ) { @@ -281,7 +281,7 @@ void KShortcutDialog::slotMultiKeyMode( bool bOn ) /* we don't use the generic Qt code on X11 because it allows us to grab the keyboard so that all keypresses are seen */ -bool KShortcutDialog::x11Event( XEvent *pEvent ) +bool TDEShortcutDialog::x11Event( XEvent *pEvent ) { switch( pEvent->type ) { case XKeyPress: @@ -348,7 +348,7 @@ static bool convertSymXToMod( uint keySymX, uint* pmod ) return true; } -void KShortcutDialog::x11KeyPressEvent( XEvent* pEvent ) +void TDEShortcutDialog::x11KeyPressEvent( XEvent* pEvent ) { KKeyNative keyNative( pEvent ); uint keyModX = keyNative.mod(); @@ -370,7 +370,7 @@ void KShortcutDialog::x11KeyPressEvent( XEvent* pEvent ) updateShortcutDisplay(); } -void KShortcutDialog::x11KeyReleaseEvent( XEvent* pEvent ) +void TDEShortcutDialog::x11KeyReleaseEvent( XEvent* pEvent ) { // We're only interested in the release of modifier keys, // and then only when it's for the first key in a sequence. @@ -391,7 +391,7 @@ void KShortcutDialog::x11KeyReleaseEvent( XEvent* pEvent ) } } #elif defined(Q_WS_WIN) -void KShortcutDialog::keyPressEvent( TQKeyEvent * e ) +void TDEShortcutDialog::keyPressEvent( TQKeyEvent * e ) { kdDebug() << e->text() << " " << (int)e->text()[0].latin1()<< " " << (int)e->ascii() << endl; //if key is a letter, it must be stored as lowercase @@ -457,7 +457,7 @@ void KShortcutDialog::keyPressEvent( TQKeyEvent * e ) } } -bool KShortcutDialog::event ( TQEvent * e ) +bool TDEShortcutDialog::event ( TQEvent * e ) { if (e->type()==TQEvent::KeyRelease) { int modQt = KKeyServer::qtButtonStateToMod( static_cast(e)->state() ); @@ -488,7 +488,7 @@ bool KShortcutDialog::event ( TQEvent * e ) } #endif -void KShortcutDialog::keyPressed( KKey key ) +void TDEShortcutDialog::keyPressed( KKey key ) { kdDebug(125) << "keyPressed: " << key.toString() << endl; diff --git a/tdeui/kshortcutdialog.h b/tdeui/kshortcutdialog.h index e1f7643be..59a4bb565 100644 --- a/tdeui/kshortcutdialog.h +++ b/tdeui/kshortcutdialog.h @@ -25,42 +25,42 @@ class TQVBox; class KPushButton; -class KShortcutDialogSimple; -class KShortcutDialogAdvanced; +class TDEShortcutDialogSimple; +class TDEShortcutDialogAdvanced; /** * @short Dialog for configuring a shortcut. * - * This dialog allows configuring a single KShortcut. KKeyDialog + * This dialog allows configuring a single TDEShortcut. KKeyDialog * should be usually used instead. * * @internal * @see KKeyDialog * @since 3.4 */ -class TDEUI_EXPORT KShortcutDialog : public KDialogBase +class TDEUI_EXPORT TDEShortcutDialog : public KDialogBase { Q_OBJECT public: - KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, TQWidget* parent = 0, const char* name = 0 ); - ~KShortcutDialog(); + TDEShortcutDialog( const TDEShortcut& shortcut, bool bQtShortcut, TQWidget* parent = 0, const char* name = 0 ); + ~TDEShortcutDialog(); - void setShortcut( const KShortcut & shortcut ); - const KShortcut& shortcut() const { return m_shortcut; } + void setShortcut( const TDEShortcut & shortcut ); + const TDEShortcut& shortcut() const { return m_shortcut; } private: // true if qt shortcut, false if native shortcut bool m_bQtShortcut; - KShortcut m_shortcut; + TDEShortcut m_shortcut; bool m_bGrab; KPushButton* m_ptxtCurrent; uint m_iSeq; uint m_iKey; bool m_bRecording; uint m_mod; - KShortcutDialogSimple *m_simple; - KShortcutDialogAdvanced *m_adv; + TDEShortcutDialogSimple *m_simple; + TDEShortcutDialogAdvanced *m_adv; TQVBox *m_stack; void updateShortcutDisplay(); @@ -89,7 +89,7 @@ protected slots: void slotMultiKeyMode( bool bOn ); private: - class KShortcutDialogPrivate* d; + class TDEShortcutDialogPrivate* d; static bool s_showMore; }; diff --git a/tdeui/kshortcutdialog_advanced.ui b/tdeui/kshortcutdialog_advanced.ui index 6466174d2..77c7fae14 100644 --- a/tdeui/kshortcutdialog_advanced.ui +++ b/tdeui/kshortcutdialog_advanced.ui @@ -1,8 +1,8 @@ -KShortcutDialogAdvanced +TDEShortcutDialogAdvanced - KShortcutDialogAdvanced + TDEShortcutDialogAdvanced @@ -243,7 +243,7 @@ kpushbutton.h - class KShortcut + class TDEShortcut diff --git a/tdeui/kshortcutdialog_simple.ui b/tdeui/kshortcutdialog_simple.ui index 97d87b582..e271e2bd6 100644 --- a/tdeui/kshortcutdialog_simple.ui +++ b/tdeui/kshortcutdialog_simple.ui @@ -1,8 +1,8 @@ -KShortcutDialogSimple +TDEShortcutDialogSimple - KShortcutDialogSimple + TDEShortcutDialogSimple @@ -110,7 +110,7 @@ kpushbutton.h - class KShortcut + class TDEShortcut diff --git a/tdeui/kstatusbar.h b/tdeui/kstatusbar.h index a1b89d0a7..2c7574a79 100644 --- a/tdeui/kstatusbar.h +++ b/tdeui/kstatusbar.h @@ -64,14 +64,14 @@ signals: * * You can insert text labels or custom widgets. Their geometry is managed * internally. KStatusBar resizes itself, but positioning is left to - * KMainWindow (or to you, if you don't use KMainWindow ). + * TDEMainWindow (or to you, if you don't use TDEMainWindow ). * * A special type of item is a message which is a temporary text-message * displayed on top of other items in full-width. Messages are visible for * specified time, or until you call the slot TQStatusBar::clear(). See * TQStatusBar::message for details. * - * It is useful to connect the KActionCollection signals to the + * It is useful to connect the TDEActionCollection signals to the * TQStatusBar::message slots. * * KStatusBar inherits TQStatusBar, you can freely use all QStatusBar @@ -82,7 +82,7 @@ signals: * * @author Mark Donohoe (donohoe@kde.org) Maintained by Sven Radej - * @see KActionCollection + * @see TDEActionCollection */ class TDEUI_EXPORT KStatusBar : public TQStatusBar { @@ -97,7 +97,7 @@ public: enum BarStatus{ Toggle, Show, Hide }; /** - * Constructs a status bar. @p parent is usually KMainWindow. + * Constructs a status bar. @p parent is usually TDEMainWindow. */ KStatusBar( TQWidget* parent = 0L, const char* name = 0L ); diff --git a/tdeui/kstdaction.cpp b/tdeui/kstdaction.cpp index 2f33e4843..41c7e72ea 100644 --- a/tdeui/kstdaction.cpp +++ b/tdeui/kstdaction.cpp @@ -40,9 +40,9 @@ TQStringList stdNames() return internal_stdNames(); } -KAction* create( StdAction id, const char *name, const TQObject *recvr, const char *slot, KActionCollection* parent ) +TDEAction* create( StdAction id, const char *name, const TQObject *recvr, const char *slot, TDEActionCollection* parent ) { - KAction* pAction = 0; + TDEAction* pAction = 0; const KStdActionInfo* pInfo = infoPtr( id ); kdDebug(125) << "KStdAction::create( " << id << "=" << (pInfo ? pInfo->psName : (const char*)0) << ", " << parent << ", " << name << " )" << endl; // ellis if( pInfo ) { @@ -86,10 +86,10 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch if (id == LastPage) iconName = "start"; } - KShortcut cut = KStdAccel::shortcut(pInfo->idAccel); + TDEShortcut cut = TDEStdAccel::shortcut(pInfo->idAccel); switch( id ) { case OpenRecent: - pAction = new KRecentFilesAction( sLabel, pInfo->psIconName, cut, + pAction = new TDERecentFilesAction( sLabel, pInfo->psIconName, cut, recvr, slot, parent, (name) ? name : pInfo->psName ); break; @@ -97,8 +97,8 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch case ShowToolbar: case ShowStatusbar: { - KToggleAction *ret; - ret = new KToggleAction( sLabel, pInfo->psIconName, cut, + TDEToggleAction *ret; + ret = new TDEToggleAction( sLabel, pInfo->psIconName, cut, recvr, slot, parent, (name) ? name : pInfo->psName ); ret->setChecked( true ); @@ -107,8 +107,8 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch } case FullScreen: { - KToggleFullScreenAction *ret; - ret = new KToggleFullScreenAction( cut, recvr, slot, + TDEToggleFullScreenAction *ret; + ret = new TDEToggleFullScreenAction( cut, recvr, slot, parent, NULL, (name) ? name : pInfo->psName ); ret->setChecked( false ); pAction = ret; @@ -116,15 +116,15 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch } case PasteText: { - KPasteTextAction *ret; - ret = new KPasteTextAction(sLabel, iconName, cut, + TDEPasteTextAction *ret; + ret = new TDEPasteTextAction(sLabel, iconName, cut, recvr, slot, parent, (name) ? name : pInfo->psName ); pAction = ret; break; } default: - pAction = new KAction( sLabel, iconName, cut, + pAction = new TDEAction( sLabel, iconName, cut, recvr, slot, parent, (name) ? name : pInfo->psName ); break; @@ -139,103 +139,103 @@ const char* name( StdAction id ) return (pInfo) ? pInfo->psName : 0; } -KAction *openNew( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *openNew( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( New, name, recvr, slot, parent ); } -KAction *open( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *open( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Open, name, recvr, slot, parent ); } -KRecentFilesAction *openRecent( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) - { return (KRecentFilesAction*) KStdAction::create( OpenRecent, name, recvr, slot, parent ); } -KAction *save( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDERecentFilesAction *openRecent( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) + { return (TDERecentFilesAction*) KStdAction::create( OpenRecent, name, recvr, slot, parent ); } +TDEAction *save( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Save, name, recvr, slot, parent ); } -KAction *saveAs( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *saveAs( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( SaveAs, name, recvr, slot, parent ); } -KAction *revert( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *revert( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Revert, name, recvr, slot, parent ); } -KAction *print( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *print( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Print, name, recvr, slot, parent ); } -KAction *printPreview( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *printPreview( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( PrintPreview, name, recvr, slot, parent ); } -KAction *close( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *close( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Close, name, recvr, slot, parent ); } -KAction *mail( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *mail( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Mail, name, recvr, slot, parent ); } -KAction *quit( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *quit( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Quit, name, recvr, slot, parent ); } -KAction *undo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *undo( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Undo, name, recvr, slot, parent ); } -KAction *redo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *redo( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Redo, name, recvr, slot, parent ); } -KAction *cut( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *cut( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Cut, name, recvr, slot, parent ); } -KAction *copy( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *copy( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Copy, name, recvr, slot, parent ); } -KAction *paste( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *paste( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Paste, name, recvr, slot, parent ); } -KAction *pasteText( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *pasteText( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( PasteText, name, recvr, slot, parent ); } -KAction *clear( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *clear( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Clear, name, recvr, slot, parent ); } -KAction *selectAll( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *selectAll( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( SelectAll, name, recvr, slot, parent ); } -KAction *deselect( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *deselect( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Deselect, name, recvr, slot, parent ); } -KAction *find( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *find( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Find, name, recvr, slot, parent ); } -KAction *findNext( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *findNext( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FindNext, name, recvr, slot, parent ); } -KAction *findPrev( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *findPrev( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FindPrev, name, recvr, slot, parent ); } -KAction *replace( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *replace( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Replace, name, recvr, slot, parent ); } -KAction *actualSize( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *actualSize( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ActualSize, name, recvr, slot, parent ); } -KAction *fitToPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *fitToPage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FitToPage, name, recvr, slot, parent ); } -KAction *fitToWidth( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *fitToWidth( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FitToWidth, name, recvr, slot, parent ); } -KAction *fitToHeight( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *fitToHeight( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FitToHeight, name, recvr, slot, parent ); } -KAction *zoomIn( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *zoomIn( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ZoomIn, name, recvr, slot, parent ); } -KAction *zoomOut( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *zoomOut( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ZoomOut, name, recvr, slot, parent ); } -KAction *zoom( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *zoom( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Zoom, name, recvr, slot, parent ); } -KAction *redisplay( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *redisplay( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Redisplay, name, recvr, slot, parent ); } -KAction *up( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *up( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Up, name, recvr, slot, parent ); } -KAction *back( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *back( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Back, name, recvr, slot, parent ); } -KAction *forward( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *forward( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Forward, name, recvr, slot, parent ); } -KAction *home( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *home( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Home, name, recvr, slot, parent ); } -KAction *prior( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *prior( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Prior, name, recvr, slot, parent ); } -KAction *next( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *next( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Next, name, recvr, slot, parent ); } -KAction *goTo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *goTo( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Goto, name, recvr, slot, parent ); } -KAction *gotoPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *gotoPage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( GotoPage, name, recvr, slot, parent ); } -KAction *gotoLine( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *gotoLine( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( GotoLine, name, recvr, slot, parent ); } -KAction *firstPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *firstPage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FirstPage, name, recvr, slot, parent ); } -KAction *lastPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *lastPage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( LastPage, name, recvr, slot, parent ); } -KAction *addBookmark( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *addBookmark( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( AddBookmark, name, recvr, slot, parent ); } -KAction *editBookmarks( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *editBookmarks( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( EditBookmarks, name, recvr, slot, parent ); } -KAction *spelling( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *spelling( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Spelling, name, recvr, slot, parent ); } -KToggleAction *showMenubar( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *_name ) +TDEToggleAction *showMenubar( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *_name ) { - KToggleAction *ret; - ret = new KToggleAction(i18n("Show &Menubar"), "showmenu", KStdAccel::shortcut(KStdAccel::ShowMenubar), recvr, slot, + TDEToggleAction *ret; + ret = new TDEToggleAction(i18n("Show &Menubar"), "showmenu", TDEStdAccel::shortcut(TDEStdAccel::ShowMenubar), recvr, slot, parent, _name ? _name : name(ShowMenubar)); ret->setWhatsThis( i18n( "Show Menubar

" "Shows the menubar again after it has been hidden" ) ); @@ -248,10 +248,10 @@ KToggleAction *showMenubar( const TQObject *recvr, const char *slot, KActionColl } // obsolete -KToggleAction *showToolbar( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *_name ) +TDEToggleAction *showToolbar( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *_name ) { - KToggleAction *ret; - ret = new KToggleAction(i18n("Show &Toolbar"), 0, recvr, slot, parent, + TDEToggleAction *ret; + ret = new TDEToggleAction(i18n("Show &Toolbar"), 0, recvr, slot, parent, _name ? _name : name(ShowToolbar)); ret->setChecked(true); return ret; @@ -259,19 +259,19 @@ KToggleAction *showToolbar( const TQObject *recvr, const char *slot, KActionColl } // obsolete -KToggleToolBarAction *showToolbar( const char* toolBarName, KActionCollection* parent, const char *_name ) +TDEToggleToolBarAction *showToolbar( const char* toolBarName, TDEActionCollection* parent, const char *_name ) { - KToggleToolBarAction *ret; - ret = new KToggleToolBarAction(toolBarName, i18n("Show &Toolbar"), parent, + TDEToggleToolBarAction *ret; + ret = new TDEToggleToolBarAction(toolBarName, i18n("Show &Toolbar"), parent, _name ? _name : name(ShowToolbar)); return ret; } -KToggleAction *showStatusbar( const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *_name ) +TDEToggleAction *showStatusbar( const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *_name ) { - KToggleAction *ret; - ret = new KToggleAction(i18n("Show St&atusbar"), 0, recvr, slot, parent, + TDEToggleAction *ret; + ret = new TDEToggleAction(i18n("Show St&atusbar"), 0, recvr, slot, parent, _name ? _name : name(ShowStatusbar)); ret->setWhatsThis( i18n( "Show Statusbar

" "Shows the statusbar, which is the bar at the bottom of the window used for status information." ) ); @@ -284,40 +284,40 @@ KToggleAction *showStatusbar( const TQObject *recvr, const char *slot, return ret; } -KToggleFullScreenAction *fullScreen( const TQObject *recvr, const char *slot, KActionCollection* parent, +TDEToggleFullScreenAction *fullScreen( const TQObject *recvr, const char *slot, TDEActionCollection* parent, TQWidget* window, const char *name ) { - KToggleFullScreenAction *ret; - ret = static_cast< KToggleFullScreenAction* >( KStdAction::create( FullScreen, name, recvr, slot, parent )); + TDEToggleFullScreenAction *ret; + ret = static_cast< TDEToggleFullScreenAction* >( KStdAction::create( FullScreen, name, recvr, slot, parent )); ret->setWindow( window ); return ret; } -KAction *saveOptions( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *saveOptions( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( SaveOptions, name, recvr, slot, parent ); } -KAction *keyBindings( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *keyBindings( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( KeyBindings, name, recvr, slot, parent ); } -KAction *preferences( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *preferences( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Preferences, name, recvr, slot, parent ); } -KAction *configureToolbars( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *configureToolbars( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ConfigureToolbars, name, recvr, slot, parent ); } -KAction *configureNotifications( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *configureNotifications( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ConfigureNotifications, name, recvr, slot, parent ); } -KAction *help( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *help( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Help, name, recvr, slot, parent ); } -KAction *helpContents( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *helpContents( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( HelpContents, name, recvr, slot, parent ); } -KAction *whatsThis( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *whatsThis( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( WhatsThis, name, recvr, slot, parent ); } -KAction *tipOfDay( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *tipOfDay( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( TipofDay, name, recvr, slot, parent ); } -KAction *reportBug( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *reportBug( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ReportBug, name, recvr, slot, parent ); } -KAction *switchApplicationLanguage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *switchApplicationLanguage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( SwitchApplicationLanguage, name, recvr, slot, parent ); } -KAction *aboutApp( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *aboutApp( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( AboutApp, name, recvr, slot, parent ); } -KAction *aboutKDE( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *aboutKDE( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( AboutKDE, name, recvr, slot, parent ); } } diff --git a/tdeui/kstdaction.h b/tdeui/kstdaction.h index 7fa18968d..31b80618c 100644 --- a/tdeui/kstdaction.h +++ b/tdeui/kstdaction.h @@ -21,12 +21,12 @@ class TQObject; class TQWidget; -class KAction; -class KActionCollection; -class KRecentFilesAction; -class KToggleAction; -class KToggleToolBarAction; -class KToggleFullScreenAction; +class TDEAction; +class TDEActionCollection; +class TDERecentFilesAction; +class TDEToggleAction; +class TDEToggleToolBarAction; +class TDEToggleFullScreenAction; #include @@ -40,8 +40,8 @@ class KToggleFullScreenAction; * conform to the KDE UI Style Guide * @see http://developer.kde.org/documentation/standards/kde/style/basics/index.html . * - * All of the documentation for KAction holds for KStdAction - * also. When in doubt on how things work, check the KAction + * All of the documentation for TDEAction holds for KStdAction + * also. When in doubt on how things work, check the TDEAction * documention first. * * Simple Example:\n @@ -50,15 +50,15 @@ class KToggleFullScreenAction; * for regular actions. For example, if you previously had: * * \code - * KAction *newAct = new KAction(i18n("&New"), TQIconSet(BarIcon("filenew")), - * KStdAccel::shortcut(KStdAccel::New), this, + * TDEAction *newAct = new TDEAction(i18n("&New"), TQIconSet(BarIcon("filenew")), + * TDEStdAccel::shortcut(TDEStdAccel::New), this, * TQT_SLOT(fileNew()), actionCollection()); * \endcode * * You could drop that and replace it with: * * \code - * KAction *newAct = KStdAction::openNew(this, TQT_SLOT(fileNew()), + * TDEAction *newAct = KStdAction::openNew(this, TQT_SLOT(fileNew()), * actionCollection()); * \endcode * @@ -97,7 +97,7 @@ class KToggleFullScreenAction; * could do it the hard way: * * \code - * KAction *cut = actionCollection()->action(KStdAction::stdName(KStdAction::Cut)); + * TDEAction *cut = actionCollection()->action(KStdAction::stdName(KStdAction::Cut)); * \endcode * * Another non-standard usage concerns instantiating the action in the @@ -165,22 +165,22 @@ namespace KStdAction * Creates an action corresponding to the * KStdAction::StdAction enum. */ - TDEUI_EXPORT KAction* create( StdAction id, const char *name, + TDEUI_EXPORT TDEAction* create( StdAction id, const char *name, const TQObject *recvr, const char *slot, - KActionCollection* parent ); + TDEActionCollection* parent ); - inline KAction* create( StdAction id, + inline TDEAction* create( StdAction id, const TQObject *recvr, const char *slot, - KActionCollection* parent ) + TDEActionCollection* parent ) { return KStdAction::create( id, 0, recvr, slot, parent ); } /** * @obsolete. Creates an action corresponding to the * KStdAction::StdAction enum. */ - inline KAction *action(StdAction act_enum, + inline TDEAction *action(StdAction act_enum, const TQObject *recvr, const char *slot, - KActionCollection *parent, const char *name = 0L ) + TDEActionCollection *parent, const char *name = 0L ) { return KStdAction::create( act_enum, name, recvr, slot, parent ); } /** @@ -192,7 +192,7 @@ namespace KStdAction inline const char* stdName(StdAction act_enum) { return name( act_enum ); } /** - * Returns a list of all standard names. Used by KAccelManager + * Returns a list of all standard names. Used by TDEAccelManager * to give those heigher weight. * @since 3.1 */ @@ -201,12 +201,12 @@ namespace KStdAction /** * Create a new document or window. */ - TDEUI_EXPORT KAction *openNew(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *openNew(const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name = 0 ); /** * Open an existing file. */ - TDEUI_EXPORT KAction *open(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *open(const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name = 0 ); /** * Open a recently used document. The signature of the slot being called @@ -217,87 +217,87 @@ namespace KStdAction * @param parent parent widget * @param name name of widget */ - TDEUI_EXPORT KRecentFilesAction *openRecent(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDERecentFilesAction *openRecent(const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name = 0 ); /** * Save the current document. */ - TDEUI_EXPORT KAction *save(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *save(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Save the current document under a different name. */ - TDEUI_EXPORT KAction *saveAs(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *saveAs(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Revert the current document to the last saved version * (essentially will undo all changes). */ - TDEUI_EXPORT KAction *revert(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *revert(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Close the current document. */ - TDEUI_EXPORT KAction *close(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *close(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Print the current document. */ - TDEUI_EXPORT KAction *print(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *print(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Show a print preview of the current document. */ - TDEUI_EXPORT KAction *printPreview(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *printPreview(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Mail this document. */ - TDEUI_EXPORT KAction *mail(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *mail(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Quit the program. */ - TDEUI_EXPORT KAction *quit(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *quit(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Undo the last operation. */ - TDEUI_EXPORT KAction *undo(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *undo(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Redo the last operation. */ - TDEUI_EXPORT KAction *redo(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *redo(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Cut selected area and store it in the clipboard. */ - TDEUI_EXPORT KAction *cut(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *cut(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Copy the selected area into the clipboard. */ - TDEUI_EXPORT KAction *copy(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *copy(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Paste the contents of clipboard at the current mouse or cursor * position. */ - TDEUI_EXPORT KAction *paste(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *paste(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Paste the contents of clipboard at the current mouse or cursor @@ -305,228 +305,228 @@ namespace KStdAction * menu if Klipper is running. * @since 3.2 */ - TDEUI_EXPORT KAction *pasteText(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *pasteText(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Clear the content of the focus widget * @since 3.2 */ - TDEUI_EXPORT KAction *clear(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *clear(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Select all elements in the current document. */ - TDEUI_EXPORT KAction *selectAll(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *selectAll(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Deselect any selected elements in the current document. */ - TDEUI_EXPORT KAction *deselect(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *deselect(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Initiate a 'find' request in the current document. */ - TDEUI_EXPORT KAction *find(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *find(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Find the next instance of a stored 'find'. */ - TDEUI_EXPORT KAction *findNext(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *findNext(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Find a previous instance of a stored 'find'. */ - TDEUI_EXPORT KAction *findPrev(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *findPrev(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Find and replace matches. */ - TDEUI_EXPORT KAction *replace(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *replace(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * View the document at its actual size. */ - TDEUI_EXPORT KAction *actualSize(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *actualSize(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Fit the document view to the size of the current window. */ - TDEUI_EXPORT KAction *fitToPage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *fitToPage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Fit the document view to the width of the current window. */ - TDEUI_EXPORT KAction *fitToWidth(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *fitToWidth(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Fit the document view to the height of the current window. */ - TDEUI_EXPORT KAction *fitToHeight(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *fitToHeight(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Zoom in. */ - TDEUI_EXPORT KAction *zoomIn(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *zoomIn(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Zoom out. */ - TDEUI_EXPORT KAction *zoomOut(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *zoomOut(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Popup a zoom dialog. */ - TDEUI_EXPORT KAction *zoom(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *zoom(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Redisplay or redraw the document. */ - TDEUI_EXPORT KAction *redisplay(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *redisplay(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Move up (web style menu). */ - TDEUI_EXPORT KAction *up(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *up(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Move back (web style menu). */ - TDEUI_EXPORT KAction *back(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *back(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Move forward (web style menu). */ - TDEUI_EXPORT KAction *forward(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *forward(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Go to the "Home" position or document. */ - TDEUI_EXPORT KAction *home(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *home(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Scroll up one page. */ - TDEUI_EXPORT KAction *prior(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *prior(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Scroll down one page. */ - TDEUI_EXPORT KAction *next(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *next(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Go to somewhere in general. */ - TDEUI_EXPORT KAction *goTo(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *goTo(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Go to a specific page (dialog). */ - TDEUI_EXPORT KAction *gotoPage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *gotoPage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Go to a specific line (dialog). */ - TDEUI_EXPORT KAction *gotoLine(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *gotoLine(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Jump to the first page. */ - TDEUI_EXPORT KAction *firstPage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *firstPage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Jump to the last page. */ - TDEUI_EXPORT KAction *lastPage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *lastPage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Add the current page to the bookmarks tree. */ - TDEUI_EXPORT KAction *addBookmark(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *addBookmark(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Edit the application bookmarks. */ - TDEUI_EXPORT KAction *editBookmarks(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *editBookmarks(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Pop up the spell checker. */ - TDEUI_EXPORT KAction *spelling(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *spelling(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Show/Hide the menubar. */ - TDEUI_EXPORT KToggleAction *showMenubar(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEToggleAction *showMenubar(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * @obsolete. toolbar actions are created automatically now in the * Settings menu. Don't use this anymore. - * See: KMainWindow::createStandardStatusBarAction() + * See: TDEMainWindow::createStandardStatusBarAction() * Show/Hide the primary toolbar. * @since 3.1 */ - TDEUI_EXPORT KToggleAction *showToolbar(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; + TDEUI_EXPORT TDEToggleAction *showToolbar(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; /** * @obsolete. toolbar actions are created automatically now in the * Settings menu. Don't use this anymore. - * See: KMainWindow::setStandardToolBarMenuEnabled(bool); + * See: TDEMainWindow::setStandardToolBarMenuEnabled(bool); * Show/Hide the primary toolbar. */ - TDEUI_EXPORT KToggleToolBarAction *showToolbar(const char* toolBarName, - KActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; + TDEUI_EXPORT TDEToggleToolBarAction *showToolbar(const char* toolBarName, + TDEActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; /** * Show/Hide the statusbar. */ - TDEUI_EXPORT KToggleAction *showStatusbar(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEToggleAction *showStatusbar(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Switch to/from full screen mode * @since 3.2 */ - TDEUI_EXPORT KToggleFullScreenAction *fullScreen(const TQObject *recvr, const char *slot, - KActionCollection* parent, TQWidget* window, const char *name = 0 ); + TDEUI_EXPORT TDEToggleFullScreenAction *fullScreen(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, TQWidget* window, const char *name = 0 ); /** * Display the save options dialog. */ - TDEUI_EXPORT KAction *saveOptions(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *saveOptions(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the configure key bindings dialog. @@ -534,81 +534,81 @@ namespace KStdAction * Note that you might be able to use the pre-built KXMLGUIFactory's fuction: * KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); */ - TDEUI_EXPORT KAction *keyBindings(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *keyBindings(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the preferences/options dialog. */ - TDEUI_EXPORT KAction *preferences(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *preferences(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * The Customize Toolbar dialog. */ - TDEUI_EXPORT KAction *configureToolbars(const TQObject *recvr, + TDEUI_EXPORT TDEAction *configureToolbars(const TQObject *recvr, const char *slot, - KActionCollection* parent, + TDEActionCollection* parent, const char *name = 0 ); /** * The Configure Notifications dialog. * @since 3.1 */ - TDEUI_EXPORT KAction *configureNotifications(const TQObject *recvr, + TDEUI_EXPORT TDEAction *configureNotifications(const TQObject *recvr, const char *slot, - KActionCollection *parent, + TDEActionCollection *parent, const char *name = 0); /** * Display the help. */ - TDEUI_EXPORT KAction *help(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *help(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the help contents. */ - TDEUI_EXPORT KAction *helpContents(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *helpContents(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Trigger the What's This cursor. */ - TDEUI_EXPORT KAction *whatsThis(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *whatsThis(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display "Tip of the Day" * @since 3.1 */ - TDEUI_EXPORT KAction *tipOfDay(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *tipOfDay(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Open up the Report Bug dialog. */ - TDEUI_EXPORT KAction *reportBug(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *reportBug(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the application's About box. */ - TDEUI_EXPORT KAction *aboutApp(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *aboutApp(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the About KDE dialog. */ - TDEUI_EXPORT KAction *aboutKDE(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *aboutKDE(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display "Switch application language" dialog. * @since 3.5.8 */ - TDEUI_EXPORT KAction *switchApplicationLanguage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *switchApplicationLanguage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); } #endif // KSTDACTION_H diff --git a/tdeui/kstdaction_p.h b/tdeui/kstdaction_p.h index f7e649fa8..b99421d04 100644 --- a/tdeui/kstdaction_p.h +++ b/tdeui/kstdaction_p.h @@ -28,7 +28,7 @@ namespace KStdAction struct KStdActionInfo { StdAction id; - KStdAccel::StdAccel idAccel; + TDEStdAccel::StdAccel idAccel; const char* psName; const char* psLabel; const char* psWhatsThis; @@ -37,82 +37,82 @@ struct KStdActionInfo static const KStdActionInfo g_rgActionInfo[] = { - { New, KStdAccel::New, "file_new", I18N_NOOP("&New"), 0, "filenew" }, - { Open, KStdAccel::Open, "file_open", I18N_NOOP("&Open..."), 0, "fileopen" }, - { OpenRecent, KStdAccel::AccelNone, "file_open_recent", I18N_NOOP("Open &Recent"), 0, "fileopen" }, - { Save, KStdAccel::Save, "file_save", I18N_NOOP("&Save"), 0, "filesave" }, - { SaveAs, KStdAccel::AccelNone, "file_save_as", I18N_NOOP("Save &As..."), 0, "filesaveas" }, - { Revert, KStdAccel::AccelNone, "file_revert", I18N_NOOP("Re&vert"), 0, "revert" }, - { Close, KStdAccel::Close, "file_close", I18N_NOOP("&Close"), 0, "fileclose" }, - { Print, KStdAccel::Print, "file_print", I18N_NOOP("&Print..."), 0, "fileprint" }, - { PrintPreview, KStdAccel::AccelNone, "file_print_preview", I18N_NOOP("Print Previe&w..."), 0, "filequickprint" }, - { Mail, KStdAccel::AccelNone, "file_mail", I18N_NOOP("&Mail..."), 0, "mail_send" }, - { Quit, KStdAccel::Quit, "file_quit", I18N_NOOP("&Quit"), 0, "exit" }, - - { Undo, KStdAccel::Undo, "edit_undo", I18N_NOOP("&Undo"), 0, "undo" }, - { Redo, KStdAccel::Redo, "edit_redo", I18N_NOOP("Re&do"), 0, "redo" }, - { Cut, KStdAccel::Cut, "edit_cut", I18N_NOOP("Cu&t"), 0, "editcut" }, - { Copy, KStdAccel::Copy, "edit_copy", I18N_NOOP("&Copy"), 0, "editcopy" }, - { Paste, KStdAccel::Paste, "edit_paste", I18N_NOOP("&Paste"), 0, "editpaste" }, - { PasteText, KStdAccel::Paste, "edit_paste", I18N_NOOP("&Paste"), 0, "editpaste" }, - { Clear, KStdAccel::AccelNone, "edit_clear", I18N_NOOP("C&lear"), 0, "editclear" }, - { SelectAll, KStdAccel::SelectAll, "edit_select_all", I18N_NOOP("Select &All"), 0, 0 }, - { Deselect, KStdAccel::Deselect, "edit_deselect", I18N_NOOP("Dese&lect"), 0, 0 }, - { Find, KStdAccel::Find, "edit_find", I18N_NOOP("&Find..."), 0, "find" }, - { FindNext, KStdAccel::FindNext, "edit_find_next", I18N_NOOP("Find &Next"), 0, "next" }, + { New, TDEStdAccel::New, "file_new", I18N_NOOP("&New"), 0, "filenew" }, + { Open, TDEStdAccel::Open, "file_open", I18N_NOOP("&Open..."), 0, "fileopen" }, + { OpenRecent, TDEStdAccel::AccelNone, "file_open_recent", I18N_NOOP("Open &Recent"), 0, "fileopen" }, + { Save, TDEStdAccel::Save, "file_save", I18N_NOOP("&Save"), 0, "filesave" }, + { SaveAs, TDEStdAccel::AccelNone, "file_save_as", I18N_NOOP("Save &As..."), 0, "filesaveas" }, + { Revert, TDEStdAccel::AccelNone, "file_revert", I18N_NOOP("Re&vert"), 0, "revert" }, + { Close, TDEStdAccel::Close, "file_close", I18N_NOOP("&Close"), 0, "fileclose" }, + { Print, TDEStdAccel::Print, "file_print", I18N_NOOP("&Print..."), 0, "fileprint" }, + { PrintPreview, TDEStdAccel::AccelNone, "file_print_preview", I18N_NOOP("Print Previe&w..."), 0, "filequickprint" }, + { Mail, TDEStdAccel::AccelNone, "file_mail", I18N_NOOP("&Mail..."), 0, "mail_send" }, + { Quit, TDEStdAccel::Quit, "file_quit", I18N_NOOP("&Quit"), 0, "exit" }, + + { Undo, TDEStdAccel::Undo, "edit_undo", I18N_NOOP("&Undo"), 0, "undo" }, + { Redo, TDEStdAccel::Redo, "edit_redo", I18N_NOOP("Re&do"), 0, "redo" }, + { Cut, TDEStdAccel::Cut, "edit_cut", I18N_NOOP("Cu&t"), 0, "editcut" }, + { Copy, TDEStdAccel::Copy, "edit_copy", I18N_NOOP("&Copy"), 0, "editcopy" }, + { Paste, TDEStdAccel::Paste, "edit_paste", I18N_NOOP("&Paste"), 0, "editpaste" }, + { PasteText, TDEStdAccel::Paste, "edit_paste", I18N_NOOP("&Paste"), 0, "editpaste" }, + { Clear, TDEStdAccel::AccelNone, "edit_clear", I18N_NOOP("C&lear"), 0, "editclear" }, + { SelectAll, TDEStdAccel::SelectAll, "edit_select_all", I18N_NOOP("Select &All"), 0, 0 }, + { Deselect, TDEStdAccel::Deselect, "edit_deselect", I18N_NOOP("Dese&lect"), 0, 0 }, + { Find, TDEStdAccel::Find, "edit_find", I18N_NOOP("&Find..."), 0, "find" }, + { FindNext, TDEStdAccel::FindNext, "edit_find_next", I18N_NOOP("Find &Next"), 0, "next" }, // FIXME: rename edit_find_last to edit_find_prev for KDE 4 - { FindPrev, KStdAccel::FindPrev, "edit_find_last", I18N_NOOP("Find Pre&vious"), 0, "previous" }, - { Replace, KStdAccel::Replace, "edit_replace", I18N_NOOP("&Replace..."), 0, 0 }, - - { ActualSize, KStdAccel::AccelNone, "view_actual_size", I18N_NOOP("&Actual Size"), 0, "viewmag1" }, - { FitToPage, KStdAccel::AccelNone, "view_fit_to_page", I18N_NOOP("&Fit to Page"), 0, "view_fit_window" }, - { FitToWidth, KStdAccel::AccelNone, "view_fit_to_width", I18N_NOOP("Fit to Page &Width"), 0, "view_fit_width" }, - { FitToHeight, KStdAccel::AccelNone, "view_fit_to_height", I18N_NOOP("Fit to Page &Height"), 0, "view_fit_height" }, - { ZoomIn, KStdAccel::ZoomIn, "view_zoom_in", I18N_NOOP("Zoom &In"), 0, "viewmag+" }, - { ZoomOut, KStdAccel::ZoomOut, "view_zoom_out", I18N_NOOP("Zoom &Out"), 0, "viewmag-" }, - { Zoom, KStdAccel::AccelNone, "view_zoom", I18N_NOOP("&Zoom..."), 0, "viewmag" }, - // KDE4: give Redisplay the shortcut KStdAccel::AccelReload - { Redisplay, KStdAccel::AccelNone, "view_redisplay", I18N_NOOP("&Redisplay"), 0, "reload" }, - - { Up, KStdAccel::Up, "go_up", I18N_NOOP("&Up"), 0, "up" }, + { FindPrev, TDEStdAccel::FindPrev, "edit_find_last", I18N_NOOP("Find Pre&vious"), 0, "previous" }, + { Replace, TDEStdAccel::Replace, "edit_replace", I18N_NOOP("&Replace..."), 0, 0 }, + + { ActualSize, TDEStdAccel::AccelNone, "view_actual_size", I18N_NOOP("&Actual Size"), 0, "viewmag1" }, + { FitToPage, TDEStdAccel::AccelNone, "view_fit_to_page", I18N_NOOP("&Fit to Page"), 0, "view_fit_window" }, + { FitToWidth, TDEStdAccel::AccelNone, "view_fit_to_width", I18N_NOOP("Fit to Page &Width"), 0, "view_fit_width" }, + { FitToHeight, TDEStdAccel::AccelNone, "view_fit_to_height", I18N_NOOP("Fit to Page &Height"), 0, "view_fit_height" }, + { ZoomIn, TDEStdAccel::ZoomIn, "view_zoom_in", I18N_NOOP("Zoom &In"), 0, "viewmag+" }, + { ZoomOut, TDEStdAccel::ZoomOut, "view_zoom_out", I18N_NOOP("Zoom &Out"), 0, "viewmag-" }, + { Zoom, TDEStdAccel::AccelNone, "view_zoom", I18N_NOOP("&Zoom..."), 0, "viewmag" }, + // KDE4: give Redisplay the shortcut TDEStdAccel::AccelReload + { Redisplay, TDEStdAccel::AccelNone, "view_redisplay", I18N_NOOP("&Redisplay"), 0, "reload" }, + + { Up, TDEStdAccel::Up, "go_up", I18N_NOOP("&Up"), 0, "up" }, // The following three have special i18n() needs for sLabel - { Back, KStdAccel::Back, "go_back", 0, 0, "back" }, - { Forward, KStdAccel::Forward, "go_forward", 0, 0, "forward" }, - { Home, KStdAccel::Home, "go_home", 0, 0, "gohome" }, - { Prior, KStdAccel::Prior, "go_previous", I18N_NOOP("&Previous Page"), 0, "back" }, - { Next, KStdAccel::Next, "go_next", I18N_NOOP("&Next Page"), 0, "forward" }, - { Goto, KStdAccel::AccelNone, "go_goto", I18N_NOOP("&Go To..."), 0, 0 }, - { GotoPage, KStdAccel::AccelNone, "go_goto_page", I18N_NOOP("&Go to Page..."), 0, "goto" }, - { GotoLine, KStdAccel::GotoLine, "go_goto_line", I18N_NOOP("&Go to Line..."), 0, 0 }, - { FirstPage, KStdAccel::Home, "go_first", I18N_NOOP("&First Page"), 0, "start" }, - { LastPage, KStdAccel::End, "go_last", I18N_NOOP("&Last Page"), 0, "finish" }, - - { AddBookmark, KStdAccel::AddBookmark, "bookmark_add", I18N_NOOP("&Add Bookmark"), 0, "bookmark_add" }, - { EditBookmarks, KStdAccel::AccelNone, "bookmark_edit", I18N_NOOP("&Edit Bookmarks"), 0, "bookmark" }, - - { Spelling, KStdAccel::AccelNone, "tools_spelling", I18N_NOOP("&Spelling..."), 0, "spellcheck" }, - - { ShowMenubar, KStdAccel::ShowMenubar, "options_show_menubar", I18N_NOOP("Show &Menubar"), 0, "showmenu" }, - { ShowToolbar, KStdAccel::AccelNone, "options_show_toolbar", I18N_NOOP("Show &Toolbar"), 0, 0 }, - { ShowStatusbar, KStdAccel::AccelNone, "options_show_statusbar", I18N_NOOP("Show St&atusbar"), 0, 0 }, - { FullScreen, KStdAccel::FullScreen, "fullscreen", I18N_NOOP("F&ull Screen Mode"), 0, "window_fullscreen" }, - { SaveOptions, KStdAccel::AccelNone, "options_save_options", I18N_NOOP("&Save Settings"), 0, 0 }, - { KeyBindings, KStdAccel::AccelNone, "options_configure_keybinding", I18N_NOOP("Configure S&hortcuts..."), 0,"configure_shortcuts" }, - { Preferences, KStdAccel::AccelNone, "options_configure", I18N_NOOP("&Configure %1..."), 0, "configure" }, - { ConfigureToolbars, KStdAccel::AccelNone, "options_configure_toolbars", I18N_NOOP("Configure Tool&bars..."), 0,"configure_toolbars" }, - { ConfigureNotifications, KStdAccel::AccelNone, "options_configure_notifications", I18N_NOOP("Configure &Notifications..."), 0, "knotify" }, + { Back, TDEStdAccel::Back, "go_back", 0, 0, "back" }, + { Forward, TDEStdAccel::Forward, "go_forward", 0, 0, "forward" }, + { Home, TDEStdAccel::Home, "go_home", 0, 0, "gohome" }, + { Prior, TDEStdAccel::Prior, "go_previous", I18N_NOOP("&Previous Page"), 0, "back" }, + { Next, TDEStdAccel::Next, "go_next", I18N_NOOP("&Next Page"), 0, "forward" }, + { Goto, TDEStdAccel::AccelNone, "go_goto", I18N_NOOP("&Go To..."), 0, 0 }, + { GotoPage, TDEStdAccel::AccelNone, "go_goto_page", I18N_NOOP("&Go to Page..."), 0, "goto" }, + { GotoLine, TDEStdAccel::GotoLine, "go_goto_line", I18N_NOOP("&Go to Line..."), 0, 0 }, + { FirstPage, TDEStdAccel::Home, "go_first", I18N_NOOP("&First Page"), 0, "start" }, + { LastPage, TDEStdAccel::End, "go_last", I18N_NOOP("&Last Page"), 0, "finish" }, + + { AddBookmark, TDEStdAccel::AddBookmark, "bookmark_add", I18N_NOOP("&Add Bookmark"), 0, "bookmark_add" }, + { EditBookmarks, TDEStdAccel::AccelNone, "bookmark_edit", I18N_NOOP("&Edit Bookmarks"), 0, "bookmark" }, + + { Spelling, TDEStdAccel::AccelNone, "tools_spelling", I18N_NOOP("&Spelling..."), 0, "spellcheck" }, + + { ShowMenubar, TDEStdAccel::ShowMenubar, "options_show_menubar", I18N_NOOP("Show &Menubar"), 0, "showmenu" }, + { ShowToolbar, TDEStdAccel::AccelNone, "options_show_toolbar", I18N_NOOP("Show &Toolbar"), 0, 0 }, + { ShowStatusbar, TDEStdAccel::AccelNone, "options_show_statusbar", I18N_NOOP("Show St&atusbar"), 0, 0 }, + { FullScreen, TDEStdAccel::FullScreen, "fullscreen", I18N_NOOP("F&ull Screen Mode"), 0, "window_fullscreen" }, + { SaveOptions, TDEStdAccel::AccelNone, "options_save_options", I18N_NOOP("&Save Settings"), 0, 0 }, + { KeyBindings, TDEStdAccel::AccelNone, "options_configure_keybinding", I18N_NOOP("Configure S&hortcuts..."), 0,"configure_shortcuts" }, + { Preferences, TDEStdAccel::AccelNone, "options_configure", I18N_NOOP("&Configure %1..."), 0, "configure" }, + { ConfigureToolbars, TDEStdAccel::AccelNone, "options_configure_toolbars", I18N_NOOP("Configure Tool&bars..."), 0,"configure_toolbars" }, + { ConfigureNotifications, TDEStdAccel::AccelNone, "options_configure_notifications", I18N_NOOP("Configure &Notifications..."), 0, "knotify" }, // the idea here is that Contents is used in menus, and Help in dialogs, so both share the same // shortcut - { Help, KStdAccel::Help, "help", 0, 0, "help" }, - { HelpContents, KStdAccel::Help, "help_contents", I18N_NOOP("%1 &Handbook"), 0, "contents" }, - { WhatsThis, KStdAccel::WhatsThis, "help_whats_this", I18N_NOOP("What's &This?"), 0, "contexthelp" }, - { TipofDay, KStdAccel::AccelNone, "help_show_tip", I18N_NOOP("Tip of the &Day"), 0, "idea" }, - { ReportBug, KStdAccel::AccelNone, "help_report_bug", I18N_NOOP("&Report Bug/Request Enhancement..."), 0, 0 }, - { SwitchApplicationLanguage, KStdAccel::AccelNone, "switch_application_language", I18N_NOOP("Switch application &language..."), 0, 0 }, - { AboutApp, KStdAccel::AccelNone, "help_about_app", I18N_NOOP("&About %1"), 0, 0 }, - { AboutKDE, KStdAccel::AccelNone, "help_about_kde", I18N_NOOP("About &Trinity"), 0,"about_kde" }, - { ActionNone, KStdAccel::AccelNone, 0, 0, 0, 0 } + { Help, TDEStdAccel::Help, "help", 0, 0, "help" }, + { HelpContents, TDEStdAccel::Help, "help_contents", I18N_NOOP("%1 &Handbook"), 0, "contents" }, + { WhatsThis, TDEStdAccel::WhatsThis, "help_whats_this", I18N_NOOP("What's &This?"), 0, "contexthelp" }, + { TipofDay, TDEStdAccel::AccelNone, "help_show_tip", I18N_NOOP("Tip of the &Day"), 0, "idea" }, + { ReportBug, TDEStdAccel::AccelNone, "help_report_bug", I18N_NOOP("&Report Bug/Request Enhancement..."), 0, 0 }, + { SwitchApplicationLanguage, TDEStdAccel::AccelNone, "switch_application_language", I18N_NOOP("Switch application &language..."), 0, 0 }, + { AboutApp, TDEStdAccel::AccelNone, "help_about_app", I18N_NOOP("&About %1"), 0, 0 }, + { AboutKDE, TDEStdAccel::AccelNone, "help_about_kde", I18N_NOOP("About &Trinity"), 0,"about_kde" }, + { ActionNone, TDEStdAccel::AccelNone, 0, 0, 0, 0 } }; inline const KStdActionInfo* infoPtr( StdAction id ) diff --git a/tdeui/ksystemtray.cpp b/tdeui/ksystemtray.cpp index 3b68d583a..83cb0e024 100644 --- a/tdeui/ksystemtray.cpp +++ b/tdeui/ksystemtray.cpp @@ -54,7 +54,7 @@ public: delete actionCollection; } - KActionCollection* actionCollection; + TDEActionCollection* actionCollection; bool on_all_desktops; // valid only when the parent widget was hidden }; @@ -66,7 +66,7 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) #endif d = new KSystemTrayPrivate; - d->actionCollection = new KActionCollection(this); + d->actionCollection = new TDEActionCollection(this); #ifdef Q_WS_X11 KWin::setSystemTrayWindowFor( winId(), parent?parent->topLevelWidget()->winId(): tqt_xrootwin() ); @@ -74,14 +74,14 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) setBackgroundMode(X11ParentRelative); setBackgroundOrigin(WindowOrigin); hasQuit = 0; - menu = new KPopupMenu( this ); + menu = new TDEPopupMenu( this ); menu->insertTitle( kapp->miniIcon(), kapp->caption() ); move( -1000, -1000 ); KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(maybeQuit()), d->actionCollection); if (parentWidget()) { - new KAction(i18n("Minimize"), KShortcut(), + new TDEAction(i18n("Minimize"), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT( minimizeRestoreAction() ), d->actionCollection, "minimizeRestore"); #ifdef Q_WS_X11 @@ -112,7 +112,7 @@ void KSystemTray::showEvent( TQShowEvent * ) { if ( !hasQuit ) { menu->insertSeparator(); - KAction* action = d->actionCollection->action("minimizeRestore"); + TDEAction* action = d->actionCollection->action("minimizeRestore"); if (action) { @@ -136,7 +136,7 @@ void KSystemTray::enterEvent( TQEvent* e ) TQLabel::enterEvent( e ); } -KPopupMenu* KSystemTray::contextMenu() const +TDEPopupMenu* KSystemTray::contextMenu() const { return menu; } @@ -155,7 +155,7 @@ void KSystemTray::mousePressEvent( TQMouseEvent *e ) // fall through case Qt::RightButton: if ( parentWidget() ) { - KAction* action = d->actionCollection->action("minimizeRestore"); + TDEAction* action = d->actionCollection->action("minimizeRestore"); if ( parentWidget()->isVisible() ) action->setText( i18n("&Minimize") ); else @@ -175,7 +175,7 @@ void KSystemTray::mouseReleaseEvent( TQMouseEvent * ) } -void KSystemTray::contextMenuAboutToShow( KPopupMenu* ) +void KSystemTray::contextMenuAboutToShow( TDEPopupMenu* ) { } @@ -307,7 +307,7 @@ void KSystemTray::minimizeRestore( bool restore ) #endif } -KActionCollection* KSystemTray::actionCollection() +TDEActionCollection* KSystemTray::actionCollection() { return d->actionCollection; } diff --git a/tdeui/ksystemtray.h b/tdeui/ksystemtray.h index 151cf0166..711515985 100644 --- a/tdeui/ksystemtray.h +++ b/tdeui/ksystemtray.h @@ -21,8 +21,8 @@ #include #include -class KActionCollection; -class KPopupMenu; +class TDEActionCollection; +class TDEPopupMenu; class KSystemTrayPrivate; /** @@ -89,14 +89,14 @@ public: Access to the context menu. This makes it easy to add new items to it. */ - KPopupMenu* contextMenu() const; + TDEPopupMenu* contextMenu() const; /** Easy access to the actions in the context menu Currently includes KStdAction::Quit and minimizeRestore @since 3.1 */ - KActionCollection* actionCollection(); + TDEActionCollection* actionCollection(); /** * Changes the tray's icon. @@ -183,7 +183,7 @@ protected: Makes it easy to adjust some menu items right before the context menu becomes visible. */ - virtual void contextMenuAboutToShow( KPopupMenu* menu ); + virtual void contextMenuAboutToShow( TDEPopupMenu* menu ); /** Reimplemented for internal reasons. @@ -202,7 +202,7 @@ private slots: private: void activateOrHide(); void minimizeRestore( bool restore ); - KPopupMenu* menu; + TDEPopupMenu* menu; // minimizeRestoreId is no longer needed. remove in KDE 4.0 int minimizeRestoreId; uint hasQuit :1; diff --git a/tdeui/ktextedit.cpp b/tdeui/ktextedit.cpp index eac18058b..c78658cfc 100644 --- a/tdeui/ktextedit.cpp +++ b/tdeui/ktextedit.cpp @@ -75,44 +75,44 @@ void KTextEdit::keyPressEvent( TQKeyEvent *e ) { KKey key( e ); - if ( KStdAccel::copy().contains( key ) ) { + if ( TDEStdAccel::copy().contains( key ) ) { copy(); e->accept(); return; } - else if ( KStdAccel::paste().contains( key ) ) { + else if ( TDEStdAccel::paste().contains( key ) ) { paste(); e->accept(); return; } - else if ( KStdAccel::cut().contains( key ) ) { + else if ( TDEStdAccel::cut().contains( key ) ) { cut(); e->accept(); return; } - else if ( KStdAccel::undo().contains( key ) ) { + else if ( TDEStdAccel::undo().contains( key ) ) { undo(); e->accept(); return; } - else if ( KStdAccel::redo().contains( key ) ) { + else if ( TDEStdAccel::redo().contains( key ) ) { redo(); e->accept(); return; } - else if ( KStdAccel::deleteWordBack().contains( key ) ) + else if ( TDEStdAccel::deleteWordBack().contains( key ) ) { deleteWordBack(); e->accept(); return; } - else if ( KStdAccel::deleteWordForward().contains( key ) ) + else if ( TDEStdAccel::deleteWordForward().contains( key ) ) { deleteWordForward(); e->accept(); return; } - else if ( KStdAccel::backwardWord().contains( key ) ) + else if ( TDEStdAccel::backwardWord().contains( key ) ) { CursorAction action = MoveWordBackward; int para, index; @@ -123,7 +123,7 @@ void KTextEdit::keyPressEvent( TQKeyEvent *e ) e->accept(); return; } - else if ( KStdAccel::forwardWord().contains( key ) ) + else if ( TDEStdAccel::forwardWord().contains( key ) ) { CursorAction action = MoveWordForward; int para, index; @@ -134,43 +134,43 @@ void KTextEdit::keyPressEvent( TQKeyEvent *e ) e->accept(); return; } - else if ( KStdAccel::next().contains( key ) ) + else if ( TDEStdAccel::next().contains( key ) ) { moveCursor( MovePgDown, false ); e->accept(); return; } - else if ( KStdAccel::prior().contains( key ) ) + else if ( TDEStdAccel::prior().contains( key ) ) { moveCursor( MovePgUp, false ); e->accept(); return; } - else if ( KStdAccel::home().contains( key ) ) + else if ( TDEStdAccel::home().contains( key ) ) { moveCursor( MoveHome, false ); e->accept(); return; } - else if ( KStdAccel::end().contains( key ) ) + else if ( TDEStdAccel::end().contains( key ) ) { moveCursor( MoveEnd, false ); e->accept(); return; } - else if ( KStdAccel::beginningOfLine().contains( key ) ) + else if ( TDEStdAccel::beginningOfLine().contains( key ) ) { moveCursor( MoveLineStart, false ); e->accept(); return; } - else if ( KStdAccel::endOfLine().contains( key ) ) + else if ( TDEStdAccel::endOfLine().contains( key ) ) { moveCursor(MoveLineEnd, false); e->accept(); return; } - else if ( KStdAccel::pasteSelection().contains( key ) ) + else if ( TDEStdAccel::pasteSelection().contains( key ) ) { TQString text = TQApplication::clipboard()->text( TQClipboard::Selection); if ( !text.isEmpty() ) diff --git a/tdeui/ktimezonewidget.cpp b/tdeui/ktimezonewidget.cpp index 5db720a68..94c5d65ce 100644 --- a/tdeui/ktimezonewidget.cpp +++ b/tdeui/ktimezonewidget.cpp @@ -34,7 +34,7 @@ #define COLUMN_ZONE 3 KTimezoneWidget::KTimezoneWidget(TQWidget *parent, const char *name, KTimezones *db) : - KListView(parent, name), + TDEListView(parent, name), d(0) { // If the user did not provide a timezone database, we'll use the system default. @@ -115,7 +115,7 @@ void KTimezoneWidget::setSelected(const TQString &zone, bool selected) { if (listItem->text(COLUMN_ZONE) == zone) { - KListView::setSelected(listItem, selected); + TDEListView::setSelected(listItem, selected); // Ensure the selected item is visible as appropriate. listItem = selectedItem(); diff --git a/tdeui/ktimezonewidget.h b/tdeui/ktimezonewidget.h index 3400e256b..6d708e6f1 100644 --- a/tdeui/ktimezonewidget.h +++ b/tdeui/ktimezonewidget.h @@ -49,7 +49,7 @@ class KTimezoneWidgetPrivate; * \code * * m_timezones = new KTimezoneWidget(this, "Timezones", vcalendarTimezones); - * m_timezones->setSelectionModeExt(KListView::Multi); + * m_timezones->setSelectionModeExt(TDEListView::Multi); * ... * \endcode * @@ -57,7 +57,7 @@ class KTimezoneWidgetPrivate; * @since 3.5 */ class TDEUI_EXPORT KTimezoneWidget : - public KListView + public TDEListView { Q_OBJECT diff --git a/tdeui/ktoolbar.cpp b/tdeui/ktoolbar.cpp index 8c64dfdc6..71d182275 100644 --- a/tdeui/ktoolbar.cpp +++ b/tdeui/ktoolbar.cpp @@ -76,12 +76,12 @@ enum { CONTEXT_ICONSIZES = 50 // starting point for the icon size list, put everything else before }; -class KToolBarPrivate +class TDEToolBarPrivate { public: - KToolBarPrivate() { + TDEToolBarPrivate() { m_iconSize = 0; - m_iconText = KToolBar::IconOnly; + m_iconText = TDEToolBar::IconOnly; m_highlight = true; m_transparent = true; m_honorStyle = false; @@ -105,7 +105,7 @@ public: } int m_iconSize; - KToolBar::IconText m_iconText; + TDEToolBar::IconText m_iconText; bool m_highlight : 1; bool m_transparent : 1; bool m_honorStyle : 1; @@ -144,7 +144,7 @@ public: TQPtrList idleButtons; }; -KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, TQToolBar *parent, +TDEToolBarSeparator::TDEToolBarSeparator(Orientation o , bool l, TQToolBar *parent, const char* name ) :TQFrame( parent, name ), line( l ) { @@ -155,13 +155,13 @@ KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, TQToolBar *parent, setBackgroundOrigin( ParentOrigin ); } -void KToolBarSeparator::setOrientation( Orientation o ) +void TDEToolBarSeparator::setOrientation( Orientation o ) { orient = o; setFrameStyle( NoFrame ); } -void KToolBarSeparator::drawContents( TQPainter* p ) +void TDEToolBarSeparator::drawContents( TQPainter* p ) { if ( line ) { TQStyle::SFlags flags = TQStyle::Style_Default; @@ -176,23 +176,23 @@ void KToolBarSeparator::drawContents( TQPainter* p ) } } -void KToolBarSeparator::styleChange( TQStyle& ) +void TDEToolBarSeparator::styleChange( TQStyle& ) { setOrientation( orient ); } -TQSize KToolBarSeparator::sizeHint() const +TQSize TDEToolBarSeparator::sizeHint() const { int dim = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); return orientation() == Qt::Vertical ? TQSize( 0, dim ) : TQSize( dim, 0 ); } -TQSizePolicy KToolBarSeparator::sizePolicy() const +TQSizePolicy TDEToolBarSeparator::sizePolicy() const { return TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ); } -KToolBar::KToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig ) +TDEToolBar::TDEToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig ) : TQToolBar( TQString::fromLatin1( name ), tqt_dynamic_cast(parent), parent, false, @@ -201,7 +201,7 @@ KToolBar::KToolBar( TQWidget *parent, const char *name, bool honorStyle, bool re init( readConfig, honorStyle ); } -KToolBar::KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) +TDEToolBar::TDEToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) : TQToolBar( TQString::fromLatin1( name ), parentWindow, dock, newLine, name ? name : "mainToolBar") @@ -209,7 +209,7 @@ KToolBar::KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, init( readConfig, honorStyle ); } -KToolBar::KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) +TDEToolBar::TDEToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) : TQToolBar( TQString::fromLatin1( name ), parentWindow, dock, newLine, name ? name : "mainToolBar") @@ -217,15 +217,15 @@ KToolBar::KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine, co init( readConfig, honorStyle ); } -KToolBar::~KToolBar() +TDEToolBar::~TDEToolBar() { emit toolbarDestroyed(); delete d; } -void KToolBar::init( bool readConfig, bool honorStyle ) +void TDEToolBar::init( bool readConfig, bool honorStyle ) { - d = new KToolBarPrivate; + d = new TDEToolBarPrivate; setFullSize( true ); d->m_honorStyle = honorStyle; context = 0; @@ -254,10 +254,10 @@ void KToolBar::init( bool readConfig, bool honorStyle ) connect( this, TQT_SIGNAL(placeChanged(TQDockWindow::Place)), TQT_SLOT(rebuildLayout()) ); } -int KToolBar::insertButton(const TQString& icon, int id, bool enabled, +int TDEToolBar::insertButton(const TQString& icon, int id, bool enabled, const TQString& text, int index, TDEInstance *_instance ) { - KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text, _instance ); + TDEToolBarButton *button = new TDEToolBarButton( icon, id, this, 0, text, _instance ); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); @@ -266,11 +266,11 @@ int KToolBar::insertButton(const TQString& icon, int id, bool enabled, } -int KToolBar::insertButton(const TQString& icon, int id, const char *signal, +int TDEToolBar::insertButton(const TQString& icon, int id, const char *signal, const TQObject *receiver, const char *slot, bool enabled, const TQString& text, int index, TDEInstance *_instance ) { - KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text, _instance); + TDEToolBarButton *button = new TDEToolBarButton( icon, id, this, 0, text, _instance); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); connect( button, signal, receiver, slot ); @@ -279,10 +279,10 @@ int KToolBar::insertButton(const TQString& icon, int id, const char *signal, } -int KToolBar::insertButton(const TQPixmap& pixmap, int id, bool enabled, +int TDEToolBar::insertButton(const TQPixmap& pixmap, int id, bool enabled, const TQString& text, int index ) { - KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text); + TDEToolBarButton *button = new TDEToolBarButton( pixmap, id, this, 0, text); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); doConnections( button ); @@ -290,12 +290,12 @@ int KToolBar::insertButton(const TQPixmap& pixmap, int id, bool enabled, } -int KToolBar::insertButton(const TQPixmap& pixmap, int id, const char *signal, +int TDEToolBar::insertButton(const TQPixmap& pixmap, int id, const char *signal, const TQObject *receiver, const char *slot, bool enabled, const TQString& text, int index ) { - KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text); + TDEToolBarButton *button = new TDEToolBarButton( pixmap, id, this, 0, text); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); connect( button, signal, receiver, slot ); @@ -304,10 +304,10 @@ int KToolBar::insertButton(const TQPixmap& pixmap, int id, const char *signal, } -int KToolBar::insertButton(const TQString& icon, int id, TQPopupMenu *popup, +int TDEToolBar::insertButton(const TQString& icon, int id, TQPopupMenu *popup, bool enabled, const TQString &text, int index ) { - KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text ); + TDEToolBarButton *button = new TDEToolBarButton( icon, id, this, 0, text ); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); button->setPopup( popup ); @@ -316,10 +316,10 @@ int KToolBar::insertButton(const TQString& icon, int id, TQPopupMenu *popup, } -int KToolBar::insertButton(const TQPixmap& pixmap, int id, TQPopupMenu *popup, +int TDEToolBar::insertButton(const TQPixmap& pixmap, int id, TQPopupMenu *popup, bool enabled, const TQString &text, int index ) { - KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text ); + TDEToolBarButton *button = new TDEToolBarButton( pixmap, id, this, 0, text ); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); button->setPopup( popup ); @@ -328,7 +328,7 @@ int KToolBar::insertButton(const TQPixmap& pixmap, int id, TQPopupMenu *popup, } -int KToolBar::insertLined (const TQString& text, int id, +int TDEToolBar::insertLined (const TQString& text, int id, const char *signal, const TQObject *receiver, const char *slot, bool enabled , @@ -347,7 +347,7 @@ int KToolBar::insertLined (const TQString& text, int id, return index; } -int KToolBar::insertCombo (const TQStringList &list, int id, bool writable, +int TDEToolBar::insertCombo (const TQStringList &list, int id, bool writable, const char *signal, const TQObject *receiver, const char *slot, bool enabled, const TQString& tooltiptext, @@ -371,7 +371,7 @@ int KToolBar::insertCombo (const TQStringList &list, int id, bool writable, } -int KToolBar::insertCombo (const TQString& text, int id, bool writable, +int TDEToolBar::insertCombo (const TQString& text, int id, bool writable, const char *signal, TQObject *receiver, const char *slot, bool enabled, const TQString& tooltiptext, @@ -391,29 +391,29 @@ int KToolBar::insertCombo (const TQString& text, int id, bool writable, return index; } -int KToolBar::insertSeparator(int index, int id) +int TDEToolBar::insertSeparator(int index, int id) { - TQWidget *w = new KToolBarSeparator( orientation(), false, this, "tool bar separator" ); + TQWidget *w = new TDEToolBarSeparator( orientation(), false, this, "tool bar separator" ); insertWidgetInternal( w, index, id ); return index; } -int KToolBar::insertLineSeparator(int index, int id) +int TDEToolBar::insertLineSeparator(int index, int id) { - TQWidget *w = new KToolBarSeparator( orientation(), true, this, "tool bar separator" ); + TQWidget *w = new TDEToolBarSeparator( orientation(), true, this, "tool bar separator" ); insertWidgetInternal( w, index, id ); return index; } -int KToolBar::insertWidget(int id, int /*width*/, TQWidget *widget, int index) +int TDEToolBar::insertWidget(int id, int /*width*/, TQWidget *widget, int index) { removeWidgetInternal( widget ); // in case we already have it ? insertWidgetInternal( widget, index, id ); return index; } -int KToolBar::insertAnimatedWidget(int id, TQObject *receiver, const char *slot, +int TDEToolBar::insertAnimatedWidget(int id, TQObject *receiver, const char *slot, const TQString& icons, int index ) { KAnimWidget *anim = new KAnimWidget( icons, d->m_iconSize, this ); @@ -425,7 +425,7 @@ int KToolBar::insertAnimatedWidget(int id, TQObject *receiver, const char *slot, return index; } -KAnimWidget *KToolBar::animatedWidget( int id ) +KAnimWidget *TDEToolBar::animatedWidget( int id ) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) @@ -453,7 +453,7 @@ KAnimWidget *KToolBar::animatedWidget( int id ) } -void KToolBar::addConnection (int id, const char *signal, +void TDEToolBar::addConnection (int id, const char *signal, const TQObject *receiver, const char *slot) { TQWidget* w = getWidget( id ); @@ -461,7 +461,7 @@ void KToolBar::addConnection (int id, const char *signal, connect( w, signal, receiver, slot ); } -void KToolBar::setItemEnabled( int id, bool enabled ) +void TDEToolBar::setItemEnabled( int id, bool enabled ) { TQWidget* w = getWidget( id ); if ( w ) @@ -469,77 +469,77 @@ void KToolBar::setItemEnabled( int id, bool enabled ) } -void KToolBar::setButtonPixmap( int id, const TQPixmap& _pixmap ) +void TDEToolBar::setButtonPixmap( int id, const TQPixmap& _pixmap ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setPixmap( _pixmap ); } -void KToolBar::setButtonIcon( int id, const TQString& _icon ) +void TDEToolBar::setButtonIcon( int id, const TQString& _icon ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setIcon( _icon ); } -void KToolBar::setButtonIconSet( int id, const TQIconSet& iconset ) +void TDEToolBar::setButtonIconSet( int id, const TQIconSet& iconset ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setIconSet( iconset ); } -void KToolBar::setDelayedPopup (int id , TQPopupMenu *_popup, bool toggle ) +void TDEToolBar::setDelayedPopup (int id , TQPopupMenu *_popup, bool toggle ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setDelayedPopup( _popup, toggle ); } -void KToolBar::setAutoRepeat (int id, bool flag) +void TDEToolBar::setAutoRepeat (int id, bool flag) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setAutoRepeat( flag ); } -void KToolBar::setToggle (int id, bool flag ) +void TDEToolBar::setToggle (int id, bool flag ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setToggle( flag ); } -void KToolBar::toggleButton (int id) +void TDEToolBar::toggleButton (int id) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->toggle(); } -void KToolBar::setButton (int id, bool flag) +void TDEToolBar::setButton (int id, bool flag) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->on( flag ); } -bool KToolBar::isButtonOn (int id) const +bool TDEToolBar::isButtonOn (int id) const { - KToolBarButton * button = const_cast( this )->getButton( id ); + TDEToolBarButton * button = const_cast( this )->getButton( id ); return button ? button->isOn() : false; } -void KToolBar::setLinedText (int id, const TQString& text) +void TDEToolBar::setLinedText (int id, const TQString& text) { KLineEdit * lineEdit = getLined( id ); if ( lineEdit ) @@ -547,21 +547,21 @@ void KToolBar::setLinedText (int id, const TQString& text) } -TQString KToolBar::getLinedText (int id) const +TQString TDEToolBar::getLinedText (int id) const { - KLineEdit * lineEdit = const_cast( this )->getLined( id ); + KLineEdit * lineEdit = const_cast( this )->getLined( id ); return lineEdit ? lineEdit->text() : TQString::null; } -void KToolBar::insertComboItem (int id, const TQString& text, int index) +void TDEToolBar::insertComboItem (int id, const TQString& text, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) comboBox->insertItem( text, index ); } -void KToolBar::insertComboList (int id, const TQStringList &list, int index) +void TDEToolBar::insertComboList (int id, const TQStringList &list, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -569,7 +569,7 @@ void KToolBar::insertComboList (int id, const TQStringList &list, int index) } -void KToolBar::removeComboItem (int id, int index) +void TDEToolBar::removeComboItem (int id, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -577,7 +577,7 @@ void KToolBar::removeComboItem (int id, int index) } -void KToolBar::setCurrentComboItem (int id, int index) +void TDEToolBar::setCurrentComboItem (int id, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -585,7 +585,7 @@ void KToolBar::setCurrentComboItem (int id, int index) } -void KToolBar::changeComboItem (int id, const TQString& text, int index) +void TDEToolBar::changeComboItem (int id, const TQString& text, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -593,7 +593,7 @@ void KToolBar::changeComboItem (int id, const TQString& text, int index) } -void KToolBar::clearCombo (int id) +void TDEToolBar::clearCombo (int id) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -601,14 +601,14 @@ void KToolBar::clearCombo (int id) } -TQString KToolBar::getComboItem (int id, int index) const +TQString TDEToolBar::getComboItem (int id, int index) const { - KComboBox * comboBox = const_cast( this )->getCombo( id ); + KComboBox * comboBox = const_cast( this )->getCombo( id ); return comboBox ? comboBox->text( index ) : TQString::null; } -KComboBox * KToolBar::getCombo(int id) +KComboBox * TDEToolBar::getCombo(int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) @@ -617,7 +617,7 @@ KComboBox * KToolBar::getCombo(int id) } -KLineEdit * KToolBar::getLined (int id) +KLineEdit * TDEToolBar::getLined (int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) @@ -626,16 +626,16 @@ KLineEdit * KToolBar::getLined (int id) } -KToolBarButton * KToolBar::getButton (int id) +TDEToolBarButton * TDEToolBar::getButton (int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; - return tqt_dynamic_cast( *it ); + return tqt_dynamic_cast( *it ); } -void KToolBar::alignItemRight (int id, bool right ) +void TDEToolBar::alignItemRight (int id, bool right ) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) @@ -647,14 +647,14 @@ void KToolBar::alignItemRight (int id, bool right ) } -TQWidget *KToolBar::getWidget (int id) +TQWidget *TDEToolBar::getWidget (int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); return ( it == id2widget.end() ) ? 0 : (*it); } -void KToolBar::setItemAutoSized (int id, bool yes ) +void TDEToolBar::setItemAutoSized (int id, bool yes ) { TQWidget *w = getWidget(id); if ( w && yes ) @@ -662,7 +662,7 @@ void KToolBar::setItemAutoSized (int id, bool yes ) } -void KToolBar::clear () +void TDEToolBar::clear () { /* Delete any idle buttons, so TQToolBar doesn't delete them itself, making a mess */ for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next()) @@ -675,12 +675,12 @@ void KToolBar::clear () } -void KToolBar::removeItem(int id) +void TDEToolBar::removeItem(int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) { - kdDebug(220) << name() << " KToolBar::removeItem item " << id << " not found" << endl; + kdDebug(220) << name() << " TDEToolBar::removeItem item " << id << " not found" << endl; return; } TQWidget * w = (*it); @@ -691,12 +691,12 @@ void KToolBar::removeItem(int id) } -void KToolBar::removeItemDelayed(int id) +void TDEToolBar::removeItemDelayed(int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) { - kdDebug(220) << name() << " KToolBar::removeItem item " << id << " not found" << endl; + kdDebug(220) << name() << " TDEToolBar::removeItem item " << id << " not found" << endl; return; } TQWidget * w = (*it); @@ -710,7 +710,7 @@ void KToolBar::removeItemDelayed(int id) } -void KToolBar::hideItem (int id) +void TDEToolBar::hideItem (int id) { TQWidget *w = getWidget(id); if ( w ) @@ -718,7 +718,7 @@ void KToolBar::hideItem (int id) } -void KToolBar::showItem (int id) +void TDEToolBar::showItem (int id) { TQWidget *w = getWidget(id); if ( w ) @@ -726,38 +726,38 @@ void KToolBar::showItem (int id) } -int KToolBar::itemIndex (int id) +int TDEToolBar::itemIndex (int id) { TQWidget *w = getWidget(id); return w ? widgets.findRef(w) : -1; } -int KToolBar::idAt (int index) +int TDEToolBar::idAt (int index) { TQWidget *w = widgets.at(index); return widget2id[w]; } -void KToolBar::setFullSize(bool flag ) +void TDEToolBar::setFullSize(bool flag ) { setHorizontalStretchable( flag ); setVerticalStretchable( flag ); } -bool KToolBar::fullSize() const +bool TDEToolBar::fullSize() const { return isHorizontalStretchable() || isVerticalStretchable(); } -void KToolBar::enableMoving(bool flag ) +void TDEToolBar::enableMoving(bool flag ) { setMovingEnabled(flag); } -void KToolBar::setBarPos (BarPosition bpos) +void TDEToolBar::setBarPos (BarPosition bpos) { if ( !mainWindow() ) return; @@ -766,22 +766,22 @@ void KToolBar::setBarPos (BarPosition bpos) } -KToolBar::BarPosition KToolBar::barPos() const +TDEToolBar::BarPosition TDEToolBar::barPos() const { if ( !this->mainWindow() ) - return place() == TQDockWindow::InDock ? KToolBar::Top : KToolBar::Floating; + return place() == TQDockWindow::InDock ? TDEToolBar::Top : TDEToolBar::Floating; Dock dock; int dm1, dm2; bool dm3; this->mainWindow()->getLocation( (TQToolBar*)this, dock, dm1, dm3, dm2 ); if ( dock == DockUnmanaged ) { - return (KToolBar::BarPosition)DockTop; + return (TDEToolBar::BarPosition)DockTop; } return (BarPosition)dock; } -bool KToolBar::enable(BarStatus stat) +bool TDEToolBar::enable(BarStatus stat) { bool mystat = isVisible(); @@ -794,47 +794,47 @@ bool KToolBar::enable(BarStatus stat) } -void KToolBar::setMaxHeight ( int h ) +void TDEToolBar::setMaxHeight ( int h ) { setMaximumHeight( h ); } -int KToolBar::maxHeight() +int TDEToolBar::maxHeight() { return maximumHeight(); } -void KToolBar::setMaxWidth (int dw) +void TDEToolBar::setMaxWidth (int dw) { setMaximumWidth( dw ); } -int KToolBar::maxWidth() +int TDEToolBar::maxWidth() { return maximumWidth(); } -void KToolBar::setTitle (const TQString& _title) +void TDEToolBar::setTitle (const TQString& _title) { setLabel( _title ); } -void KToolBar::enableFloating (bool ) +void TDEToolBar::enableFloating (bool ) { } -void KToolBar::setIconText(IconText it) +void TDEToolBar::setIconText(IconText it) { setIconText( it, true ); } -void KToolBar::setIconText(IconText icontext, bool update) +void TDEToolBar::setIconText(IconText icontext, bool update) { bool doUpdate=false; @@ -865,18 +865,18 @@ void KToolBar::setIconText(IconText icontext, bool update) } -KToolBar::IconText KToolBar::iconText() const +TDEToolBar::IconText TDEToolBar::iconText() const { return d->m_iconText; } -void KToolBar::setIconSize(int size) +void TDEToolBar::setIconSize(int size) { setIconSize( size, true ); } -void KToolBar::setIconSize(int size, bool update) +void TDEToolBar::setIconSize(int size, bool update) { bool doUpdate=false; @@ -902,7 +902,7 @@ void KToolBar::setIconSize(int size, bool update) } } -int KToolBar::iconSize() const +int TDEToolBar::iconSize() const { if ( !d->m_iconSize ) // default value? return iconSizeDefault(); @@ -910,7 +910,7 @@ int KToolBar::iconSize() const return d->m_iconSize; } -int KToolBar::iconSizeDefault() const +int TDEToolBar::iconSizeDefault() const { if (!::qstrcmp(name(), "mainToolBar")) return TDEGlobal::iconLoader()->currentSize(KIcon::MainToolbar); @@ -918,27 +918,27 @@ int KToolBar::iconSizeDefault() const return TDEGlobal::iconLoader()->currentSize(KIcon::Toolbar); } -void KToolBar::setEnableContextMenu(bool enable ) +void TDEToolBar::setEnableContextMenu(bool enable ) { d->m_enableContext = enable; } -bool KToolBar::contextMenuEnabled() const +bool TDEToolBar::contextMenuEnabled() const { return d->m_enableContext; } -void KToolBar::setItemNoStyle(int id, bool no_style ) +void TDEToolBar::setItemNoStyle(int id, bool no_style ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if (button) button->setNoStyle( no_style ); } -void KToolBar::setFlat (bool flag) +void TDEToolBar::setFlat (bool flag) { if ( !mainWindow() ) return; @@ -947,19 +947,19 @@ void KToolBar::setFlat (bool flag) else mainWindow()->moveDockWindow( this, DockTop ); // And remember to save the new look later - KMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } -int KToolBar::count() const +int TDEToolBar::count() const { return id2widget.count(); } -void KToolBar::saveState() +void TDEToolBar::saveState() { // first, try to save to the xml file if ( d->m_xmlguiClient && !d->m_xmlguiClient->xmlFile().isEmpty() ) { @@ -1025,7 +1025,7 @@ void KToolBar::saveState() config->sync(); } -TQString KToolBar::settingsGroup() const +TQString TDEToolBar::settingsGroup() const { TQString configGroup; if (!::qstrcmp(name(), "unnamed") || !::qstrcmp(name(), "mainToolBar")) @@ -1040,7 +1040,7 @@ TQString KToolBar::settingsGroup() const return configGroup; } -void KToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup) +void TDEToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup) { TQString configGroup = _configGroup; if (configGroup.isEmpty()) @@ -1093,22 +1093,22 @@ void KToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup) // reappear at the same position the next time. // The whole set of indexes has to be saved. //kdDebug(220) << name() << " writing index " << index << endl; - KMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); // don't save if there's only one toolbar // Don't use kmw->toolBarIterator() because you might // mess up someone else's iterator. Make the list on your own - TQPtrList toolbarList; + TQPtrList toolbarList; TQPtrList lst; for ( int i = (int)TQMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) { lst = kmw->toolBars( (ToolBarDock)i ); for ( TQToolBar *tb = lst.first(); tb; tb = lst.next() ) { - if ( !tb->inherits( "KToolBar" ) ) + if ( !tb->inherits( "TDEToolBar" ) ) continue; - toolbarList.append( (KToolBar*)tb ); + toolbarList.append( (TDEToolBar*)tb ); } } - TQPtrListIterator toolbarIterator( toolbarList ); + TQPtrListIterator toolbarIterator( toolbarList ); if ( !kmw || toolbarIterator.count() > 1 ) config->writeEntry("Index", index); else @@ -1126,24 +1126,24 @@ void KToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup) } -void KToolBar::setXMLGUIClient( KXMLGUIClient *client ) +void TDEToolBar::setXMLGUIClient( KXMLGUIClient *client ) { d->m_xmlguiClient = client; } -void KToolBar::setText( const TQString & txt ) +void TDEToolBar::setText( const TQString & txt ) { setLabel( txt + " (" + kapp->caption() + ") " ); } -TQString KToolBar::text() const +TQString TDEToolBar::text() const { return label(); } -void KToolBar::doConnections( KToolBarButton *button ) +void TDEToolBar::doConnections( TDEToolBarButton *button ) { connect(button, TQT_SIGNAL(clicked(int)), this, TQT_SIGNAL( clicked( int ) ) ); connect(button, TQT_SIGNAL(doubleClicked(int)), this, TQT_SIGNAL( doubleClicked( int ) ) ); @@ -1153,14 +1153,14 @@ void KToolBar::doConnections( KToolBarButton *button ) connect(button, TQT_SIGNAL(highlighted(int, bool)), this, TQT_SIGNAL( highlighted( int, bool ) ) ); } -void KToolBar::mousePressEvent ( TQMouseEvent *m ) +void TDEToolBar::mousePressEvent ( TQMouseEvent *m ) { if ( !mainWindow() ) return; TQMainWindow *mw = mainWindow(); if ( mw->toolBarsMovable() && d->m_enableContext ) { if ( m->button() == Qt::RightButton ) { - TQGuardedPtr guard( this ); + TQGuardedPtr guard( this ); int i = contextMenu()->exec( m->globalPos(), 0 ); // "Configure Toolbars" recreates toolbars, so we might not exist anymore. if ( guard ) @@ -1204,14 +1204,14 @@ void KToolBar::mousePressEvent ( TQMouseEvent *m ) else return; // assume this was an action handled elsewhere, no need for setSettingsDirty() } - KMainWindow *kmw = tqt_dynamic_cast(mw); + TDEMainWindow *kmw = tqt_dynamic_cast(mw); if ( kmw ) kmw->setSettingsDirty(); } } } -void KToolBar::doModeChange() +void TDEToolBar::doModeChange() { for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next()) w->blockSignals(false); @@ -1220,7 +1220,7 @@ void KToolBar::doModeChange() emit modechange(); } -void KToolBar::rebuildLayout() +void TDEToolBar::rebuildLayout() { for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next()) w->blockSignals(false); @@ -1238,7 +1238,7 @@ void KToolBar::rebuildLayout() for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( w == rightAligned ) continue; - KToolBarSeparator *ktbs = tqt_dynamic_cast(w); + TDEToolBarSeparator *ktbs = tqt_dynamic_cast(w); if ( ktbs && !ktbs->showLine() ) { l->addSpacing( orientation() == Qt::Vertical ? w->sizeHint().height() : w->sizeHint().width() ); w->hide(); @@ -1267,7 +1267,7 @@ void KToolBar::rebuildLayout() TQApplication::postEvent( this, new TQEvent( TQEvent::LayoutHint ) ); } -void KToolBar::childEvent( TQChildEvent *e ) +void TDEToolBar::childEvent( TQChildEvent *e ) { if ( e->child()->isWidgetType() ) { TQWidget * w = tqt_dynamic_cast(e->child()); @@ -1304,7 +1304,7 @@ void KToolBar::childEvent( TQChildEvent *e ) TQToolBar::childEvent( e ); } -void KToolBar::insertWidgetInternal( TQWidget *w, int &index, int id ) +void TDEToolBar::insertWidgetInternal( TQWidget *w, int &index, int id ) { // we can't have it in widgets, or something is really wrong //widgets.removeRef( w ); @@ -1323,19 +1323,19 @@ void KToolBar::insertWidgetInternal( TQWidget *w, int &index, int id ) widget2id.insert( w, id ); } -void KToolBar::showEvent( TQShowEvent *e ) +void TDEToolBar::showEvent( TQShowEvent *e ) { TQToolBar::showEvent( e ); rebuildLayout(); } -void KToolBar::setStretchableWidget( TQWidget *w ) +void TDEToolBar::setStretchableWidget( TQWidget *w ) { TQToolBar::setStretchableWidget( w ); stretchableWidget = w; } -TQSizePolicy KToolBar::sizePolicy() const +TQSizePolicy TDEToolBar::sizePolicy() const { if ( orientation() == Qt::Horizontal ) return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); @@ -1343,18 +1343,18 @@ TQSizePolicy KToolBar::sizePolicy() const return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding ); } -TQSize KToolBar::sizeHint() const +TQSize TDEToolBar::sizeHint() const { TQSize minSize(0,0); - KToolBar *ncThis = const_cast(this); + TDEToolBar *ncThis = const_cast(this); ncThis->polish(); int margin = static_cast(ncThis)->layout()->margin() + frameWidth(); switch( barPos() ) { - case KToolBar::Top: - case KToolBar::Bottom: + case TDEToolBar::Top: + case TDEToolBar::Bottom: for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() ) { TQSize sh = w->sizeHint(); @@ -1375,8 +1375,8 @@ TQSize KToolBar::sizeHint() const minSize += TQSize(margin*2, margin*2); break; - case KToolBar::Left: - case KToolBar::Right: + case TDEToolBar::Left: + case TDEToolBar::Right: for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() ) { TQSize sh = w->sizeHint(); @@ -1401,32 +1401,32 @@ TQSize KToolBar::sizeHint() const return minSize; } -TQSize KToolBar::minimumSize() const +TQSize TDEToolBar::minimumSize() const { return minimumSizeHint(); } -TQSize KToolBar::minimumSizeHint() const +TQSize TDEToolBar::minimumSizeHint() const { return sizeHint(); } -bool KToolBar::highlight() const +bool TDEToolBar::highlight() const { return d->m_highlight; } -void KToolBar::hide() +void TDEToolBar::hide() { TQToolBar::hide(); } -void KToolBar::show() +void TDEToolBar::show() { TQToolBar::show(); } -void KToolBar::resizeEvent( TQResizeEvent *e ) +void TDEToolBar::resizeEvent( TQResizeEvent *e ) { bool b = isUpdatesEnabled(); setUpdatesEnabled( false ); @@ -1445,12 +1445,12 @@ void KToolBar::resizeEvent( TQResizeEvent *e ) } } // else { -// printf("[WARNING] In KToolBar::resizeEvent, but this code block should not be executing. Preventing toolbar lockup. [Code 0045]\n\r"); +// printf("[WARNING] In TDEToolBar::resizeEvent, but this code block should not be executing. Preventing toolbar lockup. [Code 0045]\n\r"); // setUpdatesEnabled( true ); // } } -void KToolBar::slotIconChanged(int group) +void TDEToolBar::slotIconChanged(int group) { if ((group != KIcon::Toolbar) && (group != KIcon::MainToolbar)) return; @@ -1463,7 +1463,7 @@ void KToolBar::slotIconChanged(int group) updateGeometry(); } -void KToolBar::slotReadConfig() +void TDEToolBar::slotReadConfig() { //kdDebug(220) << name() << " slotReadConfig" << endl; // Read appearance settings (hmm, we used to do both here, @@ -1472,19 +1472,19 @@ void KToolBar::slotReadConfig() applyAppearanceSettings(TDEGlobal::config(), TQString::null ); } -void KToolBar::slotAppearanceChanged() +void TDEToolBar::slotAppearanceChanged() { // Read appearance settings from global file. applyAppearanceSettings(TDEGlobal::config(), TQString::null, true /* lose local settings */ ); // And remember to save the new look later - KMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } //static -bool KToolBar::highlightSetting() +bool TDEToolBar::highlightSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); @@ -1492,7 +1492,7 @@ bool KToolBar::highlightSetting() } //static -bool KToolBar::transparentSetting() +bool TDEToolBar::transparentSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); @@ -1500,7 +1500,7 @@ bool KToolBar::transparentSetting() } //static -KToolBar::IconText KToolBar::iconTextSetting() +TDEToolBar::IconText TDEToolBar::iconTextSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); @@ -1515,7 +1515,7 @@ KToolBar::IconText KToolBar::iconTextSetting() return IconOnly; } -void KToolBar::applyAppearanceSettings(TDEConfig *config, const TQString &_configGroup, bool forceGlobal) +void TDEToolBar::applyAppearanceSettings(TDEConfig *config, const TQString &_configGroup, bool forceGlobal) { TQString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup; //kdDebug(220) << name() << " applyAppearanceSettings: configGroup=" << configGroup << " forceGlobal=" << forceGlobal << endl; @@ -1637,12 +1637,12 @@ void KToolBar::applyAppearanceSettings(TDEConfig *config, const TQString &_confi updateGeometry(); } -void KToolBar::applySettings(TDEConfig *config, const TQString &_configGroup) +void TDEToolBar::applySettings(TDEConfig *config, const TQString &_configGroup) { return applySettings(config,_configGroup,false); } -void KToolBar::applySettings(TDEConfig *config, const TQString &_configGroup, bool force) +void TDEToolBar::applySettings(TDEConfig *config, const TQString &_configGroup, bool force) { //kdDebug(220) << name() << " applySettings group=" << _configGroup << endl; @@ -1705,7 +1705,7 @@ void KToolBar::applySettings(TDEConfig *config, const TQString &_configGroup, bo if ( mainWindow() ) { //kdDebug(220) << name() << " applySettings updating ToolbarInfo" << endl; - d->toolBarInfo = KToolBarPrivate::ToolBarInfo( pos, index, newLine, offset ); + d->toolBarInfo = TDEToolBarPrivate::ToolBarInfo( pos, index, newLine, offset ); positionYourself( true ); } if (isVisible ()) @@ -1713,7 +1713,7 @@ void KToolBar::applySettings(TDEConfig *config, const TQString &_configGroup, bo } } -bool KToolBar::event( TQEvent *e ) +bool TDEToolBar::event( TQEvent *e ) { if ( (e->type() == TQEvent::LayoutHint) && isUpdatesEnabled() ) d->repaintTimer.start( 100, true ); @@ -1730,7 +1730,7 @@ bool KToolBar::event( TQEvent *e ) return TQToolBar::event( e ); } -void KToolBar::slotRepaint() +void TDEToolBar::slotRepaint() { setUpdatesEnabled( false ); // Send a resizeEvent to update the "toolbar extension arrow" @@ -1743,40 +1743,40 @@ void KToolBar::slotRepaint() repaint( true ); } -void KToolBar::toolBarPosChanged( TQToolBar *tb ) +void TDEToolBar::toolBarPosChanged( TQToolBar *tb ) { if ( tb != this ) return; if ( d->oldPos == DockMinimized ) rebuildLayout(); d->oldPos = (TQMainWindow::ToolBarDock)barPos(); - KMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } -static KToolBar::Dock stringToDock( const TQString& attrPosition ) +static TDEToolBar::Dock stringToDock( const TQString& attrPosition ) { - KToolBar::Dock dock = KToolBar::DockTop; + TDEToolBar::Dock dock = TDEToolBar::DockTop; if ( !attrPosition.isEmpty() ) { if ( attrPosition == "top" ) - dock = KToolBar::DockTop; + dock = TDEToolBar::DockTop; else if ( attrPosition == "left" ) - dock = KToolBar::DockLeft; + dock = TDEToolBar::DockLeft; else if ( attrPosition == "right" ) - dock = KToolBar::DockRight; + dock = TDEToolBar::DockRight; else if ( attrPosition == "bottom" ) - dock = KToolBar::DockBottom; + dock = TDEToolBar::DockBottom; else if ( attrPosition == "floating" ) - dock = KToolBar::DockTornOff; + dock = TDEToolBar::DockTornOff; else if ( attrPosition == "flat" ) - dock = KToolBar::DockMinimized; + dock = TDEToolBar::DockMinimized; } return dock; } -void KToolBar::loadState( const TQDomElement &element ) +void TDEToolBar::loadState( const TQDomElement &element ) { TQMainWindow *mw = mainWindow(); @@ -1834,13 +1834,13 @@ void KToolBar::loadState( const TQDomElement &element ) if ( !attrIconText.isEmpty() ) { //kdDebug(220) << name() << " loadState attrIconText=" << attrIconText << endl; if ( attrIconText == "icontextright" ) - setIconText( KToolBar::IconTextRight ); + setIconText( TDEToolBar::IconTextRight ); else if ( attrIconText == "textonly" ) - setIconText( KToolBar::TextOnly ); + setIconText( TDEToolBar::TextOnly ); else if ( attrIconText == "icontextbottom" ) - setIconText( KToolBar::IconTextBottom ); + setIconText( TDEToolBar::IconTextBottom ); else if ( attrIconText == "icononly" ) - setIconText( KToolBar::IconOnly ); + setIconText( TDEToolBar::IconOnly ); } else { //kdDebug(220) << name() << " loadState no iconText attribute in XML, using iconTextSetting=" << iconTextSetting() << endl; @@ -1889,7 +1889,7 @@ void KToolBar::loadState( const TQDomElement &element ) } } - d->toolBarInfo = KToolBarPrivate::ToolBarInfo( dock, index, newLine, offset ); + d->toolBarInfo = TDEToolBarPrivate::ToolBarInfo( dock, index, newLine, offset ); mw->addDockWindow( this, dock, newLine ); mw->moveDockWindow( this, dock, newLine, index, offset ); @@ -1914,12 +1914,12 @@ void KToolBar::loadState( const TQDomElement &element ) // Apply transparent-toolbar-moving setting (ok, this is global to the mainwindow, // but we do it only if there are toolbars...) - // KDE4: move to KMainWindow + // KDE4: move to TDEMainWindow if ( transparentSetting() != !mw->opaqueMoving() ) mw->setOpaqueMoving( !transparentSetting() ); } -int KToolBar::dockWindowIndex() +int TDEToolBar::dockWindowIndex() { int index = 0; Q_ASSERT( mainWindow() ); @@ -1932,26 +1932,26 @@ int KToolBar::dockWindowIndex() return index; } -void KToolBar::getAttributes( TQString &position, TQString &icontext, int &index ) +void TDEToolBar::getAttributes( TQString &position, TQString &icontext, int &index ) { // get all of the stuff to save switch ( barPos() ) { - case KToolBar::Flat: + case TDEToolBar::Flat: position = "Flat"; break; - case KToolBar::Bottom: + case TDEToolBar::Bottom: position = "Bottom"; break; - case KToolBar::Left: + case TDEToolBar::Left: position = "Left"; break; - case KToolBar::Right: + case TDEToolBar::Right: position = "Right"; break; - case KToolBar::Floating: + case TDEToolBar::Floating: position = "Floating"; break; - case KToolBar::Top: + case TDEToolBar::Top: default: position = "Top"; break; @@ -1960,16 +1960,16 @@ void KToolBar::getAttributes( TQString &position, TQString &icontext, int &index index = dockWindowIndex(); switch (d->m_iconText) { - case KToolBar::IconTextRight: + case TDEToolBar::IconTextRight: icontext = "IconTextRight"; break; - case KToolBar::IconTextBottom: + case TDEToolBar::IconTextBottom: icontext = "IconTextBottom"; break; - case KToolBar::TextOnly: + case TDEToolBar::TextOnly: icontext = "TextOnly"; break; - case KToolBar::IconOnly: + case TDEToolBar::IconOnly: default: icontext = "IconOnly"; break; @@ -1977,7 +1977,7 @@ void KToolBar::getAttributes( TQString &position, TQString &icontext, int &index //kdDebug(220) << name() << " getAttributes: icontext=" << icontext << endl; } -void KToolBar::saveState( TQDomElement ¤t ) +void TDEToolBar::saveState( TQDomElement ¤t ) { Q_ASSERT( !current.isNull() ); TQString position, icontext; @@ -2006,8 +2006,8 @@ void KToolBar::saveState( TQDomElement ¤t ) //kdDebug(220) << name() << " saveState: saving index=" << index << " iconText=" << icontext << " hidden=" << isHidden() << endl; } -// Called by KMainWindow::finalizeGUI -void KToolBar::positionYourself( bool force ) +// Called by TDEMainWindow::finalizeGUI +void TDEToolBar::positionYourself( bool force ) { if (force) d->positioned = false; @@ -2035,16 +2035,16 @@ void KToolBar::positionYourself( bool force ) d->positioned = true; } -KPopupMenu *KToolBar::contextMenu() +TDEPopupMenu *TDEToolBar::contextMenu() { if ( context ) return context; // Construct our context popup menu. Name it qt_dockwidget_internal so it // won't be deleted by TQToolBar::clear(). - context = new KPopupMenu( this, "qt_dockwidget_internal" ); + context = new TDEPopupMenu( this, "qt_dockwidget_internal" ); context->insertTitle(i18n("Toolbar Menu")); - KPopupMenu *orient = new KPopupMenu( context, "orient" ); + TDEPopupMenu *orient = new TDEPopupMenu( context, "orient" ); orient->insertItem( i18n("toolbar position string","Top"), CONTEXT_TOP ); orient->insertItem( i18n("toolbar position string","Left"), CONTEXT_LEFT ); orient->insertItem( i18n("toolbar position string","Right"), CONTEXT_RIGHT ); @@ -2053,13 +2053,13 @@ KPopupMenu *KToolBar::contextMenu() orient->insertItem( i18n("toolbar position string","Floating"), CONTEXT_FLOAT ); orient->insertItem( i18n("min toolbar", "Flat"), CONTEXT_FLAT ); - KPopupMenu *mode = new KPopupMenu( context, "mode" ); + TDEPopupMenu *mode = new TDEPopupMenu( context, "mode" ); mode->insertItem( i18n("Icons Only"), CONTEXT_ICONS ); mode->insertItem( i18n("Text Only"), CONTEXT_TEXT ); mode->insertItem( i18n("Text Alongside Icons"), CONTEXT_TEXTRIGHT ); mode->insertItem( i18n("Text Under Icons"), CONTEXT_TEXTUNDER ); - KPopupMenu *size = new KPopupMenu( context, "size" ); + TDEPopupMenu *size = new TDEPopupMenu( context, "size" ); size->insertItem( i18n("Default"), CONTEXT_ICONSIZES ); // Query the current theme for available sizes KIconTheme *theme = TDEGlobal::instance()->iconLoader()->theme(); @@ -2131,24 +2131,24 @@ KPopupMenu *KToolBar::contextMenu() return context; } -void KToolBar::slotContextAboutToShow() +void TDEToolBar::slotContextAboutToShow() { // The idea here is to reuse the "static" part of the menu to save time. // But the "Toolbars" action is dynamic (can be a single action or a submenu) // and ToolBarHandler::setupActions() deletes it, so better not keep it around. // So we currently plug/unplug the last two actions of the menu. // Another way would be to keep around the actions and plug them all into a (new each time) popupmenu. - KMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); if ( kmw ) { kmw->setupToolbarMenuActions(); // Only allow hiding a toolbar if the action is also plugged somewhere else (e.g. menubar) - KAction *tbAction = kmw->toolBarMenuAction(); + TDEAction *tbAction = kmw->toolBarMenuAction(); if ( tbAction && tbAction->containerCount() > 0 ) tbAction->plug(context); } // try to find "configure toolbars" action - KAction *configureAction = 0; + TDEAction *configureAction = 0; const char* actionName = KStdAction::name(KStdAction::ConfigureToolbars); if ( d->m_xmlguiClient ) configureAction = d->m_xmlguiClient->actionCollection()->action(actionName); @@ -2192,39 +2192,39 @@ void KToolBar::slotContextAboutToShow() switch ( barPos() ) { - case KToolBar::Flat: + case TDEToolBar::Flat: context->setItemChecked( CONTEXT_FLAT, true ); break; - case KToolBar::Bottom: + case TDEToolBar::Bottom: context->setItemChecked( CONTEXT_BOTTOM, true ); break; - case KToolBar::Left: + case TDEToolBar::Left: context->setItemChecked( CONTEXT_LEFT, true ); break; - case KToolBar::Right: + case TDEToolBar::Right: context->setItemChecked( CONTEXT_RIGHT, true ); break; - case KToolBar::Floating: + case TDEToolBar::Floating: context->setItemChecked( CONTEXT_FLOAT, true ); break; - case KToolBar::Top: + case TDEToolBar::Top: context->setItemChecked( CONTEXT_TOP, true ); break; default: break; } } -void KToolBar::slotContextAboutToHide() +void TDEToolBar::slotContextAboutToHide() { // We have to unplug whatever slotContextAboutToShow plugged into the menu. // Unplug the toolbar menu action - KMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); if ( kmw && kmw->toolBarMenuAction() ) if ( kmw->toolBarMenuAction()->containerCount() > 1 ) kmw->toolBarMenuAction()->unplug(context); // Unplug the configure toolbars action too, since it's afterwards anyway - KAction *configureAction = 0; + TDEAction *configureAction = 0; const char* actionName = KStdAction::name(KStdAction::ConfigureToolbars); if ( d->m_xmlguiClient ) configureAction = d->m_xmlguiClient->actionCollection()->action(actionName); @@ -2242,12 +2242,12 @@ void KToolBar::slotContextAboutToHide() } } -void KToolBar::widgetDestroyed() +void TDEToolBar::widgetDestroyed() { removeWidgetInternal( (TQWidget*)sender() ); } -void KToolBar::removeWidgetInternal( TQWidget * w ) +void TDEToolBar::removeWidgetInternal( TQWidget * w ) { widgets.removeRef( w ); TQMap< TQWidget*, int >::Iterator it = widget2id.find( w ); @@ -2257,7 +2257,7 @@ void KToolBar::removeWidgetInternal( TQWidget * w ) widget2id.remove( it ); } -void KToolBar::virtual_hook( int, void* ) +void TDEToolBar::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "ktoolbar.moc" diff --git a/tdeui/ktoolbar.h b/tdeui/ktoolbar.h index 2a86b0687..43362f512 100644 --- a/tdeui/ktoolbar.h +++ b/tdeui/ktoolbar.h @@ -44,23 +44,23 @@ class TQDomDocument; class TQTimer; class KLineEdit; -class KToolBar; -class KToolBarButton; -class KToolBoxManager; +class TDEToolBar; +class TDEToolBarButton; +class TDEToolBoxManager; class KAnimWidget; -class KPopupMenu; +class TDEPopupMenu; class TDEInstance; class KComboBox; class KXMLGUIClient; -class KToolBarPrivate; +class TDEToolBarPrivate; -class TDEUI_EXPORT KToolBarSeparator : public TQFrame +class TDEUI_EXPORT TDEToolBarSeparator : public TQFrame { Q_OBJECT public: - KToolBarSeparator( Orientation, bool l, TQToolBar *parent, const char* name=0 ); + TDEToolBarSeparator( Orientation, bool l, TQToolBar *parent, const char* name=0 ); TQSize sizeHint() const; Orientation orientation() const { return orient; } @@ -82,26 +82,26 @@ private: * * A KDE-style toolbar. * - * KToolBar can be dragged around in and between different docks. + * TDEToolBar can be dragged around in and between different docks. * - * A KToolBar can contain all sorts of widgets. + * A TDEToolBar can contain all sorts of widgets. * - * KToolBar can be used as a standalone widget, but KMainWindow + * TDEToolBar can be used as a standalone widget, but TDEMainWindow * provides easy factories and management of one or more toolbars. - * Once you have a KToolBar object, you can insert items into it with the + * Once you have a TDEToolBar object, you can insert items into it with the * insert... methods, or remove them with the removeItem() method. This * can be done at any time; the toolbar will be automatically updated. * There are also many methods to set per-child properties like alignment * and toggle behavior. * - * KToolBar uses a global config group to load toolbar settings on + * TDEToolBar uses a global config group to load toolbar settings on * construction. It will reread this config group on a * TDEApplication::appearanceChanged() signal. * * @author Reginald Stadlbauer , Stephan Kulow , Sven Radej . */ -class TDEUI_EXPORT KToolBar : public TQToolBar +class TDEUI_EXPORT TDEToolBar : public TQToolBar { Q_OBJECT @@ -136,12 +136,12 @@ public: * true. All other toolbars will be IconOnly and use Medium icons. * * @param parent The standard toolbar parent (usually a - * KMainWindow) + * TDEMainWindow) * @param name The standard internal name * @param honorStyle If true, then global settings for IconSize and IconText will be honored * @param readConfig whether to apply the configuration (global and application-specific) */ - KToolBar( TQWidget *parent, const char *name = 0, bool honorStyle = false, bool readConfig = true ); + TDEToolBar( TQWidget *parent, const char *name = 0, bool honorStyle = false, bool readConfig = true ); /** * Constructor for non-XML-GUI applications. @@ -158,7 +158,7 @@ public: * @param honorStyle If true, then global settings for IconSize and IconText will be honored * @param readConfig whether to apply the configuration (global and application-specific) */ - KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock /*= TQMainWindow::Top*/, bool newLine = false, + TDEToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock /*= TQMainWindow::Top*/, bool newLine = false, const char *name = 0, bool honorStyle = false, bool readConfig = true ); /** @@ -176,20 +176,20 @@ public: * @param honorStyle If true, then global settings for IconSize and IconText will be honored * @param readConfig whether to apply the configuration (global and application-specific) */ - KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine = false, + TDEToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine = false, const char *name = 0, bool honorStyle = false, bool readConfig = true ); /** * Destructor */ - virtual ~KToolBar(); + virtual ~TDEToolBar(); /** - * Insert a button (a KToolBarButton) with a pixmap. The + * Insert a button (a TDEToolBarButton) with a pixmap. The * pixmap is loaded by the button itself based on the global icon * settings. * - * You should connect to one or more signals in KToolBar: + * You should connect to one or more signals in TDEToolBar: * clicked() , pressed() , released() , or * highlighted() and if the button is a toggle button * ( setToggle() ) toggled() . Those signals have @p id @@ -233,7 +233,7 @@ public: int index=-1, TDEInstance *_instance = TDEGlobal::instance() ); /** - * Inserts a button (a KToolBarButton) with the specified + * Inserts a button (a TDEToolBarButton) with the specified * pixmap. This pixmap will be used as the "active" one and the * disabled and default ones will be autogenerated. * @@ -241,7 +241,7 @@ public: * allows you to specify the icon name rather then the pixmap * itself. Specifying the icon name is much more flexible. * - * You should connect to one or more signals in KToolBar: + * You should connect to one or more signals in TDEToolBar: * clicked() , pressed() , released() , or * highlighted() and if the button is a toggle button * ( setToggle() ) toggled() . Those signals have @p id @@ -602,12 +602,12 @@ public: KComboBox * getCombo(int id); /** - * Returns a pointer to KToolBarLined with @p id. - * @return a pointer to KToolBarLined with @p id. + * Returns a pointer to TDEToolBarLined with @p id. + * @return a pointer to TDEToolBarLined with @p id. * * Example: * \code - * KLineEdit * lined = toolbar->getKToolBarLined(lined_id); + * KLineEdit * lined = toolbar->getTDEToolBarLined(lined_id); * \endcode * That way you can get access to other public methods * that KLineEdit provides. KLineEdit is the same thing @@ -616,18 +616,18 @@ public: KLineEdit * getLined (int id); /** - * Returns a pointer to KToolBarButton. + * Returns a pointer to TDEToolBarButton. * * Example: * \code - * KToolBarButton * button = toolbar->getButton(button_id); + * TDEToolBarButton * button = toolbar->getButton(button_id); * \endcode * That way you can get access to other public methods - * that KToolBarButton provides. + * that TDEToolBarButton provides. * * Using this method is not recommended. */ - KToolBarButton * getButton (int id); + TDEToolBarButton * getButton (int id); /** * Align item to the right. @@ -900,7 +900,7 @@ public: * precedence). */ void saveState(); // BIC: remove for KDE4? This doesn't appear to be used internally, - // and apps use saveMainWindowSettings in KMainWindow anyway. + // and apps use saveMainWindowSettings in TDEMainWindow anyway. /** * Save the toolbar settings to group @p configGroup in @p config. @@ -1036,8 +1036,8 @@ signals: * Emitted when toolbar changes position, or when * an item is removed from toolbar. * - * If you subclass KMainWindow and reimplement - * KMainWindow::resizeEvent() be sure to connect to + * If you subclass TDEMainWindow and reimplement + * TDEMainWindow::resizeEvent() be sure to connect to * this signal. Note: You can connect this signal to a slot that * doesn't take parameter. */ @@ -1054,7 +1054,7 @@ signals: /** * This signal is emitted when the toolbar is getting deleted, - * and before ~KToolbar finishes (so it's still time to remove + * and before ~TDEToolbar finishes (so it's still time to remove * widgets from the toolbar). * Used by KWidgetAction. * @since 3.2 @@ -1106,25 +1106,25 @@ private slots: private: void init( bool readConfig = true, bool honorStyle = false ); - void doConnections( KToolBarButton *button ); + void doConnections( TDEToolBarButton *button ); void insertWidgetInternal( TQWidget *w, int &index, int id ); void removeWidgetInternal( TQWidget *w ); void getAttributes( TQString &position, TQString &icontext, int &index ); int dockWindowIndex(); - KPopupMenu *contextMenu(); + TDEPopupMenu *contextMenu(); void doModeChange(); TQMap widget2id; typedef TQMap Id2WidgetMap; Id2WidgetMap id2widget; - KPopupMenu *context; + TDEPopupMenu *context; TQPtrList widgets; TQTimer *layoutTimer; TQGuardedPtr stretchableWidget, rightAligned; protected: virtual void virtual_hook( int id, void* data ); private: - KToolBarPrivate *d; + TDEToolBarPrivate *d; }; #endif diff --git a/tdeui/ktoolbarbutton.cpp b/tdeui/ktoolbarbutton.cpp index 5a4240f04..49ceb57fa 100644 --- a/tdeui/ktoolbarbutton.cpp +++ b/tdeui/ktoolbarbutton.cpp @@ -48,12 +48,12 @@ // needed to get our instance #include -template class TQIntDict; +template class TQIntDict; -class KToolBarButtonPrivate +class TDEToolBarButtonPrivate { public: - KToolBarButtonPrivate() + TDEToolBarButtonPrivate() { m_buttonDown = false; @@ -65,13 +65,13 @@ public: m_isActive = false; m_iconName = TQString::null; - m_iconText = KToolBar::IconOnly; + m_iconText = TDEToolBar::IconOnly; m_iconSize = 0; m_parent = 0; m_instance = TDEGlobal::instance(); } - ~KToolBarButtonPrivate() + ~TDEToolBarButtonPrivate() { } @@ -86,8 +86,8 @@ public: TQString m_iconName; - KToolBar *m_parent; - KToolBar::IconText m_iconText; + TDEToolBar *m_parent; + TDEToolBar::IconText m_iconText; int m_iconSize; TQSize size; @@ -97,28 +97,28 @@ public: }; // This will construct a separator -KToolBarButton::KToolBarButton( TQWidget *_parent, const char *_name ) +TDEToolBarButton::TDEToolBarButton( TQWidget *_parent, const char *_name ) : TQToolButton( _parent , _name) { - d = new KToolBarButtonPrivate; + d = new TDEToolBarButtonPrivate; resize(6,6); hide(); d->m_isSeparator = true; } -KToolBarButton::KToolBarButton( const TQString& _icon, int _id, +TDEToolBarButton::TDEToolBarButton( const TQString& _icon, int _id, TQWidget *_parent, const char *_name, const TQString &_txt, TDEInstance *_instance ) : TQToolButton( _parent, _name ), d( 0 ) { - d = new KToolBarButtonPrivate; + d = new TDEToolBarButtonPrivate; d->m_id = _id; TQToolButton::setTextLabel(_txt); d->m_instance = _instance; - d->m_parent = tqt_dynamic_cast(_parent); + d->m_parent = tqt_dynamic_cast(_parent); if (d->m_parent) { connect(d->m_parent, TQT_SIGNAL( modechange() ), this, TQT_SLOT( modeChange() )); @@ -141,17 +141,17 @@ KToolBarButton::KToolBarButton( const TQString& _icon, int _id, modeChange(); } -KToolBarButton::KToolBarButton( const TQPixmap& pixmap, int _id, +TDEToolBarButton::TDEToolBarButton( const TQPixmap& pixmap, int _id, TQWidget *_parent, const char *name, const TQString& txt) : TQToolButton( _parent, name ), d( 0 ) { - d = new KToolBarButtonPrivate; + d = new TDEToolBarButtonPrivate; d->m_id = _id; TQToolButton::setTextLabel(txt); - d->m_parent = tqt_dynamic_cast(_parent); + d->m_parent = tqt_dynamic_cast(_parent); if (d->m_parent) { connect(d->m_parent, TQT_SIGNAL( modechange() ), this, TQT_SLOT( modeChange() )); @@ -173,12 +173,12 @@ KToolBarButton::KToolBarButton( const TQPixmap& pixmap, int _id, modeChange(); } -KToolBarButton::~KToolBarButton() +TDEToolBarButton::~TDEToolBarButton() { delete d; d = 0; } -void KToolBarButton::modeChange() +void TDEToolBarButton::modeChange() { TQSize mysize; @@ -206,7 +206,7 @@ void KToolBarButton::modeChange() int text_width = 0; TQToolTip::remove(this); - if (d->m_iconText != KToolBar::IconOnly) + if (d->m_iconText != TDEToolBar::IconOnly) { // okay, we have to deal with fonts. let's get our information now TQFont tmp_font = TDEGlobalSettings::toolBarFont(); @@ -226,19 +226,19 @@ void KToolBarButton::modeChange() switch (d->m_iconText) { - case KToolBar::IconOnly: + case TDEToolBar::IconOnly: mysize = TQSize(pix_width, pix_height); break; - case KToolBar::IconTextRight: + case TDEToolBar::IconTextRight: mysize = TQSize(pix_width + text_width + 4, pix_height); break; - case KToolBar::TextOnly: + case TDEToolBar::TextOnly: mysize = TQSize(text_width + 4, text_height); break; - case KToolBar::IconTextBottom: + case TDEToolBar::IconTextBottom: mysize = TQSize((text_width + 4 > pix_width) ? text_width + 4 : pix_width, pix_height + text_height); break; @@ -257,7 +257,7 @@ void KToolBarButton::modeChange() updateGeometry(); } -void KToolBarButton::setTextLabel( const TQString& text, bool tipToo) +void TDEToolBarButton::setTextLabel( const TQString& text, bool tipToo) { if (text.isNull()) return; @@ -270,13 +270,13 @@ void KToolBarButton::setTextLabel( const TQString& text, bool tipToo) update(); } -void KToolBarButton::setText( const TQString& text) +void TDEToolBarButton::setText( const TQString& text) { setTextLabel(text, true); modeChange(); } -void KToolBarButton::setIcon( const TQString &icon ) +void TDEToolBarButton::setIcon( const TQString &icon ) { d->m_iconName = icon; if (d->m_parent) @@ -290,13 +290,13 @@ void KToolBarButton::setIcon( const TQString &icon ) d->m_iconName, KIcon::Toolbar, d->m_iconSize )); } -void KToolBarButton::setIconSet( const TQIconSet &iconset ) +void TDEToolBarButton::setIconSet( const TQIconSet &iconset ) { TQToolButton::setIconSet( iconset ); } // remove? -void KToolBarButton::setPixmap( const TQPixmap &pixmap ) +void TDEToolBarButton::setPixmap( const TQPixmap &pixmap ) { if( pixmap.isNull()) // called by TQToolButton { @@ -308,21 +308,21 @@ void KToolBarButton::setPixmap( const TQPixmap &pixmap ) TQToolButton::setIconSet( set ); } -void KToolBarButton::setDefaultPixmap( const TQPixmap &pixmap ) +void TDEToolBarButton::setDefaultPixmap( const TQPixmap &pixmap ) { TQIconSet set = iconSet(); set.setPixmap( pixmap, TQIconSet::Automatic, TQIconSet::Normal ); TQToolButton::setIconSet( set ); } -void KToolBarButton::setDisabledPixmap( const TQPixmap &pixmap ) +void TDEToolBarButton::setDisabledPixmap( const TQPixmap &pixmap ) { TQIconSet set = iconSet(); set.setPixmap( pixmap, TQIconSet::Automatic, TQIconSet::Disabled ); TQToolButton::setIconSet( set ); } -void KToolBarButton::setDefaultIcon( const TQString& icon ) +void TDEToolBarButton::setDefaultIcon( const TQString& icon ) { TQIconSet set = iconSet(); TQPixmap pm; @@ -336,7 +336,7 @@ void KToolBarButton::setDefaultIcon( const TQString& icon ) TQToolButton::setIconSet( set ); } -void KToolBarButton::setDisabledIcon( const TQString& icon ) +void TDEToolBarButton::setDisabledIcon( const TQString& icon ) { TQIconSet set = iconSet(); TQPixmap pm; @@ -350,27 +350,27 @@ void KToolBarButton::setDisabledIcon( const TQString& icon ) TQToolButton::setIconSet( set ); } -TQPopupMenu *KToolBarButton::popup() +TQPopupMenu *TDEToolBarButton::popup() { // obsolete // KDE4: remove me return TQToolButton::popup(); } -void KToolBarButton::setPopup(TQPopupMenu *p, bool) +void TDEToolBarButton::setPopup(TQPopupMenu *p, bool) { TQToolButton::setPopup(p); TQToolButton::setPopupDelay(-1); } -void KToolBarButton::setDelayedPopup (TQPopupMenu *p, bool) +void TDEToolBarButton::setDelayedPopup (TQPopupMenu *p, bool) { TQToolButton::setPopup(p); TQToolButton::setPopupDelay(TQApplication::startDragTime()); } -void KToolBarButton::leaveEvent(TQEvent *) +void TDEToolBarButton::leaveEvent(TQEvent *) { if( d->m_isRaised || d->m_isActive ) { @@ -382,7 +382,7 @@ void KToolBarButton::leaveEvent(TQEvent *) emit highlighted(d->m_id, false); } -void KToolBarButton::enterEvent(TQEvent *) +void TDEToolBarButton::enterEvent(TQEvent *) { if (d->m_highlight) { @@ -403,7 +403,7 @@ void KToolBarButton::enterEvent(TQEvent *) emit highlighted(d->m_id, true); } -bool KToolBarButton::eventFilter(TQObject *o, TQEvent *ev) +bool TDEToolBarButton::eventFilter(TQObject *o, TQEvent *ev) { if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this)) { @@ -446,7 +446,7 @@ bool KToolBarButton::eventFilter(TQObject *o, TQEvent *ev) return TQToolButton::eventFilter(o, ev); } -void KToolBarButton::mousePressEvent( TQMouseEvent * e ) +void TDEToolBarButton::mousePressEvent( TQMouseEvent * e ) { d->m_buttonDown = true; @@ -460,7 +460,7 @@ void KToolBarButton::mousePressEvent( TQMouseEvent * e ) TQToolButton::mousePressEvent(e); } -void KToolBarButton::mouseReleaseEvent( TQMouseEvent * e ) +void TDEToolBarButton::mouseReleaseEvent( TQMouseEvent * e ) { TQt::ButtonState state = TQt::ButtonState(e->button() | (e->state() & KeyButtonMask)); if ( e->button() == Qt::MidButton ) @@ -479,7 +479,7 @@ void KToolBarButton::mouseReleaseEvent( TQMouseEvent * e ) emit buttonClicked( d->m_id, state ); } -void KToolBarButton::drawButton( TQPainter *_painter ) +void TDEToolBarButton::drawButton( TQPainter *_painter ) { TQStyle::SFlags flags = TQStyle::Style_Default; TQStyle::SCFlags active = TQStyle::SC_None; @@ -503,7 +503,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) TQRect textRect; int textFlags = 0; - if (d->m_iconText == KToolBar::IconOnly) // icon only + if (d->m_iconText == TDEToolBar::IconOnly) // icon only { TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic, isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) : @@ -521,7 +521,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) _painter->drawPixmap( dx, dy, pixmap ); } } - else if (d->m_iconText == KToolBar::IconTextRight) // icon and text (if any) + else if (d->m_iconText == TDEToolBar::IconTextRight) // icon and text (if any) { TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic, isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) : @@ -555,7 +555,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) textRect = TQRect(dx, dy, width()-dx, height()); } } - else if (d->m_iconText == KToolBar::TextOnly) + else if (d->m_iconText == TDEToolBar::TextOnly) { if (!textLabel().isNull()) { @@ -570,7 +570,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) textRect = TQRect( dx, dy, fm.width(textLabel()), fm.lineSpacing() ); } } - else if (d->m_iconText == KToolBar::IconTextBottom) + else if (d->m_iconText == TDEToolBar::IconTextBottom) { TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic, isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) : @@ -629,7 +629,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) } } -void KToolBarButton::paletteChange(const TQPalette &) +void TDEToolBarButton::paletteChange(const TQPalette &) { if(!d->m_isSeparator) { @@ -638,12 +638,12 @@ void KToolBarButton::paletteChange(const TQPalette &) } } -bool KToolBarButton::event(TQEvent *e) +bool TDEToolBarButton::event(TQEvent *e) { if (e->type() == TQEvent::ParentFontChange || e->type() == TQEvent::ApplicationFontChange) { //If we use toolbar text, apply the settings again, to relayout... - if (d->m_iconText != KToolBar::IconOnly) + if (d->m_iconText != TDEToolBar::IconOnly) modeChange(); return true; } @@ -652,19 +652,19 @@ bool KToolBarButton::event(TQEvent *e) } -void KToolBarButton::showMenu() +void TDEToolBarButton::showMenu() { // obsolete // KDE4: remove me } -void KToolBarButton::slotDelayTimeout() +void TDEToolBarButton::slotDelayTimeout() { // obsolete // KDE4: remove me } -void KToolBarButton::slotClicked() +void TDEToolBarButton::slotClicked() { emit clicked( d->m_id ); @@ -677,37 +677,37 @@ void KToolBarButton::slotClicked() } } -void KToolBarButton::slotPressed() +void TDEToolBarButton::slotPressed() { emit pressed( d->m_id ); } -void KToolBarButton::slotReleased() +void TDEToolBarButton::slotReleased() { emit released( d->m_id ); } -void KToolBarButton::slotToggled() +void TDEToolBarButton::slotToggled() { emit toggled( d->m_id ); } -void KToolBarButton::setNoStyle(bool no_style) +void TDEToolBarButton::setNoStyle(bool no_style) { d->m_noStyle = no_style; modeChange(); - d->m_iconText = KToolBar::IconTextRight; + d->m_iconText = TDEToolBar::IconTextRight; repaint(false); } -void KToolBarButton::setRadio (bool f) +void TDEToolBarButton::setRadio (bool f) { if ( d ) d->m_isRadio = f; } -void KToolBarButton::on(bool flag) +void TDEToolBarButton::on(bool flag) { if(isToggleButton()) setOn(flag); @@ -719,13 +719,13 @@ void KToolBarButton::on(bool flag) repaint(); } -void KToolBarButton::toggle() +void TDEToolBarButton::toggle() { setOn(!isOn()); repaint(); } -void KToolBarButton::setToggle(bool flag) +void TDEToolBarButton::setToggle(bool flag) { setToggleButton(flag); if (flag) @@ -734,48 +734,48 @@ void KToolBarButton::setToggle(bool flag) disconnect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled())); } -TQSize KToolBarButton::sizeHint() const +TQSize TDEToolBarButton::sizeHint() const { return d->size; } -TQSize KToolBarButton::minimumSizeHint() const +TQSize TDEToolBarButton::minimumSizeHint() const { return d->size; } -TQSize KToolBarButton::minimumSize() const +TQSize TDEToolBarButton::minimumSize() const { return d->size; } -bool KToolBarButton::isRaised() const +bool TDEToolBarButton::isRaised() const { return d->m_isRaised; } -bool KToolBarButton::isActive() const +bool TDEToolBarButton::isActive() const { return d->m_isActive; } -int KToolBarButton::iconTextMode() const +int TDEToolBarButton::iconTextMode() const { return static_cast( d->m_iconText ); } -int KToolBarButton::id() const +int TDEToolBarButton::id() const { return d->m_id; } -// KToolBarButtonList -KToolBarButtonList::KToolBarButtonList() +// TDEToolBarButtonList +TDEToolBarButtonList::TDEToolBarButtonList() { setAutoDelete(false); } -void KToolBarButton::virtual_hook( int, void* ) +void TDEToolBarButton::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "ktoolbarbutton.moc" diff --git a/tdeui/ktoolbarbutton.h b/tdeui/ktoolbarbutton.h index 126f8923a..49e906e6e 100644 --- a/tdeui/ktoolbarbutton.h +++ b/tdeui/ktoolbarbutton.h @@ -29,19 +29,19 @@ #include #include -class KToolBar; -class KToolBarButtonPrivate; +class TDEToolBar; +class TDEToolBarButtonPrivate; class TDEInstance; class TQEvent; class TQPopupMenu; class TQPainter; /** - * A toolbar button. This is used internally by KToolBar, use the - * KToolBar methods instead. + * A toolbar button. This is used internally by TDEToolBar, use the + * TDEToolBar methods instead. * @internal */ -class TDEUI_EXPORT KToolBarButton : public TQToolButton +class TDEUI_EXPORT TDEToolBarButton : public TQToolButton { Q_OBJECT @@ -59,7 +59,7 @@ public: * @param txt This button's text (in a tooltip or otherwise) * @param _instance the instance to use for this button */ - KToolBarButton(const TQString& icon, int id, TQWidget *parent, + TDEToolBarButton(const TQString& icon, int id, TQWidget *parent, const char *name=0L, const TQString &txt=TQString::null, TDEInstance *_instance = TDEGlobal::instance()); @@ -74,7 +74,7 @@ public: * @param name This button's internal name * @param txt This button's text (in a tooltip or otherwise) */ - KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent, + TDEToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent, const char *name=0L, const TQString &txt=TQString::null); /** @@ -83,12 +83,12 @@ public: * @param parent This button's parent * @param name This button's internal name */ - KToolBarButton(TQWidget *parent=0L, const char *name=0L); + TDEToolBarButton(TQWidget *parent=0L, const char *name=0L); /** * Standard destructor */ - ~KToolBarButton(); + ~TDEToolBarButton(); #ifndef KDE_NO_COMPAT /** @@ -313,19 +313,19 @@ protected slots: protected: virtual void virtual_hook( int id, void* data ); private: - KToolBarButtonPrivate *d; + TDEToolBarButtonPrivate *d; }; /** -* List of KToolBarButton objects. +* List of TDEToolBarButton objects. * @internal * @version $Id$ */ -class TDEUI_EXPORT KToolBarButtonList : public TQIntDict +class TDEUI_EXPORT TDEToolBarButtonList : public TQIntDict { public: - KToolBarButtonList(); - ~KToolBarButtonList() {} + TDEToolBarButtonList(); + ~TDEToolBarButtonList() {} }; #endif diff --git a/tdeui/ktoolbarhandler.cpp b/tdeui/ktoolbarhandler.cpp index bdeba7281..1d08565d7 100644 --- a/tdeui/ktoolbarhandler.cpp +++ b/tdeui/ktoolbarhandler.cpp @@ -44,14 +44,14 @@ namespace class BarActionBuilder { public: - BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, TQPtrList &oldToolBarList ) + BarActionBuilder( TDEActionCollection *actionCollection, TDEMainWindow *mainWindow, TQPtrList &oldToolBarList ) : m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false ) { TQPtrList dockWindows = m_mainWindow->dockWindows(); TQPtrListIterator dockWindowIt( dockWindows ); for ( ; dockWindowIt.current(); ++dockWindowIt ) { - KToolBar *toolBar = tqt_dynamic_cast( dockWindowIt.current() ); + TDEToolBar *toolBar = tqt_dynamic_cast( dockWindowIt.current() ); if ( !toolBar ) continue; @@ -67,30 +67,30 @@ namespace bool needsRebuild() const { return m_needsRebuild; } - TQPtrList create() + TQPtrList create() { if ( !m_needsRebuild ) - return TQPtrList(); + return TQPtrList(); - TQPtrListIterator toolBarIt( m_toolBars ); + TQPtrListIterator toolBarIt( m_toolBars ); for ( ; toolBarIt.current(); ++toolBarIt ) handleToolBar( toolBarIt.current() ); - TQPtrList actions; + TQPtrList actions; if ( m_toolBarActions.count() == 0 ) return actions; if ( m_toolBarActions.count() == 1 ) { - KToggleToolBarAction* action = static_cast( m_toolBarActions.getFirst() ); + TDEToggleToolBarAction* action = static_cast( m_toolBarActions.getFirst() ); action->setText( i18n( "Show Toolbar" ) ); action->setCheckedState( i18n( "Hide Toolbar" ) ); return m_toolBarActions; } - KActionMenu *menuAction = new KActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" ); + TDEActionMenu *menuAction = new TDEActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" ); - TQPtrListIterator actionIt( m_toolBarActions ); + TQPtrListIterator actionIt( m_toolBarActions ); for ( ; actionIt.current(); ++actionIt ) menuAction->insert( actionIt.current() ); @@ -98,12 +98,12 @@ namespace return actions; } - const TQPtrList &toolBars() const { return m_toolBars; } + const TQPtrList &toolBars() const { return m_toolBars; } private: - void handleToolBar( KToolBar *toolBar ) + void handleToolBar( TDEToolBar *toolBar ) { - KToggleToolBarAction *action = new KToggleToolBarAction( + TDEToggleToolBarAction *action = new TDEToggleToolBarAction( toolBar, toolBar->label(), m_actionCollection, @@ -112,11 +112,11 @@ namespace m_toolBarActions.append( action ); } - KActionCollection *m_actionCollection; - KMainWindow *m_mainWindow; + TDEActionCollection *m_actionCollection; + TDEMainWindow *m_mainWindow; - TQPtrList m_toolBars; - TQPtrList m_toolBarActions; + TQPtrList m_toolBars; + TQPtrList m_toolBarActions; bool m_needsRebuild : 1; }; @@ -124,13 +124,13 @@ namespace using namespace KDEPrivate; -ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, const char *name ) +ToolBarHandler::ToolBarHandler( TDEMainWindow *mainWindow, const char *name ) : TQObject( mainWindow, name ), KXMLGUIClient( mainWindow ) { init( mainWindow ); } -ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, TQObject *parent, const char *name ) +ToolBarHandler::ToolBarHandler( TDEMainWindow *mainWindow, TQObject *parent, const char *name ) : TQObject( parent, name ), KXMLGUIClient( mainWindow ) { init( mainWindow ); @@ -142,7 +142,7 @@ ToolBarHandler::~ToolBarHandler() m_actions.clear(); } -KAction *ToolBarHandler::toolBarMenuAction() +TDEAction *ToolBarHandler::toolBarMenuAction() { assert( m_actions.count() == 1 ); return m_actions.getFirst(); @@ -167,7 +167,7 @@ void ToolBarHandler::setupActions() m_actions = builder.create(); /* - for ( TQPtrListIterator toolBarIt( m_toolBars ); + for ( TQPtrListIterator toolBarIt( m_toolBars ); toolBarIt.current(); ++toolBarIt ) toolBarIt.current()->disconnect( this ); */ @@ -175,13 +175,13 @@ void ToolBarHandler::setupActions() m_toolBars = builder.toolBars(); /* - for ( TQPtrListIterator toolBarIt( m_toolBars ); + for ( TQPtrListIterator toolBarIt( m_toolBars ); toolBarIt.current(); ++toolBarIt ) connect( toolBarIt.current(), TQT_SIGNAL( destroyed() ), this, TQT_SLOT( setupActions() ) ); */ - if (kapp && kapp->authorizeKAction("options_show_toolbar")) + if (kapp && kapp->authorizeTDEAction("options_show_toolbar")) plugActionList( actionListName, m_actions ); connectToActionContainers(); @@ -193,7 +193,7 @@ void ToolBarHandler::clientAdded( KXMLGUIClient *client ) setupActions(); } -void ToolBarHandler::init( KMainWindow *mainWindow ) +void ToolBarHandler::init( TDEMainWindow *mainWindow ) { d = 0; m_mainWindow = mainWindow; @@ -218,12 +218,12 @@ void ToolBarHandler::init( KMainWindow *mainWindow ) void ToolBarHandler::connectToActionContainers() { - TQPtrListIterator actionIt( m_actions ); + TQPtrListIterator actionIt( m_actions ); for ( ; actionIt.current(); ++actionIt ) connectToActionContainer( actionIt.current() ); } -void ToolBarHandler::connectToActionContainer( KAction *action ) +void ToolBarHandler::connectToActionContainer( TDEAction *action ) { uint containerCount = action->containerCount(); for ( uint i = 0; i < containerCount; ++i ) diff --git a/tdeui/ktoolbarhandler.h b/tdeui/ktoolbarhandler.h index e6336967f..729129a67 100644 --- a/tdeui/ktoolbarhandler.h +++ b/tdeui/ktoolbarhandler.h @@ -23,8 +23,8 @@ #include #include -class KMainWindow; -class KToolBar; +class TDEMainWindow; +class TDEToolBar; namespace KDEPrivate { @@ -35,11 +35,11 @@ class ToolBarHandler : public TQObject, { Q_OBJECT public: - ToolBarHandler( KMainWindow *mainWindow, const char *name = 0 ); - ToolBarHandler( KMainWindow *mainWindow, TQObject *parent, const char *name = 0 ); + ToolBarHandler( TDEMainWindow *mainWindow, const char *name = 0 ); + ToolBarHandler( TDEMainWindow *mainWindow, TQObject *parent, const char *name = 0 ); virtual ~ToolBarHandler(); - KAction *toolBarMenuAction(); + TDEAction *toolBarMenuAction(); public slots: void setupActions(); @@ -48,17 +48,17 @@ private slots: void clientAdded( KXMLGUIClient *client ); private: - void init( KMainWindow *mainWindow ); + void init( TDEMainWindow *mainWindow ); void connectToActionContainers(); - void connectToActionContainer( KAction *action ); + void connectToActionContainer( TDEAction *action ); void connectToActionContainer( TQWidget *container ); struct Data; Data *d; - TQGuardedPtr m_mainWindow; - TQPtrList m_actions; - TQPtrList m_toolBars; + TQGuardedPtr m_mainWindow; + TQPtrList m_actions; + TQPtrList m_toolBars; }; } // namespace KDEPrivate diff --git a/tdeui/ktoolbarlabelaction.cpp b/tdeui/ktoolbarlabelaction.cpp index b86906e57..1716a64e8 100644 --- a/tdeui/ktoolbarlabelaction.cpp +++ b/tdeui/ktoolbarlabelaction.cpp @@ -21,10 +21,10 @@ #include #include -class KToolBarLabelAction::KToolBarLabelActionPrivate +class TDEToolBarLabelAction::TDEToolBarLabelActionPrivate { public: - KToolBarLabelActionPrivate() + TDEToolBarLabelActionPrivate() : m_label(0) { } @@ -32,53 +32,53 @@ public: }; -KToolBarLabelAction::KToolBarLabelAction(const TQString &text, - const KShortcut &cut, +TDEToolBarLabelAction::TDEToolBarLabelAction(const TQString &text, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection *parent, + TDEActionCollection *parent, const char *name) : KWidgetAction(new TQLabel(text, 0, "kde toolbar widget"), text, cut, receiver, slot, parent, name), - d(new KToolBarLabelActionPrivate) + d(new TDEToolBarLabelActionPrivate) { init(); } -KToolBarLabelAction::KToolBarLabelAction(TQWidget* buddy, +TDEToolBarLabelAction::TDEToolBarLabelAction(TQWidget* buddy, const TQString &text, - const KShortcut &cut, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection *parent, + TDEActionCollection *parent, const char *name) : KWidgetAction(new TQLabel(buddy, text, 0, "kde toolbar widget"), text, cut, receiver, slot, parent, name), - d(new KToolBarLabelActionPrivate) + d(new TDEToolBarLabelActionPrivate) { init(); } -KToolBarLabelAction::KToolBarLabelAction(TQLabel* label, - const KShortcut &cut, +TDEToolBarLabelAction::TDEToolBarLabelAction(TQLabel* label, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection* parent, + TDEActionCollection* parent, const char *name) : KWidgetAction(label, label->text(), cut, receiver, slot, parent, name), - d(new KToolBarLabelActionPrivate) + d(new TDEToolBarLabelActionPrivate) { Q_ASSERT(TQString::fromLatin1("kde toolbar widget") == label->name()); init(); } -KToolBarLabelAction::~KToolBarLabelAction() +TDEToolBarLabelAction::~TDEToolBarLabelAction() { delete d; d = 0; } -void KToolBarLabelAction::init() +void TDEToolBarLabelAction::init() { d->m_label = static_cast(widget()); /* these lines were copied from Konqueror's KonqDraggableLabel class in @@ -90,28 +90,28 @@ void KToolBarLabelAction::init() d->m_label->adjustSize(); } -void KToolBarLabelAction::setText(const TQString& text) +void TDEToolBarLabelAction::setText(const TQString& text) { KWidgetAction::setText(text); d->m_label->setText(text); } -void KToolBarLabelAction::setBuddy(TQWidget* buddy) +void TDEToolBarLabelAction::setBuddy(TQWidget* buddy) { d->m_label->setBuddy(buddy); } -TQWidget* KToolBarLabelAction::buddy() const +TQWidget* TDEToolBarLabelAction::buddy() const { return d->m_label->buddy(); } -TQLabel* KToolBarLabelAction::label() const +TQLabel* TDEToolBarLabelAction::label() const { return d->m_label; } -void KToolBarLabelAction::virtual_hook(int, void*) +void TDEToolBarLabelAction::virtual_hook(int, void*) { } diff --git a/tdeui/ktoolbarlabelaction.h b/tdeui/ktoolbarlabelaction.h index 2cf7c99be..02b1cd28c 100644 --- a/tdeui/ktoolbarlabelaction.h +++ b/tdeui/ktoolbarlabelaction.h @@ -25,7 +25,7 @@ class TQLabel; /** * @short Class to display a label in a toolbar. * - * KToolBarLabelAction is a convenience class for displaying a label in a + * TDEToolBarLabelAction is a convenience class for displaying a label in a * toolbar. * * It provides easy access to the label's #setBuddy(TQWidget*) and #buddy() @@ -38,7 +38,7 @@ class TQLabel; * = new KWidgetAction(findCombo, i18n("F&ind Combo"), Qt::Key_F6, this, * TQT_SLOT(slotFocus()), actionCollection(), "find_combo"); * - * new KToolBarLabelAction(findCombo, i18n("F&ind "), 0, this, + * new TDEToolBarLabelAction(findCombo, i18n("F&ind "), 0, this, * TQT_SLOT(slotFocus()), actionCollection(), * "find_label"); * @@ -46,7 +46,7 @@ class TQLabel; * * @author Felix Berger */ -class TDEUI_EXPORT KToolBarLabelAction : public KWidgetAction +class TDEUI_EXPORT TDEToolBarLabelAction : public KWidgetAction { public: /** @@ -59,10 +59,10 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarLabelAction(const TQString &text, - const KShortcut &cut, + TDEToolBarLabelAction(const TQString &text, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection *parent, const char *name); + TDEActionCollection *parent, const char *name); /** * Constructs a toolbar label setting a buddy for the label. * @@ -75,10 +75,10 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarLabelAction(TQWidget* buddy, const TQString &text, - const KShortcut &cut, + TDEToolBarLabelAction(TQWidget* buddy, const TQString &text, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection *parent, const char *name); + TDEActionCollection *parent, const char *name); /** * Constructs a toolbar label for a label. * @@ -98,11 +98,11 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarLabelAction(TQLabel* label, const KShortcut &cut, + TDEToolBarLabelAction(TQLabel* label, const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection* parent, const char *name); + TDEActionCollection* parent, const char *name); - virtual ~KToolBarLabelAction(); + virtual ~TDEToolBarLabelAction(); /** * Reimplemented to update both the action's text and the label's text. */ @@ -128,8 +128,8 @@ protected: virtual void virtual_hook(int id, void* data); private: - class KToolBarLabelActionPrivate; - KToolBarLabelActionPrivate *d; + class TDEToolBarLabelActionPrivate; + TDEToolBarLabelActionPrivate *d; void init(); }; diff --git a/tdeui/ktoolbarradiogroup.cpp b/tdeui/ktoolbarradiogroup.cpp index ab8e50e08..7526158b9 100644 --- a/tdeui/ktoolbarradiogroup.cpp +++ b/tdeui/ktoolbarradiogroup.cpp @@ -27,31 +27,31 @@ #include "ktoolbarbutton.h" /************************************************************************* - * KToolBarRadioGroup * + * TDEToolBarRadioGroup * *************************************************************************/ -KToolBarRadioGroup::KToolBarRadioGroup (KToolBar *_parent, const char *_name) +TDEToolBarRadioGroup::TDEToolBarRadioGroup (TDEToolBar *_parent, const char *_name) : TQObject(_parent, _name) { - buttons = new KToolBarButtonList(); + buttons = new TDEToolBarButtonList(); tb = _parent; connect (tb, TQT_SIGNAL(toggled(int)), this, TQT_SLOT(slotToggled(int))); } -KToolBarRadioGroup::~KToolBarRadioGroup() +TDEToolBarRadioGroup::~TDEToolBarRadioGroup() { delete buttons; } -void KToolBarRadioGroup::addButton (int id) +void TDEToolBarRadioGroup::addButton (int id) { - KToolBarButton *b = tb->getButton( id ); + TDEToolBarButton *b = tb->getButton( id ); b->setRadio( true ); buttons->insert( id, b ); } -void KToolBarRadioGroup::removeButton (int id) +void TDEToolBarRadioGroup::removeButton (int id) { if (!buttons->find(id)) return; @@ -59,11 +59,11 @@ void KToolBarRadioGroup::removeButton (int id) buttons->remove(id); } -void KToolBarRadioGroup::slotToggled(int id) +void TDEToolBarRadioGroup::slotToggled(int id) { if (buttons->find(id) && buttons->find(id)->isOn()) { - TQIntDictIterator it(*buttons); + TQIntDictIterator it(*buttons); while (it.current()) { if (it.currentKey() != id) diff --git a/tdeui/ktoolbarradiogroup.h b/tdeui/ktoolbarradiogroup.h index 6b2cc5140..de567ae62 100644 --- a/tdeui/ktoolbarradiogroup.h +++ b/tdeui/ktoolbarradiogroup.h @@ -26,19 +26,19 @@ #include -class KToolBar; -class KToolBarButtonList; -class KToolBarRadioGroupPrivate; +class TDEToolBar; +class TDEToolBarButtonList; +class TDEToolBarRadioGroupPrivate; /************************************************************************* - * KToolBarRadioGroup * + * TDEToolBarRadioGroup * *************************************************************************/ /** * @short Class for group of radio butons in toolbar. * - * KToolBarRadioGroup is class for group of radio butons in toolbar. + * TDEToolBarRadioGroup is class for group of radio butons in toolbar. * Take toggle buttons which you already inserted into toolbar, - * create KToolBarRadioGroup instance and add them here. + * create TDEToolBarRadioGroup instance and add them here. * All buttons will emit signals toggled (bool) (or you can * use sitgnal toggled (int id) from toolbar). When one button is set * down, all others are unset. All buttons emit signals - those who @@ -46,19 +46,19 @@ class KToolBarRadioGroupPrivate; * * @author Sven Radej */ -class TDEUI_EXPORT KToolBarRadioGroup : public TQObject +class TDEUI_EXPORT TDEToolBarRadioGroup : public TQObject { Q_OBJECT public: /** - * Constructor. Parent must be KToolBar . + * Constructor. Parent must be TDEToolBar . */ - KToolBarRadioGroup (KToolBar *_parent, const char *_name=0); + TDEToolBarRadioGroup (TDEToolBar *_parent, const char *_name=0); /** * Destructor. */ - ~KToolBarRadioGroup (); + ~TDEToolBarRadioGroup (); /** * Adds button to group. Button cannot be unset by mouse clicks (you @@ -79,10 +79,10 @@ public slots: void slotToggled (int); private: - KToolBarButtonList *buttons; - KToolBar *tb; + TDEToolBarButtonList *buttons; + TDEToolBar *tb; - KToolBarRadioGroupPrivate *d; + TDEToolBarRadioGroupPrivate *d; }; #endif diff --git a/tdeui/kwhatsthismanager_p.h b/tdeui/kwhatsthismanager_p.h index cce1c8ea5..084c83641 100644 --- a/tdeui/kwhatsthismanager_p.h +++ b/tdeui/kwhatsthismanager_p.h @@ -30,7 +30,7 @@ class TQStyleSheet; class TQTextEdit; /** - * This class is used automatically by KMainWindow and KDialog to attach a + * This class is used automatically by TDEMainWindow and KDialog to attach a * What's This templates to all new widgets. If you don't use either of those * classes and want this functionality, call KWhatsThisManager::init () before * creating any widgets. diff --git a/tdeui/kxmlgui.xsd b/tdeui/kxmlgui.xsd index c0979cb72..dc2fad341 100644 --- a/tdeui/kxmlgui.xsd +++ b/tdeui/kxmlgui.xsd @@ -148,7 +148,7 @@ Defines both Standard and app-specific actions. An action can appear in a menu, a toolbar or in a menubar. Attributes: - - name of the action: this is matched with the KAction name. + - name of the action: this is matched with the TDEAction name. - group: this is used to control the placement of the action when merging e.g. a part, it matches the name of a DefineGroup in the mainwindow's rc file. @@ -157,7 +157,7 @@ there. Note that this feature is currently only available for the mainwindow, not for parts/plugins. - text, whatsThis, toolTip, shortText, shortcut, icon: all those are - mapped to KAction properties. + mapped to TDEAction properties. diff --git a/tdeui/kxmlguibuilder.cpp b/tdeui/kxmlguibuilder.cpp index 32083a2c3..817a54514 100644 --- a/tdeui/kxmlguibuilder.cpp +++ b/tdeui/kxmlguibuilder.cpp @@ -116,9 +116,9 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ id = -1; if ( element.tagName().lower() == d->tagMainWindow ) { - KMainWindow *mainwindow = 0; - if ( ::tqqt_cast( d->m_widget ) ) - mainwindow = static_cast(d->m_widget); + TDEMainWindow *mainwindow = 0; + if ( ::tqqt_cast( d->m_widget ) ) + mainwindow = static_cast(d->m_widget); return mainwindow; } @@ -127,8 +127,8 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ { KMenuBar *bar; - if ( ::tqqt_cast( d->m_widget ) ) - bar = static_cast(d->m_widget)->menuBar(); + if ( ::tqqt_cast( d->m_widget ) ) + bar = static_cast(d->m_widget)->menuBar(); else bar = new KMenuBar( d->m_widget ); @@ -145,15 +145,15 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ // And we don't want to set the parent for a standalone popupmenu, // otherwise its shortcuts appear. TQWidget* p = parent; - while ( p && !::tqqt_cast( p ) ) + while ( p && !::tqqt_cast( p ) ) p = p->parentWidget(); TQCString name = element.attribute( d->attrName ).utf8(); - if (!kapp->authorizeKAction(name)) + if (!kapp->authorizeTDEAction(name)) return 0; - KPopupMenu *popup = new KPopupMenu( p, name); + TDEPopupMenu *popup = new TDEPopupMenu( p, name); TQString i18nText; TQDomElement textElem = element.namedItem( d->attrText1 ).toElement(); @@ -205,13 +205,13 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ TQCString name = element.attribute( d->attrName ).utf8(); - KToolBar *bar = static_cast(TQT_TQWIDGET(d->m_widget->child( name, "KToolBar" ))); + TDEToolBar *bar = static_cast(TQT_TQWIDGET(d->m_widget->child( name, "TDEToolBar" ))); if( !bar ) { - bar = new KToolBar( d->m_widget, name, honor, false ); + bar = new TDEToolBar( d->m_widget, name, honor, false ); } - if ( ::tqqt_cast( d->m_widget ) ) + if ( ::tqqt_cast( d->m_widget ) ) { if ( d->m_client && !d->m_client->xmlFile().isEmpty() ) bar->setXMLGUIClient( d->m_client ); @@ -224,9 +224,9 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ if ( element.tagName().lower() == d->tagStatusBar ) { - if ( ::tqqt_cast( d->m_widget ) ) + if ( ::tqqt_cast( d->m_widget ) ) { - KMainWindow *mainWin = static_cast(d->m_widget); + TDEMainWindow *mainWin = static_cast(d->m_widget); mainWin->statusBar()->show(); return mainWin->statusBar(); } @@ -253,9 +253,9 @@ void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQD delete container; } - else if ( ::tqqt_cast( container ) ) + else if ( ::tqqt_cast( container ) ) { - KToolBar *tb = static_cast( container ); + TDEToolBar *tb = static_cast( container ); tb->saveState( element ); delete tb; @@ -271,7 +271,7 @@ void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQD } else if ( ::tqqt_cast( container ) ) { - if ( ::tqqt_cast( d->m_widget ) ) + if ( ::tqqt_cast( d->m_widget ) ) container->hide(); else delete static_cast(container); @@ -319,9 +319,9 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo } else if ( ::tqqt_cast( parent ) ) return static_cast(parent)->insertSeparator( index ); - else if ( ::tqqt_cast( parent ) ) + else if ( ::tqqt_cast( parent ) ) { - KToolBar *bar = static_cast( parent ); + TDEToolBar *bar = static_cast( parent ); bool isLineSep = true; @@ -339,7 +339,7 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo } } - int id = KAction::getToolButtonID(); + int id = TDEAction::getToolButtonID(); if ( isLineSep ) bar->insertLineSeparator( index, id ); @@ -356,7 +356,7 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo } else if ( element.tagName().lower() == d->tagMenuTitle ) { - if ( ::tqqt_cast( parent ) ) + if ( ::tqqt_cast( parent ) ) { TQString i18nText; TQCString text = element.text().utf8(); @@ -379,9 +379,9 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo } if ( !icon.isEmpty() ) - return static_cast(parent)->insertTitle( pix, i18nText, -1, index ); + return static_cast(parent)->insertTitle( pix, i18nText, -1, index ); else - return static_cast(parent)->insertTitle( i18nText, -1, index ); + return static_cast(parent)->insertTitle( i18nText, -1, index ); } } return 0; @@ -393,8 +393,8 @@ void KXMLGUIBuilder::removeCustomElement( TQWidget *parent, int id ) static_cast(parent)->removeItem( id ); else if ( ::tqqt_cast( parent ) ) static_cast(parent)->removeItem( id ); - else if ( ::tqqt_cast( parent ) ) - static_cast(parent)->removeItemDelayed( id ); + else if ( ::tqqt_cast( parent ) ) + static_cast(parent)->removeItemDelayed( id ); } KXMLGUIClient *KXMLGUIBuilder::builderClient() const @@ -421,18 +421,18 @@ void KXMLGUIBuilder::setBuilderInstance( TDEInstance *instance ) void KXMLGUIBuilder::finalizeGUI( KXMLGUIClient * ) { - if ( !d->m_widget || !::tqqt_cast( d->m_widget ) ) + if ( !d->m_widget || !::tqqt_cast( d->m_widget ) ) return; #if 0 - KToolBar *toolbar = 0; - QListIterator it( ( (KMainWindow*)d->m_widget )->toolBarIterator() ); + TDEToolBar *toolbar = 0; + QListIterator it( ( (TDEMainWindow*)d->m_widget )->toolBarIterator() ); while ( ( toolbar = it.current() ) ) { kdDebug() << "KXMLGUIBuilder::finalizeGUI toolbar=" << (void*)toolbar << endl; ++it; toolbar->positionYourself(); } #else - static_cast(d->m_widget)->finalizeGUI( false ); + static_cast(d->m_widget)->finalizeGUI( false ); #endif } diff --git a/tdeui/kxmlguibuilder.h b/tdeui/kxmlguibuilder.h index 657add5f8..885bb1058 100644 --- a/tdeui/kxmlguibuilder.h +++ b/tdeui/kxmlguibuilder.h @@ -32,8 +32,8 @@ class KXMLGUIClient; /** * Abstract interface for a "GUI builder", used by the GUIFactory - * This interface is implemented by KMainWindow for the case where - * the toplevel widget is a KMainWindow. Other implementations may appear + * This interface is implemented by TDEMainWindow for the case where + * the toplevel widget is a TDEMainWindow. Other implementations may appear * in the future (dialogs for instance) */ class TDEUI_EXPORT KXMLGUIBuilder diff --git a/tdeui/kxmlguiclient.cpp b/tdeui/kxmlguiclient.cpp index da22e83fb..853a9ee52 100644 --- a/tdeui/kxmlguiclient.cpp +++ b/tdeui/kxmlguiclient.cpp @@ -53,7 +53,7 @@ public: TDEInstance *m_instance; TQDomDocument m_doc; - KActionCollection *m_actionCollection; + TDEActionCollection *m_actionCollection; TQDomDocument m_buildDocument; TQGuardedPtr m_factory; KXMLGUIClient *m_parent; @@ -90,9 +90,9 @@ KXMLGUIClient::~KXMLGUIClient() delete d; } -KAction *KXMLGUIClient::action( const char *name ) const +TDEAction *KXMLGUIClient::action( const char *name ) const { - KAction* act = actionCollection()->action( name ); + TDEAction* act = actionCollection()->action( name ); if ( !act ) { TQPtrListIterator childIt( d->m_children ); for (; childIt.current(); ++childIt ) { @@ -104,17 +104,17 @@ KAction *KXMLGUIClient::action( const char *name ) const return act; } -KActionCollection *KXMLGUIClient::actionCollection() const +TDEActionCollection *KXMLGUIClient::actionCollection() const { if ( !d->m_actionCollection ) { - d->m_actionCollection = new KActionCollection( - "KXMLGUIClient-KActionCollection", this ); + d->m_actionCollection = new TDEActionCollection( + "KXMLGUIClient-TDEActionCollection", this ); } return d->m_actionCollection; } -KAction *KXMLGUIClient::action( const TQDomElement &element ) const +TDEAction *KXMLGUIClient::action( const TQDomElement &element ) const { static const TQString &attrName = TDEGlobal::staticQString( "name" ); return actionCollection()->action( element.attribute( attrName ).latin1() ); @@ -248,7 +248,7 @@ void KXMLGUIClient::setDOMDocument( const TQDomDocument &document, bool merge ) setXMLGUIBuildDocument( TQDomDocument() ); } -bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, KActionCollection *actionCollection ) +bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, TDEActionCollection *actionCollection ) { static const TQString &tagAction = TDEGlobal::staticQString( "Action" ); static const TQString &tagMerge = TDEGlobal::staticQString( "Merge" ); @@ -292,7 +292,7 @@ bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, { TQCString name = e.attribute( attrName ).utf8(); // WABA if ( !actionCollection->action( name.data() ) || - (kapp && !kapp->authorizeKAction(name))) + (kapp && !kapp->authorizeTDEAction(name))) { // remove this child as we aren't using it base.removeChild( e ); @@ -602,7 +602,7 @@ KXMLGUIBuilder *KXMLGUIClient::clientBuilder() const return d->m_builder; } -void KXMLGUIClient::plugActionList( const TQString &name, const TQPtrList &actionList ) +void KXMLGUIClient::plugActionList( const TQString &name, const TQPtrList &actionList ) { if ( !d->m_factory ) return; @@ -908,7 +908,7 @@ void KXMLGUIClient::stateChanged(const TQString &newstate, KXMLGUIClient::Revers for ( TQStringList::Iterator it = stateChange.actionsToEnable.begin(); it != stateChange.actionsToEnable.end(); ++it ) { - KAction *action = actionCollection()->action((*it).latin1()); + TDEAction *action = actionCollection()->action((*it).latin1()); if (action) action->setEnabled(setTrue); } @@ -917,7 +917,7 @@ void KXMLGUIClient::stateChanged(const TQString &newstate, KXMLGUIClient::Revers for ( TQStringList::Iterator it = stateChange.actionsToDisable.begin(); it != stateChange.actionsToDisable.end(); ++it ) { - KAction *action = actionCollection()->action((*it).latin1()); + TDEAction *action = actionCollection()->action((*it).latin1()); if (action) action->setEnabled(setFalse); } diff --git a/tdeui/kxmlguiclient.h b/tdeui/kxmlguiclient.h index 78c412602..9fa3951a7 100644 --- a/tdeui/kxmlguiclient.h +++ b/tdeui/kxmlguiclient.h @@ -27,8 +27,8 @@ #include class TQWidget; -class KAction; -class KActionCollection; +class TDEAction; +class TDEActionCollection; class TDEInstance; class KXMLGUIClientPrivate; class KXMLGUIFactory; @@ -74,25 +74,25 @@ public: * This method is provided for convenience, as it uses actionCollection() * to get the action object. */ - KAction* action( const char* name ) const; + TDEAction* action( const char* name ) const; /** * Retrieves an action for a given TQDomElement. The default * implementation uses the "name" attribute to query the action * object via the other action() method. */ - virtual KAction *action( const TQDomElement &element ) const; + virtual TDEAction *action( const TQDomElement &element ) const; /** * Retrieves the entire action collection for the GUI client. If * you subclass KXMLGUIClient you should call - * KActionCollection::setWidget( TQWidget* ) with this object, or - * you will encounter subtle bugs with KAction keyboard shortcuts. - * This is not necessary if your KXMLGUIClient is a KMainWindow. + * TDEActionCollection::setWidget( TQWidget* ) with this object, or + * you will encounter subtle bugs with TDEAction keyboard shortcuts. + * This is not necessary if your KXMLGUIClient is a TDEMainWindow. * - * @see KActionCollection::setWidget( TQWidget* ) + * @see TDEActionCollection::setWidget( TQWidget* ) */ - virtual KActionCollection* actionCollection() const; + virtual TDEActionCollection* actionCollection() const; /** * @return The instance ( TDEInstance ) for this GUI client. @@ -218,7 +218,7 @@ public: * This tag will get expanded to a list of actions. In the example * above ( a file manager with a dynamic file menu ), you would call * \code - * TQPtrList file_actions; + * TQPtrList file_actions; * for( ... ) * if( ... ) * file_actions.append( cool_action ); @@ -234,7 +234,7 @@ public: * plugActionList() would leave the previous actions in the * menu too.. */ - void plugActionList( const TQString &name, const TQPtrList &actionList ); + void plugActionList( const TQString &name, const TQPtrList &actionList ); /** * The complement of plugActionList() ... @@ -342,7 +342,7 @@ private: }; bool mergeXML( TQDomElement &base, const TQDomElement &additive, - KActionCollection *actionCollection ); + TDEActionCollection *actionCollection ); TQDomElement findMatchingElement( const TQDomElement &base, const TQDomElement &additive ); diff --git a/tdeui/kxmlguifactory.cpp b/tdeui/kxmlguifactory.cpp index 78b918862..d7d166f78 100644 --- a/tdeui/kxmlguifactory.cpp +++ b/tdeui/kxmlguifactory.cpp @@ -368,7 +368,7 @@ void KXMLGUIFactory::removeClient( KXMLGUIClient *client ) // reset some variables d->BuildState::reset(); - // This will destruct the KAccel object built around the given widget. + // This will destruct the TDEAccel object built around the given widget. client->prepareXMLUnplug( d->builder->widget() ); d->popState(); @@ -468,7 +468,7 @@ TQPtrList KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node, } void KXMLGUIFactory::plugActionList( KXMLGUIClient *client, const TQString &name, - const TQPtrList &actionList ) + const TQPtrList &actionList ) { d->pushState(); d->guiClient = client; @@ -506,7 +506,7 @@ void KXMLGUIFactory::applyActionProperties( const TQDomElement &actionPropElemen if ( e.tagName().lower() != tagAction ) continue; - KAction *action = d->guiClient->action( e ); + TDEAction *action = d->guiClient->action( e ); if ( !action ) continue; @@ -514,7 +514,7 @@ void KXMLGUIFactory::applyActionProperties( const TQDomElement &actionPropElemen } } -void KXMLGUIFactory::configureAction( KAction *action, const TQDomNamedNodeMap &attributes ) +void KXMLGUIFactory::configureAction( TDEAction *action, const TQDomNamedNodeMap &attributes ) { for ( uint i = 0; i < attributes.length(); i++ ) { @@ -526,7 +526,7 @@ void KXMLGUIFactory::configureAction( KAction *action, const TQDomNamedNodeMap & } } -void KXMLGUIFactory::configureAction( KAction *action, const TQDomAttr &attribute ) +void KXMLGUIFactory::configureAction( TDEAction *action, const TQDomAttr &attribute ) { static const TQString &attrShortcut = TDEGlobal::staticQString( "shortcut" ); diff --git a/tdeui/kxmlguifactory.h b/tdeui/kxmlguifactory.h index bf49c6b60..2f225b5ba 100644 --- a/tdeui/kxmlguifactory.h +++ b/tdeui/kxmlguifactory.h @@ -28,7 +28,7 @@ #include -class KAction; +class TDEAction; class KXMLGUIFactoryPrivate; class KXMLGUIClient; class KXMLGUIBuilder; @@ -52,7 +52,7 @@ class BuildHelper; * and merging the GUI from an unlimited number of clients. * * Each client provides XML through a TQDomDocument and actions through a - * KActionCollection . The XML document contains the rules for how to merge the + * TDEActionCollection . The XML document contains the rules for how to merge the * GUI. * * KXMLGUIFactory processes the DOM tree provided by a client and plugs in the client's actions, @@ -124,7 +124,7 @@ class TDEUI_EXPORT KXMLGUIFactory : public TQObject */ void removeClient( KXMLGUIClient *client ); - void plugActionList( KXMLGUIClient *client, const TQString &name, const TQPtrList &actionList ); + void plugActionList( KXMLGUIClient *client, const TQString &name, const TQPtrList &actionList ); void unplugActionList( KXMLGUIClient *client, const TQString &name ); /** @@ -206,8 +206,8 @@ class TDEUI_EXPORT KXMLGUIFactory : public TQObject TQPtrList findRecursive( KXMLGUI::ContainerNode *node, const TQString &tagName ); void applyActionProperties( const TQDomElement &element ); - void configureAction( KAction *action, const TQDomNamedNodeMap &attributes ); - void configureAction( KAction *action, const TQDomAttr &attribute ); + void configureAction( TDEAction *action, const TQDomNamedNodeMap &attributes ); + void configureAction( TDEAction *action, const TQDomAttr &attribute ); protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdeui/kxmlguifactory_p.cpp b/tdeui/kxmlguifactory_p.cpp index 522fb659d..ffe9ffab1 100644 --- a/tdeui/kxmlguifactory_p.cpp +++ b/tdeui/kxmlguifactory_p.cpp @@ -388,7 +388,7 @@ void ContainerNode::unplugActions( BuildState &state ) ContainerClientListIt clientIt( clients ); /* - Disabled because it means in KToolBar::saveState isHidden is always true then, + Disabled because it means in TDEToolBar::saveState isHidden is always true then, which is clearly wrong. if ( clients.count() == 1 && clientIt.current()->client == client && @@ -606,7 +606,7 @@ bool BuildHelper::processActionElement( const TQDomElement &e, int idx ) assert( m_state.guiClient ); // look up the action and plug it in - KAction *action = m_state.guiClient->action( e ); + TDEAction *action = m_state.guiClient->action( e ); //kdDebug() << "BuildHelper::processActionElement " << e.attribute( "name" ) << " -> " << action << " (in " << m_state.guiClient->actionCollection() << ")" << endl; if ( !action ) diff --git a/tdeui/kxmlguifactory_p.h b/tdeui/kxmlguifactory_p.h index dc263b677..769d674c8 100644 --- a/tdeui/kxmlguifactory_p.h +++ b/tdeui/kxmlguifactory_p.h @@ -36,21 +36,21 @@ namespace KXMLGUI struct BuildState; -class TDEUI_EXPORT ActionList : public TQPtrList +class TDEUI_EXPORT ActionList : public TQPtrList { public: ActionList() {} - ActionList( const TQPtrList &rhs ) - : TQPtrList( rhs ) + ActionList( const TQPtrList &rhs ) + : TQPtrList( rhs ) {} - ActionList &operator=( const TQPtrList &rhs ) - { TQPtrList::operator=( rhs ); return *this; } + ActionList &operator=( const TQPtrList &rhs ) + { TQPtrList::operator=( rhs ); return *this; } void plug( TQWidget *container, int index ) const; void unplug( TQWidget *container ) const; }; -typedef TQPtrListIterator ActionListIt; +typedef TQPtrListIterator ActionListIt; typedef TQMap< TQString, ActionList > ActionListMap; /* diff --git a/tdeui/tdespelldlg.h b/tdeui/tdespelldlg.h index c42476814..9b0da8205 100644 --- a/tdeui/tdespelldlg.h +++ b/tdeui/tdespelldlg.h @@ -26,7 +26,7 @@ class TQStringList; class TQLabel; class TQListViewItem; class TQPushButton; -class KListBox; +class TDEListBox; class KLineEdit; class KProgress; @@ -51,7 +51,7 @@ class TDEUI_EXPORT KSpellDlg : public KDialogBase KSpellDlgPrivate *d; KLineEdit *editbox; KProgress *progbar; - KListBox *listbox; + TDEListBox *listbox; TQStringList *sugg; TQPushButton *qpbrep, *qpbrepa; TQLabel *wordlabel; diff --git a/tdeui/tests/itemcontainertest.cpp b/tdeui/tests/itemcontainertest.cpp index bb0c0338b..c3bfcbe95 100644 --- a/tdeui/tests/itemcontainertest.cpp +++ b/tdeui/tests/itemcontainertest.cpp @@ -1,5 +1,5 @@ /* -* Tests the item container widgets KIconView, KListView, KListBox +* Tests the item container widgets KIconView, TDEListView, TDEListBox * * Copyright (c) 2000 by Michael Reiher * @@ -88,7 +88,7 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) m_plblItem = new TQLabel( gbItem ); vBox->addWidget( gbItem ); - TQButtonGroup* bgListView = new TQButtonGroup( 1, Qt::Horizontal, "KListView", this); + TQButtonGroup* bgListView = new TQButtonGroup( 1, Qt::Horizontal, "TDEListView", this); TQCheckBox* cbListView = new TQCheckBox("Single Column", bgListView); vBox->addWidget( bgListView ); connect( cbListView, TQT_SIGNAL( toggled( bool ) ), @@ -105,8 +105,8 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) this, TQT_SLOT( slotIconViewExec( TQIconViewItem* ) ) ); //Create ListView - TQGroupBox* gbListView = new TQGroupBox( 1, Qt::Horizontal, "KListView", this); - m_pListView = new KListView( gbListView ); + TQGroupBox* gbListView = new TQGroupBox( 1, Qt::Horizontal, "TDEListView", this); + m_pListView = new TDEListView( gbListView ); m_pListView->addColumn("Item"); m_pListView->addColumn("Text"); hBox->addWidget( gbListView ); @@ -115,8 +115,8 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) this, TQT_SLOT( slotListViewExec( TQListViewItem* ) ) ); //Create ListBox - TQGroupBox* gbListBox = new TQGroupBox( 1, Qt::Horizontal, "KListBox", this); - m_pListBox = new KListBox( gbListBox ); + TQGroupBox* gbListBox = new TQGroupBox( 1, Qt::Horizontal, "TDEListBox", this); + m_pListBox = new TDEListBox( gbListBox ); hBox->addWidget( gbListBox ); connect( m_pListBox, TQT_SIGNAL( executed( TQListBoxItem* ) ), this, TQT_SLOT( slotListBoxExec( TQListBoxItem* ) ) ); @@ -153,22 +153,22 @@ void TopLevel::slotSwitchMode( int id ) case TopLevel::NoSelection: m_pIconView->setSelectionMode( KIconView::NoSelection ); m_pListView->setSelectionMode( TQListView::NoSelection ); - m_pListBox->setSelectionMode( KListBox::NoSelection ); + m_pListBox->setSelectionMode( TDEListBox::NoSelection ); break; case TopLevel::Single: m_pIconView->setSelectionMode( KIconView::Single ); m_pListView->setSelectionMode( TQListView::Single ); - m_pListBox->setSelectionMode( KListBox::Single ); + m_pListBox->setSelectionMode( TDEListBox::Single ); break; case TopLevel::Multi: m_pIconView->setSelectionMode( KIconView::Multi ); m_pListView->setSelectionMode( TQListView::Multi ); - m_pListBox->setSelectionMode( KListBox::Multi ); + m_pListBox->setSelectionMode( TDEListBox::Multi ); break; case TopLevel::Extended: m_pIconView->setSelectionMode( KIconView::Extended ); m_pListView->setSelectionMode( TQListView::Extended ); - m_pListBox->setSelectionMode( KListBox::Extended ); + m_pListBox->setSelectionMode( TDEListBox::Extended ); break; default: Q_ASSERT(0); @@ -187,7 +187,7 @@ void TopLevel::slotIconViewExec( TQIconViewItem* item ) void TopLevel::slotListViewExec( TQListViewItem* item ) { - m_plblWidget->setText("KListView"); + m_plblWidget->setText("TDEListView"); m_plblSignal->setText("executed"); if( item ) m_plblItem->setText( item->text(0) ); @@ -197,7 +197,7 @@ void TopLevel::slotListViewExec( TQListViewItem* item ) void TopLevel::slotListBoxExec( TQListBoxItem* item ) { - m_plblWidget->setText("KListBox"); + m_plblWidget->setText("TDEListBox"); m_plblSignal->setText("executed"); if( item ) m_plblItem->setText( item->text() ); diff --git a/tdeui/tests/itemcontainertest.h b/tdeui/tests/itemcontainertest.h index 86a356ab3..3abc0e0a0 100644 --- a/tdeui/tests/itemcontainertest.h +++ b/tdeui/tests/itemcontainertest.h @@ -4,8 +4,8 @@ #include class KIconView; -class KListView; -class KListBox; +class TDEListView; +class TDEListBox; class TQButtonGroup; class TQLabel; @@ -32,8 +32,8 @@ public slots: void slotDoubleClicked( TQIconViewItem* ) { tqDebug("DOUBLE CLICK");} protected: KIconView* m_pIconView; - KListView* m_pListView; - KListBox* m_pListBox; + TDEListView* m_pListView; + TDEListBox* m_pListBox; TQButtonGroup* m_pbgView; TQButtonGroup* m_pbgMode; diff --git a/tdeui/tests/kaccelgentest.cpp b/tdeui/tests/kaccelgentest.cpp index f5f95ac57..783a0f36f 100644 --- a/tdeui/tests/kaccelgentest.cpp +++ b/tdeui/tests/kaccelgentest.cpp @@ -30,7 +30,7 @@ int main() << "&yoyo && dyne"; TQStringList output; - KAccelGen::generate( input, output ); + TDEAccelGen::generate( input, output ); check( "TQStringList value generation", expected, output ); TQMap map; @@ -39,13 +39,13 @@ int main() } input.sort(); expected.clear(); - KAccelGen::generate( input, expected ); + TDEAccelGen::generate( input, expected ); output.clear(); - KAccelGen::generateFromValues( map, output ); + TDEAccelGen::generateFromValues( map, output ); check( "map value generation", expected, output ); output.clear(); - KAccelGen::generateFromKeys( map, output ); + TDEAccelGen::generateFromKeys( map, output ); check( "map key generation", expected, output ); } diff --git a/tdeui/tests/kactiontest.cpp b/tdeui/tests/kactiontest.cpp index 238f912c5..73a108ab0 100644 --- a/tdeui/tests/kactiontest.cpp +++ b/tdeui/tests/kactiontest.cpp @@ -10,15 +10,15 @@ int main( int argc, char **argv ) { TDEApplication app( argc, argv, "kactiontest" ); - KActionCollection coll( static_cast( 0 ) ); - - TQGuardedPtr action1 = new KRadioAction("test",0, &coll); - TQGuardedPtr action2 = new KRadioAction("test",0, &coll); - TQGuardedPtr action3 = new KRadioAction("test",0, &coll); - TQGuardedPtr action4 = new KRadioAction("test",0, &coll); - TQGuardedPtr action5 = new KRadioAction("test",0, &coll); - TQGuardedPtr action6 = new KRadioAction("test",0, &coll); - TQGuardedPtr action7 = new KRadioAction("test",0, &coll); + TDEActionCollection coll( static_cast( 0 ) ); + + TQGuardedPtr action1 = new TDERadioAction("test",0, &coll); + TQGuardedPtr action2 = new TDERadioAction("test",0, &coll); + TQGuardedPtr action3 = new TDERadioAction("test",0, &coll); + TQGuardedPtr action4 = new TDERadioAction("test",0, &coll); + TQGuardedPtr action5 = new TDERadioAction("test",0, &coll); + TQGuardedPtr action6 = new TDERadioAction("test",0, &coll); + TQGuardedPtr action7 = new TDERadioAction("test",0, &coll); coll.clear(); assert( coll.isEmpty() ); diff --git a/tdeui/tests/kdockwidgettest.cpp b/tdeui/tests/kdockwidgettest.cpp index dfe9bfff7..bfed1bdd2 100644 --- a/tdeui/tests/kdockwidgettest.cpp +++ b/tdeui/tests/kdockwidgettest.cpp @@ -184,7 +184,7 @@ void DockApplication::initMenuBar() void DockApplication::initToolBars() { TQPixmap p(folder); - KToolBar* tool_bar_0 = toolBar(0); + TDEToolBar* tool_bar_0 = toolBar(0); tool_bar_0->setFullSize(false); tool_bar_0->insertButton( p, 1 ); tool_bar_0->insertButton(p, 2 ); diff --git a/tdeui/tests/kfontdialogtest.cpp b/tdeui/tests/kfontdialogtest.cpp index 0b3d4eb30..66f0b3664 100644 --- a/tdeui/tests/kfontdialogtest.cpp +++ b/tdeui/tests/kfontdialogtest.cpp @@ -31,19 +31,19 @@ int main( int argc, char **argv ) { - TDEApplication app( argc, argv, "KFontDialogTest" ); + TDEApplication app( argc, argv, "TDEFontDialogTest" ); TDEConfig aConfig; - aConfig.setGroup( "KFontDialog-test" ); + aConfig.setGroup( "TDEFontDialog-test" ); app.setFont(TQFont("Helvetica",12)); // TQFont font = TQFont("Times",18,TQFont::Bold); TQFont font = aConfig.readFontEntry( "Chosen" ); - int nRet = KFontDialog::getFont(font); + int nRet = TDEFontDialog::getFont(font); int flags; - nRet = KFontDialog::getFontDiff(font, flags); + nRet = TDEFontDialog::getFontDiff(font, flags); aConfig.writeEntry( "Chosen", font, true ); aConfig.sync(); diff --git a/tdeui/tests/klistviewtest.cpp b/tdeui/tests/klistviewtest.cpp index 9fc108e52..4be086af6 100644 --- a/tdeui/tests/klistviewtest.cpp +++ b/tdeui/tests/klistviewtest.cpp @@ -8,8 +8,8 @@ int main( int argc, char **argv ) { TDEApplication app( argc, argv, "klistviewtest" ); KDialogBase dialog; - KListView *view = new KListView( dialog.makeVBoxMainWidget() ); - view->setSelectionModeExt( KListView::FileManager ); + TDEListView *view = new TDEListView( dialog.makeVBoxMainWidget() ); + view->setSelectionModeExt( TDEListView::FileManager ); view->setDragEnabled( true ); view->setItemsMovable( false ); view->setAcceptDrops( true ); @@ -17,20 +17,20 @@ int main( int argc, char **argv ) view->addColumn("Column 2"); view->addColumn("Column 3"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 2", "Some more", "Hi Mom :)" ); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 2", "Some more", "Hi Mom :)" ); view->restoreLayout( TDEGlobal::config(), "ListView" ); - new KListViewItem( view, "Item 3" ); + new TDEListViewItem( view, "Item 3" ); dialog.exec(); view->saveLayout( TDEGlobal::config(), "ListView" ); diff --git a/tdeui/tests/kmainwindowrestoretest.h b/tdeui/tests/kmainwindowrestoretest.h index f29ae2fca..938311461 100644 --- a/tdeui/tests/kmainwindowrestoretest.h +++ b/tdeui/tests/kmainwindowrestoretest.h @@ -3,45 +3,45 @@ #include -class MainWin1 : public KMainWindow { +class MainWin1 : public TDEMainWindow { Q_OBJECT public: - MainWin1() : KMainWindow() {} + MainWin1() : TDEMainWindow() {} virtual ~MainWin1() {} }; -class MainWin2 : public KMainWindow { +class MainWin2 : public TDEMainWindow { Q_OBJECT public: - MainWin2() : KMainWindow() {} + MainWin2() : TDEMainWindow() {} virtual ~MainWin2() {} }; -class MainWin3 : public KMainWindow { +class MainWin3 : public TDEMainWindow { Q_OBJECT public: - MainWin3() : KMainWindow() {} + MainWin3() : TDEMainWindow() {} virtual ~MainWin3() {} }; -class MainWin4 : public KMainWindow { +class MainWin4 : public TDEMainWindow { Q_OBJECT public: - MainWin4() : KMainWindow() {} + MainWin4() : TDEMainWindow() {} virtual ~MainWin4() {} }; -class MainWin5 : public KMainWindow { +class MainWin5 : public TDEMainWindow { Q_OBJECT public: - MainWin5() : KMainWindow() {} + MainWin5() : TDEMainWindow() {} virtual ~MainWin5() {} }; -class MainWin6 : public KMainWindow { +class MainWin6 : public TDEMainWindow { Q_OBJECT public: - MainWin6() : KMainWindow() {} + MainWin6() : TDEMainWindow() {} virtual ~MainWin6() {} }; diff --git a/tdeui/tests/kmainwindowtest.h b/tdeui/tests/kmainwindowtest.h index 4fb426ac5..21ca2fe7e 100644 --- a/tdeui/tests/kmainwindowtest.h +++ b/tdeui/tests/kmainwindowtest.h @@ -3,7 +3,7 @@ #include -class MainWindow : public KMainWindow +class MainWindow : public TDEMainWindow { Q_OBJECT public: diff --git a/tdeui/tests/kpopuptest.cpp b/tdeui/tests/kpopuptest.cpp index e5d01c985..89c932f46 100644 --- a/tdeui/tests/kpopuptest.cpp +++ b/tdeui/tests/kpopuptest.cpp @@ -5,7 +5,7 @@ class DemoWidget : public TQWidget { private: - KPopupMenu *menu; + TDEPopupMenu *menu; void mousePressEvent(TQMouseEvent *) { @@ -20,7 +20,7 @@ void paintEvent(TQPaintEvent *) public: DemoWidget() : TQWidget() { - menu = new KPopupMenu("Popup Menu:"); + menu = new TDEPopupMenu("Popup Menu:"); menu->insertItem("Item1"); menu->insertItem("Item2"); menu->insertSeparator(); diff --git a/tdeui/tests/krulertest.cpp b/tdeui/tests/krulertest.cpp index f227301b9..628c5096e 100644 --- a/tdeui/tests/krulertest.cpp +++ b/tdeui/tests/krulertest.cpp @@ -51,7 +51,7 @@ MouseWidget::resizeEvent( TQResizeEvent *r ) KRulerTest::KRulerTest( const char *name ) - : KMainWindow(0, name) + : TDEMainWindow(0, name) { mainframe = new TQFrame(this); diff --git a/tdeui/tests/krulertest.h b/tdeui/tests/krulertest.h index d180e93a0..67a9ae7e0 100644 --- a/tdeui/tests/krulertest.h +++ b/tdeui/tests/krulertest.h @@ -42,7 +42,7 @@ private: }; -class KRulerTest : public KMainWindow +class KRulerTest : public TDEMainWindow { Q_OBJECT public: diff --git a/tdeui/tests/kstatusbartest.cpp b/tdeui/tests/kstatusbartest.cpp index 742490aae..507604480 100644 --- a/tdeui/tests/kstatusbartest.cpp +++ b/tdeui/tests/kstatusbartest.cpp @@ -16,7 +16,7 @@ #include "kstatusbartest.h" testWindow::testWindow (TQWidget *, const char *name) - : KMainWindow (0, name) + : TDEMainWindow (0, name) { // Setup Menus menuBar = new KMenuBar (this); diff --git a/tdeui/tests/kstatusbartest.h b/tdeui/tests/kstatusbartest.h index 37f500334..809f3f643 100644 --- a/tdeui/tests/kstatusbartest.h +++ b/tdeui/tests/kstatusbartest.h @@ -8,7 +8,7 @@ class TQMultiLineEdit; -class testWindow : public KMainWindow +class testWindow : public TDEMainWindow { Q_OBJECT diff --git a/tdeui/tests/ktoolbarlabelactiontest.cpp b/tdeui/tests/ktoolbarlabelactiontest.cpp index 617808f40..9596e9d32 100644 --- a/tdeui/tests/ktoolbarlabelactiontest.cpp +++ b/tdeui/tests/ktoolbarlabelactiontest.cpp @@ -30,7 +30,7 @@ #include -class MainWindow : public KMainWindow +class MainWindow : public TDEMainWindow { public: MainWindow() @@ -47,7 +47,7 @@ public: // first constructor - KToolBarLabelAction* label1 = new KToolBarLabelAction("&Label 1", 0, + TDEToolBarLabelAction* label1 = new TDEToolBarLabelAction("&Label 1", 0, 0, 0, actionCollection(), "label1"); @@ -55,8 +55,8 @@ public: KLineEdit* lineEdit = new KLineEdit(this); new KWidgetAction(lineEdit, "Line Edit", 0, this, 0, actionCollection(), "lineEdit"); - KToolBarLabelAction* label2 = - new KToolBarLabelAction(lineEdit, "L&abel 2", 0, 0, 0, + TDEToolBarLabelAction* label2 = + new TDEToolBarLabelAction(lineEdit, "L&abel 2", 0, 0, 0, actionCollection(), "label2"); @@ -69,7 +69,7 @@ public: ("&Really long, long, long and boring text goes here", this, "kde toolbar widget"); - KToolBarLabelAction* label3 = new KToolBarLabelAction(customLabel, 0, 0, 0, + TDEToolBarLabelAction* label3 = new TDEToolBarLabelAction(customLabel, 0, 0, 0, actionCollection(), "label3"); diff --git a/tdeui/tests/kxmlguitest.cpp b/tdeui/tests/kxmlguitest.cpp index 4c9e83bc1..17f7daac9 100644 --- a/tdeui/tests/kxmlguitest.cpp +++ b/tdeui/tests/kxmlguitest.cpp @@ -24,7 +24,7 @@ int main( int argc, char **argv ) // Let's add $PWD (ideally $srcdir instead...) to it TDEGlobal::dirs()->addResourceDir( "data", TQDir::currentDirPath() ); - KMainWindow *mainwindow = new KMainWindow; + TDEMainWindow *mainwindow = new TDEMainWindow; TQLineEdit* line = new TQLineEdit( mainwindow ); mainwindow->setCentralWidget( line ); @@ -39,7 +39,7 @@ int main( int argc, char **argv ) shell->setInstance( new TDEInstance( "konqueror" ) ); shell->instance()->dirs()->addResourceDir( "data", TQDir::currentDirPath() ); - (void)new KAction( "Split", "view_left_right", 0, 0, 0, shell->actionCollection(), "splitviewh" ); + (void)new TDEAction( "Split", "view_left_right", 0, 0, 0, shell->actionCollection(), "splitviewh" ); shell->setXMLFile( "./kxmlguitest_shell.rc" ); @@ -47,8 +47,8 @@ int main( int argc, char **argv ) Client *part = new Client; - (void)new KAction( "decfont", "viewmag-", 0, 0, 0, part->actionCollection(), "decFontSizes" ); - (void)new KAction( "sec", "unlock", Qt::ALT + Qt::Key_1, part, TQT_SLOT( slotSec() ), part->actionCollection(), "security" ); + (void)new TDEAction( "decfont", "viewmag-", 0, 0, 0, part->actionCollection(), "decFontSizes" ); + (void)new TDEAction( "sec", "unlock", Qt::ALT + Qt::Key_1, part, TQT_SLOT( slotSec() ), part->actionCollection(), "security" ); part->setXMLFile( "./kxmlguitest_part.rc" ); diff --git a/tdeui/tests/twindowtest.cpp b/tdeui/tests/twindowtest.cpp index 32027bce1..0ad1b726b 100644 --- a/tdeui/tests/twindowtest.cpp +++ b/tdeui/tests/twindowtest.cpp @@ -26,19 +26,19 @@ //#include /* - Ok this is a constructor of our top widget. It inherits KMainWindow. + Ok this is a constructor of our top widget. It inherits TDEMainWindow. In constructor wi will create all of our interface elements: menubar, toolbar(s), statusbar, and main widget. Non of those interface is obligatory, i.e. you don't have to use menubar, toolbars or statusbar if you don't want to. Theoreticly, you don't need even main widget (but in that case, you'll get blank - KMainWindow). + TDEMainWindow). */ static int itemId = 0; testWindow::testWindow (TQWidget *parent, const char *name) - : KMainWindow (parent,name) + : TDEMainWindow (parent,name) { ena=false; setCaption("test window"); @@ -153,7 +153,7 @@ setAutoSaveSettings(); tb->alignItemRight (6); // Another toolbar - tb1 = new KToolBar(this, TQMainWindow::DockTop); // this one is normal and has separators + tb1 = new TDEToolBar(this, TQMainWindow::DockTop); // this one is normal and has separators pix = BarIcon("filenew"); @@ -194,7 +194,7 @@ setAutoSaveSettings(); tb1->setToggle(7); //Create - rg = new KToolBarRadioGroup (tb1); + rg = new TDEToolBarRadioGroup (tb1); rg->addButton(4); rg->addButton(5); @@ -230,7 +230,7 @@ setAutoSaveSettings(); //... and main widget setCentralWidget (widget); - // This is not strictly related to toolbars, menubars or KMainWindow. + // This is not strictly related to toolbars, menubars or TDEMainWindow. // Setup popup for completions completions = new TQPopupMenu; @@ -328,7 +328,7 @@ void testWindow::slotCompletion() completions->popup(TQCursor::pos()); // This popup should understunf keys up and down /* This is just an example. KLined automatically sets cursor at end of string - when ctrl-d or ctrl-s is pressed. KToolBar will also put cursor at end of text in Lined + when ctrl-d or ctrl-s is pressed. TDEToolBar will also put cursor at end of text in Lined after inserting text with setLinedText (...). */ diff --git a/tdeui/tests/twindowtest.h b/tdeui/tests/twindowtest.h index 14e2a6da8..f0dad1537 100644 --- a/tdeui/tests/twindowtest.h +++ b/tdeui/tests/twindowtest.h @@ -10,10 +10,10 @@ #include class TQMultiLineEdit; -class KToolBarRadioGroup; +class TDEToolBarRadioGroup; class KHelpMenu; -class testWindow : public KMainWindow +class testWindow : public TDEMainWindow { Q_OBJECT @@ -56,8 +56,8 @@ protected: TQPopupMenu *toolBarMenu; KStatusBar *statusBar; KHelpMenu *helpMenu; - KToolBar *tb; - KToolBar *tb1; + TDEToolBar *tb; + TDEToolBar *tb1; bool lineL; bool exitB; bool greenF; @@ -65,7 +65,7 @@ protected: TQMultiLineEdit *widget; TQTimer *timer; TQProgressBar *pr; - KToolBarRadioGroup *rg; + TDEToolBarRadioGroup *rg; }; #endif diff --git a/tdeui/twindowlistmenu.cpp b/tdeui/twindowlistmenu.cpp index b1d05c57e..e23cf18da 100644 --- a/tdeui/twindowlistmenu.cpp +++ b/tdeui/twindowlistmenu.cpp @@ -83,7 +83,7 @@ int NameSortedInfoList::compareItems( TQPtrCollection::Item s1, TQPtrCollection: } // namespace KWindowListMenu::KWindowListMenu(TQWidget *parent, const char *name) - : KPopupMenu(parent, name) + : TDEPopupMenu(parent, name) { twin_module = new KWinModule(TQT_TQOBJECT(this)); @@ -251,7 +251,7 @@ void KWindowListMenu::slotCascadeWindows() } void KWindowListMenu::virtual_hook( int id, void* data ) -{ KPopupMenu::virtual_hook( id, data ); } +{ TDEPopupMenu::virtual_hook( id, data ); } #endif // Q_WS_X11 diff --git a/tdeui/twindowlistmenu.h b/tdeui/twindowlistmenu.h index dcd81826f..b0b3634f3 100644 --- a/tdeui/twindowlistmenu.h +++ b/tdeui/twindowlistmenu.h @@ -37,7 +37,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class KWinModule; class KWindowListMenuPrivate; -class TDEUI_EXPORT KWindowListMenu : public KPopupMenu +class TDEUI_EXPORT KWindowListMenu : public TDEPopupMenu { Q_OBJECT -- cgit v1.2.1