diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:13:01 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:13:01 -0600 |
commit | deac2ca49faed824fe83066080714eb6d653615b (patch) | |
tree | 8b5bf97c5acaaf5285985b87fa76dbea0f35e4fa | |
parent | 0c9d97065a3d6ceb12d687555a1a33d90db96238 (diff) | |
download | tdelibs-deac2ca49faed824fe83066080714eb6d653615b.tar.gz tdelibs-deac2ca49faed824fe83066080714eb6d653615b.zip |
Rename a number of classes to enhance compatibility with KDE4
424 files changed, 5904 insertions, 5904 deletions
diff --git a/KDE2PORTING.html b/KDE2PORTING.html index e77898f37..63692b613 100644 --- a/KDE2PORTING.html +++ b/KDE2PORTING.html @@ -26,7 +26,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P> <LI><A HREF="#KIconLoader">KIconLoader</A></LI> <LI><A HREF="#KTMainWindow">KTMainWindow</A></LI> <LI><A HREF="#KHelpMenu">KHelpMenu</A></LI> -<LI><A HREF="#KToolBar">KToolBar</A></LI> +<LI><A HREF="#TDEToolBar">TDEToolBar</A></LI> <LI><A HREF="#launching">Starting other programs</A></LI> <LI><A HREF="#tdehtmlw">tdehtmlw</A></LI> <LI><A HREF="#KIntegerLine">KIntegerLine, KIntLineEdit</A></LI> @@ -45,8 +45,8 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P> <LI><A HREF="#KQuickHelp">KQuickHelp</A></LI> <LI><A HREF="#KPixmapgradientFill">KPixmap::gradientFill</A></LI> <LI><A HREF="#KTabListBox">KTabListBox</A></LI> -<LI><A HREF="#KToolBarButton">KToolBarButton & KRadioGroup</A></LI> -<LI><A HREF="#KAccel">KAccel</A></LI> +<LI><A HREF="#TDEToolBarButton">TDEToolBarButton & TDERadioGroup</A></LI> +<LI><A HREF="#TDEAccel">TDEAccel</A></LI> <LI><A HREF="#kstring">kstring.h / KString</A></LI> <LI><A HREF="#ktopwidget">ktopwidget.h / KTopWidget</A></LI> <LI><A HREF="#kbutton">kbutton.h / KButton</A></LI> @@ -142,8 +142,8 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P> The methods tempSaveName() and checkRecoverFile() return QString now. The returned values must _not_ be free()d.<P> - helpMenu() has been moved to KMainWindow. aboutKDE(), aboutApp() and - appHelpActivated() have all been removed See section for KMainWindow + helpMenu() has been moved to TDEMainWindow. aboutKDE(), aboutApp() and + appHelpActivated() have all been removed See section for TDEMainWindow for more info.<P> The TDEApplication constructor has changed. Command line arguments and @@ -248,9 +248,9 @@ in stripping off the .xpm part<P> <H3><A NAME="KTMainWindow">KTMainWindow</A></H3> -KTMainWindow has been replaced with KMainWindow.<p> +KTMainWindow has been replaced with TDEMainWindow.<p> -The KMainWindow constructor needs a parent widget as first argument. +The TDEMainWindow constructor needs a parent widget as first argument. You can use 0 for this.<p> setView() has been replaced with setCentralWidget().<p> view() has been replaced with centralWidget().<p> @@ -271,12 +271,12 @@ mainViewGeometry() instead.<P> <H3><A NAME="KHelpMenu">KHelpMenu</A></H3> -helpMenu() has been moved to KMainWindow from TDEApplication (kapp).<P> +helpMenu() has been moved to TDEMainWindow from TDEApplication (kapp).<P> Both the "About KDE" and the "About <Application>" dialog boxes are now modeless. "About KDE" is a completely new widget.<P> -If you used in the toplevel window (that is derived from KMainWindow) +If you used in the toplevel window (that is derived from TDEMainWindow) "kapp->helpMenu( bool, TQString )" to get the help menu you must now change this to "helpMenu( TQString )". The TQString defaults to TQString::null so it is sufficient to write helpMenu().<P> @@ -284,13 +284,13 @@ to TQString::null so it is sufficient to write helpMenu().<P> The old aboutKDE(), aboutApp() and appHelpActivated() of TDEApplication have all been removed. If you need direct access to these or need access to a help menu in a class that is not derived from -KMainWindow then allocate an instance of the new class KHelpMenu. +TDEMainWindow then allocate an instance of the new class KHelpMenu. See KDE 2.0 API reference or khelpmenu.h (tdeui) for additional info.<P> Espen Sand <<A HREF="mailto:espen@kde.org">espen@kde.org</A>><P> <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> -<H3><A NAME="KToolBar">KToolBar</A></H3> +<H3><A NAME="TDEToolBar">TDEToolBar</A></H3> enable(...) is depreciated, use show()/hide() instead.<p> enableFloating(...) has been removed, use enableMoving() instead.<p> @@ -588,7 +588,7 @@ this:<P> <TABLE><TR><TD> TQSplitter *split = new TQSplitter( parent );<BR> TQListBox *lb = new TQListBox( split );<BR> - KListView *lv = new KListView( split );<BR> + TDEListView *lv = new TDEListView( split );<BR> TQMultiLineEdit *ed = new TQMultiLineEdit( split ); </TD></TR></TABLE> @@ -600,17 +600,17 @@ possible if you call setOpaqueResize(true).<P> <H3><A NAME="KTreeList">KTreeList, KTreeListItem</A></H3> -Use KListView, TQListViewItem instead. API is almost the same, you only -need to add a Column (KListView::addColum) before KListView is useable.<P> +Use TDEListView, TQListViewItem instead. API is almost the same, you only +need to add a Column (TDEListView::addColum) before TDEListView is useable.<P> -KListView has no addChild(), insertItem() and removeItem() calls. Inserting -a root item is done by constructing a TQListViewItem with the KListView +TDEListView has no addChild(), insertItem() and removeItem() calls. Inserting +a root item is done by constructing a TQListViewItem with the TDEListView passed as the parent widget. adding a child item is done by constructing a TQListViewItem with the parent item as parameter. removeItem() should be replaced by delete <pointer to item>.<P> The root items are not shown in a tree fashion by default. to get this, -use KListView::setDecorativeRoot(true).<P> +use TDEListView::setDecorativeRoot(true).<P> Expanding and collapsing can by done by using TQListViewItem::setOpen(bool).<P> @@ -685,24 +685,24 @@ unbalancedGradient(), hash(), desaturate(), pattern(), fade(), blend() etc.<P> <H3><A NAME="KTabListBox">KTabListBox</A></H3> -This widget has been replaced by the almighty KListView. Everything said +This widget has been replaced by the almighty TDEListView. Everything said about KTreeList could be repeated here. The good thing is, that you now can combine TreeView's and normal Tablists without problems.<P> <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> -<H3><A NAME="KToolBarButton">KToolBarButton & KRadioGroup</A></H3> +<H3><A NAME="TDEToolBarButton">TDEToolBarButton & TDERadioGroup</A></H3> -If you need to do anything with KToolBarButton you now need to include -<ktoolbarbutton.h> KRadioGroup has been renamed to KToolBarRadioGroup and +If you need to do anything with TDEToolBarButton you now need to include +<ktoolbarbutton.h> TDERadioGroup has been renamed to TDEToolBarRadioGroup and requires you to include <ktoolbarradiogroup.h><P> <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> -<H3><A NAME="KAccel">KAccel</A></H3> +<H3><A NAME="TDEAccel">TDEAccel</A></H3> The functions keyToString() and stringToKey() which were previously -declared globally in kaccel.h are now static methods in KAccel.<P> +declared globally in kaccel.h are now static methods in TDEAccel.<P> <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> @@ -716,7 +716,7 @@ The file has been removed completely, use TQString instead. (<A HREF="mailto:mir <H3><A NAME="ktopwidget">ktopwidget.h / KTopWidget</A></H3> -KMainWindow replaces this class completely. ktopwidget.h does not +TDEMainWindow replaces this class completely. ktopwidget.h does not exist in KDE 2. (<A HREF="mailto:mirko@kde.org">mirko@kde.org</A>)<P> <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> @@ -754,7 +754,7 @@ Please adjust your code accordingly.<P> <H3><A NAME="KDockWidget">KDockWidget</A></H3> -KDockWidget inherits form KMainWindow instead of KTMainWindow now. +KDockWidget inherits form TDEMainWindow instead of KTMainWindow now. See <A HREF="KTMainWindow">KTMainWindow</A> for more details. <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> diff --git a/KDE3PORTING.html b/KDE3PORTING.html index b3fdff0d0..407d5c5ad 100644 --- a/KDE3PORTING.html +++ b/KDE3PORTING.html @@ -148,11 +148,11 @@ should be replaced with methods from TDELocale::calendar(). cases be replaced by methods in TDELocale::calendar(). <H4>Accelerators Keys</H4> -<h5>KAccel</h5> +<h5>TDEAccel</h5> The following methods of been deprecated, and if KDE_NO_COMPAT is defined they will not be available. <ul> - <li> KAccel::insertItem() and KAccel::connectItem(). + <li> TDEAccel::insertItem() and TDEAccel::connectItem(). <pre> - kaccel->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" ); - kaccel->connectItem( "Scroll Up", this, TQT_SLOT(scrollUp()) ); @@ -163,19 +163,19 @@ not be available. You might replace the TQString::null parameter with <pre> i18n("Scroll the current document's contents up by one line.") </pre> for example.</li> - <li> KAccel::changeMenuAccel() has been deprecated because it was + <li> TDEAccel::changeMenuAccel() has been deprecated because it was never used in cvs. If you've used it in your application, the following can replace it. Note, however, that this would be handled automatically - by using KAction instead. + by using TDEAction instead. <pre> - kaccel->changeMenuAccel( menu, id, "file_open" ); + menu->setAccel( kaccel->shortcut( "file_open" ).keyCodeQt(), id ); </pre> </li> </ul> -The preferred means of defining a shortcut, however, is to use <b>KAction</b>. +The preferred means of defining a shortcut, however, is to use <b>TDEAction</b>. <pre> - new KAction( i18n("Scroll Up"), Key_Up, + new TDEAction( i18n("Scroll Up"), Key_Up, this, TQT_SLOT(scrollUp()), actionCollection(), "Scroll Up" ); </pre> @@ -189,25 +189,25 @@ The preferred means of defining a shortcut, however, is to use <b>KAction</b>. shortcut reassignments, which in turn used to make an expensive ungrab of the old key and second grab of the new key necessary.</li> </ul> -<h5>KStdAccel</h5> +<h5>TDEStdAccel</h5> <ul> <li><i>StdAccel::WhatThis</i> has been renamed to <i>StdAccel::WhatsThis</i>. <li><i>StdAccel::Insert</i> and the corresponding <i>insert()</i> have been removed. (Nobody on the list knew what its function was supposed to be.) Calls to <i>insert()</i> and the equivalent - <i>key(KStdAccel::Insert)</i> can be replaced with the former default + <i>key(TDEStdAccel::Insert)</i> can be replaced with the former default of <i>Qt::CTRL+Qt::Key_Insert</i>.</li> <li>The following functions have been deprecated and will need to be changed if KDE_NO_COMPAT is defined: <table border=1> <tr><th>Old</th><th>New</th></tr> <tr><td>TQString action(StdAccel id)</td><td>TQString name(StdAccel id)</td></tr> - <tr><td>int defaultKey(StdAccel accel)</td><td>KShortcut shortcutDefault(StdAccel id)</td></tr> + <tr><td>int defaultKey(StdAccel accel)</td><td>TDEShortcut shortcutDefault(StdAccel id)</td></tr> <tr><td>TQString description(StdAccel id)</td><td>TQString label(StdAccel id)</td></tr> <tr><td>bool isEqual(const TQKeyEvent* pEvent, int keyQt)</td> <td>The best method for replacing this varies. One possibility is to use <i>KKey(const TQKeyEvent*) == KKey(int)</i>. Another is to use - <i>KShortcut::contains( const KKey&/KKeySequence& )</i>.</td></tr> - <tr><td>int key(StdAccel)</td><td>const KShortcut& shortcut(StdAccel)</td></tr> + <i>TDEShortcut::contains( const KKey&/KKeySequence& )</i>.</td></tr> + <tr><td>int key(StdAccel)</td><td>const TDEShortcut& shortcut(StdAccel)</td></tr> </table></li--> </ul> @@ -221,27 +221,27 @@ KURLBar and KURLBarItem. <H3><A NAME="tdeui">Changes in tdeui</A></H3> -<H4>KAccelMenu</H4> +<H4>TDEAccelMenu</H4> This class has been removed, Qt offers the same functionality. -Use QPopupMenu/KPopupMenu or the XML-UI method for building menus. +Use QPopupMenu/TDEPopupMenu or the XML-UI method for building menus. -<H4>KAction</H4> +<H4>TDEAction</H4> <ul> <li>The following methods have been deprecated and will need to be replaced if KDE_NO_COMPAT is defined. <table border=1> <tr><th>Old</th><th>New</th></tr> - <tr><td>int accel()</td><td>const KShortcut& shortcut()</td></tr> + <tr><td>int accel()</td><td>const TDEShortcut& shortcut()</td></tr> <tr><td>int menuId()</td><td>int itemId()</td></tr> - <tr><td>void setAccel(int)</td><td>void setShortcut(const KShortcut&)</td></tr> + <tr><td>void setAccel(int)</td><td>void setShortcut(const TDEShortcut&)</td></tr> </table></li> </ul> -<h4>KActionCollection</h4> +<h4>TDEActionCollection</h4> <ul> - <li>When constructing a KActionCollection object, a pointer to the focus widget should be passed.</li> + <li>When constructing a TDEActionCollection object, a pointer to the focus widget should be passed.</li> <li>The insert(), remove(), and take() methods have been deprecated. - If you wish to keep a list of actions, use the KActionPtrList container instead. + If you wish to keep a list of actions, use the TDEActionPtrList container instead. If you want to configure the shortcuts from multiple actions collections, pass each collection to KKeyChooser or KKeyDialog via their insert() methods.</li> </ul> @@ -322,24 +322,24 @@ KThemeBase and KThemeStyle have been ported over to the new QStyle/KStyle API present in Qt3/KDE3. KThemeBase is no longer in tdeui, but in kstyles/kthemestyle as its use is basically limited to KThemeStyle. -<H4>KAction, KToolBar, KToolBarButton and icons</H4> +<H4>TDEAction, TDEToolBar, TDEToolBarButton and icons</H4> The preferred way for specifying icons is passing the icon names (and the icons will be loaded by KIconLoader), instead of using TQIconSet or TQPixmap. This results in always using the correct icon size and allows delayed on-demand icon loading. <p> -Method KAction::hasIconSet() has been renamed to KAction::hasIcon(), the old name will still work unless KDE_NO_COMPAT is defined. -KAction::iconSet() now has an argument specifying icon group, the old KAction::iconSet() is still available unless KDE_NO_COMPAT +Method TDEAction::hasIconSet() has been renamed to TDEAction::hasIcon(), the old name will still work unless KDE_NO_COMPAT is defined. +TDEAction::iconSet() now has an argument specifying icon group, the old TDEAction::iconSet() is still available unless KDE_NO_COMPAT is defined and returns KIcon::Small iconset, just like in KDE2. <p> -KToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), setDefaultIcon() and setDisabledIcon() are deprecated. -Use KToolBarButton::setIcon() (preferred) or KToolBarButton::setIconSet() instead. +TDEToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), setDefaultIcon() and setDisabledIcon() are deprecated. +Use TDEToolBarButton::setIcon() (preferred) or TDEToolBarButton::setIconSet() instead. -<H4>KAction and derived classes</H4> +<H4>TDEAction and derived classes</H4> The protected set* methods have been renamed to update* and they now take only one argument (i.e. setText(int, const TQString&) is now updateText(int) ). Because the former second argument was always the value of the a corresponding data member, you can simply call the accessor method (i.e. in updateText() call text() to get the text). -<H4>KToggleAction</H4> +<H4>TDEToggleAction</H4> exclusiveGroup() is no more virtual. setExclusiveGroup(const TQString&) is not a slot anymore. @@ -563,7 +563,7 @@ flexibility and efficiency. <br><br> Sorting has changed radically. Previously, KFileView had protected methods QuickSort, compareItems() and mergeLists() to sort directory entries for displaying in the views. Now, -KFileView does not do any sorting anymore. Instead, the view's (i.e. KIconView, KListView) +KFileView does not do any sorting anymore. Instead, the view's (i.e. KIconView, TDEListView) sorting is utilized by letting its view-items provide a TQString key() method. Therefore, KFileView offers the two methods <ul> @@ -33,7 +33,7 @@ that we would like to make for the next binary incompatible release. - Clean up the uses of virtual_hook, use normal virtuals instead (e.g. KZip/KArchive) -- Make it possible to create a KSystemTray without a KMainWindow and instead lazily +- Make it possible to create a KSystemTray without a TDEMainWindow and instead lazily create the main window on demand. - Make KSystemTray's Quit option in the context menu call kapp->quit() instead of @@ -94,12 +94,12 @@ that we would like to make for the next binary incompatible release. QFont/QPoint/QSize is cheap enough to justify a consistent and usable API (IMHO) . Keep source compatibility. -- Sort out reference counting of applications and KMainWindows: Add a setRefCountEnabled() +- Sort out reference counting of applications and TDEMainWindows: Add a setRefCountEnabled() function to TDEApplication; deref()ing the last reference should only quit the application if reference counts are enabled, and the reference count should be disabled by default - so apps that don't use a KMainWindow mostly continue to work. Make the KMainWindow - constructor call setRefCountEnabled(true), and make each KMainWindow hold its own - reference to the application. The KMainWindow should drop its app reference on hide, and + so apps that don't use a TDEMainWindow mostly continue to work. Make the TDEMainWindow + constructor call setRefCountEnabled(true), and make each TDEMainWindow hold its own + reference to the application. The TDEMainWindow should drop its app reference on hide, and regain it on show. Make KSysTray also hold a reference to the app. Then apps that use more than one main @@ -159,7 +159,7 @@ that we would like to make for the next binary incompatible release. - Make API use US English, (eg. KCatalogue -> KCatalog) -- It would be nice if some insan^H^H^H brave soul had a look at the KAccel/KShortcut/KKeyWhatever +- It would be nice if some insan^H^H^H brave soul had a look at the TDEAccel/TDEShortcut/KKeyWhatever classes and cleaned it up. - KKeyDialog needs to be improved. It should simplify using KKeyChooser by not having to instantiate @@ -209,7 +209,7 @@ an alternative help->contents action) - Dump KPixmapIO class. QPixmap with qt-copy patches #0005 and #0007 can perform just as well, KPixmapIO can't dither, and it generally doesn't make much sense to have this class. -- KListView: merge setDropHighlighter and setDropVisualizer, add a setDnDMode to choose between +- TDEListView: merge setDropHighlighter and setDropVisualizer, add a setDnDMode to choose between "dnd to move items" (e.g. keditbookmarks) and "dnd onto items" (e.g. kmail). Unless Qt4 does it all :) - Move TDEIO::findDeviceMountPoint, findPathMoundPoint, probably_slow_mounted, and testFileSystemFlag to KMountPoint, diff --git a/arts/kde/kvideowidget.cpp b/arts/kde/kvideowidget.cpp index bc17f32d8..a4307dbbf 100644 --- a/arts/kde/kvideowidget.cpp +++ b/arts/kde/kvideowidget.cpp @@ -101,22 +101,22 @@ void KVideoWidget::init(void) videoHeight = 0; // Setup actions - new KToggleAction( i18n("Fullscreen &Mode"), "window_fullscreen", + new TDEToggleAction( i18n("Fullscreen &Mode"), "window_fullscreen", CTRL+SHIFT+Key_F, TQT_TQOBJECT(this), TQT_SLOT(fullscreenActivated()), actionCollection(), "fullscreen_mode" ); - new KRadioAction( i18n("&Half Size"), ALT+Key_0, + new TDERadioAction( i18n("&Half Size"), ALT+Key_0, TQT_TQOBJECT(this), TQT_SLOT(halfSizeActivated()), actionCollection(), "half_size" ); - new KRadioAction( i18n("&Normal Size"), ALT+Key_1, + new TDERadioAction( i18n("&Normal Size"), ALT+Key_1, TQT_TQOBJECT(this), TQT_SLOT(normalSizeActivated()), actionCollection(), "normal_size" ); - new KRadioAction( i18n("&Double Size"), ALT+Key_2, + new TDERadioAction( i18n("&Double Size"), ALT+Key_2, TQT_TQOBJECT(this), TQT_SLOT(doubleSizeActivated()), actionCollection(), "double_size" ); - ((KToggleAction *)action( "half_size" ))->setExclusiveGroup( "KVideoWidget::zoom" ); - ((KToggleAction *)action( "normal_size" ))->setExclusiveGroup( "KVideoWidget::zoom" ); - ((KToggleAction *)action( "double_size" ))->setExclusiveGroup( "KVideoWidget::zoom" ); + ((TDEToggleAction *)action( "half_size" ))->setExclusiveGroup( "KVideoWidget::zoom" ); + ((TDEToggleAction *)action( "normal_size" ))->setExclusiveGroup( "KVideoWidget::zoom" ); + ((TDEToggleAction *)action( "double_size" ))->setExclusiveGroup( "KVideoWidget::zoom" ); action("double_size")->setEnabled(false); action("half_size")->setEnabled(false); @@ -232,29 +232,29 @@ bool KVideoWidget::isEmbedded() bool KVideoWidget::isFullscreen() { - return ((KToggleAction *)action( "fullscreen_mode" ))->isChecked(); + return ((TDEToggleAction *)action( "fullscreen_mode" ))->isChecked(); } bool KVideoWidget::isHalfSize() { - return ((KToggleAction *)action( "half_size" ))->isChecked(); + return ((TDEToggleAction *)action( "half_size" ))->isChecked(); } bool KVideoWidget::isNormalSize() { - return ((KToggleAction *)action( "normal_size" ))->isChecked(); + return ((TDEToggleAction *)action( "normal_size" ))->isChecked(); } bool KVideoWidget::isDoubleSize() { - return ((KToggleAction *)action( "double_size" ))->isChecked(); + return ((TDEToggleAction *)action( "double_size" ))->isChecked(); } void KVideoWidget::setFullscreen() { if (!isFullscreen()) { - ((KToggleAction *)action( "fullscreen_mode" ))->setChecked( true ); + ((TDEToggleAction *)action( "fullscreen_mode" ))->setChecked( true ); fullscreenActivated(); } } @@ -263,26 +263,26 @@ void KVideoWidget::setWindowed() { if (isFullscreen()) { - ((KToggleAction *)action( "fullscreen_mode" ))->setChecked( false ); + ((TDEToggleAction *)action( "fullscreen_mode" ))->setChecked( false ); fullscreenActivated(); } } void KVideoWidget::setHalfSize() { - ((KToggleAction *)action( "half_size" ))->setChecked( true ); + ((TDEToggleAction *)action( "half_size" ))->setChecked( true ); halfSizeActivated(); } void KVideoWidget::setNormalSize() { - ((KToggleAction *)action( "normal_size" ))->setChecked( true ); + ((TDEToggleAction *)action( "normal_size" ))->setChecked( true ); normalSizeActivated(); } void KVideoWidget::setDoubleSize() { - ((KToggleAction *)action( "double_size" ))->setChecked( true ); + ((TDEToggleAction *)action( "double_size" ))->setChecked( true ); doubleSizeActivated(); } @@ -323,18 +323,18 @@ void KVideoWidget::resizeEvent( TQResizeEvent *event ) { if (width() == QMAX( (videoWidth / 2), minimumWidth() ) && height() == QMAX( (videoHeight / 2), minimumHeight() )) - ((KToggleAction *)action( "half_size" ))->setChecked( true ); + ((TDEToggleAction *)action( "half_size" ))->setChecked( true ); else if (width() == QMAX( videoWidth, minimumWidth() ) && height() == QMAX( videoHeight, minimumHeight() )) - ((KToggleAction *)action( "normal_size" ))->setChecked( true ); + ((TDEToggleAction *)action( "normal_size" ))->setChecked( true ); else if (width() == QMAX( (2 * videoWidth), minimumWidth() ) && height() == QMAX( (2 * videoHeight), minimumHeight() )) - ((KToggleAction *)action( "double_size" ))->setChecked( true ); + ((TDEToggleAction *)action( "double_size" ))->setChecked( true ); else { - ((KToggleAction *)action( "half_size" ))->setChecked( false ); - ((KToggleAction *)action( "normal_size" ))->setChecked( false ); - ((KToggleAction *)action( "double_size" ))->setChecked( false ); + ((TDEToggleAction *)action( "half_size" ))->setChecked( false ); + ((TDEToggleAction *)action( "normal_size" ))->setChecked( false ); + ((TDEToggleAction *)action( "double_size" ))->setChecked( false ); } } } diff --git a/dcop/HOWTO b/dcop/HOWTO index 5927f3716..7126d3c1d 100644 --- a/dcop/HOWTO +++ b/dcop/HOWTO @@ -309,8 +309,8 @@ in that case the signal connection will always be deleted. A receiver can create a non-volatile connection while the sender doesn't (yet) exist. An anonymous DCOP connection should always be non-volatile. -The following example shows how KLauncher emits a signal whenever it notices -that an application that was started via KLauncher terminates. +The following example shows how TDELauncher emits a signal whenever it notices +that an application that was started via TDELauncher terminates. QByteArray params; QDataStream stream(params, IO_WriteOnly); @@ -319,7 +319,7 @@ that an application that was started via KLauncher terminates. The task manager of the TDE panel connects to this signal. It uses an anonymous connection (it doesn't require that the signal is being emitted -by KLauncher) that is non-volatile: +by TDELauncher) that is non-volatile: connectDCOPSignal(0, 0, "clientDied(pid_t)", "clientDied(pid_t)", false); diff --git a/dcop/Mainpage.dox b/dcop/Mainpage.dox index 423571280..62fd3cf44 100644 --- a/dcop/Mainpage.dox +++ b/dcop/Mainpage.dox @@ -541,8 +541,8 @@ in that case the signal connection will always be deleted. A receiver can create a non-volatile connection while the sender doesn't (yet) exist. An anonymous DCOP connection should always be non-volatile. -The following example shows how KLauncher emits a signal whenever it notices -that an application that was started via KLauncher terminates: +The following example shows how TDELauncher emits a signal whenever it notices +that an application that was started via TDELauncher terminates: \code QByteArray params; @@ -553,7 +553,7 @@ kapp->dcopClient()->emitDCOPSignal("clientDied(pid_t)", params); The task manager of the Trinity panel connects to this signal. It uses an anonymous connection (it doesn't require that the signal is being emitted -by KLauncher) that is non-volatile: +by TDELauncher) that is non-volatile: \code connectDCOPSignal(0, 0, "clientDied(pid_t)", "clientDied(pid_t)", false); diff --git a/interfaces/tdemediaplayer/player.h b/interfaces/tdemediaplayer/player.h index 493a921e3..05582ca07 100644 --- a/interfaces/tdemediaplayer/player.h +++ b/interfaces/tdemediaplayer/player.h @@ -39,7 +39,7 @@ namespace KMediaPlayer * * There are two servicetypes for Player: KMediaPlayer/Player and * KMediaPlayer/Engine. KMediaPlayer/Player provides a widget (accessable - * through view as well as XML GUI KActions. KMediaPlayer/Engine omits + * through view as well as XML GUI TDEActions. KMediaPlayer/Engine omits * the user interface facets, for those who wish to provide their own * interface. */ diff --git a/interfaces/tdescript/scriptloader.cpp b/interfaces/tdescript/scriptloader.cpp index 1ff34f98a..a11032ada 100644 --- a/interfaces/tdescript/scriptloader.cpp +++ b/interfaces/tdescript/scriptloader.cpp @@ -33,11 +33,11 @@ #include <tqfileinfo.h> -ScriptLoader::ScriptLoader(KMainWindow *parent) : TQObject (parent) +ScriptLoader::ScriptLoader(TDEMainWindow *parent) : TQObject (parent) { m_parent = parent; m_scripts.clear(); - m_theAction = new KSelectAction ( i18n("KDE Scripts"), + m_theAction = new TDESelectAction ( i18n("KDE Scripts"), 0, this, TQT_SLOT(runAction()), @@ -51,7 +51,7 @@ ScriptLoader::~ScriptLoader() m_scripts.clear(); } -KSelectAction * ScriptLoader::getScripts() +TDESelectAction * ScriptLoader::getScripts() { // Get the available scripts for this application. TQStringList pluginList = ""; diff --git a/interfaces/tdescript/scriptloader.h b/interfaces/tdescript/scriptloader.h index a249283d6..d0b338822 100644 --- a/interfaces/tdescript/scriptloader.h +++ b/interfaces/tdescript/scriptloader.h @@ -33,12 +33,12 @@ class ScriptLoader : virtual public QObject /** * Default Constructor */ - ScriptLoader(KMainWindow *parent=0); + ScriptLoader(TDEMainWindow *parent=0); ~ScriptLoader(); - /** Return the a KSelectAction with all of the scripts - * @returns KSelectAction containing access to all of the scripts + /** Return the a TDESelectAction with all of the scripts + * @returns TDESelectAction containing access to all of the scripts */ - KSelectAction *getScripts(); + TDESelectAction *getScripts(); public slots: /** Run the current action. */ @@ -52,8 +52,8 @@ class ScriptLoader : virtual public QObject virtual void done(int errorCode); private: TQPtrList<KScriptInterface> m_scripts; - KSelectAction *m_theAction; + TDESelectAction *m_theAction; int m_currentSelection; - KMainWindow *m_parent; + TDEMainWindow *m_parent; }; #endif diff --git a/interfaces/terminal/test/main.h b/interfaces/terminal/test/main.h index 098c10d54..256b0840a 100644 --- a/interfaces/terminal/test/main.h +++ b/interfaces/terminal/test/main.h @@ -3,7 +3,7 @@ class Win - : public KMainWindow + : public TDEMainWindow { Q_OBJECT KParts::Part* p; diff --git a/kab/kabapi.cc b/kab/kabapi.cc index 622fc708d..245f07c5d 100644 --- a/kab/kabapi.cc +++ b/kab/kabapi.cc @@ -36,7 +36,7 @@ using namespace std; KabAPI::KabAPI(TQWidget* parent, const char* name) : KDialogBase(parent, name), book(0), - listbox(new KListBox(this)), + listbox(new TDEListBox(this)), selection(-1) { TQ_CHECK_PTR(listbox); diff --git a/kab/kabapi.h b/kab/kabapi.h index 6cf46c37e..6204efc39 100644 --- a/kab/kabapi.h +++ b/kab/kabapi.h @@ -22,7 +22,7 @@ class TQPushButton; class TQFrame; -class KListBox; +class TDEListBox; /** * The class KabAPI provides a public interface to access the @@ -189,7 +189,7 @@ protected: /** * This displays the overview over the addresses in the dialog. */ - KListBox* listbox; + TDEListBox* listbox; /** * The index of the selected entry. This value is only valid after the * KabAPI dialog has been executed and accepted by the user. diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index 623d26cf3..c8a1bf51e 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp @@ -66,7 +66,7 @@ AddresseeDialog::AddresseeDialog( TQWidget *parent, bool multiple ) : TQBoxLayout *listLayout = new TQVBoxLayout; topLayout->addLayout( listLayout ); - mAddresseeList = new KListView( topWidget ); + mAddresseeList = new TDEListView( topWidget ); mAddresseeList->addColumn( i18n("Name") ); mAddresseeList->addColumn( i18n("Email") ); mAddresseeList->setAllColumnsShowFocus( true ); @@ -96,7 +96,7 @@ AddresseeDialog::AddresseeDialog( TQWidget *parent, bool multiple ) : topWidget ); selectedLayout->addWidget( selectedGroup ); - mSelectedList = new KListView( selectedGroup ); + mSelectedList = new TDEListView( selectedGroup ); mSelectedList->addColumn( i18n("Name") ); mSelectedList->addColumn( i18n("Email") ); mSelectedList->setAllColumnsShowFocus( true ); diff --git a/kabc/addresseedialog.h b/kabc/addresseedialog.h index ebb4bbfcd..83166b50b 100644 --- a/kabc/addresseedialog.h +++ b/kabc/addresseedialog.h @@ -143,10 +143,10 @@ class KABC_EXPORT AddresseeDialog : public KDialogBase bool mMultiple; - KListView *mAddresseeList; + TDEListView *mAddresseeList; KLineEdit *mAddresseeEdit; - KListView *mSelectedList; + TDEListView *mSelectedList; AddressBook *mAddressBook; diff --git a/kabc/addresslineedit.cpp b/kabc/addresslineedit.cpp index efb0738aa..1affd0997 100644 --- a/kabc/addresslineedit.cpp +++ b/kabc/addresslineedit.cpp @@ -156,12 +156,12 @@ void AddressLineEdit::keyPressEvent(TQKeyEvent *e) { bool accept = false; - if (KStdAccel::shortcut(KStdAccel::SubstringCompletion).contains(KKey(e))) + if (TDEStdAccel::shortcut(TDEStdAccel::SubstringCompletion).contains(KKey(e))) { doCompletion(true); accept = true; } - else if (KStdAccel::shortcut(KStdAccel::TextCompletion).contains(KKey(e))) + else if (TDEStdAccel::shortcut(TDEStdAccel::TextCompletion).contains(KKey(e))) { int len = text().length(); diff --git a/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp b/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp index a8060c17a..15efa5ba6 100644 --- a/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp +++ b/kabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp @@ -293,7 +293,7 @@ AttributesDialog::AttributesDialog( const TQMap<TQString, TQString> &attributes, } } - KAcceleratorManager::manage( this ); + TDEAcceleratorManager::manage( this ); } AttributesDialog::~AttributesDialog() diff --git a/kabc/resourceselectdialog.cpp b/kabc/resourceselectdialog.cpp index 256125cd2..e840e027e 100644 --- a/kabc/resourceselectdialog.cpp +++ b/kabc/resourceselectdialog.cpp @@ -45,7 +45,7 @@ ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, TQWidget *parent, c TQGroupBox *groupBox = new TQGroupBox( 2, Qt::Horizontal, this ); groupBox->setTitle( i18n( "Resources" ) ); - mResourceId = new KListBox( groupBox ); + mResourceId = new TDEListBox( groupBox ); mainLayout->addWidget( groupBox ); diff --git a/kabc/resourceselectdialog.h b/kabc/resourceselectdialog.h index 6441dc247..f5f2d6984 100644 --- a/kabc/resourceselectdialog.h +++ b/kabc/resourceselectdialog.h @@ -26,7 +26,7 @@ #include <kdialog.h> #include <kdemacros.h> -class KListBox; +class TDEListBox; namespace KABC { @@ -48,7 +48,7 @@ class KABC_EXPORT_DEPRECATED ResourceSelectDialog : KDialog static Resource *getResource( AddressBook *ab, TQWidget *parent = 0 ); private: - KListBox *mResourceId; + TDEListBox *mResourceId; TQMap<int, Resource*> mResourceMap; }; diff --git a/kate/interfaces/document.h b/kate/interfaces/document.h index c56600357..4d596fb01 100644 --- a/kate/interfaces/document.h +++ b/kate/interfaces/document.h @@ -77,13 +77,13 @@ class KATEPARTINTERFACES_EXPORT ConfigPage : public KTextEditor::ConfigPage void slotChanged(); }; -class KATEPARTINTERFACES_EXPORT ActionMenu : public KActionMenu +class KATEPARTINTERFACES_EXPORT ActionMenu : public TDEActionMenu { Q_OBJECT public: ActionMenu ( const TQString& text, TQObject* parent = 0, const char* name = 0 ) - : KActionMenu(text, parent, name) { ; }; + : TDEActionMenu(text, parent, name) { ; }; virtual ~ActionMenu () { ; }; public: diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp index ed9a6169b..792c53385 100644 --- a/kate/part/kateautoindent.cpp +++ b/kate/part/kateautoindent.cpp @@ -159,7 +159,7 @@ KateAutoIndent::~KateAutoIndent () //BEGIN KateViewIndentAction KateViewIndentationAction::KateViewIndentationAction(KateDocument *_doc, const TQString& text, TQObject* parent, const char* name) - : KActionMenu (text, parent, name), doc(_doc) + : TDEActionMenu (text, parent, name), doc(_doc) { connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow())); } diff --git a/kate/part/kateautoindent.h b/kate/part/kateautoindent.h index 6c0d15d45..abdab7777 100644 --- a/kate/part/kateautoindent.h +++ b/kate/part/kateautoindent.h @@ -190,9 +190,9 @@ class KateAutoIndent : public TQObject /** * This action provides a list of available indenters and gets plugged - * into the KateView's KActionCollection. + * into the KateView's TDEActionCollection. */ -class KateViewIndentationAction : public KActionMenu +class KateViewIndentationAction : public TDEActionMenu { Q_OBJECT diff --git a/kate/part/katebookmarks.cpp b/kate/part/katebookmarks.cpp index ac1ee73d9..d3fb52a72 100644 --- a/kate/part/katebookmarks.cpp +++ b/kate/part/katebookmarks.cpp @@ -71,34 +71,34 @@ KateBookmarks::~KateBookmarks() { } -void KateBookmarks::createActions( KActionCollection* ac ) +void KateBookmarks::createActions( TDEActionCollection* ac ) { - m_bookmarkToggle = new KToggleAction( + m_bookmarkToggle = new TDEToggleAction( i18n("Set &Bookmark"), "bookmark", CTRL+Key_B, this, TQT_SLOT(toggleBookmark()), ac, "bookmarks_toggle" ); m_bookmarkToggle->setWhatsThis(i18n("If a line has no bookmark then add one, otherwise remove it.")); m_bookmarkToggle->setCheckedState( i18n("Clear &Bookmark") ); - m_bookmarkClear = new KAction( + m_bookmarkClear = new TDEAction( i18n("Clear &All Bookmarks"), 0, this, TQT_SLOT(clearBookmarks()), ac, "bookmarks_clear"); m_bookmarkClear->setWhatsThis(i18n("Remove all bookmarks of the current document.")); - m_goNext = new KAction( + m_goNext = new TDEAction( i18n("Next Bookmark"), "next", ALT + Key_PageDown, this, TQT_SLOT(goNext()), ac, "bookmarks_next"); m_goNext->setWhatsThis(i18n("Go to the next bookmark.")); - m_goPrevious = new KAction( + m_goPrevious = new TDEAction( i18n("Previous Bookmark"), "previous", ALT + Key_PageUp, this, TQT_SLOT(goPrevious()), ac, "bookmarks_previous"); m_goPrevious->setWhatsThis(i18n("Go to the previous bookmark.")); - m_bookmarksMenu = (new KActionMenu(i18n("&Bookmarks"), ac, "bookmarks"))->popupMenu(); + m_bookmarksMenu = (new TDEActionMenu(i18n("&Bookmarks"), ac, "bookmarks"))->popupMenu(); //connect the aboutToShow() and aboutToHide() signals with //the bookmarkMenuAboutToShow() and bookmarkMenuAboutToHide() slots diff --git a/kate/part/katebookmarks.h b/kate/part/katebookmarks.h index 63928800e..ae4151812 100644 --- a/kate/part/katebookmarks.h +++ b/kate/part/katebookmarks.h @@ -29,9 +29,9 @@ namespace KTextEditor { class Mark; } namespace Kate { class View; } -class KAction; -class KToggleAction; -class KActionCollection; +class TDEAction; +class TDEToggleAction; +class TDEActionCollection; class TQPopupMenu; class TQMenuData; @@ -44,7 +44,7 @@ class KateBookmarks : public TQObject KateBookmarks( KateView* parent, Sorting sort=Position ); virtual ~KateBookmarks(); - void createActions( KActionCollection* ); + void createActions( TDEActionCollection* ); KateBookmarks::Sorting sorting() { return m_sorting; }; void setSorting( Sorting s ) { m_sorting = s; }; @@ -69,10 +69,10 @@ class KateBookmarks : public TQObject private: KateView* m_view; - KToggleAction* m_bookmarkToggle; - KAction* m_bookmarkClear; - KAction* m_goNext; - KAction* m_goPrevious; + TDEToggleAction* m_bookmarkToggle; + TDEAction* m_bookmarkClear; + TDEAction* m_goNext; + TDEAction* m_goPrevious; Sorting m_sorting; TQPopupMenu* m_bookmarksMenu; diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp index 5006ddd6c..099dad99d 100644 --- a/kate/part/katedialogs.cpp +++ b/kate/part/katedialogs.cpp @@ -1095,7 +1095,7 @@ void KatePartPluginListItem::stateChange(bool b) //BEGIN PluginListView KatePartPluginListView::KatePartPluginListView(TQWidget *parent, const char *name) - : KListView(parent, name) + : TDEListView(parent, name) { } diff --git a/kate/part/katedialogs.h b/kate/part/katedialogs.h index fc9fa0a1a..c97f45d9a 100644 --- a/kate/part/katedialogs.h +++ b/kate/part/katedialogs.h @@ -52,13 +52,13 @@ namespace TDEIO class TransferJob; } -class KAccel; +class TDEAccel; class KColorButton; class KComboBox; class KIntNumInput; class KKeyButton; class KKeyChooser; -class KMainWindow; +class TDEMainWindow; class KPushButton; class KRegExpDialog; class KIntNumInput; @@ -235,7 +235,7 @@ class KateEditKeyConfiguration: public KateConfigPage bool m_ready; class KateDocument *m_doc; KKeyChooser* m_keyChooser; - class KActionCollection *m_ac; + class TDEActionCollection *m_ac; }; class KateSaveConfigTab : public KateConfigPage @@ -263,7 +263,7 @@ class KateSaveConfigTab : public KateConfigPage class KatePartPluginListItem; -class KatePartPluginListView : public KListView +class KatePartPluginListView : public TDEListView { Q_OBJECT diff --git a/kate/part/kateprinter.cpp b/kate/part/kateprinter.cpp index 7f4481722..1b264a602 100644 --- a/kate/part/kateprinter.cpp +++ b/kate/part/kateprinter.cpp @@ -888,7 +888,7 @@ void KatePrintHeaderFooter::setHFFont() { TQFont fnt( lFontPreview->font() ); // display a font dialog - if ( KFontDialog::getFont( fnt, false, this ) == KFontDialog::Accepted ) + if ( TDEFontDialog::getFont( fnt, false, this ) == TDEFontDialog::Accepted ) { // change strFont strFont = fnt.toString(); diff --git a/kate/part/kateschema.cpp b/kate/part/kateschema.cpp index 0cb802e97..9a7e4e1ab 100644 --- a/kate/part/kateschema.cpp +++ b/kate/part/kateschema.cpp @@ -541,8 +541,8 @@ KateSchemaConfigFontTab::KateSchemaConfigFontTab( TQWidget *parent, const char * // sizemanagment TQGridLayout *grid = new TQGridLayout( this, 1, 1 ); - m_fontchooser = new KFontChooser ( this, 0L, false, TQStringList(), false ); - m_fontchooser->enableColumn(KFontChooser::StyleList, false); + m_fontchooser = new TDEFontChooser ( this, 0L, false, TQStringList(), false ); + m_fontchooser->enableColumn(TDEFontChooser::StyleList, false); grid->addWidget( m_fontchooser, 0, 0); connect (this, TQT_SIGNAL( changed()), parent->parentWidget(), TQT_SLOT (slotChanged())); @@ -1078,7 +1078,7 @@ void KateStyleListView::showPopupMenu( KateStyleListItem *i, const TQPoint &glob { if ( !dynamic_cast<KateStyleListItem*>(i) ) return; - KPopupMenu m( this ); + TDEPopupMenu m( this ); KateAttribute *is = i->style(); int id; // the title is used, because the menu obscures the context name when diff --git a/kate/part/kateschema.h b/kate/part/kateschema.h index 2e92812de..6675a6bc8 100644 --- a/kate/part/kateschema.h +++ b/kate/part/kateschema.h @@ -90,13 +90,13 @@ class KateSchemaManager }; -class KateViewSchemaAction : public KActionMenu +class KateViewSchemaAction : public TDEActionMenu { Q_OBJECT public: KateViewSchemaAction(const TQString& text, TQObject* parent = 0, const char* name = 0) - : KActionMenu(text, parent, name) { init(); }; + : TDEActionMenu(text, parent, name) { init(); }; ~KateViewSchemaAction(){;}; @@ -226,7 +226,7 @@ class KateSchemaConfigFontTab : public TQWidget void changed(); // connected to parentWidget()->parentWidget() TQT_SLOT(slotChanged) private: - class KFontChooser *m_fontchooser; + class TDEFontChooser *m_fontchooser; FontMap m_fonts; int m_schema; diff --git a/kate/part/katesearch.cpp b/kate/part/katesearch.cpp index a7d37ead5..9d0dc896b 100644 --- a/kate/part/katesearch.cpp +++ b/kate/part/katesearch.cpp @@ -66,7 +66,7 @@ KateSearch::~KateSearch() delete m_arbitraryHLList; } -void KateSearch::createActions( KActionCollection* ac ) +void KateSearch::createActions( TDEActionCollection* ac ) { KStdAction::find( this, TQT_SLOT(find()), ac )->setWhatsThis( i18n("Look up the first occurrence of a piece of text or regular expression.")); diff --git a/kate/part/katesearch.h b/kate/part/katesearch.h index bec9eb51a..5ae92f568 100644 --- a/kate/part/katesearch.h +++ b/kate/part/katesearch.h @@ -37,7 +37,7 @@ class KateView; class KateDocument; class KateSuperRangeList; -class KActionCollection; +class TDEActionCollection; class KateSearch : public TQObject { @@ -87,7 +87,7 @@ class KateSearch : public TQObject KateSearch( KateView* ); ~KateSearch(); - void createActions( KActionCollection* ); + void createActions( TDEActionCollection* ); public slots: void find(); diff --git a/kate/part/katespell.cpp b/kate/part/katespell.cpp index 77e693fa6..53767d672 100644 --- a/kate/part/katespell.cpp +++ b/kate/part/katespell.cpp @@ -51,13 +51,13 @@ KateSpell::~KateSpell() } } -void KateSpell::createActions( KActionCollection* ac ) +void KateSpell::createActions( TDEActionCollection* ac ) { KStdAction::spelling( this, TQT_SLOT(spellcheck()), ac ); - KAction *a = new KAction( i18n("Spelling (from cursor)..."), "spellcheck", 0, this, TQT_SLOT(spellcheckFromCursor()), ac, "tools_spelling_from_cursor" ); + TDEAction *a = new TDEAction( i18n("Spelling (from cursor)..."), "spellcheck", 0, this, TQT_SLOT(spellcheckFromCursor()), ac, "tools_spelling_from_cursor" ); a->setWhatsThis(i18n("Check the document's spelling from the cursor and forward")); - m_spellcheckSelection = new KAction( i18n("Spellcheck Selection..."), "spellcheck", 0, this, TQT_SLOT(spellcheckSelection()), ac, "tools_spelling_selection" ); + m_spellcheckSelection = new TDEAction( i18n("Spellcheck Selection..."), "spellcheck", 0, this, TQT_SLOT(spellcheckSelection()), ac, "tools_spelling_selection" ); m_spellcheckSelection->setWhatsThis(i18n("Check spelling of the selected text")); } diff --git a/kate/part/katespell.h b/kate/part/katespell.h index f5a776c8d..9ce41666c 100644 --- a/kate/part/katespell.h +++ b/kate/part/katespell.h @@ -27,7 +27,7 @@ class KateView; -class KAction; +class TDEAction; class KSpell; class KateSpell : public TQObject @@ -38,7 +38,7 @@ class KateSpell : public TQObject KateSpell( KateView* ); ~KateSpell(); - void createActions( KActionCollection* ); + void createActions( TDEActionCollection* ); void updateActions (); @@ -69,7 +69,7 @@ class KateSpell : public TQObject private: KateView *m_view; - KAction *m_spellcheckSelection; + TDEAction *m_spellcheckSelection; KSpell *m_tdespell; diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp index 22a4799d6..03b1fa5d3 100644 --- a/kate/part/kateview.cpp +++ b/kate/part/kateview.cpp @@ -207,8 +207,8 @@ void KateView::setupConnections() void KateView::setupActions() { - KActionCollection *ac = this->actionCollection (); - KAction *a; + TDEActionCollection *ac = this->actionCollection (); + TDEAction *a; m_toggleWriteLock = 0; @@ -221,7 +221,7 @@ void KateView::setupActions() m_copy = a=KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copy()), ac); a->setWhatsThis(i18n( "Use this command to copy the currently selected text to the system clipboard.")); - m_copyHTML = a = new KAction(i18n("Copy as &HTML"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(copyHTML()), ac, "edit_copy_html"); + m_copyHTML = a = new TDEAction(i18n("Copy as &HTML"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(copyHTML()), ac, "edit_copy_html"); a->setWhatsThis(i18n( "Use this command to copy the currently selected text as HTML to the system clipboard.")); if (!m_doc->readOnly()) @@ -235,56 +235,56 @@ void KateView::setupActions() a=m_editRedo = KStdAction::redo(m_doc, TQT_SLOT(redo()), ac); a->setWhatsThis(i18n("Revert the most recent undo operation")); - (new KAction(i18n("&Word Wrap Document"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(applyWordWrap()), ac, "tools_apply_wordwrap"))->setWhatsThis( + (new TDEAction(i18n("&Word Wrap Document"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(applyWordWrap()), ac, "tools_apply_wordwrap"))->setWhatsThis( i18n("Use this command to wrap all lines of the current document which are longer than the width of the" " current view, to fit into this view.<br><br> This is a static word wrap, meaning it is not updated" " when the view is resized.")); // setup Tools menu - a=new KAction(i18n("&Indent"), "indent", Qt::CTRL+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(indent()), ac, "tools_indent"); + a=new TDEAction(i18n("&Indent"), "indent", Qt::CTRL+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(indent()), ac, "tools_indent"); a->setWhatsThis(i18n("Use this to indent a selected block of text.<br><br>" "You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog.")); - a=new KAction(i18n("&Unindent"), "unindent", Qt::CTRL+Qt::SHIFT+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(unIndent()), ac, "tools_unindent"); + a=new TDEAction(i18n("&Unindent"), "unindent", Qt::CTRL+Qt::SHIFT+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(unIndent()), ac, "tools_unindent"); a->setWhatsThis(i18n("Use this to unindent a selected block of text.")); - a=new KAction(i18n("&Clean Indentation"), 0, TQT_TQOBJECT(this), TQT_SLOT(cleanIndent()), ac, "tools_cleanIndent"); + a=new TDEAction(i18n("&Clean Indentation"), 0, TQT_TQOBJECT(this), TQT_SLOT(cleanIndent()), ac, "tools_cleanIndent"); a->setWhatsThis(i18n("Use this to clean the indentation of a selected block of text (only tabs/only spaces)<br><br>" "You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog.")); - a=new KAction(i18n("&Align"), 0, TQT_TQOBJECT(this), TQT_SLOT(align()), ac, "tools_align"); + a=new TDEAction(i18n("&Align"), 0, TQT_TQOBJECT(this), TQT_SLOT(align()), ac, "tools_align"); a->setWhatsThis(i18n("Use this to align the current line or block of text to its proper indent level.")); - a=new KAction(i18n("C&omment"), CTRL+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(comment()), + a=new TDEAction(i18n("C&omment"), CTRL+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(comment()), ac, "tools_comment"); a->setWhatsThis(i18n("This command comments out the current line or a selected block of text.<BR><BR>" "The characters for single/multiple line comments are defined within the language's highlighting.")); - a=new KAction(i18n("Unco&mment"), CTRL+SHIFT+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(uncomment()), + a=new TDEAction(i18n("Unco&mment"), CTRL+SHIFT+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(uncomment()), ac, "tools_uncomment"); a->setWhatsThis(i18n("This command removes comments from the current line or a selected block of text.<BR><BR>" "The characters for single/multiple line comments are defined within the language's highlighting.")); - a = m_toggleWriteLock = new KToggleAction( + a = m_toggleWriteLock = new TDEToggleAction( i18n("&Read Only Mode"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT( toggleWriteLock() ), ac, "tools_toggle_write_lock" ); a->setWhatsThis( i18n("Lock/unlock the document for writing") ); - a = new KAction( i18n("Uppercase"), CTRL + Qt::Key_U, TQT_TQOBJECT(this), + a = new TDEAction( i18n("Uppercase"), CTRL + Qt::Key_U, TQT_TQOBJECT(this), TQT_SLOT(uppercase()), ac, "tools_uppercase" ); a->setWhatsThis( i18n("Convert the selection to uppercase, or the character to the " "right of the cursor if no text is selected.") ); - a = new KAction( i18n("Lowercase"), CTRL + SHIFT + Qt::Key_U, TQT_TQOBJECT(this), + a = new TDEAction( i18n("Lowercase"), CTRL + SHIFT + Qt::Key_U, TQT_TQOBJECT(this), TQT_SLOT(lowercase()), ac, "tools_lowercase" ); a->setWhatsThis( i18n("Convert the selection to lowercase, or the character to the " "right of the cursor if no text is selected.") ); - a = new KAction( i18n("Capitalize"), CTRL + ALT + Qt::Key_U, TQT_TQOBJECT(this), + a = new TDEAction( i18n("Capitalize"), CTRL + ALT + Qt::Key_U, TQT_TQOBJECT(this), TQT_SLOT(capitalize()), ac, "tools_capitalize" ); a->setWhatsThis( i18n("Capitalize the selection, or the word under the " "cursor if no text is selected.") ); - a = new KAction( i18n("Join Lines"), CTRL + Qt::Key_J, TQT_TQOBJECT(this), + a = new TDEAction( i18n("Join Lines"), CTRL + Qt::Key_J, TQT_TQOBJECT(this), TQT_SLOT( joinLines() ), ac, "tools_join_lines" ); } else @@ -298,7 +298,7 @@ void KateView::setupActions() a=KStdAction::print( m_doc, TQT_SLOT(print()), ac ); a->setWhatsThis(i18n("Print the current document.")); - a=new KAction(i18n("Reloa&d"), "reload", KStdAccel::reload(), TQT_TQOBJECT(this), TQT_SLOT(reloadFile()), ac, "file_reload"); + a=new TDEAction(i18n("Reloa&d"), "reload", TDEStdAccel::reload(), TQT_TQOBJECT(this), TQT_SLOT(reloadFile()), ac, "file_reload"); a->setWhatsThis(i18n("Reload the current document from disk.")); a=KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveAs()), ac); @@ -307,7 +307,7 @@ void KateView::setupActions() a=KStdAction::gotoLine(TQT_TQOBJECT(this), TQT_SLOT(gotoLine()), ac); a->setWhatsThis(i18n("This command opens a dialog and lets you choose a line that you want the cursor to move to.")); - a=new KAction(i18n("&Configure Editor..."), 0, m_doc, TQT_SLOT(configDialog()),ac, "set_confdlg"); + a=new TDEAction(i18n("&Configure Editor..."), 0, m_doc, TQT_SLOT(configDialog()),ac, "set_confdlg"); a->setWhatsThis(i18n("Configure various aspects of this editor.")); KateViewHighlightAction *menu = new KateViewHighlightAction (i18n("&Highlighting"), ac, "set_highlight"); @@ -324,7 +324,7 @@ void KateView::setupActions() new KateViewIndentationAction (m_doc, i18n("&Indentation"),ac,"tools_indentation"); // html export - a = new KAction(i18n("E&xport as HTML..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(exportAsHTML()), ac, "file_export_html"); + a = new TDEAction(i18n("E&xport as HTML..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(exportAsHTML()), ac, "file_export_html"); a->setWhatsThis(i18n("This command allows you to export the current document" " with all highlighting information into a HTML document.")); @@ -334,32 +334,32 @@ void KateView::setupActions() m_deSelect = a=KStdAction::deselect(TQT_TQOBJECT(this), TQT_SLOT(clearSelection()), ac); a->setWhatsThis(i18n("If you have selected something within the current document, this will no longer be selected.")); - a=new KAction(i18n("Enlarge Font"), "viewmag+", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotIncFontSizes()), ac, "incFontSizes"); + a=new TDEAction(i18n("Enlarge Font"), "viewmag+", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotIncFontSizes()), ac, "incFontSizes"); a->setWhatsThis(i18n("This increases the display font size.")); - a=new KAction(i18n("Shrink Font"), "viewmag-", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotDecFontSizes()), ac, "decFontSizes"); + a=new TDEAction(i18n("Shrink Font"), "viewmag-", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotDecFontSizes()), ac, "decFontSizes"); a->setWhatsThis(i18n("This decreases the display font size.")); - a= m_toggleBlockSelection = new KToggleAction( + a= m_toggleBlockSelection = new TDEToggleAction( i18n("Bl&ock Selection Mode"), CTRL + SHIFT + Key_B, TQT_TQOBJECT(this), TQT_SLOT(toggleBlockSelectionMode()), ac, "set_verticalSelect"); a->setWhatsThis(i18n("This command allows switching between the normal (line based) selection mode and the block selection mode.")); - a= m_toggleInsert = new KToggleAction( + a= m_toggleInsert = new TDEToggleAction( i18n("Overwr&ite Mode"), Key_Insert, TQT_TQOBJECT(this), TQT_SLOT(toggleInsert()), ac, "set_insert" ); a->setWhatsThis(i18n("Choose whether you want the text you type to be inserted or to overwrite existing text.")); - KToggleAction *toggleAction; - a= m_toggleDynWrap = toggleAction = new KToggleAction( + TDEToggleAction *toggleAction; + a= m_toggleDynWrap = toggleAction = new TDEToggleAction( i18n("&Dynamic Word Wrap"), Key_F10, TQT_TQOBJECT(this), TQT_SLOT(toggleDynWordWrap()), ac, "view_dynamic_word_wrap" ); a->setWhatsThis(i18n("If this option is checked, the text lines will be wrapped at the view border on the screen.")); - a= m_setDynWrapIndicators = new KSelectAction(i18n("Dynamic Word Wrap Indicators"), 0, ac, "dynamic_word_wrap_indicators"); + a= m_setDynWrapIndicators = new TDESelectAction(i18n("Dynamic Word Wrap Indicators"), 0, ac, "dynamic_word_wrap_indicators"); a->setWhatsThis(i18n("Choose when the Dynamic Word Wrap Indicators should be displayed")); connect(m_setDynWrapIndicators, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(setDynWrapIndicators(int))); @@ -369,14 +369,14 @@ void KateView::setupActions() list2.append(i18n("&Always On")); m_setDynWrapIndicators->setItems(list2); - a= toggleAction=m_toggleFoldingMarkers = new KToggleAction( + a= toggleAction=m_toggleFoldingMarkers = new TDEToggleAction( i18n("Show Folding &Markers"), Key_F9, TQT_TQOBJECT(this), TQT_SLOT(toggleFoldingMarkers()), ac, "view_folding_markers" ); a->setWhatsThis(i18n("You can choose if the codefolding marks should be shown, if codefolding is possible.")); toggleAction->setCheckedState(i18n("Hide Folding &Markers")); - a= m_toggleIconBar = toggleAction = new KToggleAction( + a= m_toggleIconBar = toggleAction = new TDEToggleAction( i18n("Show &Icon Border"), Key_F6, TQT_TQOBJECT(this), TQT_SLOT(toggleIconBorder()), ac, "view_border"); @@ -384,21 +384,21 @@ void KateView::setupActions() a->setWhatsThis(i18n("Show/hide the icon border.<BR><BR> The icon border shows bookmark symbols, for instance.")); toggleAction->setCheckedState(i18n("Hide &Icon Border")); - a= toggleAction=m_toggleLineNumbers = new KToggleAction( + a= toggleAction=m_toggleLineNumbers = new TDEToggleAction( i18n("Show &Line Numbers"), Key_F11, TQT_TQOBJECT(this), TQT_SLOT(toggleLineNumbersOn()), ac, "view_line_numbers" ); a->setWhatsThis(i18n("Show/hide the line numbers on the left hand side of the view.")); toggleAction->setCheckedState(i18n("Hide &Line Numbers")); - a= m_toggleScrollBarMarks = toggleAction = new KToggleAction( + a= m_toggleScrollBarMarks = toggleAction = new TDEToggleAction( i18n("Show Scroll&bar Marks"), 0, TQT_TQOBJECT(this), TQT_SLOT(toggleScrollBarMarks()), ac, "view_scrollbar_marks"); a->setWhatsThis(i18n("Show/hide the marks on the vertical scrollbar.<BR><BR>The marks, for instance, show bookmarks.")); toggleAction->setCheckedState(i18n("Hide Scroll&bar Marks")); - a = toggleAction = m_toggleWWMarker = new KToggleAction( + a = toggleAction = m_toggleWWMarker = new TDEToggleAction( i18n("Show Static &Word Wrap Marker"), 0, TQT_TQOBJECT(this), TQT_SLOT( toggleWWMarker() ), ac, "view_word_wrap_marker" ); @@ -407,13 +407,13 @@ void KateView::setupActions() "wrap column as defined in the editing properties" )); toggleAction->setCheckedState(i18n("Hide Static &Word Wrap Marker")); - a= m_switchCmdLine = new KAction( + a= m_switchCmdLine = new TDEAction( i18n("Switch to Command Line"), Key_F7, TQT_TQOBJECT(this), TQT_SLOT(switchToCmdLine()), ac, "switch_to_cmd_line" ); a->setWhatsThis(i18n("Show/hide the command line on the bottom of the view.")); - a=m_setEndOfLine = new KSelectAction(i18n("&End of Line"), 0, ac, "set_eol"); + a=m_setEndOfLine = new TDESelectAction(i18n("&End of Line"), 0, ac, "set_eol"); a->setWhatsThis(i18n("Choose which line endings should be used, when you save the document")); TQStringList list; list.append("&UNIX"); @@ -437,137 +437,137 @@ void KateView::setupActions() void KateView::setupEditActions() { - m_editActions = new KActionCollection( m_viewInternal, TQT_TQOBJECT(this), "edit_actions" ); - KActionCollection* ac = m_editActions; + m_editActions = new TDEActionCollection( m_viewInternal, TQT_TQOBJECT(this), "edit_actions" ); + TDEActionCollection* ac = m_editActions; - new KAction( + new TDEAction( i18n("Move Word Left"), CTRL + Key_Left, TQT_TQOBJECT(this),TQT_SLOT(wordLeft()), ac, "word_left" ); - new KAction( + new TDEAction( i18n("Select Character Left"), SHIFT + Key_Left, TQT_TQOBJECT(this),TQT_SLOT(shiftCursorLeft()), ac, "select_char_left" ); - new KAction( + new TDEAction( i18n("Select Word Left"), SHIFT + CTRL + Key_Left, TQT_TQOBJECT(this), TQT_SLOT(shiftWordLeft()), ac, "select_word_left" ); - new KAction( + new TDEAction( i18n("Move Word Right"), CTRL + Key_Right, TQT_TQOBJECT(this), TQT_SLOT(wordRight()), ac, "word_right" ); - new KAction( + new TDEAction( i18n("Select Character Right"), SHIFT + Key_Right, TQT_TQOBJECT(this), TQT_SLOT(shiftCursorRight()), ac, "select_char_right" ); - new KAction( + new TDEAction( i18n("Select Word Right"), SHIFT + CTRL + Key_Right, TQT_TQOBJECT(this),TQT_SLOT(shiftWordRight()), ac, "select_word_right" ); - new KAction( + new TDEAction( i18n("Move to Beginning of Line"), Key_Home, TQT_TQOBJECT(this), TQT_SLOT(home()), ac, "beginning_of_line" ); - new KAction( - i18n("Move to Beginning of Document"), KStdAccel::home(), + new TDEAction( + i18n("Move to Beginning of Document"), TDEStdAccel::home(), TQT_TQOBJECT(this), TQT_SLOT(top()), ac, "beginning_of_document" ); - new KAction( + new TDEAction( i18n("Select to Beginning of Line"), SHIFT + Key_Home, TQT_TQOBJECT(this), TQT_SLOT(shiftHome()), ac, "select_beginning_of_line" ); - new KAction( + new TDEAction( i18n("Select to Beginning of Document"), SHIFT + CTRL + Key_Home, TQT_TQOBJECT(this), TQT_SLOT(shiftTop()), ac, "select_beginning_of_document" ); - new KAction( + new TDEAction( i18n("Move to End of Line"), Key_End, TQT_TQOBJECT(this), TQT_SLOT(end()), ac, "end_of_line" ); - new KAction( - i18n("Move to End of Document"), KStdAccel::end(), + new TDEAction( + i18n("Move to End of Document"), TDEStdAccel::end(), TQT_TQOBJECT(this), TQT_SLOT(bottom()), ac, "end_of_document" ); - new KAction( + new TDEAction( i18n("Select to End of Line"), SHIFT + Key_End, TQT_TQOBJECT(this), TQT_SLOT(shiftEnd()), ac, "select_end_of_line" ); - new KAction( + new TDEAction( i18n("Select to End of Document"), SHIFT + CTRL + Key_End, TQT_TQOBJECT(this), TQT_SLOT(shiftBottom()), ac, "select_end_of_document" ); - new KAction( + new TDEAction( i18n("Select to Previous Line"), SHIFT + Key_Up, TQT_TQOBJECT(this), TQT_SLOT(shiftUp()), ac, "select_line_up" ); - new KAction( + new TDEAction( i18n("Scroll Line Up"),"", CTRL + Key_Up, TQT_TQOBJECT(this), TQT_SLOT(scrollUp()), ac, "scroll_line_up" ); - new KAction(i18n("Move to Next Line"), Key_Down, TQT_TQOBJECT(this), TQT_SLOT(down()), + new TDEAction(i18n("Move to Next Line"), Key_Down, TQT_TQOBJECT(this), TQT_SLOT(down()), ac, "move_line_down"); - new KAction(i18n("Move to Previous Line"), Key_Up, TQT_TQOBJECT(this), TQT_SLOT(up()), + new TDEAction(i18n("Move to Previous Line"), Key_Up, TQT_TQOBJECT(this), TQT_SLOT(up()), ac, "move_line_up"); - new KAction(i18n("Move Character Right"), Key_Right, TQT_TQOBJECT(this), + new TDEAction(i18n("Move Character Right"), Key_Right, TQT_TQOBJECT(this), TQT_SLOT(cursorRight()), ac, "move_cursor_right"); - new KAction(i18n("Move Character Left"), Key_Left, TQT_TQOBJECT(this), TQT_SLOT(cursorLeft()), + new TDEAction(i18n("Move Character Left"), Key_Left, TQT_TQOBJECT(this), TQT_SLOT(cursorLeft()), ac, "move_cusor_left"); - new KAction( + new TDEAction( i18n("Select to Next Line"), SHIFT + Key_Down, TQT_TQOBJECT(this), TQT_SLOT(shiftDown()), ac, "select_line_down" ); - new KAction( + new TDEAction( i18n("Scroll Line Down"), CTRL + Key_Down, TQT_TQOBJECT(this), TQT_SLOT(scrollDown()), ac, "scroll_line_down" ); - new KAction( - i18n("Scroll Page Up"), KStdAccel::prior(), + new TDEAction( + i18n("Scroll Page Up"), TDEStdAccel::prior(), TQT_TQOBJECT(this), TQT_SLOT(pageUp()), ac, "scroll_page_up" ); - new KAction( + new TDEAction( i18n("Select Page Up"), SHIFT + Key_PageUp, TQT_TQOBJECT(this), TQT_SLOT(shiftPageUp()), ac, "select_page_up" ); - new KAction( + new TDEAction( i18n("Move to Top of View"), CTRL + Key_PageUp, TQT_TQOBJECT(this), TQT_SLOT(topOfView()), ac, "move_top_of_view" ); - new KAction( + new TDEAction( i18n("Select to Top of View"), CTRL + SHIFT + Key_PageUp, TQT_TQOBJECT(this), TQT_SLOT(shiftTopOfView()), ac, "select_top_of_view" ); - new KAction( - i18n("Scroll Page Down"), KStdAccel::next(), + new TDEAction( + i18n("Scroll Page Down"), TDEStdAccel::next(), TQT_TQOBJECT(this), TQT_SLOT(pageDown()), ac, "scroll_page_down" ); - new KAction( + new TDEAction( i18n("Select Page Down"), SHIFT + Key_PageDown, TQT_TQOBJECT(this), TQT_SLOT(shiftPageDown()), ac, "select_page_down" ); - new KAction( + new TDEAction( i18n("Move to Bottom of View"), CTRL + Key_PageDown, TQT_TQOBJECT(this), TQT_SLOT(bottomOfView()), ac, "move_bottom_of_view" ); - new KAction( + new TDEAction( i18n("Select to Bottom of View"), CTRL + SHIFT + Key_PageDown, TQT_TQOBJECT(this), TQT_SLOT(shiftBottomOfView()), ac, "select_bottom_of_view" ); - new KAction( + new TDEAction( i18n("Move to Matching Bracket"), CTRL + Key_6, TQT_TQOBJECT(this), TQT_SLOT(toMatchingBracket()), ac, "to_matching_bracket" ); - new KAction( + new TDEAction( i18n("Select to Matching Bracket"), SHIFT + CTRL + Key_6, TQT_TQOBJECT(this), TQT_SLOT(shiftToMatchingBracket()), ac, "select_matching_bracket" ); @@ -575,34 +575,34 @@ void KateView::setupEditActions() // anders: shortcuts doing any changes should not be created in browserextension if ( !m_doc->readOnly() ) { - new KAction( + new TDEAction( i18n("Transpose Characters"), CTRL + Key_T, TQT_TQOBJECT(this), TQT_SLOT(transpose()), ac, "transpose_char" ); - new KAction( + new TDEAction( i18n("Delete Line"), CTRL + Key_K, TQT_TQOBJECT(this), TQT_SLOT(killLine()), ac, "delete_line" ); - new KAction( - i18n("Delete Word Left"), KStdAccel::deleteWordBack(), + new TDEAction( + i18n("Delete Word Left"), TDEStdAccel::deleteWordBack(), TQT_TQOBJECT(this), TQT_SLOT(deleteWordLeft()), ac, "delete_word_left" ); - new KAction( - i18n("Delete Word Right"), KStdAccel::deleteWordForward(), + new TDEAction( + i18n("Delete Word Right"), TDEStdAccel::deleteWordForward(), TQT_TQOBJECT(this), TQT_SLOT(deleteWordRight()), ac, "delete_word_right" ); - new KAction(i18n("Delete Next Character"), Key_Delete, + new TDEAction(i18n("Delete Next Character"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(keyDelete()), ac, "delete_next_character"); - KAction *a = new KAction(i18n("Backspace"), Key_Backspace, + TDEAction *a = new TDEAction(i18n("Backspace"), Key_Backspace, TQT_TQOBJECT(this), TQT_SLOT(backspace()), ac, "backspace"); - KShortcut cut = a->shortcut(); + TDEShortcut cut = a->shortcut(); cut.append( KKey( SHIFT + Key_Backspace ) ); a->setShortcut( cut ); } @@ -624,18 +624,18 @@ void KateView::setupEditActions() void KateView::setupCodeFolding() { - KActionCollection *ac=this->actionCollection(); - new KAction( i18n("Collapse Toplevel"), CTRL+SHIFT+Key_Minus, + TDEActionCollection *ac=this->actionCollection(); + new TDEAction( i18n("Collapse Toplevel"), CTRL+SHIFT+Key_Minus, m_doc->foldingTree(),TQT_SLOT(collapseToplevelNodes()),ac,"folding_toplevel"); - new KAction( i18n("Expand Toplevel"), CTRL+SHIFT+Key_Plus, + new TDEAction( i18n("Expand Toplevel"), CTRL+SHIFT+Key_Plus, TQT_TQOBJECT(this),TQT_SLOT(slotExpandToplevel()),ac,"folding_expandtoplevel"); - new KAction( i18n("Collapse One Local Level"), CTRL+Key_Minus, + new TDEAction( i18n("Collapse One Local Level"), CTRL+Key_Minus, TQT_TQOBJECT(this),TQT_SLOT(slotCollapseLocal()),ac,"folding_collapselocal"); - new KAction( i18n("Expand One Local Level"), CTRL+Key_Plus, + new TDEAction( i18n("Expand One Local Level"), CTRL+Key_Plus, TQT_TQOBJECT(this),TQT_SLOT(slotExpandLocal()),ac,"folding_expandlocal"); #ifdef DEBUGACCELS - KAccel* debugAccels = new KAccel(this,TQT_TQOBJECT(this)); + TDEAccel* debugAccels = new TDEAccel(this,TQT_TQOBJECT(this)); debugAccels->insert("KATE_DUMP_REGION_TREE",i18n("Show the code folding region tree"),"","Ctrl+Shift+Alt+D",m_doc,TQT_SLOT(dumpRegionTree())); debugAccels->insert("KATE_TEMPLATE_TEST",i18n("Basic template code test"),"","Ctrl+Shift+Alt+T",m_doc,TQT_SLOT(testTemplateCode())); debugAccels->setEnabled(true); @@ -760,7 +760,7 @@ void KateView::slotReadWriteChanged () << "edit_undo" << "edit_redo" << "tools_spelling_from_cursor" << "tools_spelling_selection"; - KAction *a = 0; + TDEAction *a = 0; for (uint z = 0; z < l.size(); z++) if ((a = actionCollection()->action( l[z].ascii() ))) a->setEnabled (m_doc->isReadWrite()); @@ -1256,7 +1256,7 @@ void KateView::updateFoldingConfig () l << "folding_toplevel" << "folding_expandtoplevel" << "folding_collapselocal" << "folding_expandlocal"; - KAction *a = 0; + TDEAction *a = 0; for (uint z = 0; z < l.size(); z++) if ((a = actionCollection()->action( l[z].ascii() ))) a->setEnabled (m_doc->highlight() && m_doc->highlight()->allowsFolding()); diff --git a/kate/part/kateview.h b/kate/part/kateview.h index 1d6a1016f..0a00ab1fc 100644 --- a/kate/part/kateview.h +++ b/kate/part/kateview.h @@ -44,10 +44,10 @@ class KateViewSchemaAction; class KateRenderer; class KateSpell; -class KToggleAction; -class KAction; -class KRecentFilesAction; -class KSelectAction; +class TDEToggleAction; +class TDEAction; +class TDERecentFilesAction; +class TDESelectAction; class TQGridLayout; @@ -429,7 +429,7 @@ class KateView : public Kate::View, // Is it really necessary to have 3 methods for this?! :) KateDocument* doc() const { return m_doc; } - KActionCollection* editActionCollection() const { return m_editActions; } + TDEActionCollection* editActionCollection() const { return m_editActions; } public slots: void slotNewUndo(); @@ -472,31 +472,31 @@ class KateView : public Kate::View, void setupCodeFolding(); void setupCodeCompletion(); - KActionCollection* m_editActions; - KAction* m_editUndo; - KAction* m_editRedo; - KRecentFilesAction* m_fileRecent; - KToggleAction* m_toggleFoldingMarkers; - KToggleAction* m_toggleIconBar; - KToggleAction* m_toggleLineNumbers; - KToggleAction* m_toggleScrollBarMarks; - KToggleAction* m_toggleDynWrap; - KSelectAction* m_setDynWrapIndicators; - KToggleAction* m_toggleWWMarker; - KAction* m_switchCmdLine; - - KSelectAction* m_setEndOfLine; - - KAction *m_cut; - KAction *m_copy; - KAction *m_copyHTML; - KAction *m_paste; - KAction *m_selectAll; - KAction *m_deSelect; - - KToggleAction *m_toggleBlockSelection; - KToggleAction *m_toggleInsert; - KToggleAction *m_toggleWriteLock; + TDEActionCollection* m_editActions; + TDEAction* m_editUndo; + TDEAction* m_editRedo; + TDERecentFilesAction* m_fileRecent; + TDEToggleAction* m_toggleFoldingMarkers; + TDEToggleAction* m_toggleIconBar; + TDEToggleAction* m_toggleLineNumbers; + TDEToggleAction* m_toggleScrollBarMarks; + TDEToggleAction* m_toggleDynWrap; + TDESelectAction* m_setDynWrapIndicators; + TDEToggleAction* m_toggleWWMarker; + TDEAction* m_switchCmdLine; + + TDESelectAction* m_setEndOfLine; + + TDEAction *m_cut; + TDEAction *m_copy; + TDEAction *m_copyHTML; + TDEAction *m_paste; + TDEAction *m_selectAll; + TDEAction *m_deSelect; + + TDEToggleAction *m_toggleBlockSelection; + TDEToggleAction *m_toggleInsert; + TDEToggleAction *m_toggleWriteLock; KateDocument* m_doc; KateViewInternal* m_viewInternal; diff --git a/kate/part/kateviewhelpers.cpp b/kate/part/kateviewhelpers.cpp index eca6716c4..fc0072982 100644 --- a/kate/part/kateviewhelpers.cpp +++ b/kate/part/kateviewhelpers.cpp @@ -1168,7 +1168,7 @@ void KateIconBorder::showMarkMenu( uint line, const TQPoint& pos ) //END KateIconBorder KateViewEncodingAction::KateViewEncodingAction(KateDocument *_doc, KateView *_view, const TQString& text, TQObject* parent, const char* name) - : KActionMenu (text, parent, name), doc(_doc), view (_view) + : TDEActionMenu (text, parent, name), doc(_doc), view (_view) { connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow())); } diff --git a/kate/part/kateviewhelpers.h b/kate/part/kateviewhelpers.h index 1205ea99a..0faa90309 100644 --- a/kate/part/kateviewhelpers.h +++ b/kate/part/kateviewhelpers.h @@ -182,7 +182,7 @@ class KateIconBorder : public TQWidget mutable TQColor m_oldBackgroundColor; }; -class KateViewEncodingAction : public KActionMenu +class KateViewEncodingAction : public TDEActionMenu { Q_OBJECT diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp index 1463c8bcd..1a7b73bf3 100644 --- a/kate/part/test_regression.cpp +++ b/kate/part/test_regression.cpp @@ -511,7 +511,7 @@ int main(int argc, char *argv[]) // create widgets KateFactory *fac = KateFactory::self(); - KMainWindow *toplevel = new KMainWindow(); + TDEMainWindow *toplevel = new TDEMainWindow(); KateDocument *part = new KateDocument(/*bSingleViewMode*/true, /*bBrowserView*/false, /*bReadOnly*/false, diff --git a/kate/plugins/autobookmarker/autobookmarker.cpp b/kate/plugins/autobookmarker/autobookmarker.cpp index cf3190c4e..449675f6c 100644 --- a/kate/plugins/autobookmarker/autobookmarker.cpp +++ b/kate/plugins/autobookmarker/autobookmarker.cpp @@ -253,7 +253,7 @@ void ABGlobal::writeConfig() class AutoBookmarkEntItem : public QListViewItem { public: - AutoBookmarkEntItem( KListView *lv, AutoBookmarkEnt *e ) + AutoBookmarkEntItem( TDEListView *lv, AutoBookmarkEnt *e ) : TQListViewItem( lv ), ent( e ) { @@ -383,7 +383,7 @@ AutoBookmarkerConfigPage::AutoBookmarkerConfigPage( TQWidget *parent, const char TQLabel *l = new TQLabel( i18n("&Patterns"), this ); lo->addWidget( l ); - lvPatterns = new KListView( this ); + lvPatterns = new TDEListView( this ); lvPatterns->addColumn( i18n("Pattern") ); lvPatterns->addColumn( i18n("Mime Types") ); lvPatterns->addColumn( i18n("File Masks") ); diff --git a/kate/plugins/autobookmarker/autobookmarker.h b/kate/plugins/autobookmarker/autobookmarker.h index 4a7b998de..9687d8ceb 100644 --- a/kate/plugins/autobookmarker/autobookmarker.h +++ b/kate/plugins/autobookmarker/autobookmarker.h @@ -111,7 +111,7 @@ class AutoBookmarkerConfigPage : public KTextEditor::ConfigPage void slotEdit(); private: - class KListView *lvPatterns; + class TDEListView *lvPatterns; class TQPushButton *btnNew, *btnDel, *btnEdit; ABEntityList *m_ents; }; diff --git a/kate/plugins/insertfile/insertfileplugin.cpp b/kate/plugins/insertfile/insertfileplugin.cpp index aa9f998b6..2f0d01ed4 100644 --- a/kate/plugins/insertfile/insertfileplugin.cpp +++ b/kate/plugins/insertfile/insertfileplugin.cpp @@ -76,7 +76,7 @@ InsertFilePluginView::InsertFilePluginView( KTextEditor::View *view, const char view->insertChildClient( this ); setInstance( KGenericFactory<InsertFilePlugin>::instance() ); _job = 0; - (void) new KAction( i18n("Insert File..."), 0, this, TQT_SLOT(slotInsertFile()), actionCollection(), "tools_insert_file" ); + (void) new TDEAction( i18n("Insert File..."), 0, this, TQT_SLOT(slotInsertFile()), actionCollection(), "tools_insert_file" ); setXMLFile( "tdetexteditor_insertfileui.rc" ); } diff --git a/kate/plugins/isearch/ISearchPlugin.cpp b/kate/plugins/isearch/ISearchPlugin.cpp index de1c1c376..758449fbe 100644 --- a/kate/plugins/isearch/ISearchPlugin.cpp +++ b/kate/plugins/isearch/ISearchPlugin.cpp @@ -64,11 +64,11 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) setInstance( KGenericFactory<ISearchPlugin>::instance() ); - m_searchForwardAction = new KAction( + m_searchForwardAction = new TDEAction( i18n("Search Incrementally"), CTRL+ALT+Key_F, this, TQT_SLOT(slotSearchForwardAction()), actionCollection(), "edit_isearch" ); - m_searchBackwardAction = new KAction( + m_searchBackwardAction = new TDEAction( i18n("Search Incrementally Backwards"), CTRL+ALT+SHIFT+Key_F, this, TQT_SLOT(slotSearchBackwardAction()), actionCollection(), "edit_isearch_reverse" ); @@ -97,13 +97,13 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) m_comboAction->setAutoSized( true ); m_comboAction->setShortcutConfigurable( false ); - KActionMenu* optionMenu = new KActionMenu( + TDEActionMenu* optionMenu = new TDEActionMenu( i18n("Search Options"), "configure", actionCollection(), "isearch_options" ); optionMenu->setDelayed( false ); - KToggleAction* action = new KToggleAction( - i18n("Case Sensitive"), KShortcut(), + TDEToggleAction* action = new TDEToggleAction( + i18n("Case Sensitive"), TDEShortcut(), actionCollection(), "isearch_case_sensitive" ); action->setShortcutConfigurable( false ); connect( action, TQT_SIGNAL(toggled(bool)), @@ -111,8 +111,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) action->setChecked( m_caseSensitive ); optionMenu->insert( action ); - action = new KToggleAction( - i18n("From Beginning"), KShortcut(), + action = new TDEToggleAction( + i18n("From Beginning"), TDEShortcut(), actionCollection(), "isearch_from_beginning" ); action->setShortcutConfigurable( false ); connect( action, TQT_SIGNAL(toggled(bool)), @@ -120,8 +120,8 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) action->setChecked( m_fromBeginning ); optionMenu->insert( action ); - action = new KToggleAction( - i18n("Regular Expression"), KShortcut(), + action = new TDEToggleAction( + i18n("Regular Expression"), TDEShortcut(), actionCollection(), "isearch_reg_exp" ); action->setShortcutConfigurable( false ); connect( action, TQT_SIGNAL(toggled(bool)), @@ -129,10 +129,10 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view ) action->setChecked( m_regExp ); optionMenu->insert( action ); -// optionMenu->insert( new KActionSeparator() ); +// optionMenu->insert( new TDEActionSeparator() ); // -// action = new KToggleAction( -// i18n("Auto-Wrap Search"), KShortcut(), +// action = new TDEToggleAction( +// i18n("Auto-Wrap Search"), TDEShortcut(), // actionCollection(), "isearch_auto_wrap" ); // connect( action, TQT_SIGNAL(toggled(bool)), // this, TQT_SLOT(setAutoWrap(bool)) ); diff --git a/kate/plugins/isearch/ISearchPlugin.h b/kate/plugins/isearch/ISearchPlugin.h index 980630795..b11b2a8b6 100644 --- a/kate/plugins/isearch/ISearchPlugin.h +++ b/kate/plugins/isearch/ISearchPlugin.h @@ -92,8 +92,8 @@ private: KTextEditor::SearchInterface* m_searchIF; KTextEditor::ViewCursorInterface* m_cursorIF; KTextEditor::SelectionInterface* m_selectIF; - KAction* m_searchForwardAction; - KAction* m_searchBackwardAction; + TDEAction* m_searchForwardAction; + TDEAction* m_searchBackwardAction; KWidgetAction* m_comboAction; TQGuardedPtr<TQLabel> m_label; TQGuardedPtr<KHistoryCombo> m_combo; diff --git a/kate/plugins/kdatatool/kate_kdatatool.cpp b/kate/plugins/kdatatool/kate_kdatatool.cpp index 832ff5eb7..829a0f31f 100644 --- a/kate/plugins/kdatatool/kate_kdatatool.cpp +++ b/kate/plugins/kdatatool/kate_kdatatool.cpp @@ -75,7 +75,7 @@ KDataToolPluginView::KDataToolPluginView( KTextEditor::View *view ) view->insertChildClient (this); setInstance( KGenericFactory<KDataToolPlugin>::instance() ); - m_menu = new KActionMenu(i18n("Data Tools"), actionCollection(), "popup_dataTool"); + m_menu = new TDEActionMenu(i18n("Data Tools"), actionCollection(), "popup_dataTool"); connect(m_menu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(aboutToShow())); setXMLFile("tdetexteditor_kdatatoolui.rc"); @@ -96,7 +96,7 @@ void KDataToolPluginView::aboutToShow() m_wordUnderCursor = TQString::null; // unplug old actions, if any: - KAction *ac; + TDEAction *ac; for ( ac = m_actionList.first(); ac; ac = m_actionList.next() ) { m_menu->remove(ac); } @@ -150,7 +150,7 @@ void KDataToolPluginView::aboutToShow() m_singleWord = true; m_singleWord_line = line; } else { - m_notAvailable = new KAction(i18n("(not available)"), TQString::null, 0, this, + m_notAvailable = new TDEAction(i18n("(not available)"), TQString::null, 0, this, TQT_SLOT(slotNotAvailable()), actionCollection(),"dt_n_av"); m_menu->insert(m_notAvailable); return; @@ -172,7 +172,7 @@ void KDataToolPluginView::aboutToShow() } if( m_actionList.isEmpty() ) { - m_notAvailable = new KAction(i18n("(not available)"), TQString::null, 0, this, + m_notAvailable = new TDEAction(i18n("(not available)"), TQString::null, 0, this, TQT_SLOT(slotNotAvailable()), actionCollection(),"dt_n_av"); m_menu->insert(m_notAvailable); } diff --git a/kate/plugins/kdatatool/kate_kdatatool.h b/kate/plugins/kdatatool/kate_kdatatool.h index ac437dd16..a217c6f27 100644 --- a/kate/plugins/kdatatool/kate_kdatatool.h +++ b/kate/plugins/kdatatool/kate_kdatatool.h @@ -26,7 +26,7 @@ #include <kxmlguiclient.h> #include <tqguardedptr.h> -class KActionMenu; +class TDEActionMenu; class KDataToolInfo; namespace KTextEditor @@ -62,9 +62,9 @@ private: bool m_singleWord; int m_singleWord_line, m_singleWord_start, m_singleWord_end; TQString m_wordUnderCursor; - TQPtrList<KAction> m_actionList; - TQGuardedPtr<KActionMenu> m_menu; - KAction *m_notAvailable; + TQPtrList<TDEAction> m_actionList; + TQGuardedPtr<TDEActionMenu> m_menu; + TDEAction *m_notAvailable; protected slots: void aboutToShow(); void slotToolActivated( const KDataToolInfo &datatoolinfo, const TQString &string ); diff --git a/kate/plugins/wordcompletion/docwordcompletion.cpp b/kate/plugins/wordcompletion/docwordcompletion.cpp index fbd5a4db7..4c38b1287 100644 --- a/kate/plugins/wordcompletion/docwordcompletion.cpp +++ b/kate/plugins/wordcompletion/docwordcompletion.cpp @@ -130,7 +130,7 @@ struct DocWordCompletionPluginViewPrivate TQString last; // last word we were trying to match TQString lastIns; // latest applied completion TQRegExp re; // hrm - KToggleAction *autopopup; // for accessing state + TDEToggleAction *autopopup; // for accessing state uint treshold; // the required length of a word before popping up the completion list automatically int directionalPos; // be able to insert "" at the correct time }; @@ -145,15 +145,15 @@ DocWordCompletionPluginView::DocWordCompletionPluginView( uint treshold, bool au view->insertChildClient( this ); setInstance( KGenericFactory<DocWordCompletionPlugin>::instance() ); - (void) new KAction( i18n("Reuse Word Above"), CTRL+Key_8, this, + (void) new TDEAction( i18n("Reuse Word Above"), CTRL+Key_8, this, TQT_SLOT(completeBackwards()), actionCollection(), "doccomplete_bw" ); - (void) new KAction( i18n("Reuse Word Below"), CTRL+Key_9, this, + (void) new TDEAction( i18n("Reuse Word Below"), CTRL+Key_9, this, TQT_SLOT(completeForwards()), actionCollection(), "doccomplete_fw" ); - (void) new KAction( i18n("Pop Up Completion List"), 0, this, + (void) new TDEAction( i18n("Pop Up Completion List"), 0, this, TQT_SLOT(popupCompletionList()), actionCollection(), "doccomplete_pu" ); - (void) new KAction( i18n("Shell Completion"), 0, this, + (void) new TDEAction( i18n("Shell Completion"), 0, this, TQT_SLOT(shellComplete()), actionCollection(), "doccomplete_sh" ); - d->autopopup = new KToggleAction( i18n("Automatic Completion Popup"), 0, this, + d->autopopup = new TDEToggleAction( i18n("Automatic Completion Popup"), 0, this, TQT_SLOT(toggleAutoPopup()), actionCollection(), "enable_autopopup" ); d->autopopup->setChecked( autopopup ); diff --git a/kded/kded.cpp b/kded/kded.cpp index 704dd9fbf..ed002b530 100644 --- a/kded/kded.cpp +++ b/kded/kded.cpp @@ -468,7 +468,7 @@ void Kded::runDelayedCheck() void Kded::recreate(bool initial) { m_recreateBusy = true; - // Using KLauncher here is difficult since we might not have a + // Using TDELauncher here is difficult since we might not have a // database if (!initial) diff --git a/kdewidgets/kde.widgets b/kdewidgets/kde.widgets index 0a4bf6229..6de9e90dc 100644 --- a/kdewidgets/kde.widgets +++ b/kdewidgets/kde.widgets @@ -55,19 +55,19 @@ Group=Graphics (KDE) ToolTip=Fullfeatured edit box with buttons (KDE) Group=Views (KDE) -[KFontCombo] +[TDEFontCombo] ToolTip=Font Combo Box (KDE) WhatsThis=A TQCombo Box showing the installed system fonts (with preview) Group=Input (KDE) -[KFontChooser] +[TDEFontChooser] IncludeFile=kfontdialog.h IconSet=kfontcombo.png ToolTip=Font Chooser (KDE) WhatsThis=A font type, size and style selection widget complete with preview Group=Input (KDE) -[KFontRequester] +[TDEFontRequester] IncludeFile=kfontrequester.h ToolTip=Font Requester (KDE) WhatsThis=A compact font selection and preview widget @@ -94,12 +94,12 @@ ToolTip=LED Widget (KDE) WhatsThis=A widget showing a light emitter diode Group=Display (KDE) -[KListBox] +[TDEListBox] ToolTip=Extended List Box (KDE) WhatsThis=An improved version of the TQListBox that follows KDE settings Group=Views (KDE) -[KListView] +[TDEListView] ToolTip=Extended List View (KDE) WhatsThis=An improved version of the TQListView that allows certain KDE extensions Group=Views (KDE) @@ -108,12 +108,12 @@ Group=Views (KDE) ToolTip=Line Edit (KDE) Group=Input (KDE) -[KListViewSearchLine] +[TDEListViewSearchLine] ToolTip=ListView Search Line (KDE) Group=Input (KDE) ConstructorArgs=(parent, 0, name) -[KListViewSearchLineWidget] +[TDEListViewSearchLineWidget] ToolTip=ListView Search Line Widget (KDE) IncludeFile=klistviewsearchline.h Group=Input (KDE) @@ -243,7 +243,7 @@ ToolTip=A widget that provides a image preview of a URL Group=Display (KDE) ConstructorArgs=(parent) -[KActionSelector] +[TDEActionSelector] IncludeFile=kactionselector.h ToolTip=A widget for selecting and arranging actions/objects Group=Views (KDE) diff --git a/kdewidgets/tests/test.widgets b/kdewidgets/tests/test.widgets index ed320bc64..92874ec30 100644 --- a/kdewidgets/tests/test.widgets +++ b/kdewidgets/tests/test.widgets @@ -55,19 +55,19 @@ Group=Graphics (KDE) ToolTip=Fullfeatured edit box with buttons (KDE) Group=Views (KDE) -[KFontCombo] +[TDEFontCombo] ToolTip=Font Combo Box (KDE) WhatsThis=A QCombo Box showing the installed system fonts (with preview) Group=Input (KDE) -[KFontChooser] +[TDEFontChooser] IncludeFile=kfontdialog.h IconSet=kfontcombo.png ToolTip=Font Chooser (KDE) WhatsThis=A font type, size and style selection widget complete with preview Group=Input (KDE) -[KFontRequester] +[TDEFontRequester] IncludeFile=kfontrequester.h ToolTip=Font Requester (KDE) WhatsThis=A compact font selection and preview widget @@ -94,12 +94,12 @@ ToolTip=LED Widget (KDE) WhatsThis=A widget showing a light emitter diode Group=Display (KDE) -[KListBox] +[TDEListBox] ToolTip=Extended List Box (KDE) WhatsThis=An improved version of the QListBox that follows KDE settings Group=Views (KDE) -[KListView] +[TDEListView] ToolTip=Extended List View (KDE) WhatsThis=An improved version of the QListView that allows certain KDE extensions Group=Views (KDE) @@ -232,7 +232,7 @@ ToolTip=A widget that provides a image preview of a URL Group=Display (KDE) ConstructorArgs=(parent) -[KActionSelector] +[TDEActionSelector] IncludeFile=kactionselector.h ToolTip=A widget for selecting and arranging actions/objects Group=Views (KDE) diff --git a/kinit/README.DCOP b/kinit/README.DCOP index af5aff809..cd5ba983e 100644 --- a/kinit/README.DCOP +++ b/kinit/README.DCOP @@ -1,4 +1,4 @@ -"KLauncher" supports the following DCOP functions: +"TDELauncher" supports the following DCOP functions: /** * Starts a program. diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp index 16946fb2d..c1ba0920d 100644 --- a/kinit/kinit.cpp +++ b/kinit/kinit.cpp @@ -1074,9 +1074,9 @@ static void launcher_died() return; } - // KLauncher died... restart + // TDELauncher died... restart #ifndef NDEBUG - fprintf(stderr, "[tdeinit] KLauncher died unexpectedly.\n"); + fprintf(stderr, "[tdeinit] TDELauncher died unexpectedly.\n"); #endif // Make sure it's really dead. if (d.launcher_pid) @@ -1092,7 +1092,7 @@ static void launcher_died() pid_t pid = launch( 1, "tdelauncher", 0 ); #ifndef NDEBUG - fprintf(stderr, "[tdeinit] Relaunching KLauncher, pid = %ld result = %d\n", (long) pid, d.result); + fprintf(stderr, "[tdeinit] Relaunching TDELauncher, pid = %ld result = %d\n", (long) pid, d.result); #endif } @@ -1819,7 +1819,7 @@ int main(int argc, char **argv, char **envp) else pid = launch( 1, "tdelauncher", 0 ); #ifndef NDEBUG - fprintf(stderr, "[tdeinit] Launched KLauncher, pid = %ld result = %d\n", (long) pid, d.result); + fprintf(stderr, "[tdeinit] Launched TDELauncher, pid = %ld result = %d\n", (long) pid, d.result); #endif handle_requests(pid); // Wait for tdelauncher to be ready } diff --git a/kinit/tdelauncher.cpp b/kinit/tdelauncher.cpp index 45dbd863b..7b75bfaf5 100644 --- a/kinit/tdelauncher.cpp +++ b/kinit/tdelauncher.cpp @@ -63,7 +63,7 @@ using namespace TDEIO; -template class TQPtrList<KLaunchRequest>; +template class TQPtrList<TDELaunchRequest>; template class TQPtrList<IdleSlave>; IdleSlave::IdleSlave(TDESocket *socket) @@ -162,7 +162,7 @@ IdleSlave::age(time_t now) return (int) difftime(now, mBirthDate); } -KLauncher::KLauncher(int _tdeinitSocket, bool new_startup) +TDELauncher::TDELauncher(int _tdeinitSocket, bool new_startup) // : TDEApplication( false, false ), // No Styles, No GUI : TDEApplication( false, true ), // TQClipboard tries to construct a QWidget so a GUI is technically needed, even though it is not used DCOPObject("tdelauncher"), @@ -186,7 +186,7 @@ KLauncher::KLauncher(int _tdeinitSocket, bool new_startup) if (domainname.status() != 0) { // Sever error! - tqDebug("KLauncher: Fatal error, can't create tempfile!"); + tqDebug("TDELauncher: Fatal error, can't create tempfile!"); ::exit(1); } mPoolSocketName = domainname.name(); @@ -224,12 +224,12 @@ KLauncher::KLauncher(int _tdeinitSocket, bool new_startup) write(tdeinitSocket, &request_header, sizeof(request_header)); } -KLauncher::~KLauncher() +TDELauncher::~TDELauncher() { close(); } -void KLauncher::close() +void TDELauncher::close() { if (!mPoolSocketName.isEmpty()) { @@ -244,15 +244,15 @@ void KLauncher::close() } void -KLauncher::destruct(int exit_code) +TDELauncher::destruct(int exit_code) { - if (kapp) ((KLauncher*)kapp)->close(); + if (kapp) ((TDELauncher*)kapp)->close(); // We don't delete kapp here, that's intentional. ::exit(exit_code); } bool -KLauncher::process(const TQCString &fun, const TQByteArray &data, +TDELauncher::process(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData) { if ((fun == "exec_blind(TQCString,TQValueList<TQCString>)") @@ -267,7 +267,7 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data, stream >> name >> arg_list; if( fun == "exec_blind(TQCString,TQValueList<TQCString>,TQValueList<TQCString>,TQCString)" ) stream >> envs >> startup_id; - kdDebug(7016) << "KLauncher: Got exec_blind('" << name << "', ...)" << endl; + kdDebug(7016) << "TDELauncher: Got exec_blind('" << name << "', ...)" << endl; exec_blind( name, arg_list, envs, startup_id); return true; } @@ -315,29 +315,29 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data, bool finished; if (strncmp(fun, "start_service_by_name(", 22) == 0) { - kdDebug(7016) << "KLauncher: Got start_service_by_name('" << serviceName << "', ...)" << endl; + kdDebug(7016) << "TDELauncher: Got start_service_by_name('" << serviceName << "', ...)" << endl; finished = start_service_by_name(serviceName, urls, envs, startup_id, bNoWait); } else if (strncmp(fun, "start_service_by_desktop_path(", 30) == 0) { - kdDebug(7016) << "KLauncher: Got start_service_by_desktop_path('" << serviceName << "', ...)" << endl; + kdDebug(7016) << "TDELauncher: Got start_service_by_desktop_path('" << serviceName << "', ...)" << endl; finished = start_service_by_desktop_path(serviceName, urls, envs, startup_id, bNoWait); } else if (strncmp(fun, "start_service_by_desktop_name(", 30) == 0) { - kdDebug(7016) << "KLauncher: Got start_service_by_desktop_name('" << serviceName << "', ...)" << endl; + kdDebug(7016) << "TDELauncher: Got start_service_by_desktop_name('" << serviceName << "', ...)" << endl; finished = start_service_by_desktop_name(serviceName, urls, envs, startup_id, bNoWait ); } else if ((fun == "tdeinit_exec(TQString,TQStringList)") || (fun == "tdeinit_exec(TQString,TQStringList,TQValueList<TQCString>)") || (fun == "tdeinit_exec(TQString,TQStringList,TQValueList<TQCString>,TQCString)")) { - kdDebug(7016) << "KLauncher: Got tdeinit_exec('" << serviceName << "', ...)" << endl; + kdDebug(7016) << "TDELauncher: Got tdeinit_exec('" << serviceName << "', ...)" << endl; finished = tdeinit_exec(serviceName, urls, envs, startup_id, false); } else { - kdDebug(7016) << "KLauncher: Got tdeinit_exec_wait('" << serviceName << "', ...)" << endl; + kdDebug(7016) << "TDELauncher: Got tdeinit_exec_wait('" << serviceName << "', ...)" << endl; finished = tdeinit_exec(serviceName, urls, envs, startup_id, true); } if (!finished) @@ -397,7 +397,7 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data, else if (fun == "reparseConfiguration()") { TDEGlobal::config()->reparseConfiguration(); - kdDebug(7016) << "KLauncher::process : reparseConfiguration" << endl; + kdDebug(7016) << "TDELauncher::process : reparseConfiguration" << endl; KProtocolManager::reparseConfiguration(); IdleSlave *slave; for(slave = mSlaveList.first(); slave; slave = mSlaveList.next()) @@ -409,7 +409,7 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data, { ::signal( SIGHUP, SIG_IGN); ::signal( SIGTERM, SIG_IGN); - kdDebug() << "KLauncher::process ---> terminateKDE" << endl; + kdDebug() << "TDELauncher::process ---> terminateKDE" << endl; tdelauncher_header request_header; request_header.cmd = LAUNCHER_TERMINATE_KDE; request_header.arg_length = 0; @@ -418,14 +418,14 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data, } else if (fun == "autoStart()") { - kdDebug() << "KLauncher::process ---> autoStart" << endl; + kdDebug() << "TDELauncher::process ---> autoStart" << endl; autoStart(1); replyType = "void"; return true; } else if (fun == "autoStart(int)") { - kdDebug() << "KLauncher::process ---> autoStart(int)" << endl; + kdDebug() << "TDELauncher::process ---> autoStart(int)" << endl; TQDataStream stream(data, IO_ReadOnly); int phase; stream >> phase; @@ -443,15 +443,15 @@ KLauncher::process(const TQCString &fun, const TQByteArray &data, } QCStringList -KLauncher::interfaces() +TDELauncher::interfaces() { QCStringList ifaces = DCOPObject::interfaces(); - ifaces += "KLauncher"; + ifaces += "TDELauncher"; return ifaces; } QCStringList -KLauncher::functions() +TDELauncher::functions() { QCStringList funcs = DCOPObject::functions(); funcs << "void exec_blind(TQCString,TQValueList<TQCString>)"; @@ -480,7 +480,7 @@ KLauncher::functions() return funcs; } -void KLauncher::setLaunchEnv(const TQCString &name, const TQCString &_value) +void TDELauncher::setLaunchEnv(const TQCString &name, const TQCString &_value) { TQCString value(_value); if (value.isNull()) @@ -522,7 +522,7 @@ read_socket(int sock, char *buffer, int len) void -KLauncher::slotKDEInitData(int) +TDELauncher::slotKDEInitData(int) { tdelauncher_header request_header; TQByteArray requestData; @@ -572,25 +572,25 @@ KLauncher::slotKDEInitData(int) { case KService::DCOP_None: { - lastRequest->status = KLaunchRequest::Running; + lastRequest->status = TDELaunchRequest::Running; break; } case KService::DCOP_Unique: { - lastRequest->status = KLaunchRequest::Launching; + lastRequest->status = TDELaunchRequest::Launching; break; } case KService::DCOP_Wait: { - lastRequest->status = KLaunchRequest::Launching; + lastRequest->status = TDELaunchRequest::Launching; break; } case KService::DCOP_Multi: { - lastRequest->status = KLaunchRequest::Launching; + lastRequest->status = TDELaunchRequest::Launching; break; } } @@ -599,7 +599,7 @@ KLauncher::slotKDEInitData(int) } if (lastRequest && (request_header.cmd == LAUNCHER_ERROR)) { - lastRequest->status = KLaunchRequest::Error; + lastRequest->status = TDELaunchRequest::Error; if (!requestData.isEmpty()) lastRequest->errorMsg = TQString::fromUtf8((char *) requestData.data()); lastRequest = 0; @@ -611,20 +611,20 @@ KLauncher::slotKDEInitData(int) } void -KLauncher::processDied(pid_t pid, long /* exitStatus */) +TDELauncher::processDied(pid_t pid, long /* exitStatus */) { - KLaunchRequest *request = requestList.first(); + TDELaunchRequest *request = requestList.first(); for(; request; request = requestList.next()) { if (request->pid == pid) { if (request->dcop_service_type == KService::DCOP_Wait) - request->status = KLaunchRequest::Done; + request->status = TDELaunchRequest::Done; else if ((request->dcop_service_type == KService::DCOP_Unique) && (dcopClient()->isApplicationRegistered(request->dcop_name))) - request->status = KLaunchRequest::Running; + request->status = TDELaunchRequest::Running; else - request->status = KLaunchRequest::Error; + request->status = TDELaunchRequest::Error; requestDone(request); return; } @@ -632,17 +632,17 @@ KLauncher::processDied(pid_t pid, long /* exitStatus */) } void -KLauncher::slotAppRegistered(const TQCString &appId) +TDELauncher::slotAppRegistered(const TQCString &appId) { const char *cAppId = appId.data(); if (!cAppId) return; - KLaunchRequest *request = requestList.first(); - KLaunchRequest *nextRequest; + TDELaunchRequest *request = requestList.first(); + TDELaunchRequest *nextRequest; for(; request; request = nextRequest) { nextRequest = requestList.next(); - if (request->status != KLaunchRequest::Launching) + if (request->status != TDELaunchRequest::Launching) continue; // For unique services check the requested service name first @@ -650,7 +650,7 @@ KLauncher::slotAppRegistered(const TQCString &appId) ((appId == request->dcop_name) || dcopClient()->isApplicationRegistered(request->dcop_name))) { - request->status = KLaunchRequest::Running; + request->status = TDELaunchRequest::Running; requestDone(request); continue; } @@ -663,7 +663,7 @@ KLauncher::slotAppRegistered(const TQCString &appId) ((cAppId[l] == '\0') || (cAppId[l] == '-'))) { request->dcop_name = appId; - request->status = KLaunchRequest::Running; + request->status = TDELaunchRequest::Running; requestDone(request); continue; } @@ -671,7 +671,7 @@ KLauncher::slotAppRegistered(const TQCString &appId) } void -KLauncher::autoStart(int phase) +TDELauncher::autoStart(int phase) { if( mAutoStart.phase() >= phase ) return; @@ -690,7 +690,7 @@ KLauncher::autoStart(int phase) } void -KLauncher::slotAutoStart() +TDELauncher::slotAutoStart() { KService::Ptr s; do @@ -727,10 +727,10 @@ KLauncher::slotAutoStart() } void -KLauncher::requestDone(KLaunchRequest *request) +TDELauncher::requestDone(TDELaunchRequest *request) { - if ((request->status == KLaunchRequest::Running) || - (request->status == KLaunchRequest::Done)) + if ((request->status == TDELaunchRequest::Running) || + (request->status == TDELaunchRequest::Done)) { DCOPresult.result = 0; DCOPresult.dcopName = request->dcop_name; @@ -788,7 +788,7 @@ KLauncher::requestDone(KLaunchRequest *request) } void -KLauncher::requestStart(KLaunchRequest *request) +TDELauncher::requestStart(TDELaunchRequest *request) { requestList.append( request ); // Send request to tdeinit. @@ -879,17 +879,17 @@ KLauncher::requestStart(KLaunchRequest *request) } void -KLauncher::exec_blind( const TQCString &name, const TQValueList<TQCString> &arg_list, +TDELauncher::exec_blind( const TQCString &name, const TQValueList<TQCString> &arg_list, const TQValueList<TQCString> &envs, const TQCString& startup_id ) { - KLaunchRequest *request = new KLaunchRequest; + TDELaunchRequest *request = new TDELaunchRequest; request->autoStart = false; request->name = name; request->arg_list = arg_list; request->dcop_name = 0; request->dcop_service_type = KService::DCOP_None; request->pid = 0; - request->status = KLaunchRequest::Launching; + request->status = TDELaunchRequest::Launching; request->transaction = 0; // No confirmation is send request->envs = envs; // Find service, if any - strip path if needed @@ -907,7 +907,7 @@ KLauncher::exec_blind( const TQCString &name, const TQValueList<TQCString> &arg_ bool -KLauncher::start_service_by_name(const TQString &serviceName, const TQStringList &urls, +TDELauncher::start_service_by_name(const TQString &serviceName, const TQStringList &urls, const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind) { KService::Ptr service = 0; @@ -924,7 +924,7 @@ KLauncher::start_service_by_name(const TQString &serviceName, const TQStringList } bool -KLauncher::start_service_by_desktop_path(const TQString &serviceName, const TQStringList &urls, +TDELauncher::start_service_by_desktop_path(const TQString &serviceName, const TQStringList &urls, const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind) { KService::Ptr service = 0; @@ -949,7 +949,7 @@ KLauncher::start_service_by_desktop_path(const TQString &serviceName, const TQSt } bool -KLauncher::start_service_by_desktop_name(const TQString &serviceName, const TQStringList &urls, +TDELauncher::start_service_by_desktop_name(const TQString &serviceName, const TQStringList &urls, const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind) { KService::Ptr service = 0; @@ -966,7 +966,7 @@ KLauncher::start_service_by_desktop_name(const TQString &serviceName, const TQSt } bool -KLauncher::start_service(KService::Ptr service, const TQStringList &_urls, +TDELauncher::start_service(KService::Ptr service, const TQStringList &_urls, const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind, bool autoStart) { TQStringList urls = _urls; @@ -977,7 +977,7 @@ KLauncher::start_service(KService::Ptr service, const TQStringList &_urls, cancel_service_startup_info( NULL, startup_id, envs ); // cancel it if any return false; } - KLaunchRequest *request = new KLaunchRequest; + TDELaunchRequest *request = new TDELaunchRequest; request->autoStart = autoStart; if ((urls.count() > 1) && !service->allowMultipleFiles()) @@ -1047,7 +1047,7 @@ KLauncher::start_service(KService::Ptr service, const TQStringList &_urls, } void -KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const TQCString& startup_id, +TDELauncher::send_service_startup_info( TDELaunchRequest *request, KService::Ptr service, const TQCString& startup_id, const TQValueList<TQCString> &envs ) { #if defined Q_WS_X11 && ! defined K_WS_QTONLY @@ -1102,7 +1102,7 @@ KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr ser } void -KLauncher::cancel_service_startup_info( KLaunchRequest* request, const TQCString& startup_id, +TDELauncher::cancel_service_startup_info( TDELaunchRequest* request, const TQCString& startup_id, const TQValueList<TQCString> &envs ) { #if defined Q_WS_X11 && ! defined K_WS_QTONLY @@ -1136,10 +1136,10 @@ KLauncher::cancel_service_startup_info( KLaunchRequest* request, const TQCString } bool -KLauncher::tdeinit_exec(const TQString &app, const TQStringList &args, +TDELauncher::tdeinit_exec(const TQString &app, const TQStringList &args, const TQValueList<TQCString> &envs, TQCString startup_id, bool wait) { - KLaunchRequest *request = new KLaunchRequest; + TDELaunchRequest *request = new TDELaunchRequest; request->autoStart = false; for(TQStringList::ConstIterator it = args.begin(); @@ -1178,7 +1178,7 @@ KLauncher::tdeinit_exec(const TQString &app, const TQStringList &args, } void -KLauncher::queueRequest(KLaunchRequest *request) +TDELauncher::queueRequest(TDELaunchRequest *request) { requestQueue.append( request ); if (!bProcessingQueue) @@ -1189,14 +1189,14 @@ KLauncher::queueRequest(KLaunchRequest *request) } void -KLauncher::slotDequeue() +TDELauncher::slotDequeue() { do { - KLaunchRequest *request = requestQueue.take(0); + TDELaunchRequest *request = requestQueue.take(0); // process request - request->status = KLaunchRequest::Launching; + request->status = TDELaunchRequest::Launching; requestStart(request); - if (request->status != KLaunchRequest::Launching) + if (request->status != TDELaunchRequest::Launching) { // Request handled. requestDone( request ); @@ -1207,7 +1207,7 @@ KLauncher::slotDequeue() } void -KLauncher::createArgs( KLaunchRequest *request, const KService::Ptr service , +TDELauncher::createArgs( TDELaunchRequest *request, const KService::Ptr service , const TQStringList &urls) { TQStringList params = KRun::processDesktopExec(*service, urls, false); @@ -1223,7 +1223,7 @@ KLauncher::createArgs( KLaunchRequest *request, const KService::Ptr service , ///// IO-Slave functions pid_t -KLauncher::requestHoldSlave(const KURL &url, const TQString &app_socket) +TDELauncher::requestHoldSlave(const KURL &url, const TQString &app_socket) { IdleSlave *slave; for(slave = mSlaveList.first(); slave; slave = mSlaveList.next()) @@ -1242,7 +1242,7 @@ KLauncher::requestHoldSlave(const KURL &url, const TQString &app_socket) pid_t -KLauncher::requestSlave(const TQString &protocol, +TDELauncher::requestSlave(const TQString &protocol, const TQString &host, const TQString &app_socket, TQString &error) @@ -1292,7 +1292,7 @@ KLauncher::requestSlave(const TQString &protocol, arg_list.append(arg2); arg_list.append(arg3); -// kdDebug(7016) << "KLauncher: launching new slave " << _name << " with protocol=" << protocol << endl; +// kdDebug(7016) << "TDELauncher: launching new slave " << _name << " with protocol=" << protocol << endl; if (mSlaveDebug == arg1) { tdelauncher_header request_header; @@ -1311,7 +1311,7 @@ KLauncher::requestSlave(const TQString &protocol, arg_list.prepend("--tool=memcheck"); } - KLaunchRequest *request = new KLaunchRequest; + TDELaunchRequest *request = new TDELaunchRequest; request->autoStart = false; request->name = name; request->arg_list = arg_list; @@ -1321,7 +1321,7 @@ KLauncher::requestSlave(const TQString &protocol, #ifdef Q_WS_X11 request->startup_id = "0"; #endif - request->status = KLaunchRequest::Launching; + request->status = TDELaunchRequest::Launching; request->transaction = 0; // No confirmation is send requestStart(request); pid_t pid = request->pid; @@ -1338,7 +1338,7 @@ KLauncher::requestSlave(const TQString &protocol, } void -KLauncher::waitForSlave(pid_t pid) +TDELauncher::waitForSlave(pid_t pid) { IdleSlave *slave; for(slave = mSlaveList.first(); slave; slave = mSlaveList.next()) @@ -1353,7 +1353,7 @@ KLauncher::waitForSlave(pid_t pid) } void -KLauncher::acceptSlave(TDESocket *slaveSocket) +TDELauncher::acceptSlave(TDESocket *slaveSocket) { IdleSlave *slave = new IdleSlave(slaveSocket); // Send it a SLAVE_STATUS command. @@ -1368,7 +1368,7 @@ KLauncher::acceptSlave(TDESocket *slaveSocket) } void -KLauncher::slotSlaveStatus(IdleSlave *slave) +TDELauncher::slotSlaveStatus(IdleSlave *slave) { SlaveWaitRequest *waitRequest = mSlaveWaitRequest.first(); while(waitRequest) @@ -1390,7 +1390,7 @@ KLauncher::slotSlaveStatus(IdleSlave *slave) } void -KLauncher::slotSlaveGone() +TDELauncher::slotSlaveGone() { IdleSlave *slave = (IdleSlave *) sender(); mSlaveList.removeRef(slave); @@ -1401,7 +1401,7 @@ KLauncher::slotSlaveGone() } void -KLauncher::idleTimeout() +TDELauncher::idleTimeout() { bool keepOneFileSlave=true; time_t now = time(0); diff --git a/kinit/tdelauncher.h b/kinit/tdelauncher.h index 27c49ef7f..791958980 100644 --- a/kinit/tdelauncher.h +++ b/kinit/tdelauncher.h @@ -76,7 +76,7 @@ public: DCOPClientTransaction *transaction; }; -class KLaunchRequest +class TDELaunchRequest { public: TQCString name; @@ -105,14 +105,14 @@ struct serviceResult pid_t pid; }; -class KLauncher : public TDEApplication, public DCOPObject +class TDELauncher : public TDEApplication, public DCOPObject { Q_OBJECT public: - KLauncher(int _tdeinitSocket, bool new_startup); + TDELauncher(int _tdeinitSocket, bool new_startup); - ~KLauncher(); + ~TDELauncher(); void close(); static void destruct(int exit_code); // exit! @@ -126,8 +126,8 @@ public: protected: void processDied(pid_t pid, long exitStatus); - void requestStart(KLaunchRequest *request); - void requestDone(KLaunchRequest *request); + void requestStart(TDELaunchRequest *request); + void requestDone(TDELaunchRequest *request); void setLaunchEnv(const TQCString &name, const TQCString &value); void exec_blind(const TQCString &name, const TQValueList<TQCString> &arg_list, @@ -148,7 +148,7 @@ protected: void autoStart(int phase); - void createArgs( KLaunchRequest *request, const KService::Ptr service, + void createArgs( TDELaunchRequest *request, const KService::Ptr service, const TQStringList &url); pid_t requestHoldSlave(const KURL &url, const TQString &app_socket); @@ -156,11 +156,11 @@ protected: const TQString &app_socket, TQString &error); - void queueRequest(KLaunchRequest *); + void queueRequest(TDELaunchRequest *); - void send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const TQCString& startup_id, + void send_service_startup_info( TDELaunchRequest *request, KService::Ptr service, const TQCString& startup_id, const TQValueList<TQCString> &envs ); - void cancel_service_startup_info( KLaunchRequest *request, const TQCString& startup_id, + void cancel_service_startup_info( TDELaunchRequest *request, const TQCString& startup_id, const TQValueList<TQCString> &envs ); public slots: @@ -174,12 +174,12 @@ public slots: void idleTimeout(); protected: - TQPtrList<KLaunchRequest> requestList; // Requests being handled - TQPtrList<KLaunchRequest> requestQueue; // Requests waiting to being handled + TQPtrList<TDELaunchRequest> requestList; // Requests being handled + TQPtrList<TDELaunchRequest> requestQueue; // Requests waiting to being handled int tdeinitSocket; TQSocketNotifier *tdeinitNotifier; serviceResult DCOPresult; - KLaunchRequest *lastRequest; + TDELaunchRequest *lastRequest; TQPtrList<SlaveWaitRequest> mSlaveWaitRequest; TQString mPoolSocketName; TDEServerSocket *mPoolSocket; diff --git a/kinit/tdelauncher_main.cpp b/kinit/tdelauncher_main.cpp index 059496c0c..dc0c02dd7 100644 --- a/kinit/tdelauncher_main.cpp +++ b/kinit/tdelauncher_main.cpp @@ -41,7 +41,7 @@ static void sig_handler(int sig_num) signal( SIGHUP, SIG_IGN); signal( SIGTERM, SIG_IGN); fprintf(stderr, "[tdelauncher] Exiting on signal %d\n", sig_num); - KLauncher::destruct(255); + TDELauncher::destruct(255); } static KCmdLineOptions options[] = @@ -62,10 +62,10 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv ) TQCString cname = TDEApplication::launcher(); char *name = cname.data(); - TDECmdLineArgs::init(argc, argv, name, "KLauncher", "A service launcher.", + TDECmdLineArgs::init(argc, argv, name, "TDELauncher", "A service launcher.", "v1.0"); - KLauncher::addCmdLineOptions(); + TDELauncher::addCmdLineOptions(); TDECmdLineArgs::addCmdLineOptions( options ); // WABA: Make sure not to enable session management. @@ -101,7 +101,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv ) // Try again... } - KLauncher *launcher = new KLauncher(LAUNCHER_FD, args->isSet("new-startup")); + TDELauncher *launcher = new TDELauncher(LAUNCHER_FD, args->isSet("new-startup")); launcher->dcopClient()->setDefaultObject( name ); launcher->dcopClient()->setDaemonMode( true ); diff --git a/knewstuff/downloaddialog.cpp b/knewstuff/downloaddialog.cpp index 3cc476254..4bfe13f30 100644 --- a/knewstuff/downloaddialog.cpp +++ b/knewstuff/downloaddialog.cpp @@ -50,18 +50,18 @@ struct DownloadDialog::Private { TQString m_providerlist; TQWidget *m_page; - KListView *m_lvtmp_r, *m_lvtmp_d, *m_lvtmp_l; + TDEListView *m_lvtmp_r, *m_lvtmp_d, *m_lvtmp_l; TQPtrList<Entry> m_installlist; TQMap<TDEIO::Job*, Provider*> m_variantjobs; TQMap<TDEIO::Job*, TQStringList> m_variants; TQMap<Provider*, Provider*> m_newproviders; }; -class NumSortListViewItem : public KListViewItem +class NumSortListViewItem : public TDEListViewItem { public: NumSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) : - KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 ) + TDEListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 ) { } @@ -72,15 +72,15 @@ class NumSortListViewItem : public KListViewItem s.sprintf("%08d", text(col).toInt()); return s; } - return KListViewItem::key( col, asc ); + return TDEListViewItem::key( col, asc ); } }; -class DateSortListViewItem : public KListViewItem +class DateSortListViewItem : public TDEListViewItem { public: DateSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) : - KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 ) + TDEListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 ) { } @@ -92,7 +92,7 @@ class DateSortListViewItem : public KListViewItem s.sprintf("%08d", date.year() * 366 + date.dayOfYear()); return s; } - return KListViewItem::key( col, asc ); + return TDEListViewItem::key( col, asc ); } }; @@ -157,7 +157,7 @@ DownloadDialog::~DownloadDialog() { for (TQMap<TQWidget *, TQValueList<TQPushButton *>* >::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it) delete it.data(); - for (TQMap<TQWidget *, TQValueList<KListView *>* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it) + for (TQMap<TQWidget *, TQValueList<TDEListView *>* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it) delete it.data(); delete d; } @@ -174,11 +174,11 @@ void DownloadDialog::load(TQString providerList) void DownloadDialog::clear() { - TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator it; - TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator end(m_map.end()); + TQMap<TQWidget*, TQValueList<TDEListView*>* >::Iterator it; + TQMap<TQWidget*, TQValueList<TDEListView*>* >::Iterator end(m_map.end()); for(it = m_map.begin(); it != end; ++it) { - TQValueList<KListView*> *v = it.data(); + TQValueList<TDEListView*> *v = it.data(); kdDebug() << "clear listviews in " << v << endl; if(v) { @@ -266,19 +266,19 @@ void DownloadDialog::addProvider(Provider *p) TQHBoxLayout *box = new TQHBoxLayout(frame); box->add(ctl); - d->m_lvtmp_r = new KListView(w_r); + d->m_lvtmp_r = new TDEListView(w_r); d->m_lvtmp_r->addColumn(i18n("Name")); d->m_lvtmp_r->addColumn(i18n("Version")); d->m_lvtmp_r->addColumn(i18n("Rating")); d->m_lvtmp_r->setSorting(2, false); - d->m_lvtmp_d = new KListView(w_d); + d->m_lvtmp_d = new TDEListView(w_d); d->m_lvtmp_d->addColumn(i18n("Name")); d->m_lvtmp_d->addColumn(i18n("Version")); d->m_lvtmp_d->addColumn(i18n("Downloads")); d->m_lvtmp_d->setSorting(2, false); - d->m_lvtmp_l = new KListView(w_l); + d->m_lvtmp_l = new TDEListView(w_l); d->m_lvtmp_l->addColumn(i18n("Name")); d->m_lvtmp_l->addColumn(i18n("Version")); d->m_lvtmp_l->addColumn(i18n("Release Date")); @@ -315,7 +315,7 @@ void DownloadDialog::addProvider(Provider *p) TQVBoxLayout *box4 = new TQVBoxLayout(w_l); box4->add(d->m_lvtmp_l); - TQValueList<KListView*> *v = new TQValueList<KListView*>; + TQValueList<TDEListView*> *v = new TQValueList<TDEListView*>; *v << d->m_lvtmp_r << d->m_lvtmp_d << d->m_lvtmp_l; m_map[frame] = v; m_rts[frame] = rt; @@ -423,19 +423,19 @@ void DownloadDialog::addEntry(Entry *entry, const TQStringList& variants) if(variants.contains("score")) { - KListViewItem *tmp_r = new NumSortListViewItem(lv_r, + TDEListViewItem *tmp_r = new NumSortListViewItem(lv_r, entry->name(lang), entry->version(), TQString("%1").arg(entry->rating())); tmp_r->setPixmap(0, pix); } if(variants.contains("downloads")) { - KListViewItem *tmp_d = new NumSortListViewItem(lv_d, + TDEListViewItem *tmp_d = new NumSortListViewItem(lv_d, entry->name(lang), entry->version(), TQString("%1").arg(entry->downloads())); tmp_d->setPixmap(0, pix); } if(variants.contains("latest")) { - KListViewItem *tmp_l = new DateSortListViewItem(lv_l, + TDEListViewItem *tmp_l = new DateSortListViewItem(lv_l, entry->name(lang), entry->version(), TDEGlobal::locale()->formatDate(entry->releaseDate())); tmp_l->setPixmap(0, pix); } diff --git a/knewstuff/downloaddialog.h b/knewstuff/downloaddialog.h index cfcd4858f..1d61d259d 100644 --- a/knewstuff/downloaddialog.h +++ b/knewstuff/downloaddialog.h @@ -28,7 +28,7 @@ namespace TDEIO class Job; } -class KListView; +class TDEListView; class TQTextBrowser; class TQFrame; class KNewStuffGeneric; @@ -232,7 +232,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase ProviderLoader *m_loader; TQString m_entryname; - KListView *lv_r, *lv_d, *lv_l; + TDEListView *lv_r, *lv_d, *lv_l; TQTextBrowser *m_rt; TQFrame *m_frame; TQListViewItem *m_entryitem; @@ -240,7 +240,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase Entry *m_entry; KNewStuffGeneric *m_s; int m_curtab; - TQMap<TQWidget*, TQValueList<KListView*>* > m_map; + TQMap<TQWidget*, TQValueList<TDEListView*>* > m_map; TQMap<TQWidget*, Provider*> m_providers; TQMap<TQWidget*, TQTextBrowser*> m_rts; TQMap<TQWidget*, TQValueList<TQPushButton*>* > m_buttons; diff --git a/knewstuff/knewstuff.cpp b/knewstuff/knewstuff.cpp index 6bfbb3333..d36a1ef19 100644 --- a/knewstuff/knewstuff.cpp +++ b/knewstuff/knewstuff.cpp @@ -30,12 +30,12 @@ using namespace KNS; -KAction* KNS::standardAction(const TQString& what, +TDEAction* KNS::standardAction(const TQString& what, const TQObject *recvr, - const char *slot, KActionCollection* parent, + const char *slot, TDEActionCollection* parent, const char *name) { - return new KAction(i18n("Download New %1").arg(what), "knewstuff", + return new TDEAction(i18n("Download New %1").arg(what), "knewstuff", 0, recvr, slot, parent, name); } diff --git a/knewstuff/knewstuff.h b/knewstuff/knewstuff.h index 5d2319aec..ca07c7f0d 100644 --- a/knewstuff/knewstuff.h +++ b/knewstuff/knewstuff.h @@ -26,17 +26,17 @@ class TQObject; class TQWidget; -class KAction; -class KActionCollection; +class TDEAction; +class TDEActionCollection; namespace KNS { class Engine; class Entry; -KDE_EXPORT KAction* standardAction(const TQString& what, +KDE_EXPORT TDEAction* standardAction(const TQString& what, const TQObject *recvr, const char *slot, - KActionCollection* parent, + TDEActionCollection* parent, const char *name = 0); } diff --git a/knewstuff/providerdialog.cpp b/knewstuff/providerdialog.cpp index a66258701..23aa94388 100644 --- a/knewstuff/providerdialog.cpp +++ b/knewstuff/providerdialog.cpp @@ -34,11 +34,11 @@ using namespace KNS; -class ProviderItem : public KListViewItem +class ProviderItem : public TDEListViewItem { public: - ProviderItem( KListView *parent, Provider *provider ) : - KListViewItem( parent ), mProvider( provider ) + ProviderItem( TDEListView *parent, Provider *provider ) : + TDEListViewItem( parent ), mProvider( provider ) { setText( 0, provider->name() ); } @@ -61,7 +61,7 @@ ProviderDialog::ProviderDialog( Engine *engine, TQWidget *parent ) : TQLabel *description = new TQLabel( i18n("Please select one of the providers listed below:"), topPage ); topLayout->addWidget( description ); - mListView = new KListView( topPage ); + mListView = new TDEListView( topPage ); mListView->addColumn( i18n("Name") ); topLayout->addWidget( mListView ); } diff --git a/knewstuff/providerdialog.h b/knewstuff/providerdialog.h index 3e02e30aa..549a65416 100644 --- a/knewstuff/providerdialog.h +++ b/knewstuff/providerdialog.h @@ -22,7 +22,7 @@ #include <kdialogbase.h> -class KListView; +class TDEListView; namespace KNS { @@ -68,7 +68,7 @@ class ProviderDialog : public KDialogBase private: Engine *mEngine; - KListView *mListView; + TDEListView *mListView; }; } diff --git a/kstyles/klegacy/klegacystyle.cpp b/kstyles/klegacy/klegacystyle.cpp index bd1deffb8..d19dcec0a 100644 --- a/kstyles/klegacy/klegacystyle.cpp +++ b/kstyles/klegacy/klegacystyle.cpp @@ -2979,7 +2979,7 @@ void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, boo void KLegacyStyle::drawKBarHandle(TQPainter *p, int x, int y, int w, int h, - const TQColorGroup &g, KToolBarPos type, TQBrush *fill) + const TQColorGroup &g, TDEToolBarPos type, TQBrush *fill) { GtkObject *gobj = priv->gtkDict.find(TQToolBar::staticMetaObject()); diff --git a/kstyles/klegacy/klegacystyle.h b/kstyles/klegacy/klegacystyle.h index 18c073f9a..5288fd4f8 100644 --- a/kstyles/klegacy/klegacystyle.h +++ b/kstyles/klegacy/klegacystyle.h @@ -60,7 +60,7 @@ public: // toolbar stuffs virtual void drawKBarHandle(TQPainter *p, int x, int y, int w, int h, - const TQColorGroup &g, KToolBarPos type, TQBrush *fill = 0); + const TQColorGroup &g, TDEToolBarPos type, TQBrush *fill = 0); virtual void drawKickerHandle(TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, TQBrush *fill = 0); virtual void drawKickerAppletHandle(TQPainter *p, int x, int y, int w, int h, diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp index ff7199939..7d2c72c2a 100644 --- a/kstyles/kthemestyle/kthemestyle.cpp +++ b/kstyles/kthemestyle/kthemestyle.cpp @@ -569,7 +569,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen { w->setBackgroundMode( TQWidget::NoBackground ); } - else if ( w->inherits( "KToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) ) + else if ( w->inherits( "TDEToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) ) { w->setBackgroundMode( TQWidget::PaletteBackground ); } @@ -652,7 +652,7 @@ void KThemeStyle::unPolish( const TQStyleControlElementData &ceData, ControlElem w->setBackgroundMode( TQWidget::PaletteButton ); //For toolbar internal separators, return to button, too (can't use tqqt_cast here since don't have access to the class) - else if ( w->inherits( "KToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) ) + else if ( w->inherits( "TDEToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) ) w->setBackgroundMode( TQWidget::PaletteButton ); //For scrollbars, we don't do much, since the widget queries the style on the switch diff --git a/kstyles/web/webstyle.cpp b/kstyles/web/webstyle.cpp index ab5282e06..3e850394f 100644 --- a/kstyles/web/webstyle.cpp +++ b/kstyles/web/webstyle.cpp @@ -965,7 +965,7 @@ WebStyle::drawSlider } void -WebStyle::drawKToolBar +WebStyle::drawTDEToolBar ( TQPainter * p, int x, @@ -973,7 +973,7 @@ WebStyle::drawKToolBar int w, int h, const TQColorGroup & g, - KToolBarPos /* pos */, + TDEToolBarPos /* pos */, TQBrush * /* fill */ ) { @@ -993,7 +993,7 @@ WebStyle::drawKBarHandle int w, int h, const TQColorGroup & g, - KToolBarPos /* pos */, + TDEToolBarPos /* pos */, TQBrush * /* fill */ ) { @@ -1025,7 +1025,7 @@ WebStyle::drawKMenuBar } void -WebStyle::drawKToolBarButton +WebStyle::drawTDEToolBarButton ( TQPainter * p, int x, @@ -1037,7 +1037,7 @@ WebStyle::drawKToolBarButton bool raised, bool enabled, bool popup, - KToolButtonType type, + TDEToolButtonType type, const TQString & btext, const TQPixmap * pixmap, TQFont * font, diff --git a/kstyles/web/webstyle.h b/kstyles/web/webstyle.h index 5cd930c73..611cf8485 100644 --- a/kstyles/web/webstyle.h +++ b/kstyles/web/webstyle.h @@ -210,7 +210,7 @@ class WebStyle : public KStyle bool tickBelow ); - void drawKToolBar + void drawTDEToolBar ( TQPainter *, int x, @@ -218,7 +218,7 @@ class WebStyle : public KStyle int w, int h, const TQColorGroup &, - KToolBarPos, + TDEToolBarPos, TQBrush * fill = 0 ); @@ -230,7 +230,7 @@ class WebStyle : public KStyle int w, int h, const TQColorGroup &, - KToolBarPos, + TDEToolBarPos, TQBrush * fill = 0 ); @@ -246,7 +246,7 @@ class WebStyle : public KStyle TQBrush * fill = 0 ); - void drawKToolBarButton + void drawTDEToolBarButton ( TQPainter * p, int x, @@ -258,7 +258,7 @@ class WebStyle : public KStyle bool raised = true, bool enabled = true, bool popup = false, - KToolButtonType = Icon, + TDEToolButtonType = Icon, const TQString & btext = TQString::null, const TQPixmap * = 0, TQFont * = 0, diff --git a/tdecert/tdecertpart.cc b/tdecert/tdecertpart.cc index 08e3ec5e0..f91c545d2 100644 --- a/tdecert/tdecertpart.cc +++ b/tdecert/tdecertpart.cc @@ -52,14 +52,14 @@ K_EXPORT_COMPONENT_FACTORY( libtdecertpart, KParts::GenericFactory<KCertPart> ) -KX509Item::KX509Item(KListViewItem *parent, KSSLCertificate *x) : - KListViewItem(parent, 0L) +KX509Item::KX509Item(TDEListViewItem *parent, KSSLCertificate *x) : + TDEListViewItem(parent, 0L) { setup(x); } -KX509Item::KX509Item(KListView *parent, KSSLCertificate *x) : - KListViewItem(parent) +KX509Item::KX509Item(TDEListView *parent, KSSLCertificate *x) : + TDEListViewItem(parent) { setup(x); } @@ -98,8 +98,8 @@ KX509Item::~KX509Item() } -KPKCS12Item::KPKCS12Item(KListViewItem *parent, KSSLPKCS12 *x) : - KListViewItem(parent, 0L) +KPKCS12Item::KPKCS12Item(TDEListViewItem *parent, KSSLPKCS12 *x) : + TDEListViewItem(parent, 0L) { cert = x; if (x) { @@ -155,13 +155,13 @@ setWidget(_frame); _baseGrid = new TQGridLayout(_frame, 15, 9, KDialog::marginHint(), KDialog::spacingHint()); -_sideList = new KListView(_frame); +_sideList = new TDEListView(_frame); _sideList->setRootIsDecorated(true); _sideList->addColumn(i18n("Certificates")); -_parentCA = new KListViewItem(_sideList, i18n("Signers")); +_parentCA = new TDEListViewItem(_sideList, i18n("Signers")); _parentCA->setExpandable(true); _sideList->setOpen(_parentCA, true); -_parentP12 = new KListViewItem(_sideList, i18n("Client")); +_parentP12 = new TDEListViewItem(_sideList, i18n("Client")); _parentP12->setExpandable(true); _sideList->setOpen(_parentP12, true); diff --git a/tdecert/tdecertpart.h b/tdecert/tdecertpart.h index 040b0ad94..bb4ca958e 100644 --- a/tdecert/tdecertpart.h +++ b/tdecert/tdecertpart.h @@ -44,10 +44,10 @@ class TDEAboutData; class TQGridLayout; -class KX509Item : public KListViewItem { +class KX509Item : public TDEListViewItem { public: - KX509Item(KListViewItem *parent, KSSLCertificate *x); - KX509Item(KListView *parent, KSSLCertificate *x); + KX509Item(TDEListViewItem *parent, KSSLCertificate *x); + KX509Item(TDEListView *parent, KSSLCertificate *x); void setup(KSSLCertificate *x); ~KX509Item(); virtual int rtti() const { return 1; } @@ -56,9 +56,9 @@ class KX509Item : public KListViewItem { }; -class KPKCS12Item : public KListViewItem { +class KPKCS12Item : public TDEListViewItem { public: - KPKCS12Item(KListViewItem *parent, KSSLPKCS12 *x); + KPKCS12Item(TDEListViewItem *parent, KSSLPKCS12 *x); ~KPKCS12Item(); KSSLPKCS12 *cert; TQString _prettyName; @@ -94,8 +94,8 @@ protected: void displayPKCS12Cert(KSSLCertificate *c); void displayCACert(KSSLCertificate *c); - KListView *_sideList; - KListViewItem *_parentCA, *_parentP12; + TDEListView *_sideList; + TDEListViewItem *_parentCA, *_parentP12; TQFrame *_pkcsFrame, *_blankFrame, *_x509Frame, *_frame; // for the PKCS12 widget diff --git a/tdecore/AUTHORS b/tdecore/AUTHORS index 03def3f46..ce19e095b 100644 --- a/tdecore/AUTHORS +++ b/tdecore/AUTHORS @@ -16,16 +16,16 @@ DnD stuff, TDESocket and TDEServerSocket classes, KPixmap Alexander Sanda <alex@darkstar.ping.at> Read and write numerical config entries, KPanner, KTabControl, -KPopupMenu, KMessageBox, KEdit widgets. +TDEPopupMenu, KMessageBox, KEdit widgets. Martin Jones <mjones@powerup.com.au> -Bugfixes in KPixmap and KURL, KColorDialog, KSelector +Bugfixes in KPixmap and KURL, KColorDialog, TDESelector Keith Brown <kbrown@pdq.net> KTreeList class Bernd Johannes Wuebben <wuebben@math.cornell.edu> -KFontDialog classes +TDEFontDialog classes Tim D. Gilman <tdgilman@best.com> KDatePicker, KDateTable class diff --git a/tdecore/DESIGN.iconloading b/tdecore/DESIGN.iconloading index a9e57afbd..a675a8922 100644 --- a/tdecore/DESIGN.iconloading +++ b/tdecore/DESIGN.iconloading @@ -72,7 +72,7 @@ information and then waiting for a sufficient long period, e.. 5 minutes, before actually removing the image data. I can also imagine a scenario where the index information is only used very -temporarily, e.g. during the creation of a KMainWindow (mmap the file in the +temporarily, e.g. during the creation of a TDEMainWindow (mmap the file in the constructor, unmap it from the next event loop) that way icons can be removed from the index and after e.g. a timeout of 5 minutes one can be relatively sure that the index will no longer be used. diff --git a/tdecore/README.kiosk b/tdecore/README.kiosk index e12e29d27..54ab60d2d 100644 --- a/tdecore/README.kiosk +++ b/tdecore/README.kiosk @@ -331,7 +331,7 @@ Applications may use additional actions that they defined themselves. You can get a list of the actions used by a certain applications by using the following dcop command: -dcop <dcopid> qt objects | grep KActionCollection/ | cut -d '/' -f 3 +dcop <dcopid> qt objects | grep TDEActionCollection/ | cut -d '/' -f 3 or with @@ -660,7 +660,7 @@ KDE3 Kiosk Application API Three new methods have been added to TDEApplication: - bool authorize(QString action); // Generic actions -- bool authorizeKAction(QString action); // For KActions exclusively +- bool authorizeTDEAction(QString action); // For TDEActions exclusively - bool authorizeURLAction(QString, referringURL, destinationURL) // URL Handling Automatic Logout diff --git a/tdecore/kaccel.cpp b/tdecore/kaccel.cpp index 7291f3f56..9dde93e7a 100644 --- a/tdecore/kaccel.cpp +++ b/tdecore/kaccel.cpp @@ -45,15 +45,15 @@ // TODO: Put in kaccelbase.cpp //--------------------------------------------------------------------- -// KAccelEventHandler +// TDEAccelEventHandler //--------------------------------------------------------------------- // -// In KAccelEventHandler::x11Event we do our own X11 keyboard event handling +// In TDEAccelEventHandler::x11Event we do our own X11 keyboard event handling // This allows us to map the Win key to Qt::MetaButton, Qt does not know about // the Win key. // -// KAccelEventHandler::x11Event will generate an AccelOverride event. The -// AccelOverride event is abused a bit to ensure that KAccelPrivate::eventFilter +// TDEAccelEventHandler::x11Event will generate an AccelOverride event. The +// AccelOverride event is abused a bit to ensure that TDEAccelPrivate::eventFilter // (as an event filter on the toplevel widget) will get the key event first // (in the form of AccelOverride) before any of the intermediate widgets are // able to process it. @@ -63,10 +63,10 @@ // skipped and the KeyPress is followed immediately. // If the Accel event is accepted, no KeyPress event will follow. // -// KAccelEventHandler::x11Event converts a X11 keyboard event into an AccelOverride +// TDEAccelEventHandler::x11Event converts a X11 keyboard event into an AccelOverride // event, there are now two possibilities: // -// 1) If KAccel intercepts the AccelOverride we are done and can consider the X11 +// 1) If TDEAccel intercepts the AccelOverride we are done and can consider the X11 // keyboard event as handled. // 2) If another widget accepts the AccelOverride, it will expect to get a normal // Qt generated KeyPress event afterwards. So we let Qt handle the X11 keyboard event @@ -80,34 +80,34 @@ bool kde_g_bKillAccelOverride = false; -class KAccelEventHandler : public TQWidget +class TDEAccelEventHandler : public TQWidget { public: - static KAccelEventHandler* self() + static TDEAccelEventHandler* self() { if( !g_pSelf ) - g_pSelf = new KAccelEventHandler; + g_pSelf = new TDEAccelEventHandler; return g_pSelf; } static void accelActivated( bool b ) { g_bAccelActivated = b; } private: - KAccelEventHandler(); + TDEAccelEventHandler(); # ifdef Q_WS_X11 bool x11Event( XEvent* pEvent ); # endif - static KAccelEventHandler* g_pSelf; + static TDEAccelEventHandler* g_pSelf; static bool g_bAccelActivated; }; -KAccelEventHandler* KAccelEventHandler::g_pSelf = 0; -bool KAccelEventHandler::g_bAccelActivated = false; +TDEAccelEventHandler* TDEAccelEventHandler::g_pSelf = 0; +bool TDEAccelEventHandler::g_bAccelActivated = false; -KAccelEventHandler::KAccelEventHandler() - : TQWidget( 0, "KAccelEventHandler" ) +TDEAccelEventHandler::TDEAccelEventHandler() + : TQWidget( 0, "TDEAccelEventHandler" ) { # ifdef Q_WS_X11 if ( kapp ) @@ -118,7 +118,7 @@ KAccelEventHandler::KAccelEventHandler() #ifdef Q_WS_X11 bool tqt_try_modal( TQWidget *, XEvent * ); -bool KAccelEventHandler::x11Event( XEvent* pEvent ) +bool TDEAccelEventHandler::x11Event( XEvent* pEvent ) { if( TQWidget::keyboardGrabber() || !kapp->focusWidget() ) return false; @@ -146,7 +146,7 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent ) g_bAccelActivated = false; kapp->sendEvent( kapp->focusWidget(), &ke ); - // If the Override event was accepted from a non-KAccel widget, + // If the Override event was accepted from a non-TDEAccel widget, // then kill the next AccelOverride in TDEApplication::notify. if( ke.isAccepted() && !g_bAccelActivated ) kde_g_bKillAccelOverride = true; @@ -160,35 +160,35 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent ) #endif // Q_WS_X11 //--------------------------------------------------------------------- -// KAccelPrivate +// TDEAccelPrivate //--------------------------------------------------------------------- -KAccelPrivate::KAccelPrivate( KAccel* pParent, TQWidget* pWatch ) -: KAccelBase( KAccelBase::QT_KEYS ) +TDEAccelPrivate::TDEAccelPrivate( TDEAccel* pParent, TQWidget* pWatch ) +: TDEAccelBase( TDEAccelBase::QT_KEYS ) { - //kdDebug(125) << "KAccelPrivate::KAccelPrivate( pParent = " << pParent << " ): this = " << this << endl; + //kdDebug(125) << "TDEAccelPrivate::TDEAccelPrivate( pParent = " << pParent << " ): this = " << this << endl; m_pAccel = pParent; m_pWatch = pWatch; m_bAutoUpdate = true; connect( (TQAccel*)m_pAccel, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotKeyPressed(int)) ); -#ifdef Q_WS_X11 //only makes sense if KAccelEventHandler is working +#ifdef Q_WS_X11 //only makes sense if TDEAccelEventHandler is working if( m_pWatch ) m_pWatch->installEventFilter( this ); #endif - KAccelEventHandler::self(); + TDEAccelEventHandler::self(); } -void KAccelPrivate::setEnabled( bool bEnabled ) +void TDEAccelPrivate::setEnabled( bool bEnabled ) { m_bEnabled = bEnabled; ((TQAccel*)m_pAccel)->setEnabled( bEnabled ); } -bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable ) +bool TDEAccelPrivate::setEnabled( const TQString& sAction, bool bEnable ) { - kdDebug(125) << "KAccelPrivate::setEnabled( \"" << sAction << "\", " << bEnable << " ): this = " << this << endl; - KAccelAction* pAction = actionPtr( sAction ); + kdDebug(125) << "TDEAccelPrivate::setEnabled( \"" << sAction << "\", " << bEnable << " ): this = " << this << endl; + TDEAccelAction* pAction = actionPtr( sAction ); if( !pAction ) return false; if( pAction->isEnabled() == bEnable ) @@ -196,7 +196,7 @@ bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable ) pAction->setEnabled( bEnable ); - TQMap<int, KAccelAction*>::const_iterator it = m_mapIDToAction.begin(); + TQMap<int, TDEAccelAction*>::const_iterator it = m_mapIDToAction.begin(); for( ; it != m_mapIDToAction.end(); ++it ) { if( *it == pAction ) ((TQAccel*)m_pAccel)->setItemEnabled( it.key(), bEnable ); @@ -204,32 +204,32 @@ bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable ) return true; } -bool KAccelPrivate::removeAction( const TQString& sAction ) +bool TDEAccelPrivate::removeAction( const TQString& sAction ) { // FIXME: getID() doesn't contains any useful // information! Use mapIDToAction. --ellis, 2/May/2002 - // Or maybe KAccelBase::remove() takes care of TQAccel indirectly... - KAccelAction* pAction = actions().actionPtr( sAction ); + // Or maybe TDEAccelBase::remove() takes care of TQAccel indirectly... + TDEAccelAction* pAction = actions().actionPtr( sAction ); if( pAction ) { int nID = pAction->getID(); //bool b = actions().removeAction( sAction ); - bool b = KAccelBase::remove( sAction ); + bool b = TDEAccelBase::remove( sAction ); ((TQAccel*)m_pAccel)->removeItem( nID ); return b; } else return false; } -bool KAccelPrivate::emitSignal( KAccelBase::Signal signal ) +bool TDEAccelPrivate::emitSignal( TDEAccelBase::Signal signal ) { - if( signal == KAccelBase::KEYCODE_CHANGED ) { + if( signal == TDEAccelBase::KEYCODE_CHANGED ) { m_pAccel->emitKeycodeChanged(); return true; } return false; } -bool KAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEAccelPrivate::connectKey( TDEAccelAction& action, const KKeyServer::Key& key ) { uint keyQt = key.keyCodeQt(); int nID = ((TQAccel*)m_pAccel)->insertItem( keyQt ); @@ -246,23 +246,23 @@ bool KAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key ((TQAccel*)m_pAccel)->setItemEnabled( nID, false ); } - kdDebug(125) << "KAccelPrivate::connectKey( \"" << action.name() << "\", " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl; + kdDebug(125) << "TDEAccelPrivate::connectKey( \"" << action.name() << "\", " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl; //kdDebug(125) << "m_pAccel = " << m_pAccel << endl; return nID != 0; } -bool KAccelPrivate::connectKey( const KKeyServer::Key& key ) +bool TDEAccelPrivate::connectKey( const KKeyServer::Key& key ) { uint keyQt = key.keyCodeQt(); int nID = ((TQAccel*)m_pAccel)->insertItem( keyQt ); m_mapIDToKey[nID] = keyQt; - kdDebug(125) << "KAccelPrivate::connectKey( " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << endl; + kdDebug(125) << "TDEAccelPrivate::connectKey( " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << endl; return nID != 0; } -bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEAccelPrivate::disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key ) { int keyQt = key.keyCodeQt(); TQMap<int, int>::iterator it = m_mapIDToKey.begin(); @@ -270,7 +270,7 @@ bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& //kdDebug(125) << "m_mapIDToKey[" << it.key() << "] = " << TQString::number(*it,16) << " == " << TQString::number(keyQt,16) << endl; if( *it == keyQt ) { int nID = it.key(); - kdDebug(125) << "KAccelPrivate::disconnectKey( \"" << action.name() << "\", 0x" << TQString::number(keyQt,16) << " ) : id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl; + kdDebug(125) << "TDEAccelPrivate::disconnectKey( \"" << action.name() << "\", 0x" << TQString::number(keyQt,16) << " ) : id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl; ((TQAccel*)m_pAccel)->removeItem( nID ); m_mapIDToAction.remove( nID ); m_mapIDToKey.remove( it ); @@ -282,10 +282,10 @@ bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& return false; } -bool KAccelPrivate::disconnectKey( const KKeyServer::Key& key ) +bool TDEAccelPrivate::disconnectKey( const KKeyServer::Key& key ) { int keyQt = key.keyCodeQt(); - kdDebug(125) << "KAccelPrivate::disconnectKey( 0x" << TQString::number(keyQt,16) << " )" << endl; + kdDebug(125) << "TDEAccelPrivate::disconnectKey( 0x" << TQString::number(keyQt,16) << " )" << endl; TQMap<int, int>::iterator it = m_mapIDToKey.begin(); for( ; it != m_mapIDToKey.end(); ++it ) { if( *it == keyQt ) { @@ -299,9 +299,9 @@ bool KAccelPrivate::disconnectKey( const KKeyServer::Key& key ) return false; } -void KAccelPrivate::slotKeyPressed( int id ) +void TDEAccelPrivate::slotKeyPressed( int id ) { - kdDebug(125) << "KAccelPrivate::slotKeyPressed( " << id << " )" << endl; + kdDebug(125) << "TDEAccelPrivate::slotKeyPressed( " << id << " )" << endl; if( m_mapIDToKey.contains( id ) ) { KKey key = m_mapIDToKey[id]; @@ -326,14 +326,14 @@ void KAccelPrivate::slotKeyPressed( int id ) } } -void KAccelPrivate::slotShowMenu() +void TDEAccelPrivate::slotShowMenu() { } -void KAccelPrivate::slotMenuActivated( int iAction ) +void TDEAccelPrivate::slotMenuActivated( int iAction ) { - kdDebug(125) << "KAccelPrivate::slotMenuActivated( " << iAction << " )" << endl; - KAccelAction* pAction = actions().actionPtr( iAction ); + kdDebug(125) << "TDEAccelPrivate::slotMenuActivated( " << iAction << " )" << endl; + TDEAccelAction* pAction = actions().actionPtr( iAction ); #ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */ if( pAction ) { connect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() ); @@ -345,12 +345,12 @@ void KAccelPrivate::slotMenuActivated( int iAction ) #endif } -bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent ) +bool TDEAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent ) { if( pEvent->type() == TQEvent::AccelOverride && m_bEnabled ) { TQKeyEvent* pKeyEvent = (TQKeyEvent*) pEvent; KKey key( pKeyEvent ); - kdDebug(125) << "KAccelPrivate::eventFilter( AccelOverride ): this = " << this << ", key = " << key.toStringInternal() << endl; + kdDebug(125) << "TDEAccelPrivate::eventFilter( AccelOverride ): this = " << this << ", key = " << key.toStringInternal() << endl; int keyCodeQt = key.keyCodeQt(); TQMap<int, int>::iterator it = m_mapIDToKey.begin(); for( ; it != m_mapIDToKey.end(); ++it ) { @@ -359,11 +359,11 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent ) kdDebug(125) << "shortcut found!" << endl; if( m_mapIDToAction.contains( nID ) ) { // TODO: reduce duplication between here and slotMenuActivated - KAccelAction* pAction = m_mapIDToAction[nID]; + TDEAccelAction* pAction = m_mapIDToAction[nID]; if( !pAction->isEnabled() ) continue; #ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */ - TQGuardedPtr<KAccelPrivate> me = this; + TQGuardedPtr<TDEAccelPrivate> me = this; connect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() ); emit menuItemActivated(); if (me) { @@ -376,7 +376,7 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent ) slotKeyPressed( nID ); pKeyEvent->accept(); - KAccelEventHandler::accelActivated( true ); + TDEAccelEventHandler::accelActivated( true ); return true; } } @@ -385,17 +385,17 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent ) } #ifndef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */ -void KAccelPrivate::emitActivatedSignal( KAccelAction* pAction ) +void TDEAccelPrivate::emitActivatedSignal( TDEAccelAction* pAction ) { if( pAction ) { - TQGuardedPtr<KAccelPrivate> me = this; - TQRegExp reg( "([ ]*KAccelAction.*)" ); + TQGuardedPtr<TDEAccelPrivate> me = this; + TQRegExp reg( "([ ]*TDEAccelAction.*)" ); if( reg.search( pAction->methodSlotPtr()) >= 0 ) { - connect( this, TQT_SIGNAL(menuItemActivated(KAccelAction*)), + connect( this, TQT_SIGNAL(menuItemActivated(TDEAccelAction*)), pAction->objSlotPtr(), pAction->methodSlotPtr() ); emit menuItemActivated( pAction ); if (me) - disconnect( me, TQT_SIGNAL(menuItemActivated(KAccelAction*)), + disconnect( me, TQT_SIGNAL(menuItemActivated(TDEAccelAction*)), pAction->objSlotPtr(), pAction->methodSlotPtr() ); } else { connect( this, TQT_SIGNAL(menuItemActivated()), @@ -411,39 +411,39 @@ void KAccelPrivate::emitActivatedSignal( KAccelAction* pAction ) #endif //--------------------------------------------------------------------- -// KAccel +// TDEAccel //--------------------------------------------------------------------- -KAccel::KAccel( TQWidget* pParent, const char* psName ) -: TQAccel( pParent, (psName) ? psName : "KAccel-TQAccel" ) +TDEAccel::TDEAccel( TQWidget* pParent, const char* psName ) +: TQAccel( pParent, (psName) ? psName : "TDEAccel-TQAccel" ) { - kdDebug(125) << "KAccel( pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl; - d = new KAccelPrivate( this, pParent ); + kdDebug(125) << "TDEAccel( pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl; + d = new TDEAccelPrivate( this, pParent ); } -KAccel::KAccel( TQWidget* watch, TQObject* pParent, const char* psName ) -: TQAccel( watch, pParent, (psName) ? psName : "KAccel-TQAccel" ) +TDEAccel::TDEAccel( TQWidget* watch, TQObject* pParent, const char* psName ) +: TQAccel( watch, pParent, (psName) ? psName : "TDEAccel-TQAccel" ) { - kdDebug(125) << "KAccel( watch = " << watch << ", pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl; + kdDebug(125) << "TDEAccel( watch = " << watch << ", pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl; if( !watch ) kdDebug(125) << kdBacktrace() << endl; - d = new KAccelPrivate( this, watch ); + d = new TDEAccelPrivate( this, watch ); } -KAccel::~KAccel() +TDEAccel::~TDEAccel() { - kdDebug(125) << "~KAccel(): this = " << this << endl; + kdDebug(125) << "~TDEAccel(): this = " << this << endl; delete d; } -KAccelActions& KAccel::actions() { return d->actions(); } -const KAccelActions& KAccel::actions() const { return d->actions(); } -bool KAccel::isEnabled() { return d->isEnabled(); } -void KAccel::setEnabled( bool bEnabled ) { d->setEnabled( bEnabled ); } -bool KAccel::setAutoUpdate( bool bAuto ) { return d->setAutoUpdate( bAuto ); } +TDEAccelActions& TDEAccel::actions() { return d->actions(); } +const TDEAccelActions& TDEAccel::actions() const { return d->actions(); } +bool TDEAccel::isEnabled() { return d->isEnabled(); } +void TDEAccel::setEnabled( bool bEnabled ) { d->setEnabled( bEnabled ); } +bool TDEAccel::setAutoUpdate( bool bAuto ) { return d->setAutoUpdate( bAuto ); } -KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef, +TDEAccelAction* TDEAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { @@ -453,8 +453,8 @@ KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, c bConfigurable, bEnabled ); } -KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef3, const KShortcut& cutDef4, +TDEAccelAction* TDEAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { @@ -464,7 +464,7 @@ KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, c bConfigurable, bEnabled ); } -KAccelAction* KAccel::insert( const char* psAction, const KShortcut& cutDef, +TDEAccelAction* TDEAccel::insert( const char* psAction, const TDEShortcut& cutDef, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { @@ -474,45 +474,45 @@ KAccelAction* KAccel::insert( const char* psAction, const KShortcut& cutDef, bConfigurable, bEnabled ); } -KAccelAction* KAccel::insert( KStdAccel::StdAccel id, +TDEAccelAction* TDEAccel::insert( TDEStdAccel::StdAccel id, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { - TQString sAction = KStdAccel::name( id ); + TQString sAction = TDEStdAccel::name( id ); if( sAction.isEmpty() ) return 0; - KAccelAction* pAction = d->insert( sAction, KStdAccel::label( id ), KStdAccel::whatsThis( id ), - KStdAccel::shortcutDefault3( id ), KStdAccel::shortcutDefault4( id ), + TDEAccelAction* pAction = d->insert( sAction, TDEStdAccel::label( id ), TDEStdAccel::whatsThis( id ), + TDEStdAccel::shortcutDefault3( id ), TDEStdAccel::shortcutDefault4( id ), pObjSlot, psMethodSlot, bConfigurable, bEnabled ); if( pAction ) - pAction->setShortcut( KStdAccel::shortcut( id ) ); + pAction->setShortcut( TDEStdAccel::shortcut( id ) ); return pAction; } -bool KAccel::remove( const TQString& sAction ) +bool TDEAccel::remove( const TQString& sAction ) { return d->removeAction( sAction ); } -bool KAccel::updateConnections() +bool TDEAccel::updateConnections() { return d->updateConnections(); } -const KShortcut& KAccel::shortcut( const TQString& sAction ) const +const TDEShortcut& TDEAccel::shortcut( const TQString& sAction ) const { - const KAccelAction* pAction = actions().actionPtr( sAction ); - return (pAction) ? pAction->shortcut() : KShortcut::null(); + const TDEAccelAction* pAction = actions().actionPtr( sAction ); + return (pAction) ? pAction->shortcut() : TDEShortcut::null(); } -bool KAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot ) +bool TDEAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot ) { return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); } -bool KAccel::setEnabled( const TQString& sAction, bool bEnable ) +bool TDEAccel::setEnabled( const TQString& sAction, bool bEnable ) { return d->setEnabled( sAction, bEnable ); } -bool KAccel::setShortcut( const TQString& sAction, const KShortcut& cut ) +bool TDEAccel::setShortcut( const TQString& sAction, const TDEShortcut& cut ) { - kdDebug(125) << "KAccel::setShortcut( \"" << sAction << "\", " << cut.toStringInternal() << " )" << endl; - KAccelAction* pAction = actions().actionPtr( sAction ); + kdDebug(125) << "TDEAccel::setShortcut( \"" << sAction << "\", " << cut.toStringInternal() << " )" << endl; + TDEAccelAction* pAction = actions().actionPtr( sAction ); if( pAction ) { if( pAction->shortcut() != cut ) return d->setShortcut( sAction, cut ); @@ -521,24 +521,24 @@ bool KAccel::setShortcut( const TQString& sAction, const KShortcut& cut ) return false; } -const TQString& KAccel::configGroup() const +const TQString& TDEAccel::configGroup() const { return d->configGroup(); } // for tdegames/ksirtet -void KAccel::setConfigGroup( const TQString& s ) +void TDEAccel::setConfigGroup( const TQString& s ) { d->setConfigGroup( s ); } -bool KAccel::readSettings( TDEConfigBase* pConfig ) +bool TDEAccel::readSettings( TDEConfigBase* pConfig ) { d->readSettings( pConfig ); return true; } -bool KAccel::writeSettings( TDEConfigBase* pConfig ) const +bool TDEAccel::writeSettings( TDEConfigBase* pConfig ) const { d->writeSettings( pConfig ); return true; } -void KAccel::emitKeycodeChanged() +void TDEAccel::emitKeycodeChanged() { - kdDebug(125) << "KAccel::emitKeycodeChanged()" << endl; + kdDebug(125) << "TDEAccel::emitKeycodeChanged()" << endl; emit keycodeChanged(); } @@ -547,11 +547,11 @@ void KAccel::emitKeycodeChanged() // Obsolete methods -- for backward compatibility //------------------------------------------------------------ -bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction, +bool TDEAccel::insertItem( const TQString& sLabel, const TQString& sAction, const char* cutsDef, int /*nIDMenu*/, TQPopupMenu *, bool bConfigurable ) { - KShortcut cut( cutsDef ); + TDEShortcut cut( cutsDef ); bool b = d->insert( sAction, sLabel, TQString::null, cut, cut, 0, 0, @@ -559,13 +559,13 @@ bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction, return b; } -bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction, +bool TDEAccel::insertItem( const TQString& sLabel, const TQString& sAction, int key, int /*nIDMenu*/, TQPopupMenu*, bool bConfigurable ) { - KShortcut cut; + TDEShortcut cut; cut.init( TQKeySequence(key) ); - KAccelAction* pAction = d->insert( sAction, sLabel, TQString::null, + TDEAccelAction* pAction = d->insert( sAction, sLabel, TQString::null, cut, cut, 0, 0, bConfigurable ); @@ -573,20 +573,20 @@ bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction, } // Used in tdeutils/kjots -bool KAccel::insertStdItem( KStdAccel::StdAccel id, const TQString& sLabel ) +bool TDEAccel::insertStdItem( TDEStdAccel::StdAccel id, const TQString& sLabel ) { - KAccelAction* pAction = d->insert( KStdAccel::name( id ), sLabel, TQString::null, - KStdAccel::shortcutDefault3( id ), KStdAccel::shortcutDefault4( id ), + TDEAccelAction* pAction = d->insert( TDEStdAccel::name( id ), sLabel, TQString::null, + TDEStdAccel::shortcutDefault3( id ), TDEStdAccel::shortcutDefault4( id ), 0, 0 ); if( pAction ) - pAction->setShortcut( KStdAccel::shortcut( id ) ); + pAction->setShortcut( TDEStdAccel::shortcut( id ) ); return true; } -bool KAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot, bool bActivate ) +bool TDEAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot, bool bActivate ) { - kdDebug(125) << "KAccel::connectItem( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )" << endl; + kdDebug(125) << "TDEAccel::connectItem( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )" << endl; if( bActivate == false ) d->setActionEnabled( sAction, false ); bool b = setSlot( sAction, pObjSlot, psMethodSlot ); @@ -595,15 +595,15 @@ bool KAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, con return b; } -bool KAccel::removeItem( const TQString& sAction ) +bool TDEAccel::removeItem( const TQString& sAction ) { return d->removeAction( sAction ); } -bool KAccel::setItemEnabled( const TQString& sAction, bool bEnable ) +bool TDEAccel::setItemEnabled( const TQString& sAction, bool bEnable ) { return setEnabled( sAction, bEnable ); } -void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action ) +void TDEAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action ) { - KAccelAction* pAction = actions().actionPtr( action ); + TDEAccelAction* pAction = actions().actionPtr( action ); TQString s = menu->text( id ); if( !pAction || s.isEmpty() ) return; @@ -628,27 +628,27 @@ void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action menu->changeItem( s, id ); } -void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, KStdAccel::StdAccel accel ) +void TDEAccel::changeMenuAccel( TQPopupMenu *menu, int id, TDEStdAccel::StdAccel accel ) { - changeMenuAccel( menu, id, KStdAccel::name( accel ) ); + changeMenuAccel( menu, id, TDEStdAccel::name( accel ) ); } -int KAccel::stringToKey( const TQString& sKey ) +int TDEAccel::stringToKey( const TQString& sKey ) { return KKey( sKey ).keyCodeQt(); } -int KAccel::currentKey( const TQString& sAction ) const +int TDEAccel::currentKey( const TQString& sAction ) const { - KAccelAction* pAction = d->actionPtr( sAction ); + TDEAccelAction* pAction = d->actionPtr( sAction ); if( pAction ) return pAction->shortcut().keyCodeQt(); return 0; } -TQString KAccel::findKey( int key ) const +TQString TDEAccel::findKey( int key ) const { - KAccelAction* pAction = d->actionPtr( KKey(key) ); + TDEAccelAction* pAction = d->actionPtr( KKey(key) ); if( pAction ) return pAction->name(); else @@ -656,7 +656,7 @@ TQString KAccel::findKey( int key ) const } #endif // !KDE_NO_COMPAT -void KAccel::virtual_hook( int, void* ) +void TDEAccel::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "kaccel.moc" diff --git a/tdecore/kaccel.h b/tdecore/kaccel.h index 491fa39ce..8a3f2d499 100644 --- a/tdecore/kaccel.h +++ b/tdecore/kaccel.h @@ -27,11 +27,11 @@ class TQPopupMenu; // for obsolete insertItem() methods below class TQWidget; -class KAccelAction; -class KAccelActions; +class TDEAccelAction; +class TDEAccelActions; class TDEConfigBase; -class KAccelPrivate; +class TDEAccelPrivate; /** * Handle shortcuts. * @@ -39,17 +39,17 @@ class KAccelPrivate; * through application configuration files or through the * KKeyChooser GUI. * - * A KAccel contains a list of accelerator actions. + * A TDEAccel contains a list of accelerator actions. * * For example, CTRL+Key_P could be a shortcut for printing a document. The key * codes are listed in tqnamespace.h. "Print" could be the action name for printing. * The action name identifies the shortcut in configuration files and the * KKeyChooser GUI. * - * A KAccel object handles key events sent to its parent widget and to all - * children of this parent widget. The most recently created KAccel object - * has precedence over any KAccel objects created before it. - * When a shortcut pressed, KAccel calls the slot to which it has been + * A TDEAccel object handles key events sent to its parent widget and to all + * children of this parent widget. The most recently created TDEAccel object + * has precedence over any TDEAccel objects created before it. + * When a shortcut pressed, TDEAccel calls the slot to which it has been * connected. If you want to set global accelerators, independent of the window * which has the focus, use TDEGlobalAccel. * @@ -69,14 +69,14 @@ class KAccelPrivate; * The translated first argument for insertItem() is used only * in the configuration dialog. *\code - * KAccel* pAccel = new KAccel( this ); + * TDEAccel* pAccel = new TDEAccel( this ); * * // Insert an action "Scroll Up" which is associated with the "Up" key: * pAccel->insert( "Scroll Up", i18n("Scroll up"), * i18n("Scroll up the current document by one line."), * Qt::Key_Up, this, TQT_SLOT(slotScrollUp()) ); * // Insert an standard acclerator action. - * pAccel->insert( KStdAccel::Print, this, TQT_SLOT(slotPrint()) ); + * pAccel->insert( TDEStdAccel::Print, this, TQT_SLOT(slotPrint()) ); * * // Update the shortcuts by read any user-defined settings from the * // application's config file. @@ -85,56 +85,56 @@ class KAccelPrivate; * * @short Configurable shortcut support for widgets. * @see TDEGlobalAccel - * @see KAccelShortcutList + * @see TDEAccelShortcutList * @see KKeyChooser * @see KKeyDialog */ -class TDECORE_EXPORT KAccel : public TQAccel +class TDECORE_EXPORT TDEAccel : public TQAccel { Q_OBJECT public: /** - * Creates a new KAccel that watches @p pParent, which is also + * Creates a new TDEAccel that watches @p pParent, which is also * the QObject's parent. * * @param pParent the parent and widget to watch for key strokes * @param psName the name of the QObject */ - KAccel( TQWidget* pParent, const char* psName = 0 ); + TDEAccel( TQWidget* pParent, const char* psName = 0 ); /** - * Creates a new KAccel that watches @p watch. + * Creates a new TDEAccel that watches @p watch. * * @param watch the widget to watch for key strokes * @param parent the parent of the QObject * @param psName the name of the QObject */ - KAccel( TQWidget* watch, TQObject* parent, const char* psName = 0 ); - virtual ~KAccel(); + TDEAccel( TQWidget* watch, TQObject* parent, const char* psName = 0 ); + virtual ~TDEAccel(); /** * @internal - * Returns the KAccel's @p KAccelActions, a list of @p KAccelAction. - * @return the KAccelActions of the KAccel + * Returns the TDEAccel's @p TDEAccelActions, a list of @p TDEAccelAction. + * @return the TDEAccelActions of the TDEAccel */ - KAccelActions& actions(); + TDEAccelActions& actions(); /** * @internal - * Returns the KAccel's @p KAccelActions, a list of @p KAccelAction. - * @return the KAccelActions of the KAccel + * Returns the TDEAccel's @p TDEAccelActions, a list of @p TDEAccelAction. + * @return the TDEAccelActions of the TDEAccel */ - const KAccelActions& actions() const; + const TDEAccelActions& actions() const; /** - * Checks whether the KAccel is active. + * Checks whether the TDEAccel is active. * @return true if the TQAccel is enabled */ bool isEnabled(); /** - * Enables or disables the KAccel. + * Enables or disables the TDEAccel. * @param bEnabled true to enable, false to disable */ void setEnabled( bool bEnabled ); @@ -172,16 +172,16 @@ class TDECORE_EXPORT KAccel : public TQAccel * @param bConfigurable Allow the user to change this shortcut if set to 'true'. * @param bEnabled The action will be activated by the shortcut if set to 'true'. */ - KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef, + TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable = true, bool bEnabled = true ); /** * Same as first insert(), but with separate shortcuts defined for * 3- and 4- modifier defaults. */ - KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef3, const KShortcut& cutDef4, + TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable = true, bool bEnabled = true ); /** @@ -201,16 +201,16 @@ class TDECORE_EXPORT KAccel : public TQAccel * @param bConfigurable Allow the user to change this shortcut if set to 'true'. * @param bEnabled The action will be activated by the shortcut if set to 'true'. */ - KAccelAction* insert( const char* psAction, const KShortcut& cutDef, + TDEAccelAction* insert( const char* psAction, const TDEShortcut& cutDef, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable = true, bool bEnabled = true ); /** * Similar to the first insert() method, but with the action * name, short description, help text, and default shortcuts all * set according to one of the standard accelerators. - * @see KStdAccel. + * @see TDEStdAccel. */ - KAccelAction* insert( KStdAccel::StdAccel id, + TDEAccelAction* insert( TDEStdAccel::StdAccel id, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable = true, bool bEnabled = true ); @@ -237,7 +237,7 @@ class TDECORE_EXPORT KAccel : public TQAccel * @param sAction the name of the action * @return the action's shortcut, or a null shortcut if not found */ - const KShortcut& shortcut( const TQString& sAction ) const; + const TDEShortcut& shortcut( const TQString& sAction ) const; /** * Set the shortcut to be associated with the action named by @p sAction. @@ -245,7 +245,7 @@ class TDECORE_EXPORT KAccel : public TQAccel * @param shortcut the shortcut to set * @return true if successful, false otherwise */ - bool setShortcut( const TQString& sAction, const KShortcut &shortcut ); + bool setShortcut( const TQString& sAction, const TDEShortcut &shortcut ); /** * Set the slot to be called when the shortcut of the action named @@ -329,7 +329,7 @@ class TDECORE_EXPORT KAccel : public TQAccel /** * @deprecated use insert */ - bool insertStdItem( KStdAccel::StdAccel id, const TQString& descr = TQString::null ) KDE_DEPRECATED; + bool insertStdItem( TDEStdAccel::StdAccel id, const TQString& descr = TQString::null ) KDE_DEPRECATED; /** * @deprecated use insert */ @@ -338,7 +338,7 @@ class TDECORE_EXPORT KAccel : public TQAccel * @deprecated use insert( accel, pObjSlot, psMethodSlot ); * */ - KDE_DEPRECATED bool connectItem( KStdAccel::StdAccel accel, const TQObject* pObjSlot, const char* psMethodSlot ) + KDE_DEPRECATED bool connectItem( TDEStdAccel::StdAccel accel, const TQObject* pObjSlot, const char* psMethodSlot ) { return insert( accel, pObjSlot, psMethodSlot ); } /** * @deprecated use remove @@ -355,7 +355,7 @@ class TDECORE_EXPORT KAccel : public TQAccel /** * @deprecated see KDE3PORTING.html */ - void changeMenuAccel( TQPopupMenu *menu, int id, KStdAccel::StdAccel accel ) KDE_DEPRECATED; + void changeMenuAccel( TQPopupMenu *menu, int id, TDEStdAccel::StdAccel accel ) KDE_DEPRECATED; /** * @deprecated */ @@ -383,8 +383,8 @@ class TDECORE_EXPORT KAccel : public TQAccel /** \internal */ virtual void virtual_hook( int id, void* data ); private: - class KAccelPrivate* d; - friend class KAccelPrivate; + class TDEAccelPrivate* d; + friend class TDEAccelPrivate; }; #endif // _KACCEL_H diff --git a/tdecore/kaccelaction.cpp b/tdecore/kaccelaction.cpp index 34448fe90..d3ec59be3 100644 --- a/tdecore/kaccelaction.cpp +++ b/tdecore/kaccelaction.cpp @@ -21,7 +21,7 @@ */ #include "kaccelaction.h" -#include "kaccelbase.h" // for KAccelBase::slotRemoveAction() & emitSignal() +#include "kaccelbase.h" // for TDEAccelBase::slotRemoveAction() & emitSignal() #include <tqkeycode.h> @@ -34,19 +34,19 @@ #include <kshortcutlist.h> //--------------------------------------------------------------------- -// KAccelAction +// TDEAccelAction //--------------------------------------------------------------------- -class KAccelActionPrivate +class TDEAccelActionPrivate { public: uint m_nConnections; }; -KAccelAction::KAccelAction() +TDEAccelAction::TDEAccelAction() { - //kdDebug(125) << "KAccelAction(): this = " << this << endl; - d = new KAccelActionPrivate; + //kdDebug(125) << "TDEAccelAction(): this = " << this << endl; + d = new TDEAccelActionPrivate; m_pObjSlot = 0; m_psMethodSlot = 0; m_bConfigurable = true; @@ -55,33 +55,33 @@ KAccelAction::KAccelAction() d->m_nConnections = 0; } -KAccelAction::KAccelAction( const KAccelAction& action ) +TDEAccelAction::TDEAccelAction( const TDEAccelAction& action ) { - //kdDebug(125) << "KAccelAction( copy from \"" << action.m_sName << "\" ): this = " << this << endl; - d = new KAccelActionPrivate; + //kdDebug(125) << "TDEAccelAction( copy from \"" << action.m_sName << "\" ): this = " << this << endl; + d = new TDEAccelActionPrivate; *this = action; } -KAccelAction::KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef3, const KShortcut& cutDef4, +TDEAccelAction::TDEAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { - //kdDebug(125) << "KAccelAction( \"" << sName << "\" ): this = " << this << endl; - d = new KAccelActionPrivate; + //kdDebug(125) << "TDEAccelAction( \"" << sName << "\" ): this = " << this << endl; + d = new TDEAccelActionPrivate; init( sName, sLabel, sWhatsThis, cutDef3, cutDef4, pObjSlot, psMethodSlot, bConfigurable, bEnabled ); } -KAccelAction::~KAccelAction() +TDEAccelAction::~TDEAccelAction() { - //kdDebug(125) << "\t\t\tKAccelAction::~KAccelAction( \"" << m_sName << "\" ): this = " << this << endl; + //kdDebug(125) << "\t\t\tTDEAccelAction::~TDEAccelAction( \"" << m_sName << "\" ): this = " << this << endl; delete d; } -void KAccelAction::clear() +void TDEAccelAction::clear() { m_cut.clear(); m_pObjSlot = 0; @@ -92,8 +92,8 @@ void KAccelAction::clear() d->m_nConnections = 0; } -bool KAccelAction::init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4, +bool TDEAccelAction::init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { @@ -110,11 +110,11 @@ bool KAccelAction::init( const TQString& sName, const TQString& sLabel, const TQ m_cut = shortcutDefault(); d->m_nConnections = 0; if( !m_bEnabled ) - kdDebug(125) << "KAccelAction::init( \"" << sName << "\" ): created with enabled = false" << endl; + kdDebug(125) << "TDEAccelAction::init( \"" << sName << "\" ): created with enabled = false" << endl; return true; } -KAccelAction& KAccelAction::operator =( const KAccelAction& action ) +TDEAccelAction& TDEAccelAction::operator =( const TDEAccelAction& action ) { m_sName = action.m_sName; m_sLabel = action.m_sLabel; @@ -132,37 +132,37 @@ KAccelAction& KAccelAction::operator =( const KAccelAction& action ) return *this; } -void KAccelAction::setName( const TQString& s ) +void TDEAccelAction::setName( const TQString& s ) { m_sName = s; } -void KAccelAction::setLabel( const TQString& s ) +void TDEAccelAction::setLabel( const TQString& s ) { m_sLabel = s; } -void KAccelAction::setWhatsThis( const TQString& s ) +void TDEAccelAction::setWhatsThis( const TQString& s ) { m_sWhatsThis = s; } -bool KAccelAction::setShortcut( const KShortcut& cut ) +bool TDEAccelAction::setShortcut( const TDEShortcut& cut ) { m_cut = cut; return true; } -void KAccelAction::setSlot( const TQObject* pObjSlot, const char* psMethodSlot ) +void TDEAccelAction::setSlot( const TQObject* pObjSlot, const char* psMethodSlot ) { m_pObjSlot = pObjSlot; m_psMethodSlot = psMethodSlot; } -void KAccelAction::setConfigurable( bool b ) +void TDEAccelAction::setConfigurable( bool b ) { m_bConfigurable = b; } -void KAccelAction::setEnabled( bool b ) +void TDEAccelAction::setEnabled( bool b ) { m_bEnabled = b; } -TQString KAccelAction::toString() const +TQString TDEAccelAction::toString() const { return m_cut.toString(); } -TQString KAccelAction::toStringInternal() const +TQString TDEAccelAction::toStringInternal() const { return m_cut.toStringInternal( &shortcutDefault() ); } -bool KAccelAction::setKeySequence( uint i, const KKeySequence& seq ) +bool TDEAccelAction::setKeySequence( uint i, const KKeySequence& seq ) { if( i < m_cut.count() ) { m_cut.setSeq( i, seq ); @@ -172,12 +172,12 @@ bool KAccelAction::setKeySequence( uint i, const KKeySequence& seq ) return false; } -void KAccelAction::clearShortcut() +void TDEAccelAction::clearShortcut() { m_cut.clear(); } -bool KAccelAction::contains( const KKeySequence& seq ) +bool TDEAccelAction::contains( const KKeySequence& seq ) { return m_cut.contains( seq ); for( uint i = 0; i < m_cut.count(); i++ ) { @@ -187,90 +187,90 @@ bool KAccelAction::contains( const KKeySequence& seq ) return false; } -const KShortcut& KAccelAction::shortcutDefault() const +const TDEShortcut& TDEAccelAction::shortcutDefault() const { return (useFourModifierKeys()) ? m_cutDefault4 : m_cutDefault3; } -bool KAccelAction::isConnected() const +bool TDEAccelAction::isConnected() const { return d->m_nConnections; } -void KAccelAction::incConnections() +void TDEAccelAction::incConnections() { d->m_nConnections++; } -void KAccelAction::decConnections() +void TDEAccelAction::decConnections() { if( d->m_nConnections > 0 ) d->m_nConnections--; } // Indicate whether to default to the 3- or 4- modifier keyboard schemes -int KAccelAction::g_bUseFourModifierKeys = -1; +int TDEAccelAction::g_bUseFourModifierKeys = -1; -bool KAccelAction::useFourModifierKeys() +bool TDEAccelAction::useFourModifierKeys() { - if( KAccelAction::g_bUseFourModifierKeys == -1 ) { + if( TDEAccelAction::g_bUseFourModifierKeys == -1 ) { // Read in whether to use 4 modifier keys TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); bool b = TDEGlobal::config()->readBoolEntry( "Use Four Modifier Keys", false ); - KAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey(); + TDEAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey(); } - return KAccelAction::g_bUseFourModifierKeys == 1; + return TDEAccelAction::g_bUseFourModifierKeys == 1; } -void KAccelAction::useFourModifierKeys( bool b ) +void TDEAccelAction::useFourModifierKeys( bool b ) { - if( KAccelAction::g_bUseFourModifierKeys != (int)b ) { - KAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey(); + if( TDEAccelAction::g_bUseFourModifierKeys != (int)b ) { + TDEAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey(); // If we're 'turning off' the meta key or, if we're turning it on, // the keyboard must actually have a meta key. if( b && !KKeyNative::keyboardHasWinKey() ) kdDebug(125) << "Tried to use four modifier keys on a keyboard layout without a Meta key.\n"; } TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); - TDEGlobal::config()->writeEntry( "Use Four Modifier Keys", KAccelAction::g_bUseFourModifierKeys, true, true); + TDEGlobal::config()->writeEntry( "Use Four Modifier Keys", TDEAccelAction::g_bUseFourModifierKeys, true, true); - kdDebug(125) << "bUseFourModifierKeys = " << KAccelAction::g_bUseFourModifierKeys << endl; + kdDebug(125) << "bUseFourModifierKeys = " << TDEAccelAction::g_bUseFourModifierKeys << endl; } //--------------------------------------------------------------------- -// KAccelActions +// TDEAccelActions //--------------------------------------------------------------------- -class KAccelActionsPrivate +class TDEAccelActionsPrivate { public: }; -KAccelActions::KAccelActions() +TDEAccelActions::TDEAccelActions() { - kdDebug(125) << "KAccelActions(): this = " << this << endl; + kdDebug(125) << "TDEAccelActions(): this = " << this << endl; initPrivate( 0 ); } -KAccelActions::KAccelActions( const KAccelActions& actions ) +TDEAccelActions::TDEAccelActions( const TDEAccelActions& actions ) { - kdDebug(125) << "KAccelActions( actions = " << &actions << " ): this = " << this << endl; + kdDebug(125) << "TDEAccelActions( actions = " << &actions << " ): this = " << this << endl; initPrivate( 0 ); init( actions ); } -KAccelActions::KAccelActions( KAccelBase* pKAccelBase ) +TDEAccelActions::TDEAccelActions( TDEAccelBase* pTDEAccelBase ) { - kdDebug(125) << "KAccelActions( KAccelBase = " << pKAccelBase << " ): this = " << this << endl; - initPrivate( pKAccelBase ); + kdDebug(125) << "TDEAccelActions( TDEAccelBase = " << pTDEAccelBase << " ): this = " << this << endl; + initPrivate( pTDEAccelBase ); } -KAccelActions::~KAccelActions() +TDEAccelActions::~TDEAccelActions() { - //kdDebug(125) << "KAccelActions::~KAccelActions(): this = " << this << endl; + //kdDebug(125) << "TDEAccelActions::~TDEAccelActions(): this = " << this << endl; clear(); //delete d; } -void KAccelActions::initPrivate( KAccelBase* pKAccelBase ) +void TDEAccelActions::initPrivate( TDEAccelBase* pTDEAccelBase ) { - m_pKAccelBase = pKAccelBase; + m_pTDEAccelBase = pTDEAccelBase; m_nSizeAllocated = m_nSize = 0; m_prgActions = 0; - //d = new KAccelActionsPrivate; + //d = new TDEAccelActionsPrivate; } -void KAccelActions::clear() +void TDEAccelActions::clear() { - kdDebug(125) << "\tKAccelActions::clear()" << endl; + kdDebug(125) << "\tTDEAccelActions::clear()" << endl; for( uint i = 0; i < m_nSize; i++ ) delete m_prgActions[i]; delete[] m_prgActions; @@ -279,14 +279,14 @@ void KAccelActions::clear() m_prgActions = 0; } -bool KAccelActions::init( const KAccelActions& actions ) +bool TDEAccelActions::init( const TDEAccelActions& actions ) { clear(); resize( actions.count() ); for( uint i = 0; i < m_nSize; i++ ) { - KAccelAction* pAction = actions.m_prgActions[i]; + TDEAccelAction* pAction = actions.m_prgActions[i]; if( pAction ) - m_prgActions[i] = new KAccelAction( *pAction ); + m_prgActions[i] = new TDEAccelAction( *pAction ); else m_prgActions[i] = 0; } @@ -294,22 +294,22 @@ bool KAccelActions::init( const KAccelActions& actions ) return true; } -bool KAccelActions::init( TDEConfigBase& config, const TQString& sGroup ) +bool TDEAccelActions::init( TDEConfigBase& config, const TQString& sGroup ) { - kdDebug(125) << "KAccelActions::init( " << sGroup << " )" << endl; + kdDebug(125) << "TDEAccelActions::init( " << sGroup << " )" << endl; TQMap<TQString, TQString> mapEntry = config.entryMap( sGroup ); resize( mapEntry.count() ); TQMap<TQString, TQString>::Iterator it( mapEntry.begin() ); for( uint i = 0; it != mapEntry.end(); ++it, i++ ) { TQString sShortcuts = *it; - KShortcut cuts; + TDEShortcut cuts; kdDebug(125) << it.key() << " = " << sShortcuts << endl; if( !sShortcuts.isEmpty() && sShortcuts != "none" ) cuts.init( sShortcuts ); - m_prgActions[i] = new KAccelAction( it.key(), it.key(), it.key(), + m_prgActions[i] = new TDEAccelAction( it.key(), it.key(), it.key(), cuts, cuts, 0, 0, // pObjSlot, psMethodSlot, true, false ); // bConfigurable, bEnabled @@ -318,11 +318,11 @@ bool KAccelActions::init( TDEConfigBase& config, const TQString& sGroup ) return true; } -void KAccelActions::resize( uint nSize ) +void TDEAccelActions::resize( uint nSize ) { if( nSize > m_nSizeAllocated ) { uint nSizeAllocated = ((nSize/10) + 1) * 10; - KAccelAction** prgActions = new KAccelAction* [nSizeAllocated]; + TDEAccelAction** prgActions = new TDEAccelAction* [nSizeAllocated]; // Copy pointers over to new array for( uint i = 0; i < m_nSizeAllocated; i++ ) @@ -340,21 +340,21 @@ void KAccelActions::resize( uint nSize ) m_nSize = nSize; } -void KAccelActions::insertPtr( KAccelAction* pAction ) +void TDEAccelActions::insertPtr( TDEAccelAction* pAction ) { resize( m_nSize + 1 ); m_prgActions[m_nSize-1] = pAction; } -void KAccelActions::updateShortcuts( KAccelActions& actions2 ) +void TDEAccelActions::updateShortcuts( TDEAccelActions& actions2 ) { - kdDebug(125) << "KAccelActions::updateShortcuts()" << endl; + kdDebug(125) << "TDEAccelActions::updateShortcuts()" << endl; bool bChanged = false; for( uint i = 0; i < m_nSize; i++ ) { - KAccelAction* pAction = m_prgActions[i]; + TDEAccelAction* pAction = m_prgActions[i]; if( pAction && pAction->m_bConfigurable ) { - KAccelAction* pAction2 = actions2.actionPtr( pAction->m_sName ); + TDEAccelAction* pAction2 = actions2.actionPtr( pAction->m_sName ); if( pAction2 ) { TQString sOld = pAction->m_cut.toStringInternal(); pAction->m_cut = pAction2->m_cut; @@ -371,68 +371,68 @@ void KAccelActions::updateShortcuts( KAccelActions& actions2 ) emitKeycodeChanged(); } -int KAccelActions::actionIndex( const TQString& sAction ) const +int TDEAccelActions::actionIndex( const TQString& sAction ) const { for( uint i = 0; i < m_nSize; i++ ) { if( m_prgActions[i] == 0 ) - kdWarning(125) << "KAccelActions::actionPtr( " << sAction << " ): encountered null pointer at m_prgActions[" << i << "]" << endl; + kdWarning(125) << "TDEAccelActions::actionPtr( " << sAction << " ): encountered null pointer at m_prgActions[" << i << "]" << endl; else if( m_prgActions[i]->m_sName == sAction ) return (int) i; } return -1; } -KAccelAction* KAccelActions::actionPtr( uint i ) +TDEAccelAction* TDEAccelActions::actionPtr( uint i ) { return m_prgActions[i]; } -const KAccelAction* KAccelActions::actionPtr( uint i ) const +const TDEAccelAction* TDEAccelActions::actionPtr( uint i ) const { return m_prgActions[i]; } -KAccelAction* KAccelActions::actionPtr( const TQString& sAction ) +TDEAccelAction* TDEAccelActions::actionPtr( const TQString& sAction ) { int i = actionIndex( sAction ); return (i >= 0) ? m_prgActions[i] : 0; } -const KAccelAction* KAccelActions::actionPtr( const TQString& sAction ) const +const TDEAccelAction* TDEAccelActions::actionPtr( const TQString& sAction ) const { int i = actionIndex( sAction ); return (i >= 0) ? m_prgActions[i] : 0; } -KAccelAction* KAccelActions::actionPtr( KKeySequence cut ) +TDEAccelAction* TDEAccelActions::actionPtr( KKeySequence cut ) { for( uint i = 0; i < m_nSize; i++ ) { if( m_prgActions[i] == 0 ) - kdWarning(125) << "KAccelActions::actionPtr( " << cut.toStringInternal() << " ): encountered null pointer at m_prgActions[" << i << "]" << endl; + kdWarning(125) << "TDEAccelActions::actionPtr( " << cut.toStringInternal() << " ): encountered null pointer at m_prgActions[" << i << "]" << endl; else if( m_prgActions[i]->contains( cut ) ) return m_prgActions[i]; } return 0; } -KAccelAction& KAccelActions::operator []( uint i ) +TDEAccelAction& TDEAccelActions::operator []( uint i ) { return *actionPtr( i ); } -const KAccelAction& KAccelActions::operator []( uint i ) const +const TDEAccelAction& TDEAccelActions::operator []( uint i ) const { return *actionPtr( i ); } -KAccelAction* KAccelActions::insert( const TQString& sName, const TQString& sLabel ) +TDEAccelAction* TDEAccelActions::insert( const TQString& sName, const TQString& sLabel ) { if( actionPtr( sName ) ) { - kdWarning(125) << "KAccelActions::insertLabel( " << sName << ", " << sLabel << " ): action with same name already present." << endl; + kdWarning(125) << "TDEAccelActions::insertLabel( " << sName << ", " << sLabel << " ): action with same name already present." << endl; return 0; } - KAccelAction* pAction = new KAccelAction; + TDEAccelAction* pAction = new TDEAccelAction; pAction->m_sName = sName; pAction->m_sLabel = sLabel; pAction->m_bConfigurable = false; @@ -442,38 +442,38 @@ KAccelAction* KAccelActions::insert( const TQString& sName, const TQString& sLab return pAction; } -KAccelAction* KAccelActions::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4, +TDEAccelAction* TDEAccelActions::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { - //kdDebug(125) << "KAccelActions::insert()2 begin" << endl; + //kdDebug(125) << "TDEAccelActions::insert()2 begin" << endl; if( actionPtr( sAction ) ) { - kdWarning(125) << "KAccelActions::insert( " << sAction << " ): action with same name already present." << endl; + kdWarning(125) << "TDEAccelActions::insert( " << sAction << " ): action with same name already present." << endl; return 0; } - KAccelAction* pAction = new KAccelAction( + TDEAccelAction* pAction = new TDEAccelAction( sAction, sLabel, sWhatsThis, rgCutDefaults3, rgCutDefaults4, pObjSlot, psMethodSlot, bConfigurable, bEnabled ); insertPtr( pAction ); - //kdDebug(125) << "KAccelActions::insert()2 end" << endl; + //kdDebug(125) << "TDEAccelActions::insert()2 end" << endl; return pAction; } -bool KAccelActions::remove( const TQString& sAction ) +bool TDEAccelActions::remove( const TQString& sAction ) { - kdDebug(125) << "KAccelActions::remove( \"" << sAction << "\" ): this = " << this << " m_pKAccelBase = " << m_pKAccelBase << endl; + kdDebug(125) << "TDEAccelActions::remove( \"" << sAction << "\" ): this = " << this << " m_pTDEAccelBase = " << m_pTDEAccelBase << endl; int iAction = actionIndex( sAction ); if( iAction < 0 ) return false; - if( m_pKAccelBase ) - m_pKAccelBase->slotRemoveAction( m_prgActions[iAction] ); + if( m_pTDEAccelBase ) + m_pTDEAccelBase->slotRemoveAction( m_prgActions[iAction] ); delete m_prgActions[iAction]; for( uint i = iAction; i < m_nSize - 1; i++ ) @@ -483,39 +483,39 @@ bool KAccelActions::remove( const TQString& sAction ) return true; } -bool KAccelActions::readActions( const TQString& sConfigGroup, TDEConfigBase* pConfig ) +bool TDEAccelActions::readActions( const TQString& sConfigGroup, TDEConfigBase* pConfig ) { - KAccelShortcutList accelList(*this, false); + TDEAccelShortcutList accelList(*this, false); return accelList.readSettings( sConfigGroup, pConfig ); } /* - 1) KAccelAction = "Something" + 1) TDEAccelAction = "Something" 1) KKeySequence = "Meta+X,Asterisk" - 1) KAccelSequence = "Meta+X" + 1) TDEAccelSequence = "Meta+X" 1) KKeySequence = Meta+X - 2) KAccelSequence = "Asterisk" + 2) TDEAccelSequence = "Asterisk" 1) KKeySequence = Shift+8 (English layout) 2) KKeySequence = Keypad_Asterisk 2) KKeySequence = "Alt+F2" - 1) KAccelSequence = "Alt+F2" + 1) TDEAccelSequence = "Alt+F2" 1) KKeySequence = Alt+F2 -> "Something=Meta+X,Asterisk;Alt+F2" */ -bool KAccelActions::writeActions( const TQString &sGroup, TDEConfigBase* pConfig, +bool TDEAccelActions::writeActions( const TQString &sGroup, TDEConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const { - kdDebug(125) << "KAccelActions::writeActions( " << sGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl; + kdDebug(125) << "TDEAccelActions::writeActions( " << sGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl; if( !pConfig ) pConfig = TDEGlobal::config(); TDEConfigGroupSaver cs( pConfig, sGroup ); for( uint i = 0; i < m_nSize; i++ ) { if( m_prgActions[i] == 0 ) { - kdWarning(125) << "KAccelActions::writeActions(): encountered null pointer at m_prgActions[" << i << "]" << endl; + kdWarning(125) << "TDEAccelActions::writeActions(): encountered null pointer at m_prgActions[" << i << "]" << endl; continue; } - const KAccelAction& action = *m_prgActions[i]; + const TDEAccelAction& action = *m_prgActions[i]; TQString s; bool bConfigHasAction = !pConfig->readEntry( action.m_sName ).isEmpty(); @@ -555,11 +555,11 @@ bool KAccelActions::writeActions( const TQString &sGroup, TDEConfigBase* pConfig return true; } -void KAccelActions::emitKeycodeChanged() +void TDEAccelActions::emitKeycodeChanged() { - if( m_pKAccelBase ) - m_pKAccelBase->emitSignal( KAccelBase::KEYCODE_CHANGED ); + if( m_pTDEAccelBase ) + m_pTDEAccelBase->emitSignal( TDEAccelBase::KEYCODE_CHANGED ); } -uint KAccelActions::count() const +uint TDEAccelActions::count() const { return m_nSize; } diff --git a/tdecore/kaccelaction.h b/tdecore/kaccelaction.h index 9cca25d4a..809533ff8 100644 --- a/tdecore/kaccelaction.h +++ b/tdecore/kaccelaction.h @@ -27,7 +27,7 @@ #include <kshortcut.h> -class KAccelBase; +class TDEAccelBase; class TQObject; class TDEConfig; @@ -35,27 +35,27 @@ class TDEConfigBase; /** * @internal - * A KAccelAction prepresents an action that can be executed using - * an accelerator key. Each KAccelAction has a name, a label, a - * "What's this" string and a KShortcut. The user can configure and + * A TDEAccelAction prepresents an action that can be executed using + * an accelerator key. Each TDEAccelAction has a name, a label, a + * "What's this" string and a TDEShortcut. The user can configure and * enable/disable them using KKeyDialog. * * \code - * 1) KAccelAction = "Run Command" + * 1) TDEAccelAction = "Run Command" * Default3 = "Alt+F2" * Default4 = "Meta+Enter;Alt+F2" - * 1) KShortcut = "Meta+Enter" + * 1) TDEShortcut = "Meta+Enter" * 1) KKeySequence = "Meta+Enter" * 1) KKey = "Meta+Enter" * 1) Meta+Enter * 2) Meta+Keypad_Enter - * 2) KShortcut = "Alt+F2" + * 2) TDEShortcut = "Alt+F2" * 1) KKeySequence = "Alt+F2" * 1) Alt+F2 - * 2) KAccelAction = "Something" + * 2) TDEAccelAction = "Something" * Default3 = "" * Default4 = "" - * 1) KShortcut = "Meta+X,Asterisk" + * 1) TDEShortcut = "Meta+X,Asterisk" * 1) KKeySequence = "Meta+X,Asterisk" * 1) KKey = "Meta+X" * 1) Meta+X @@ -64,27 +64,27 @@ class TDEConfigBase; * 2) Keypad_Asterisk * \endcode * @short An accelerator action - * @see KAccel + * @see TDEAccel * @see TDEGlobalAccel * @see KKeyChooser * @see KKeyDialog */ -class TDECORE_EXPORT KAccelAction +class TDECORE_EXPORT TDEAccelAction { public: /** - * Creates an empty KAccelAction. + * Creates an empty TDEAccelAction. * @see clear() */ - KAccelAction(); + TDEAccelAction(); /** * Copy constructor. */ - KAccelAction( const KAccelAction& ); + TDEAccelAction( const TDEAccelAction& ); /** - * Creates a new KAccelAction. + * Creates a new TDEAccelAction. * @param sName the name of the accelerator * @param sLabel the label of the accelerator (i18n!) * @param sWhatsThis the What's This text (18n!) @@ -97,11 +97,11 @@ class TDECORE_EXPORT KAccelAction * @param bConfigurable if true the user can configure the shortcut * @param bEnabled true if the accelerator should be enabled */ - KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef3, const KShortcut& cutDef4, + TDEAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ); - ~KAccelAction(); + ~TDEAccelAction(); /** * Clears the accelerator. @@ -109,7 +109,7 @@ class TDECORE_EXPORT KAccelAction void clear(); /** - * Re-initialized the KAccelAction. + * Re-initialized the TDEAccelAction. * @param sName the name of the accelerator * @param sLabel the label of the accelerator (i18n!) * @param sWhatsThis the What's This text (18n!) @@ -124,14 +124,14 @@ class TDECORE_EXPORT KAccelAction * @return true if successful, false otherwise */ bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef3, const KShortcut& cutDef4, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ); /** - * Copies this KAccelAction. + * Copies this TDEAccelAction. */ - KAccelAction& operator=( const KAccelAction& ); + TDEAccelAction& operator=( const TDEAccelAction& ); /** * Returns the name of the accelerator action. @@ -156,10 +156,10 @@ class TDECORE_EXPORT KAccelAction /** * The shortcut that is actually used (may be used configured). - * @return the shortcut of the KAccelAction, can be null if not set + * @return the shortcut of the TDEAccelAction, can be null if not set * @see shortcutDefault() */ - const KShortcut& shortcut() const { return m_cut; } + const TDEShortcut& shortcut() const { return m_cut; } /** * The default shortcut for this system. @@ -168,7 +168,7 @@ class TDECORE_EXPORT KAccelAction * @see shortcutDefault3() * @see shortcutDefault4() */ - const KShortcut& shortcutDefault() const; + const TDEShortcut& shortcutDefault() const; /** * The default shortcut for 3 modifier systems. @@ -178,7 +178,7 @@ class TDECORE_EXPORT KAccelAction * @see shortcutDefault4() * @see useFourModifierKeys() */ - const KShortcut& shortcutDefault3() const { return m_cutDefault3; } + const TDEShortcut& shortcutDefault3() const { return m_cutDefault3; } /** * The default shortcut for 4 modifier systems. @@ -188,7 +188,7 @@ class TDECORE_EXPORT KAccelAction * @see shortcutDefault3() * @see useFourModifierKeys() */ - const KShortcut& shortcutDefault4() const { return m_cutDefault4; } + const TDEShortcut& shortcutDefault4() const { return m_cutDefault4; } /** * Returns the receiver of signals. @@ -237,7 +237,7 @@ class TDECORE_EXPORT KAccelAction * @param rgCuts the shortcut to set * @return true if successful, false otherwise */ - bool setShortcut( const KShortcut& rgCuts ); + bool setShortcut( const TDEShortcut& rgCuts ); /** * Sets the slot of the accelerator action. @@ -284,14 +284,14 @@ class TDECORE_EXPORT KAccelAction * @param i the position of the sequence * @param keySeq the new new sequence * @return true if successful, false otherwise - * @see KShortcut::setSeq() + * @see TDEShortcut::setSeq() */ bool setKeySequence( uint i, const KKeySequence &keySeq ); /** * Clears the action's shortcut. It will not contain any sequences after * calling this method. - * @see KShortcut::clear() + * @see TDEShortcut::clear() */ void clearShortcut(); @@ -299,14 +299,14 @@ class TDECORE_EXPORT KAccelAction * Checks whether the action's shortcut contains the given key sequence. * @param keySeq the key sequence to check * @return true if the shortcut contains the given sequence - * @see KShortcut::contains() + * @see TDEShortcut::contains() */ bool contains( const KKeySequence &keySeq ); /** * Returns the string representation of the action's shortcut. * @return the string representation of the action's shortcut. - * @see KShortcut::toString() + * @see TDEShortcut::toString() */ TQString toString() const; @@ -332,8 +332,8 @@ class TDECORE_EXPORT KAccelAction TQString m_sName /**< Name of accel. @sa setName() */, m_sLabel /**< Label of accel. User-visible. */, m_sWhatsThis /**< WhatsThis help for accel. User-visible. */; - KShortcut m_cut /**< Shortcut actually assigned. */; - KShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */, + TDEShortcut m_cut /**< Shortcut actually assigned. */; + TDEShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */, m_cutDefault4 /**< Default shortcur in 4-modifier layout */; const TQObject* m_pObjSlot /**< Object we will send signals to. */; const char* m_psMethodSlot /**< Slot we send signals to, in m_pObjSlot */; @@ -349,36 +349,36 @@ class TDECORE_EXPORT KAccelAction private: static int g_bUseFourModifierKeys; - class KAccelActionPrivate* d; + class TDEAccelActionPrivate* d; - friend class KAccelActions; - friend class KAccelBase; + friend class TDEAccelActions; + friend class TDEAccelBase; }; //--------------------------------------------------------------------- -// KAccelActions +// TDEAccelActions //--------------------------------------------------------------------- /** * @internal - * This class represents a collection of KAccelAction objects. + * This class represents a collection of TDEAccelAction objects. * * @short A collection of accelerator actions - * @see KAccelAction + * @see TDEAccelAction */ -class TDECORE_EXPORT KAccelActions +class TDECORE_EXPORT TDEAccelActions { public: /** - * Creates a new, empty KAccelActions object. + * Creates a new, empty TDEAccelActions object. */ - KAccelActions(); + TDEAccelActions(); /** * Copy constructor (deep copy). */ - KAccelActions( const KAccelActions& ); - virtual ~KAccelActions(); + TDEAccelActions( const TDEAccelActions& ); + virtual ~TDEAccelActions(); /** * Removes all items from this collection. @@ -391,7 +391,7 @@ class TDECORE_EXPORT KAccelActions * @param actions the actions to copy * @return true if successful, false otherwise */ - bool init( const KAccelActions &actions ); + bool init( const TDEAccelActions &actions ); /** * Loads the actions from the given configuration file. @@ -408,7 +408,7 @@ class TDECORE_EXPORT KAccelActions * @param shortcuts the collection that contains the new * shortcuts */ - void updateShortcuts( KAccelActions &shortcuts ); + void updateShortcuts( TDEAccelActions &shortcuts ); /** * Retrieves the index of the action with the given name. @@ -421,63 +421,63 @@ class TDECORE_EXPORT KAccelActions * Returns the action with the given @p index. * @param index the index of an action. You must not * use an index that is too high. - * @return the KAccelAction with the given index + * @return the TDEAccelAction with the given index * @see count() */ - KAccelAction* actionPtr( uint index ); + TDEAccelAction* actionPtr( uint index ); /** * Returns the action with the given @p index. * @param index the index of an action. You must not * use an index that is too high. - * @return the KAccelAction with the given index + * @return the TDEAccelAction with the given index * @see count() */ - const KAccelAction* actionPtr( uint index ) const; + const TDEAccelAction* actionPtr( uint index ) const; /** * Returns the action with the given name. * @param sAction the name of the action to search - * @return the KAccelAction with the given name, or 0 + * @return the TDEAccelAction with the given name, or 0 * if not found */ - KAccelAction* actionPtr( const TQString& sAction ); + TDEAccelAction* actionPtr( const TQString& sAction ); /** * Returns the action with the given name. * @param sAction the name of the action to search - * @return the KAccelAction with the given name, or 0 + * @return the TDEAccelAction with the given name, or 0 * if not found */ - const KAccelAction* actionPtr( const TQString& sAction ) const; + const TDEAccelAction* actionPtr( const TQString& sAction ) const; /** * Returns the action with the given key sequence. * @param cut the sequence to search for - * @return the KAccelAction with the given sequence, or 0 + * @return the TDEAccelAction with the given sequence, or 0 * if not found */ - KAccelAction* actionPtr( KKeySequence cut ); + TDEAccelAction* actionPtr( KKeySequence cut ); /** * Returns the action with the given @p index. * @param index the index of an action. You must not * use an index that is too high. - * @return the KAccelAction with the given index + * @return the TDEAccelAction with the given index * @see actionPtr() * @see count() */ - KAccelAction& operator []( uint index ); + TDEAccelAction& operator []( uint index ); /** * Returns the action with the given @p index. * @param index the index of an action. You must not * use an index that is too high. - * @return the KAccelAction with the given index + * @return the TDEAccelAction with the given index * @see actionPtr() * @see count() */ - const KAccelAction& operator []( uint index ) const; + const TDEAccelAction& operator []( uint index ) const; /** * Inserts an action into the collection. @@ -494,8 +494,8 @@ class TDECORE_EXPORT KAccelActions * @param bEnabled if true the accelerator should be enabled * @return the new action */ - KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4, + TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4, const TQObject* pObjSlot = 0, const char* psMethodSlot = 0, bool bConfigurable = true, bool bEnabled = true ); @@ -505,7 +505,7 @@ class TDECORE_EXPORT KAccelActions * @param sLabel the label of the accelerator (i18n!) * @return the new action */ - KAccelAction* insert( const TQString& sName, const TQString& sLabel ); + TDEAccelAction* insert( const TQString& sName, const TQString& sLabel ); /** * Removes the given action. @@ -548,9 +548,9 @@ class TDECORE_EXPORT KAccelActions protected: /** Base object that proxies signals from us. */ - KAccelBase* m_pKAccelBase; + TDEAccelBase* m_pTDEAccelBase; /** Array of actions we're hanging on to. */ - KAccelAction** m_prgActions; + TDEAccelAction** m_prgActions; uint m_nSizeAllocated /**< Allocated size of the array. */, m_nSize /**< Amount in use. */ ; @@ -561,16 +561,16 @@ class TDECORE_EXPORT KAccelActions */ void resize( uint new_size ); /** Add a action to this collection. @todo Document ownership. */ - void insertPtr( KAccelAction* ); + void insertPtr( TDEAccelAction* ); private: - class KAccelActionsPrivate* d; + class TDEAccelActionsPrivate* d; - KAccelActions( KAccelBase* ); - void initPrivate( KAccelBase* ); - KAccelActions& operator =( KAccelActions& ); + TDEAccelActions( TDEAccelBase* ); + void initPrivate( TDEAccelBase* ); + TDEAccelActions& operator =( TDEAccelActions& ); - friend class KAccelBase; + friend class TDEAccelBase; }; #endif // _KACCELACTION_H diff --git a/tdecore/kaccelbase.cpp b/tdecore/kaccelbase.cpp index 75810b2e3..235803134 100644 --- a/tdecore/kaccelbase.cpp +++ b/tdecore/kaccelbase.cpp @@ -36,17 +36,17 @@ #include "kshortcutmenu.h" //--------------------------------------------------------------------- -// class KAccelBase::ActionInfo +// class TDEAccelBase::ActionInfo //--------------------------------------------------------------------- //--------------------------------------------------------------------- -// class KAccelBase +// class TDEAccelBase //--------------------------------------------------------------------- -KAccelBase::KAccelBase( int fInitCode ) +TDEAccelBase::TDEAccelBase( int fInitCode ) : m_rgActions( this ) { - kdDebug(125) << "KAccelBase(): this = " << this << endl; + kdDebug(125) << "TDEAccelBase(): this = " << this << endl; m_bNativeKeys = fInitCode & NATIVE_KEYS; m_bEnabled = true; m_sConfigGroup = "Shortcuts"; @@ -55,27 +55,27 @@ KAccelBase::KAccelBase( int fInitCode ) mtemp_pActionRemoving = 0; } -KAccelBase::~KAccelBase() +TDEAccelBase::~TDEAccelBase() { - kdDebug(125) << "~KAccelBase(): this = " << this << endl; + kdDebug(125) << "~TDEAccelBase(): this = " << this << endl; } -uint KAccelBase::actionCount() const { return m_rgActions.count(); } -KAccelActions& KAccelBase::actions() { return m_rgActions; } -bool KAccelBase::isEnabled() const { return m_bEnabled; } +uint TDEAccelBase::actionCount() const { return m_rgActions.count(); } +TDEAccelActions& TDEAccelBase::actions() { return m_rgActions; } +bool TDEAccelBase::isEnabled() const { return m_bEnabled; } // see TDEGlobalAccel::blockShortcuts() stuff - it's to temporarily block // all global shortcuts, so that the key grabs are released, but from the app's // point of view the TDEGlobalAccel is still enabled, so TDEGlobalAccel needs // to disable key grabbing even if enabled -bool KAccelBase::isEnabledInternal() const { return isEnabled(); } +bool TDEAccelBase::isEnabledInternal() const { return isEnabled(); } -KAccelAction* KAccelBase::actionPtr( const TQString& sAction ) +TDEAccelAction* TDEAccelBase::actionPtr( const TQString& sAction ) { return m_rgActions.actionPtr( sAction ); } -const KAccelAction* KAccelBase::actionPtr( const TQString& sAction ) const +const TDEAccelAction* TDEAccelBase::actionPtr( const TQString& sAction ) const { return m_rgActions.actionPtr( sAction ); } -KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key ) +TDEAccelAction* TDEAccelBase::actionPtr( const KKeyServer::Key& key ) { if( !m_mapKeyToAction.contains( key ) ) return 0; @@ -83,25 +83,25 @@ KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key ) return m_mapKeyToAction[key].pAction; } -KAccelAction* KAccelBase::actionPtr( const KKey& key ) +TDEAccelAction* TDEAccelBase::actionPtr( const KKey& key ) { KKeyServer::Key k2; k2.init( key, !m_bNativeKeys ); return actionPtr( k2 ); } -void KAccelBase::setConfigGroup( const TQString& sConfigGroup ) +void TDEAccelBase::setConfigGroup( const TQString& sConfigGroup ) { m_sConfigGroup = sConfigGroup; } -void KAccelBase::setConfigGlobal( bool global ) +void TDEAccelBase::setConfigGlobal( bool global ) { m_bConfigIsGlobal = global; } -bool KAccelBase::setActionEnabled( const TQString& sAction, bool bEnable ) +bool TDEAccelBase::setActionEnabled( const TQString& sAction, bool bEnable ) { - KAccelAction* pAction = actionPtr( sAction ); + TDEAccelAction* pAction = actionPtr( sAction ); if( pAction ) { if( pAction->m_bEnabled != bEnable ) { - kdDebug(125) << "KAccelBase::setActionEnabled( " << sAction << ", " << bEnable << " )" << endl; + kdDebug(125) << "TDEAccelBase::setActionEnabled( " << sAction << ", " << bEnable << " )" << endl; pAction->m_bEnabled = bEnable; if( m_bAutoUpdate ) { // FIXME: the action may already have it's connections inserted! @@ -116,9 +116,9 @@ bool KAccelBase::setActionEnabled( const TQString& sAction, bool bEnable ) return false; } -bool KAccelBase::setAutoUpdate( bool bAuto ) +bool TDEAccelBase::setAutoUpdate( bool bAuto ) { - kdDebug(125) << "KAccelBase::setAutoUpdate( " << bAuto << " ): m_bAutoUpdate on entrance = " << m_bAutoUpdate << endl; + kdDebug(125) << "TDEAccelBase::setAutoUpdate( " << bAuto << " ): m_bAutoUpdate on entrance = " << m_bAutoUpdate << endl; bool b = m_bAutoUpdate; if( !m_bAutoUpdate && bAuto ) updateConnections(); @@ -126,13 +126,13 @@ bool KAccelBase::setAutoUpdate( bool bAuto ) return b; } -KAccelAction* KAccelBase::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp, - const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4, +TDEAccelAction* TDEAccelBase::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp, + const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { - //kdDebug(125) << "KAccelBase::insert() begin" << endl; - KAccelAction* pAction = m_rgActions.insert( + //kdDebug(125) << "TDEAccelBase::insert() begin" << endl; + TDEAccelAction* pAction = m_rgActions.insert( sAction, sDesc, sHelp, rgCutDefaults3, rgCutDefaults4, pObjSlot, psMethodSlot, @@ -141,27 +141,27 @@ KAccelAction* KAccelBase::insert( const TQString& sAction, const TQString& sDesc if( pAction && m_bAutoUpdate ) insertConnection( pAction ); - //kdDebug(125) << "KAccelBase::insert() end" << endl; + //kdDebug(125) << "TDEAccelBase::insert() end" << endl; return pAction; } -KAccelAction* KAccelBase::insert( const TQString& sName, const TQString& sDesc ) +TDEAccelAction* TDEAccelBase::insert( const TQString& sName, const TQString& sDesc ) { return m_rgActions.insert( sName, sDesc ); } -bool KAccelBase::remove( const TQString& sAction ) +bool TDEAccelBase::remove( const TQString& sAction ) { return m_rgActions.remove( sAction ); } -void KAccelBase::slotRemoveAction( KAccelAction* pAction ) +void TDEAccelBase::slotRemoveAction( TDEAccelAction* pAction ) { removeConnection( pAction ); } -bool KAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot ) +bool TDEAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot ) { - kdDebug(125) << "KAccelBase::setActionSlot( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )\n"; - KAccelAction* pAction = m_rgActions.actionPtr( sAction ); + kdDebug(125) << "TDEAccelBase::setActionSlot( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )\n"; + TDEAccelAction* pAction = m_rgActions.actionPtr( sAction ); if( pAction ) { // If there was a previous connection, remove it. if( m_bAutoUpdate && pAction->isConnected() ) { @@ -182,24 +182,24 @@ bool KAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlo } /* -KAccelBase +TDEAccelBase Run Command=Meta+Enter;Alt+F2 - KAccelAction = "Run Command" - 1) KAccelKeySeries = "Meta+Enter" + TDEAccelAction = "Run Command" + 1) TDEAccelKeySeries = "Meta+Enter" 1a) Meta+Enter 1b) Meta+Keypad_Enter - 2) KAccelKeySeries = "Alt+F2" + 2) TDEAccelKeySeries = "Alt+F2" 1a) Alt+F2 Konqueror=Meta+I,I - KAccelAction = "Konqueror" - 1) KAccelKeySeries = "Meta+I,I" + TDEAccelAction = "Konqueror" + 1) TDEAccelKeySeries = "Meta+I,I" 1a) Meta+I 2a) I Something=Meta+Asterisk,X - KAccelAction = "Something" - 1) KAccelKeySeries = "Meta+Asterisk,X" + TDEAccelAction = "Something" + 1) TDEAccelKeySeries = "Meta+Asterisk,X" 1a) Meta+Shift+8 1b) Meta+Keypad_8 2a) X @@ -215,25 +215,25 @@ connect new key sequences /* { For { - for( KAccelAction::iterator itAction = m_rgActions.begin(); itAction != m_rgActions.end(); ++itAction ) { - KAccelAction& action = *itAction; - for( KAccelSeries::iterator itSeries = action.m_rgSeries.begin(); itSeries != action.m_rgSeries.end(); ++itSeries ) { - KAccelSeries& series = *itSeries; + for( TDEAccelAction::iterator itAction = m_rgActions.begin(); itAction != m_rgActions.end(); ++itAction ) { + TDEAccelAction& action = *itAction; + for( TDEAccelSeries::iterator itSeries = action.m_rgSeries.begin(); itSeries != action.m_rgSeries.end(); ++itSeries ) { + TDEAccelSeries& series = *itSeries; if( } } } Sort by: iVariation, iSequence, iSeries, iAction - 1) KAccelAction = "Run Command" - 1) KAccelKeySeries = "Meta+Enter" + 1) TDEAccelAction = "Run Command" + 1) TDEAccelKeySeries = "Meta+Enter" 1a) Meta+Enter 1b) Meta+Keypad_Enter - 2) KAccelKeySeries = "Alt+F2" + 2) TDEAccelKeySeries = "Alt+F2" 1a) Alt+F2 - 2) KAccelAction = "Enter Calculation" - 1) KAccelKeySeries = "Meta+Keypad_Enter" + 2) TDEAccelAction = "Enter Calculation" + 1) TDEAccelKeySeries = "Meta+Keypad_Enter" 1a) Meta+Keypad_Enter List = @@ -246,7 +246,7 @@ connect new key sequences */ #ifdef Q_WS_X11 -struct KAccelBase::X +struct TDEAccelBase::X { uint iAction, iSeq, iVari; KKeyServer::Key key; @@ -312,10 +312,10 @@ struct KAccelBase::X Ctrl+KP_Add => #2 */ -bool KAccelBase::updateConnections() +bool TDEAccelBase::updateConnections() { #ifdef Q_WS_X11 - kdDebug(125) << "KAccelBase::updateConnections() this = " << this << endl; + kdDebug(125) << "TDEAccelBase::updateConnections() this = " << this << endl; // Retrieve the list of keys to be connected, sorted by priority. // (key, variation, seq) TQValueVector<X> rgKeys; @@ -356,7 +356,7 @@ bool KAccelBase::updateConnections() if( bNonUnique ) { // Remove connection to single action if there is one if( m_mapKeyToAction.contains( key ) ) { - KAccelAction* pAction = m_mapKeyToAction[key].pAction; + TDEAccelAction* pAction = m_mapKeyToAction[key].pAction; if( pAction ) { m_mapKeyToAction.remove( key ); disconnectKey( *pAction, key ); @@ -376,7 +376,7 @@ bool KAccelBase::updateConnections() // Disconnect keys which no longer have bindings: for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it ) { const KKeyServer::Key& key = it.key(); - KAccelAction* pAction = (*it).pAction; + TDEAccelAction* pAction = (*it).pAction; // If this key is longer used or it points to a different action now, if( !mapKeyToAction.contains( key ) || mapKeyToAction[key].pAction != pAction ) { if( pAction ) { @@ -392,7 +392,7 @@ bool KAccelBase::updateConnections() // new action map, but which are _not_ present in the old one. for( KKeyToActionMap::iterator it = mapKeyToAction.begin(); it != mapKeyToAction.end(); ++it ) { const KKeyServer::Key& key = it.key(); - KAccelAction* pAction = (*it).pAction; + TDEAccelAction* pAction = (*it).pAction; if( !m_mapKeyToAction.contains( key ) || m_mapKeyToAction[key].pAction != pAction ) { // TODO: Decide what to do if connect fails. // Probably should remove this item from map. @@ -419,16 +419,16 @@ bool KAccelBase::updateConnections() #ifdef Q_WS_X11 // Construct a list of keys to be connected, sorted highest priority first. -void KAccelBase::createKeyList( TQValueVector<struct X>& rgKeys ) +void TDEAccelBase::createKeyList( TQValueVector<struct X>& rgKeys ) { - //kdDebug(125) << "KAccelBase::createKeyList()" << endl; + //kdDebug(125) << "TDEAccelBase::createKeyList()" << endl; if( !isEnabledInternal()) return; // create the list // For each action for( uint iAction = 0; iAction < m_rgActions.count(); iAction++ ) { - KAccelAction* pAction = m_rgActions.actionPtr( iAction ); + TDEAccelAction* pAction = m_rgActions.actionPtr( iAction ); if( pAction && pAction->m_pObjSlot && pAction->m_psMethodSlot && pAction != mtemp_pActionRemoving ) { // For each key sequence associated with action for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) { @@ -453,12 +453,12 @@ void KAccelBase::createKeyList( TQValueVector<struct X>& rgKeys ) } #endif //Q_WS_X11 -bool KAccelBase::insertConnection( KAccelAction* pAction ) +bool TDEAccelBase::insertConnection( TDEAccelAction* pAction ) { if( !pAction->m_pObjSlot || !pAction->m_psMethodSlot ) return true; - kdDebug(125) << "KAccelBase::insertConnection( " << pAction << "=\"" << pAction->m_sName << "\"; shortcut = " << pAction->shortcut().toStringInternal() << " ) this = " << this << endl; + kdDebug(125) << "TDEAccelBase::insertConnection( " << pAction << "=\"" << pAction->m_sName << "\"; shortcut = " << pAction->shortcut().toStringInternal() << " ) this = " << this << endl; // For each sequence associated with the given action: for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) { @@ -502,7 +502,7 @@ bool KAccelBase::insertConnection( KAccelAction* pAction ) } //kdDebug(125) << "\tActions = " << m_rgActions.size() << endl; - //for( KAccelActions::const_iterator it = m_rgActions.begin(); it != m_rgActions.end(); ++it ) { + //for( TDEAccelActions::const_iterator it = m_rgActions.begin(); it != m_rgActions.end(); ++it ) { // kdDebug(125) << "\t" << &(*it) << " '" << (*it).m_sName << "'" << endl; //} @@ -516,9 +516,9 @@ bool KAccelBase::insertConnection( KAccelAction* pAction ) return true; } -bool KAccelBase::removeConnection( KAccelAction* pAction ) +bool TDEAccelBase::removeConnection( TDEAccelAction* pAction ) { - kdDebug(125) << "KAccelBase::removeConnection( " << pAction << " = \"" << pAction->m_sName << "\"; shortcut = " << pAction->m_cut.toStringInternal() << " ): this = " << this << endl; + kdDebug(125) << "TDEAccelBase::removeConnection( " << pAction << " = \"" << pAction->m_sName << "\"; shortcut = " << pAction->m_cut.toStringInternal() << " ): this = " << this << endl; //for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it ) // kdDebug(125) << "\tKey: " << it.key().toString() << " => '" << (*it)->m_sName << "'" << " " << *it << endl; @@ -548,9 +548,9 @@ bool KAccelBase::removeConnection( KAccelAction* pAction ) return true; } -bool KAccelBase::setShortcut( const TQString& sAction, const KShortcut& cut ) +bool TDEAccelBase::setShortcut( const TQString& sAction, const TDEShortcut& cut ) { - KAccelAction* pAction = actionPtr( sAction ); + TDEAccelAction* pAction = actionPtr( sAction ); if( pAction ) { if( m_bAutoUpdate ) removeConnection( pAction ); @@ -564,26 +564,26 @@ bool KAccelBase::setShortcut( const TQString& sAction, const KShortcut& cut ) return false; } -void KAccelBase::readSettings( TDEConfigBase* pConfig ) +void TDEAccelBase::readSettings( TDEConfigBase* pConfig ) { m_rgActions.readActions( m_sConfigGroup, pConfig ); if( m_bAutoUpdate ) updateConnections(); } -void KAccelBase::writeSettings( TDEConfigBase* pConfig ) const +void TDEAccelBase::writeSettings( TDEConfigBase* pConfig ) const { m_rgActions.writeActions( m_sConfigGroup, pConfig, m_bConfigIsGlobal, m_bConfigIsGlobal ); } -TQPopupMenu* KAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence& seq ) +TQPopupMenu* TDEAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence& seq ) { - KShortcutMenu* pMenu = new KShortcutMenu( pParent, &actions(), seq ); + TDEShortcutMenu* pMenu = new TDEShortcutMenu( pParent, &actions(), seq ); bool bActionInserted = false; bool bInsertSeparator = false; for( uint i = 0; i < actionCount(); i++ ) { - const KAccelAction* pAction = actions().actionPtr( i ); + const TDEAccelAction* pAction = actions().actionPtr( i ); if( !pAction->isEnabled() ) continue; diff --git a/tdecore/kaccelbase.h b/tdecore/kaccelbase.h index 132a6aa5c..3d7180c4f 100644 --- a/tdecore/kaccelbase.h +++ b/tdecore/kaccelbase.h @@ -42,7 +42,7 @@ class TQWidget; * key bindings through application configuration files or through the * KKeyChooser GUI. * - * A KAccel contains a list of accelerator items. Each accelerator item + * A TDEAccel contains a list of accelerator items. Each accelerator item * consists of an action name and a keyboard code combined with modifiers * (Shift, Ctrl and Alt.) * @@ -55,7 +55,7 @@ class TQWidget; * connected. Accelerator items can be connected so that a key will activate * two different slots. * - * A KAccel object handles key events sent to its parent widget and to all + * A TDEAccel object handles key events sent to its parent widget and to all * children of this parent widget. * * Key binding reconfiguration during run time can be prevented by specifying @@ -74,33 +74,33 @@ class TQWidget; * The translated first argument for insertItem() is used only * in the configuration dialog. *\code - * KAccel *a = new KAccel( myWindow ); + * TDEAccel *a = new TDEAccel( myWindow ); * // Insert an action "Scroll Up" which is associated with the "Up" key: * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" ); * // Insert an action "Scroll Down" which is not associated with any key: * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0); * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) ); - * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it + * // a->insertStdItem( TDEStdAccel::Print ); //not necessary, since it * // is done automatially with the * // connect below! - * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) ); + * a->connectItem(TDEStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) ); * * a->readSettings(); *\endcode * * If a shortcut has a menu entry as well, you could insert them like - * this. The example is again the KStdAccel::Print from above. + * this. The example is again the TDEStdAccel::Print from above. * * \code * int id; * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc())); - * a->changeMenuAccel(popup, id, KStdAccel::Print ); + * a->changeMenuAccel(popup, id, TDEStdAccel::Print ); * \endcode * * If you want a somewhat "exotic" name for your standard print action, like * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc())); * it might be a good idea to insert the standard action before as - * a->insertStdItem( KStdAccel::Print, i18n("Print Document") ) + * a->insertStdItem( TDEStdAccel::Print, i18n("Print Document") ) * as well, so that the user can easily find the corresponding function. * * This technique works for other actions as well. Your "scroll up" function @@ -118,10 +118,10 @@ class TQWidget; * @short Configurable key binding support. */ -class TDECORE_EXPORT KAccelBase +class TDECORE_EXPORT TDEAccelBase { public: - /** Initialization mode of the KAccelBase, used in constructor. */ + /** Initialization mode of the TDEAccelBase, used in constructor. */ enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 }; /** Enum for kinds of signals which may be emitted. */ @@ -130,32 +130,32 @@ class TDECORE_EXPORT KAccelBase /** Constructor. @p fInitCode should be a bitwise OR of * values from the Init enum. */ - KAccelBase( int fInitCode ); - virtual ~KAccelBase(); + TDEAccelBase( int fInitCode ); + virtual ~TDEAccelBase(); /** Returns number of actions in this handler. */ uint actionCount() const; /** Returns a list of all the actions in this handler. */ - KAccelActions& actions(); + TDEAccelActions& actions(); /** Returns whether this accelerator handler is enabled or not. */ bool isEnabled() const; - /** Returns a pointer to the KAccelAction named @p sAction. */ - KAccelAction* actionPtr( const TQString& sAction ); + /** Returns a pointer to the TDEAccelAction named @p sAction. */ + TDEAccelAction* actionPtr( const TQString& sAction ); /** Const version of the above. */ - const KAccelAction* actionPtr( const TQString& sAction ) const; - /** Returns a pointer to the KAccelAction associated with + const TDEAccelAction* actionPtr( const TQString& sAction ) const; + /** Returns a pointer to the TDEAccelAction associated with * the key @p key. This function takes into account the * key mapping defined in the constructor. * * May return 0 if no (or more than one) * action is associated with the key. */ - KAccelAction* actionPtr( const KKey& key ); + TDEAccelAction* actionPtr( const KKey& key ); /** Basically the same as above, except a KKeyServer::Key * already has a key mapping defined (either NATIVE_KEYS or not). */ - KAccelAction* actionPtr( const KKeyServer::Key& key ); + TDEAccelAction* actionPtr( const KKeyServer::Key& key ); /** Returns the name of the configuration group these * accelerators are stored in. The default is "Shortcuts". @@ -181,10 +181,10 @@ class TDECORE_EXPORT KAccelBase // Procedures for manipulating Actions. //void clearActions(); - KAccelAction* insert( const TQString& sName, const TQString& sDesc ); - KAccelAction* insert( + TDEAccelAction* insert( const TQString& sName, const TQString& sDesc ); + TDEAccelAction* insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp, - const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4, + const TDEShortcut& rgCutDefaults3, const TDEShortcut& rgCutDefaults4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable = true, bool bEnabled = true ); bool remove( const TQString& sAction ); @@ -192,7 +192,7 @@ class TDECORE_EXPORT KAccelBase bool updateConnections(); - bool setShortcut( const TQString& sAction, const KShortcut& cut ); + bool setShortcut( const TQString& sAction, const TDEShortcut& cut ); // Modify individual Action sub-items bool setActionEnabled( const TQString& sAction, bool bEnable ); @@ -218,7 +218,7 @@ class TDECORE_EXPORT KAccelBase // Protected methods protected: - void slotRemoveAction( KAccelAction* ); + void slotRemoveAction( TDEAccelAction* ); struct X; @@ -226,8 +226,8 @@ class TDECORE_EXPORT KAccelBase * @param rgKeys constructed list of keys */ void createKeyList( TQValueVector<struct X>& rgKeys ); - bool insertConnection( KAccelAction* ); - bool removeConnection( KAccelAction* ); + bool insertConnection( TDEAccelAction* ); + bool removeConnection( TDEAccelAction* ); /** Emits a signal. * @param signal signal to be emitted @@ -237,14 +237,14 @@ class TDECORE_EXPORT KAccelBase * @param action action to be executed when key is pressed * @param key key which causes the action to be executed */ - virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key ) = 0; + virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key ) = 0; /** Defines a key which activates the accelerator * @param key key which causes the action to be executed */ virtual bool connectKey( const KKeyServer::Key& key) = 0; /** Removes the key from accelerator so it no longer executes the action */ - virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0; + virtual bool disconnectKey( TDEAccelAction&, const KKeyServer::Key& ) = 0; /** Removes the key from accelerator */ virtual bool disconnectKey( const KKeyServer::Key& ) = 0; @@ -253,30 +253,30 @@ class TDECORE_EXPORT KAccelBase virtual bool isEnabledInternal() const; struct ActionInfo { - KAccelAction* pAction; + TDEAccelAction* pAction; uint iSeq, iVariation; //ActionInfo* pInfoNext; // nil if only one action uses this key. ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; } - ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation ) + ActionInfo( TDEAccelAction* _pAction, uint _iSeq, uint _iVariation ) { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; } }; typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap; - KAccelActions m_rgActions; + TDEAccelActions m_rgActions; KKeyToActionMap m_mapKeyToAction; - TQValueList<KAccelAction*> m_rgActionsNonUnique; + TQValueList<TDEAccelAction*> m_rgActionsNonUnique; bool m_bNativeKeys; // Use native key codes instead of Qt codes bool m_bEnabled; bool m_bConfigIsGlobal; TQString m_sConfigGroup; bool m_bAutoUpdate; - KAccelAction* mtemp_pActionRemoving; + TDEAccelAction* mtemp_pActionRemoving; private: - KAccelBase& operator =( const KAccelBase& ); + TDEAccelBase& operator =( const TDEAccelBase& ); - friend class KAccelActions; + friend class TDEAccelActions; }; #endif // _KACCELBASE_H diff --git a/tdecore/kaccelmanager.cpp b/tdecore/kaccelmanager.cpp index 6c2233c81..9ac4dbdae 100644 --- a/tdecore/kaccelmanager.cpp +++ b/tdecore/kaccelmanager.cpp @@ -63,7 +63,7 @@ /********************************************************************* - class KAcceleratorManagerPrivate - internal helper class + class TDEAcceleratorManagerPrivate - internal helper class This class does all the work to find accelerators for a hierarchy of widgets. @@ -71,7 +71,7 @@ *********************************************************************/ -class KAcceleratorManagerPrivate +class TDEAcceleratorManagerPrivate { public: @@ -79,7 +79,7 @@ public: static bool programmers_mode; static bool standardName(const TQString &str); - static bool checkChange(const KAccelString &as) { + static bool checkChange(const TDEAccelString &as) { TQString t2 = as.accelerated(); TQString t1 = as.originalText(); if (t1 != t2) @@ -125,7 +125,7 @@ private: void addChild(Item *item); TQWidget *m_widget; - KAccelString m_content; + TDEAccelString m_content; ItemList *m_children; int m_index; @@ -133,28 +133,28 @@ private: }; -bool KAcceleratorManagerPrivate::programmers_mode = false; -TQString KAcceleratorManagerPrivate::changed_string; -TQString KAcceleratorManagerPrivate::added_string; -TQString KAcceleratorManagerPrivate::removed_string; +bool TDEAcceleratorManagerPrivate::programmers_mode = false; +TQString TDEAcceleratorManagerPrivate::changed_string; +TQString TDEAcceleratorManagerPrivate::added_string; +TQString TDEAcceleratorManagerPrivate::removed_string; static TQStringList *kaccmp_sns = 0; static KStaticDeleter<TQStringList> kaccmp_sns_d; -TQMap<TQWidget*, int> KAcceleratorManagerPrivate::ignored_widgets; +TQMap<TQWidget*, int> TDEAcceleratorManagerPrivate::ignored_widgets; -bool KAcceleratorManagerPrivate::standardName(const TQString &str) +bool TDEAcceleratorManagerPrivate::standardName(const TQString &str) { if (!kaccmp_sns) kaccmp_sns_d.setObject(kaccmp_sns, new TQStringList(KStdAction::internal_stdNames())); return kaccmp_sns->contains(str); } -KAcceleratorManagerPrivate::Item::~Item() +TDEAcceleratorManagerPrivate::Item::~Item() { delete m_children; } -void KAcceleratorManagerPrivate::Item::addChild(Item *item) +void TDEAcceleratorManagerPrivate::Item::addChild(Item *item) { if (!m_children) { m_children = new ItemList; @@ -164,7 +164,7 @@ void KAcceleratorManagerPrivate::Item::addChild(Item *item) m_children->append(item); } -void KAcceleratorManagerPrivate::manage(TQWidget *widget) +void TDEAcceleratorManagerPrivate::manage(TQWidget *widget) { if (!widget) { @@ -175,7 +175,7 @@ void KAcceleratorManagerPrivate::manage(TQWidget *widget) if (dynamic_cast<TQPopupMenu*>(widget)) { // create a popup accel manager that can deal with dynamic menus - KPopupAccelManager::manage(static_cast<TQPopupMenu*>(widget)); + TDEPopupAccelManager::manage(static_cast<TQPopupMenu*>(widget)); return; } @@ -189,13 +189,13 @@ void KAcceleratorManagerPrivate::manage(TQWidget *widget) } -void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &used) +void TDEAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &used) { if (!item->m_children) return; // collect the contents - KAccelStringList contents; + TDEAccelStringList contents; for (Item *it = item->m_children->first(); it != 0; it = item->m_children->next()) { @@ -203,7 +203,7 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use } // find the right accelerators - KAccelManagerAlgorithm::findAccelerators(contents, used); + TDEAccelManagerAlgorithm::findAccelerators(contents, used); // write them back into the widgets int cnt = -1; @@ -261,7 +261,7 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use } -void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item) +void TDEAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item) { TQObjectList *childList = widget->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, false); for ( TQObject *it = childList->first(); it; it = childList->next() ) @@ -271,7 +271,7 @@ void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item) if ( !w->isVisibleTo( widget ) || ( w->isTopLevel() && dynamic_cast<TQPopupMenu*>(w) == NULL ) ) continue; - if ( KAcceleratorManagerPrivate::ignored_widgets.find( w ) != KAcceleratorManagerPrivate::ignored_widgets.end() ) + if ( TDEAcceleratorManagerPrivate::ignored_widgets.find( w ) != TDEAcceleratorManagerPrivate::ignored_widgets.end() ) continue; manageWidget(w, item); @@ -279,7 +279,7 @@ void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item) delete childList; } -void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) +void TDEAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) { // first treat the special cases @@ -301,7 +301,7 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) if (popupMenu) { // create a popup accel manager that can deal with dynamic menus - KPopupAccelManager::manage(popupMenu); + TDEPopupAccelManager::manage(popupMenu); return; } @@ -368,26 +368,26 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) i->m_widget = w; // put some more weight on the usual action elements - int weight = KAccelManagerAlgorithm::DEFAULT_WEIGHT; + int weight = TDEAccelManagerAlgorithm::DEFAULT_WEIGHT; if (dynamic_cast<TQPushButton*>(w) || dynamic_cast<TQCheckBox*>(w) || dynamic_cast<TQRadioButton*>(w) || dynamic_cast<TQLabel*>(w)) - weight = KAccelManagerAlgorithm::ACTION_ELEMENT_WEIGHT; + weight = TDEAccelManagerAlgorithm::ACTION_ELEMENT_WEIGHT; // don't put weight on group boxes, as usually the contents are more important if (dynamic_cast<TQGroupBox*>(w)) - weight = KAccelManagerAlgorithm::GROUP_BOX_WEIGHT; + weight = TDEAccelManagerAlgorithm::GROUP_BOX_WEIGHT; // put a lot of extra weight on the KDialogBaseButton's if (w->inherits("KDialogBaseButton")) - weight += KAccelManagerAlgorithm::DIALOG_BUTTON_EXTRA_WEIGHT; + weight += TDEAccelManagerAlgorithm::DIALOG_BUTTON_EXTRA_WEIGHT; - i->m_content = KAccelString(content, weight); + i->m_content = TDEAccelString(content, weight); item->addChild(i); } } traverseChildren(w, item); } -void KAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item) +void TDEAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item) { for (int i=0; i<bar->count(); i++) { @@ -399,11 +399,11 @@ void KAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item) item->addChild(it); it->m_widget = bar; it->m_index = i; - it->m_content = KAccelString(content); + it->m_content = TDEAccelString(content); } } -void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item) +void TDEAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item) { TQMenuItem *mitem; TQString s; @@ -424,9 +424,9 @@ void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item) Item *it = new Item; item->addChild(it); it->m_content = - KAccelString(s, + TDEAccelString(s, // menu titles are important, so raise the weight - KAccelManagerAlgorithm::MENU_TITLE_WEIGHT); + TDEAccelManagerAlgorithm::MENU_TITLE_WEIGHT); it->m_widget = mbar; it->m_index = i; @@ -434,49 +434,49 @@ void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item) // have a look at the popup as well, if present if (mitem->popup()) - KPopupAccelManager::manage(mitem->popup()); + TDEPopupAccelManager::manage(mitem->popup()); } } /********************************************************************* - class KAcceleratorManager - main entry point + class TDEAcceleratorManager - main entry point This class is just here to provide a clean public API... *********************************************************************/ -void KAcceleratorManager::manage(TQWidget *widget) +void TDEAcceleratorManager::manage(TQWidget *widget) { - KAcceleratorManager::manage(widget, false); + TDEAcceleratorManager::manage(widget, false); } -void KAcceleratorManager::manage(TQWidget *widget, bool programmers_mode) +void TDEAcceleratorManager::manage(TQWidget *widget, bool programmers_mode) { - kdDebug(131) << "KAcceleratorManager::manage\n"; - KAcceleratorManagerPrivate::changed_string = TQString::null; - KAcceleratorManagerPrivate::added_string = TQString::null; - KAcceleratorManagerPrivate::removed_string = TQString::null; - KAcceleratorManagerPrivate::programmers_mode = programmers_mode; - KAcceleratorManagerPrivate::manage(widget); + kdDebug(131) << "TDEAcceleratorManager::manage\n"; + TDEAcceleratorManagerPrivate::changed_string = TQString::null; + TDEAcceleratorManagerPrivate::added_string = TQString::null; + TDEAcceleratorManagerPrivate::removed_string = TQString::null; + TDEAcceleratorManagerPrivate::programmers_mode = programmers_mode; + TDEAcceleratorManagerPrivate::manage(widget); } -void KAcceleratorManager::last_manage(TQString &added, TQString &changed, TQString &removed) +void TDEAcceleratorManager::last_manage(TQString &added, TQString &changed, TQString &removed) { - added = KAcceleratorManagerPrivate::added_string; - changed = KAcceleratorManagerPrivate::changed_string; - removed = KAcceleratorManagerPrivate::removed_string; + added = TDEAcceleratorManagerPrivate::added_string; + changed = TDEAcceleratorManagerPrivate::changed_string; + removed = TDEAcceleratorManagerPrivate::removed_string; } /********************************************************************* - class KAccelString - a string with weighted characters + class TDEAccelString - a string with weighted characters *********************************************************************/ -KAccelString::KAccelString(const TQString &input, int initialWeight) +TDEAccelString::TDEAccelString(const TQString &input, int initialWeight) : m_pureText(input), m_weight() { m_orig_accel = m_pureText.find("(!)&"); @@ -495,7 +495,7 @@ KAccelString::KAccelString(const TQString &input, int initialWeight) m_orig_accel = m_accel = stripAccelerator(m_pureText); if (initialWeight == -1) - initialWeight = KAccelManagerAlgorithm::DEFAULT_WEIGHT; + initialWeight = TDEAccelManagerAlgorithm::DEFAULT_WEIGHT; calculateWeights(initialWeight); @@ -503,13 +503,13 @@ KAccelString::KAccelString(const TQString &input, int initialWeight) } -TQString KAccelString::accelerated() const +TQString TDEAccelString::accelerated() const { TQString result = m_origText; if (result.isEmpty()) return result; - if (KAcceleratorManagerPrivate::programmers_mode) + if (TDEAcceleratorManagerPrivate::programmers_mode) { if (m_accel != m_orig_accel) { int oa = m_orig_accel; @@ -532,7 +532,7 @@ TQString KAccelString::accelerated() const } -TQChar KAccelString::accelerator() const +TQChar TDEAccelString::accelerator() const { if ((m_accel < 0) || (m_accel > (int)m_pureText.length())) return TQChar(); @@ -541,7 +541,7 @@ TQChar KAccelString::accelerator() const } -void KAccelString::calculateWeights(int initialWeight) +void TDEAccelString::calculateWeights(int initialWeight) { m_weight.resize(m_pureText.length()); @@ -556,12 +556,12 @@ void KAccelString::calculateWeights(int initialWeight) // add special weight to first character if (pos == 0) - weight += KAccelManagerAlgorithm::FIRST_CHARACTER_EXTRA_WEIGHT; + weight += TDEAccelManagerAlgorithm::FIRST_CHARACTER_EXTRA_WEIGHT; // add weight to word beginnings if (start_character) { - weight += KAccelManagerAlgorithm::WORD_BEGINNING_EXTRA_WEIGHT; + weight += TDEAccelManagerAlgorithm::WORD_BEGINNING_EXTRA_WEIGHT; start_character = false; } @@ -571,10 +571,10 @@ void KAccelString::calculateWeights(int initialWeight) // try to preserve the wanted accelarators if ((int)pos == accel()) { - weight += KAccelManagerAlgorithm::WANTED_ACCEL_EXTRA_WEIGHT; - // kdDebug(131) << "wanted " << m_pureText << " " << KAcceleratorManagerPrivate::standardName(m_origText) << endl; - if (KAcceleratorManagerPrivate::standardName(m_origText)) { - weight += KAccelManagerAlgorithm::STANDARD_ACCEL; + weight += TDEAccelManagerAlgorithm::WANTED_ACCEL_EXTRA_WEIGHT; + // kdDebug(131) << "wanted " << m_pureText << " " << TDEAcceleratorManagerPrivate::standardName(m_origText) << endl; + if (TDEAcceleratorManagerPrivate::standardName(m_origText)) { + weight += TDEAccelManagerAlgorithm::STANDARD_ACCEL; } } @@ -592,7 +592,7 @@ void KAccelString::calculateWeights(int initialWeight) } -int KAccelString::stripAccelerator(TQString &text) +int TDEAccelString::stripAccelerator(TQString &text) { // Note: this code is derived from TQAccel::shortcutKey int p = 0; @@ -621,7 +621,7 @@ int KAccelString::stripAccelerator(TQString &text) } -int KAccelString::maxWeight(int &index, const TQString &used) +int TDEAccelString::maxWeight(int &index, const TQString &used) { int max = 0; index = -1; @@ -638,7 +638,7 @@ int KAccelString::maxWeight(int &index, const TQString &used) } -void KAccelString::dump() +void TDEAccelString::dump() { TQString s; for (uint i=0; i<m_weight.count(); ++i) @@ -680,13 +680,13 @@ void KAccelString::dump() *********************************************************************/ -void KAccelManagerAlgorithm::findAccelerators(KAccelStringList &result, TQString &used) +void TDEAccelManagerAlgorithm::findAccelerators(TDEAccelStringList &result, TQString &used) { kdDebug(131) << "findAccelerators\n"; - KAccelStringList accel_strings = result; + TDEAccelStringList accel_strings = result; // initally remove all accelerators - for (KAccelStringList::Iterator it = result.begin(); it != result.end(); ++it) { + for (TDEAccelStringList::Iterator it = result.begin(); it != result.end(); ++it) { (*it).setAccel(-1); } @@ -720,18 +720,18 @@ void KAccelManagerAlgorithm::findAccelerators(KAccelStringList &result, TQString } // make sure we don't visit this one again - accel_strings[index] = KAccelString(); + accel_strings[index] = TDEAccelString(); } } /********************************************************************* - class KPopupAccelManager - managing TQPopupMenu widgets dynamically + class TDEPopupAccelManager - managing TQPopupMenu widgets dynamically *********************************************************************/ -KPopupAccelManager::KPopupAccelManager(TQPopupMenu *popup) +TDEPopupAccelManager::TDEPopupAccelManager(TQPopupMenu *popup) : TQObject(popup), m_popup(popup), m_count(-1) { aboutToShow(); // do one check and then connect to show @@ -739,7 +739,7 @@ KPopupAccelManager::KPopupAccelManager(TQPopupMenu *popup) } -void KPopupAccelManager::aboutToShow() +void TDEPopupAccelManager::aboutToShow() { // Note: we try to be smart and avoid recalculating the accelerators // whenever possible. Unfortunately, there is no way to know if an @@ -754,7 +754,7 @@ void KPopupAccelManager::aboutToShow() } else { - KAccelStringList entries; + TDEAccelStringList entries; findMenuEntries(entries); if (entries != m_entries) { @@ -765,18 +765,18 @@ void KPopupAccelManager::aboutToShow() } -void KPopupAccelManager::calculateAccelerators() +void TDEPopupAccelManager::calculateAccelerators() { // find the new accelerators TQString used; - KAccelManagerAlgorithm::findAccelerators(m_entries, used); + TDEAccelManagerAlgorithm::findAccelerators(m_entries, used); // change the menu entries setMenuEntries(m_entries); } -void KPopupAccelManager::findMenuEntries(KAccelStringList &list) +void TDEPopupAccelManager::findMenuEntries(TDEAccelStringList &list) { TQMenuItem *mitem; TQString s; @@ -797,16 +797,16 @@ void KPopupAccelManager::findMenuEntries(KAccelStringList &list) if (s.contains('\t')) weight = 0; - list.append(KAccelString(s, weight)); + list.append(TDEAccelString(s, weight)); // have a look at the popup as well, if present if (mitem->popup()) - KPopupAccelManager::manage(mitem->popup()); + TDEPopupAccelManager::manage(mitem->popup()); } } -void KPopupAccelManager::setMenuEntries(const KAccelStringList &list) +void TDEPopupAccelManager::setMenuEntries(const TDEAccelStringList &list) { TQMenuItem *mitem; @@ -817,18 +817,18 @@ void KPopupAccelManager::setMenuEntries(const KAccelStringList &list) if (mitem->isSeparator()) continue; - if (KAcceleratorManagerPrivate::checkChange(list[cnt])) + if (TDEAcceleratorManagerPrivate::checkChange(list[cnt])) mitem->setText(list[cnt].accelerated()); cnt++; } } -void KPopupAccelManager::manage(TQPopupMenu *popup) +void TDEPopupAccelManager::manage(TQPopupMenu *popup) { // don't add more than one manager to a popup - if (popup->child(0, "KPopupAccelManager", false) == 0 ) - new KPopupAccelManager(popup); + if (popup->child(0, "TDEPopupAccelManager", false) == 0 ) + new TDEPopupAccelManager(popup); } void QWidgetStackAccelManager::manage( TQWidgetStack *stack ) @@ -847,7 +847,7 @@ QWidgetStackAccelManager::QWidgetStackAccelManager(TQWidgetStack *stack) bool QWidgetStackAccelManager::eventFilter ( TQObject * watched, TQEvent * e ) { if ( e->type() == TQEvent::Show && tqApp->activeWindow() ) { - KAcceleratorManager::manage( TQT_TQWIDGET(tqApp->activeWindow()) ); + TDEAcceleratorManager::manage( TQT_TQWIDGET(tqApp->activeWindow()) ); watched->removeEventFilter( this ); } return false; @@ -864,9 +864,9 @@ void QWidgetStackAccelManager::aboutToShow(TQWidget *child) child->installEventFilter( this ); } -void KAcceleratorManager::setNoAccel( TQWidget *widget ) +void TDEAcceleratorManager::setNoAccel( TQWidget *widget ) { - KAcceleratorManagerPrivate::ignored_widgets[widget] = 1; + TDEAcceleratorManagerPrivate::ignored_widgets[widget] = 1; } #include "kaccelmanager_private.moc" diff --git a/tdecore/kaccelmanager.h b/tdecore/kaccelmanager.h index 29304803b..03ee627b3 100644 --- a/tdecore/kaccelmanager.h +++ b/tdecore/kaccelmanager.h @@ -37,7 +37,7 @@ class TQString; * @since 3.1 */ -class TDECORE_EXPORT KAcceleratorManager +class TDECORE_EXPORT TDEAcceleratorManager { public: @@ -69,7 +69,7 @@ public: * * TODO KDE4: merge with the above * @param widget The toplevel widget you want to manage. - * @param programmers_mode if true, KAcceleratorManager adds (&) for removed + * @param programmers_mode if true, TDEAcceleratorManager adds (&) for removed * accels and & before added accels */ static void manage(TQWidget *widget, bool programmers_mode); diff --git a/tdecore/kaccelmanager_private.h b/tdecore/kaccelmanager_private.h index e931b7e3e..ed401801e 100644 --- a/tdecore/kaccelmanager_private.h +++ b/tdecore/kaccelmanager_private.h @@ -39,12 +39,12 @@ class TQWidgetStack; * @author Matthias Hoelzer-Kluepfel <mhk@kde.org> */ -class KAccelString +class TDEAccelString { public: - KAccelString() : m_pureText(), m_accel(-1) {} - KAccelString(const TQString &input, int initalWeight=-1); + TDEAccelString() : m_pureText(), m_accel(-1) {} + TDEAccelString(const TQString &input, int initalWeight=-1); void calculateWeights(int initialWeight); @@ -61,7 +61,7 @@ public: int maxWeight(int &index, const TQString &used); - bool operator == (const KAccelString &c) const { return m_pureText == c.m_pureText && m_accel == c.m_accel && m_orig_accel == c.m_orig_accel; } + bool operator == (const TDEAccelString &c) const { return m_pureText == c.m_pureText && m_accel == c.m_accel && m_orig_accel == c.m_orig_accel; } private: @@ -77,7 +77,7 @@ private: }; -typedef TQValueList<KAccelString> KAccelStringList; +typedef TQValueList<TDEAccelString> TDEAccelStringList; /** @@ -87,7 +87,7 @@ typedef TQValueList<KAccelString> KAccelStringList; * @author Matthias Hoelzer-Kluepfel <mhk@kde.org> */ -class KAccelManagerAlgorithm +class TDEAccelManagerAlgorithm { public: @@ -114,7 +114,7 @@ public: }; /// Method to call to find the best distribution of accelerators. - static void findAccelerators(KAccelStringList &result, TQString &used); + static void findAccelerators(TDEAccelStringList &result, TQString &used); }; @@ -131,7 +131,7 @@ class TQPopupMenu; * @author Matthias Hoelzer-Kluepfel <mhk@kde.org> */ -class KPopupAccelManager : public TQObject +class TDEPopupAccelManager : public TQObject { Q_OBJECT @@ -142,7 +142,7 @@ public: protected: - KPopupAccelManager(TQPopupMenu *popup); + TDEPopupAccelManager(TQPopupMenu *popup); private slots: @@ -154,11 +154,11 @@ private: void calculateAccelerators(); - void findMenuEntries(KAccelStringList &list); - void setMenuEntries(const KAccelStringList &list); + void findMenuEntries(TDEAccelStringList &list); + void setMenuEntries(const TDEAccelStringList &list); TQPopupMenu *m_popup; - KAccelStringList m_entries; + TDEAccelStringList m_entries; int m_count; }; @@ -188,7 +188,7 @@ private: void calculateAccelerators(); TQWidgetStack *m_stack; - KAccelStringList m_entries; + TDEAccelStringList m_entries; }; diff --git a/tdecore/kaccelprivate.h b/tdecore/kaccelprivate.h index 8d009b950..0d967998d 100644 --- a/tdecore/kaccelprivate.h +++ b/tdecore/kaccelprivate.h @@ -4,22 +4,22 @@ #include "kkeyserver_x11.h" #include <tqtimer.h> -class KAccelAction; +class TDEAccelAction; /** * @internal */ -class TDECORE_EXPORT KAccelPrivate : public TQObject, public KAccelBase +class TDECORE_EXPORT TDEAccelPrivate : public TQObject, public TDEAccelBase { Q_OBJECT public: - KAccel* m_pAccel; + TDEAccel* m_pAccel; TQWidget* m_pWatch; TQMap<int, int> m_mapIDToKey; - TQMap<int, KAccelAction*> m_mapIDToAction; + TQMap<int, TDEAccelAction*> m_mapIDToAction; TQTimer m_timerShowMenu; - KAccelPrivate( KAccel* pParent, TQWidget* pWatch ); + TDEAccelPrivate( TDEAccel* pParent, TQWidget* pWatch ); virtual void setEnabled( bool bEnabled ); @@ -27,19 +27,19 @@ class TDECORE_EXPORT KAccelPrivate : public TQObject, public KAccelBase virtual bool removeAction( const TQString& sAction ); - virtual bool emitSignal( KAccelBase::Signal signal ); - virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key ); + virtual bool emitSignal( TDEAccelBase::Signal signal ); + virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key ); virtual bool connectKey( const KKeyServer::Key& key ); - virtual bool disconnectKey( KAccelAction& action, const KKeyServer::Key& key ); + virtual bool disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key ); virtual bool disconnectKey( const KKeyServer::Key& key ); signals: void menuItemActivated(); - void menuItemActivated(KAccelAction*); + void menuItemActivated(TDEAccelAction*); private: #ifndef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */ - void emitActivatedSignal(KAccelAction*); + void emitActivatedSignal(TDEAccelAction*); #endif private slots: diff --git a/tdecore/kapplication.cpp b/tdecore/kapplication.cpp index b55f0743b..705713a7e 100644 --- a/tdecore/kapplication.cpp +++ b/tdecore/kapplication.cpp @@ -272,7 +272,7 @@ public: bool guiEnabled : 1; /** * This counter indicates when to exit the application. - * It starts at 1, is decremented in KMainWindow when the last window is closed, but + * It starts at 1, is decremented in TDEMainWindow when the last window is closed, but * is incremented by operations that should outlive the last window closed * (e.g. a file copy for a file manager, or 'compacting folders on exit' for a mail client). */ @@ -468,7 +468,7 @@ void TDEApplication::removeX11EventFilter( const TQWidget* filter ) // FIXME: remove this when we've get a better method of // customizing accelerator handling -- hopefully in Qt. // For now, this is set whenever an accelerator is overridden -// in KAccelEventHandler so that the AccelOverride isn't sent twice. -- ellis, 19/10/02 +// in TDEAccelEventHandler so that the AccelOverride isn't sent twice. -- ellis, 19/10/02 extern bool kde_g_bKillAccelOverride; bool TDEApplication::notify(TQObject *receiver, TQEvent *event) @@ -489,7 +489,7 @@ bool TDEApplication::notify(TQObject *receiver, TQEvent *event) if ((t == TQEvent::AccelOverride) || (t == TQEvent::KeyPress)) { - static const KShortcut& _selectAll = KStdAccel::selectAll(); + static const TDEShortcut& _selectAll = TDEStdAccel::selectAll(); TQLineEdit *edit = ::tqqt_cast<TQLineEdit *>(receiver); if (edit) { @@ -1297,7 +1297,7 @@ void TDEApplication::commitData( TQSessionManager& sm ) bool canceled = false; TQWidget* w = list->first(); while ( !canceled && w ) { - if ( !w->testWState( WState_ForceHide ) && !w->inherits("KMainWindow") ) { + if ( !w->testWState( WState_ForceHide ) && !w->inherits("TDEMainWindow") ) { TQCloseEvent e; sendEvent( w, &e ); canceled = !e.isAccepted(); @@ -2458,7 +2458,7 @@ void TDEApplication::kdisplaySetFont() TQApplication::setFont(TDEGlobalSettings::generalFont(), true); TQApplication::setFont(TDEGlobalSettings::menuFont(), true, TQMENUBAR_OBJECT_NAME_STRING); TQApplication::setFont(TDEGlobalSettings::menuFont(), true, TQPOPUPMENU_OBJECT_NAME_STRING); - TQApplication::setFont(TDEGlobalSettings::menuFont(), true, "KPopupTitle"); + TQApplication::setFont(TDEGlobalSettings::menuFont(), true, "TDEPopupTitle"); // "patch" standard TQStyleSheet to follow our fonts TQStyleSheet* sheet = TQStyleSheet::defaultSheet(); @@ -2544,11 +2544,11 @@ void TDEApplication::installKDEPropertyMap() kdeMap->insert( "KDateWidget", "date" ); kdeMap->insert( "KDateTimeWidget", "dateTime" ); kdeMap->insert( "KEditListBox", "items" ); - kdeMap->insert( "KFontCombo", "family" ); - kdeMap->insert( "KFontRequester", "font" ); - kdeMap->insert( "KFontChooser", "font" ); + kdeMap->insert( "TDEFontCombo", "family" ); + kdeMap->insert( "TDEFontRequester", "font" ); + kdeMap->insert( "TDEFontChooser", "font" ); kdeMap->insert( "KHistoryCombo", "currentItem" ); - kdeMap->insert( "KListBox", "currentItem" ); + kdeMap->insert( "TDEListBox", "currentItem" ); kdeMap->insert( "KLineEdit", "text" ); kdeMap->insert( "KRestrictedLine", "text" ); kdeMap->insert( "KSqueezedTextLabel", "text" ); @@ -3033,7 +3033,7 @@ startServiceInternal( const TQCString &function, function, params, replyType, replyData)) { if (error) - *error = i18n("KLauncher could not be reached via DCOP.\n"); + *error = i18n("TDELauncher could not be reached via DCOP.\n"); if (!kapp) delete dcopClient; return -1; @@ -3255,7 +3255,7 @@ void TDEApplication::setTopWidget( TQWidget *topWidget ) return; // set the specified caption - if ( !topWidget->inherits("KMainWindow") ) { // KMainWindow does this already for us + if ( !topWidget->inherits("TDEMainWindow") ) { // TDEMainWindow does this already for us topWidget->setCaption( caption() ); } @@ -3356,7 +3356,7 @@ bool TDEApplication::authorize(const TQString &genericAction) return config->readBoolEntry(genericAction, true); } -bool TDEApplication::authorizeKAction(const char *action) +bool TDEApplication::authorizeTDEAction(const char *action) { if (!d->actionRestrictions || !action) return true; diff --git a/tdecore/kapplication.h b/tdecore/kapplication.h index eae310c4e..f59c307eb 100644 --- a/tdecore/kapplication.h +++ b/tdecore/kapplication.h @@ -432,10 +432,10 @@ public: /** * Returns true if the application is currently saving its session * data (most probably before KDE logout). This is intended for use - * mainly in KMainWindow::queryClose() and KMainWindow::queryExit(). + * mainly in TDEMainWindow::queryClose() and TDEMainWindow::queryExit(). * - * @see KMainWindow::queryClose - * @see KMainWindow::queryExit + * @see TDEMainWindow::queryClose + * @see TDEMainWindow::queryExit * @since 3.1.1 */ bool sessionSaving() const; @@ -482,7 +482,7 @@ public: * Sets the top widget of the application. * This means basically applying the right window caption and * icon. An application may have several top widgets. You don't - * need to call this function manually when using KMainWindow. + * need to call this function manually when using TDEMainWindow. * * @param topWidget A top widget of the application. * @@ -627,21 +627,21 @@ public slots: * If the widget with focus provides a clear() slot, call that slot. Thus for a * simple application clear() can be implemented as: * \code - * new KAction( i18n( "Clear" ), "editclear", 0, kapp, TQT_SLOT( clear() ), actionCollection(), "clear" ); + * new TDEAction( i18n( "Clear" ), "editclear", 0, kapp, TQT_SLOT( clear() ), actionCollection(), "clear" ); * \endcode * * Note that for some widgets, this may not provide the intended bahavior. For - * example if you make use of the code above and a KListView has the focus, clear() + * example if you make use of the code above and a TDEListView has the focus, clear() * will clear all of the items in the list. If this is not the intened behavior - * and you want to make use of this slot, you can subclass KListView and reimplement - * this slot. For example the following code would implement a KListView without this + * and you want to make use of this slot, you can subclass TDEListView and reimplement + * this slot. For example the following code would implement a TDEListView without this * behavior: * * \code - * class MyListView : public KListView { + * class MyListView : public TDEListView { * Q_OBJECT * public: - * MyListView( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) : KListView( parent, name, f ) {} + * MyListView( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) : TDEListView( parent, name, f ) {} * virtual ~MyListView() {} * public slots: * virtual void clear() {} @@ -1121,13 +1121,13 @@ public: bool authorize(const TQString &genericAction); /** - * Returns whether a certain KAction is authorized. + * Returns whether a certain TDEAction is authorized. * - * @param action The name of a KAction action. The name is prepended + * @param action The name of a TDEAction action. The name is prepended * with "action/" before being passed to authorize() - * @return true if the KAction is authorized + * @return true if the TDEAction is authorized */ - bool authorizeKAction(const char *action); + bool authorizeTDEAction(const char *action); /** * Returns whether a certain URL related action is authorized. @@ -1272,7 +1272,7 @@ protected: * \endcode * * Now in your application calls to MyApplication::deselect() will call this slot on the - * focused widget if it provides this slot. You can combine this with KAction with: + * focused widget if it provides this slot. You can combine this with TDEAction with: * * \code * KStdAction::deselect( static_cast<MyApplication *>( kapp ), TQT_SLOT( cut() ), actionCollection() ); @@ -1438,7 +1438,7 @@ signals: void appearanceChanged(); /** - * Emitted when the settings for toolbars have been changed. KToolBar will know what to do. + * Emitted when the settings for toolbars have been changed. TDEToolBar will know what to do. */ void toolbarAppearanceChanged(int); @@ -1478,12 +1478,12 @@ signals: Session management asks you to save the state of your application. This signal is provided for compatibility only. For new - applications, simply use KMainWindow. By reimplementing - KMainWindow::queryClose(), KMainWindow::saveProperties() and - KMainWindow::readProperties() you can simply handle session + applications, simply use TDEMainWindow. By reimplementing + TDEMainWindow::queryClose(), TDEMainWindow::saveProperties() and + TDEMainWindow::readProperties() you can simply handle session management for applications with multiple toplevel windows. - For purposes without KMainWindow, create an instance of + For purposes without TDEMainWindow, create an instance of KSessionManaged and reimplement the functions KSessionManaged::commitData() and/or KSessionManaged::saveState() @@ -1572,12 +1572,12 @@ class KSessionManagedPrivate; KSessionManaged makes it possible to provide implementations for TQApplication::commitData() and TQApplication::saveState(), without - subclassing TDEApplication. KMainWindow internally makes use of this. + subclassing TDEApplication. TDEMainWindow internally makes use of this. You don't need to do anything with this class when using - KMainWindow. Instead, use KMainWindow::saveProperties(), - KMainWindow::readProperties(), KMainWindow::queryClose(), - KMainWindow::queryExit() and friends. + TDEMainWindow. Instead, use TDEMainWindow::saveProperties(), + TDEMainWindow::readProperties(), TDEMainWindow::queryClose(), + TDEMainWindow::queryExit() and friends. @short Highlevel access to session management. @author Matthias Ettrich <ettrich@kde.org> diff --git a/tdecore/kcheckaccelerators.cpp b/tdecore/kcheckaccelerators.cpp index 1051cd362..ec11f50a8 100644 --- a/tdecore/kcheckaccelerators.cpp +++ b/tdecore/kcheckaccelerators.cpp @@ -83,7 +83,7 @@ KCheckAccelerators::KCheckAccelerators( TQObject* parent ) TDEConfigGroupSaver saver( TDEGlobal::config(), "Development" ); TQString sKey = TDEGlobal::config()->readEntry( "CheckAccelerators" ).stripWhiteSpace(); if( !sKey.isEmpty() ) { - KShortcut cuts( sKey ); + TDEShortcut cuts( sKey ); if( cuts.count() > 0 ) key = int(cuts.seq(0).qt()); } @@ -177,9 +177,9 @@ void KCheckAccelerators::checkAccelerators( bool automatic ) if ( !actWin ) return; - KAcceleratorManager::manage(actWin); + TDEAcceleratorManager::manage(actWin); TQString a, c, r; - KAcceleratorManager::last_manage(a, c, r); + TDEAcceleratorManager::last_manage(a, c, r); if (automatic) // for now we only show dialogs on F12 checks return; diff --git a/tdecore/kcompletion.h b/tdecore/kcompletion.h index 45182bd9d..020512b43 100644 --- a/tdecore/kcompletion.h +++ b/tdecore/kcompletion.h @@ -666,7 +666,7 @@ public: /** * Constants that represent the items whose short-cut * key-binding is programmable. The default key-bindings - * for these items are defined in KStdAccel. + * for these items are defined in TDEStdAccel. */ enum KeyBindingType { /** @@ -689,7 +689,7 @@ public: // Map for the key binding types mentioned above. - typedef TQMap<KeyBindingType, KShortcut> KeyBindingMap; + typedef TQMap<KeyBindingType, TDEShortcut> KeyBindingMap; /** * Default constructor. @@ -885,7 +885,7 @@ public: * @return true if key-binding can successfully be set. * @see getKeyBinding */ - bool setKeyBinding( KeyBindingType item , const KShortcut& key ); + bool setKeyBinding( KeyBindingType item , const TDEShortcut& key ); /** * Returns the key-binding used for the specified item. @@ -899,7 +899,7 @@ public: * @return the key-binding used for the feature given by @p item. * @see setKeyBinding */ - const KShortcut& getKeyBinding( KeyBindingType item ) const { + const TDEShortcut& getKeyBinding( KeyBindingType item ) const { return m_delegate ? m_delegate->getKeyBinding( item ) : m_keyMap[ item ]; } diff --git a/tdecore/kcompletionbase.cpp b/tdecore/kcompletionbase.cpp index 7589d842c..676448428 100644 --- a/tdecore/kcompletionbase.cpp +++ b/tdecore/kcompletionbase.cpp @@ -112,7 +112,7 @@ void KCompletionBase::setCompletionMode( TDEGlobalSettings::Completion mode ) m_pCompObj->setCompletionMode( m_iCompletionMode ); } -bool KCompletionBase::setKeyBinding( KeyBindingType item, const KShortcut& cut ) +bool KCompletionBase::setKeyBinding( KeyBindingType item, const TDEShortcut& cut ) { if ( m_delegate ) return m_delegate->setKeyBinding( item, cut ); diff --git a/tdecore/kdebug.areas b/tdecore/kdebug.areas index 9998163e2..831b06fdf 100644 --- a/tdecore/kdebug.areas +++ b/tdecore/kdebug.areas @@ -5,13 +5,13 @@ # #Format : number<tab>description -125 tdecore (KAccel) +125 tdecore (TDEAccel) 126 tdecore (KURL) 127 kio (KProtocolInfo) 128 tdecore (KRegExp) -129 tdecore (KAction) +129 tdecore (TDEAction) 130 kio (KPasswdServer) -131 tdecore (KAcceleratorManager) +131 tdecore (TDEAcceleratorManager) 150 tdecore (KLibLoader) 160 tdecore (KNotifyClient) 170 tdecore (KNetwork socket) @@ -25,8 +25,8 @@ 178 tdecore (TDEConfigDialogManager) 179 tdecore (KNetwork resolver) 180 tdecore (tdelibs) -200 tdeui (KMainWindow) -220 tdeui (KToolBar) +200 tdeui (TDEMainWindow) +220 tdeui (TDEToolBar) 230 tdeui (KCommand) 240 tdeui (tdelibs) 250 tdefile (tdelibs) @@ -42,7 +42,7 @@ 293 tdeui (KLineEdit) 294 tdeui (KEdit) 295 tdeui (KMenuBar) -296 tdeui (KPopupMenu) +296 tdeui (TDEPopupMenu) 298 tdeui (KDatePicker) 399 kimgio 400 artskde @@ -236,7 +236,7 @@ 7013 kio (KPing) 7014 kio (TDETrader) 7015 kio (KAutoMount) -7016 kio (KLauncher) +7016 kio (TDELauncher) 7017 kio (KIOConnection) 7018 kio (KMimeMagic) 7019 kio (tdeioslave) diff --git a/tdecore/kdebugrc b/tdecore/kdebugrc index c697da031..0335f4e5b 100644 --- a/tdecore/kdebugrc +++ b/tdecore/kdebugrc @@ -32,7 +32,7 @@ # AbortFatal=1 # -# KAccel debug info off +# TDEAccel debug info off [125] InfoOutput=4 @@ -40,7 +40,7 @@ InfoOutput=4 [131] InfoOutput=4 -# KAction debug info off +# TDEAction debug info off [129] InfoOutput=4 @@ -52,7 +52,7 @@ InfoOutput=4 [173] InfoOutput=4 -# KMainWindow debug info off +# TDEMainWindow debug info off [200] InfoOutput=4 diff --git a/tdecore/kglobalaccel.cpp b/tdecore/kglobalaccel.cpp index 3d759466f..eb1b56323 100644 --- a/tdecore/kglobalaccel.cpp +++ b/tdecore/kglobalaccel.cpp @@ -53,14 +53,14 @@ TDEGlobalAccel::~TDEGlobalAccel() void TDEGlobalAccel::clear() { d->clearActions(); } */ -KAccelActions& TDEGlobalAccel::actions() - { return d->KAccelBase::actions(); } +TDEAccelActions& TDEGlobalAccel::actions() + { return d->TDEAccelBase::actions(); } -const KAccelActions& TDEGlobalAccel::actions() const - { return d->KAccelBase::actions(); } +const TDEAccelActions& TDEGlobalAccel::actions() const + { return d->TDEAccelBase::actions(); } bool TDEGlobalAccel::isEnabled() - { return ((KAccelBase*)d)->isEnabled(); } + { return ((TDEAccelBase*)d)->isEnabled(); } void TDEGlobalAccel::setEnabled( bool bEnabled ) { d->setEnabled( bEnabled ); } @@ -74,8 +74,8 @@ void TDEGlobalAccel::blockShortcuts( bool block ) void TDEGlobalAccel::disableBlocking( bool disable ) { d->disableBlocking( disable ); } -KAccelAction* TDEGlobalAccel::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp, - const KShortcut& cutDef3, const KShortcut& cutDef4, +TDEAccelAction* TDEGlobalAccel::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable, bool bEnabled ) { @@ -85,7 +85,7 @@ KAccelAction* TDEGlobalAccel::insert( const TQString& sAction, const TQString& s bConfigurable, bEnabled ); } -KAccelAction* TDEGlobalAccel::insert( const TQString& sName, const TQString& sDesc ) +TDEAccelAction* TDEGlobalAccel::insert( const TQString& sName, const TQString& sDesc ) { return d->insert( sName, sDesc ); } bool TDEGlobalAccel::updateConnections() { return d->updateConnections(); } @@ -93,19 +93,19 @@ bool TDEGlobalAccel::updateConnections() bool TDEGlobalAccel::remove( const TQString& sAction ) { return d->remove( sAction ); } -const KShortcut& TDEGlobalAccel::shortcut( const TQString& sAction ) const +const TDEShortcut& TDEGlobalAccel::shortcut( const TQString& sAction ) const { - const KAccelAction* pAction = d->KAccelBase::actions().actionPtr( sAction ); - return (pAction) ? pAction->shortcut() : KShortcut::null(); + const TDEAccelAction* pAction = d->TDEAccelBase::actions().actionPtr( sAction ); + return (pAction) ? pAction->shortcut() : TDEShortcut::null(); } -bool TDEGlobalAccel::setShortcut( const TQString& sAction, const KShortcut& cut ) +bool TDEGlobalAccel::setShortcut( const TQString& sAction, const TDEShortcut& cut ) { return d->setShortcut( sAction, cut ); } bool TDEGlobalAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot ) { return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); } TQString TDEGlobalAccel::label( const TQString& sAction ) const { - const KAccelAction* pAction = d->KAccelBase::actions().actionPtr( sAction ); + const TDEAccelAction* pAction = d->TDEAccelBase::actions().actionPtr( sAction ); return (pAction) ? pAction->label() : TQString(); } bool TDEGlobalAccel::setActionEnabled( const TQString& sAction, bool bEnable ) @@ -131,7 +131,7 @@ bool TDEGlobalAccel::writeSettings( TDEConfigBase* pConfig, bool bGlobal ) const } bool TDEGlobalAccel::useFourModifierKeys() - { return KAccelAction::useFourModifierKeys(); } + { return TDEAccelAction::useFourModifierKeys(); } void TDEGlobalAccel::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } diff --git a/tdecore/kglobalaccel.h b/tdecore/kglobalaccel.h index fdda08f5a..9606b8af1 100644 --- a/tdecore/kglobalaccel.h +++ b/tdecore/kglobalaccel.h @@ -25,19 +25,19 @@ class TQPopupMenu; class TQWidget; -class KAccelAction; -class KAccelActions; +class TDEAccelAction; +class TDEAccelActions; class TDEConfigBase; class TDEGlobalAccelPrivate; /** * TDEGlobalAccel allows you to have global accelerators that are independent of -* the focused window. Unlike KAccel it does not matter which window is +* the focused window. Unlike TDEAccel it does not matter which window is * currently active. * -* @see KAccel -* @see KAccelShortcutList +* @see TDEAccel +* @see TDEAccelShortcutList * @see KKeyChooser * @see KKeyDialog * @short Configurable global shortcut support @@ -90,8 +90,8 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject * @param bConfigurable Allow the user to change this shortcut if set to 'true'. * @param bEnabled The action will be activated by the shortcut if set to 'true'. */ - KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, - const KShortcut& cutDef3, const KShortcut& cutDef4, + TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis, + const TDEShortcut& cutDef3, const TDEShortcut& cutDef4, const TQObject* pObjSlot, const char* psMethodSlot, bool bConfigurable = true, bool bEnabled = true ); @@ -108,9 +108,9 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject * displayed when the user configures shortcuts. * @param sName of the of the action to insert * @param sLabel a user-readable (i18n!) name for the action - * @return the KAccelAction of the action + * @return the TDEAccelAction of the action */ - KAccelAction* insert( const TQString& sName, const TQString& sLabel ); + TDEAccelAction* insert( const TQString& sName, const TQString& sLabel ); /** * Updates the connections of the accelerations after changing them. @@ -123,14 +123,14 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject * @param sAction the name of the action * @return the shortcut. If the action does not exist a null shortcut will be returned. */ - const KShortcut& shortcut( const TQString& sAction ) const; + const TDEShortcut& shortcut( const TQString& sAction ) const; /** * Set the shortcut to be associated with the action named by @p sAction. * @param sAction the name of the action * @param shortcut the shortcut for the action * @return true if successful, false otherwise */ - bool setShortcut( const TQString& sAction, const KShortcut &shortcut ); + bool setShortcut( const TQString& sAction, const TDEShortcut &shortcut ); /** * Set the slot to be called when the shortcut of the action named * by @p sAction is pressed. @@ -203,7 +203,7 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject /** * @internal -- this a wrapper function to - * KAccelActions::useFourModifierKeys(). + * TDEAccelActions::useFourModifierKeys(). */ static bool useFourModifierKeys(); @@ -224,11 +224,11 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject private: - KAccelActions& actions(); - const KAccelActions& actions() const; + TDEAccelActions& actions(); + const TDEAccelActions& actions() const; friend class TDEGlobalAccelPrivate; - friend class KAccelShortcutList; + friend class TDEAccelShortcutList; protected: /** \internal */ virtual void virtual_hook( int id, void* data ); diff --git a/tdecore/kglobalaccel_emb.h b/tdecore/kglobalaccel_emb.h index 8a5352817..e4feb601e 100644 --- a/tdecore/kglobalaccel_emb.h +++ b/tdecore/kglobalaccel_emb.h @@ -11,8 +11,8 @@ public: virtual void setEnabled( bool bEnabled ); - virtual bool connectKey( KAccelAction&, KKeySequence ); - virtual bool disconnectKey( KAccelAction&, KKeySequence ); + virtual bool connectKey( TDEAccelAction&, KKeySequence ); + virtual bool disconnectKey( TDEAccelAction&, KKeySequence ); }; #endif // _KGLOBALACCEL_EMB_H diff --git a/tdecore/kglobalaccel_mac.h b/tdecore/kglobalaccel_mac.h index c82bdc17a..82fe332b4 100644 --- a/tdecore/kglobalaccel_mac.h +++ b/tdecore/kglobalaccel_mac.h @@ -6,11 +6,11 @@ #include "kshortcut.h" #include "kaccelbase.h" -class TDEGlobalAccelPrivate: public KAccelBase +class TDEGlobalAccelPrivate: public TDEAccelBase { public: TDEGlobalAccelPrivate() - : KAccelBase(KAccelBase::NATIVE_KEYS) + : TDEAccelBase(TDEAccelBase::NATIVE_KEYS) {} // reimplemented pure virtuals @@ -18,11 +18,11 @@ public: { Q_UNUSED(bEnabled); } bool emitSignal( Signal signal ) { Q_UNUSED(signal); return false; } - bool connectKey( KAccelAction& action, const KKeyServer::Key& key) + bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key) { Q_UNUSED(action); Q_UNUSED(key); return false; } bool connectKey( const KKeyServer::Key& key) { Q_UNUSED(key); return false; } - bool disconnectKey( KAccelAction&, const KKeyServer::Key& key) + bool disconnectKey( TDEAccelAction&, const KKeyServer::Key& key) { Q_UNUSED(key); return false; } bool disconnectKey( const KKeyServer::Key& ) { return false; } diff --git a/tdecore/kglobalaccel_win.cpp b/tdecore/kglobalaccel_win.cpp index 1ea3f0250..0393bdd8d 100644 --- a/tdecore/kglobalaccel_win.cpp +++ b/tdecore/kglobalaccel_win.cpp @@ -40,7 +40,7 @@ static TQValueList< TDEGlobalAccelPrivate* >* all_accels = 0; TDEGlobalAccelPrivate::TDEGlobalAccelPrivate() -: KAccelBase( KAccelBase::NATIVE_KEYS ) +: TDEAccelBase( TDEAccelBase::NATIVE_KEYS ) , m_blocked( false ) , m_blockingDisabled( false ) { @@ -91,7 +91,7 @@ void TDEGlobalAccelPrivate::disableBlocking( bool block ) bool TDEGlobalAccelPrivate::isEnabledInternal() const { - return KAccelBase::isEnabled() && !m_blocked; + return TDEAccelBase::isEnabled() && !m_blocked; } bool TDEGlobalAccelPrivate::emitSignal( Signal ) @@ -99,16 +99,16 @@ bool TDEGlobalAccelPrivate::emitSignal( Signal ) return false; } -bool TDEGlobalAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::connectKey( TDEAccelAction& action, const KKeyServer::Key& key ) { return grabKey( key, true, &action ); } bool TDEGlobalAccelPrivate::connectKey( const KKeyServer::Key& key ) { return grabKey( key, true, 0 ); } -bool TDEGlobalAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key ) { return grabKey( key, false, &action ); } bool TDEGlobalAccelPrivate::disconnectKey( const KKeyServer::Key& key ) { return grabKey( key, false, 0 ); } -bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAccelAction* pAction ) +bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, TDEAccelAction* pAction ) { /* if( !key.code() ) { @@ -268,7 +268,7 @@ bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) if( !m_rgCodeModToAction.contains( codemod ) ) { #ifndef NDEBUG for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { - KAccelAction* pAction = *it; + TDEAccelAction* pAction = *it; kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16) << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString::null) << endl; @@ -276,7 +276,7 @@ bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) #endif return false; } - KAccelAction* pAction = m_rgCodeModToAction[codemod]; + TDEAccelAction* pAction = m_rgCodeModToAction[codemod]; if( !pAction ) { static bool recursion_block = false; @@ -297,7 +297,7 @@ bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) return true; }*/ -void TDEGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& seq ) +void TDEGlobalAccelPrivate::activate( TDEAccelAction* pAction, const KKeySequence& seq ) { kdDebug(125) << "TDEGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl; @@ -335,7 +335,7 @@ void TDEGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& void TDEGlobalAccelPrivate::slotActivated( int iAction ) { - KAccelAction* pAction = actions().actionPtr( iAction ); + TDEAccelAction* pAction = actions().actionPtr( iAction ); if( pAction ) activate( pAction, KKeySequence() ); } diff --git a/tdecore/kglobalaccel_win.h b/tdecore/kglobalaccel_win.h index cde46c472..0a938cbfc 100644 --- a/tdecore/kglobalaccel_win.h +++ b/tdecore/kglobalaccel_win.h @@ -30,7 +30,7 @@ /** * @internal */ -class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase +class TDEGlobalAccelPrivate : public TQWidget, public TDEAccelBase { friend class TDEGlobalAccel; Q_OBJECT @@ -41,9 +41,9 @@ class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase virtual void setEnabled( bool bEnabled ); virtual bool emitSignal( Signal signal ); - virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key ); + virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key ); virtual bool connectKey( const KKeyServer::Key& key ); - virtual bool disconnectKey( KAccelAction& action, const KKeyServer::Key& key ); + virtual bool disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key ); virtual bool disconnectKey( const KKeyServer::Key& key ); protected: @@ -51,7 +51,7 @@ class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase /** * @param bGrab Set to true to grab key, false to ungrab key. */ - bool grabKey( const KKeyServer::Key&, bool bGrab, KAccelAction* ); + bool grabKey( const KKeyServer::Key&, bool bGrab, TDEAccelAction* ); /** * Filters X11 events ev for key bindings in the accelerator dictionary. @@ -63,7 +63,7 @@ class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase // virtual bool x11Event( XEvent* ); // void x11MappingNotify(); // bool x11KeyPress( const XEvent *pEvent ); - void activate( KAccelAction* pAction, const KKeySequence& seq ); + void activate( TDEAccelAction* pAction, const KKeySequence& seq ); virtual bool isEnabledInternal() const; static void blockShortcuts( bool block ); void disableBlocking( bool disable ); diff --git a/tdecore/kglobalaccel_x11.cpp b/tdecore/kglobalaccel_x11.cpp index 701c954f3..64af90572 100644 --- a/tdecore/kglobalaccel_x11.cpp +++ b/tdecore/kglobalaccel_x11.cpp @@ -80,7 +80,7 @@ static void calculateGrabMasks() static TQValueList< TDEGlobalAccelPrivate* >* all_accels = 0; TDEGlobalAccelPrivate::TDEGlobalAccelPrivate() -: KAccelBase( KAccelBase::NATIVE_KEYS ) +: TDEAccelBase( TDEAccelBase::NATIVE_KEYS ) , m_blocked( false ) , m_blockingDisabled( false ) , m_suspended( false ) @@ -133,7 +133,7 @@ void TDEGlobalAccelPrivate::disableBlocking( bool block ) bool TDEGlobalAccelPrivate::isEnabledInternal() const { - return KAccelBase::isEnabled() && !m_blocked; + return TDEAccelBase::isEnabled() && !m_blocked; } // see #117169 - the bug is hard to reproduce, probably somewhere in X, testcase would be probably @@ -148,16 +148,16 @@ bool TDEGlobalAccelPrivate::emitSignal( Signal ) return false; } -bool TDEGlobalAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::connectKey( TDEAccelAction& action, const KKeyServer::Key& key ) { return grabKey( key, true, &action ); } bool TDEGlobalAccelPrivate::connectKey( const KKeyServer::Key& key ) { return grabKey( key, true, 0 ); } -bool TDEGlobalAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key ) +bool TDEGlobalAccelPrivate::disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key ) { return grabKey( key, false, &action ); } bool TDEGlobalAccelPrivate::disconnectKey( const KKeyServer::Key& key ) { return grabKey( key, false, 0 ); } -bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAccelAction* pAction ) +bool TDEGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, TDEAccelAction* pAction ) { if( !key.code() ) { kdWarning(125) << "TDEGlobalAccelPrivate::grabKey( " << key.key().toStringInternal() << ", " << bGrab << ", \"" << (pAction ? pAction->name().latin1() : "(null)") << "\" ): Tried to grab key with null code." << endl; @@ -286,7 +286,7 @@ void TDEGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) { if( !m_rgCodeModToAction.contains( codemod ) ) { #ifndef NDEBUG for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { - KAccelAction* pAction = *it; + TDEAccelAction* pAction = *it; kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16) << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString()) << endl; @@ -295,7 +295,7 @@ void TDEGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) { return; } - KAccelAction* pAction = m_rgCodeModToAction[codemod]; + TDEAccelAction* pAction = m_rgCodeModToAction[codemod]; if( !pAction ) { static bool recursion_block = false; @@ -364,7 +364,7 @@ bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) if( !m_rgCodeModToAction.contains( codemod ) ) { #ifndef NDEBUG for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { - KAccelAction* pAction = *it; + TDEAccelAction* pAction = *it; kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16) << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString()) << endl; @@ -373,7 +373,7 @@ bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) return false; } - KAccelAction* pAction = m_rgCodeModToAction[codemod]; + TDEAccelAction* pAction = m_rgCodeModToAction[codemod]; if( !pAction ) { static bool recursion_block = false; @@ -394,7 +394,7 @@ bool TDEGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) return true; } -void TDEGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& seq ) +void TDEGlobalAccelPrivate::activate( TDEAccelAction* pAction, const KKeySequence& seq ) { kdDebug(125) << "TDEGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl; @@ -432,7 +432,7 @@ void TDEGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& void TDEGlobalAccelPrivate::slotActivated( int iAction ) { - KAccelAction* pAction = KAccelBase::actions().actionPtr( iAction ); + TDEAccelAction* pAction = TDEAccelBase::actions().actionPtr( iAction ); if( pAction ) activate( pAction, KKeySequence() ); } diff --git a/tdecore/kglobalaccel_x11.h b/tdecore/kglobalaccel_x11.h index e28df060d..df1f54425 100644 --- a/tdecore/kglobalaccel_x11.h +++ b/tdecore/kglobalaccel_x11.h @@ -30,7 +30,7 @@ /** * @internal */ -class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase +class TDEGlobalAccelPrivate : public TQWidget, public TDEAccelBase { friend class TDEGlobalAccel; Q_OBJECT @@ -41,9 +41,9 @@ class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase virtual void setEnabled( bool bEnabled ); virtual bool emitSignal( Signal signal ); - virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key ); + virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key ); virtual bool connectKey( const KKeyServer::Key& key ); - virtual bool disconnectKey( KAccelAction& action, const KKeyServer::Key& key ); + virtual bool disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key ); virtual bool disconnectKey( const KKeyServer::Key& key ); protected: @@ -73,14 +73,14 @@ class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase return false; } }; - typedef TQMap<CodeMod, KAccelAction*> CodeModMap; + typedef TQMap<CodeMod, TDEAccelAction*> CodeModMap; CodeModMap m_rgCodeModToAction; /** * @param bGrab Set to true to grab key, false to ungrab key. */ - bool grabKey( const KKeyServer::Key&, bool bGrab, KAccelAction* ); + bool grabKey( const KKeyServer::Key&, bool bGrab, TDEAccelAction* ); /** * Filters X11 events ev for key bindings in the accelerator dictionary. @@ -92,7 +92,7 @@ class TDEGlobalAccelPrivate : public TQWidget, public KAccelBase virtual bool x11Event( XEvent* ); void x11MappingNotify(); bool x11KeyPress( const XEvent *pEvent ); - void activate( KAccelAction* pAction, const KKeySequence& seq ); + void activate( TDEAccelAction* pAction, const KKeySequence& seq ); virtual bool isEnabledInternal() const; static void blockShortcuts( bool block ); void disableBlocking( bool disable ); diff --git a/tdecore/kglobalsettings.cpp b/tdecore/kglobalsettings.cpp index 58eeff416..f9774a886 100644 --- a/tdecore/kglobalsettings.cpp +++ b/tdecore/kglobalsettings.cpp @@ -186,7 +186,7 @@ bool TDEGlobalSettings::showContextMenusOnPress () int TDEGlobalSettings::contextMenuKey () { TDEConfigGroup g(TDEGlobal::config(), "Shortcuts"); - KShortcut cut (g.readEntry ("PopupMenuContext", "Menu")); + TDEShortcut cut (g.readEntry ("PopupMenuContext", "Menu")); return cut.keyCodeQt(); } diff --git a/tdecore/kglobalsettings.h b/tdecore/kglobalsettings.h index 7a9c42900..ee893f97e 100644 --- a/tdecore/kglobalsettings.h +++ b/tdecore/kglobalsettings.h @@ -111,7 +111,7 @@ class TDECORE_EXPORT TDEGlobalSettings /** * This enum describes the return type for insertTearOffHandle() whether to insert * a handle or not. Applications who independently want to use handles in their popup menus - * should test for Application level before calling the appropriate function in KPopupMenu. + * should test for Application level before calling the appropriate function in TDEPopupMenu. * @since 3.1 **/ enum TearOffHandle { @@ -121,8 +121,8 @@ class TDECORE_EXPORT TDEGlobalSettings }; /** - * Returns whether tear-off handles are inserted in KPopupMenus. - * @return whether tear-off handles are inserted in KPopupMenus. + * Returns whether tear-off handles are inserted in TDEPopupMenus. + * @return whether tear-off handles are inserted in TDEPopupMenus. * @since 3.1 **/ static TearOffHandle insertTearOffHandle(); @@ -346,8 +346,8 @@ class TDECORE_EXPORT TDEGlobalSettings static TQColor highlightColor(); /** - * Returns the alternate background color used by KListView with - * KListViewItem. Any other list that uses alternating background + * Returns the alternate background color used by TDEListView with + * TDEListViewItem. Any other list that uses alternating background * colors should use this too, to obey to the user's preferences. Returns * an invalid color if the user doesn't want alternating backgrounds. * @return the alternate background color @@ -365,7 +365,7 @@ class TDECORE_EXPORT TDEGlobalSettings static TQColor calculateAlternateBackgroundColor(const TQColor& base); /** - * Returns if the sorted column in a KListView shall be drawn with a + * Returns if the sorted column in a TDEListView shall be drawn with a * shaded background color. * @return true if the sorted column shall be shaded * @since 3.4 diff --git a/tdecore/kmanagerselection.cpp b/tdecore/kmanagerselection.cpp index 75dde5c9c..15e273d6d 100644 --- a/tdecore/kmanagerselection.cpp +++ b/tdecore/kmanagerselection.cpp @@ -51,57 +51,57 @@ DEALINGS IN THE SOFTWARE. #include <kxerrorhandler.h> #include <X11/Xatom.h> -class KSelectionOwnerPrivate +class TDESelectionOwnerPrivate : public QWidget { public: - KSelectionOwnerPrivate( KSelectionOwner* owner ); + TDESelectionOwnerPrivate( TDESelectionOwner* owner ); protected: virtual bool x11Event( XEvent* ev ); private: - KSelectionOwner* owner; + TDESelectionOwner* owner; }; -KSelectionOwnerPrivate::KSelectionOwnerPrivate( KSelectionOwner* owner_P ) +TDESelectionOwnerPrivate::TDESelectionOwnerPrivate( TDESelectionOwner* owner_P ) : owner( owner_P ) { kapp->installX11EventFilter( TQT_TQWIDGET(this) ); } -bool KSelectionOwnerPrivate::x11Event( XEvent* ev_P ) +bool TDESelectionOwnerPrivate::x11Event( XEvent* ev_P ) { return owner->filterEvent( ev_P ); } -KSelectionOwner::KSelectionOwner( Atom selection_P, int screen_P, TQObject* parent_P ) +TDESelectionOwner::TDESelectionOwner( Atom selection_P, int screen_P, TQObject* parent_P ) : TQObject( parent_P ), selection( selection_P ), screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())), window( None ), timestamp( CurrentTime ), extra1( 0 ), extra2( 0 ), - d( new KSelectionOwnerPrivate( this )) + d( new TDESelectionOwnerPrivate( this )) { } -KSelectionOwner::KSelectionOwner( const char* selection_P, int screen_P, TQObject* parent_P ) +TDESelectionOwner::TDESelectionOwner( const char* selection_P, int screen_P, TQObject* parent_P ) : TQObject( parent_P ), selection( XInternAtom( tqt_xdisplay(), selection_P, False )), screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())), window( None ), timestamp( CurrentTime ), extra1( 0 ), extra2( 0 ), - d( new KSelectionOwnerPrivate( this )) + d( new TDESelectionOwnerPrivate( this )) { } -KSelectionOwner::~KSelectionOwner() +TDESelectionOwner::~TDESelectionOwner() { release(); delete d; } -bool KSelectionOwner::claim( bool force_P, bool force_kill_P ) +bool TDESelectionOwner::claim( bool force_P, bool force_kill_P ) { if( manager_atom == None ) getAtoms(); @@ -179,7 +179,7 @@ bool KSelectionOwner::claim( bool force_P, bool force_kill_P ) } // destroy resource first -void KSelectionOwner::release() +void TDESelectionOwner::release() { if( timestamp == CurrentTime ) return; @@ -188,20 +188,20 @@ void KSelectionOwner::release() timestamp = CurrentTime; } -Window KSelectionOwner::ownerWindow() const +Window TDESelectionOwner::ownerWindow() const { if( timestamp == CurrentTime ) return None; return window; } -void KSelectionOwner::setData( long extra1_P, long extra2_P ) +void TDESelectionOwner::setData( long extra1_P, long extra2_P ) { extra1 = extra1_P; extra2 = extra2_P; } -bool KSelectionOwner::filterEvent( XEvent* ev_P ) +bool TDESelectionOwner::filterEvent( XEvent* ev_P ) { if( timestamp != CurrentTime && ev_P->xany.window == window ) { @@ -244,12 +244,12 @@ bool KSelectionOwner::filterEvent( XEvent* ev_P ) return false; } -bool KSelectionOwner::handleMessage( XEvent* ) +bool TDESelectionOwner::handleMessage( XEvent* ) { return false; } -void KSelectionOwner::filter_selection_request( XSelectionRequestEvent& ev_P ) +void TDESelectionOwner::filter_selection_request( XSelectionRequestEvent& ev_P ) { if( timestamp == CurrentTime || ev_P.selection != selection ) return; @@ -311,7 +311,7 @@ void KSelectionOwner::filter_selection_request( XSelectionRequestEvent& ev_P ) XSendEvent( tqt_xdisplay(), ev_P.requestor, False, 0, &ev ); } -bool KSelectionOwner::handle_selection( Atom target_P, Atom property_P, Window requestor_P ) +bool TDESelectionOwner::handle_selection( Atom target_P, Atom property_P, Window requestor_P ) { if( target_P == xa_timestamp ) { @@ -328,7 +328,7 @@ bool KSelectionOwner::handle_selection( Atom target_P, Atom property_P, Window r return true; } -void KSelectionOwner::replyTargets( Atom property_P, Window requestor_P ) +void TDESelectionOwner::replyTargets( Atom property_P, Window requestor_P ) { Atom atoms[ 3 ] = { xa_multiple, xa_timestamp, xa_targets }; // kdDebug() << "Handling targets request" << endl; @@ -336,12 +336,12 @@ void KSelectionOwner::replyTargets( Atom property_P, Window requestor_P ) reinterpret_cast< unsigned char* >( atoms ), 3 ); } -bool KSelectionOwner::genericReply( Atom, Atom, Window ) +bool TDESelectionOwner::genericReply( Atom, Atom, Window ) { return false; } -void KSelectionOwner::getAtoms() +void TDESelectionOwner::getAtoms() { if( manager_atom == None ) { @@ -356,66 +356,66 @@ void KSelectionOwner::getAtoms() } } -Atom KSelectionOwner::manager_atom = None; -Atom KSelectionOwner::xa_multiple = None; -Atom KSelectionOwner::xa_targets = None; -Atom KSelectionOwner::xa_timestamp = None; +Atom TDESelectionOwner::manager_atom = None; +Atom TDESelectionOwner::xa_multiple = None; +Atom TDESelectionOwner::xa_targets = None; +Atom TDESelectionOwner::xa_timestamp = None; //******************************************* -// KSelectionWatcher +// TDESelectionWatcher //******************************************* -class KSelectionWatcherPrivate +class TDESelectionWatcherPrivate : public QWidget { public: - KSelectionWatcherPrivate( KSelectionWatcher* watcher ); + TDESelectionWatcherPrivate( TDESelectionWatcher* watcher ); protected: virtual bool x11Event( XEvent* ev ); private: - KSelectionWatcher* watcher; + TDESelectionWatcher* watcher; }; -KSelectionWatcherPrivate::KSelectionWatcherPrivate( KSelectionWatcher* watcher_P ) +TDESelectionWatcherPrivate::TDESelectionWatcherPrivate( TDESelectionWatcher* watcher_P ) : watcher( watcher_P ) { kapp->installX11EventFilter( TQT_TQWIDGET(this) ); } -bool KSelectionWatcherPrivate::x11Event( XEvent* ev_P ) +bool TDESelectionWatcherPrivate::x11Event( XEvent* ev_P ) { watcher->filterEvent( ev_P ); return false; } -KSelectionWatcher::KSelectionWatcher( Atom selection_P, int screen_P, TQObject* parent_P ) +TDESelectionWatcher::TDESelectionWatcher( Atom selection_P, int screen_P, TQObject* parent_P ) : TQObject( parent_P ), selection( selection_P ), screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())), selection_owner( None ), - d( new KSelectionWatcherPrivate( this )) + d( new TDESelectionWatcherPrivate( this )) { init(); } -KSelectionWatcher::KSelectionWatcher( const char* selection_P, int screen_P, TQObject* parent_P ) +TDESelectionWatcher::TDESelectionWatcher( const char* selection_P, int screen_P, TQObject* parent_P ) : TQObject( parent_P ), selection( XInternAtom( tqt_xdisplay(), selection_P, False )), screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())), selection_owner( None ), - d( new KSelectionWatcherPrivate( this )) + d( new TDESelectionWatcherPrivate( this )) { init(); } -KSelectionWatcher::~KSelectionWatcher() +TDESelectionWatcher::~TDESelectionWatcher() { delete d; } -void KSelectionWatcher::init() +void TDESelectionWatcher::init() { if( manager_atom == None ) { @@ -429,7 +429,7 @@ void KSelectionWatcher::init() } } -Window KSelectionWatcher::owner() +Window TDESelectionWatcher::owner() { Display* const dpy = tqt_xdisplay(); KXErrorHandler handler; @@ -451,7 +451,7 @@ Window KSelectionWatcher::owner() } // void return value in order to allow more watchers in one process -void KSelectionWatcher::filterEvent( XEvent* ev_P ) +void TDESelectionWatcher::filterEvent( XEvent* ev_P ) { if( ev_P->type == ClientMessage ) { @@ -478,12 +478,12 @@ void KSelectionWatcher::filterEvent( XEvent* ev_P ) return; } -Atom KSelectionWatcher::manager_atom = None; +Atom TDESelectionWatcher::manager_atom = None; -void KSelectionOwner::virtual_hook( int, void* ) +void TDESelectionOwner::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KSelectionWatcher::virtual_hook( int, void* ) +void TDESelectionWatcher::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "kmanagerselection.moc" diff --git a/tdecore/kmanagerselection.h b/tdecore/kmanagerselection.h index 5b46488ab..de294187d 100644 --- a/tdecore/kmanagerselection.h +++ b/tdecore/kmanagerselection.h @@ -36,7 +36,7 @@ DEALINGS IN THE SOFTWARE. #include <X11/Xlib.h> -class KSelectionOwnerPrivate; +class TDESelectionOwnerPrivate; /** This class implements claiming and owning manager selections, as described @@ -47,7 +47,7 @@ class KSelectionOwnerPrivate; @since 3.2 @short ICCCM manager selection owner */ -class TDECORE_EXPORT KSelectionOwner +class TDECORE_EXPORT TDESelectionOwner : public TQObject { Q_OBJECT @@ -60,7 +60,7 @@ class TDECORE_EXPORT KSelectionOwner * @param screen X screen, or -1 for default * @param parent parent object, or NULL if there is none */ - KSelectionOwner( Atom selection, int screen = -1, TQObject* parent = NULL ); + TDESelectionOwner( Atom selection, int screen = -1, TQObject* parent = NULL ); /** * @overload * This constructor accepts the selection name and creates the appropriate atom @@ -70,11 +70,11 @@ class TDECORE_EXPORT KSelectionOwner * @param screen X screen, or -1 for default * @param parent parent object, or NULL if there is none */ - KSelectionOwner( const char* selection, int screen = -1, TQObject* parent = NULL ); + TDESelectionOwner( const char* selection, int screen = -1, TQObject* parent = NULL ); /** * Destructor. Calls release(). */ - virtual ~KSelectionOwner(); + virtual ~TDESelectionOwner(); /** * This function attemps to claim ownership of the manager selection, using * the current X timestamp. If @p force is false, and the selection is already @@ -157,10 +157,10 @@ class TDECORE_EXPORT KSelectionOwner protected: virtual void virtual_hook( int id, void* data ); private: - KSelectionOwnerPrivate* d; + TDESelectionOwnerPrivate* d; }; -class KSelectionWatcherPrivate; +class TDESelectionWatcherPrivate; /** This class implements watching manager selections, as described in the ICCCM @@ -170,7 +170,7 @@ class KSelectionWatcherPrivate; @since 3.2 @short ICCCM manager selection watching */ -class TDECORE_EXPORT KSelectionWatcher +class TDECORE_EXPORT TDESelectionWatcher : public TQObject { Q_OBJECT @@ -183,7 +183,7 @@ class TDECORE_EXPORT KSelectionWatcher * @param screen X screen, or -1 for default * @param parent parent object, or NULL if there is none */ - KSelectionWatcher( Atom selection, int screen = -1, TQObject* parent = NULL ); + TDESelectionWatcher( Atom selection, int screen = -1, TQObject* parent = NULL ); /** * @overload * This constructor accepts the selection name and creates the appropriate atom @@ -193,8 +193,8 @@ class TDECORE_EXPORT KSelectionWatcher * @param screen X screen, or -1 for default * @param parent parent object, or NULL if there is none */ - KSelectionWatcher( const char* selection, int screen = -1, TQObject* parent = NULL ); - virtual ~KSelectionWatcher(); + TDESelectionWatcher( const char* selection, int screen = -1, TQObject* parent = NULL ); + virtual ~TDESelectionWatcher(); /** * Return the current owner of the manager selection, if any. */ @@ -226,7 +226,7 @@ class TDECORE_EXPORT KSelectionWatcher protected: virtual void virtual_hook( int id, void* data ); private: - KSelectionWatcherPrivate* d; + TDESelectionWatcherPrivate* d; }; #endif diff --git a/tdecore/kshortcut.cpp b/tdecore/kshortcut.cpp index 10c6c31fa..ae568d5b7 100644 --- a/tdecore/kshortcut.cpp +++ b/tdecore/kshortcut.cpp @@ -33,7 +33,7 @@ static KKey* g_pspec = 0; static KKeySequence* g_pseq = 0; -static KShortcut* g_pcut = 0; +static TDEShortcut* g_pcut = 0; //---------------------------------------------------- // KKey @@ -396,28 +396,28 @@ KKeySequence& KKeySequence::null() } //--------------------------------------------------------------------- -// KShortcut +// TDEShortcut //--------------------------------------------------------------------- -KShortcut::KShortcut() { clear(); } -KShortcut::KShortcut( int keyQt ) { init( keyQt ); } -KShortcut::KShortcut( const TQKeySequence& key ) { init( key ); } -KShortcut::KShortcut( const KKey& key ) { init( key ); } -KShortcut::KShortcut( const KKeySequence& seq ) { init( seq ); } -KShortcut::KShortcut( const KShortcut& cut ) { init( cut ); } -KShortcut::KShortcut( const char* ps ) { init( TQString(ps) ); } -KShortcut::KShortcut( const TQString& s ) { init( s ); } +TDEShortcut::TDEShortcut() { clear(); } +TDEShortcut::TDEShortcut( int keyQt ) { init( keyQt ); } +TDEShortcut::TDEShortcut( const TQKeySequence& key ) { init( key ); } +TDEShortcut::TDEShortcut( const KKey& key ) { init( key ); } +TDEShortcut::TDEShortcut( const KKeySequence& seq ) { init( seq ); } +TDEShortcut::TDEShortcut( const TDEShortcut& cut ) { init( cut ); } +TDEShortcut::TDEShortcut( const char* ps ) { init( TQString(ps) ); } +TDEShortcut::TDEShortcut( const TQString& s ) { init( s ); } -KShortcut::~KShortcut() +TDEShortcut::~TDEShortcut() { } -void KShortcut::clear() +void TDEShortcut::clear() { m_nSeqs = 0; } -bool KShortcut::init( int keyQt ) +bool TDEShortcut::init( int keyQt ) { if( keyQt ) { m_nSeqs = 1; @@ -427,28 +427,28 @@ bool KShortcut::init( int keyQt ) return true; } -bool KShortcut::init( const TQKeySequence& key ) +bool TDEShortcut::init( const TQKeySequence& key ) { m_nSeqs = 1; m_rgseq[0].init( key ); return true; } -bool KShortcut::init( const KKey& spec ) +bool TDEShortcut::init( const KKey& spec ) { m_nSeqs = 1; m_rgseq[0].init( spec ); return true; } -bool KShortcut::init( const KKeySequence& seq ) +bool TDEShortcut::init( const KKeySequence& seq ) { m_nSeqs = 1; m_rgseq[0] = seq; return true; } -bool KShortcut::init( const KShortcut& cut ) +bool TDEShortcut::init( const TDEShortcut& cut ) { m_nSeqs = cut.m_nSeqs; for( uint i = 0; i < m_nSeqs; i++ ) @@ -456,7 +456,7 @@ bool KShortcut::init( const KShortcut& cut ) return true; } -bool KShortcut::init( const TQString& s ) +bool TDEShortcut::init( const TQString& s ) { bool bRet = true; TQStringList rgs = TQStringList::split( ';', s ); @@ -480,7 +480,7 @@ bool KShortcut::init( const TQString& s ) if( !s.isEmpty() ) { TQString sDebug; TQTextStream os( &sDebug, IO_WriteOnly ); - os << "KShortcut::init( \"" << s << "\" ): "; + os << "TDEShortcut::init( \"" << s << "\" ): "; for( uint i = 0; i < m_nSeqs; i++ ) { os << " m_rgseq[" << i << "]: "; KKeyServer::Variations vars; @@ -494,29 +494,29 @@ bool KShortcut::init( const TQString& s ) return bRet; } -uint KShortcut::count() const +uint TDEShortcut::count() const { return m_nSeqs; } -const KKeySequence& KShortcut::seq( uint i ) const +const KKeySequence& TDEShortcut::seq( uint i ) const { return (i < m_nSeqs) ? m_rgseq[i] : KKeySequence::null(); } -int KShortcut::keyCodeQt() const +int TDEShortcut::keyCodeQt() const { if( m_nSeqs >= 1 ) return m_rgseq[0].keyCodeQt(); return TQKeySequence(); } -bool KShortcut::isNull() const +bool TDEShortcut::isNull() const { return m_nSeqs == 0; } -int KShortcut::compare( const KShortcut& cut ) const +int TDEShortcut::compare( const TDEShortcut& cut ) const { for( uint i = 0; i < m_nSeqs && i < cut.m_nSeqs; i++ ) { int ret = m_rgseq[i].compare( cut.m_rgseq[i] ); @@ -526,12 +526,12 @@ int KShortcut::compare( const KShortcut& cut ) const return m_nSeqs - cut.m_nSeqs; } -bool KShortcut::contains( const KKey& key ) const +bool TDEShortcut::contains( const KKey& key ) const { return contains( KKeySequence(key) ); } -bool KShortcut::contains( const KKeyNative& keyNative ) const +bool TDEShortcut::contains( const KKeyNative& keyNative ) const { KKey key = keyNative.key(); key.simplify(); @@ -545,7 +545,7 @@ bool KShortcut::contains( const KKeyNative& keyNative ) const return false; } -bool KShortcut::contains( const KKeySequence& seq ) const +bool TDEShortcut::contains( const KKeySequence& seq ) const { for( uint i = 0; i < count(); i++ ) { if( !m_rgseq[i].isNull() && m_rgseq[i] == seq ) @@ -554,7 +554,7 @@ bool KShortcut::contains( const KKeySequence& seq ) const return false; } -bool KShortcut::setSeq( uint iSeq, const KKeySequence& seq ) +bool TDEShortcut::setSeq( uint iSeq, const KKeySequence& seq ) { // TODO: check if seq is null, and act accordingly. if( iSeq <= m_nSeqs && iSeq < MAX_SEQUENCES ) { @@ -566,7 +566,7 @@ bool KShortcut::setSeq( uint iSeq, const KKeySequence& seq ) return false; } -void KShortcut::remove( const KKeySequence& seq ) +void TDEShortcut::remove( const KKeySequence& seq ) { if (seq.isNull()) return; @@ -581,7 +581,7 @@ void KShortcut::remove( const KKeySequence& seq ) } } -bool KShortcut::append( const KKeySequence& seq ) +bool TDEShortcut::append( const KKeySequence& seq ) { if( m_nSeqs < MAX_SEQUENCES ) { if( !seq.isNull() ) { @@ -593,7 +593,7 @@ bool KShortcut::append( const KKeySequence& seq ) return false; } -bool KShortcut::append( const KKey& spec ) +bool TDEShortcut::append( const KKey& spec ) { if( m_nSeqs < MAX_SEQUENCES ) { m_rgseq[m_nSeqs].init( spec ); @@ -603,7 +603,7 @@ bool KShortcut::append( const KKey& spec ) return false; } -bool KShortcut::append( const KShortcut& cut ) +bool TDEShortcut::append( const TDEShortcut& cut ) { uint seqs = m_nSeqs, co = cut.count(); for( uint i=0; i<co; i++ ) { @@ -621,7 +621,7 @@ bool KShortcut::append( const KShortcut& cut ) return true; } -KShortcut::operator TQKeySequence () const +TDEShortcut::operator TQKeySequence () const { if( count() >= 1 ) return m_rgseq[0].qt(); @@ -629,7 +629,7 @@ KShortcut::operator TQKeySequence () const return TQKeySequence(); } -TQString KShortcut::toString() const +TQString TDEShortcut::toString() const { TQString s; @@ -642,7 +642,7 @@ TQString KShortcut::toString() const return s; } -TQString KShortcut::toStringInternal( const KShortcut* pcutDefault ) const +TQString TDEShortcut::toStringInternal( const TDEShortcut* pcutDefault ) const { TQString s; @@ -661,10 +661,10 @@ TQString KShortcut::toStringInternal( const KShortcut* pcutDefault ) const return s; } -KShortcut& KShortcut::null() +TDEShortcut& TDEShortcut::null() { if( !g_pcut ) - g_pcut = new KShortcut; + g_pcut = new TDEShortcut; if( !g_pcut->isNull() ) g_pcut->clear(); return *g_pcut; diff --git a/tdecore/kshortcut.h b/tdecore/kshortcut.h index 9baf31b0d..e98a007b5 100644 --- a/tdecore/kshortcut.h +++ b/tdecore/kshortcut.h @@ -34,7 +34,7 @@ class KKeyNative; * by the underlying system (e.g. X11). * @see KKeyNative * @see KKeySequence -* @see KShortcut +* @see TDEShortcut */ class TDECORE_EXPORT KKey @@ -282,7 +282,7 @@ class TDECORE_EXPORT KKey * A KKeySequence object holds a sequence of up to 4 keys. * Ex: Ctrl+X,I * @see KKey -* @see KShortcut +* @see TDEShortcut */ class TDECORE_EXPORT KKeySequence @@ -518,18 +518,18 @@ class TDECORE_EXPORT KKeySequence }; /** -* The KShortcut class is used to represent a keyboard shortcut to an action. +* The TDEShortcut class is used to represent a keyboard shortcut to an action. * A shortcut is normally a single key with modifiers, such as Ctrl+V. -* A KShortcut object may also contain an alternate key which will also +* A TDEShortcut object may also contain an alternate key which will also * activate the action it's associated to, as long as no other actions have * defined that key as their primary key. Ex: Ctrl+V;Shift+Insert. * -* This can be used to add additional accelerators to a KAction. For example, +* This can be used to add additional accelerators to a TDEAction. For example, * the below code binds the escape key to the close action. * * \code -* KAction *closeAction = KStdAction::close( this, TQT_SLOT( close() ), actionCollection() ); -* KShortcut closeShortcut = closeAction->shortcut(); +* TDEAction *closeAction = KStdAction::close( this, TQT_SLOT( close() ), actionCollection() ); +* TDEShortcut closeShortcut = closeAction->shortcut(); * closeShortcut.append( KKey(Key_Escape)); * closeAction->setShortcut(closeShortcut); * \endcode @@ -540,12 +540,12 @@ class TDECORE_EXPORT KKeySequence * */ -class TDECORE_EXPORT KShortcut +class TDECORE_EXPORT TDEShortcut { public: /** * The maximum number of key sequences that can be contained in - * a KShortcut. + * a TDEShortcut. */ enum { MAX_SEQUENCES = 2 }; @@ -555,7 +555,7 @@ class TDECORE_EXPORT KShortcut * @see isNull() * @see clear() */ - KShortcut(); + TDEShortcut(); /** * Creates a new shortcut with the given Qt key code @@ -563,34 +563,34 @@ class TDECORE_EXPORT KShortcut * @param keyQt the qt keycode * @see Qt::Key */ - KShortcut( int keyQt ); + TDEShortcut( int keyQt ); /** * Creates a new shortcut that contains only the given qt key * sequence. * @param keySeq the qt key sequence to add */ - KShortcut( const TQKeySequence& keySeq ); + TDEShortcut( const TQKeySequence& keySeq ); /** * Creates a new shortcut that contains only the given key * in its only sequence. * @param key the key to add */ - KShortcut( const KKey& key ); + TDEShortcut( const KKey& key ); /** * Creates a new shortcut that contains only the given key * sequence. * @param keySeq the key sequence to add */ - KShortcut( const KKeySequence& keySeq ); + TDEShortcut( const KKeySequence& keySeq ); /** * Copies the given shortcut. * @param shortcut the shortcut to add */ - KShortcut( const KShortcut& shortcut ); + TDEShortcut( const TDEShortcut& shortcut ); /** * Creates a new key sequence that contains the given key sequence. @@ -599,7 +599,7 @@ class TDECORE_EXPORT KShortcut * @param shortcut the description of the key * @see KKeySequence::KKeySequence(const TQString&) */ - KShortcut( const char* shortcut ); + TDEShortcut( const char* shortcut ); /** * Creates a new key sequence that contains the given key sequence. @@ -608,8 +608,8 @@ class TDECORE_EXPORT KShortcut * @param shortcut the description of the key * @see KKeySequence::KKeySequence(const TQString&) */ - KShortcut( const TQString& shortcut ); - ~KShortcut(); + TDEShortcut( const TQString& shortcut ); + ~TDEShortcut(); /** * Clears the shortcut. The shortcut is null after calling this @@ -648,7 +648,7 @@ class TDECORE_EXPORT KShortcut * Copies the given shortcut. * @param shortcut the shortcut to add */ - bool init( const KShortcut& shortcut ); + bool init( const TDEShortcut& shortcut ); /** * Initializes the key sequence with the given key sequence. @@ -662,7 +662,7 @@ class TDECORE_EXPORT KShortcut /** * Copies the given shortcut over this shortcut. */ - KShortcut& operator =( const KShortcut& cut ) + TDEShortcut& operator =( const TDEShortcut& cut ) { init( cut ); return *this; } /** @@ -708,32 +708,32 @@ class TDECORE_EXPORT KShortcut * beginning until an unequal key sequences has been found. If a shortcut * contains more key sequences, it is considered larger. * @param shortcut the shortcut to compare to - * @return a negative number if the given KShortcut is larger, 0 if - * they are equal and a positive number this KShortcut is larger + * @return a negative number if the given TDEShortcut is larger, 0 if + * they are equal and a positive number this TDEShortcut is larger * @see KKey::compare() * @see KKeyShortcut::compare() */ - int compare( const KShortcut& shortcut ) const; + int compare( const TDEShortcut& shortcut ) const; /** * Compares the sequences of both shortcuts. * @see compare() */ - bool operator == ( const KShortcut& cut ) const + bool operator == ( const TDEShortcut& cut ) const { return compare( cut ) == 0; } /** * Compares the sequences of both shortcuts. * @see compare() */ - bool operator != ( const KShortcut& cut ) const + bool operator != ( const TDEShortcut& cut ) const { return compare( cut ) != 0; } /** * Compares the sequences of both shortcuts. * @see compare() */ - bool operator < ( const KShortcut& cut ) const + bool operator < ( const TDEShortcut& cut ) const { return compare( cut ) < 0; } /** @@ -804,7 +804,7 @@ class TDECORE_EXPORT KShortcut * @see MAX_SEQUENCES * @since 3.2 */ - bool append( const KShortcut& cut ); + bool append( const TDEShortcut& cut ); /** * Converts this shortcut to a key sequence. The first key sequence @@ -824,7 +824,7 @@ class TDECORE_EXPORT KShortcut /** * @internal */ - TQString toStringInternal( const KShortcut* pcutDefault = 0 ) const; + TQString toStringInternal( const TDEShortcut* pcutDefault = 0 ) const; /** * Returns a null shortcut. @@ -832,14 +832,14 @@ class TDECORE_EXPORT KShortcut * @see isNull() * @see clear() */ - static KShortcut& null(); + static TDEShortcut& null(); protected: uint m_nSeqs; KKeySequence m_rgseq[MAX_SEQUENCES]; private: - class KShortcutPrivate* d; + class TDEShortcutPrivate* d; friend class KKeyNative; #ifndef KDE_NO_COMPAT diff --git a/tdecore/kshortcutlist.cpp b/tdecore/kshortcutlist.cpp index dd171062e..d32df889d 100644 --- a/tdecore/kshortcutlist.cpp +++ b/tdecore/kshortcutlist.cpp @@ -12,23 +12,23 @@ #include "kshortcutlist.h" //--------------------------------------------------------------------- -// KShortcutList +// TDEShortcutList //--------------------------------------------------------------------- -KShortcutList::KShortcutList() +TDEShortcutList::TDEShortcutList() { } -KShortcutList::~KShortcutList() +TDEShortcutList::~TDEShortcutList() { } -bool KShortcutList::isGlobal( uint ) const +bool TDEShortcutList::isGlobal( uint ) const { return false; } -int KShortcutList::index( const TQString& sName ) const +int TDEShortcutList::index( const TQString& sName ) const { uint nSize = count(); for( uint i = 0; @@ -39,7 +39,7 @@ int KShortcutList::index( const TQString& sName ) const return -1; } -int KShortcutList::index( const KKeySequence& seq ) const +int TDEShortcutList::index( const KKeySequence& seq ) const { if( seq.isNull() ) return -1; @@ -53,24 +53,24 @@ int KShortcutList::index( const KKeySequence& seq ) const return -1; } -const TDEInstance* KShortcutList::instance() const +const TDEInstance* TDEShortcutList::instance() const { return 0; } -TQVariant KShortcutList::getOther( Other, uint ) const +TQVariant TDEShortcutList::getOther( Other, uint ) const { return TQVariant(); } -bool KShortcutList::setOther( Other, uint, TQVariant ) +bool TDEShortcutList::setOther( Other, uint, TQVariant ) { return false; } -bool KShortcutList::readSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) +bool TDEShortcutList::readSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) { - kdDebug(125) << "KShortcutList::readSettings( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl; + kdDebug(125) << "TDEShortcutList::readSettings( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl; if( !pConfig ) pConfig = TDEGlobal::config(); TQString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : TQString("Shortcuts"); @@ -92,9 +92,9 @@ bool KShortcutList::readSettings( const TQString& sConfigGroup, TDEConfigBase* p TQString sEntry = pConfig->readEntry( name(i) ); if( !sEntry.isEmpty() ) { if( sEntry == "none" ) - setShortcut( i, KShortcut() ); + setShortcut( i, TDEShortcut() ); else - setShortcut( i, KShortcut(sEntry) ); + setShortcut( i, TDEShortcut(sEntry) ); } else // default shortcut setShortcut( i, shortcutDefault(i) ); @@ -102,13 +102,13 @@ bool KShortcutList::readSettings( const TQString& sConfigGroup, TDEConfigBase* p } } - kdDebug(125) << "KShortcutList::readSettings done" << endl; + kdDebug(125) << "TDEShortcutList::readSettings done" << endl; return true; } -bool KShortcutList::writeSettings( const TQString &sConfigGroup, TDEConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const +bool TDEShortcutList::writeSettings( const TQString &sConfigGroup, TDEConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const { - kdDebug(125) << "KShortcutList::writeSettings( " << sConfigGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl; + kdDebug(125) << "TDEShortcutList::writeSettings( " << sConfigGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl; if( !pConfig ) pConfig = TDEGlobal::config(); @@ -149,72 +149,72 @@ bool KShortcutList::writeSettings( const TQString &sConfigGroup, TDEConfigBase* } //--------------------------------------------------------------------- -// KAccelShortcutList +// TDEAccelShortcutList //--------------------------------------------------------------------- -class KAccelShortcutListPrivate +class TDEAccelShortcutListPrivate { public: TQString m_configGroup; }; -KAccelShortcutList::KAccelShortcutList( KAccel* pAccel ) +TDEAccelShortcutList::TDEAccelShortcutList( TDEAccel* pAccel ) : m_actions( pAccel->actions() ) { - d=new KAccelShortcutListPrivate; + d=new TDEAccelShortcutListPrivate; m_bGlobal = false; d->m_configGroup=pAccel->configGroup(); } -KAccelShortcutList::KAccelShortcutList( TDEGlobalAccel* pAccel ) +TDEAccelShortcutList::TDEAccelShortcutList( TDEGlobalAccel* pAccel ) : m_actions( pAccel->actions() ) { - d=new KAccelShortcutListPrivate; + d=new TDEAccelShortcutListPrivate; m_bGlobal = true; d->m_configGroup=pAccel->configGroup(); } -KAccelShortcutList::KAccelShortcutList( KAccelActions& actions, bool bGlobal ) +TDEAccelShortcutList::TDEAccelShortcutList( TDEAccelActions& actions, bool bGlobal ) : m_actions( actions ) { - d=new KAccelShortcutListPrivate; + d=new TDEAccelShortcutListPrivate; m_bGlobal = bGlobal; } -KAccelShortcutList::~KAccelShortcutList() +TDEAccelShortcutList::~TDEAccelShortcutList() { delete d;} -uint KAccelShortcutList::count() const +uint TDEAccelShortcutList::count() const { return m_actions.count(); } -TQString KAccelShortcutList::name( uint i ) const +TQString TDEAccelShortcutList::name( uint i ) const { return m_actions.actionPtr(i)->name(); } -TQString KAccelShortcutList::label( uint i ) const +TQString TDEAccelShortcutList::label( uint i ) const { return m_actions.actionPtr(i)->label(); } -TQString KAccelShortcutList::whatsThis( uint i ) const +TQString TDEAccelShortcutList::whatsThis( uint i ) const { return m_actions.actionPtr(i)->whatsThis(); } -const KShortcut& KAccelShortcutList::shortcut( uint i ) const +const TDEShortcut& TDEAccelShortcutList::shortcut( uint i ) const { return m_actions.actionPtr(i)->shortcut(); } -const KShortcut& KAccelShortcutList::shortcutDefault( uint i ) const +const TDEShortcut& TDEAccelShortcutList::shortcutDefault( uint i ) const { return m_actions.actionPtr(i)->shortcutDefault(); } -bool KAccelShortcutList::isConfigurable( uint i ) const +bool TDEAccelShortcutList::isConfigurable( uint i ) const { return m_actions.actionPtr(i)->isConfigurable(); } -bool KAccelShortcutList::setShortcut( uint i, const KShortcut& cut ) +bool TDEAccelShortcutList::setShortcut( uint i, const TDEShortcut& cut ) { return m_actions.actionPtr(i)->setShortcut( cut ); } -TQVariant KAccelShortcutList::getOther( Other, uint ) const +TQVariant TDEAccelShortcutList::getOther( Other, uint ) const { return TQVariant(); } -bool KAccelShortcutList::isGlobal( uint ) const +bool TDEAccelShortcutList::isGlobal( uint ) const { return m_bGlobal; } -bool KAccelShortcutList::setOther( Other, uint, TQVariant ) +bool TDEAccelShortcutList::setOther( Other, uint, TQVariant ) { return false; } -bool KAccelShortcutList::save() const +bool TDEAccelShortcutList::save() const { return writeSettings( d->m_configGroup ); } -void KShortcutList::virtual_hook( int, void* ) +void TDEShortcutList::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KAccelShortcutList::virtual_hook( int id, void* data ) -{ KShortcutList::virtual_hook( id, data ); } +void TDEAccelShortcutList::virtual_hook( int id, void* data ) +{ TDEShortcutList::virtual_hook( id, data ); } -void KStdAccel::ShortcutList::virtual_hook( int id, void* data ) -{ KShortcutList::virtual_hook( id, data ); } +void TDEStdAccel::ShortcutList::virtual_hook( int id, void* data ) +{ TDEShortcutList::virtual_hook( id, data ); } diff --git a/tdecore/kshortcutlist.h b/tdecore/kshortcutlist.h index 7f4caa079..99e83766b 100644 --- a/tdecore/kshortcutlist.h +++ b/tdecore/kshortcutlist.h @@ -28,31 +28,31 @@ class TQVariant; class TDEConfigBase; class TDEInstance; class KKeySequence; -class KShortcut; +class TDEShortcut; /********************************************************************** * This is a wrapper class which allows a function to use one interface -* to KActionCollection, KAccelActions, and KActionPtrList. +* to TDEActionCollection, TDEAccelActions, and TDEActionPtrList. **********************************************************************/ /** - * KShortcutList is an abstract base class for - * KAccelShortcutList and KStdAccel::ShortcutList. It gives + * TDEShortcutList is an abstract base class for + * TDEAccelShortcutList and TDEStdAccel::ShortcutList. It gives * you an unified interface for accessing the accelerator lists - * of KAccel (using KAccelShortcutList), - * TDEGlobalAccel (using KAccelShortcutList), and - * KStdAccel (using KStdAccel::ShortcutList). + * of TDEAccel (using TDEAccelShortcutList), + * TDEGlobalAccel (using TDEAccelShortcutList), and + * TDEStdAccel (using TDEStdAccel::ShortcutList). * * @short Base class for accessing accelerator lists */ -class TDECORE_EXPORT KShortcutList +class TDECORE_EXPORT TDEShortcutList { public: /** * Default constructor. */ - KShortcutList(); - virtual ~KShortcutList(); + TDEShortcutList(); + virtual ~TDEShortcutList(); /** * Returns the number of entries. @@ -90,7 +90,7 @@ class TDECORE_EXPORT KShortcutList * @return the shortcut * @see shortcutDefault() */ - virtual const KShortcut& shortcut( uint index ) const = 0; + virtual const TDEShortcut& shortcut( uint index ) const = 0; /** * Returns default shortcut with the given @p index. @@ -98,7 +98,7 @@ class TDECORE_EXPORT KShortcutList * @return the default shortcut * @see shortcut() */ - virtual const KShortcut& shortcutDefault( uint index ) const = 0; + virtual const TDEShortcut& shortcutDefault( uint index ) const = 0; /** * Checks whether the shortcut with the given @p index is configurable. @@ -112,7 +112,7 @@ class TDECORE_EXPORT KShortcutList * @param index the index of the shortcut (must be < count()) * @param shortcut the shortcut */ - virtual bool setShortcut( uint index, const KShortcut &shortcut ) = 0; + virtual bool setShortcut( uint index, const TDEShortcut &shortcut ) = 0; /** * Checks whether the shortcut with the given @p index is saved in the @@ -180,56 +180,56 @@ class TDECORE_EXPORT KShortcutList /// used to extend the interface with virtuals without breaking binary compatibility virtual void virtual_hook( int id, void* data ); private: - class KShortcutListPrivate* d; + class TDEShortcutListPrivate* d; }; //--------------------------------------------------------------------- -// KAccelShortcutList +// TDEAccelShortcutList //--------------------------------------------------------------------- -class KAccel; -class KAccelActions; +class TDEAccel; +class TDEAccelActions; class TDEGlobalAccel; /** - * KShortcutList implementation to access KAccel and + * TDEShortcutList implementation to access TDEAccel and * TDEGlobalAccel lists. */ -class TDECORE_EXPORT KAccelShortcutList : public KShortcutList +class TDECORE_EXPORT TDEAccelShortcutList : public TDEShortcutList { public: /** - * Creates a new KShortcutList that accesses the given KAccel. + * Creates a new TDEShortcutList that accesses the given TDEAccel. * @param accel the accelerators to access */ - KAccelShortcutList( KAccel* accel ); + TDEAccelShortcutList( TDEAccel* accel ); /** - * Creates a new KShortcutList that accesses the given + * Creates a new TDEShortcutList that accesses the given * TDEGlobalAccel. * @param accel the accelerators to access */ - KAccelShortcutList( TDEGlobalAccel* accel ); + TDEAccelShortcutList( TDEGlobalAccel* accel ); /** * @internal - * Creates a new KShortcutList that accesses the given - * KAccelActions collection. + * Creates a new TDEShortcutList that accesses the given + * TDEAccelActions collection. * @param actions the actions to access * @param bGlobal true to save the actions in the global * configuration file */ - KAccelShortcutList( KAccelActions &actions, bool bGlobal ); - virtual ~KAccelShortcutList(); + TDEAccelShortcutList( TDEAccelActions &actions, bool bGlobal ); + virtual ~TDEAccelShortcutList(); 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 bool isGlobal( uint index ) const; /** \internal */ @@ -241,26 +241,26 @@ class TDECORE_EXPORT KAccelShortcutList : public KShortcutList protected: /** Actions (collection) for this shortcut list. Set by constructor. */ - KAccelActions& m_actions; + TDEAccelActions& m_actions; /** Is this shortcut list global? Access through isGlobal() */ bool m_bGlobal; protected: virtual void virtual_hook( int id, void* data ); private: - class KAccelShortcutListPrivate* d; + class TDEAccelShortcutListPrivate* d; }; -namespace KStdAccel { +namespace TDEStdAccel { //--------------------------------------------------------------------- // ShortcutList //--------------------------------------------------------------------- /** - * KShortcutList implementation that accesses KStdAccel + * TDEShortcutList implementation that accesses TDEStdAccel * actions. */ -class TDECORE_EXPORT ShortcutList : public KShortcutList +class TDECORE_EXPORT ShortcutList : public TDEShortcutList { public: /** @@ -273,10 +273,10 @@ class TDECORE_EXPORT ShortcutList : public KShortcutList 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 ); /** \internal */ virtual TQVariant getOther( Other, uint index ) const; diff --git a/tdecore/kshortcutmenu.cpp b/tdecore/kshortcutmenu.cpp index 4bf18d965..be485fb7e 100644 --- a/tdecore/kshortcutmenu.cpp +++ b/tdecore/kshortcutmenu.cpp @@ -27,7 +27,7 @@ #include "kshortcutmenu.h" //#include <kkeynative.h> -KShortcutMenu::KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySequence seq ) +TDEShortcutMenu::TDEShortcutMenu( TQWidget* pParent, TDEAccelActions* pActions, KKeySequence seq ) : TQPopupMenu( pParent ), m_pActions( pActions ), m_seq( seq ) @@ -44,9 +44,9 @@ KShortcutMenu::KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySe insertItem( pTitle ); } -bool KShortcutMenu::insertAction( uint iAction, KKeySequence seq ) +bool TDEShortcutMenu::insertAction( uint iAction, KKeySequence seq ) { - KAccelAction* pAction = m_pActions->actionPtr( iAction ); + TDEAccelAction* pAction = m_pActions->actionPtr( iAction ); if( pAction ) { insertItem( "", iAction ); @@ -57,14 +57,14 @@ bool KShortcutMenu::insertAction( uint iAction, KKeySequence seq ) } -void KShortcutMenu::updateShortcuts() +void TDEShortcutMenu::updateShortcuts() { pTitle->setText( m_seq.toString() + ",..." ); for( uint iItem = 1; iItem < count(); iItem++ ) { int iAction = idAt( iItem ); if( iAction >= 0 ) { - KAccelAction* pAction = m_pActions->actionPtr( iAction ); + TDEAccelAction* pAction = m_pActions->actionPtr( iAction ); if( pAction ) { KKeySequence seq = m_seqs[iItem]; TQString sSeq = seq.key(m_seq.count()).toString(); @@ -78,7 +78,7 @@ void KShortcutMenu::updateShortcuts() } } -void KShortcutMenu::keyPressEvent( TQKeyEvent* pEvent ) +void TDEShortcutMenu::keyPressEvent( TQKeyEvent* pEvent ) { kdDebug() << "keypress; " << pEvent->key() << endl; KKey key( pEvent ); @@ -117,7 +117,7 @@ void KShortcutMenu::keyPressEvent( TQKeyEvent* pEvent ) } } -int KShortcutMenu::searchForKey( KKey key ) +int TDEShortcutMenu::searchForKey( KKey key ) { int iItemFound = -1; // -1 indicates no match uint iKey = m_seq.count(); @@ -138,7 +138,7 @@ int KShortcutMenu::searchForKey( KKey key ) return iItemFound; } -void KShortcutMenu::keepItemsMatching( KKey key ) +void TDEShortcutMenu::keepItemsMatching( KKey key ) { kdDebug(125) << "MyAccel::keepItemsMatching( " << key.toStringInternal() << " )" << endl; diff --git a/tdecore/kshortcutmenu.h b/tdecore/kshortcutmenu.h index 2c682342d..6e01cdd95 100644 --- a/tdecore/kshortcutmenu.h +++ b/tdecore/kshortcutmenu.h @@ -27,16 +27,16 @@ class TQLabel; -class KAccelActions; +class TDEAccelActions; /** * @internal */ -class TDECORE_EXPORT KShortcutMenu : public TQPopupMenu +class TDECORE_EXPORT TDEShortcutMenu : public TQPopupMenu { Q_OBJECT public: - KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySequence seq ); + TDEShortcutMenu( TQWidget* pParent, TDEAccelActions* pActions, KKeySequence seq ); bool insertAction( uint iAction, KKeySequence seq ); @@ -52,7 +52,7 @@ class TDECORE_EXPORT KShortcutMenu : public TQPopupMenu private: typedef TQMap<uint, KKeySequence> IndexToKKeySequence; - KAccelActions* m_pActions; + TDEAccelActions* m_pActions; KKeySequence m_seq; TQLabel* pTitle; IndexToKKeySequence m_seqs; diff --git a/tdecore/kstdaccel.cpp b/tdecore/kstdaccel.cpp index afc49aac4..ac1381c88 100644 --- a/tdecore/kstdaccel.cpp +++ b/tdecore/kstdaccel.cpp @@ -30,84 +30,84 @@ #include <kshortcut.h> #include <kshortcutlist.h> -namespace KStdAccel +namespace TDEStdAccel { -struct KStdAccelInfo +struct TDEStdAccelInfo { StdAccel id; const char* psName; const char* psDesc; int cutDefault, cutDefault4, cutDefault3B, cutDefault4B; - KShortcut cut; + TDEShortcut cut; bool bInitialized; }; -/** Array of predefined KStdAccelInfo objects, which cover all +/** Array of predefined TDEStdAccelInfo objects, which cover all the "standard" accelerators. Each enum value from StdAccel should appear in this table. */ -static KStdAccelInfo g_infoStdAccel[] = +static TDEStdAccelInfo g_infoStdAccel[] = { - {AccelNone, "Group:File", I18N_NOOP("File"), 0, 0, 0, 0, KShortcut(), false }, - { Open, I18N_NOOP("Open"), 0, Qt::CTRL+Qt::Key_O, 0, 0, 0, KShortcut(), false }, - { New, I18N_NOOP("New"), 0, Qt::CTRL+Qt::Key_N, 0, 0, 0, KShortcut(), false }, - { Close, I18N_NOOP("Close"), 0, Qt::CTRL+Qt::Key_W, Qt::CTRL+Qt::Key_Escape, 0, Qt::CTRL+Qt::Key_W, KShortcut(), false }, - { Save, I18N_NOOP("Save"), 0, Qt::CTRL+Qt::Key_S, 0, 0, 0, KShortcut(), false }, - { Print, I18N_NOOP("Print"), 0, Qt::CTRL+Qt::Key_P, 0, 0, 0, KShortcut(), false }, - { Quit, I18N_NOOP("Quit"), 0, Qt::CTRL+Qt::Key_Q, 0, 0, 0, KShortcut(), false }, - {AccelNone, "Group:Edit", I18N_NOOP("Edit"), 0, 0, 0, 0, KShortcut(), false }, - { Undo, I18N_NOOP("Undo"), 0, Qt::CTRL+Qt::Key_Z, 0, 0, 0, KShortcut(), false }, - { Redo, I18N_NOOP("Redo"), 0, Qt::CTRL+Qt::SHIFT+Qt::Key_Z, 0, 0, 0, KShortcut(), false }, - { Cut, I18N_NOOP("Cut"), 0, Qt::CTRL+Qt::Key_X, 0, Qt::SHIFT+Qt::Key_Delete, 0, KShortcut(), false }, - { Copy, I18N_NOOP("Copy"), 0, Qt::CTRL+Qt::Key_C, 0, Qt::CTRL+Qt::Key_Insert, 0, KShortcut(), false }, - { Paste, I18N_NOOP("Paste"), 0, Qt::CTRL+Qt::Key_V, 0, Qt::SHIFT+Qt::Key_Insert, 0, KShortcut(), false }, - { PasteSelection, I18N_NOOP("Paste Selection"), 0, 0, 0, Qt::CTRL+Qt::SHIFT+Qt::Key_Insert, 0, KShortcut(), false }, - { SelectAll, "SelectAll", I18N_NOOP("Select All"), Qt::CTRL+Qt::Key_A, 0, 0, 0, KShortcut(), false }, - { Deselect, I18N_NOOP("Deselect"), 0, Qt::CTRL+Qt::SHIFT+Qt::Key_A, 0, 0, 0, KShortcut(), false }, - { DeleteWordBack, "DeleteWordBack", I18N_NOOP("Delete Word Backwards"), Qt::CTRL+Qt::Key_Backspace, 0, 0, 0, KShortcut(), false }, - { DeleteWordForward, "DeleteWordForward", I18N_NOOP("Delete Word Forward"), Qt::CTRL+Qt::Key_Delete, 0, 0, 0, KShortcut(), false }, - { Find, I18N_NOOP("Find"), 0, Qt::CTRL+Qt::Key_F, 0, 0, 0, KShortcut(), false }, - { FindNext, "FindNext", I18N_NOOP("Find Next"), Qt::Key_F3, 0, 0, 0, KShortcut(), false }, - { FindPrev, "FindPrev", I18N_NOOP("Find Prev"), Qt::SHIFT+Qt::Key_F3, 0, 0, 0, KShortcut(), false }, - { Replace, I18N_NOOP("Replace"), 0, Qt::CTRL+Qt::Key_R, 0, 0, 0, KShortcut(), false }, - {AccelNone, "Group:Navigation", I18N_NOOP("Navigation"), 0, 0, 0, 0, KShortcut(), false }, - { Home, I18N_NOOP2("Opposite to End","Home"), 0, Qt::CTRL+Qt::Key_Home, 0, Qt::Key_HomePage, 0, KShortcut(), false }, - { End, I18N_NOOP("End"), 0, Qt::CTRL+Qt::Key_End, 0, 0, 0, KShortcut(), false }, - { BeginningOfLine, "BeginningOfLine", I18N_NOOP("Beginning of Line"), Qt::Key_Home, 0, 0, 0, KShortcut(), false}, - { EndOfLine, "EndOfLine", I18N_NOOP("End of Line"), Qt::Key_End, 0, 0, 0, KShortcut(), false}, - { Prior, I18N_NOOP("Prior"), 0, TQt::Key_Prior, 0, 0, 0, KShortcut(), false }, - { Next, I18N_NOOP2("Opposite to Prior","Next"), 0, TQt::Key_Next, 0, 0, 0, KShortcut(), false }, - { GotoLine, "GotoLine", I18N_NOOP("Go to Line"), Qt::CTRL+Qt::Key_G, 0, 0, 0, KShortcut(), false }, - { AddBookmark, "AddBookmark", I18N_NOOP("Add Bookmark"), Qt::CTRL+Qt::Key_B, 0, 0, 0, KShortcut(), false }, - { ZoomIn, "ZoomIn", I18N_NOOP("Zoom In"), Qt::CTRL+Qt::Key_Plus, 0, 0, 0, KShortcut(), false }, - { ZoomOut, "ZoomOut", I18N_NOOP("Zoom Out"), Qt::CTRL+Qt::Key_Minus, 0, 0, 0, KShortcut(), false }, - { Up, I18N_NOOP("Up"), 0, Qt::ALT+Qt::Key_Up, 0, 0, 0, KShortcut(), false }, - { Back, I18N_NOOP("Back"), 0, Qt::ALT+Qt::Key_Left, 0, Qt::Key_Back, 0, KShortcut(), false }, - { Forward, I18N_NOOP("Forward"), 0, Qt::ALT+Qt::Key_Right, 0, Qt::Key_Forward, 0, KShortcut(), false }, - { Reload, I18N_NOOP("Reload"), 0, Qt::Key_F5, 0, Qt::Key_Refresh, 0, KShortcut(), false }, - { PopupMenuContext, "PopupMenuContext", I18N_NOOP("Popup Menu Context"), Qt::Key_Menu, 0, 0, 0, KShortcut(), false }, - { ShowMenubar, "ShowMenubar", I18N_NOOP("Show Menu Bar"), Qt::CTRL+Qt::Key_M, 0, 0, 0, KShortcut(), false }, - { BackwardWord, "BackwardWord", I18N_NOOP("Backward Word"), Qt::CTRL+Qt::Key_Left, 0, 0, 0, KShortcut(), false }, - { ForwardWord, "ForwardWord", I18N_NOOP("Forward Word"), Qt::CTRL+Qt::Key_Right, 0, 0, 0, KShortcut(), false }, - { TabNext, I18N_NOOP("Activate Next Tab"), 0, Qt::CTRL+Qt::Key_Period, 0, Qt::CTRL+Qt::Key_BracketRight, 0, KShortcut(), false }, - { TabPrev, I18N_NOOP("Activate Previous Tab"), 0, Qt::CTRL+Qt::Key_Comma, 0, Qt::CTRL+Qt::Key_BracketLeft, 0, KShortcut(), false }, - { FullScreen, "FullScreen", I18N_NOOP("Full Screen Mode"), Qt::CTRL+Qt::SHIFT+Qt::Key_F, 0, 0, 0, KShortcut(), false }, - {AccelNone, "Group:Help", I18N_NOOP("Help"), 0, 0, 0, 0, KShortcut(), false }, - { Help, I18N_NOOP("Help"), 0, Qt::Key_F1, 0, 0, 0, KShortcut(), false }, - { WhatsThis, "WhatsThis", I18N_NOOP("What's This"), Qt::SHIFT+Qt::Key_F1, 0, 0, 0, KShortcut(), false }, - {AccelNone, "Group:TextCompletion", I18N_NOOP("Text Completion"), 0, 0, 0, 0, KShortcut(), false }, - { TextCompletion, "TextCompletion", I18N_NOOP("Text Completion"), Qt::CTRL+Qt::Key_E, 0, 0, 0, KShortcut(), false }, - { PrevCompletion, "PrevCompletion", I18N_NOOP("Previous Completion Match"), Qt::CTRL+Qt::Key_Up, 0, 0, 0, KShortcut(), false }, - { NextCompletion, "NextCompletion", I18N_NOOP("Next Completion Match"), Qt::CTRL+Qt::Key_Down, 0, 0, 0, KShortcut(), false }, - { SubstringCompletion, "SubstringCompletion", I18N_NOOP("Substring Completion"), Qt::CTRL+Qt::Key_T, 0, 0, 0, KShortcut(), false }, - { RotateUp, "RotateUp", I18N_NOOP("Previous Item in List"), Qt::Key_Up, 0, 0, 0, KShortcut(), false }, - { RotateDown, "RotateDown", I18N_NOOP("Next Item in List"), Qt::Key_Down, 0, 0, 0, KShortcut(), false }, - { AccelNone, 0, 0, 0, 0, 0, 0, KShortcut(), false } + {AccelNone, "Group:File", I18N_NOOP("File"), 0, 0, 0, 0, TDEShortcut(), false }, + { Open, I18N_NOOP("Open"), 0, Qt::CTRL+Qt::Key_O, 0, 0, 0, TDEShortcut(), false }, + { New, I18N_NOOP("New"), 0, Qt::CTRL+Qt::Key_N, 0, 0, 0, TDEShortcut(), false }, + { Close, I18N_NOOP("Close"), 0, Qt::CTRL+Qt::Key_W, Qt::CTRL+Qt::Key_Escape, 0, Qt::CTRL+Qt::Key_W, TDEShortcut(), false }, + { Save, I18N_NOOP("Save"), 0, Qt::CTRL+Qt::Key_S, 0, 0, 0, TDEShortcut(), false }, + { Print, I18N_NOOP("Print"), 0, Qt::CTRL+Qt::Key_P, 0, 0, 0, TDEShortcut(), false }, + { Quit, I18N_NOOP("Quit"), 0, Qt::CTRL+Qt::Key_Q, 0, 0, 0, TDEShortcut(), false }, + {AccelNone, "Group:Edit", I18N_NOOP("Edit"), 0, 0, 0, 0, TDEShortcut(), false }, + { Undo, I18N_NOOP("Undo"), 0, Qt::CTRL+Qt::Key_Z, 0, 0, 0, TDEShortcut(), false }, + { Redo, I18N_NOOP("Redo"), 0, Qt::CTRL+Qt::SHIFT+Qt::Key_Z, 0, 0, 0, TDEShortcut(), false }, + { Cut, I18N_NOOP("Cut"), 0, Qt::CTRL+Qt::Key_X, 0, Qt::SHIFT+Qt::Key_Delete, 0, TDEShortcut(), false }, + { Copy, I18N_NOOP("Copy"), 0, Qt::CTRL+Qt::Key_C, 0, Qt::CTRL+Qt::Key_Insert, 0, TDEShortcut(), false }, + { Paste, I18N_NOOP("Paste"), 0, Qt::CTRL+Qt::Key_V, 0, Qt::SHIFT+Qt::Key_Insert, 0, TDEShortcut(), false }, + { PasteSelection, I18N_NOOP("Paste Selection"), 0, 0, 0, Qt::CTRL+Qt::SHIFT+Qt::Key_Insert, 0, TDEShortcut(), false }, + { SelectAll, "SelectAll", I18N_NOOP("Select All"), Qt::CTRL+Qt::Key_A, 0, 0, 0, TDEShortcut(), false }, + { Deselect, I18N_NOOP("Deselect"), 0, Qt::CTRL+Qt::SHIFT+Qt::Key_A, 0, 0, 0, TDEShortcut(), false }, + { DeleteWordBack, "DeleteWordBack", I18N_NOOP("Delete Word Backwards"), Qt::CTRL+Qt::Key_Backspace, 0, 0, 0, TDEShortcut(), false }, + { DeleteWordForward, "DeleteWordForward", I18N_NOOP("Delete Word Forward"), Qt::CTRL+Qt::Key_Delete, 0, 0, 0, TDEShortcut(), false }, + { Find, I18N_NOOP("Find"), 0, Qt::CTRL+Qt::Key_F, 0, 0, 0, TDEShortcut(), false }, + { FindNext, "FindNext", I18N_NOOP("Find Next"), Qt::Key_F3, 0, 0, 0, TDEShortcut(), false }, + { FindPrev, "FindPrev", I18N_NOOP("Find Prev"), Qt::SHIFT+Qt::Key_F3, 0, 0, 0, TDEShortcut(), false }, + { Replace, I18N_NOOP("Replace"), 0, Qt::CTRL+Qt::Key_R, 0, 0, 0, TDEShortcut(), false }, + {AccelNone, "Group:Navigation", I18N_NOOP("Navigation"), 0, 0, 0, 0, TDEShortcut(), false }, + { Home, I18N_NOOP2("Opposite to End","Home"), 0, Qt::CTRL+Qt::Key_Home, 0, Qt::Key_HomePage, 0, TDEShortcut(), false }, + { End, I18N_NOOP("End"), 0, Qt::CTRL+Qt::Key_End, 0, 0, 0, TDEShortcut(), false }, + { BeginningOfLine, "BeginningOfLine", I18N_NOOP("Beginning of Line"), Qt::Key_Home, 0, 0, 0, TDEShortcut(), false}, + { EndOfLine, "EndOfLine", I18N_NOOP("End of Line"), Qt::Key_End, 0, 0, 0, TDEShortcut(), false}, + { Prior, I18N_NOOP("Prior"), 0, TQt::Key_Prior, 0, 0, 0, TDEShortcut(), false }, + { Next, I18N_NOOP2("Opposite to Prior","Next"), 0, TQt::Key_Next, 0, 0, 0, TDEShortcut(), false }, + { GotoLine, "GotoLine", I18N_NOOP("Go to Line"), Qt::CTRL+Qt::Key_G, 0, 0, 0, TDEShortcut(), false }, + { AddBookmark, "AddBookmark", I18N_NOOP("Add Bookmark"), Qt::CTRL+Qt::Key_B, 0, 0, 0, TDEShortcut(), false }, + { ZoomIn, "ZoomIn", I18N_NOOP("Zoom In"), Qt::CTRL+Qt::Key_Plus, 0, 0, 0, TDEShortcut(), false }, + { ZoomOut, "ZoomOut", I18N_NOOP("Zoom Out"), Qt::CTRL+Qt::Key_Minus, 0, 0, 0, TDEShortcut(), false }, + { Up, I18N_NOOP("Up"), 0, Qt::ALT+Qt::Key_Up, 0, 0, 0, TDEShortcut(), false }, + { Back, I18N_NOOP("Back"), 0, Qt::ALT+Qt::Key_Left, 0, Qt::Key_Back, 0, TDEShortcut(), false }, + { Forward, I18N_NOOP("Forward"), 0, Qt::ALT+Qt::Key_Right, 0, Qt::Key_Forward, 0, TDEShortcut(), false }, + { Reload, I18N_NOOP("Reload"), 0, Qt::Key_F5, 0, Qt::Key_Refresh, 0, TDEShortcut(), false }, + { PopupMenuContext, "PopupMenuContext", I18N_NOOP("Popup Menu Context"), Qt::Key_Menu, 0, 0, 0, TDEShortcut(), false }, + { ShowMenubar, "ShowMenubar", I18N_NOOP("Show Menu Bar"), Qt::CTRL+Qt::Key_M, 0, 0, 0, TDEShortcut(), false }, + { BackwardWord, "BackwardWord", I18N_NOOP("Backward Word"), Qt::CTRL+Qt::Key_Left, 0, 0, 0, TDEShortcut(), false }, + { ForwardWord, "ForwardWord", I18N_NOOP("Forward Word"), Qt::CTRL+Qt::Key_Right, 0, 0, 0, TDEShortcut(), false }, + { TabNext, I18N_NOOP("Activate Next Tab"), 0, Qt::CTRL+Qt::Key_Period, 0, Qt::CTRL+Qt::Key_BracketRight, 0, TDEShortcut(), false }, + { TabPrev, I18N_NOOP("Activate Previous Tab"), 0, Qt::CTRL+Qt::Key_Comma, 0, Qt::CTRL+Qt::Key_BracketLeft, 0, TDEShortcut(), false }, + { FullScreen, "FullScreen", I18N_NOOP("Full Screen Mode"), Qt::CTRL+Qt::SHIFT+Qt::Key_F, 0, 0, 0, TDEShortcut(), false }, + {AccelNone, "Group:Help", I18N_NOOP("Help"), 0, 0, 0, 0, TDEShortcut(), false }, + { Help, I18N_NOOP("Help"), 0, Qt::Key_F1, 0, 0, 0, TDEShortcut(), false }, + { WhatsThis, "WhatsThis", I18N_NOOP("What's This"), Qt::SHIFT+Qt::Key_F1, 0, 0, 0, TDEShortcut(), false }, + {AccelNone, "Group:TextCompletion", I18N_NOOP("Text Completion"), 0, 0, 0, 0, TDEShortcut(), false }, + { TextCompletion, "TextCompletion", I18N_NOOP("Text Completion"), Qt::CTRL+Qt::Key_E, 0, 0, 0, TDEShortcut(), false }, + { PrevCompletion, "PrevCompletion", I18N_NOOP("Previous Completion Match"), Qt::CTRL+Qt::Key_Up, 0, 0, 0, TDEShortcut(), false }, + { NextCompletion, "NextCompletion", I18N_NOOP("Next Completion Match"), Qt::CTRL+Qt::Key_Down, 0, 0, 0, TDEShortcut(), false }, + { SubstringCompletion, "SubstringCompletion", I18N_NOOP("Substring Completion"), Qt::CTRL+Qt::Key_T, 0, 0, 0, TDEShortcut(), false }, + { RotateUp, "RotateUp", I18N_NOOP("Previous Item in List"), Qt::Key_Up, 0, 0, 0, TDEShortcut(), false }, + { RotateDown, "RotateDown", I18N_NOOP("Next Item in List"), Qt::Key_Down, 0, 0, 0, TDEShortcut(), false }, + { AccelNone, 0, 0, 0, 0, 0, 0, TDEShortcut(), false } }; -/** Search for the KStdAccelInfo object associated with the given @p id. */ -static KStdAccelInfo* infoPtr( StdAccel id ) +/** Search for the TDEStdAccelInfo object associated with the given @p id. */ +static TDEStdAccelInfo* infoPtr( StdAccel id ) { if( id != AccelNone ) { // Linear search. Changing the data structure doesn't seem possible @@ -127,10 +127,10 @@ static KStdAccelInfo* infoPtr( StdAccel id ) static void initialize( StdAccel id ) { TDEConfigGroupSaver saver( TDEGlobal::config(), "Shortcuts" ); - KStdAccelInfo* pInfo = infoPtr( id ); + TDEStdAccelInfo* pInfo = infoPtr( id ); if( !pInfo ) { - kdWarning(125) << "KStdAccel: id not found!" << endl; // -- ellis + kdWarning(125) << "TDEStdAccel: id not found!" << endl; // -- ellis return; } @@ -147,7 +147,7 @@ static void initialize( StdAccel id ) TQString name( StdAccel id ) { - KStdAccelInfo* pInfo = infoPtr( id ); + TDEStdAccelInfo* pInfo = infoPtr( id ); if( !pInfo ) return TQString::null; return pInfo->psName; @@ -155,27 +155,27 @@ TQString name( StdAccel id ) TQString label( StdAccel id ) { - KStdAccelInfo* pInfo = infoPtr( id ); + TDEStdAccelInfo* pInfo = infoPtr( id ); if( !pInfo ) return TQString::null; return i18n((pInfo->psDesc) ? pInfo->psDesc : pInfo->psName); } -// TODO: Add psWhatsThis entry to KStdAccelInfo +// TODO: Add psWhatsThis entry to TDEStdAccelInfo TQString whatsThis( StdAccel /*id*/ ) { -// KStdAccelInfo* pInfo = infoPtr( id ); +// TDEStdAccelInfo* pInfo = infoPtr( id ); // if( pInfo && pInfo->psWhatsThis ) // return i18n(pInfo->psWhatsThis); // else return TQString::null; } -const KShortcut& shortcut( StdAccel id ) +const TDEShortcut& shortcut( StdAccel id ) { - KStdAccelInfo* pInfo = infoPtr( id ); + TDEStdAccelInfo* pInfo = infoPtr( id ); if( !pInfo ) - return KShortcut::null(); + return TDEShortcut::null(); if( !pInfo->bInitialized ) initialize( id ); @@ -199,17 +199,17 @@ StdAccel findStdAccel( const KKeySequence& seq ) return AccelNone; } -KShortcut shortcutDefault( StdAccel id ) +TDEShortcut shortcutDefault( StdAccel id ) { - return (KAccelAction::useFourModifierKeys()) + return (TDEAccelAction::useFourModifierKeys()) ? shortcutDefault4(id) : shortcutDefault3(id); } -KShortcut shortcutDefault3( StdAccel id ) +TDEShortcut shortcutDefault3( StdAccel id ) { - KShortcut cut; + TDEShortcut cut; - KStdAccelInfo* pInfo = infoPtr( id ); + TDEStdAccelInfo* pInfo = infoPtr( id ); if( pInfo ) { if( pInfo->cutDefault ) cut.init( pInfo->cutDefault ); @@ -222,13 +222,13 @@ KShortcut shortcutDefault3( StdAccel id ) return cut; } -KShortcut shortcutDefault4( StdAccel id ) +TDEShortcut shortcutDefault4( StdAccel id ) { - KShortcut cut; + TDEShortcut cut; - KStdAccelInfo* pInfo = infoPtr( id ); + TDEStdAccelInfo* pInfo = infoPtr( id ); if( pInfo ) { - KStdAccelInfo& info = *pInfo; + TDEStdAccelInfo& info = *pInfo; KKeySequence key2; cut.init( (info.cutDefault4) ? @@ -247,13 +247,13 @@ KShortcut shortcutDefault4( StdAccel id ) } #if 0 // unused -void createAccelActions( KAccelActions& actions ) +void createAccelActions( TDEAccelActions& actions ) { actions.clear(); for( uint i = 0; g_infoStdAccel[i].psName != 0; i++ ) { StdAccel id = g_infoStdAccel[i].id; - KStdAccelInfo* pInfo = &g_infoStdAccel[i]; + TDEStdAccelInfo* pInfo = &g_infoStdAccel[i]; if( id != AccelNone ) { actions.insert( pInfo->psName, @@ -267,54 +267,54 @@ void createAccelActions( KAccelActions& actions ) } #endif -const KShortcut& open() { return shortcut( Open ); } -const KShortcut& openNew() { return shortcut( New ); } -const KShortcut& close() { return shortcut( Close ); } -const KShortcut& save() { return shortcut( Save ); } -const KShortcut& print() { return shortcut( Print ); } -const KShortcut& quit() { return shortcut( Quit ); } -const KShortcut& cut() { return shortcut( Cut ); } -const KShortcut& copy() { return shortcut( Copy ); } -const KShortcut& paste() { return shortcut( Paste ); } -const KShortcut& pasteSelection() { return shortcut( PasteSelection ); } -const KShortcut& deleteWordBack() { return shortcut( DeleteWordBack ); } -const KShortcut& deleteWordForward() { return shortcut( DeleteWordForward ); } -const KShortcut& undo() { return shortcut( Undo ); } -const KShortcut& redo() { return shortcut( Redo ); } -const KShortcut& find() { return shortcut( Find ); } -const KShortcut& findNext() { return shortcut( FindNext ); } -const KShortcut& findPrev() { return shortcut( FindPrev ); } -const KShortcut& replace() { return shortcut( Replace ); } -const KShortcut& home() { return shortcut( Home ); } -const KShortcut& end() { return shortcut( End ); } -const KShortcut& beginningOfLine() { return shortcut( BeginningOfLine ); } -const KShortcut& endOfLine() { return shortcut( EndOfLine ); } -const KShortcut& prior() { return shortcut( Prior ); } -const KShortcut& next() { return shortcut( Next ); } -const KShortcut& backwardWord() { return shortcut( BackwardWord ); } -const KShortcut& forwardWord() { return shortcut( ForwardWord ); } -const KShortcut& gotoLine() { return shortcut( GotoLine ); } -const KShortcut& addBookmark() { return shortcut( AddBookmark ); } -const KShortcut& tabNext() { return shortcut( TabNext ); } -const KShortcut& tabPrev() { return shortcut( TabPrev ); } -const KShortcut& fullScreen() { return shortcut( FullScreen ); } -const KShortcut& zoomIn() { return shortcut( ZoomIn ); } -const KShortcut& zoomOut() { return shortcut( ZoomOut ); } -const KShortcut& help() { return shortcut( Help ); } -const KShortcut& completion() { return shortcut( TextCompletion ); } -const KShortcut& prevCompletion() { return shortcut( PrevCompletion ); } -const KShortcut& nextCompletion() { return shortcut( NextCompletion ); } -const KShortcut& rotateUp() { return shortcut( RotateUp ); } -const KShortcut& rotateDown() { return shortcut( RotateDown ); } -const KShortcut& substringCompletion() { return shortcut( SubstringCompletion ); } -const KShortcut& popupMenuContext() { return shortcut( PopupMenuContext ); } -const KShortcut& whatsThis() { return shortcut( WhatsThis ); } -const KShortcut& reload() { return shortcut( Reload ); } -const KShortcut& selectAll() { return shortcut( SelectAll ); } -const KShortcut& up() { return shortcut( Up ); } -const KShortcut& back() { return shortcut( Back ); } -const KShortcut& forward() { return shortcut( Forward ); } -const KShortcut& showMenubar() { return shortcut( ShowMenubar ); } +const TDEShortcut& open() { return shortcut( Open ); } +const TDEShortcut& openNew() { return shortcut( New ); } +const TDEShortcut& close() { return shortcut( Close ); } +const TDEShortcut& save() { return shortcut( Save ); } +const TDEShortcut& print() { return shortcut( Print ); } +const TDEShortcut& quit() { return shortcut( Quit ); } +const TDEShortcut& cut() { return shortcut( Cut ); } +const TDEShortcut& copy() { return shortcut( Copy ); } +const TDEShortcut& paste() { return shortcut( Paste ); } +const TDEShortcut& pasteSelection() { return shortcut( PasteSelection ); } +const TDEShortcut& deleteWordBack() { return shortcut( DeleteWordBack ); } +const TDEShortcut& deleteWordForward() { return shortcut( DeleteWordForward ); } +const TDEShortcut& undo() { return shortcut( Undo ); } +const TDEShortcut& redo() { return shortcut( Redo ); } +const TDEShortcut& find() { return shortcut( Find ); } +const TDEShortcut& findNext() { return shortcut( FindNext ); } +const TDEShortcut& findPrev() { return shortcut( FindPrev ); } +const TDEShortcut& replace() { return shortcut( Replace ); } +const TDEShortcut& home() { return shortcut( Home ); } +const TDEShortcut& end() { return shortcut( End ); } +const TDEShortcut& beginningOfLine() { return shortcut( BeginningOfLine ); } +const TDEShortcut& endOfLine() { return shortcut( EndOfLine ); } +const TDEShortcut& prior() { return shortcut( Prior ); } +const TDEShortcut& next() { return shortcut( Next ); } +const TDEShortcut& backwardWord() { return shortcut( BackwardWord ); } +const TDEShortcut& forwardWord() { return shortcut( ForwardWord ); } +const TDEShortcut& gotoLine() { return shortcut( GotoLine ); } +const TDEShortcut& addBookmark() { return shortcut( AddBookmark ); } +const TDEShortcut& tabNext() { return shortcut( TabNext ); } +const TDEShortcut& tabPrev() { return shortcut( TabPrev ); } +const TDEShortcut& fullScreen() { return shortcut( FullScreen ); } +const TDEShortcut& zoomIn() { return shortcut( ZoomIn ); } +const TDEShortcut& zoomOut() { return shortcut( ZoomOut ); } +const TDEShortcut& help() { return shortcut( Help ); } +const TDEShortcut& completion() { return shortcut( TextCompletion ); } +const TDEShortcut& prevCompletion() { return shortcut( PrevCompletion ); } +const TDEShortcut& nextCompletion() { return shortcut( NextCompletion ); } +const TDEShortcut& rotateUp() { return shortcut( RotateUp ); } +const TDEShortcut& rotateDown() { return shortcut( RotateDown ); } +const TDEShortcut& substringCompletion() { return shortcut( SubstringCompletion ); } +const TDEShortcut& popupMenuContext() { return shortcut( PopupMenuContext ); } +const TDEShortcut& whatsThis() { return shortcut( WhatsThis ); } +const TDEShortcut& reload() { return shortcut( Reload ); } +const TDEShortcut& selectAll() { return shortcut( SelectAll ); } +const TDEShortcut& up() { return shortcut( Up ); } +const TDEShortcut& back() { return shortcut( Back ); } +const TDEShortcut& forward() { return shortcut( Forward ); } +const TDEShortcut& showMenubar() { return shortcut( ShowMenubar ); } //--------------------------------------------------------------------- // ShortcutList @@ -345,24 +345,24 @@ TQString ShortcutList::label( uint i ) const TQString ShortcutList::whatsThis( uint ) const { return TQString::null; } -const KShortcut& ShortcutList::shortcut( uint i ) const +const TDEShortcut& ShortcutList::shortcut( uint i ) const { if( !g_infoStdAccel[i].bInitialized ) initialize( g_infoStdAccel[i].id ); return g_infoStdAccel[i].cut; } -const KShortcut& ShortcutList::shortcutDefault( uint i ) const +const TDEShortcut& ShortcutList::shortcutDefault( uint i ) const { - static KShortcut cut; - cut = KStdAccel::shortcutDefault( g_infoStdAccel[i].id ); + static TDEShortcut cut; + cut = TDEStdAccel::shortcutDefault( g_infoStdAccel[i].id ); return cut; } bool ShortcutList::isConfigurable( uint i ) const { return (g_infoStdAccel[i].id != AccelNone); } -bool ShortcutList::setShortcut( uint i, const KShortcut& cut ) +bool ShortcutList::setShortcut( uint i, const TDEShortcut& cut ) { g_infoStdAccel[i].cut = cut; return true; } TQVariant ShortcutList::getOther( Other, uint ) const diff --git a/tdecore/kstdaccel.h b/tdecore/kstdaccel.h index 813255cc3..580204673 100644 --- a/tdecore/kstdaccel.h +++ b/tdecore/kstdaccel.h @@ -25,20 +25,20 @@ #include "tdelibs_export.h" class TQKeyEvent; -class KAccelActions; +class TDEAccelActions; /** - * \namespace KStdAccel + * \namespace TDEStdAccel * Convenient methods for access to the common accelerator keys in * the key configuration. These are the standard keybindings that should * be used in all KDE applications. They will be configurable, * so do not hardcode the default behavior. * * If you want real configurable keybindings in your applications, - * please checkout the class KAccel in kaccel.h - * @see KAccelShortcutList + * please checkout the class TDEAccel in kaccel.h + * @see TDEAccelShortcutList */ -namespace KStdAccel +namespace TDEStdAccel { // Always add new std-accels to the end of this enum, never in the middle! /** @@ -87,7 +87,7 @@ namespace KStdAccel * Returns the keybinding for @p accel. * @param id the id of the accelerator */ - TDECORE_EXPORT const KShortcut& shortcut(StdAccel id); + TDECORE_EXPORT const TDEShortcut& shortcut(StdAccel id); /** * Returns a unique name for the given accel. @@ -126,326 +126,326 @@ namespace KStdAccel * @param id the id of the accelerator * @return the default shortcut of the accelerator */ - TDECORE_EXPORT KShortcut shortcutDefault(StdAccel id); + TDECORE_EXPORT TDEShortcut shortcutDefault(StdAccel id); /** * Returns the hardcoded default 3 modifier shortcut for @p id. * This does not take into account the user's configuration. * @param id the id of the accelerator * @return the default 3 modifier shortcut */ - TDECORE_EXPORT KShortcut shortcutDefault3(StdAccel id); + TDECORE_EXPORT TDEShortcut shortcutDefault3(StdAccel id); /** * Returns the hardcoded default 4 modifier shortcut for @p id. * This does not take into account the user's configuration. * @param id the id of the accelerator * @return the default 4 modifier shortcut */ - TDECORE_EXPORT KShortcut shortcutDefault4(StdAccel id); + TDECORE_EXPORT TDEShortcut shortcutDefault4(StdAccel id); /** * Open file. Default: Ctrl-o * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& open(); + TDECORE_EXPORT const TDEShortcut& open(); /** * Create a new document (or whatever). Default: Ctrl-n * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& openNew(); + TDECORE_EXPORT const TDEShortcut& openNew(); /** * Close current document. Default: Ctrl-w * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& close(); + TDECORE_EXPORT const TDEShortcut& close(); /** * Save current document. Default: Ctrl-s * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& save(); + TDECORE_EXPORT const TDEShortcut& save(); /** * Print current document. Default: Ctrl-p * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& print(); + TDECORE_EXPORT const TDEShortcut& print(); /** * Quit the program. Default: Ctrl-q * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& quit(); + TDECORE_EXPORT const TDEShortcut& quit(); /** * Undo last operation. Default: Ctrl-z * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& undo(); + TDECORE_EXPORT const TDEShortcut& undo(); /** * Redo. Default: Shift-Ctrl-z * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& redo(); + TDECORE_EXPORT const TDEShortcut& redo(); /** * Cut selected area and store it in the clipboard. Default: Ctrl-x * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& cut(); + TDECORE_EXPORT const TDEShortcut& cut(); /** * Copy selected area into the clipboard. Default: Ctrl-c * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& copy(); + TDECORE_EXPORT const TDEShortcut& copy(); /** * Paste contents of clipboard at mouse/cursor position. Default: Ctrl-v * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& paste(); + TDECORE_EXPORT const TDEShortcut& paste(); /** * Paste the selection at mouse/cursor position. Default: Ctrl-Shift-Insert * @return the shortcut of the standard accelerator * @since 3.4 */ - TDECORE_EXPORT const KShortcut& pasteSelection(); + TDECORE_EXPORT const TDEShortcut& pasteSelection(); /** * Reload. Default: Ctrl-A * @return the shortcut of the standard accelerator **/ - TDECORE_EXPORT const KShortcut& selectAll(); + TDECORE_EXPORT const TDEShortcut& selectAll(); /** * Delete a word back from mouse/cursor position. Default: Ctrl-Backspace * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& deleteWordBack(); + TDECORE_EXPORT const TDEShortcut& deleteWordBack(); /** * Delete a word forward from mouse/cursor position. Default: Ctrl-Delete * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& deleteWordForward(); + TDECORE_EXPORT const TDEShortcut& deleteWordForward(); /** * Find, search. Default: Ctrl-f * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& find(); + TDECORE_EXPORT const TDEShortcut& find(); /** * Find/search next. Default: F3 * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& findNext(); + TDECORE_EXPORT const TDEShortcut& findNext(); /** * Find/search previous. Default: Shift-F3 * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& findPrev(); + TDECORE_EXPORT const TDEShortcut& findPrev(); /** * Find and replace matches. Default: Ctrl-r * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& replace(); + TDECORE_EXPORT const TDEShortcut& replace(); /** * Zoom in. Default: Ctrl-Plus * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& zoomIn(); + TDECORE_EXPORT const TDEShortcut& zoomIn(); /** * Zoom out. Default: Ctrl-Minus * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& zoomOut(); + TDECORE_EXPORT const TDEShortcut& zoomOut(); /** * Toggle insert/overwrite (with visual feedback, e.g. in the statusbar). Default: Insert * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& insert(); + TDECORE_EXPORT const TDEShortcut& insert(); /** * Goto beginning of the document. Default: Ctrl-Home * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& home(); + TDECORE_EXPORT const TDEShortcut& home(); /** * Goto end of the document. Default: Ctrl-End * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& end(); + TDECORE_EXPORT const TDEShortcut& end(); /** * Goto beginning of current line. Default: Home * @return the shortcut of the standard accelerator * @since 3.3 */ - TDECORE_EXPORT const KShortcut& beginningOfLine(); + TDECORE_EXPORT const TDEShortcut& beginningOfLine(); /** * Goto end of current line. Default: End * @return the shortcut of the standard accelerator * @since 3.3 */ - TDECORE_EXPORT const KShortcut& endOfLine(); + TDECORE_EXPORT const TDEShortcut& endOfLine(); /** * Scroll up one page. Default: Prior * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& prior(); + TDECORE_EXPORT const TDEShortcut& prior(); /** * Scroll down one page. Default: Next * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& next(); + TDECORE_EXPORT const TDEShortcut& next(); /** * Go to line. Default: Ctrl+G * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& gotoLine(); + TDECORE_EXPORT const TDEShortcut& gotoLine(); /** * Add current page to bookmarks. Default: Ctrl+B * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& addBookmark(); + TDECORE_EXPORT const TDEShortcut& addBookmark(); /** * Next Tab. Default: Ctrl-< * @return the shortcut of the standard accelerator * @since 3.2 */ - TDECORE_EXPORT const KShortcut& tabNext(); + TDECORE_EXPORT const TDEShortcut& tabNext(); /** * Previous Tab. Default: Ctrl-> * @return the shortcut of the standard accelerator * @since 3.2 */ - TDECORE_EXPORT const KShortcut& tabPrev(); + TDECORE_EXPORT const TDEShortcut& tabPrev(); /** * Full Screen Mode. Default: Ctrl+Shift+F * @return the shortcut of the standard accelerator * @since 3.2 */ - TDECORE_EXPORT const KShortcut& fullScreen(); + TDECORE_EXPORT const TDEShortcut& fullScreen(); /** * Help the user in the current situation. Default: F1 * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& help(); + TDECORE_EXPORT const TDEShortcut& help(); /** * Complete text in input widgets. Default Ctrl+E * @return the shortcut of the standard accelerator **/ - TDECORE_EXPORT const KShortcut& completion(); + TDECORE_EXPORT const TDEShortcut& completion(); /** * Iterate through a list when completion returns * multiple items. Default: Ctrl+Up * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& prevCompletion(); + TDECORE_EXPORT const TDEShortcut& prevCompletion(); /** * Iterate through a list when completion returns * multiple items. Default: Ctrl+Down * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& nextCompletion(); + TDECORE_EXPORT const TDEShortcut& nextCompletion(); /** * Find a string within another string or list of strings. * Default: Ctrl-T * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& substringCompletion(); + TDECORE_EXPORT const TDEShortcut& substringCompletion(); /** * Help users iterate through a list of entries. Default: Up * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& rotateUp(); + TDECORE_EXPORT const TDEShortcut& rotateUp(); /** * Help users iterate through a list of entries. Default: Down * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& rotateDown(); + TDECORE_EXPORT const TDEShortcut& rotateDown(); /** * popup a context menu. Default: Menu * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& popupMenuContext(); + TDECORE_EXPORT const TDEShortcut& popupMenuContext(); /** * What's This button. Default: Shift+F1 * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& whatsThis(); + TDECORE_EXPORT const TDEShortcut& whatsThis(); /** * Reload. Default: F5 * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& reload(); + TDECORE_EXPORT const TDEShortcut& reload(); /** * Up. Default: Alt+Up * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& up(); + TDECORE_EXPORT const TDEShortcut& up(); /** * Back. Default: Alt+Left * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& back(); + TDECORE_EXPORT const TDEShortcut& back(); /** * Forward. Default: ALT+Right * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& forward(); + TDECORE_EXPORT const TDEShortcut& forward(); /** * BackwardWord. Default: Ctrl+Left * @return the shortcut of the standard accelerator * @since 3.3 */ - TDECORE_EXPORT const KShortcut& backwardWord(); + TDECORE_EXPORT const TDEShortcut& backwardWord(); /** * ForwardWord. Default: Ctrl+Right * @return the shortcut of the standard accelerator * @since 3.3 */ - TDECORE_EXPORT const KShortcut& forwardWord(); + TDECORE_EXPORT const TDEShortcut& forwardWord(); /** * Show Menu Bar. Default: Ctrl-M * @return the shortcut of the standard accelerator */ - TDECORE_EXPORT const KShortcut& showMenubar(); + TDECORE_EXPORT const TDEShortcut& showMenubar(); #if !defined(KDE_NO_COMPAT) && !defined(__KSTDACCEL_CPP_) /** diff --git a/tdecore/tdeconfigdialogmanager.cpp b/tdecore/tdeconfigdialogmanager.cpp index c488e43cb..ab5218687 100644 --- a/tdecore/tdeconfigdialogmanager.cpp +++ b/tdecore/tdeconfigdialogmanager.cpp @@ -95,9 +95,9 @@ void TDEConfigDialogManager::init(bool trackChanges) // KDE changedMap.insert( "KComboBox", TQT_SIGNAL(activated (int))); - changedMap.insert( "KFontCombo", TQT_SIGNAL(activated (int))); - changedMap.insert( "KFontRequester", TQT_SIGNAL(fontSelected(const TQFont &))); - changedMap.insert( "KFontChooser", TQT_SIGNAL(fontSelected(const TQFont &))); + changedMap.insert( "TDEFontCombo", TQT_SIGNAL(activated (int))); + changedMap.insert( "TDEFontRequester", TQT_SIGNAL(fontSelected(const TQFont &))); + changedMap.insert( "TDEFontChooser", TQT_SIGNAL(fontSelected(const TQFont &))); changedMap.insert( "KHistoryCombo", TQT_SIGNAL(activated (int))); changedMap.insert( "KColorButton", TQT_SIGNAL(changed(const TQColor &))); @@ -105,7 +105,7 @@ void TDEConfigDialogManager::init(bool trackChanges) changedMap.insert( "KDateWidget", TQT_SIGNAL(changed (TQDate))); changedMap.insert( "KDateTimeWidget", TQT_SIGNAL(valueChanged (const TQDateTime &))); changedMap.insert( "KEditListBox", TQT_SIGNAL(changed())); - changedMap.insert( "KListBox", TQT_SIGNAL(selectionChanged())); + changedMap.insert( "TDEListBox", TQT_SIGNAL(selectionChanged())); changedMap.insert( "KLineEdit", TQT_SIGNAL(textChanged(const TQString &))); changedMap.insert( "KPasswordEdit", TQT_SIGNAL(textChanged(const TQString &))); changedMap.insert( "KRestrictedLine", TQT_SIGNAL(textChanged(const TQString &))); diff --git a/tdecore/tests/kstdacceltest.cpp b/tdecore/tests/kstdacceltest.cpp index 4540e89d7..a3e2d2473 100644 --- a/tdecore/tests/kstdacceltest.cpp +++ b/tdecore/tests/kstdacceltest.cpp @@ -26,14 +26,14 @@ int main(int argc, char *argv[]) TDEApplication::disableAutoDcopRegistration(); TDEApplication app(argc,argv,"kstdacceltest",false,false); - check( "shortcutDefault FullScreen", KStdAccel::shortcutDefault( KStdAccel::FullScreen ).toString(), "Ctrl+Shift+F" ); - check( "shortcutDefault BeginningOfLine", KStdAccel::shortcutDefault( KStdAccel::BeginningOfLine ).toString(), "Home" ); - check( "shortcutDefault EndOfLine", KStdAccel::shortcutDefault( KStdAccel::EndOfLine ).toString(), "End" ); + check( "shortcutDefault FullScreen", TDEStdAccel::shortcutDefault( TDEStdAccel::FullScreen ).toString(), "Ctrl+Shift+F" ); + check( "shortcutDefault BeginningOfLine", TDEStdAccel::shortcutDefault( TDEStdAccel::BeginningOfLine ).toString(), "Home" ); + check( "shortcutDefault EndOfLine", TDEStdAccel::shortcutDefault( TDEStdAccel::EndOfLine ).toString(), "End" ); - check( "name BeginningOfLine", KStdAccel::name( KStdAccel::BeginningOfLine ), "BeginningOfLine" ); - check( "name EndOfLine", KStdAccel::name( KStdAccel::EndOfLine ), "EndOfLine" ); + check( "name BeginningOfLine", TDEStdAccel::name( TDEStdAccel::BeginningOfLine ), "BeginningOfLine" ); + check( "name EndOfLine", TDEStdAccel::name( TDEStdAccel::EndOfLine ), "EndOfLine" ); - check( "shortcut method", KStdAccel::shortcut( KStdAccel::ZoomIn ).toString(), KStdAccel::zoomIn().toString() ); + check( "shortcut method", TDEStdAccel::shortcut( TDEStdAccel::ZoomIn ).toString(), TDEStdAccel::zoomIn().toString() ); return 0; } diff --git a/tdehtml/ChangeLog b/tdehtml/ChangeLog index cf19f1b06..302c414de 100644 --- a/tdehtml/ChangeLog +++ b/tdehtml/ChangeLog @@ -810,7 +810,7 @@ 2005-04-06 Lubos Lunak <l.lunak@kde.org> - * tdehtmlview.{h,cpp}: Use KActions for type ahead find. + * tdehtmlview.{h,cpp}: Use TDEActions for type ahead find. * tdehtml_part.{h,cpp}: ditto. * tdehtml_part.{h,cpp}: Add Find Previous action. * tdehtml_part.cpp (findTextNext): Fix changing direction while searching text. diff --git a/tdehtml/domtreeview.cpp b/tdehtml/domtreeview.cpp index 5bff83e72..c68eb2007 100644 --- a/tdehtml/domtreeview.cpp +++ b/tdehtml/domtreeview.cpp @@ -19,7 +19,7 @@ #include "domtreeview.moc" #include "xml/dom_nodeimpl.h" -DOMTreeView::DOMTreeView(TQWidget *parent, TDEHTMLPart *currentpart, const char * name) : KListView(parent, name) +DOMTreeView::DOMTreeView(TQWidget *parent, TDEHTMLPart *currentpart, const char * name) : TDEListView(parent, name) { setCaption(name); setRootIsDecorated(true); diff --git a/tdehtml/domtreeview.h b/tdehtml/domtreeview.h index 93baa8f61..a0f5d942a 100644 --- a/tdehtml/domtreeview.h +++ b/tdehtml/domtreeview.h @@ -24,7 +24,7 @@ #include <tqptrdict.h> #include "dom/dom_core.h" -class DOMTreeView : public KListView +class DOMTreeView : public TDEListView { Q_OBJECT public: diff --git a/tdehtml/ecma/kjs_debugwin.cpp b/tdehtml/ecma/kjs_debugwin.cpp index ec794b8d2..ac78526ae 100644 --- a/tdehtml/ecma/kjs_debugwin.cpp +++ b/tdehtml/ecma/kjs_debugwin.cpp @@ -347,7 +347,7 @@ void EvalMultiLineEdit::keyPressEvent(TQKeyEvent * e) } //------------------------------------------------------------------------- KJSDebugWin::KJSDebugWin(TQWidget *parent, const char *name) - : KMainWindow(parent, name, (WFlags)WType_TopLevel), TDEInstance("kjs_debugger") + : TDEMainWindow(parent, name, (WFlags)WType_TopLevel), TDEInstance("kjs_debugger") { m_breakpoints = 0; m_breakpointCount = 0; @@ -436,27 +436,27 @@ KJSDebugWin::KJSDebugWin(TQWidget *parent, const char *name) vl->addWidget(hsplitter); // actions - KPopupMenu *debugMenu = new KPopupMenu(this); + TDEPopupMenu *debugMenu = new TDEPopupMenu(this); menuBar()->insertItem("&Debug",debugMenu); - m_actionCollection = new KActionCollection(this); + m_actionCollection = new TDEActionCollection(this); m_actionCollection->setInstance(this); // Venkman use F12, KDevelop F10 - KShortcut scNext = KShortcut(KKeySequence(KKey(Qt::Key_F12))); + TDEShortcut scNext = TDEShortcut(KKeySequence(KKey(Qt::Key_F12))); scNext.append(KKeySequence(KKey(Qt::Key_F10))); - m_nextAction = new KAction(i18n("Next breakpoint","&Next"),"dbgnext",scNext,TQT_TQOBJECT(this),TQT_SLOT(slotNext()), + m_nextAction = new TDEAction(i18n("Next breakpoint","&Next"),"dbgnext",scNext,TQT_TQOBJECT(this),TQT_SLOT(slotNext()), m_actionCollection,"next"); - m_stepAction = new KAction(i18n("&Step"),"dbgstep",KShortcut(Qt::Key_F11),TQT_TQOBJECT(this),TQT_SLOT(slotStep()), + m_stepAction = new TDEAction(i18n("&Step"),"dbgstep",TDEShortcut(Qt::Key_F11),TQT_TQOBJECT(this),TQT_SLOT(slotStep()), m_actionCollection,"step"); // Venkman use F5, Kdevelop F9 - KShortcut scCont = KShortcut(KKeySequence(KKey(Qt::Key_F5))); + TDEShortcut scCont = TDEShortcut(KKeySequence(KKey(Qt::Key_F5))); scCont.append(KKeySequence(KKey(Qt::Key_F9))); - m_continueAction = new KAction(i18n("&Continue"),"dbgrun",scCont,TQT_TQOBJECT(this),TQT_SLOT(slotContinue()), + m_continueAction = new TDEAction(i18n("&Continue"),"dbgrun",scCont,TQT_TQOBJECT(this),TQT_SLOT(slotContinue()), m_actionCollection,"cont"); - m_stopAction = new KAction(i18n("St&op"),"stop",KShortcut(Qt::Key_F4),TQT_TQOBJECT(this),TQT_SLOT(slotStop()), + m_stopAction = new TDEAction(i18n("St&op"),"stop",TDEShortcut(Qt::Key_F4),TQT_TQOBJECT(this),TQT_SLOT(slotStop()), m_actionCollection,"stop"); - m_breakAction = new KAction(i18n("&Break at Next Statement"),"dbgrunto",KShortcut(Qt::Key_F8),TQT_TQOBJECT(this),TQT_SLOT(slotBreakNext()), + m_breakAction = new TDEAction(i18n("&Break at Next Statement"),"dbgrunto",TDEShortcut(Qt::Key_F8),TQT_TQOBJECT(this),TQT_SLOT(slotBreakNext()), m_actionCollection,"breaknext"); diff --git a/tdehtml/ecma/kjs_debugwin.h b/tdehtml/ecma/kjs_debugwin.h index dc2368ac2..af205d654 100644 --- a/tdehtml/ecma/kjs_debugwin.h +++ b/tdehtml/ecma/kjs_debugwin.h @@ -43,8 +43,8 @@ class TQListBox; class TQComboBox; -class KActionCollection; -class KAction; +class TDEActionCollection; +class TDEAction; namespace KJS { class FunctionImp; @@ -157,7 +157,7 @@ namespace KJS { * * There is only one debug window per program. This can be obtained by calling #instance */ - class KJSDebugWin : public KMainWindow, public Debugger, public TDEInstance + class KJSDebugWin : public TDEMainWindow, public Debugger, public TDEInstance { Q_OBJECT friend class SourceDisplay; @@ -259,17 +259,17 @@ namespace KJS { TQMap<int,SourceFragment*> m_sourceFragments; /* maps SourceId->SourceFragment */ TQPtrList<SourceFile> m_sourceSelFiles; /* maps combobox index->SourceFile */ - KActionCollection *m_actionCollection; + TDEActionCollection *m_actionCollection; TQPixmap m_stopIcon; TQPixmap m_emptyIcon; SourceDisplay *m_sourceDisplay; TQListBox *m_contextList; - KAction *m_stepAction; - KAction *m_nextAction; - KAction *m_continueAction; - KAction *m_stopAction; - KAction *m_breakAction; + TDEAction *m_stepAction; + TDEAction *m_nextAction; + TDEAction *m_continueAction; + TDEAction *m_stopAction; + TDEAction *m_breakAction; TQComboBox *m_sourceSel; EvalMultiLineEdit *m_evalEdit; diff --git a/tdehtml/misc/knsplugininstaller.cpp b/tdehtml/misc/knsplugininstaller.cpp index b953f34fb..3a0146547 100644 --- a/tdehtml/misc/knsplugininstaller.cpp +++ b/tdehtml/misc/knsplugininstaller.cpp @@ -376,7 +376,7 @@ void KNSPluginWizard::initConfirmationPage() m_confirmationVBox = new TQVBox(this); new TQLabel(i18n("The following plugins are available."), m_confirmationVBox); - m_pluginListView = new KListView(m_confirmationVBox); + m_pluginListView = new TDEListView(m_confirmationVBox); m_pluginListView->addColumn(i18n("Name")); m_pluginListView->setSelectionMode(TQListView::Single); new TQLabel(i18n("Click on next to install the selected plugin."), m_confirmationVBox); diff --git a/tdehtml/misc/knsplugininstaller.h b/tdehtml/misc/knsplugininstaller.h index 240202468..f8caedf92 100644 --- a/tdehtml/misc/knsplugininstaller.h +++ b/tdehtml/misc/knsplugininstaller.h @@ -222,7 +222,7 @@ private: TQWidget *m_finishWidget; // plugin list - KListView *m_pluginListView; + TDEListView *m_pluginListView; // licence stuff TQLabel *m_licencePageLabel; diff --git a/tdehtml/rendering/render_form.cpp b/tdehtml/rendering/render_form.cpp index 5c8249b6b..ce6debcbc 100644 --- a/tdehtml/rendering/render_form.cpp +++ b/tdehtml/rendering/render_form.cpp @@ -311,7 +311,7 @@ LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, TDEHTMLView* vi : KLineEdit(parent, "__tdehtml"), m_input(input), m_view(view), m_spell(0) { setMouseTracking(true); - KActionCollection *ac = new KActionCollection(this); + TDEActionCollection *ac = new TDEActionCollection(this); m_spellAction = KStdAction::spelling( TQT_TQOBJECT(this), TQT_SLOT( slotCheckSpelling() ), ac ); } @@ -971,7 +971,7 @@ void RenderSelect::updateFromElement() } if (m_useListBox && oldMultiple != m_multiple) { - static_cast<KListBox*>(m_widget)->setSelectionMode(m_multiple ? TQListBox::Extended : TQListBox::Single); + static_cast<TDEListBox*>(m_widget)->setSelectionMode(m_multiple ? TQListBox::Extended : TQListBox::Single); } m_selectionChanged = true; m_optionsChanged = true; @@ -985,7 +985,7 @@ void RenderSelect::updateFromElement() int listIndex; if(m_useListBox) { - static_cast<KListBox*>(m_widget)->clear(); + static_cast<TDEListBox*>(m_widget)->clear(); } else @@ -999,7 +999,7 @@ void RenderSelect::updateFromElement() if(m_useListBox) { TQListBoxText *item = new TQListBoxText(TQString(text.implementation()->s, text.implementation()->l)); - static_cast<KListBox*>(m_widget) + static_cast<TDEListBox*>(m_widget) ->insertItem(item, listIndex); item->setSelectable(false); } @@ -1022,7 +1022,7 @@ void RenderSelect::updateFromElement() } if(m_useListBox) { - KListBox *l = static_cast<KListBox*>(m_widget); + TDEListBox *l = static_cast<TDEListBox*>(m_widget); l->insertItem(text, listIndex); DOMString disabled = optElem->getAttribute(ATTR_DISABLED); if (!disabled.isNull() && l->item( listIndex )) { @@ -1083,7 +1083,7 @@ void RenderSelect::layout( ) // calculate size if(m_useListBox) { - KListBox* w = static_cast<KListBox*>(m_widget); + TDEListBox* w = static_cast<TDEListBox*>(m_widget); TQListBoxItem* p = w->firstItem(); int width = 0; @@ -1105,7 +1105,7 @@ void RenderSelect::layout( ) // the average of that is IMHO kMin(number of elements, 10) // so I did that ;-) if(size < 1) - size = kMin(static_cast<KListBox*>(m_widget)->count(), 10u); + size = kMin(static_cast<TDEListBox*>(m_widget)->count(), 10u); width += 2*w->frameWidth() + w->verticalScrollBar()->sizeHint().width(); height = size*height + 2*w->frameWidth(); @@ -1208,7 +1208,7 @@ void RenderSelect::slotSelectionChanged() // emitted by the listbox only // again with updateSelection. if ( listItems[i]->id() == ID_OPTION ) static_cast<HTMLOptionElementImpl*>( listItems[i] ) - ->m_selected = static_cast<KListBox*>( m_widget )->isSelected( i ); + ->m_selected = static_cast<TDEListBox*>( m_widget )->isSelected( i ); ref(); element()->onChange(); @@ -1220,9 +1220,9 @@ void RenderSelect::setOptionsChanged(bool _optionsChanged) m_optionsChanged = _optionsChanged; } -KListBox* RenderSelect::createListBox() +TDEListBox* RenderSelect::createListBox() { - KListBox *lb = new KListBox(view()->viewport(), "__tdehtml"); + TDEListBox *lb = new TDEListBox(view()->viewport(), "__tdehtml"); lb->setSelectionMode(m_multiple ? TQListBox::Extended : TQListBox::Single); // ### looks broken //lb->setAutoMask(true); @@ -1247,7 +1247,7 @@ void RenderSelect::updateSelection() int i; if (m_useListBox) { // if multi-select, we select only the new selected index - KListBox *listBox = static_cast<KListBox*>(m_widget); + TDEListBox *listBox = static_cast<TDEListBox*>(m_widget); for (i = 0; i < int(listItems.size()); i++) listBox->setSelected(i,listItems[i]->id() == ID_OPTION && static_cast<HTMLOptionElementImpl*>(listItems[i])->selected()); @@ -1294,7 +1294,7 @@ TextAreaWidget::TextAreaWidget(int wrap, TQWidget* parent) setAutoMask(true); setMouseTracking(true); - KActionCollection *ac = new KActionCollection(this); + TDEActionCollection *ac = new TDEActionCollection(this); m_findAction = KStdAction::find( TQT_TQOBJECT(this), TQT_SLOT( slotFind() ), ac ); m_findNextAction = KStdAction::findNext( TQT_TQOBJECT(this), TQT_SLOT( slotFindNext() ), ac ); m_replaceAction = KStdAction::replace( TQT_TQOBJECT(this), TQT_SLOT( slotReplace() ), ac ); diff --git a/tdehtml/rendering/render_form.h b/tdehtml/rendering/render_form.h index d4508e6bc..7543b9e90 100644 --- a/tdehtml/rendering/render_form.h +++ b/tdehtml/rendering/render_form.h @@ -51,7 +51,7 @@ class KFindDialog; class KReplaceDialog; class KFind; class KReplace; -class KAction; +class TDEAction; class KURLRequester; namespace DOM { @@ -282,7 +282,7 @@ private: DOM::HTMLInputElementImpl* m_input; TDEHTMLView* m_view; KSpell *m_spell; - KAction *m_spellAction; + TDEAction *m_spellAction; }; // ------------------------------------------------------------------------- @@ -399,7 +399,7 @@ public: { return static_cast<DOM::HTMLSelectElementImpl*>(RenderObject::element()); } protected: - KListBox *createListBox(); + TDEListBox *createListBox(); ComboBoxWidget *createComboBox(); unsigned m_size; @@ -440,9 +440,9 @@ private: KFind *m_find; KReplaceDialog *m_repDlg; KReplace *m_replace; - KAction *m_findAction; - KAction *m_findNextAction; - KAction *m_replaceAction; + TDEAction *m_findAction; + TDEAction *m_findNextAction; + TDEAction *m_replaceAction; int m_findIndex, m_findPara; int m_repIndex, m_repPara; }; diff --git a/tdehtml/tdehtml_ext.cpp b/tdehtml/tdehtml_ext.cpp index 62c93079e..72576e91e 100644 --- a/tdehtml/tdehtml_ext.cpp +++ b/tdehtml/tdehtml_ext.cpp @@ -430,7 +430,7 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri if (hasSelection) { - KAction* copyAction = KStdAction::copy( d->m_tdehtml->browserExtension(), TQT_SLOT( copy() ), actionCollection(), "copy" ); + TDEAction* copyAction = KStdAction::copy( d->m_tdehtml->browserExtension(), TQT_SLOT( copy() ), actionCollection(), "copy" ); copyAction->setText(i18n("&Copy Text")); copyAction->setEnabled(d->m_tdehtml->browserExtension()->isActionEnabled( "copy" )); actionCollection()->insert( tdehtml->actionCollection()->action( "selectAll" ) ); @@ -477,7 +477,7 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri } // using .arg(foo, bar) instead of .arg(foo).arg(bar), as foo can contain %x - new KAction( i18n( "Search for '%1' with %2" ).arg( selectedText, name ), icon, 0, d->m_tdehtml->browserExtension(), + new TDEAction( i18n( "Search for '%1' with %2" ).arg( selectedText, name ), icon, 0, d->m_tdehtml->browserExtension(), TQT_SLOT( searchProvider() ), actionCollection(), "searchProvider" ); // favorite search providers @@ -486,7 +486,7 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri favoriteEngines = config.readListEntry("FavoriteSearchEngines", favoriteEngines); if ( !favoriteEngines.isEmpty()) { - KActionMenu* providerList = new KActionMenu( i18n( "Search for '%1' with" ).arg( selectedText ), actionCollection(), "searchProviderList" ); + TDEActionMenu* providerList = new TDEActionMenu( i18n( "Search for '%1' with" ).arg( selectedText ), actionCollection(), "searchProviderList" ); TQStringList::ConstIterator it = favoriteEngines.begin(); for ( ; it != favoriteEngines.end(); ++it ) { @@ -507,7 +507,7 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri icon = TQPixmap( iconPath ); name = service->name(); - providerList->insert( new KAction( name, icon, 0, d->m_tdehtml->browserExtension(), + providerList->insert( new TDEAction( name, icon, 0, d->m_tdehtml->browserExtension(), TQT_SLOT( searchProvider() ), actionCollection(), TQString( "searchProvider" + searchProviderPrefix ).latin1() ) ); } } @@ -515,14 +515,14 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri if ( selectedText.contains("://") && KURL(selectedText).isValid() ) - new KAction( i18n( "Open '%1'" ).arg( selectedText ), "window_new", 0, + new TDEAction( i18n( "Open '%1'" ).arg( selectedText ), "window_new", 0, d->m_tdehtml->browserExtension(), TQT_SLOT( openSelection() ), actionCollection(), "openSelection" ); } else if ( url.isEmpty() && !isImage ) { actionCollection()->insert( tdehtml->actionCollection()->action( "security" ) ); actionCollection()->insert( tdehtml->actionCollection()->action( "setEncoding" ) ); - new KAction( i18n( "Stop Animations" ), 0, this, TQT_SLOT( slotStopAnimations() ), + new TDEAction( i18n( "Stop Animations" ), 0, this, TQT_SLOT( slotStopAnimations() ), actionCollection(), "stopanimations" ); } @@ -530,14 +530,14 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri { if (url.protocol() == "mailto") { - new KAction( i18n( "Copy Email Address" ), 0, this, TQT_SLOT( slotCopyLinkLocation() ), + new TDEAction( i18n( "Copy Email Address" ), 0, this, TQT_SLOT( slotCopyLinkLocation() ), actionCollection(), "copylinklocation" ); } else { - new KAction( i18n( "&Save Link As..." ), 0, this, TQT_SLOT( slotSaveLinkAs() ), + new TDEAction( i18n( "&Save Link As..." ), 0, this, TQT_SLOT( slotSaveLinkAs() ), actionCollection(), "savelinkas" ); - new KAction( i18n( "Copy &Link Address" ), 0, this, TQT_SLOT( slotCopyLinkLocation() ), + new TDEAction( i18n( "Copy &Link Address" ), 0, this, TQT_SLOT( slotCopyLinkLocation() ), actionCollection(), "copylinklocation" ); } } @@ -547,28 +547,28 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri { if ( tdehtml->parentPart() ) { - new KAction( i18n( "Open in New &Window" ), "window_new", 0, this, TQT_SLOT( slotFrameInWindow() ), + new TDEAction( i18n( "Open in New &Window" ), "window_new", 0, this, TQT_SLOT( slotFrameInWindow() ), actionCollection(), "frameinwindow" ); - new KAction( i18n( "Open in &This Window" ), 0, this, TQT_SLOT( slotFrameInTop() ), + new TDEAction( i18n( "Open in &This Window" ), 0, this, TQT_SLOT( slotFrameInTop() ), actionCollection(), "frameintop" ); - new KAction( i18n( "Open in &New Tab" ), "tab_new", 0, this, TQT_SLOT( slotFrameInTab() ), + new TDEAction( i18n( "Open in &New Tab" ), "tab_new", 0, this, TQT_SLOT( slotFrameInTab() ), actionCollection(), "frameintab" ); - new KAction( i18n( "Reload Frame" ), 0, this, TQT_SLOT( slotReloadFrame() ), + new TDEAction( i18n( "Reload Frame" ), 0, this, TQT_SLOT( slotReloadFrame() ), actionCollection(), "reloadframe" ); if ( TDEHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled() ) { if ( tdehtml->d->m_frame->m_type == tdehtml::ChildFrame::IFrame ) - new KAction( i18n( "Block IFrame..." ), 0, this, TQT_SLOT( slotBlockIFrame() ), actionCollection(), "blockiframe" ); + new TDEAction( i18n( "Block IFrame..." ), 0, this, TQT_SLOT( slotBlockIFrame() ), actionCollection(), "blockiframe" ); } - new KAction( i18n( "View Frame Source" ), 0, d->m_tdehtml, TQT_SLOT( slotViewDocumentSource() ), + new TDEAction( i18n( "View Frame Source" ), 0, d->m_tdehtml, TQT_SLOT( slotViewDocumentSource() ), actionCollection(), "viewFrameSource" ); - new KAction( i18n( "View Frame Information" ), 0, d->m_tdehtml, TQT_SLOT( slotViewPageInfo() ), actionCollection(), "viewFrameInfo" ); + new TDEAction( i18n( "View Frame Information" ), 0, d->m_tdehtml, TQT_SLOT( slotViewPageInfo() ), actionCollection(), "viewFrameInfo" ); // This one isn't in tdehtml_popupmenu.rc anymore, because Print isn't either, // and because print frame is already in the toolbar and the menu. // But leave this here, so that it's easy to read it. - new KAction( i18n( "Print Frame..." ), "frameprint", 0, d->m_tdehtml->browserExtension(), TQT_SLOT( print() ), actionCollection(), "printFrame" ); - new KAction( i18n( "Save &Frame As..." ), 0, d->m_tdehtml, TQT_SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" ); + new TDEAction( i18n( "Print Frame..." ), "frameprint", 0, d->m_tdehtml->browserExtension(), TQT_SLOT( print() ), actionCollection(), "printFrame" ); + new TDEAction( i18n( "Save &Frame As..." ), 0, d->m_tdehtml, TQT_SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" ); actionCollection()->insert( tdehtml->parentPart()->actionCollection()->action( "viewDocumentSource" ) ); actionCollection()->insert( tdehtml->parentPart()->actionCollection()->action( "viewPageInfo" ) ); @@ -579,7 +579,7 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri } else if (isImage || !url.isEmpty()) { actionCollection()->insert( tdehtml->actionCollection()->action( "viewDocumentSource" ) ); actionCollection()->insert( tdehtml->actionCollection()->action( "viewPageInfo" ) ); - new KAction( i18n( "Stop Animations" ), 0, this, TQT_SLOT( slotStopAnimations() ), + new TDEAction( i18n( "Stop Animations" ), 0, this, TQT_SLOT( slotStopAnimations() ), actionCollection(), "stopanimations" ); } @@ -598,35 +598,35 @@ TDEHTMLPopupGUIClient::TDEHTMLPopupGUIClient( TDEHTMLPart *tdehtml, const TQStri } else d->m_imageURL = KURL( static_cast<DOM::HTMLInputElement>( e ).src().string() ); - new KAction( i18n( "Save Image As..." ), 0, this, TQT_SLOT( slotSaveImageAs() ), + new TDEAction( i18n( "Save Image As..." ), 0, this, TQT_SLOT( slotSaveImageAs() ), actionCollection(), "saveimageas" ); - new KAction( i18n( "Send Image..." ), 0, this, TQT_SLOT( slotSendImage() ), + new TDEAction( i18n( "Send Image..." ), 0, this, TQT_SLOT( slotSendImage() ), actionCollection(), "sendimage" ); #ifndef QT_NO_MIMECLIPBOARD - (new KAction( i18n( "Copy Image" ), 0, this, TQT_SLOT( slotCopyImage() ), + (new TDEAction( i18n( "Copy Image" ), 0, this, TQT_SLOT( slotCopyImage() ), actionCollection(), "copyimage" ))->setEnabled(!d->m_pixmap.isNull()); #endif if(d->m_pixmap.isNull()) { //fallback to image location if still loading the image. this will always be true if ifdef QT_NO_MIMECLIPBOARD - new KAction( i18n( "Copy Image Location" ), 0, this, TQT_SLOT( slotCopyImageLocation() ), + new TDEAction( i18n( "Copy Image Location" ), 0, this, TQT_SLOT( slotCopyImageLocation() ), actionCollection(), "copyimagelocation" ); } TQString name = KStringHandler::csqueeze(d->m_imageURL.fileName()+d->m_imageURL.query(), 25); - new KAction( i18n( "View Image (%1)" ).arg(d->m_suggestedFilename.isEmpty() ? name.replace("&", "&&") : d->m_suggestedFilename.replace("&", "&&")), 0, this, TQT_SLOT( slotViewImage() ), + new TDEAction( i18n( "View Image (%1)" ).arg(d->m_suggestedFilename.isEmpty() ? name.replace("&", "&&") : d->m_suggestedFilename.replace("&", "&&")), 0, this, TQT_SLOT( slotViewImage() ), actionCollection(), "viewimage" ); if (TDEHTMLFactory::defaultHTMLSettings()->isAdFilterEnabled()) { - new KAction( i18n( "Block Image..." ), 0, this, TQT_SLOT( slotBlockImage() ), + new TDEAction( i18n( "Block Image..." ), 0, this, TQT_SLOT( slotBlockImage() ), actionCollection(), "blockimage" ); if (!d->m_imageURL.host().isEmpty() && !d->m_imageURL.protocol().isEmpty()) { - new KAction( i18n( "Block Images From %1" ).arg(d->m_imageURL.host()), 0, this, TQT_SLOT( slotBlockHost() ), + new TDEAction( i18n( "Block Images From %1" ).arg(d->m_imageURL.host()), 0, this, TQT_SLOT( slotBlockHost() ), actionCollection(), "blockhost" ); } } @@ -962,13 +962,13 @@ extern const int KDE_NO_EXPORT fastZoomSizeCount; // BCI: remove in KDE 4 TDEHTMLZoomFactorAction::TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) - : KAction( text, icon, 0, receiver, slot, parent, name ) + : TDEAction( text, icon, 0, receiver, slot, parent, name ) { init(part, direction); } -TDEHTMLZoomFactorAction::TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const KShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) - : KAction( text, icon, cut, receiver, slot, parent, name ) +TDEHTMLZoomFactorAction::TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) + : TDEAction( text, icon, cut, receiver, slot, parent, name ) { init(part, direction); } @@ -1006,11 +1006,11 @@ TDEHTMLZoomFactorAction::~TDEHTMLZoomFactorAction() int TDEHTMLZoomFactorAction::plug( TQWidget *w, int index ) { - int containerId = KAction::plug( w, index ); - if ( containerId == -1 || !w->inherits( "KToolBar" ) ) + int containerId = TDEAction::plug( w, index ); + if ( containerId == -1 || !w->inherits( "TDEToolBar" ) ) return containerId; - KToolBarButton *button = static_cast<KToolBar *>( w )->getButton( itemId( containerId ) ); + TDEToolBarButton *button = static_cast<TDEToolBar *>( w )->getButton( itemId( containerId ) ); if ( !button ) return containerId; diff --git a/tdehtml/tdehtml_ext.h b/tdehtml/tdehtml_ext.h index c6db763b9..165cedb0e 100644 --- a/tdehtml/tdehtml_ext.h +++ b/tdehtml/tdehtml_ext.h @@ -149,14 +149,14 @@ private: TDEHTMLPopupGUIClientPrivate *d; }; -class TDEHTMLZoomFactorAction : public KAction +class TDEHTMLZoomFactorAction : public TDEAction { Q_OBJECT public: //BCI: remove in KDE 4 TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, const TQString &icon, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ); TDEHTMLZoomFactorAction( TDEHTMLPart *part, bool direction, const TQString &text, - const TQString &icon, const KShortcut& cut, const TQObject *receiver, + const TQString &icon, const TDEShortcut& cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name ); virtual ~TDEHTMLZoomFactorAction(); @@ -165,7 +165,7 @@ public: private slots: void slotActivated( int ); protected slots: - void slotActivated() { KAction::slotActivated(); } + void slotActivated() { TDEAction::slotActivated(); } private: void init(TDEHTMLPart *part, bool direction); private: diff --git a/tdehtml/tdehtml_part.cpp b/tdehtml/tdehtml_part.cpp index 059763c6a..caa55ae61 100644 --- a/tdehtml/tdehtml_part.cpp +++ b/tdehtml/tdehtml_part.cpp @@ -252,29 +252,29 @@ void TDEHTMLPart::init( TDEHTMLView *view, GUIProfile prof ) d->m_bMousePressed = false; d->m_bRightMousePressed = false; d->m_bCleared = false; - d->m_paViewDocument = new KAction( i18n( "View Do&cument Source" ), CTRL + Key_U, this, TQT_SLOT( slotViewDocumentSource() ), actionCollection(), "viewDocumentSource" ); - d->m_paViewFrame = new KAction( i18n( "View Frame Source" ), 0, this, TQT_SLOT( slotViewFrameSource() ), actionCollection(), "viewFrameSource" ); - d->m_paViewInfo = new KAction( i18n( "View Document Information" ), CTRL+Key_I, this, TQT_SLOT( slotViewPageInfo() ), actionCollection(), "viewPageInfo" ); - d->m_paSaveBackground = new KAction( i18n( "Save &Background Image As..." ), 0, this, TQT_SLOT( slotSaveBackground() ), actionCollection(), "saveBackground" ); + d->m_paViewDocument = new TDEAction( i18n( "View Do&cument Source" ), CTRL + Key_U, this, TQT_SLOT( slotViewDocumentSource() ), actionCollection(), "viewDocumentSource" ); + d->m_paViewFrame = new TDEAction( i18n( "View Frame Source" ), 0, this, TQT_SLOT( slotViewFrameSource() ), actionCollection(), "viewFrameSource" ); + d->m_paViewInfo = new TDEAction( i18n( "View Document Information" ), CTRL+Key_I, this, TQT_SLOT( slotViewPageInfo() ), actionCollection(), "viewPageInfo" ); + d->m_paSaveBackground = new TDEAction( i18n( "Save &Background Image As..." ), 0, this, TQT_SLOT( slotSaveBackground() ), actionCollection(), "saveBackground" ); d->m_paSaveDocument = KStdAction::saveAs( this, TQT_SLOT( slotSaveDocument() ), actionCollection(), "saveDocument" ); if ( parentPart() ) - d->m_paSaveDocument->setShortcut( KShortcut() ); // avoid clashes - d->m_paSaveFrame = new KAction( i18n( "Save &Frame As..." ), 0, this, TQT_SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" ); - d->m_paSecurity = new KAction( i18n( "Security..." ), "decrypted", 0, this, TQT_SLOT( slotSecurity() ), actionCollection(), "security" ); + d->m_paSaveDocument->setShortcut( TDEShortcut() ); // avoid clashes + d->m_paSaveFrame = new TDEAction( i18n( "Save &Frame As..." ), 0, this, TQT_SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" ); + d->m_paSecurity = new TDEAction( i18n( "Security..." ), "decrypted", 0, this, TQT_SLOT( slotSecurity() ), actionCollection(), "security" ); d->m_paSecurity->setWhatsThis( i18n( "Security Settings<p>" "Shows the certificate of the displayed page. Only " "pages that have been transmitted using a secure, encrypted connection have a " "certificate.<p> " "Hint: If the image shows a closed lock, the page has been transmitted over a " "secure connection.") ); - d->m_paDebugRenderTree = new KAction( i18n( "Print Rendering Tree to STDOUT" ), ALT + CTRL + SHIFT + Key_A, this, TQT_SLOT( slotDebugRenderTree() ), actionCollection(), "debugRenderTree" ); - d->m_paDebugDOMTree = new KAction( i18n( "Print DOM Tree to STDOUT" ), ALT + CTRL + SHIFT + Key_D, this, TQT_SLOT( slotDebugDOMTree() ), actionCollection(), "debugDOMTree" ); - d->m_paStopAnimations = new KAction( i18n( "Stop Animated Images" ), 0, this, TQT_SLOT( slotStopAnimations() ), actionCollection(), "stopAnimations" ); + d->m_paDebugRenderTree = new TDEAction( i18n( "Print Rendering Tree to STDOUT" ), ALT + CTRL + SHIFT + Key_A, this, TQT_SLOT( slotDebugRenderTree() ), actionCollection(), "debugRenderTree" ); + d->m_paDebugDOMTree = new TDEAction( i18n( "Print DOM Tree to STDOUT" ), ALT + CTRL + SHIFT + Key_D, this, TQT_SLOT( slotDebugDOMTree() ), actionCollection(), "debugDOMTree" ); + d->m_paStopAnimations = new TDEAction( i18n( "Stop Animated Images" ), 0, this, TQT_SLOT( slotStopAnimations() ), actionCollection(), "stopAnimations" ); - d->m_paSetEncoding = new KActionMenu( i18n( "Set &Encoding" ), "charset", actionCollection(), "setEncoding" ); + d->m_paSetEncoding = new TDEActionMenu( i18n( "Set &Encoding" ), "charset", actionCollection(), "setEncoding" ); d->m_paSetEncoding->setDelayed( false ); - d->m_automaticDetection = new KPopupMenu( 0L ); + d->m_automaticDetection = new TDEPopupMenu( 0L ); d->m_automaticDetection->insertItem( i18n( "Semi-Automatic" ), 0 ); d->m_automaticDetection->insertItem( i18n( "Arabic" ), 1 ); @@ -296,10 +296,10 @@ void TDEHTMLPart::init( TDEHTMLView *view, GUIProfile prof ) d->m_paSetEncoding->popupMenu()->insertItem( i18n( "Automatic Detection" ), d->m_automaticDetection, 0 ); - d->m_paSetEncoding->insert( new KActionSeparator( actionCollection() ) ); + d->m_paSetEncoding->insert( new TDEActionSeparator( actionCollection() ) ); - d->m_manualDetection = new KSelectAction( i18n( "short for Manual Detection", "Manual" ), 0, this, TQT_SLOT( slotSetEncoding() ), actionCollection(), "manualDetection" ); + d->m_manualDetection = new TDESelectAction( i18n( "short for Manual Detection", "Manual" ), 0, this, TQT_SLOT( slotSetEncoding() ), actionCollection(), "manualDetection" ); TQStringList encodings = TDEGlobal::charsets()->descriptiveEncodingNames(); d->m_manualDetection->setItems( encodings ); d->m_manualDetection->setCurrentItem( -1 ); @@ -354,7 +354,7 @@ void TDEHTMLPart::init( TDEHTMLView *view, GUIProfile prof ) } - d->m_paUseStylesheet = new KSelectAction( i18n( "Use S&tylesheet"), 0, this, TQT_SLOT( slotUseStylesheet() ), actionCollection(), "useStylesheet" ); + d->m_paUseStylesheet = new TDESelectAction( i18n( "Use S&tylesheet"), 0, this, TQT_SLOT( slotUseStylesheet() ), actionCollection(), "useStylesheet" ); if ( prof == BrowserViewGUI ) { d->m_paIncZoomFactor = new TDEHTMLZoomFactorAction( this, true, i18n( @@ -385,37 +385,37 @@ void TDEHTMLPart::init( TDEHTMLView *view, GUIProfile prof ) "Find the previous occurrence of the text that you " "have found using the <b>Find Text</b> function" ) ); - d->m_paFindAheadText = new KAction( i18n("Find Text as You Type"), KShortcut( '/' ), this, TQT_SLOT( slotFindAheadText()), + d->m_paFindAheadText = new TDEAction( i18n("Find Text as You Type"), TDEShortcut( '/' ), this, TQT_SLOT( slotFindAheadText()), actionCollection(), "findAheadText"); - d->m_paFindAheadLinks = new KAction( i18n("Find Links as You Type"), KShortcut( '\'' ), this, TQT_SLOT( slotFindAheadLink()), + d->m_paFindAheadLinks = new TDEAction( i18n("Find Links as You Type"), TDEShortcut( '\'' ), this, TQT_SLOT( slotFindAheadLink()), actionCollection(), "findAheadLink"); d->m_paFindAheadText->setEnabled( false ); d->m_paFindAheadLinks->setEnabled( false ); if ( parentPart() ) { - d->m_paFind->setShortcut( KShortcut() ); // avoid clashes - d->m_paFindNext->setShortcut( KShortcut() ); // avoid clashes - d->m_paFindPrev->setShortcut( KShortcut() ); // avoid clashes - d->m_paFindAheadText->setShortcut( KShortcut()); - d->m_paFindAheadLinks->setShortcut( KShortcut()); + d->m_paFind->setShortcut( TDEShortcut() ); // avoid clashes + d->m_paFindNext->setShortcut( TDEShortcut() ); // avoid clashes + d->m_paFindPrev->setShortcut( TDEShortcut() ); // avoid clashes + d->m_paFindAheadText->setShortcut( TDEShortcut()); + d->m_paFindAheadLinks->setShortcut( TDEShortcut()); } - d->m_paPrintFrame = new KAction( i18n( "Print Frame..." ), "frameprint", 0, this, TQT_SLOT( slotPrintFrame() ), actionCollection(), "printFrame" ); + d->m_paPrintFrame = new TDEAction( i18n( "Print Frame..." ), "frameprint", 0, this, TQT_SLOT( slotPrintFrame() ), actionCollection(), "printFrame" ); d->m_paPrintFrame->setWhatsThis( i18n( "Print Frame<p>" "Some pages have several frames. To print only a single frame, click " "on it and then use this function." ) ); d->m_paSelectAll = KStdAction::selectAll( this, TQT_SLOT( slotSelectAll() ), actionCollection(), "selectAll" ); if ( parentPart() ) - d->m_paSelectAll->setShortcut( KShortcut() ); // avoid clashes + d->m_paSelectAll->setShortcut( TDEShortcut() ); // avoid clashes - d->m_paToggleCaretMode = new KToggleAction(i18n("Toggle Caret Mode"), + d->m_paToggleCaretMode = new TDEToggleAction(i18n("Toggle Caret Mode"), Key_F7, this, TQT_SLOT(slotToggleCaretMode()), actionCollection(), "caretMode"); d->m_paToggleCaretMode->setChecked(isCaretMode()); if (parentPart()) - d->m_paToggleCaretMode->setShortcut(KShortcut()); // avoid clashes + d->m_paToggleCaretMode->setShortcut(TDEShortcut()); // avoid clashes // set the default java(script) flags according to the current host. d->m_bOpenMiddleClick = d->m_settings->isOpenMiddleClickEnabled(); @@ -1119,7 +1119,7 @@ void TDEHTMLPart::disableJSErrorExtension() { } void TDEHTMLPart::jsErrorDialogContextMenu() { - KPopupMenu *m = new KPopupMenu(0L); + TDEPopupMenu *m = new TDEPopupMenu(0L); m->insertItem(i18n("&Hide Errors"), this, TQT_SLOT(removeJSErrorExtension())); m->insertItem(i18n("&Disable Error Reporting"), this, TQT_SLOT(disableJSErrorExtension())); m->popup(TQCursor::pos()); @@ -1348,10 +1348,10 @@ void TDEHTMLPart::setAutoloadImages( bool enable ) d->m_paLoadImages = 0; } else if ( !d->m_paLoadImages ) - d->m_paLoadImages = new KAction( i18n( "Display Images on Page" ), "images_display", 0, this, TQT_SLOT( slotLoadImages() ), actionCollection(), "loadImages" ); + d->m_paLoadImages = new TDEAction( i18n( "Display Images on Page" ), "images_display", 0, this, TQT_SLOT( slotLoadImages() ), actionCollection(), "loadImages" ); if ( d->m_paLoadImages ) { - TQPtrList<KAction> lst; + TQPtrList<TDEAction> lst; lst.append( d->m_paLoadImages ); plugActionList( "loadImages", lst ); } @@ -6637,7 +6637,7 @@ void TDEHTMLPart::guiActivateEvent( KParts::GUIActivateEvent *event ) if ( !d->m_settings->autoLoadImages() && d->m_paLoadImages ) { - TQPtrList<KAction> lst; + TQPtrList<TDEAction> lst; lst.append( d->m_paLoadImages ); plugActionList( "loadImages", lst ); } @@ -7311,7 +7311,7 @@ void TDEHTMLPart::launchWalletManager() void TDEHTMLPart::walletMenu() { #ifndef TDEHTML_NO_WALLET - KPopupMenu *m = new KPopupMenu(0L); + TDEPopupMenu *m = new TDEPopupMenu(0L); m->insertItem(i18n("&Close Wallet"), this, TQT_SLOT(slotWalletClosed())); m->popup(TQCursor::pos()); #endif // TDEHTML_NO_WALLET @@ -7355,10 +7355,10 @@ void TDEHTMLPart::setDebugScript( bool enable ) unplugActionList( "debugScriptList" ); if ( enable ) { if (!d->m_paDebugScript) { - d->m_paDebugScript = new KAction( i18n( "JavaScript &Debugger" ), 0, this, TQT_SLOT( slotDebugScript() ), actionCollection(), "debugScript" ); + d->m_paDebugScript = new TDEAction( i18n( "JavaScript &Debugger" ), 0, this, TQT_SLOT( slotDebugScript() ), actionCollection(), "debugScript" ); } d->m_paDebugScript->setEnabled( d->m_frame ? d->m_frame->m_jscript : 0L ); - TQPtrList<KAction> lst; + TQPtrList<TDEAction> lst; lst.append( d->m_paDebugScript ); plugActionList( "debugScriptList", lst ); } @@ -7407,7 +7407,7 @@ void TDEHTMLPart::setSuppressedPopupIndicator( bool enable, TDEHTMLPart *originP } void TDEHTMLPart::suppressedPopupMenu() { - KPopupMenu *m = new KPopupMenu(0L); + TDEPopupMenu *m = new TDEPopupMenu(0L); m->setCheckable(true); if ( d->m_openableSuppressedPopups ) m->insertItem(i18n("&Show Blocked Popup Window","Show %n Blocked Popup Windows", d->m_openableSuppressedPopups), this, TQT_SLOT(showSuppressedPopups())); diff --git a/tdehtml/tdehtmlimage.cpp b/tdehtml/tdehtmlimage.cpp index 021f95149..bf05d8495 100644 --- a/tdehtml/tdehtmlimage.cpp +++ b/tdehtml/tdehtmlimage.cpp @@ -80,20 +80,20 @@ TDEHTMLImage::TDEHTMLImage( TQWidget *parentWidget, const char *widgetName, m_ext = new TDEHTMLImageBrowserExtension( this, "be" ); // Remove unnecessary actions. - KAction *encodingAction = actionCollection()->action( "setEncoding" ); + TDEAction *encodingAction = actionCollection()->action( "setEncoding" ); if ( encodingAction ) { encodingAction->unplugAll(); delete encodingAction; } - KAction *viewSourceAction= actionCollection()->action( "viewDocumentSource" ); + TDEAction *viewSourceAction= actionCollection()->action( "viewDocumentSource" ); if ( viewSourceAction ) { viewSourceAction->unplugAll(); delete viewSourceAction; } - KAction *selectAllAction= actionCollection()->action( "selectAll" ); + TDEAction *selectAllAction= actionCollection()->action( "selectAll" ); if ( selectAllAction ) { selectAllAction->unplugAll(); diff --git a/tdehtml/tdehtmlpart_p.h b/tdehtml/tdehtmlpart_p.h index c1e641cb9..149483493 100644 --- a/tdehtml/tdehtmlpart_p.h +++ b/tdehtml/tdehtmlpart_p.h @@ -54,8 +54,8 @@ class KFind; class KFindDialog; -class KPopupMenu; -class KSelectAction; +class TDEPopupMenu; +class TDESelectAction; class KURLLabel; class KJavaAppletContext; class KJSErrorDlg; @@ -393,30 +393,30 @@ public: int m_delayRedirect; TQString m_redirectURL; - KAction *m_paViewDocument; - KAction *m_paViewFrame; - KAction *m_paViewInfo; - KAction *m_paSaveBackground; - KAction *m_paSaveDocument; - KAction *m_paSaveFrame; - KAction *m_paSecurity; - KActionMenu *m_paSetEncoding; - KSelectAction *m_paUseStylesheet; + TDEAction *m_paViewDocument; + TDEAction *m_paViewFrame; + TDEAction *m_paViewInfo; + TDEAction *m_paSaveBackground; + TDEAction *m_paSaveDocument; + TDEAction *m_paSaveFrame; + TDEAction *m_paSecurity; + TDEActionMenu *m_paSetEncoding; + TDESelectAction *m_paUseStylesheet; TDEHTMLZoomFactorAction *m_paIncZoomFactor; TDEHTMLZoomFactorAction *m_paDecZoomFactor; - KAction *m_paLoadImages; - KAction *m_paFind; - KAction *m_paFindNext; - KAction *m_paFindPrev; - KAction *m_paFindAheadText; - KAction *m_paFindAheadLinks; - KAction *m_paPrintFrame; - KAction *m_paSelectAll; - KAction *m_paDebugScript; - KAction *m_paDebugDOMTree; - KAction *m_paDebugRenderTree; - KAction *m_paStopAnimations; - KToggleAction *m_paToggleCaretMode; + TDEAction *m_paLoadImages; + TDEAction *m_paFind; + TDEAction *m_paFindNext; + TDEAction *m_paFindPrev; + TDEAction *m_paFindAheadText; + TDEAction *m_paFindAheadLinks; + TDEAction *m_paPrintFrame; + TDEAction *m_paSelectAll; + TDEAction *m_paDebugScript; + TDEAction *m_paDebugDOMTree; + TDEAction *m_paDebugRenderTree; + TDEAction *m_paStopAnimations; + TDEToggleAction *m_paToggleCaretMode; KParts::PartManager *m_manager; @@ -548,8 +548,8 @@ public: bool m_newJSInterpreterExists; // set to 1 by setOpenedByJS, for window.open tdehtml::Decoder::AutoDetectLanguage m_autoDetectLanguage; - KPopupMenu *m_automaticDetection; - KSelectAction *m_manualDetection; + TDEPopupMenu *m_automaticDetection; + TDESelectAction *m_manualDetection; void setFlagRecursively(bool TDEHTMLPartPrivate::*flag, bool value); /** returns the caret node */ diff --git a/tdehtml/test_regression.cpp b/tdehtml/test_regression.cpp index d05591f48..88a662eb6 100644 --- a/tdehtml/test_regression.cpp +++ b/tdehtml/test_regression.cpp @@ -558,7 +558,7 @@ int main(int argc, char *argv[]) // create widgets TDEHTMLFactory *fac = new TDEHTMLFactory(); - KMainWindow *toplevel = new KMainWindow(); + TDEMainWindow *toplevel = new TDEMainWindow(); TDEHTMLPart *part = new TDEHTMLPart( toplevel, 0, toplevel, 0, TDEHTMLPart::BrowserViewGUI ); toplevel->setCentralWidget( part->widget() ); diff --git a/tdehtml/testtdehtml.cpp b/tdehtml/testtdehtml.cpp index 001780dc2..e9d1cd4e1 100644 --- a/tdehtml/testtdehtml.cpp +++ b/tdehtml/testtdehtml.cpp @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) TDEHTMLFactory *fac = new TDEHTMLFactory(true); #endif - KMainWindow *toplevel = new KMainWindow(); + TDEMainWindow *toplevel = new TDEMainWindow(); TDEHTMLPart *doc = new TDEHTMLPart( toplevel, 0, toplevel, 0, TDEHTMLPart::BrowserViewGUI ); Dummy *dummy = new Dummy( doc ); @@ -105,14 +105,14 @@ int main(int argc, char *argv[]) e.setAttribute( "name", "print" ); toolBar.insertBefore( e, toolBar.firstChild() ); - (void)new KAction( "Reload", "reload", Qt::Key_F5, dummy, TQT_SLOT( reload() ), doc->actionCollection(), "reload" ); - (void)new KAction( "Benchmark...", 0, 0, dummy, TQT_SLOT( doBenchmark() ), doc->actionCollection(), "debugDoBenchmark" ); - KAction* kprint = new KAction( "Print", "print", 0, doc->browserExtension(), TQT_SLOT( print() ), doc->actionCollection(), "print" ); + (void)new TDEAction( "Reload", "reload", Qt::Key_F5, dummy, TQT_SLOT( reload() ), doc->actionCollection(), "reload" ); + (void)new TDEAction( "Benchmark...", 0, 0, dummy, TQT_SLOT( doBenchmark() ), doc->actionCollection(), "debugDoBenchmark" ); + TDEAction* kprint = new TDEAction( "Print", "print", 0, doc->browserExtension(), TQT_SLOT( print() ), doc->actionCollection(), "print" ); kprint->setEnabled(true); - KToggleAction *ta = new KToggleAction( "Navigable", "editclear", 0, doc->actionCollection(), "navigable" ); + TDEToggleAction *ta = new TDEToggleAction( "Navigable", "editclear", 0, doc->actionCollection(), "navigable" ); ta->setChecked(doc->isCaretMode()); TQWidget::connect(ta, TQT_SIGNAL(toggled(bool)), dummy, TQT_SLOT( toggleNavigable(bool) )); - ta = new KToggleAction( "Editable", "edit", 0, doc->actionCollection(), "editable" ); + ta = new TDEToggleAction( "Editable", "edit", 0, doc->actionCollection(), "editable" ); ta->setChecked(doc->isEditable()); TQWidget::connect(ta, TQT_SIGNAL(toggled(bool)), dummy, TQT_SLOT( toggleEditable(bool) )); toplevel->guiFactory()->addClient( doc ); diff --git a/tdeio/Mainpage.dox b/tdeio/Mainpage.dox index 2de4b3157..464faf7a6 100644 --- a/tdeio/Mainpage.dox +++ b/tdeio/Mainpage.dox @@ -39,7 +39,7 @@ * its building blocks and some other widgets, making use of the file dialog. * * The file dialog provides different views; there is a vertically scrolling - * view based on KListView, showing things like filename, file size, + * view based on TDEListView, showing things like filename, file size, * permissions etc. in separate columns. And there is a horizontally scrolling * view based on KIconView. Additionally, there are some compound views, * like a view using the icon-view for files on the right side and another @@ -55,7 +55,7 @@ * to them is KDirOperator. It allows the user to switch between different * views. * - * KFileTreeView is a KListView based widget that displays files and/or + * KFileTreeView is a TDEListView based widget that displays files and/or * directories as a tree. It does not implement the KFileView interface, * however, so it can't be used with KDirOperator. * @@ -100,7 +100,7 @@ * The KFileView based on KIconView. * * KFileDetailView: - * The KFileView based on KListView. + * The KFileView based on TDEListView. * * KFilePreview: * The KFileView, combining a widget showing preview for a selected file diff --git a/tdeio/bookmarks/kbookmarkbar.cc b/tdeio/bookmarks/kbookmarkbar.cc index e73801808..b1ebb94fa 100644 --- a/tdeio/bookmarks/kbookmarkbar.cc +++ b/tdeio/bookmarks/kbookmarkbar.cc @@ -45,10 +45,10 @@ class KBookmarkBarPrivate : public dPtrTemplate<KBookmarkBar, KBookmarkBarPrivate> { public: - TQPtrList<KAction> m_actions; + TQPtrList<TDEAction> m_actions; bool m_readOnly; KBookmarkManager* m_filteredMgr; - KToolBar* m_sepToolBar; + TDEToolBar* m_sepToolBar; int m_sepIndex; bool m_atFirst; TQString m_dropAddress; @@ -85,8 +85,8 @@ private: }; KBookmarkBar::KBookmarkBar( KBookmarkManager* mgr, - KBookmarkOwner *_owner, KToolBar *_toolBar, - KActionCollection *coll, + KBookmarkOwner *_owner, TDEToolBar *_toolBar, + TDEActionCollection *coll, TQObject *parent, const char *name ) : TQObject( parent, name ), m_pOwner(_owner), m_toolBar(_toolBar), m_actionCollection( coll ), m_pManager(mgr) @@ -150,7 +150,7 @@ KBookmarkBar::~KBookmarkBar() void KBookmarkBar::clear() { - TQPtrListIterator<KAction> it( dptr()->m_actions ); + TQPtrListIterator<TDEAction> it( dptr()->m_actions ); m_toolBar->clear(); for (; it.current(); ++it ) { (*it)->unplugAll(); @@ -199,9 +199,9 @@ void KBookmarkBar::fillBookmarkBar(KBookmarkGroup & parent) m_toolBar->insertLineSeparator(); else { - KAction *action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); - connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, TQt::ButtonState )), - this, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, TQt::ButtonState ) )); + TDEAction *action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); + connect(action, TQT_SIGNAL( activated ( TDEAction::ActivationReason, TQt::ButtonState )), + this, TQT_SLOT( slotBookmarkSelected( TDEAction::ActivationReason, TQt::ButtonState ) )); action->setProperty( "url", bm.url().url() ); action->setProperty( "address", bm.address() ); @@ -215,7 +215,7 @@ void KBookmarkBar::fillBookmarkBar(KBookmarkGroup & parent) } else { - KActionMenu *action = new KBookmarkActionMenu( text, bm.icon(), + TDEActionMenu *action = new KBookmarkActionMenu( text, bm.icon(), m_actionCollection, "bookmarkbar-actionmenu"); action->setProperty( "address", bm.address() ); @@ -252,11 +252,11 @@ bool KBookmarkBar::isReadOnly() const return dptr()->m_readOnly; } -void KBookmarkBar::slotBookmarkSelected( KAction::ActivationReason /*reason*/, TQt::ButtonState state ) +void KBookmarkBar::slotBookmarkSelected( TDEAction::ActivationReason /*reason*/, TQt::ButtonState state ) { if (!m_pOwner) return; // this view doesn't handle bookmarks... - const KAction* action = dynamic_cast<const KAction *>(sender()); + const TDEAction* action = dynamic_cast<const TDEAction *>(sender()); if(action) { const TQString & url = sender()->property("url").toString(); @@ -267,7 +267,7 @@ void KBookmarkBar::slotBookmarkSelected( KAction::ActivationReason /*reason*/, T void KBookmarkBar::slotBookmarkSelected() { - slotBookmarkSelected(KAction::ToolBarActivation, Qt::NoButton); + slotBookmarkSelected(TDEAction::ToolBarActivation, Qt::NoButton); } static const int const_sepId = -9999; // FIXME this is ugly, @@ -282,9 +282,9 @@ static void removeTempSep(KBookmarkBarPrivate* p) } } -static KAction* findPluggedAction(TQPtrList<KAction> actions, KToolBar *tb, int id) +static TDEAction* findPluggedAction(TQPtrList<TDEAction> actions, TDEToolBar *tb, int id) { - TQPtrListIterator<KAction> it( actions ); + TQPtrListIterator<TDEAction> it( actions ); for (; (*it); ++it ) if ((*it)->isPlugged(tb, id)) return (*it); @@ -302,19 +302,19 @@ static KAction* findPluggedAction(TQPtrList<KAction> actions, KToolBar *tb, int * returned action was dropped on */ static TQString handleToolbarDragMoveEvent( - KBookmarkBarPrivate *p, KToolBar *tb, TQPoint pos, TQPtrList<KAction> actions, + KBookmarkBarPrivate *p, TDEToolBar *tb, TQPoint pos, TQPtrList<TDEAction> actions, bool &atFirst, KBookmarkManager *mgr ) { Q_UNUSED( mgr ); - Q_ASSERT( actions.isEmpty() || (tb == dynamic_cast<KToolBar*>(actions.first()->container(0))) ); + Q_ASSERT( actions.isEmpty() || (tb == dynamic_cast<TDEToolBar*>(actions.first()->container(0))) ); p->m_sepToolBar = tb; p->m_sepToolBar->removeItemDelayed(const_sepId); int index = 0; - KToolBarButton* b; + TDEToolBarButton* b; - b = dynamic_cast<KToolBarButton*>(tb->childAt(pos)); - KAction *a = 0; + b = dynamic_cast<TDEToolBarButton*>(tb->childAt(pos)); + TDEAction *a = 0; TQString address; atFirst = false; @@ -382,23 +382,23 @@ skipact: } // TODO - document!!!! -static KAction* handleToolbarMouseButton(TQPoint pos, TQPtrList<KAction> actions, +static TDEAction* handleToolbarMouseButton(TQPoint pos, TQPtrList<TDEAction> actions, KBookmarkManager * /*mgr*/, TQPoint & pt) { - KAction *act = actions.first(); + TDEAction *act = actions.first(); if (!act) { return 0; } - KToolBar *tb = dynamic_cast<KToolBar*>(act->container(0)); + TDEToolBar *tb = dynamic_cast<TDEToolBar*>(act->container(0)); Q_ASSERT(tb); - KToolBarButton *b; - b = dynamic_cast<KToolBarButton*>(tb->childAt(pos)); + TDEToolBarButton *b; + b = dynamic_cast<TDEToolBarButton*>(tb->childAt(pos)); if (!b) return 0; - KAction *a = 0; + TDEAction *a = 0; a = findPluggedAction(actions, tb, b->id()); Q_ASSERT(a); pt = tb->mapToGlobal(pos); @@ -454,7 +454,7 @@ bool KBookmarkBar::eventFilter( TQObject *o, TQEvent *e ) TQMouseEvent *mev = (TQMouseEvent*)e; TQPoint pt; - KAction *_a; + TDEAction *_a; // FIXME, see how this holds up on an empty toolbar _a = handleToolbarMouseButton( mev->pos(), dptr()->m_actions, m_pManager, pt ); @@ -463,7 +463,7 @@ bool KBookmarkBar::eventFilter( TQObject *o, TQEvent *e ) dptr()->m_highlightedAddress = _a->property("address").toString(); KBookmark bookmark = m_pManager->findByAddress( dptr()->m_highlightedAddress ); RMB::begin_rmb_action(this); - KPopupMenu *pm = new KPopupMenu; + TDEPopupMenu *pm = new TDEPopupMenu; rmbSelf(this)->fillContextMenu( pm, dptr()->m_highlightedAddress, 0 ); emit aboutToShowContextMenu( rmbSelf(this)->atAddress( dptr()->m_highlightedAddress ), pm ); rmbSelf(this)->fillContextMenu2( pm, dptr()->m_highlightedAddress, 0 ); @@ -510,7 +510,7 @@ bool KBookmarkBar::eventFilter( TQObject *o, TQEvent *e ) return false; bool _atFirst; TQString dropAddress; - KToolBar *tb = (KToolBar*)o; + TDEToolBar *tb = (TDEToolBar*)o; dropAddress = handleToolbarDragMoveEvent(dptr(), tb, dme->pos(), dptr()->m_actions, _atFirst, m_pManager); if (!dropAddress.isNull()) { diff --git a/tdeio/bookmarks/kbookmarkbar.h b/tdeio/bookmarks/kbookmarkbar.h index 1f100d183..2f5495cda 100644 --- a/tdeio/bookmarks/kbookmarkbar.h +++ b/tdeio/bookmarks/kbookmarkbar.h @@ -27,11 +27,11 @@ #include <kbookmark.h> #include <kaction.h> -class KToolBar; +class TDEToolBar; class KBookmarkMenu; class KBookmarkOwner; -class KActionCollection; -class KAction; +class TDEActionCollection; +class TDEAction; class TQPopupMenu; /** @@ -52,14 +52,14 @@ public: * @param owner implementation of the KBookmarkOwner interface (callbacks) * @param toolBar toolbar to fill * - * The KActionCollection pointer argument is now obsolete. + * The TDEActionCollection pointer argument is now obsolete. * * @param parent the parent widget for the bookmark toolbar * @param name the internal name for the bookmark toolbar */ KBookmarkBar( KBookmarkManager* manager, - KBookmarkOwner *owner, KToolBar *toolBar, - KActionCollection *, + KBookmarkOwner *owner, TDEToolBar *toolBar, + TDEActionCollection *, TQObject *parent = 0L, const char *name = 0L); virtual ~KBookmarkBar(); @@ -98,7 +98,7 @@ public slots: /** * @since 3.4 */ - void slotBookmarkSelected( KAction::ActivationReason reason, TQt::ButtonState state ); + void slotBookmarkSelected( TDEAction::ActivationReason reason, TQt::ButtonState state ); /// @since 3.2 void slotRMBActionRemove( int ); @@ -119,8 +119,8 @@ private: KBookmarkGroup getToolbar(); KBookmarkOwner *m_pOwner; - TQGuardedPtr<KToolBar> m_toolBar; - KActionCollection *m_actionCollection; + TQGuardedPtr<TDEToolBar> m_toolBar; + TDEActionCollection *m_actionCollection; KBookmarkManager *m_pManager; TQPtrList<KBookmarkMenu> m_lstSubMenus; diff --git a/tdeio/bookmarks/kbookmarkimporter.h b/tdeio/bookmarks/kbookmarkimporter.h index cc87b2004..6a038e03b 100644 --- a/tdeio/bookmarks/kbookmarkimporter.h +++ b/tdeio/bookmarks/kbookmarkimporter.h @@ -31,7 +31,7 @@ /** * A class for importing NS bookmarks * KEditBookmarks uses it to insert bookmarks into its DOM tree, - * and KActionMenu uses it to create actions directly. + * and TDEActionMenu uses it to create actions directly. * @since 3.2 */ class TDEIO_EXPORT KBookmarkImporterBase : public TQObject diff --git a/tdeio/bookmarks/kbookmarkmenu.cc b/tdeio/bookmarks/kbookmarkmenu.cc index a4d88ae57..ff9f8d4ec 100644 --- a/tdeio/bookmarks/kbookmarkmenu.cc +++ b/tdeio/bookmarks/kbookmarkmenu.cc @@ -77,8 +77,8 @@ static TQString makeTextNodeMod(KBookmark bk, const TQString &m_nodename, const /********************************************************************/ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr, - KBookmarkOwner * _owner, KPopupMenu * _parentMenu, - KActionCollection *collec, bool _isRoot, bool _add, + KBookmarkOwner * _owner, TDEPopupMenu * _parentMenu, + TDEActionCollection *collec, bool _isRoot, bool _add, const TQString & parentAddress ) : TQObject(), m_bIsRoot(_isRoot), m_bAddBookmark(_add), @@ -96,9 +96,9 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr, if (m_actionCollection) { m_actionCollection->setHighlightingEnabled(true); - disconnect( m_actionCollection, TQT_SIGNAL( actionHighlighted( KAction * ) ), 0, 0 ); - connect( m_actionCollection, TQT_SIGNAL( actionHighlighted( KAction * ) ), - this, TQT_SLOT( slotActionHighlighted( KAction * ) ) ); + disconnect( m_actionCollection, TQT_SIGNAL( actionHighlighted( TDEAction * ) ), 0, 0 ); + connect( m_actionCollection, TQT_SIGNAL( actionHighlighted( TDEAction * ) ), + this, TQT_SLOT( slotActionHighlighted( TDEAction * ) ) ); } m_bNSBookmark = m_parentAddress.isNull(); @@ -112,8 +112,8 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr, if ( KBookmarkSettings::self()->m_contextmenu ) { (void) _parentMenu->contextMenu(); - connect( _parentMenu, TQT_SIGNAL( aboutToShowContextMenu(KPopupMenu*, int, TQPopupMenu*) ), - this, TQT_SLOT( slotAboutToShowContextMenu(KPopupMenu*, int, TQPopupMenu*) )); + connect( _parentMenu, TQT_SIGNAL( aboutToShowContextMenu(TDEPopupMenu*, int, TQPopupMenu*) ), + this, TQT_SLOT( slotAboutToShowContextMenu(TDEPopupMenu*, int, TQPopupMenu*) )); } if ( m_bIsRoot ) @@ -142,7 +142,7 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr, KBookmarkMenu::~KBookmarkMenu() { //kdDebug(7043) << "KBookmarkMenu::~KBookmarkMenu() " << this << endl; - TQPtrListIterator<KAction> it( m_actions ); + TQPtrListIterator<TDEAction> it( m_actions ); for (; it.current(); ++it ) it.current()->unplugAll(); @@ -169,7 +169,7 @@ TQString KBookmarkMenu::s_highlightedAddress; TQString KBookmarkMenu::s_highlightedImportType; TQString KBookmarkMenu::s_highlightedImportLocation; -void KBookmarkMenu::slotActionHighlighted( KAction* action ) +void KBookmarkMenu::slotActionHighlighted( TDEAction* action ) { if (action->isA("KBookmarkActionMenu") || action->isA("KBookmarkAction")) { @@ -231,12 +231,12 @@ KBookmark RMB::atAddress(const TQString & address) return bookmark; } -void KBookmarkMenu::slotAboutToShowContextMenu( KPopupMenu*, int, TQPopupMenu* contextMenu ) +void KBookmarkMenu::slotAboutToShowContextMenu( TDEPopupMenu*, int, TQPopupMenu* contextMenu ) { //kdDebug(7043) << "KBookmarkMenu::slotAboutToShowContextMenu" << s_highlightedAddress << endl; if (s_highlightedAddress.isNull()) { - KPopupMenu::contextMenuFocus()->hideContextMenu(); + TDEPopupMenu::contextMenuFocus()->hideContextMenu(); return; } contextMenu->clear(); @@ -411,7 +411,7 @@ void RMB::slotRMBActionCopyLocation( int val ) } void RMB::hidePopup() { - KPopupMenu::contextMenuFocus()->hideContextMenu(); + TDEPopupMenu::contextMenuFocus()->hideContextMenu(); } /********************************************************************/ @@ -467,7 +467,7 @@ void KBookmarkMenu::refill() //kdDebug(7043) << "KBookmarkMenu::refill()" << endl; m_lstSubMenus.clear(); - TQPtrListIterator<KAction> it( m_actions ); + TQPtrListIterator<TDEAction> it( m_actions ); for (; it.current(); ++it ) it.current()->unplug( m_parentMenu ); @@ -480,12 +480,12 @@ void KBookmarkMenu::refill() void KBookmarkMenu::addAddBookmarksList() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; TQString title = i18n( "Bookmark Tabs as Folder..." ); - KAction * paAddBookmarksList = new KAction( title, + TDEAction * paAddBookmarksList = new TDEAction( title, "bookmarks_list_add", 0, this, @@ -500,14 +500,14 @@ void KBookmarkMenu::addAddBookmarksList() void KBookmarkMenu::addAddBookmark() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; TQString title = i18n( "Add Bookmark" ); - KAction * paAddBookmarks = new KAction( title, + TDEAction * paAddBookmarks = new TDEAction( title, "bookmark_add", - m_bIsRoot && m_bAddShortcuts ? KStdAccel::addBookmark() : KShortcut(), + m_bIsRoot && m_bAddShortcuts ? TDEStdAccel::addBookmark() : TDEShortcut(), this, TQT_SLOT( slotAddBookmark() ), m_actionCollection, m_bIsRoot ? "add_bookmark" : 0 ); @@ -520,10 +520,10 @@ void KBookmarkMenu::addAddBookmark() void KBookmarkMenu::addEditBookmarks() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; - KAction * m_paEditBookmarks = KStdAction::editBookmarks( m_pManager, TQT_SLOT( slotEditBookmarks() ), + TDEAction * m_paEditBookmarks = KStdAction::editBookmarks( m_pManager, TQT_SLOT( slotEditBookmarks() ), m_actionCollection, "edit_bookmarks" ); m_paEditBookmarks->plug( m_parentMenu ); m_paEditBookmarks->setToolTip( i18n( "Edit your bookmark collection in a separate window" ) ); @@ -532,7 +532,7 @@ void KBookmarkMenu::addEditBookmarks() void KBookmarkMenu::addNewFolder() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; TQString title = i18n( "&New Bookmark Folder..." ); @@ -540,7 +540,7 @@ void KBookmarkMenu::addNewFolder() while ( ( p = title.find( '&' ) ) >= 0 ) title.remove( p, 1 ); - KAction * paNewFolder = new KAction( title, + TDEAction * paNewFolder = new TDEAction( title, "folder_new", //"folder", 0, this, @@ -555,7 +555,7 @@ void KBookmarkMenu::addNewFolder() void KBookmarkMenu::fillBookmarkMenu() { - if (!kapp->authorizeKAction("bookmarks")) + if (!kapp->authorizeTDEAction("bookmarks")) return; if ( m_bIsRoot ) @@ -594,7 +594,7 @@ void KBookmarkMenu::fillBookmarkMenu() haveSep = true; } - KActionMenu * actionMenu; + TDEActionMenu * actionMenu; actionMenu = new KImportedBookmarksActionMenu( info.name, info.type, m_actionCollection, "kbookmarkmenu" ); @@ -638,9 +638,9 @@ void KBookmarkMenu::fillBookmarkMenu() else { //kdDebug(7043) << "Creating URL bookmark menu item for " << bm.text() << endl; - KAction * action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); - connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, TQt::ButtonState )), - this, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, TQt::ButtonState ) )); + TDEAction * action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 ); + connect(action, TQT_SIGNAL( activated ( TDEAction::ActivationReason, TQt::ButtonState )), + this, TQT_SLOT( slotBookmarkSelected( TDEAction::ActivationReason, TQt::ButtonState ) )); action->setProperty( "url", bm.url().url() ); action->setProperty( "address", bm.address() ); @@ -654,7 +654,7 @@ void KBookmarkMenu::fillBookmarkMenu() else { //kdDebug(7043) << "Creating bookmark submenu named " << bm.text() << endl; - KActionMenu * actionMenu = new KBookmarkActionMenu( text, bm.icon(), + TDEActionMenu * actionMenu = new KBookmarkActionMenu( text, bm.icon(), m_actionCollection, "kbookmarkmenu" ); actionMenu->setProperty( "address", bm.address() ); @@ -681,7 +681,7 @@ void KBookmarkMenu::fillBookmarkMenu() if ( KBookmarkSettings::self()->m_quickactions ) { - KActionMenu * actionMenu = new KActionMenu( i18n("Quick Actions"), m_actionCollection, 0L ); + TDEActionMenu * actionMenu = new TDEActionMenu( i18n("Quick Actions"), m_actionCollection, 0L ); fillContextMenu( actionMenu->popupMenu(), m_parentAddress, 1 ); actionMenu->plug( m_parentMenu ); m_actions.append( actionMenu ); @@ -743,11 +743,11 @@ void KBookmarkMenu::slotNewFolder() } } -void KBookmarkMenu::slotBookmarkSelected( KAction::ActivationReason /*reason*/, TQt::ButtonState state ) +void KBookmarkMenu::slotBookmarkSelected( TDEAction::ActivationReason /*reason*/, TQt::ButtonState state ) { kdDebug(7043) << "KBookmarkMenu::slotBookmarkSelected()" << endl; if ( !m_pOwner ) return; // this view doesn't handle bookmarks... - const KAction* action = dynamic_cast<const KAction *>(sender()); + const TDEAction* action = dynamic_cast<const TDEAction *>(sender()); if(action) { const TQString& url = sender()->property("url").toString(); @@ -758,7 +758,7 @@ void KBookmarkMenu::slotBookmarkSelected( KAction::ActivationReason /*reason*/, void KBookmarkMenu::slotBookmarkSelected() { - slotBookmarkSelected(KAction::PopupMenuActivation, Qt::NoButton); + slotBookmarkSelected(TDEAction::PopupMenuActivation, Qt::NoButton); } KExtendedBookmarkOwner* KBookmarkMenu::extOwner() @@ -1057,9 +1057,9 @@ void KBookmarkMenuNSImporter::newBookmark( const TQString & text, const TQCStrin { TQString _text = KStringHandler::csqueeze(text); _text.replace( '&', "&&" ); - KAction * action = new KBookmarkAction(_text, "html", 0, 0, "", m_actionCollection, 0); - connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, TQt::ButtonState )), - m_menu, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, TQt::ButtonState ) )); + TDEAction * action = new KBookmarkAction(_text, "html", 0, 0, "", m_actionCollection, 0); + connect(action, TQT_SIGNAL( activated ( TDEAction::ActivationReason, TQt::ButtonState )), + m_menu, TQT_SLOT( slotBookmarkSelected( TDEAction::ActivationReason, TQt::ButtonState ) )); action->setProperty( "url", url ); action->setToolTip( url ); action->plug( mstack.top()->m_parentMenu ); @@ -1070,7 +1070,7 @@ void KBookmarkMenuNSImporter::newFolder( const TQString & text, bool, const TQSt { TQString _text = KStringHandler::csqueeze(text); _text.replace( '&', "&&" ); - KActionMenu * actionMenu = new KActionMenu( _text, "folder", m_actionCollection, 0L ); + TDEActionMenu * actionMenu = new TDEActionMenu( _text, "folder", m_actionCollection, 0L ); actionMenu->plug( mstack.top()->m_parentMenu ); mstack.top()->m_actions.append( actionMenu ); KBookmarkMenu *subMenu = new KBookmarkMenu( m_pManager, m_menu->m_pOwner, actionMenu->popupMenu(), diff --git a/tdeio/bookmarks/kbookmarkmenu.h b/tdeio/bookmarks/kbookmarkmenu.h index 35e6191e3..003077202 100644 --- a/tdeio/bookmarks/kbookmarkmenu.h +++ b/tdeio/bookmarks/kbookmarkmenu.h @@ -43,18 +43,18 @@ class TQListView; class KLineEdit; class KBookmark; class KBookmarkGroup; -class KAction; -class KActionMenu; -class KActionCollection; +class TDEAction; +class TDEActionMenu; +class TDEActionCollection; class KBookmarkOwner; class KBookmarkMenu; -class KPopupMenu; +class TDEPopupMenu; namespace TDEIO { class Job; } /** * This class provides a bookmark menu. It is typically used in - * cooperation with KActionMenu but doesn't have to be. + * cooperation with TDEActionMenu but doesn't have to be. * * If you use this class by itself, then it will use KDE defaults for * everything -- the bookmark path, bookmark editor, bookmark launcher.. @@ -66,7 +66,7 @@ namespace TDEIO { class Job; } * * Using this class is very simple: * - * 1) Create a popup menu (either KActionMenu or KPopupMenu will do) + * 1) Create a popup menu (either TDEActionMenu or TDEPopupMenu will do) * 2) Instantiate a new KBookmarkMenu object using the above popup * menu as a parameter * 3) Insert your (now full) popup menu wherever you wish @@ -90,7 +90,7 @@ public: * @param mgr The bookmark manager to use (i.e. for reading and writing) * @param owner implementation of the KBookmarkOwner callback interface. * @param parentMenu menu to be filled - * @param collec parent collection for the KActions. + * @param collec parent collection for the TDEActions. * Only used for other menus than the toplevel one. * @param root true for the toplevel menu * @param add true to show the "Add Bookmark" and "New Folder" entries @@ -102,8 +102,8 @@ public: * An _empty_ parentAddress denotes the toplevel bookmark menu */ KBookmarkMenu( KBookmarkManager* mgr, - KBookmarkOwner * owner, KPopupMenu * parentMenu, - KActionCollection * collec, bool root, bool add = true, + KBookmarkOwner * owner, TDEPopupMenu * parentMenu, + TDEActionCollection * collec, bool root, bool add = true, const TQString & parentAddress = "" ); ~KBookmarkMenu(); @@ -169,8 +169,8 @@ public slots: // public for bookmark bar protected slots: void slotAboutToShow(); - void slotAboutToShowContextMenu( KPopupMenu *, int, TQPopupMenu * ); - void slotActionHighlighted( KAction * ); + void slotAboutToShowContextMenu( TDEPopupMenu *, int, TQPopupMenu * ); + void slotActionHighlighted( TDEAction * ); void slotRMBActionRemove( int ); void slotRMBActionInsert( int ); @@ -182,7 +182,7 @@ protected slots: /** * @ since 3.4 */ - void slotBookmarkSelected( KAction::ActivationReason reason, TQt::ButtonState state ); + void slotBookmarkSelected( TDEAction::ActivationReason reason, TQt::ButtonState state ); void slotAddBookmarksList(); void slotAddBookmark(); void slotNewFolder(); @@ -214,16 +214,16 @@ protected: * The menu in which we plug our actions. * Supplied in the constructor. */ - KPopupMenu * m_parentMenu; + TDEPopupMenu * m_parentMenu; /** * List of our sub menus */ TQPtrList<KBookmarkMenu> m_lstSubMenus; - KActionCollection * m_actionCollection; + TDEActionCollection * m_actionCollection; /** * List of our actions. */ - TQPtrList<KAction> m_actions; + TQPtrList<TDEAction> m_actions; /** * Parent bookmark for this menu. */ @@ -236,13 +236,13 @@ protected: }; /** - * A class connected to KNSBookmarkImporter, to fill KActionMenus. + * A class connected to KNSBookmarkImporter, to fill TDEActionMenus. */ class TDEIO_EXPORT KBookmarkMenuNSImporter : public TQObject { Q_OBJECT public: - KBookmarkMenuNSImporter( KBookmarkManager* mgr, KBookmarkMenu * menu, KActionCollection * act ) : + KBookmarkMenuNSImporter( KBookmarkManager* mgr, KBookmarkMenu * menu, TDEActionCollection * act ) : m_menu(menu), m_actionCollection(act), m_pManager(mgr) {} void openNSBookmarks(); @@ -258,7 +258,7 @@ protected slots: protected: TQPtrStack<KBookmarkMenu> mstack; KBookmarkMenu * m_menu; - KActionCollection * m_actionCollection; + TDEActionCollection * m_actionCollection; KBookmarkManager* m_pManager; }; diff --git a/tdeio/bookmarks/kbookmarkmenu_p.h b/tdeio/bookmarks/kbookmarkmenu_p.h index cb88607fe..dff3e6f30 100644 --- a/tdeio/bookmarks/kbookmarkmenu_p.h +++ b/tdeio/bookmarks/kbookmarkmenu_p.h @@ -44,15 +44,15 @@ class TQListView; class KLineEdit; class KBookmark; class KBookmarkGroup; -class KAction; -class KActionMenu; -class KActionCollection; +class TDEAction; +class TDEActionMenu; +class TDEActionCollection; class KBookmarkOwner; class KBookmarkMenu; class KBookmarkBar; -class KPopupMenu; +class TDEPopupMenu; -class KImportedBookmarksActionMenu : public KActionMenu { +class KImportedBookmarksActionMenu : public TDEActionMenu { Q_OBJECT TQ_PROPERTY( TQString type READ type WRITE setType ) TQ_PROPERTY( TQString location READ location WRITE setLocation ) @@ -67,13 +67,13 @@ private: public: KImportedBookmarksActionMenu( const TQString &text, const TQString& sIconName, - KActionCollection* parent, const char* name) - : KActionMenu(text, sIconName, parent, name) { + TDEActionCollection* parent, const char* name) + : TDEActionMenu(text, sIconName, parent, name) { ; } }; -class KBookmarkActionMenu : public KActionMenu { +class KBookmarkActionMenu : public TDEActionMenu { Q_OBJECT TQ_PROPERTY( TQString url READ url WRITE setUrl ) TQ_PROPERTY( TQString address READ address WRITE setAddress ) @@ -92,13 +92,13 @@ private: public: KBookmarkActionMenu( const TQString &text, const TQString& sIconName, - KActionCollection* parent, const char* name) - : KActionMenu(text, sIconName, parent, name) { + TDEActionCollection* parent, const char* name) + : TDEActionMenu(text, sIconName, parent, name) { ; } }; -class KBookmarkAction : public KAction { +class KBookmarkAction : public TDEAction { Q_OBJECT TQ_PROPERTY( TQString url READ url WRITE setUrl ) TQ_PROPERTY( TQString address READ address WRITE setAddress ) @@ -113,15 +113,15 @@ private: public: // KDE4: remove KBookmarkAction( - const TQString& text, const TQString& sIconName, const KShortcut& cut, + const TQString& text, const TQString& sIconName, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name) - : KAction(text, sIconName, cut, receiver, slot, parent, name) { + TDEActionCollection* parent, const char* name) + : TDEAction(text, sIconName, cut, receiver, slot, parent, name) { } KBookmarkAction( - const TQString& text, const TQString& sIconName, const KShortcut& cut, - KActionCollection* parent, const char* name) - : KAction(text, sIconName, cut, parent, name) { + const TQString& text, const TQString& sIconName, const TDEShortcut& cut, + TDEActionCollection* parent, const char* name) + : TDEAction(text, sIconName, cut, parent, name) { } }; diff --git a/tdeio/misc/tdewalletd/tdewalletd.desktop b/tdeio/misc/tdewalletd/tdewalletd.desktop index 1e65fe0df..1f92976e7 100644 --- a/tdeio/misc/tdewalletd/tdewalletd.desktop +++ b/tdeio/misc/tdewalletd/tdewalletd.desktop @@ -61,7 +61,7 @@ Name[ru]=Служба бумажника Name[rw]=Igice Dayimoni KUruhago Name[se]=KWallet-bálvámoduvla Name[sk]=Modul démona KWallet -Name[sl]=Modul demona KListnica +Name[sl]=Modul demona TDEListnica Name[sq]=Demoni për Modulin KWallet Name[sr]=KWallet демон модул Name[sr@Latn]=KWallet demon modul @@ -132,7 +132,7 @@ Comment[ru]=Управление бумажником TDE Comment[rw]=Igice cya dayimoni KUruhago cya KDED Comment[se]=KDED:a KWallet-bálvámoduvla Comment[sk]=Modul démona KWallet pre KDED -Comment[sl]=Modul demona KListnica za KDED +Comment[sl]=Modul demona TDEListnica za KDED Comment[sr]=KWallet демон модул за KDED Comment[sr@Latn]=KWallet demon modul za KDED Comment[sv]=Kwallet-demonmodul för KDED diff --git a/tdeio/misc/uiserver.cpp b/tdeio/misc/uiserver.cpp index 8a9c7f21e..4f4b720f5 100644 --- a/tdeio/misc/uiserver.cpp +++ b/tdeio/misc/uiserver.cpp @@ -94,7 +94,7 @@ class UIServerSystemTray:public KSystemTray UIServerSystemTray(UIServer* uis) :KSystemTray(uis) { - KPopupMenu* pop= contextMenu(); + TDEPopupMenu* pop= contextMenu(); pop->insertItem(i18n("Settings..."), uis, TQT_SLOT(slotConfigure())); pop->insertItem(i18n("Remove"), uis, TQT_SLOT(slotRemoveSystemTrayIcon())); setPixmap(loadIcon("filesave")); @@ -118,7 +118,7 @@ class ProgressConfigDialog:public KDialogBase TQCheckBox *m_statusBarCb; TQCheckBox *m_headerCb; TQCheckBox *m_fixedWidthCb; - KListView *m_columns; + TDEListView *m_columns; TQCheckListItem *(m_items[ListProgress::TB_MAX]); }; @@ -134,7 +134,7 @@ ProgressConfigDialog::ProgressConfigDialog(TQWidget *parent) m_statusBarCb=new TQCheckBox(i18n("Show statusbar"), plainPage()); m_fixedWidthCb=new TQCheckBox(i18n("Column widths are user adjustable"), plainPage()); TQLabel *label=new TQLabel(i18n("Show information:"), plainPage()); - m_columns=new KListView(plainPage()); + m_columns=new TDEListView(plainPage()); m_columns->addColumn("info"); m_columns->setSorting(-1); @@ -455,7 +455,7 @@ void ProgressItem::updateVisibility() //----------------------------------------------------------------------------- ListProgress::ListProgress (TQWidget *parent, const char *name) -: KListView (parent, name) +: TDEListView (parent, name) { // enable selection of more than one item @@ -584,7 +584,7 @@ void ListProgress::writeSettings() { UIServer::UIServer() -:KMainWindow(0, "") +:TDEMainWindow(0, "") ,DCOPObject("UIServer") ,m_shuttingDown(false) ,m_configDialog(0) @@ -602,7 +602,7 @@ UIServer::UIServer() TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), true, i18n("Settings...")); - toolBar()->setBarPos( KToolBar::Left ); + toolBar()->setBarPos( TDEToolBar::Left ); // setup statusbar statusBar()->insertItem( i18n(" Files: %1 ").arg( 0 ), ID_TOTAL_FILES); @@ -619,8 +619,8 @@ UIServer::UIServer() TQT_SLOT( slotSelection() ) ); connect( listProgress, TQT_SIGNAL( executed( TQListViewItem* ) ), TQT_SLOT( slotToggleDefaultProgress( TQListViewItem* ) ) ); - connect( listProgress, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem *, const TQPoint &)), - TQT_SLOT(slotShowContextMenu(KListView*, TQListViewItem *, const TQPoint&))); + connect( listProgress, TQT_SIGNAL( contextMenu( TDEListView*, TQListViewItem *, const TQPoint &)), + TQT_SLOT(slotShowContextMenu(TDEListView*, TQListViewItem *, const TQPoint&))); // setup animation timer @@ -671,7 +671,7 @@ void UIServer::applySettings() toolBar()->show(); } -void UIServer::slotShowContextMenu(KListView*, TQListViewItem* item, const TQPoint& pos) +void UIServer::slotShowContextMenu(TDEListView*, TQListViewItem* item, const TQPoint& pos) { if (m_contextMenu==0) { @@ -1355,7 +1355,7 @@ void UIServer::slotCancelCurrent() { void UIServer::resizeEvent(TQResizeEvent* e) { - KMainWindow::resizeEvent(e); + TDEMainWindow::resizeEvent(e); writeSettings(); } diff --git a/tdeio/misc/uiserver.h b/tdeio/misc/uiserver.h index baf495dfe..c86886bac 100644 --- a/tdeio/misc/uiserver.h +++ b/tdeio/misc/uiserver.h @@ -55,7 +55,7 @@ struct ListProgressColumnConfig * List view in the UIServer. * @internal */ -class TDEIO_EXPORT ListProgress : public KListView { +class TDEIO_EXPORT ListProgress : public TDEListView { Q_OBJECT @@ -214,7 +214,7 @@ class UIServerSystemTray; * * @internal */ -class TDEIO_EXPORT UIServer : public KMainWindow, public DCOPObject { +class TDEIO_EXPORT UIServer : public TDEMainWindow, public DCOPObject { K_DCOP Q_OBJECT @@ -382,7 +382,7 @@ protected slots: void slotJobCanceled( ProgressItem * ); void slotApplyConfig(); - void slotShowContextMenu(KListView*, TQListViewItem *item, const TQPoint& pos); + void slotShowContextMenu(TDEListView*, TQListViewItem *item, const TQPoint& pos); protected: @@ -396,7 +396,7 @@ protected: TQTimer* updateTimer; ListProgress* listProgress; - KToolBar::BarPosition toolbarPos; + TDEToolBar::BarPosition toolbarPos; TQString properties; void applySettings(); diff --git a/tdeio/tdefile/ChangeLog b/tdeio/tdefile/ChangeLog index 79ac59808..ccfb45ab5 100644 --- a/tdeio/tdefile/ChangeLog +++ b/tdeio/tdefile/ChangeLog @@ -62,7 +62,7 @@ Tue Feb 15 14:21:41 2000 Carsten Pfeiffer <pfeiffer@kde.org> * kdiroperator.cpp (setSorting): added setSorting() and sorting() to keep sorting when switching views - a few cosmetic and KAction changes + a few cosmetic and TDEAction changes Sun Feb 13 00:45:12 2000 Carsten Pfeiffer <pfeiffer@kde.org> @@ -87,7 +87,7 @@ Fri Feb 11 12:17:59 2000 Carsten Pfeiffer <pfeiffer@kde.org> Thu Feb 10 17:06:36 2000 Carsten Pfeiffer <pfeiffer@kde.org> * kdiroperator.cpp (connectView): - - Now that KToggleAction is fixed, I can commit the new stuff: + - Now that TDEToggleAction is fixed, I can commit the new stuff: Offer Actions for all the common functionality, i.e. sorting, setting the view, home(), cdUp(), back, forward, etc. All actions are exposed through a QActionCollection diff --git a/tdeio/tdefile/NOTES b/tdeio/tdefile/NOTES index ad99065be..e2037e382 100644 --- a/tdeio/tdefile/NOTES +++ b/tdeio/tdefile/NOTES @@ -82,7 +82,7 @@ konqueror versions of the views. This class inherits KParts::ReadOnlyPart, and provides a BrowserExtension. It integrates KonqFileManagerWidget as its KParts widget, and provides -KActions for it. +TDEActions for it. Important : diff --git a/tdeio/tdefile/kacleditwidget.cpp b/tdeio/tdefile/kacleditwidget.cpp index 94ee0d4c4..01eb8bcb8 100644 --- a/tdeio/tdefile/kacleditwidget.cpp +++ b/tdeio/tdefile/kacleditwidget.cpp @@ -143,7 +143,7 @@ KACLListViewItem::KACLListViewItem( TQListView* parent, KACLListView::EntryType _type, unsigned short _value, bool defaults, const TQString& _qualifier ) - : KListViewItem( parent, parent->lastItem() ), // we want to append + : TDEListViewItem( parent, parent->lastItem() ), // we want to append type( _type ), value( _value ), isDefault( defaults ), qualifier( _qualifier ), isPartial( false ) { @@ -204,7 +204,7 @@ void KACLListViewItem::paintCell( TQPainter* p, const TQColorGroup &cg, mycg.setColor( TQColorGroup::Text, TQColor( 100, 100, 100 ) ); p->setFont( font ); } - KListViewItem::paintCell( p, mycg, column, width, alignment ); + TDEListViewItem::paintCell( p, mycg, column, width, alignment ); KACLListViewItem *below =0; if ( itemBelow() ) @@ -556,7 +556,7 @@ void EditACLEntryDialog::slotSelectionChanged( int id ) KACLListView::KACLListView( TQWidget* parent, const char* name ) - : KListView( parent, name ), + : TDEListView( parent, name ), m_hasMask( false ), m_allowDefaults( false ) { // Add the columns @@ -753,7 +753,7 @@ void KACLListView::contentsMousePressEvent( TQMouseEvent * e ) if ( !clickedItem ) return; // if the click is on an as yet unselected item, select it first if ( !clickedItem->isSelected() ) - KListView::contentsMousePressEvent( e ); + TDEListView::contentsMousePressEvent( e ); if ( !currentItem() ) return; int column = header()->sectionAt( e->x() ); @@ -770,7 +770,7 @@ void KACLListView::contentsMousePressEvent( TQMouseEvent * e ) perm = ACL_EXECUTE; break; default: - return KListView::contentsMousePressEvent( e ); + return TDEListView::contentsMousePressEvent( e ); } KACLListViewItem* referenceItem = static_cast<KACLListViewItem*>( clickedItem ); unsigned short referenceHadItSet = referenceItem->value & perm; diff --git a/tdeio/tdefile/kacleditwidget_p.h b/tdeio/tdefile/kacleditwidget_p.h index dc7e4c811..9ea5e3203 100644 --- a/tdeio/tdefile/kacleditwidget_p.h +++ b/tdeio/tdefile/kacleditwidget_p.h @@ -47,7 +47,7 @@ class TQCheckBox; /** @author Sean Harmer */ -class KACLListView : public KListView +class KACLListView : public TDEListView { Q_OBJECT @@ -168,7 +168,7 @@ private: }; -class KACLListViewItem : public KListViewItem +class KACLListViewItem : public TDEListViewItem { public: KACLListViewItem( TQListView* parent, KACLListView::EntryType type, diff --git a/tdeio/tdefile/kcombiview.cpp b/tdeio/tdefile/kcombiview.cpp index bc3d43384..ae408c8e2 100644 --- a/tdeio/tdefile/kcombiview.cpp +++ b/tdeio/tdefile/kcombiview.cpp @@ -319,7 +319,7 @@ void KCombiView::writeConfig( TDEConfig *config, const TQString& group ) right->writeConfig( config, group ); } -KActionCollection * KCombiView::actionCollection() const +TDEActionCollection * KCombiView::actionCollection() const { return focusView( right )->actionCollection(); } diff --git a/tdeio/tdefile/kcombiview.h b/tdeio/tdefile/kcombiview.h index 8da3da3fb..995b80ffc 100644 --- a/tdeio/tdefile/kcombiview.h +++ b/tdeio/tdefile/kcombiview.h @@ -98,7 +98,7 @@ public: void ensureItemVisible( const KFileItem * ); - virtual KActionCollection * actionCollection() const; + virtual TDEActionCollection * actionCollection() const; virtual void setAcceptDrops(bool b); diff --git a/tdeio/tdefile/kcustommenueditor.cpp b/tdeio/tdefile/kcustommenueditor.cpp index 48c911e30..244e22e84 100644 --- a/tdeio/tdefile/kcustommenueditor.cpp +++ b/tdeio/tdefile/kcustommenueditor.cpp @@ -90,7 +90,7 @@ KCustomMenuEditor::KCustomMenuEditor(TQWidget *parent) { d = new KCustomMenuEditorPrivate; TQHBox *page = makeHBoxMainWidget(); - m_listView = new KListView(page); + m_listView = new TDEListView(page); m_listView->addColumn(i18n("Menu")); m_listView->setFullWidth(true); m_listView->setSorting(-1); diff --git a/tdeio/tdefile/kcustommenueditor.h b/tdeio/tdefile/kcustommenueditor.h index 108e9c477..cb43c606f 100644 --- a/tdeio/tdefile/kcustommenueditor.h +++ b/tdeio/tdefile/kcustommenueditor.h @@ -21,7 +21,7 @@ #include <kdialogbase.h> -class KListView; +class TDEListView; class TDEConfigBase; /* @@ -58,7 +58,7 @@ public slots: protected: class Item; - KListView *m_listView; + TDEListView *m_listView; class KCustomMenuEditorPrivate; KCustomMenuEditorPrivate *d; diff --git a/tdeio/tdefile/kdiroperator.cpp b/tdeio/tdefile/kdiroperator.cpp index ea3183f78..dcb457662 100644 --- a/tdeio/tdefile/kdiroperator.cpp +++ b/tdeio/tdefile/kdiroperator.cpp @@ -87,7 +87,7 @@ public: TQString lastURL; // used for highlighting a directory on cdUp bool onlyDoubleClickSelectsFiles; TQTimer *progressDelayTimer; - KActionSeparator *viewActionSeparator; + TDEActionSeparator *viewActionSeparator; int dropOptions; TDEConfig *config; @@ -192,10 +192,10 @@ void KDirOperator::insertViewDependentActions() { if (viewActionCollection) { - disconnect( viewActionCollection, TQT_SIGNAL( inserted( KAction * )), - this, TQT_SLOT( slotViewActionAdded( KAction * ))); - disconnect( viewActionCollection, TQT_SIGNAL( removed( KAction * )), - this, TQT_SLOT( slotViewActionRemoved( KAction * ))); + disconnect( viewActionCollection, TQT_SIGNAL( inserted( TDEAction * )), + this, TQT_SLOT( slotViewActionAdded( TDEAction * ))); + disconnect( viewActionCollection, TQT_SIGNAL( removed( TDEAction * )), + this, TQT_SLOT( slotViewActionRemoved( TDEAction * ))); } viewActionMenu->popupMenu()->clear(); @@ -223,24 +223,24 @@ void KDirOperator::insertViewDependentActions() TQStringList groups = viewActionCollection->groups(); groups.prepend( TQString::null ); // actions without group TQStringList::ConstIterator git = groups.begin(); - KActionPtrList list; - KAction *sep = actionCollection()->action("separator"); + TDEActionPtrList list; + TDEAction *sep = actionCollection()->action("separator"); for ( ; git != groups.end(); ++git ) { if ( git != groups.begin() ) viewActionMenu->insert( sep ); list = viewActionCollection->actions( *git ); - KActionPtrList::ConstIterator it = list.begin(); + TDEActionPtrList::ConstIterator it = list.begin(); for ( ; it != list.end(); ++it ) viewActionMenu->insert( *it ); } } - connect( viewActionCollection, TQT_SIGNAL( inserted( KAction * )), - TQT_SLOT( slotViewActionAdded( KAction * ))); - connect( viewActionCollection, TQT_SIGNAL( removed( KAction * )), - TQT_SLOT( slotViewActionRemoved( KAction * ))); + connect( viewActionCollection, TQT_SIGNAL( inserted( TDEAction * )), + TQT_SLOT( slotViewActionAdded( TDEAction * ))); + connect( viewActionCollection, TQT_SIGNAL( removed( TDEAction * )), + TQT_SLOT( slotViewActionRemoved( TDEAction * ))); } } @@ -271,7 +271,7 @@ void KDirOperator::setPreviewWidget(const TQWidget *w) delete myPreview; myPreview = w; - KToggleAction *preview = static_cast<KToggleAction*>(myActionCollection->action("preview")); + TDEToggleAction *preview = static_cast<TDEToggleAction*>(myActionCollection->action("preview")); preview->setEnabled( w != 0L ); preview->setChecked( w != 0L ); setView( static_cast<KFile::FileView>(m_viewKind) ); @@ -326,7 +326,7 @@ void KDirOperator::slotDefaultPreview() m_viewKind = m_viewKind | KFile::PreviewContents; if ( !myPreview ) { myPreview = new KFileMetaPreview( this ); - (static_cast<KToggleAction*>( myActionCollection->action("preview") ))->setChecked(true); + (static_cast<TDEToggleAction*>( myActionCollection->action("preview") ))->setChecked(true); } setView( static_cast<KFile::FileView>(m_viewKind) ); @@ -555,12 +555,12 @@ TDEIO::CopyJob * KDirOperator::trash( const KFileItemList& items, return 0L; } -void KDirOperator::trashSelected(KAction::ActivationReason reason, TQt::ButtonState state) +void KDirOperator::trashSelected(TDEAction::ActivationReason reason, TQt::ButtonState state) { if ( !m_fileView ) return; - if ( reason == KAction::PopupMenuActivation && ( state & ShiftButton ) ) { + if ( reason == TDEAction::PopupMenuActivation && ( state & ShiftButton ) ) { deleteSelected(); return; } @@ -809,7 +809,7 @@ void KDirOperator::setMimeFilter( const TQStringList& mimetypes ) bool KDirOperator::checkPreviewSupport() { - KToggleAction *previewAction = static_cast<KToggleAction*>( myActionCollection->action( "preview" )); + TDEToggleAction *previewAction = static_cast<TDEToggleAction*>( myActionCollection->action( "preview" )); bool hasPreviewSupport = false; TDEConfig *kc = TDEGlobal::config(); @@ -1253,9 +1253,9 @@ void KDirOperator::slotCompletionMatch(const TQString& match) void KDirOperator::setupActions() { - myActionCollection = new KActionCollection( topLevelWidget(), TQT_TQOBJECT(this), "KDirOperator::myActionCollection" ); + myActionCollection = new TDEActionCollection( topLevelWidget(), TQT_TQOBJECT(this), "KDirOperator::myActionCollection" ); - actionMenu = new KActionMenu( i18n("Menu"), myActionCollection, "popupMenu" ); + actionMenu = new TDEActionMenu( i18n("Menu"), myActionCollection, "popupMenu" ); upAction = KStdAction::up( TQT_TQOBJECT(this), TQT_SLOT( cdUp() ), myActionCollection, "up" ); upAction->setText( i18n("Parent Folder") ); backAction = KStdAction::back( TQT_TQOBJECT(this), TQT_SLOT( back() ), myActionCollection, "back" ); @@ -1263,33 +1263,33 @@ void KDirOperator::setupActions() homeAction = KStdAction::home( TQT_TQOBJECT(this), TQT_SLOT( home() ), myActionCollection, "home" ); homeAction->setText(i18n("Home Folder")); reloadAction = KStdAction::redisplay( TQT_TQOBJECT(this), TQT_SLOT(rereadDir()), myActionCollection, "reload" ); - actionSeparator = new KActionSeparator( myActionCollection, "separator" ); - d->viewActionSeparator = new KActionSeparator( myActionCollection, + actionSeparator = new TDEActionSeparator( myActionCollection, "separator" ); + d->viewActionSeparator = new TDEActionSeparator( myActionCollection, "viewActionSeparator" ); - mkdirAction = new KAction( i18n("New Folder..."), 0, + mkdirAction = new TDEAction( i18n("New Folder..."), 0, TQT_TQOBJECT(this), TQT_SLOT( mkdir() ), myActionCollection, "mkdir" ); - KAction* trash = new KAction( i18n( "Move to Trash" ), "edittrash", Key_Delete, myActionCollection, "trash" ); - connect( trash, TQT_SIGNAL( activated( KAction::ActivationReason, TQt::ButtonState ) ), - this, TQT_SLOT( trashSelected( KAction::ActivationReason, TQt::ButtonState ) ) ); - new KAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, TQT_TQOBJECT(this), + TDEAction* trash = new TDEAction( i18n( "Move to Trash" ), "edittrash", Key_Delete, myActionCollection, "trash" ); + connect( trash, TQT_SIGNAL( activated( TDEAction::ActivationReason, TQt::ButtonState ) ), + this, TQT_SLOT( trashSelected( TDEAction::ActivationReason, TQt::ButtonState ) ) ); + new TDEAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, TQT_TQOBJECT(this), TQT_SLOT( deleteSelected() ), myActionCollection, "delete" ); mkdirAction->setIcon( TQString::fromLatin1("folder_new") ); reloadAction->setText( i18n("Reload") ); - reloadAction->setShortcut( KStdAccel::shortcut( KStdAccel::Reload )); + reloadAction->setShortcut( TDEStdAccel::shortcut( TDEStdAccel::Reload )); // the sort menu actions - sortActionMenu = new KActionMenu( i18n("Sorting"), myActionCollection, "sorting menu"); - byNameAction = new KRadioAction( i18n("By Name"), 0, + sortActionMenu = new TDEActionMenu( i18n("Sorting"), myActionCollection, "sorting menu"); + byNameAction = new TDERadioAction( i18n("By Name"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSortByName() ), myActionCollection, "by name" ); - byDateAction = new KRadioAction( i18n("By Date"), 0, + byDateAction = new TDERadioAction( i18n("By Date"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSortByDate() ), myActionCollection, "by date" ); - bySizeAction = new KRadioAction( i18n("By Size"), 0, + bySizeAction = new TDERadioAction( i18n("By Size"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSortBySize() ), myActionCollection, "by size" ); - reverseAction = new KToggleAction( i18n("Reverse"), 0, + reverseAction = new TDEToggleAction( i18n("Reverse"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSortReversed() ), myActionCollection, "reversed" ); @@ -1299,9 +1299,9 @@ void KDirOperator::setupActions() bySizeAction->setExclusiveGroup( sortGroup ); - dirsFirstAction = new KToggleAction( i18n("Folders First"), 0, + dirsFirstAction = new TDEToggleAction( i18n("Folders First"), 0, myActionCollection, "dirs first"); - caseInsensitiveAction = new KToggleAction(i18n("Case Insensitive"), 0, + caseInsensitiveAction = new TDEToggleAction(i18n("Case Insensitive"), 0, myActionCollection, "case insensitive" ); connect( dirsFirstAction, TQT_SIGNAL( toggled( bool ) ), @@ -1312,24 +1312,24 @@ void KDirOperator::setupActions() // the view menu actions - viewActionMenu = new KActionMenu( i18n("&View"), myActionCollection, "view menu" ); + viewActionMenu = new TDEActionMenu( i18n("&View"), myActionCollection, "view menu" ); connect( viewActionMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), TQT_SLOT( insertViewDependentActions() )); - shortAction = new KRadioAction( i18n("Short View"), "view_multicolumn", - KShortcut(), myActionCollection, "short view" ); - detailedAction = new KRadioAction( i18n("Detailed View"), "view_detailed", - KShortcut(), myActionCollection, "detailed view" ); + shortAction = new TDERadioAction( i18n("Short View"), "view_multicolumn", + TDEShortcut(), myActionCollection, "short view" ); + detailedAction = new TDERadioAction( i18n("Detailed View"), "view_detailed", + TDEShortcut(), myActionCollection, "detailed view" ); - showHiddenAction = new KToggleAction( i18n("Show Hidden Files"), KShortcut(), + showHiddenAction = new TDEToggleAction( i18n("Show Hidden Files"), TDEShortcut(), myActionCollection, "show hidden" ); // showHiddenAction->setCheckedState( i18n("Hide Hidden Files") ); - separateDirsAction = new KToggleAction( i18n("Separate Folders"), KShortcut(), + separateDirsAction = new TDEToggleAction( i18n("Separate Folders"), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotSeparateDirs()), myActionCollection, "separate dirs" ); - KToggleAction *previewAction = new KToggleAction(i18n("Show Preview"), - "thumbnail", KShortcut(), + TDEToggleAction *previewAction = new TDEToggleAction(i18n("Show Preview"), + "thumbnail", TDEShortcut(), myActionCollection, "preview" ); previewAction->setCheckedState(i18n("Hide Preview")); @@ -1348,7 +1348,7 @@ void KDirOperator::setupActions() connect( showHiddenAction, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotToggleHidden( bool ) )); - new KAction( i18n("Properties"), KShortcut(ALT+Key_Return), TQT_TQOBJECT(this), + new TDEAction( i18n("Properties"), TDEShortcut(ALT+Key_Return), TQT_TQOBJECT(this), TQT_SLOT(slotProperties()), myActionCollection, "properties" ); } @@ -1533,7 +1533,7 @@ void KDirOperator::writeConfig( TDEConfig *kc, const TQString& group ) kc->writeEntry( TQString::fromLatin1("Separate Directories"), separateDirsAction->isChecked() ); - KToggleAction *previewAction = static_cast<KToggleAction*>(myActionCollection->action("preview")); + TDEToggleAction *previewAction = static_cast<TDEToggleAction*>(myActionCollection->action("preview")); if ( previewAction->isEnabled() ) { bool hasPreview = previewAction->isChecked(); kc->writeEntry( TQString::fromLatin1("Show Preview"), hasPreview ); @@ -1633,7 +1633,7 @@ void KDirOperator::clearHistory() forwardAction->setEnabled( false ); } -void KDirOperator::slotViewActionAdded( KAction *action ) +void KDirOperator::slotViewActionAdded( TDEAction *action ) { if ( viewActionMenu->popupMenu()->count() == 5 ) // need to add a separator viewActionMenu->insert( d->viewActionSeparator ); @@ -1641,7 +1641,7 @@ void KDirOperator::slotViewActionAdded( KAction *action ) viewActionMenu->insert( action ); } -void KDirOperator::slotViewActionRemoved( KAction *action ) +void KDirOperator::slotViewActionRemoved( TDEAction *action ) { viewActionMenu->remove( action ); diff --git a/tdeio/tdefile/kdiroperator.h b/tdeio/tdefile/kdiroperator.h index 418bb20c8..5d806eee2 100644 --- a/tdeio/tdefile/kdiroperator.h +++ b/tdeio/tdefile/kdiroperator.h @@ -34,11 +34,11 @@ class TQPopupMenu; class TQTimer; -class KAction; +class TDEAction; class KDirLister; -class KToggleAction; -class KActionSeparator; -class KActionMenu; +class TDEToggleAction; +class TDEActionSeparator; +class TDEActionMenu; class TQWidgetStack; class KProgress; namespace TDEIO { @@ -345,7 +345,7 @@ class TDEIO_EXPORT KDirOperator : public TQWidget /** * an accessor to a collection of all available Actions. The actions * are static, they will be there all the time (no need to connect to - * the signals KActionCollection::inserted() or removed(). + * the signals TDEActionCollection::inserted() or removed(). * * There are the following actions: * @@ -387,7 +387,7 @@ class TDEIO_EXPORT KDirOperator : public TQWidget * * @returns all available Actions */ - KActionCollection * actionCollection() const { return myActionCollection; } + TDEActionCollection * actionCollection() const { return myActionCollection; } /** * Sets the config object and the to be used group in KDirOperator. This @@ -710,7 +710,7 @@ public slots: * @since 3.4 */ // ### KDE4: make virtual - void trashSelected(KAction::ActivationReason, TQt::ButtonState); + void trashSelected(TDEAction::ActivationReason, TQt::ButtonState); protected slots: /** @@ -873,32 +873,32 @@ private: // actions for the popupmenus // ### clean up all those -- we have them all in the actionMenu! - KActionMenu *actionMenu; - - KAction *backAction; - KAction *forwardAction; - KAction *homeAction; - KAction *upAction; - KAction *reloadAction; - KActionSeparator *actionSeparator; - KAction *mkdirAction; - - KActionMenu *sortActionMenu; - KRadioAction *byNameAction; - KRadioAction *byDateAction; - KRadioAction *bySizeAction; - KToggleAction *reverseAction; - KToggleAction *dirsFirstAction; - KToggleAction *caseInsensitiveAction; - - KActionMenu *viewActionMenu; - KRadioAction *shortAction; - KRadioAction *detailedAction; - KToggleAction *showHiddenAction; - KToggleAction *separateDirsAction; - - KActionCollection *myActionCollection; - KActionCollection *viewActionCollection; + TDEActionMenu *actionMenu; + + TDEAction *backAction; + TDEAction *forwardAction; + TDEAction *homeAction; + TDEAction *upAction; + TDEAction *reloadAction; + TDEActionSeparator *actionSeparator; + TDEAction *mkdirAction; + + TDEActionMenu *sortActionMenu; + TDERadioAction *byNameAction; + TDERadioAction *byDateAction; + TDERadioAction *bySizeAction; + TDEToggleAction *reverseAction; + TDEToggleAction *dirsFirstAction; + TDEToggleAction *caseInsensitiveAction; + + TDEActionMenu *viewActionMenu; + TDERadioAction *shortAction; + TDERadioAction *detailedAction; + TDEToggleAction *showHiddenAction; + TDEToggleAction *separateDirsAction; + + TDEActionCollection *myActionCollection; + TDEActionCollection *viewActionCollection; private slots: /** @@ -926,8 +926,8 @@ private slots: void slotCanceled(); void slotRedirected( const KURL& ); - void slotViewActionAdded( KAction * ); - void slotViewActionRemoved( KAction * ); + void slotViewActionAdded( TDEAction * ); + void slotViewActionRemoved( TDEAction * ); void slotViewSortingChanged( TQDir::SortSpec ); void slotClearView(); diff --git a/tdeio/tdefile/kdirselectdialog.cpp b/tdeio/tdefile/kdirselectdialog.cpp index 6a13920fd..a540c57ef 100644 --- a/tdeio/tdefile/kdirselectdialog.cpp +++ b/tdeio/tdefile/kdirselectdialog.cpp @@ -122,10 +122,10 @@ KDirSelectDialog::KDirSelectDialog(const TQString &startDir, bool localOnly, TQT_SLOT( slotComboTextChanged( const TQString& ) )); m_contextMenu = new TQPopupMenu( this ); - KAction* newFolder = new KAction( i18n("New Folder..."), "folder_new", 0, TQT_TQOBJECT(this), TQT_SLOT( slotMkdir() ), TQT_TQOBJECT(this)); + TDEAction* newFolder = new TDEAction( i18n("New Folder..."), "folder_new", 0, TQT_TQOBJECT(this), TQT_SLOT( slotMkdir() ), TQT_TQOBJECT(this)); newFolder->plug(m_contextMenu); m_contextMenu->insertSeparator(); - m_showHiddenFolders = new KToggleAction ( i18n( "Show Hidden Folders" ), 0, TQT_TQOBJECT(this), + m_showHiddenFolders = new TDEToggleAction ( i18n( "Show Hidden Folders" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotShowHiddenFoldersToggled() ), TQT_TQOBJECT(this)); m_showHiddenFolders->plug(m_contextMenu); @@ -153,8 +153,8 @@ KDirSelectDialog::KDirSelectDialog(const TQString &startDir, bool localOnly, connect( m_treeView, TQT_SIGNAL( currentChanged( TQListViewItem * )), TQT_SLOT( slotCurrentChanged() )); - connect( m_treeView, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & )), - TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ))); + connect( m_treeView, TQT_SIGNAL( contextMenu( TDEListView *, TQListViewItem *, const TQPoint & )), + TQT_SLOT( slotContextMenu( TDEListView *, TQListViewItem *, const TQPoint & ))); connect( d->urlCombo, TQT_SIGNAL( activated( const TQString& )), TQT_SLOT( slotURLActivated( const TQString& ))); @@ -307,7 +307,7 @@ void KDirSelectDialog::accept() if ( !item->isDir() ) dir = dir.upURL(); - KRecentDirs::add(d->recentDirClass, dir.url()); + TDERecentDirs::add(d->recentDirClass, dir.url()); } d->urlCombo->addToHistory( item->url().prettyURL() ); @@ -395,7 +395,7 @@ void KDirSelectDialog::slotComboTextChanged( const TQString& text ) } } -void KDirSelectDialog::slotContextMenu( KListView *, TQListViewItem *, const TQPoint& pos ) +void KDirSelectDialog::slotContextMenu( TDEListView *, TQListViewItem *, const TQPoint& pos ) { m_contextMenu->popup( pos ); } diff --git a/tdeio/tdefile/kdirselectdialog.h b/tdeio/tdefile/kdirselectdialog.h index 746064c68..400bd3232 100644 --- a/tdeio/tdefile/kdirselectdialog.h +++ b/tdeio/tdefile/kdirselectdialog.h @@ -29,7 +29,7 @@ class TDEConfig; class KFileTreeBranch; class KFileTreeView; class KFileTreeViewItem; -class KToggleAction; +class TDEToggleAction; /** * A pretty dialog for a KDirSelect control for selecting directories. @@ -106,7 +106,7 @@ private slots: void slotURLActivated( const TQString& ); void slotNextDirToList( KFileTreeViewItem *dirItem ); void slotComboTextChanged( const TQString& text ); - void slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ); + void slotContextMenu( TDEListView *, TQListViewItem *, const TQPoint & ); void slotShowHiddenFoldersToggled(); void slotMkdir(); @@ -118,7 +118,7 @@ private: KFileTreeView *m_treeView; TQPopupMenu *m_contextMenu; - KToggleAction *m_showHiddenFolders; + TDEToggleAction *m_showHiddenFolders; bool m_localOnly; protected: diff --git a/tdeio/tdefile/kencodingfiledialog.cpp b/tdeio/tdefile/kencodingfiledialog.cpp index b8c90f6ff..569217bee 100644 --- a/tdeio/tdefile/kencodingfiledialog.cpp +++ b/tdeio/tdefile/kencodingfiledialog.cpp @@ -44,7 +44,7 @@ KEncodingFileDialog::KEncodingFileDialog(const TQString& startDir, const TQStrin setOperationMode( type ); - KToolBar *tb = toolBar(); + TDEToolBar *tb = toolBar(); tb->insertSeparator(); int index = tb->insertCombo(TQStringList(), -1 /*id*/, false /*writable*/, 0 /*signal*/, 0 /*receiver*/, 0 /*slot*/ ); d->encoding = tb->getCombo( tb->idAt( index ) ); @@ -180,7 +180,7 @@ KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(cons TQString filename = dlg.selectedFile(); if (!filename.isEmpty()) - KRecentDocument::add(filename); + TDERecentDocument::add(filename); Result res; res.fileNames<<filename; @@ -204,7 +204,7 @@ KEncodingFileDialog::Result KEncodingFileDialog::getSaveURLAndEncoding(const TQ KURL url = dlg.selectedURL(); if (url.isValid()) - KRecentDocument::add( url ); + TDERecentDocument::add( url ); Result res; res.URLs<<url; diff --git a/tdeio/tdefile/knotifydialog.h b/tdeio/tdefile/knotifydialog.h index 9bb3210ea..ede51d663 100644 --- a/tdeio/tdefile/knotifydialog.h +++ b/tdeio/tdefile/knotifydialog.h @@ -195,7 +195,7 @@ namespace KNotify bool handleAllApps = false ); ~KNotifyWidget(); - KListView * eventsView() { + TDEListView * eventsView() { return m_listview; } diff --git a/tdeio/tdefile/knotifywidgetbase.ui b/tdeio/tdefile/knotifywidgetbase.ui index d3c3103ff..023da77d8 100644 --- a/tdeio/tdefile/knotifywidgetbase.ui +++ b/tdeio/tdefile/knotifywidgetbase.ui @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="KListView"> + <widget class="TDEListView"> <column> <property name="text"> <string></string> diff --git a/tdeio/tdefile/kopenwith.cpp b/tdeio/tdefile/kopenwith.cpp index 691487730..8582e31f0 100644 --- a/tdeio/tdefile/kopenwith.cpp +++ b/tdeio/tdefile/kopenwith.cpp @@ -69,7 +69,7 @@ // ---------------------------------------------------------------------- -KAppTreeListItem::KAppTreeListItem( KListView* parent, const TQString & name, +KAppTreeListItem::KAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c ) : TQListViewItem( parent, name ) { @@ -145,7 +145,7 @@ bool KAppTreeListItem::isDirectory() // ---------------------------------------------------------------------- TDEApplicationTree::TDEApplicationTree( TQWidget *parent ) - : KListView( parent ), currentitem(0) + : TDEListView( parent ), currentitem(0) { addColumn( i18n("Known Applications") ); setRootIsDecorated( true ); @@ -281,7 +281,7 @@ void TDEApplicationTree::resizeEvent( TQResizeEvent * e) { setColumnWidth(0, width()-TQApplication::style().pixelMetric(TQStyle::PM_ScrollBarExtent) -2*TQApplication::style().pixelMetric(TQStyle::PM_DefaultFrameWidth)); - KListView::resizeEvent(e); + TDEListView::resizeEvent(e); } // Prune empty directories from the tree diff --git a/tdeio/tdefile/kopenwith_p.h b/tdeio/tdefile/kopenwith_p.h index 8231da27d..ca9317fb6 100644 --- a/tdeio/tdefile/kopenwith_p.h +++ b/tdeio/tdefile/kopenwith_p.h @@ -51,7 +51,7 @@ protected: void init(const TQPixmap& pixmap, bool parse, bool dir, const TQString &_path, const TQString &exec); public: - KAppTreeListItem( KListView* parent, const TQString & name, const TQPixmap& pixmap, + KAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c ); KAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c ); @@ -69,7 +69,7 @@ protected: /** * @internal */ -class TDEApplicationTree : public KListView +class TDEApplicationTree : public TDEListView { Q_OBJECT public: diff --git a/tdeio/tdefile/kpropertiesdesktopbase.ui b/tdeio/tdefile/kpropertiesdesktopbase.ui index a0894dc70..9c08eef93 100644 --- a/tdeio/tdefile/kpropertiesdesktopbase.ui +++ b/tdeio/tdefile/kpropertiesdesktopbase.ui @@ -52,7 +52,7 @@ <p>If you want to associate this application with one or more mimetypes that are not in this list, click on the button <b>Add</b> below. If there are one or more filetypes that this application cannot handle, you may want to remove them from the list clicking on the button <b>Remove</b> below.</p></qt></string> </property> </widget> - <widget class="KListView" row="7" column="0" rowspan="1" colspan="7"> + <widget class="TDEListView" row="7" column="0" rowspan="1" colspan="7"> <column> <property name="text"> <string>Mimetype</string> diff --git a/tdeio/tdefile/kpropertiesdialog.cpp b/tdeio/tdefile/kpropertiesdialog.cpp index 0e9f125a6..fdbef4fea 100644 --- a/tdeio/tdefile/kpropertiesdialog.cpp +++ b/tdeio/tdefile/kpropertiesdialog.cpp @@ -498,7 +498,7 @@ void KPropertiesDialog::insertPages() insertPlugin (p); } - if ( kapp->authorizeKAction("sharefile") && + if ( kapp->authorizeTDEAction("sharefile") && KFileSharePropsPlugin::supports( m_items ) ) { KPropsDlgPlugin *p = new KFileSharePropsPlugin( this ); @@ -953,7 +953,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( slotEditFileType() )); - if (!kapp->authorizeKAction("editfiletype")) + if (!kapp->authorizeTDEAction("editfiletype")) button->hide(); #endif diff --git a/tdeio/tdefile/kpropertiesmimetypebase.ui b/tdeio/tdefile/kpropertiesmimetypebase.ui index df7c796da..257eaa57c 100644 --- a/tdeio/tdefile/kpropertiesmimetypebase.ui +++ b/tdeio/tdefile/kpropertiesmimetypebase.ui @@ -30,7 +30,7 @@ <cstring>listView</cstring> </property> </widget> - <widget class="KListView"> + <widget class="TDEListView"> <column> <property name="text"> <string>Mimetype</string> diff --git a/tdeio/tdefile/krecentdirs.cpp b/tdeio/tdefile/krecentdirs.cpp index 6f4a01f3b..0d8d008bd 100644 --- a/tdeio/tdefile/krecentdirs.cpp +++ b/tdeio/tdefile/krecentdirs.cpp @@ -69,7 +69,7 @@ static TDEConfig *recentdirs_readList(TQString &key, TQStringList &result, bool return config; } -TQStringList KRecentDirs::list(const TQString &fileClass) +TQStringList TDERecentDirs::list(const TQString &fileClass) { TQString key = fileClass; TQStringList result; @@ -77,13 +77,13 @@ TQStringList KRecentDirs::list(const TQString &fileClass) return result; } -TQString KRecentDirs::dir(const TQString &fileClass) +TQString TDERecentDirs::dir(const TQString &fileClass) { TQStringList result = list(fileClass); return result[0]; } -void KRecentDirs::add(const TQString &fileClass, const TQString &directory) +void TDERecentDirs::add(const TQString &fileClass, const TQString &directory) { TQString key = fileClass; TQStringList result; diff --git a/tdeio/tdefile/krecentdirs.h b/tdeio/tdefile/krecentdirs.h index 774655e51..cc9be16b4 100644 --- a/tdeio/tdefile/krecentdirs.h +++ b/tdeio/tdefile/krecentdirs.h @@ -47,7 +47,7 @@ * a single ':' the file-class is specific to the current application. * If the file-class starts with '::' it is global to all applications. */ -class TDEIO_EXPORT KRecentDirs +class TDEIO_EXPORT TDERecentDirs { public: /** diff --git a/tdeio/tdefile/krecentdocument.cpp b/tdeio/tdefile/krecentdocument.cpp index 1ec4a98c8..85af01c46 100644 --- a/tdeio/tdefile/krecentdocument.cpp +++ b/tdeio/tdefile/krecentdocument.cpp @@ -42,13 +42,13 @@ #include <sys/types.h> #include <utime.h> -TQString KRecentDocument::recentDocumentDirectory() +TQString TDERecentDocument::recentDocumentDirectory() { // need to change this path, not sure where return locateLocal("data", TQString::fromLatin1("RecentDocuments/")); } -TQStringList KRecentDocument::recentDocuments() +TQStringList TDERecentDocument::recentDocuments() { TQDir d(recentDocumentDirectory(), "*.desktop", TQDir::Time, TQDir::Files | TQDir::Readable | TQDir::Hidden); @@ -72,12 +72,12 @@ TQStringList KRecentDocument::recentDocuments() return fullList; } -void KRecentDocument::add(const KURL& url) +void TDERecentDocument::add(const KURL& url) { - KRecentDocument::add(url, tqApp->argv()[0]); // ### argv[0] might not match the service filename! + TDERecentDocument::add(url, tqApp->argv()[0]); // ### argv[0] might not match the service filename! } -void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) +void TDERecentDocument::add(const KURL& url, const TQString& desktopEntryName) { if ( url.isLocalFile() && !TDEGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/")) return; @@ -85,7 +85,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) TQString openStr = url.url(); openStr.replace( TQRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded - kdDebug(250) << "KRecentDocument::add for " << openStr << endl; + kdDebug(250) << "TDERecentDocument::add for " << openStr << endl; TDEConfig *config = TDEGlobal::config(); TQString oldGrp = config->group(); config->setGroup(TQString::fromLatin1("RecentDocuments")); @@ -148,7 +148,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) conf.writeEntry( TQString::fromLatin1("Icon"), KMimeType::iconForURL( url ) ); } -void KRecentDocument::add(const TQString &openStr, bool isUrl) +void TDERecentDocument::add(const TQString &openStr, bool isUrl) { if( isUrl ) { add( KURL( openStr ) ); @@ -159,7 +159,7 @@ void KRecentDocument::add(const TQString &openStr, bool isUrl) } } -void KRecentDocument::clear() +void TDERecentDocument::clear() { TQStringList list = recentDocuments(); TQDir dir; @@ -167,7 +167,7 @@ void KRecentDocument::clear() dir.remove(*it); } -int KRecentDocument::maximumItems() +int TDERecentDocument::maximumItems() { TDEConfig *config = TDEGlobal::config(); TDEConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments")); diff --git a/tdeio/tdefile/krecentdocument.h b/tdeio/tdefile/krecentdocument.h index 968559968..b788c0dc2 100644 --- a/tdeio/tdefile/krecentdocument.h +++ b/tdeio/tdefile/krecentdocument.h @@ -47,7 +47,7 @@ * * @author Daniel M. Duley <mosfet@kde.org> */ -class TDEIO_EXPORT KRecentDocument +class TDEIO_EXPORT TDERecentDocument { public: diff --git a/tdeio/tdefile/kurlbar.cpp b/tdeio/tdefile/kurlbar.cpp index e142845e1..2642926a1 100644 --- a/tdeio/tdefile/kurlbar.cpp +++ b/tdeio/tdefile/kurlbar.cpp @@ -406,7 +406,7 @@ void KURLBar::setListBox( KURLBarListBox *view ) m_listBox->resize( width(), height() ); } - m_listBox->setSelectionMode( KListBox::Single ); + m_listBox->setSelectionMode( TDEListBox::Single ); paletteChange( palette() ); m_listBox->setFocusPolicy( TQ_TabFocus ); @@ -829,7 +829,7 @@ bool KURLBar::editItem( KURLBarItem *item ) KURLBarListBox::KURLBarListBox( TQWidget *parent, const char *name ) - : KListBox( parent, name ) + : TDEListBox( parent, name ) { m_toolTip = new KURLBarToolTip( this ); setAcceptDrops( true ); @@ -1043,7 +1043,7 @@ void KURLBar::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void KURLBarListBox::virtual_hook( int id, void* data ) -{ KListBox::virtual_hook( id, data ); } +{ TDEListBox::virtual_hook( id, data ); } #include "kurlbar.moc" diff --git a/tdeio/tdefile/kurlbar.h b/tdeio/tdefile/kurlbar.h index 32c05ec58..7470ec82a 100644 --- a/tdeio/tdefile/kurlbar.h +++ b/tdeio/tdefile/kurlbar.h @@ -483,14 +483,14 @@ class TQDragObject; class KURLBarToolTip; /** - * This is the listbox used in KURLBar. It is a subclass of KListBox to support + * This is the listbox used in KURLBar. It is a subclass of TDEListBox to support * drag & drop and to set up the row / column mode. * * The widget has just one row or one column, depending on orientation(). * * @author Carsten Pfeiffer <pfeiffer@kde.org> */ -class TDEIO_EXPORT KURLBarListBox : public KListBox +class TDEIO_EXPORT KURLBarListBox : public TDEListBox { Q_OBJECT diff --git a/tdeio/tdefile/kurlrequester.cpp b/tdeio/tdefile/kurlrequester.cpp index cca8c0529..88b34ea6b 100644 --- a/tdeio/tdefile/kurlrequester.cpp +++ b/tdeio/tdefile/kurlrequester.cpp @@ -226,8 +226,8 @@ void KURLRequester::init() myCompletion = new KURLCompletion(); d->setCompletionObject( myCompletion ); - KAccel *accel = new KAccel( this ); - accel->insert( KStdAccel::Open, TQT_TQOBJECT(this), TQT_SLOT( slotOpenDialog() )); + TDEAccel *accel = new TDEAccel( this ); + accel->insert( TDEStdAccel::Open, TQT_TQOBJECT(this), TQT_SLOT( slotOpenDialog() )); accel->readSettings(); } diff --git a/tdeio/tdefile/kurlrequester.h b/tdeio/tdefile/kurlrequester.h index 55bc0fd83..5655efa5b 100644 --- a/tdeio/tdefile/kurlrequester.h +++ b/tdeio/tdefile/kurlrequester.h @@ -269,7 +269,7 @@ private: protected slots: /** * Called when the button is pressed to open the filedialog. - * Also called when KStdAccel::Open (default is Ctrl-O) is pressed. + * Also called when TDEStdAccel::Open (default is Ctrl-O) is pressed. */ void slotOpenDialog(); diff --git a/tdeio/tdefile/kurlrequesterdlg.cpp b/tdeio/tdefile/kurlrequesterdlg.cpp index 7524ea149..2459f984f 100644 --- a/tdeio/tdefile/kurlrequesterdlg.cpp +++ b/tdeio/tdefile/kurlrequesterdlg.cpp @@ -115,7 +115,7 @@ KURL KURLRequesterDlg::getURL(const TQString& dir, TQWidget *parent, const KURL& url = dlg.selectedURL(); if (url.isValid()) - KRecentDocument::add(url); + TDERecentDocument::add(url); return url; } diff --git a/tdeio/tdefile/tdefilebookmarkhandler.cpp b/tdeio/tdefile/tdefilebookmarkhandler.cpp index ea97b8661..ef1f2a37b 100644 --- a/tdeio/tdefile/tdefilebookmarkhandler.cpp +++ b/tdeio/tdefile/tdefilebookmarkhandler.cpp @@ -32,7 +32,7 @@ KFileBookmarkHandler::KFileBookmarkHandler( KFileDialog *dialog ) KBookmarkOwner(), m_dialog( dialog ) { - m_menu = new KPopupMenu( dialog, "bookmark menu" ); + m_menu = new TDEPopupMenu( dialog, "bookmark menu" ); TQString file = locate( "data", "tdefile/bookmarks.xml" ); if ( file.isEmpty() ) diff --git a/tdeio/tdefile/tdefilebookmarkhandler.h b/tdeio/tdefile/tdefilebookmarkhandler.h index 6535bf961..e13e0673b 100644 --- a/tdeio/tdefile/tdefilebookmarkhandler.h +++ b/tdeio/tdefile/tdefilebookmarkhandler.h @@ -23,7 +23,7 @@ #include <kbookmarkmenu.h> class TQTextStream; -class KPopupMenu; +class TDEPopupMenu; class TDEIO_EXPORT KFileBookmarkHandler : public TQObject, public KBookmarkOwner @@ -40,7 +40,7 @@ public: virtual void openBookmarkURL( const TQString& url ) { emit openURL( url ); } virtual TQString currentURL() const; - KPopupMenu *menu() const { return m_menu; } + TDEPopupMenu *menu() const { return m_menu; } signals: void openURL( const TQString& url ); @@ -49,7 +49,7 @@ private: void importOldBookmarks( const TQString& path, KBookmarkManager *manager ); KFileDialog *m_dialog; - KPopupMenu *m_menu; + TDEPopupMenu *m_menu; KBookmarkMenu *m_bookmarkMenu; protected: diff --git a/tdeio/tdefile/tdefiledetailview.cpp b/tdeio/tdefile/tdefiledetailview.cpp index b989104e8..68691bf6b 100644 --- a/tdeio/tdefile/tdefiledetailview.cpp +++ b/tdeio/tdefile/tdefiledetailview.cpp @@ -56,7 +56,7 @@ public: }; KFileDetailView::KFileDetailView(TQWidget *parent, const char *name) - : KListView(parent, name), KFileView(), d(new KFileDetailViewPrivate()) + : TDEListView(parent, name), KFileView(), d(new KFileDetailViewPrivate()) { // this is always the static section, not the index depending on column order m_sortingCol = COL_NAME; @@ -149,7 +149,7 @@ void KFileDetailView::setSelected( const KFileItem *info, bool enable ) KFileListViewItem *item = (KFileListViewItem*)info->extraData( this ); if ( item ) - KListView::setSelected( item, enable ); + TDEListView::setSelected( item, enable ); } void KFileDetailView::setCurrentItem( const KFileItem *item ) @@ -158,7 +158,7 @@ void KFileDetailView::setCurrentItem( const KFileItem *item ) return; KFileListViewItem *it = (KFileListViewItem*) item->extraData( this ); if ( it ) - KListView::setCurrentItem( it ); + TDEListView::setCurrentItem( it ); } KFileItem * KFileDetailView::currentFileItem() const @@ -172,7 +172,7 @@ KFileItem * KFileDetailView::currentFileItem() const void KFileDetailView::clearSelection() { - KListView::clearSelection(); + TDEListView::clearSelection(); } void KFileDetailView::selectAll() @@ -181,12 +181,12 @@ void KFileDetailView::selectAll() KFileView::selectionMode() == KFile::Single) return; - KListView::selectAll( true ); + TDEListView::selectAll( true ); } void KFileDetailView::invertSelection() { - KListView::invertSelection(); + TDEListView::invertSelection(); } void KFileDetailView::slotActivateMenu (TQListViewItem *item,const TQPoint& pos ) @@ -202,7 +202,7 @@ void KFileDetailView::slotActivateMenu (TQListViewItem *item,const TQPoint& pos void KFileDetailView::clearView() { m_resolver->m_lstPendingMimeIconItems.clear(); - KListView::clear(); + TDEListView::clear(); } void KFileDetailView::insertItem( KFileItem *i ) @@ -415,8 +415,8 @@ void KFileDetailView::slotSortingChanged( int col ) } } - KListView::setSorting( m_sortingCol, !reversed ); - KListView::sort(); + TDEListView::setSorting( m_sortingCol, !reversed ); + TDEListView::sort(); if ( !m_blockSortingSignal ) sig->changeSorting( static_cast<TQDir::SortSpec>( sortSpec ) ); @@ -459,7 +459,7 @@ void KFileDetailView::ensureItemVisible( const KFileItem *i ) KFileListViewItem *item = (KFileListViewItem*) i->extraData( this ); if ( item ) - KListView::ensureItemVisible( item ); + TDEListView::ensureItemVisible( item ); } // we're in multiselection mode @@ -504,7 +504,7 @@ KFileItem * KFileDetailView::prevItem( const KFileItem *fileItem ) const void KFileDetailView::keyPressEvent( TQKeyEvent *e ) { - KListView::keyPressEvent( e ); + TDEListView::keyPressEvent( e ); if ( e->key() == Key_Return || e->key() == Key_Enter ) { if ( e->state() & ControlButton ) @@ -680,7 +680,7 @@ void KFileListViewItem::init() void KFileDetailView::virtual_hook( int id, void* data ) -{ KListView::virtual_hook( id, data ); +{ TDEListView::virtual_hook( id, data ); KFileView::virtual_hook( id, data ); } #include "tdefiledetailview.moc" diff --git a/tdeio/tdefile/tdefiledetailview.h b/tdeio/tdefile/tdefiledetailview.h index 0f17b3ca9..1e2d19a6b 100644 --- a/tdeio/tdefile/tdefiledetailview.h +++ b/tdeio/tdefile/tdefiledetailview.h @@ -34,12 +34,12 @@ class TQKeyEvent; * An item for the listiew, that has a reference to its corresponding * KFileItem. */ -class TDEIO_EXPORT KFileListViewItem : public KListViewItem +class TDEIO_EXPORT KFileListViewItem : public TDEListViewItem { public: KFileListViewItem( TQListView *parent, const TQString &text, const TQPixmap &icon, KFileItem *fi ) - : KListViewItem( parent, text ), inf( fi ) { + : TDEListViewItem( parent, text ), inf( fi ) { setPixmap( 0, icon ); setText( 0, text ); } @@ -48,14 +48,14 @@ public: * @since 3.1 */ KFileListViewItem( TQListView *parent, KFileItem *fi ) - : KListViewItem( parent ), inf( fi ) { + : TDEListViewItem( parent ), inf( fi ) { init(); } KFileListViewItem( TQListView *parent, const TQString &text, const TQPixmap &icon, KFileItem *fi, TQListViewItem *after) - : KListViewItem( parent, after ), inf( fi ) { + : TDEListViewItem( parent, after ), inf( fi ) { setPixmap( 0, icon ); setText( 0, text ); } @@ -106,7 +106,7 @@ private: * @see KCombiView * @see KFileIconView */ -class TDEIO_EXPORT KFileDetailView : public KListView, public KFileView +class TDEIO_EXPORT KFileDetailView : public TDEListView, public KFileView { Q_OBJECT @@ -193,9 +193,9 @@ private slots: void slotAutoOpen(); private: - virtual void insertItem(TQListViewItem *i) { KListView::insertItem(i); } - virtual void setSorting(int i, bool b) { KListView::setSorting(i, b); } - virtual void setSelected(TQListViewItem *i, bool b) { KListView::setSelected(i, b); } + virtual void insertItem(TQListViewItem *i) { TDEListView::insertItem(i); } + virtual void setSorting(int i, bool b) { TDEListView::setSorting(i, b); } + virtual void setSelected(TQListViewItem *i, bool b) { TDEListView::setSelected(i, b); } inline KFileListViewItem * viewItem( const KFileItem *item ) const { if ( item ) diff --git a/tdeio/tdefile/tdefiledialog.cpp b/tdeio/tdefile/tdefiledialog.cpp index 4fb399716..f60692c88 100644 --- a/tdeio/tdefile/tdefiledialog.cpp +++ b/tdeio/tdefile/tdefiledialog.cpp @@ -153,7 +153,7 @@ struct KFileDialogPrivate bool hasDefaultFilter :1; // necessary for the operationMode KFileDialog::OperationMode operationMode; - // The file class used for KRecentDirs + // The file class used for TDERecentDirs TQString fileClass; KFileBookmarkHandler *bookmarkHandler; @@ -648,7 +648,7 @@ void KFileDialog::accept() *lastDirectory = ops->url(); if (!d->fileClass.isEmpty()) - KRecentDirs::add(d->fileClass, ops->url().url()); + TDERecentDirs::add(d->fileClass, ops->url().url()); // clear the topmost item, we insert it as full path later on as item 1 locationEdit->changeItem( TQString::null, 0 ); @@ -832,7 +832,7 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge d->urlBar = 0; // delayed loading TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceQToolBar ); - toolbar = new KToolBar( d->mainWidget, "KFileDialog::toolbar", true); + toolbar = new TDEToolBar( d->mainWidget, "KFileDialog::toolbar", true); toolbar->setFlat(true); tqInstallMsgHandler( oldHandler ); @@ -905,7 +905,7 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge ops->setupMenu(KDirOperator::SortActions | KDirOperator::FileActions | KDirOperator::ViewActions); - KActionCollection *coll = ops->actionCollection(); + TDEActionCollection *coll = ops->actionCollection(); // plug nav items into the toolbar coll->action( "up" )->plug( toolbar ); @@ -922,19 +922,19 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge coll->action( "mkdir" )->plug( toolbar ); coll->action( "mkdir" )->setWhatsThis(i18n("Click this button to create a new folder.")); - KToggleAction *showSidebarAction = - new KToggleAction(i18n("Show Quick Access Navigation Panel"), Key_F9, coll,"toggleSpeedbar"); + TDEToggleAction *showSidebarAction = + new TDEToggleAction(i18n("Show Quick Access Navigation Panel"), Key_F9, coll,"toggleSpeedbar"); showSidebarAction->setCheckedState(i18n("Hide Quick Access Navigation Panel")); connect( showSidebarAction, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( toggleSpeedbar( bool )) ); - KToggleAction *showBookmarksAction = - new KToggleAction(i18n("Show Bookmarks"), 0, coll, "toggleBookmarks"); + TDEToggleAction *showBookmarksAction = + new TDEToggleAction(i18n("Show Bookmarks"), 0, coll, "toggleBookmarks"); showBookmarksAction->setCheckedState(i18n("Hide Bookmarks")); connect( showBookmarksAction, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( toggleBookmarks( bool )) ); - KActionMenu *menu = new KActionMenu( i18n("Configure"), "configure", TQT_TQOBJECT(this), "extra menu" ); + TDEActionMenu *menu = new TDEActionMenu( i18n("Configure"), "configure", TQT_TQOBJECT(this), "extra menu" ); menu->setWhatsThis(i18n("<qt>This is the configuration menu for the file dialog. " "Various options can be accessed from this menu including: <ul>" "<li>how files are sorted in the list</li>" @@ -965,15 +965,15 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge menu->plug( toolbar ); //Insert a separator. - KToolBarSeparator* spacerWidget = new KToolBarSeparator(Qt::Horizontal, false /*no line*/, + TDEToolBarSeparator* spacerWidget = new TDEToolBarSeparator(Qt::Horizontal, false /*no line*/, toolbar); d->m_pathComboIndex = toolbar->insertWidget(-1, -1, spacerWidget); toolbar->insertWidget(PATH_COMBO, 0, d->pathCombo); toolbar->setItemAutoSized (PATH_COMBO); - toolbar->setIconText(KToolBar::IconOnly); - toolbar->setBarPos(KToolBar::Top); + toolbar->setIconText(TDEToolBar::IconOnly); + toolbar->setBarPos(TDEToolBar::Top); toolbar->setMovingEnabled(false); toolbar->adjustSize(); @@ -1609,7 +1609,7 @@ TQString KFileDialog::getSaveFileName(const TQString& dir, const TQString& filte TQString filename = dlg.selectedFile(); if (!filename.isEmpty()) - KRecentDocument::add(filename); + TDERecentDocument::add(filename); return filename; } @@ -1638,7 +1638,7 @@ TQString KFileDialog::getSaveFileNameWId(const TQString& dir, const TQString& fi TQString filename = dlg.selectedFile(); if (!filename.isEmpty()) - KRecentDocument::add(filename); + TDERecentDocument::add(filename); return filename; } @@ -1658,7 +1658,7 @@ KURL KFileDialog::getSaveURL(const TQString& dir, const TQString& filter, KURL url = dlg.selectedURL(); if (url.isValid()) - KRecentDocument::add( url ); + TDERecentDocument::add( url ); return url; } @@ -2189,7 +2189,7 @@ void KFileDialog::addToRecentDocuments() TQStringList files = selectedFiles(); TQStringList::ConstIterator it = files.begin(); for ( ; it != files.end(); ++it ) - KRecentDocument::add( *it ); + TDERecentDocument::add( *it ); } else { // urls @@ -2197,12 +2197,12 @@ void KFileDialog::addToRecentDocuments() KURL::List::ConstIterator it = urls.begin(); for ( ; it != urls.end(); ++it ) { if ( (*it).isValid() ) - KRecentDocument::add( *it ); + TDERecentDocument::add( *it ); } } } -KActionCollection * KFileDialog::actionCollection() const +TDEActionCollection * KFileDialog::actionCollection() const { return ops->actionCollection(); } @@ -2251,7 +2251,7 @@ void KFileDialog::toggleSpeedbar( bool show ) ops->actionCollection()->action( "home" )->plug( toolbar, 3 ); } - static_cast<KToggleAction *>(actionCollection()->action("toggleSpeedbar"))->setChecked( show ); + static_cast<TDEToggleAction *>(actionCollection()->action("toggleSpeedbar"))->setChecked( show ); } void KFileDialog::toggleBookmarks(bool show) @@ -2286,7 +2286,7 @@ void KFileDialog::toggleBookmarks(bool show) toolbar->removeItem(HOTLIST_BUTTON); } - static_cast<KToggleAction *>(actionCollection()->action("toggleBookmarks"))->setChecked( show ); + static_cast<TDEToggleAction *>(actionCollection()->action("toggleBookmarks"))->setChecked( show ); } int KFileDialog::pathComboIndex() @@ -2318,7 +2318,7 @@ KURL KFileDialog::getStartURL( const TQString& startDir, if (startDir[0] == ':') { recentDirClass = startDir; - ret = KURL::fromPathOrURL( KRecentDirs::dir(recentDirClass) ); + ret = KURL::fromPathOrURL( TDERecentDirs::dir(recentDirClass) ); } else { diff --git a/tdeio/tdefile/tdefiledialog.h b/tdeio/tdefile/tdefiledialog.h index ae591b21a..b7310b599 100644 --- a/tdeio/tdefile/tdefiledialog.h +++ b/tdeio/tdefile/tdefiledialog.h @@ -40,7 +40,7 @@ class TQLabel; class TQPopupMenu; class TQVBoxLayout; -class KActionCollection; +class TDEActionCollection; class KDirOperator; class KURLBar; class KURLComboBox; @@ -48,7 +48,7 @@ class KFileFilterCombo; class KFileView; class KFileItem; class KPushButton; -class KToolBar; +class TDEToolBar; class KPreviewWidgetBase; struct KFileDialogPrivate; @@ -713,13 +713,13 @@ public: * You can use this to insert custom * items into it, e.g.: * \code - * yourAction = new KAction( i18n("Your Action"), 0, + * yourAction = new TDEAction( i18n("Your Action"), 0, * this, TQT_SLOT( yourSlot() ), * this, "action name" ); * yourAction->plug( tdefileDialog->toolBar() ); * \endcode */ - KToolBar *toolBar() const { return toolbar; } + TDEToolBar *toolBar() const { return toolbar; } /** * @returns a pointer to the OK-Button in the filedialog. You may use it @@ -752,9 +752,9 @@ public: /** * @returns a pointer to the action collection, holding all the used - * KActions. + * TDEActions. */ - KActionCollection *actionCollection() const; + TDEActionCollection *actionCollection() const; /** * @returns the index of the path combobox so when inserting widgets into @@ -769,7 +769,7 @@ public: * @param startDir A url/directory, to be used. May use the ':' and '::' syntax * as documented in the KFileDialog() constructor. * @param recentDirClass If the ':' or '::' syntax is used, recentDirClass - * will contain the string to be used later for KRecentDir::dir() + * will contain the string to be used later for TDERecentDir::dir() * @return The URL that should be listed by default (e.g. by KFileDialog or * KDirSelectDialog). * @since 3.1 @@ -820,7 +820,7 @@ signals: void filterChanged( const TQString& filter ); protected: - KToolBar *toolbar; + TDEToolBar *toolbar; static KURL *lastDirectory; diff --git a/tdeio/tdefile/tdefileiconview.cpp b/tdeio/tdefile/tdefileiconview.cpp index 474364042..d42373893 100644 --- a/tdeio/tdefile/tdefileiconview.cpp +++ b/tdeio/tdefile/tdefileiconview.cpp @@ -60,12 +60,12 @@ public: noArrangement = false; ignoreMaximumSize = false; - smallColumns = new KRadioAction( i18n("Small Icons"), 0, TQT_TQOBJECT(parent), + smallColumns = new TDERadioAction( i18n("Small Icons"), 0, TQT_TQOBJECT(parent), TQT_SLOT( slotSmallColumns() ), parent->actionCollection(), "small columns" ); - largeRows = new KRadioAction( i18n("Large Icons"), 0, TQT_TQOBJECT(parent), + largeRows = new TDERadioAction( i18n("Large Icons"), 0, TQT_TQOBJECT(parent), TQT_SLOT( slotLargeRows() ), parent->actionCollection(), "large rows" ); @@ -73,7 +73,7 @@ public: smallColumns->setExclusiveGroup(TQString::fromLatin1("IconView mode")); largeRows->setExclusiveGroup(TQString::fromLatin1("IconView mode")); - previews = new KToggleAction( i18n("Thumbnail Previews"), 0, + previews = new TDEToggleAction( i18n("Thumbnail Previews"), 0, parent->actionCollection(), "show previews" ); zoomIn = KStdAction::zoomIn( TQT_TQOBJECT(parent), TQT_SLOT( zoomIn() ), @@ -99,9 +99,9 @@ public: job->kill(); } - KRadioAction *smallColumns, *largeRows; - KAction *zoomIn, *zoomOut; - KToggleAction *previews; + TDERadioAction *smallColumns, *largeRows; + TDEAction *zoomIn, *zoomOut; + TDEToggleAction *previews; TDEIO::PreviewJob *job; KFileIconViewItem *dropItem; TQTimer previewTimer; diff --git a/tdeio/tdefile/tdefilepreview.cpp b/tdeio/tdefile/tdefilepreview.cpp index 4e9365361..4b336afee 100644 --- a/tdeio/tdefile/tdefilepreview.cpp +++ b/tdeio/tdefile/tdefilepreview.cpp @@ -254,7 +254,7 @@ KFileItem * KFilePreview::prevItem( const KFileItem *item ) const return left->prevItem( item ); } -KActionCollection * KFilePreview::actionCollection() const +TDEActionCollection * KFilePreview::actionCollection() const { if ( left ) return left->actionCollection(); diff --git a/tdeio/tdefile/tdefilepreview.h b/tdeio/tdefile/tdefilepreview.h index 5bc59dba5..16cfa281b 100644 --- a/tdeio/tdefile/tdefilepreview.h +++ b/tdeio/tdefile/tdefilepreview.h @@ -89,10 +89,10 @@ public: /** * This overrides KFileView::actionCollection() by returning * the actionCollection() of the KFileView (member left) it contains. - * This means that KFilePreview will never create a KActionCollection + * This means that KFilePreview will never create a TDEActionCollection * object of its own. */ - virtual KActionCollection * actionCollection() const; + virtual TDEActionCollection * actionCollection() const; void ensureItemVisible(const KFileItem *); diff --git a/tdeio/tdefile/tdefiletreeview.cpp b/tdeio/tdefile/tdefiletreeview.cpp index 480c58ec3..fd7d630e1 100644 --- a/tdeio/tdefile/tdefiletreeview.cpp +++ b/tdeio/tdefile/tdefiletreeview.cpp @@ -40,12 +40,12 @@ #include "tdefiletreeviewitem.h" KFileTreeView::KFileTreeView( TQWidget *parent, const char *name ) - : KListView( parent, name ), + : TDEListView( parent, name ), m_wantOpenFolderPixmaps( true ), m_toolTip( this ) { setDragEnabled(true); - setSelectionModeExt( KListView::Single ); + setSelectionModeExt( TDEListView::Single ); m_animationTimer = new TQTimer( this ); connect( m_animationTimer, TQT_SIGNAL( timeout() ), @@ -235,8 +235,8 @@ bool KFileTreeView::acceptDrag(TQDropEvent* e ) const // kdDebug(250) << "canDecode: " << KURLDrag::canDecode(e) << endl; // kdDebug(250) << "action: " << e->action() << endl; - /* KListView::acceptDrag(e); */ - /* this is what KListView does: + /* TDEListView::acceptDrag(e); */ + /* this is what TDEListView does: * acceptDrops() && itemsMovable() && (e->source()==viewport()); * ask acceptDrops and itemsMovable, but not the third */ @@ -672,6 +672,6 @@ void KFileTreeViewToolTip::maybeTip( const TQPoint & ) } void KFileTreeView::virtual_hook( int id, void* data ) -{ KListView::virtual_hook( id, data ); } +{ TDEListView::virtual_hook( id, data ); } #include "tdefiletreeview.moc" diff --git a/tdeio/tdefile/tdefiletreeview.h b/tdeio/tdefile/tdefiletreeview.h index 11d695288..3d6e039f5 100644 --- a/tdeio/tdefile/tdefiletreeview.h +++ b/tdeio/tdefile/tdefiletreeview.h @@ -63,7 +63,7 @@ private: * 3. retrieve the root item with KFileTreeBranch::root() and set it open * if desired. That starts the listing. */ -class TDEIO_EXPORT KFileTreeView : public KListView +class TDEIO_EXPORT KFileTreeView : public TDEListView { Q_OBJECT public: diff --git a/tdeio/tdefile/tdefiletreeviewitem.cpp b/tdeio/tdefile/tdefiletreeviewitem.cpp index 4df2daaa1..3f7e5a485 100644 --- a/tdeio/tdefile/tdefiletreeviewitem.cpp +++ b/tdeio/tdefile/tdefiletreeviewitem.cpp @@ -29,7 +29,7 @@ KFileTreeViewItem::KFileTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch ) - : KListViewItem( parent ), + : TDEListViewItem( parent ), m_tdefileitem( item ), m_branch( brnch ), m_wasListed(false) @@ -42,7 +42,7 @@ KFileTreeViewItem::KFileTreeViewItem( KFileTreeViewItem *parent, KFileTreeViewItem::KFileTreeViewItem( KFileTreeView* parent, KFileItem* item, KFileTreeBranch *brnch ) - :KListViewItem( (TQListView*)parent ), + :TDEListViewItem( (TQListView*)parent ), m_tdefileitem(item ), m_branch( brnch ), m_wasListed(false) diff --git a/tdeio/tdefile/tdefiletreeviewitem.h b/tdeio/tdefile/tdefiletreeviewitem.h index 8fdb2789c..4455bff78 100644 --- a/tdeio/tdefile/tdefiletreeviewitem.h +++ b/tdeio/tdefile/tdefiletreeviewitem.h @@ -37,7 +37,7 @@ class KFileTreeItem; /** * An item for a KFileTreeView that knows about its own KFileItem. */ -class TDEIO_EXPORT KFileTreeViewItem : public KListViewItem +class TDEIO_EXPORT KFileTreeViewItem : public TDEListViewItem { public: KFileTreeViewItem( KFileTreeViewItem*, KFileItem*, KFileTreeBranch * ); diff --git a/tdeio/tdefile/tdefileview.cpp b/tdeio/tdefile/tdefileview.cpp index 558053cc8..01bc5e6b0 100644 --- a/tdeio/tdefile/tdefileview.cpp +++ b/tdeio/tdefile/tdefileview.cpp @@ -55,7 +55,7 @@ public: } } - TQGuardedPtr<KActionCollection> actions; + TQGuardedPtr<TDEActionCollection> actions; int dropOptions; }; @@ -362,10 +362,10 @@ void KFileView::listingCompleted() // empty default impl. } -KActionCollection * KFileView::actionCollection() const +TDEActionCollection * KFileView::actionCollection() const { if ( !d->actions ) - d->actions = new KActionCollection( widget(), "KFileView::d->actions" ); + d->actions = new TDEActionCollection( widget(), "KFileView::d->actions" ); return d->actions; } diff --git a/tdeio/tdefile/tdefileview.h b/tdeio/tdefile/tdefileview.h index 79aa1b478..b80c16f0f 100644 --- a/tdeio/tdefile/tdefileview.h +++ b/tdeio/tdefile/tdefileview.h @@ -23,7 +23,7 @@ #define TDEFILEVIEW_H class TQPoint; -class KActionCollection; +class TDEActionCollection; #include <tqwidget.h> @@ -342,7 +342,7 @@ public: * add its actions here (if it has any) to make them available to * e.g. the KDirOperator's popup-menu. */ - virtual KActionCollection * actionCollection() const; + virtual TDEActionCollection * actionCollection() const; KFileViewSignaler * signaler() const { return sig; } diff --git a/tdeio/tdefile/tests/tdefiletreeviewtest.cpp b/tdeio/tdefile/tests/tdefiletreeviewtest.cpp index b74468fda..008edb827 100644 --- a/tdeio/tdefile/tests/tdefiletreeviewtest.cpp +++ b/tdeio/tdefile/tests/tdefiletreeviewtest.cpp @@ -33,7 +33,7 @@ #include "tdefiletreeviewtest.moc" -testFrame::testFrame():KMainWindow(0,"Test FileTreeView"), +testFrame::testFrame():TDEMainWindow(0,"Test FileTreeView"), dirOnlyMode(false) { diff --git a/tdeio/tdefile/tests/tdefiletreeviewtest.h b/tdeio/tdefile/tests/tdefiletreeviewtest.h index 05f41fcfb..0375f8d11 100644 --- a/tdeio/tdefile/tests/tdefiletreeviewtest.h +++ b/tdeio/tdefile/tests/tdefiletreeviewtest.h @@ -20,7 +20,7 @@ #ifndef TDEFILETREEVIEWTEST #define TDEFILETREEVIEWTEST -class testFrame: public KMainWindow +class testFrame: public TDEMainWindow { Q_OBJECT public: diff --git a/tdeio/tdeio/kdatatool.cpp b/tdeio/tdeio/kdatatool.cpp index 3f4f0a865..5ec790aa7 100644 --- a/tdeio/tdeio/kdatatool.cpp +++ b/tdeio/tdeio/kdatatool.cpp @@ -217,7 +217,7 @@ bool KDataToolInfo::isValid() const *************************************************/ KDataToolAction::KDataToolAction( const TQString & text, const KDataToolInfo & info, const TQString & command, TQObject * parent, const char * name ) - : KAction( text, info.iconName(), 0, parent, name ), + : TDEAction( text, info.iconName(), 0, parent, name ), m_command( command ), m_info( info ) { @@ -228,13 +228,13 @@ void KDataToolAction::slotActivated() emit toolActivated( m_info, m_command ); } -TQPtrList<KAction> KDataToolAction::dataToolActionList( const TQValueList<KDataToolInfo> & tools, const TQObject *receiver, const char* slot ) +TQPtrList<TDEAction> KDataToolAction::dataToolActionList( const TQValueList<KDataToolInfo> & tools, const TQObject *receiver, const char* slot ) { - TQPtrList<KAction> actionList; + TQPtrList<TDEAction> actionList; if ( tools.isEmpty() ) return actionList; - actionList.append( new KActionSeparator() ); + actionList.append( new TDEActionSeparator() ); TQValueList<KDataToolInfo>::ConstIterator entry = tools.begin(); for( ; entry != tools.end(); ++entry ) { @@ -277,7 +277,7 @@ TDEInstance* KDataTool::instance() const } void KDataToolAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +{ TDEAction::virtual_hook( id, data ); } void KDataTool::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } diff --git a/tdeio/tdeio/kdatatool.h b/tdeio/tdeio/kdatatool.h index 6cb9353a8..bd787dcd5 100644 --- a/tdeio/tdeio/kdatatool.h +++ b/tdeio/tdeio/kdatatool.h @@ -191,7 +191,7 @@ private: * The slot defined for step 2 is called when the action is activated, and * that's where the tool should be created and run. */ -class TDEIO_EXPORT KDataToolAction : public KAction +class TDEIO_EXPORT KDataToolAction : public TDEAction { Q_OBJECT @@ -215,9 +215,9 @@ public: * @param tools the list of data tool descriptions * @param receiver the receiver for toolActivated() signals * @param slot the slot that will receive the toolActivated() signals - * @return the KActions + * @return the TDEActions */ - static TQPtrList<KAction> dataToolActionList( const TQValueList<KDataToolInfo> & tools, const TQObject *receiver, const char* slot ); + static TQPtrList<TDEAction> dataToolActionList( const TQValueList<KDataToolInfo> & tools, const TQObject *receiver, const char* slot ); signals: /** diff --git a/tdeio/tdeio/kmimetypechooser.cpp b/tdeio/tdeio/kmimetypechooser.cpp index 51db75fe1..7c74a9a41 100644 --- a/tdeio/tdeio/kmimetypechooser.cpp +++ b/tdeio/tdeio/kmimetypechooser.cpp @@ -37,7 +37,7 @@ class KMimeTypeChooserPrivate { public: - KListView *lvMimeTypes; + TDEListView *lvMimeTypes; TQPushButton *btnEditMimeType; TQString defaultgroup; @@ -70,7 +70,7 @@ KMimeTypeChooser::KMimeTypeChooser( const TQString &text, new TQLabel( text, this ); } - d->lvMimeTypes = new KListView( this ); + d->lvMimeTypes = new TDEListView( this ); d->lvMimeTypes->addColumn( i18n("Mime Type") ); // d->lvMimeTypes->setColumnWidthMode( 0, TQListView::Manual ); diff --git a/tdeio/tdeio/krun.cpp b/tdeio/tdeio/krun.cpp index b243671b4..dd6de164c 100644 --- a/tdeio/tdeio/krun.cpp +++ b/tdeio/tdeio/krun.cpp @@ -211,7 +211,7 @@ bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles ) bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const TQString& suggestedFileName ) { - if (kapp && !kapp->authorizeKAction("openwith")) + if (kapp && !kapp->authorizeTDEAction("openwith")) { // TODO: Better message, i18n freeze :-( KMessageBox::sorry(0L, i18n("You are not authorized to open this file.")); @@ -780,8 +780,8 @@ pid_t KRun::run( const KService& _service, const KURL::List& _urls, TQWidget* wi // Remember we opened those urls, for the "recent documents" menu in kicker KURL::List::ConstIterator it = _urls.begin(); for(; it != _urls.end(); ++it) { - //kdDebug(7010) << "KRecentDocument::adding " << (*it).url() << endl; - KRecentDocument::add( *it, _service.desktopEntryName() ); + //kdDebug(7010) << "TDERecentDocument::adding " << (*it).url() << endl; + TDERecentDocument::add( *it, _service.desktopEntryName() ); } } diff --git a/tdeio/tdeio/paste.h b/tdeio/tdeio/paste.h index 6fdf1b2a4..aff67934c 100644 --- a/tdeio/tdeio/paste.h +++ b/tdeio/tdeio/paste.h @@ -114,7 +114,7 @@ namespace TDEIO { /** * Returns the text to use for the Paste action, when the application supports * pasting files, urls, and clipboard data, using pasteClipboard(). - * @return a string suitable for KAction::setText, or an empty string if pasting + * @return a string suitable for TDEAction::setText, or an empty string if pasting * isn't possible right now. * * @since 3.5 diff --git a/tdeio/tdeio/scheduler.cpp b/tdeio/tdeio/scheduler.cpp index c0aad7d38..01bcde298 100644 --- a/tdeio/tdeio/scheduler.cpp +++ b/tdeio/tdeio/scheduler.cpp @@ -130,7 +130,7 @@ Scheduler::Scheduler() coSlaveTimer(0, "Scheduler::coSlaveTimer"), cleanupTimer(0, "Scheduler::cleanupTimer") { - checkOnHold = true; // !! Always check with KLauncher for the first request. + checkOnHold = true; // !! Always check with TDELauncher for the first request. slaveOnHold = 0; protInfoDict = new ProtocolInfoDict; slaveList = new SlaveList; diff --git a/tdeio/tdeio/scheduler.h b/tdeio/tdeio/scheduler.h index 08efafc32..3b9b23d92 100644 --- a/tdeio/tdeio/scheduler.h +++ b/tdeio/tdeio/scheduler.h @@ -175,7 +175,7 @@ namespace TDEIO { { self()->_removeSlaveOnHold(); } /** - * Send the slave that was put on hold back to KLauncher. This + * Send the slave that was put on hold back to TDELauncher. This * allows another process to take over the slave and resume the job * that was started. */ @@ -231,7 +231,7 @@ namespace TDEIO { { return self()->_disconnectSlave(slave); } /** - * Send the slave that was put on hold back to KLauncher. This + * Send the slave that was put on hold back to TDELauncher. This * allows another process to take over the slave and resume the job * the that was started. * Register the mainwindow @p wid with the KIO subsystem @@ -273,9 +273,9 @@ namespace TDEIO { { return TQObject::connect(sender, signal, member); } /** - * When true, the next job will check whether KLauncher has a slave + * When true, the next job will check whether TDELauncher has a slave * on hold that is suitable for the job. - * @param b true when KLauncher has a job on hold + * @param b true when TDELauncher has a job on hold */ static void checkSlaveOnHold(bool b) { self()->_checkSlaveOnHold(b); } diff --git a/tdeio/tdeio/slave.cpp b/tdeio/tdeio/slave.cpp index dfd6d6bb3..380be2058 100644 --- a/tdeio/tdeio/slave.cpp +++ b/tdeio/tdeio/slave.cpp @@ -233,7 +233,7 @@ void Slave::hold(const KURL &url) emit slaveDied(this); } deref(); - // Call KLauncher::waitForSlave(pid); + // Call TDELauncher::waitForSlave(pid); { DCOPClient *client = kapp->dcopClient(); if (!client->isAttached()) diff --git a/tdeio/tests/tdeioslavetest.cpp b/tdeio/tests/tdeioslavetest.cpp index 5fa19073c..26534b840 100644 --- a/tdeio/tests/tdeioslavetest.cpp +++ b/tdeio/tests/tdeioslavetest.cpp @@ -29,7 +29,7 @@ using namespace TDEIO; KioslaveTest::KioslaveTest( TQString src, TQString dest, uint op, uint pr ) - : KMainWindow(0, "") + : TDEMainWindow(0, "") { job = 0L; diff --git a/tdeio/tests/tdeioslavetest.h b/tdeio/tests/tdeioslavetest.h index f2cb32af1..667cb2856 100644 --- a/tdeio/tests/tdeioslavetest.h +++ b/tdeio/tests/tdeioslavetest.h @@ -26,7 +26,7 @@ #include "tdeio/statusbarprogress.h" #include "tdeio/slave.h" -class KioslaveTest : public KMainWindow { +class KioslaveTest : public TDEMainWindow { Q_OBJECT public: diff --git a/tdemdi/tdemdi/guiclient.cpp b/tdemdi/tdemdi/guiclient.cpp index 2d1e6a68a..536508992 100644 --- a/tdemdi/tdemdi/guiclient.cpp +++ b/tdemdi/tdemdi/guiclient.cpp @@ -76,21 +76,21 @@ GUIClient::GUIClient (KMDI::MainWindow* mdiMainFrm,const char* name) if (actionCollection()->kaccel()==0) actionCollection()->setWidget(mdiMainFrm); - m_toolMenu=new KActionMenu(i18n("Tool &Views"),actionCollection(),"tdemdi_toolview_menu"); + m_toolMenu=new TDEActionMenu(i18n("Tool &Views"),actionCollection(),"tdemdi_toolview_menu"); - m_gotoToolDockMenu=new KActionMenu(i18n("Tool &Docks"),actionCollection(),"tdemdi_tooldock_menu"); - m_gotoToolDockMenu->insert(new KAction(i18n("Switch Top Dock"),ALT+CTRL+SHIFT+Key_T,this,TQT_SIGNAL(toggleTop()), + m_gotoToolDockMenu=new TDEActionMenu(i18n("Tool &Docks"),actionCollection(),"tdemdi_tooldock_menu"); + m_gotoToolDockMenu->insert(new TDEAction(i18n("Switch Top Dock"),ALT+CTRL+SHIFT+Key_T,this,TQT_SIGNAL(toggleTop()), actionCollection(),"tdemdi_activate_top")); - m_gotoToolDockMenu->insert(new KAction(i18n("Switch Left Dock"),ALT+CTRL+SHIFT+Key_L,this,TQT_SIGNAL(toggleLeft()), + m_gotoToolDockMenu->insert(new TDEAction(i18n("Switch Left Dock"),ALT+CTRL+SHIFT+Key_L,this,TQT_SIGNAL(toggleLeft()), actionCollection(),"tdemdi_activate_left")); - m_gotoToolDockMenu->insert(new KAction(i18n("Switch Right Dock"),ALT+CTRL+SHIFT+Key_R,this,TQT_SIGNAL(toggleRight()), + m_gotoToolDockMenu->insert(new TDEAction(i18n("Switch Right Dock"),ALT+CTRL+SHIFT+Key_R,this,TQT_SIGNAL(toggleRight()), actionCollection(),"tdemdi_activate_right")); - m_gotoToolDockMenu->insert(new KAction(i18n("Switch Bottom Dock"),ALT+CTRL+SHIFT+Key_B,this,TQT_SIGNAL(toggleBottom()), + m_gotoToolDockMenu->insert(new TDEAction(i18n("Switch Bottom Dock"),ALT+CTRL+SHIFT+Key_B,this,TQT_SIGNAL(toggleBottom()), actionCollection(),"tdemdi_activate_bottom")); - m_gotoToolDockMenu->insert(new KActionSeparator(actionCollection(),"tdemdi_goto_menu_separator")); - m_gotoToolDockMenu->insert(new KAction(i18n("Previous Tool View"),ALT+CTRL+Key_Left,TQT_TQOBJECT(m_mdiMainFrm),TQT_SLOT(prevToolViewInDock()), + m_gotoToolDockMenu->insert(new TDEActionSeparator(actionCollection(),"tdemdi_goto_menu_separator")); + m_gotoToolDockMenu->insert(new TDEAction(i18n("Previous Tool View"),ALT+CTRL+Key_Left,TQT_TQOBJECT(m_mdiMainFrm),TQT_SLOT(prevToolViewInDock()), actionCollection(),"tdemdi_prev_toolview")); - m_gotoToolDockMenu->insert(new KAction(i18n("Next Tool View"),ALT+CTRL+Key_Right,TQT_TQOBJECT(m_mdiMainFrm),TQT_SLOT(nextToolViewInDock()), + m_gotoToolDockMenu->insert(new TDEAction(i18n("Next Tool View"),ALT+CTRL+Key_Right,TQT_TQOBJECT(m_mdiMainFrm),TQT_SLOT(nextToolViewInDock()), actionCollection(),"tdemdi_next_toolview")); actionCollection()->readShortcutSettings( "Shortcuts", kapp->config() ); @@ -115,7 +115,7 @@ void GUIClient::setupActions() unplugActionList( actionListName ); - TQPtrList<KAction> addList; + TQPtrList<TDEAction> addList; if (m_toolViewActions.count()<3) { for (uint i=0;i<m_toolViewActions.count();i++) @@ -138,14 +138,14 @@ void GUIClient::addToolView(KMDI::ToolViewAccessor* mtva) TQString aname = TQString("tdemdi_toolview_") + mtva->wrappedWidget()->name(); // try to read the action shortcut - KShortcut sc; + TDEShortcut sc; TDEConfig *cfg = kapp->config(); TQString _grp = cfg->group(); cfg->setGroup("Shortcuts"); - sc = KShortcut( cfg->readEntry( aname, "" ) ); + sc = TDEShortcut( cfg->readEntry( aname, "" ) ); cfg->setGroup( _grp ); - KAction *a=new ToggleToolViewAction(i18n("Show %1").arg(mtva->wrappedWidget()->caption()), + TDEAction *a=new ToggleToolViewAction(i18n("Show %1").arg(mtva->wrappedWidget()->caption()), /*TQString::null*/sc,tqt_dynamic_cast<KDockWidget*>(mtva->wrapperWidget()), m_mdiMainFrm,actionCollection(), aname.latin1() ); @@ -162,7 +162,7 @@ void GUIClient::addToolView(KMDI::ToolViewAccessor* mtva) void GUIClient::actionDeleted(TQObject* a) { - m_toolViewActions.remove(static_cast<KAction*>(a)); + m_toolViewActions.remove(static_cast<TDEAction*>(a)); setupActions(); } @@ -173,9 +173,9 @@ void GUIClient::clientAdded( KXMLGUIClient *client ) setupActions(); } -ToggleToolViewAction::ToggleToolViewAction ( const TQString& text, const KShortcut& cut,KDockWidget *dw, KMDI::MainWindow *mdiMainFrm, +ToggleToolViewAction::ToggleToolViewAction ( const TQString& text, const TDEShortcut& cut,KDockWidget *dw, KMDI::MainWindow *mdiMainFrm, TQObject* parent, const char* name ) - : KToggleAction(text,cut,parent,name) + : TDEToggleAction(text,cut,parent,name) , m_dw(dw) , m_mdiMainFrm(mdiMainFrm) { diff --git a/tdemdi/tdemdi/guiclient.h b/tdemdi/tdemdi/guiclient.h index 4d1609ce6..5c8822a0a 100644 --- a/tdemdi/tdemdi/guiclient.h +++ b/tdemdi/tdemdi/guiclient.h @@ -28,8 +28,8 @@ #include <tdemdi/global.h> -class KMainWindow; -class KToolBar; +class TDEMainWindow; +class TDEToolBar; namespace KMDI { class MainWindow; @@ -67,21 +67,21 @@ class GUIClient : public TQObject, public KXMLGUIClient GUIClientPrivate *d; TQGuardedPtr<KMDI::MainWindow> m_mdiMainFrm; - TQPtrList<KAction> m_toolViewActions; - TQPtrList<KAction> m_documentViewActions; + TQPtrList<TDEAction> m_toolViewActions; + TQPtrList<TDEAction> m_documentViewActions; - KActionMenu *m_docMenu; - KActionMenu *m_toolMenu; + TDEActionMenu *m_docMenu; + TDEActionMenu *m_toolMenu; - KActionMenu *m_gotoToolDockMenu; + TDEActionMenu *m_gotoToolDockMenu; }; -class ToggleToolViewAction:public KToggleAction +class ToggleToolViewAction:public TDEToggleAction { Q_OBJECT public: - ToggleToolViewAction ( const TQString& text, const KShortcut& cut = KShortcut(), + ToggleToolViewAction ( const TQString& text, const TDEShortcut& cut = TDEShortcut(), KDockWidget *dw=0,KMDI::MainWindow *mdiMainFrm=0, TQObject* parent = 0, const char* name = 0 ); virtual ~ToggleToolViewAction(); diff --git a/tdemdi/tdemdi/toolviewaccessor_p.h b/tdemdi/tdemdi/toolviewaccessor_p.h index 71ffb286a..db2eb9dc8 100644 --- a/tdemdi/tdemdi/toolviewaccessor_p.h +++ b/tdemdi/tdemdi/toolviewaccessor_p.h @@ -48,7 +48,7 @@ class ToolViewAccessorPrivate TQGuardedPtr<KDockWidget> widgetContainer; TQWidget *widget; - TQGuardedPtr<KAction> action; + TQGuardedPtr<TDEAction> action; }; } diff --git a/tdemdi/tdemdidocumentviewtabwidget.h b/tdemdi/tdemdidocumentviewtabwidget.h index 668ef5b87..8b8025cbf 100644 --- a/tdemdi/tdemdidocumentviewtabwidget.h +++ b/tdemdi/tdemdidocumentviewtabwidget.h @@ -13,7 +13,7 @@ #include <ktabwidget.h> #include <tdemdidefines.h> -class KPopupMenu; +class TDEPopupMenu; //KDE4: Add a d pointer /** diff --git a/tdemdi/tdemdiguiclient.cpp b/tdemdi/tdemdiguiclient.cpp index 51c693f6e..449157b7a 100644 --- a/tdemdi/tdemdiguiclient.cpp +++ b/tdemdi/tdemdiguiclient.cpp @@ -57,9 +57,9 @@ using namespace KMDIPrivate; -ToggleToolViewAction::ToggleToolViewAction( const TQString& text, const KShortcut& cut, KDockWidget *dw, KMdiMainFrm *mdiMainFrm, +ToggleToolViewAction::ToggleToolViewAction( const TQString& text, const TDEShortcut& cut, KDockWidget *dw, KMdiMainFrm *mdiMainFrm, TQObject* parent, const char* name ) - : KToggleAction( text, cut, parent, name ), m_dw( dw ), m_mdiMainFrm( mdiMainFrm ) + : TDEToggleAction( text, cut, parent, name ), m_dw( dw ), m_mdiMainFrm( mdiMainFrm ) { if ( m_dw ) { @@ -136,10 +136,10 @@ KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, c if ( actionCollection() ->kaccel() == 0 ) actionCollection() ->setWidget( mdiMainFrm ); - m_toolMenu = new KActionMenu( i18n( "Tool &Views" ), actionCollection(), "tdemdi_toolview_menu" ); + m_toolMenu = new TDEActionMenu( i18n( "Tool &Views" ), actionCollection(), "tdemdi_toolview_menu" ); if ( showMDIModeAction ) { - m_mdiModeAction = new KSelectAction( i18n( "MDI Mode" ), 0, actionCollection() ); + m_mdiModeAction = new TDESelectAction( i18n( "MDI Mode" ), 0, actionCollection() ); TQStringList modes; modes << i18n( "&Toplevel Mode" ) << i18n( "C&hildframe Mode" ) << i18n( "Ta&b Page Mode" ) << i18n( "I&DEAl Mode" ); m_mdiModeAction->setItems( modes ); @@ -151,19 +151,19 @@ KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, c connect( m_mdiMainFrm, TQT_SIGNAL( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ), this, TQT_SLOT( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ) ); - m_gotoToolDockMenu = new KActionMenu( i18n( "Tool &Docks" ), actionCollection(), "tdemdi_tooldock_menu" ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Top Dock" ), ALT + CTRL + SHIFT + Key_T, this, TQT_SIGNAL( toggleTop() ), + m_gotoToolDockMenu = new TDEActionMenu( i18n( "Tool &Docks" ), actionCollection(), "tdemdi_tooldock_menu" ); + m_gotoToolDockMenu->insert( new TDEAction( i18n( "Switch Top Dock" ), ALT + CTRL + SHIFT + Key_T, this, TQT_SIGNAL( toggleTop() ), actionCollection(), "tdemdi_activate_top" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Left Dock" ), ALT + CTRL + SHIFT + Key_L, this, TQT_SIGNAL( toggleLeft() ), + m_gotoToolDockMenu->insert( new TDEAction( i18n( "Switch Left Dock" ), ALT + CTRL + SHIFT + Key_L, this, TQT_SIGNAL( toggleLeft() ), actionCollection(), "tdemdi_activate_left" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Right Dock" ), ALT + CTRL + SHIFT + Key_R, this, TQT_SIGNAL( toggleRight() ), + m_gotoToolDockMenu->insert( new TDEAction( i18n( "Switch Right Dock" ), ALT + CTRL + SHIFT + Key_R, this, TQT_SIGNAL( toggleRight() ), actionCollection(), "tdemdi_activate_right" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Bottom Dock" ), ALT + CTRL + SHIFT + Key_B, this, TQT_SIGNAL( toggleBottom() ), + m_gotoToolDockMenu->insert( new TDEAction( i18n( "Switch Bottom Dock" ), ALT + CTRL + SHIFT + Key_B, this, TQT_SIGNAL( toggleBottom() ), actionCollection(), "tdemdi_activate_bottom" ) ); - m_gotoToolDockMenu->insert( new KActionSeparator( actionCollection(), "tdemdi_goto_menu_separator" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Previous Tool View" ), ALT + CTRL + Key_Left, TQT_TQOBJECT(m_mdiMainFrm), TQT_SLOT( prevToolViewInDock() ), + m_gotoToolDockMenu->insert( new TDEActionSeparator( actionCollection(), "tdemdi_goto_menu_separator" ) ); + m_gotoToolDockMenu->insert( new TDEAction( i18n( "Previous Tool View" ), ALT + CTRL + Key_Left, TQT_TQOBJECT(m_mdiMainFrm), TQT_SLOT( prevToolViewInDock() ), actionCollection(), "tdemdi_prev_toolview" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Next Tool View" ), ALT + CTRL + Key_Right, TQT_TQOBJECT(m_mdiMainFrm), TQT_SLOT( nextToolViewInDock() ), + m_gotoToolDockMenu->insert( new TDEAction( i18n( "Next Tool View" ), ALT + CTRL + Key_Right, TQT_TQOBJECT(m_mdiMainFrm), TQT_SLOT( nextToolViewInDock() ), actionCollection(), "tdemdi_next_toolview" ) ); actionCollection() ->readShortcutSettings( "Shortcuts", kapp->config() ); @@ -224,10 +224,10 @@ void KMDIGUIClient::setupActions() // m_toolBars = builder.toolBars(); - // m_toolViewActions.append(new KAction( "TESTKMDIGUICLIENT", TQString::null, 0, + // m_toolViewActions.append(new TDEAction( "TESTKMDIGUICLIENT", TQString::null, 0, // this, TQT_SLOT(blah()),actionCollection(),"nothing")); - TQPtrList<KAction> addList; + TQPtrList<TDEAction> addList; if ( m_toolViewActions.count() < 3 ) for ( uint i = 0;i < m_toolViewActions.count();i++ ) addList.append( m_toolViewActions.at( i ) ); @@ -250,14 +250,14 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva ) TQString aname = TQString( "tdemdi_toolview_" ) + mtva->wrappedWidget() ->name(); // try to read the action shortcut - KShortcut sc; + TDEShortcut sc; TDEConfig *cfg = kapp->config(); TQString _grp = cfg->group(); cfg->setGroup( "Shortcuts" ); // if ( cfg->hasKey( aname ) ) - sc = KShortcut( cfg->readEntry( aname, "" ) ); + sc = TDEShortcut( cfg->readEntry( aname, "" ) ); cfg->setGroup( _grp ); - KAction *a = new ToggleToolViewAction( i18n( "Show %1" ).arg( mtva->wrappedWidget() ->caption() ), + TDEAction *a = new ToggleToolViewAction( i18n( "Show %1" ).arg( mtva->wrappedWidget() ->caption() ), /*TQString::null*/sc, tqt_dynamic_cast<KDockWidget*>( mtva->wrapperWidget() ), m_mdiMainFrm, actionCollection(), aname.latin1() ); #if KDE_IS_VERSION(3,2,90) @@ -275,8 +275,8 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva ) void KMDIGUIClient::actionDeleted( TQObject* a ) { - m_toolViewActions.remove( static_cast<KAction*>( a ) ); - /* if (!m_toolMenu.isNull()) m_toolMenu->remove(static_cast<KAction*>(a));*/ + m_toolViewActions.remove( static_cast<TDEAction*>( a ) ); + /* if (!m_toolMenu.isNull()) m_toolMenu->remove(static_cast<TDEAction*>(a));*/ setupActions(); } diff --git a/tdemdi/tdemdiguiclient.h b/tdemdi/tdemdiguiclient.h index ba899a2a0..22f9e51f0 100644 --- a/tdemdi/tdemdiguiclient.h +++ b/tdemdi/tdemdiguiclient.h @@ -25,8 +25,8 @@ #include <kaction.h> #include "tdemdidefines.h" -class KMainWindow; -class KToolBar; +class TDEMainWindow; +class TDEToolBar; class KMdiToolViewAccessor; class KMdiMainFrm; class KDockWidget; @@ -104,26 +104,26 @@ private: KMdi::MdiMode m_mdiMode; TQGuardedPtr<KMdiMainFrm> m_mdiMainFrm; - TQPtrList<KAction> m_toolViewActions; - TQPtrList<KAction> m_documentViewActions; + TQPtrList<TDEAction> m_toolViewActions; + TQPtrList<TDEAction> m_documentViewActions; - KActionMenu *m_docMenu; - KActionMenu *m_toolMenu; - KSelectAction *m_mdiModeAction; + TDEActionMenu *m_docMenu; + TDEActionMenu *m_toolMenu; + TDESelectAction *m_mdiModeAction; - KActionMenu *m_gotoToolDockMenu; + TDEActionMenu *m_gotoToolDockMenu; }; /** - * A KToggleAction specifically for toggling the showing + * A TDEToggleAction specifically for toggling the showing * or the hiding of a KMDI tool view */ -class KMDI_EXPORT ToggleToolViewAction: public KToggleAction +class KMDI_EXPORT ToggleToolViewAction: public TDEToggleAction { Q_OBJECT public: - ToggleToolViewAction( const TQString& text, const KShortcut& cut = KShortcut(), KDockWidget *dw = 0, KMdiMainFrm *mdiMainFrm = 0, + ToggleToolViewAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), KDockWidget *dw = 0, KMdiMainFrm *mdiMainFrm = 0, TQObject* parent = 0, const char* name = 0 ); virtual ~ToggleToolViewAction(); diff --git a/tdemdi/tdemdimainfrm.cpp b/tdemdi/tdemdimainfrm.cpp index 05bb7a4ca..6f14c09bd 100644 --- a/tdemdi/tdemdimainfrm.cpp +++ b/tdemdi/tdemdimainfrm.cpp @@ -132,7 +132,7 @@ public: KMdiFocusList *focusList; int m_styleIDEAlMode; int m_toolviewStyle; - KAction *closeWindowAction; + TDEAction *closeWindowAction; }; //============ constructor ============// @@ -217,7 +217,7 @@ KMdiMainFrm::KMdiMainFrm( TQWidget* parentWidget, const char* name, KMdi::MdiMod m_pPlacingMenu = new TQPopupMenu( this, "placing_menu" ); - d->closeWindowAction = new KAction(i18n("&Close"), KStdAccel::close(), + d->closeWindowAction = new TDEAction(i18n("&Close"), TDEStdAccel::close(), TQT_TQOBJECT(this), TQT_SLOT(closeActiveView()), actionCollection(), "window_close"); // the MDI view taskbar @@ -1196,10 +1196,10 @@ bool KMdiMainFrm::eventFilter( TQObject * /*obj*/, TQEvent *e ) { if ( switching() ) { - KAction * a = actionCollection() ->action( "view_last_window" ) ; + TDEAction * a = actionCollection() ->action( "view_last_window" ) ; if ( a ) { - const KShortcut cut( a->shortcut() ); + const TDEShortcut cut( a->shortcut() ); const KKeySequence& seq = cut.seq( 0 ); const KKey& key = seq.key( 0 ); int modFlags = key.modFlags(); @@ -1222,7 +1222,7 @@ bool KMdiMainFrm::eventFilter( TQObject * /*obj*/, TQEvent *e ) } else { - kdDebug(760) << "KAction( \"view_last_window\") not found." << endl; + kdDebug(760) << "TDEAction( \"view_last_window\") not found." << endl; } } } diff --git a/tdemdi/tdemditaskbar.cpp b/tdemdi/tdemditaskbar.cpp index 98e479f1e..3dcb901ab 100644 --- a/tdemdi/tdemditaskbar.cpp +++ b/tdemdi/tdemditaskbar.cpp @@ -145,7 +145,7 @@ TQString KMdiTaskBarButton::actualText() const //#################################################################### KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, TQMainWindow::ToolBarDock dock ) - : KToolBar( parent, "KMdiTaskBar", /*honor_style*/ false, /*readConfig*/ true ) + : TDEToolBar( parent, "KMdiTaskBar", /*honor_style*/ false, /*readConfig*/ true ) , m_pCurrentFocusedWindow( 0 ) , m_pStretchSpace( 0 ) , m_layoutIsPending( false ) @@ -388,7 +388,7 @@ void KMdiTaskBar::resizeEvent( TQResizeEvent* rse ) layoutTaskBar( rse->size().width() ); } } - KToolBar::resizeEvent( rse ); + TDEToolBar::resizeEvent( rse ); } // kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; diff --git a/tdemdi/tdemditaskbar.h b/tdemdi/tdemditaskbar.h index ec968a75d..9c853e7cf 100644 --- a/tdemdi/tdemditaskbar.h +++ b/tdemdi/tdemditaskbar.h @@ -126,7 +126,7 @@ class KMdiTaskBarPrivate; * KMdiTaskBarButtons can be added or removed dynamically.<br> * The button sizes are adjusted dynamically, as well. */ -class KMDI_EXPORT KMdiTaskBar : public KToolBar +class KMDI_EXPORT KMdiTaskBar : public TDEToolBar { Q_OBJECT public: diff --git a/tdemdi/tdemditoolviewaccessor_p.h b/tdemdi/tdemditoolviewaccessor_p.h index 81e770e85..c3812792f 100644 --- a/tdemdi/tdemditoolviewaccessor_p.h +++ b/tdemdi/tdemditoolviewaccessor_p.h @@ -42,7 +42,7 @@ public: } TQGuardedPtr<KDockWidget> widgetContainer; TQWidget* widget; - TQGuardedPtr<KAction> action; + TQGuardedPtr<TDEAction> action; }; diff --git a/tdemdi/test/mainwidget.cpp b/tdemdi/test/mainwidget.cpp index fd166ee95..a95af3d2f 100644 --- a/tdemdi/test/mainwidget.cpp +++ b/tdemdi/test/mainwidget.cpp @@ -107,7 +107,7 @@ void MainWidget::resizeEvent( TQResizeEvent *pRSE) setSysButtonsAtMenuPosition(); } -RestartWidget::RestartWidget():KMainWindow() +RestartWidget::RestartWidget():TDEMainWindow() { mdimode=KMdi::ChildframeMode; TQVBoxLayout* bl = new TQVBoxLayout(this); diff --git a/tdemdi/test/mainwidget.h b/tdemdi/test/mainwidget.h index 74ec7a654..7de1f9570 100644 --- a/tdemdi/test/mainwidget.h +++ b/tdemdi/test/mainwidget.h @@ -48,7 +48,7 @@ private: * This allows me to test KMdiMainFrm::read/writeDockConfig by * closing and restarting the MainWidget via checkbox click. */ -class RestartWidget : public KMainWindow +class RestartWidget : public TDEMainWindow { Q_OBJECT // methods diff --git a/tdeparts/mainwindow.cpp b/tdeparts/mainwindow.cpp index 37fc97acd..5f0a31a91 100644 --- a/tdeparts/mainwindow.cpp +++ b/tdeparts/mainwindow.cpp @@ -58,21 +58,21 @@ public: } MainWindow::MainWindow( TQWidget* parent, const char *name, WFlags f ) - : KMainWindow( parent, name, f ) + : TDEMainWindow( parent, name, f ) { d = new MainWindowPrivate(); PartBase::setPartObject( TQT_TQOBJECT(this) ); } MainWindow::MainWindow( const char *name, WFlags f ) - : KMainWindow( 0L, name, f ) + : TDEMainWindow( 0L, name, f ) { d = new MainWindowPrivate(); PartBase::setPartObject( TQT_TQOBJECT(this) ); } MainWindow::MainWindow( int cflags, TQWidget* parent, const char *name, WFlags f ) - : KMainWindow( cflags, parent, name, f ) + : TDEMainWindow( cflags, parent, name, f ) { d = new MainWindowPrivate(); PartBase::setPartObject( TQT_TQOBJECT(this) ); diff --git a/tdeparts/mainwindow.h b/tdeparts/mainwindow.h index b99527c00..4619a72cc 100644 --- a/tdeparts/mainwindow.h +++ b/tdeparts/mainwindow.h @@ -41,15 +41,15 @@ class MainWindowPrivate; * and don't forget to call setXMLFile() in the inherited constructor. * * It implements all internal interfaces in the case of a - * KMainWindow as host: the builder and servant interface (for menu + * TDEMainWindow as host: the builder and servant interface (for menu * merging). */ -class KPARTS_EXPORT MainWindow : public KMainWindow, virtual public PartBase +class KPARTS_EXPORT MainWindow : public TDEMainWindow, virtual public PartBase { Q_OBJECT public: /** - * Constructor, same signature as KMainWindow. + * Constructor, same signature as TDEMainWindow. */ #ifdef qdoc MainWindow( TQWidget* parent, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose ); @@ -65,7 +65,7 @@ class KPARTS_EXPORT MainWindow : public KMainWindow, virtual public PartBase MainWindow( const char *name = 0L, WFlags f = (WFlags)WDestructiveClose ); #endif /** - * Constructor with creation flags, see KMainWindow. + * Constructor with creation flags, see TDEMainWindow. * @since 3.2 */ #ifdef qdoc diff --git a/tdeparts/part.cpp b/tdeparts/part.cpp index 034dc00b4..9372adc08 100644 --- a/tdeparts/part.cpp +++ b/tdeparts/part.cpp @@ -204,7 +204,7 @@ void Part::setWidget( TQWidget *widget ) // Since KParts objects are XML-based, shortcuts should // be connected to the widget when the XML settings - // are processed, rather than on KAction construction. + // are processed, rather than on TDEAction construction. actionCollection()->setAutoConnectShortcuts( false ); } diff --git a/tdeparts/part.h b/tdeparts/part.h index 530da61c3..7550bce38 100644 --- a/tdeparts/part.h +++ b/tdeparts/part.h @@ -29,8 +29,8 @@ class TDEInstance; class TQWidget; -class KAction; -class KActionCollection; +class TDEAction; +class TDEActionCollection; class TQEvent; struct QUnknownInterface; @@ -554,7 +554,7 @@ public: * Destructor. * Applications using a ReadWritePart should make sure, before * destroying it, to call closeURL(). - * In KMainWindow::queryClose(), for instance, they should allow + * In TDEMainWindow::queryClose(), for instance, they should allow * closing only if the return value of closeURL() was true. * This allows to cancel. */ @@ -578,7 +578,7 @@ public: /** * If the document has been modified, ask the user to save changes. - * This method is meant to be called from KMainWindow::queryClose(). + * This method is meant to be called from TDEMainWindow::queryClose(). * It will also be called from closeURL(). * * @return true if closeURL() can be called without the user losing @@ -605,7 +605,7 @@ public: /** * Call this method instead of the above if you need control if * the save prompt is shown. For example, if you call queryClose() - * from KMainWindow::queryClose(), you would not want to prompt + * from TDEMainWindow::queryClose(), you would not want to prompt * again when closing the url. * * Equivalent to promptToSave ? closeURL() : ReadOnlyPart::closeURL() diff --git a/tdeparts/statusbarextension.cpp b/tdeparts/statusbarextension.cpp index 02dd79acb..f0c7204ae 100644 --- a/tdeparts/statusbarextension.cpp +++ b/tdeparts/statusbarextension.cpp @@ -135,7 +135,7 @@ KStatusBar * StatusBarExtension::statusBar() const { if ( !m_statusBar ) { TQWidget* w = static_cast<KParts::ReadOnlyPart*>(parent())->widget(); - KMainWindow* mw = tqt_dynamic_cast<KMainWindow *>( w->topLevelWidget() ); + TDEMainWindow* mw = tqt_dynamic_cast<TDEMainWindow *>( w->topLevelWidget() ); if ( mw ) m_statusBar = mw->statusBar(); } diff --git a/tdeparts/statusbarextension.h b/tdeparts/statusbarextension.h index fa635a12b..8e6ea062d 100644 --- a/tdeparts/statusbarextension.h +++ b/tdeparts/statusbarextension.h @@ -27,7 +27,7 @@ #include <tdelibs_export.h> class KStatusBar; -class KMainWindow; +class TDEMainWindow; class TQEvent; namespace KParts @@ -87,7 +87,7 @@ namespace KParts void removeStatusBarItem( TQWidget * widget ); /** - * @return the statusbar of the KMainWindow in which this part is currently embedded. + * @return the statusbar of the TDEMainWindow in which this part is currently embedded. * WARNING: this could return 0L */ KStatusBar* statusBar() const; @@ -95,7 +95,7 @@ namespace KParts /** * This allows the hosting application to set a particular KStatusBar * for this part. If it doesn't do this, the statusbar used will be - * the one of the KMainWindow in which the part is embedded. + * the one of the TDEMainWindow in which the part is embedded. * Konqueror uses this to assign a view-statusbar to the part. * The part should never call this method! */ diff --git a/tdeparts/tests/example.cpp b/tdeparts/tests/example.cpp index e8495ffe9..34a96a334 100644 --- a/tdeparts/tests/example.cpp +++ b/tdeparts/tests/example.cpp @@ -32,19 +32,19 @@ Shell::Shell() m_part1 = new Part1(this, m_splitter); m_part2 = new Part2(this, m_splitter); - KActionCollection *coll = actionCollection(); + TDEActionCollection *coll = actionCollection(); - (void)new KAction( "&View local file", 0, this, TQT_SLOT( slotFileOpen() ), coll, "open_local_file" ); - (void)new KAction( "&View remote file", 0, this, TQT_SLOT( slotFileOpenRemote() ), coll, "open_remote_file" ); + (void)new TDEAction( "&View local file", 0, this, TQT_SLOT( slotFileOpen() ), coll, "open_local_file" ); + (void)new TDEAction( "&View remote file", 0, this, TQT_SLOT( slotFileOpenRemote() ), coll, "open_remote_file" ); - m_paEditFile = new KAction( "&Edit file", 0, this, TQT_SLOT( slotFileEdit() ), coll, "edit_file" ); - m_paCloseEditor = new KAction( "&Close file editor", 0, this, TQT_SLOT( slotFileCloseEditor() ), coll, "close_editor" ); + m_paEditFile = new TDEAction( "&Edit file", 0, this, TQT_SLOT( slotFileEdit() ), coll, "edit_file" ); + m_paCloseEditor = new TDEAction( "&Close file editor", 0, this, TQT_SLOT( slotFileCloseEditor() ), coll, "close_editor" ); m_paCloseEditor->setEnabled(false); - KAction * paQuit = new KAction( "&Quit", 0, this, TQT_SLOT( close() ), coll, "shell_quit" ); + TDEAction * paQuit = new TDEAction( "&Quit", 0, this, TQT_SLOT( close() ), coll, "shell_quit" ); paQuit->setIconSet(TQIconSet(BarIcon("exit"))); - (void)new KAction( "Yet another menu item", 0, coll, "shell_yami" ); - (void)new KAction( "Yet another submenu item", 0, coll, "shell_yasmi" ); + (void)new TDEAction( "Yet another menu item", 0, coll, "shell_yami" ); + (void)new TDEAction( "Yet another submenu item", 0, coll, "shell_yasmi" ); setCentralWidget( m_splitter ); m_splitter->setMinimumSize( 400, 300 ); diff --git a/tdeparts/tests/example.h b/tdeparts/tests/example.h index b4bdead61..76541437d 100644 --- a/tdeparts/tests/example.h +++ b/tdeparts/tests/example.h @@ -5,7 +5,7 @@ #include <tdeparts/partmanager.h> #include <tdeparts/mainwindow.h> -class KAction; +class TDEAction; class TQWidget; class Shell : public KParts::MainWindow @@ -26,8 +26,8 @@ protected: private: - KAction * m_paEditFile; - KAction * m_paCloseEditor; + TDEAction * m_paEditFile; + TDEAction * m_paCloseEditor; KParts::ReadOnlyPart *m_part1; KParts::Part *m_part2; diff --git a/tdeparts/tests/ghostview.cpp b/tdeparts/tests/ghostview.cpp index c94823aaf..c365bcfcb 100644 --- a/tdeparts/tests/ghostview.cpp +++ b/tdeparts/tests/ghostview.cpp @@ -20,10 +20,10 @@ Shell::Shell() { setXMLFile( "ghostviewtest_shell.rc" ); - KAction * paOpen = new KAction( "&Open file" , "fileopen", 0, this, + TDEAction * paOpen = new TDEAction( "&Open file" , "fileopen", 0, this, TQT_SLOT( slotFileOpen() ), actionCollection(), "file_open" ); - KAction * paQuit = new KAction( "&Quit" , "exit", 0, this, TQT_SLOT( close() ), actionCollection(), "file_quit" ); + TDEAction * paQuit = new TDEAction( "&Quit" , "exit", 0, this, TQT_SLOT( close() ), actionCollection(), "file_quit" ); // Try to find a postscript component first TDETrader::OfferList offers = TDETrader::self()->query("application/postscript", "('KParts/ReadOnlyPart' in ServiceTypes) or ('Browser/View' in ServiceTypes)"); diff --git a/tdeparts/tests/normalktm.cpp b/tdeparts/tests/normalktm.cpp index 277f3ccde..b3907402e 100644 --- a/tdeparts/tests/normalktm.cpp +++ b/tdeparts/tests/normalktm.cpp @@ -29,21 +29,21 @@ Shell::Shell() TQPopupMenu * pFile = new TQPopupMenu( this ); menuBar()->insertItem( "File", pFile ); TQObject * coll = this; - KAction * paLocal = new KAction( "&View local file", 0, this, TQT_SLOT( slotFileOpen() ), coll, "open_local_file" ); + TDEAction * paLocal = new TDEAction( "&View local file", 0, this, TQT_SLOT( slotFileOpen() ), coll, "open_local_file" ); // No XML : we need to plug our actions ourselves paLocal->plug( pFile ); - KAction * paRemote = new KAction( "&View remote file", 0, this, TQT_SLOT( slotFileOpenRemote() ), coll, "open_remote_file" ); + TDEAction * paRemote = new TDEAction( "&View remote file", 0, this, TQT_SLOT( slotFileOpenRemote() ), coll, "open_remote_file" ); paRemote->plug( pFile ); - m_paEditFile = new KAction( "&Edit file", 0, this, TQT_SLOT( slotFileEdit() ), coll, "edit_file" ); + m_paEditFile = new TDEAction( "&Edit file", 0, this, TQT_SLOT( slotFileEdit() ), coll, "edit_file" ); m_paEditFile->plug( pFile ); - m_paCloseEditor = new KAction( "&Close file editor", 0, this, TQT_SLOT( slotFileCloseEditor() ), coll, "close_editor" ); + m_paCloseEditor = new TDEAction( "&Close file editor", 0, this, TQT_SLOT( slotFileCloseEditor() ), coll, "close_editor" ); m_paCloseEditor->setEnabled(false); m_paCloseEditor->plug( pFile ); - KAction * paQuit = new KAction( "&Quit", 0, this, TQT_SLOT( close() ), coll, "shell_quit" ); + TDEAction * paQuit = new TDEAction( "&Quit", 0, this, TQT_SLOT( close() ), coll, "shell_quit" ); paQuit->setIconSet(TQIconSet(BarIcon("exit"))); paQuit->plug( pFile ); diff --git a/tdeparts/tests/normalktm.h b/tdeparts/tests/normalktm.h index 26a93a52a..7183690f0 100644 --- a/tdeparts/tests/normalktm.h +++ b/tdeparts/tests/normalktm.h @@ -5,10 +5,10 @@ #include <tdeparts/part.h> #include <kmainwindow.h> -class KAction; +class TDEAction; class TQWidget; -class Shell : public KMainWindow +class Shell : public TDEMainWindow { Q_OBJECT public: @@ -26,8 +26,8 @@ protected: private: - KAction * m_paEditFile; - KAction * m_paCloseEditor; + TDEAction * m_paEditFile; + TDEAction * m_paCloseEditor; KParts::ReadOnlyPart *m_part1; KParts::Part *m_part2; diff --git a/tdeparts/tests/notepad.cpp b/tdeparts/tests/notepad.cpp index 6494288cd..f2b43ccda 100644 --- a/tdeparts/tests/notepad.cpp +++ b/tdeparts/tests/notepad.cpp @@ -26,7 +26,7 @@ NotepadPart::NotepadPart( TQWidget* parentWidget, const char*, m_edit = new TQMultiLineEdit( parentWidget, "NotepadPart's multiline edit" ); setWidget( m_edit ); - (void)new KAction( "Search and replace", 0, this, TQT_SLOT( slotSearchReplace() ), actionCollection(), "searchreplace" ); + (void)new TDEAction( "Search and replace", 0, this, TQT_SLOT( slotSearchReplace() ), actionCollection(), "searchreplace" ); setXMLFile( "notepadpart.rc" ); setReadWrite( true ); } diff --git a/tdeparts/tests/parts.cpp b/tdeparts/tests/parts.cpp index 2fc63c225..f41063ef9 100644 --- a/tdeparts/tests/parts.cpp +++ b/tdeparts/tests/parts.cpp @@ -27,7 +27,7 @@ Part1::Part1( TQObject *parent, TQWidget * parentWidget ) setWidget( m_edit ); setXMLFile( "tdepartstest_part1.rc" ); - /*KAction * paBlah = */ new KAction( "Blah", "filemail", 0, actionCollection(), "p1_blah" ); + /*TDEAction * paBlah = */ new TDEAction( "Blah", "filemail", 0, actionCollection(), "p1_blah" ); } Part1::~Part1() diff --git a/tdeparts/tests/plugin_spellcheck.cpp b/tdeparts/tests/plugin_spellcheck.cpp index 5521bf22f..dcdf33312 100644 --- a/tdeparts/tests/plugin_spellcheck.cpp +++ b/tdeparts/tests/plugin_spellcheck.cpp @@ -11,7 +11,7 @@ PluginSpellCheck::PluginSpellCheck( TQObject* parent, const char* name, const TQStringList& ) : Plugin( parent, name ) { - (void) new KAction( "&Select current line (plugin)", 0, this, TQT_SLOT(slotSpellCheck()), + (void) new TDEAction( "&Select current line (plugin)", 0, this, TQT_SLOT(slotSpellCheck()), actionCollection(), "spellcheck" ); } diff --git a/tdeprint/cups/cupsdconf2/editlist.cpp b/tdeprint/cups/cupsdconf2/editlist.cpp index 754c9659e..fbdafbdb9 100644 --- a/tdeprint/cups/cupsdconf2/editlist.cpp +++ b/tdeprint/cups/cupsdconf2/editlist.cpp @@ -29,7 +29,7 @@ EditList::EditList(TQWidget *parent, const char *name) : TQWidget(parent, name) { - list_ = new KListBox(this); + list_ = new TDEListBox(this); addbtn_ = new KPushButton(KGuiItem(i18n("Add..."), "filenew"), this); editbtn_ = new KPushButton(KGuiItem(i18n("Edit..."), "edit"), this); delbtn_ = new KPushButton(KGuiItem(i18n("Delete"), "editdelete"), this); diff --git a/tdeprint/cups/cupsdconf2/editlist.h b/tdeprint/cups/cupsdconf2/editlist.h index a0fc7ee0a..19a2da8c8 100644 --- a/tdeprint/cups/cupsdconf2/editlist.h +++ b/tdeprint/cups/cupsdconf2/editlist.h @@ -23,7 +23,7 @@ #include <tqwidget.h> #include <tqpixmap.h> -class KListBox; +class TDEListBox; class TQPushButton; class EditList : public TQWidget @@ -53,7 +53,7 @@ protected slots: void slotSelected(int); private: - KListBox *list_; + TDEListBox *list_; TQPushButton *addbtn_, *editbtn_, *delbtn_, *defbtn_; }; diff --git a/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp b/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp index c2fcaab7b..cec6f383b 100644 --- a/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp +++ b/tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp @@ -30,7 +30,7 @@ QDirMultiLineEdit::QDirMultiLineEdit(TQWidget *parent, const char *name) : TQWidget(parent, name) { - m_view = new KListView(this); + m_view = new TDEListView(this); m_view->header()->hide(); m_view->addColumn(""); m_view->setFullWidth(true); diff --git a/tdeprint/cups/cupsdconf2/qdirmultilineedit.h b/tdeprint/cups/cupsdconf2/qdirmultilineedit.h index c3765362e..a55f3355e 100644 --- a/tdeprint/cups/cupsdconf2/qdirmultilineedit.h +++ b/tdeprint/cups/cupsdconf2/qdirmultilineedit.h @@ -22,7 +22,7 @@ #include <tqwidget.h> -class KListView; +class TDEListView; class TQListViewItem; class TQPushButton; @@ -46,7 +46,7 @@ private slots: void slotSelected(TQListViewItem*); private: - KListView *m_view; + TDEListView *m_view; TQPushButton *m_add, *m_remove; }; diff --git a/tdeprint/cups/kmcupsjobmanager.cpp b/tdeprint/cups/kmcupsjobmanager.cpp index 0b31489cc..b7284d1ad 100644 --- a/tdeprint/cups/kmcupsjobmanager.cpp +++ b/tdeprint/cups/kmcupsjobmanager.cpp @@ -352,10 +352,10 @@ bool KMCupsJobManager::jobIppReport(KMJob *j) return result; } -TQValueList<KAction*> KMCupsJobManager::createPluginActions(KActionCollection *coll) +TQValueList<TDEAction*> KMCupsJobManager::createPluginActions(TDEActionCollection *coll) { - TQValueList<KAction*> list; - KAction *act(0); + TQValueList<TDEAction*> list; + TDEAction *act(0); list << (act = new PluginAction(0, i18n("&Job IPP Report"), "tdeprint_report", 0, coll, "plugin_ipp")); act->setGroup("plugin"); @@ -369,7 +369,7 @@ TQValueList<KAction*> KMCupsJobManager::createPluginActions(KActionCollection *c return list; } -void KMCupsJobManager::validatePluginActions(KActionCollection *coll, const TQPtrList<KMJob>& joblist) +void KMCupsJobManager::validatePluginActions(TDEActionCollection *coll, const TQPtrList<KMJob>& joblist) { TQPtrListIterator<KMJob> it(joblist); bool flag(true); @@ -380,7 +380,7 @@ void KMCupsJobManager::validatePluginActions(KActionCollection *coll, const TQPt /*&& !it.current()->isRemote()*/); } flag = (flag && joblist.count() > 0); - KAction *a; + TDEAction *a; if ( ( a = coll->action( "plugin_ipp" ) ) ) a->setEnabled( joblist.count() == 1 ); if ( ( a = coll->action( "plugin_prioup" ) ) ) diff --git a/tdeprint/cups/kmcupsjobmanager.h b/tdeprint/cups/kmcupsjobmanager.h index 7e8a75a53..0635dd8ea 100644 --- a/tdeprint/cups/kmcupsjobmanager.h +++ b/tdeprint/cups/kmcupsjobmanager.h @@ -35,8 +35,8 @@ public: virtual ~KMCupsJobManager(); int actions(); - TQValueList<KAction*> createPluginActions(KActionCollection*); - void validatePluginActions(KActionCollection*, const TQPtrList<KMJob>&); + TQValueList<TDEAction*> createPluginActions(TDEActionCollection*); + void validatePluginActions(TDEActionCollection*, const TQPtrList<KMJob>&); bool doPluginAction(int, const TQPtrList<KMJob>&); protected: diff --git a/tdeprint/cups/kmcupsmanager.cpp b/tdeprint/cups/kmcupsmanager.cpp index 5b99c88d9..fecac0169 100644 --- a/tdeprint/cups/kmcupsmanager.cpp +++ b/tdeprint/cups/kmcupsmanager.cpp @@ -915,15 +915,15 @@ TQStringList KMCupsManager::detectLocalPrinters() return list; } -void KMCupsManager::createPluginActions(KActionCollection *coll) +void KMCupsManager::createPluginActions(TDEActionCollection *coll) { - KAction *act = new KAction(i18n("&Export Driver..."), "tdeprint_uploadsmb", 0, this, TQT_SLOT(exportDriver()), coll, "plugin_export_driver"); + TDEAction *act = new TDEAction(i18n("&Export Driver..."), "tdeprint_uploadsmb", 0, this, TQT_SLOT(exportDriver()), coll, "plugin_export_driver"); act->setGroup("plugin"); - act = new KAction(i18n("&Printer IPP Report"), "tdeprint_report", 0, this, TQT_SLOT(printerIppReport()), coll, "plugin_printer_ipp_report"); + act = new TDEAction(i18n("&Printer IPP Report"), "tdeprint_report", 0, this, TQT_SLOT(printerIppReport()), coll, "plugin_printer_ipp_report"); act->setGroup("plugin"); } -void KMCupsManager::validatePluginActions(KActionCollection *coll, KMPrinter *pr) +void KMCupsManager::validatePluginActions(TDEActionCollection *coll, KMPrinter *pr) { // save selected printer for future use in slots m_currentprinter = pr; diff --git a/tdeprint/cups/kmcupsmanager.h b/tdeprint/cups/kmcupsmanager.h index d574bb686..1e7c21b19 100644 --- a/tdeprint/cups/kmcupsmanager.h +++ b/tdeprint/cups/kmcupsmanager.h @@ -63,8 +63,8 @@ public: bool configureServer(TQWidget *parent = 0); TQStringList detectLocalPrinters(); - void createPluginActions(KActionCollection*); - void validatePluginActions(KActionCollection*, KMPrinter*); + void createPluginActions(TDEActionCollection*); + void validatePluginActions(TDEActionCollection*, KMPrinter*); TQString stateInformation(); public slots: diff --git a/tdeprint/cups/kmwfax.cpp b/tdeprint/cups/kmwfax.cpp index 51ecbab73..610217da1 100644 --- a/tdeprint/cups/kmwfax.cpp +++ b/tdeprint/cups/kmwfax.cpp @@ -41,7 +41,7 @@ KMWFax::KMWFax(TQWidget *parent, const char *name) TQLabel *lab = new TQLabel(this); lab->setText(i18n("<p>Select the device which your serial Fax/Modem is connected to.</p>")); - m_list = new KListBox(this); + m_list = new TDEListBox(this); TQVBoxLayout *l1 = new TQVBoxLayout(this,0,10); l1->addWidget(lab,0); diff --git a/tdeprint/cups/kmwfax.h b/tdeprint/cups/kmwfax.h index 1a822165e..50b2aec0c 100644 --- a/tdeprint/cups/kmwfax.h +++ b/tdeprint/cups/kmwfax.h @@ -22,7 +22,7 @@ #include "kmwizardpage.h" -class KListBox; +class TDEListBox; class KMWFax : public KMWizardPage { @@ -33,7 +33,7 @@ public: void updatePrinter(KMPrinter*); private: - KListBox *m_list; + TDEListBox *m_list; }; #endif diff --git a/tdeprint/cups/kmwippprinter.cpp b/tdeprint/cups/kmwippprinter.cpp index 044f9cb6d..1a4cf4d94 100644 --- a/tdeprint/cups/kmwippprinter.cpp +++ b/tdeprint/cups/kmwippprinter.cpp @@ -46,7 +46,7 @@ KMWIppPrinter::KMWIppPrinter(TQWidget *parent, const char *name) m_ID = KMWizard::Custom+1; m_nextpage = KMWizard::Driver; - m_list = new KListView(this); + m_list = new TDEListView(this); m_list->addColumn(""); m_list->header()->hide(); m_list->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); diff --git a/tdeprint/cups/kmwippprinter.h b/tdeprint/cups/kmwippprinter.h index 5d9d33f7a..f578afba9 100644 --- a/tdeprint/cups/kmwippprinter.h +++ b/tdeprint/cups/kmwippprinter.h @@ -22,7 +22,7 @@ #include "kmwizardpage.h" -class KListView; +class TDEListView; class TQListViewItem; class TQLineEdit; class TQTextView; @@ -46,7 +46,7 @@ protected slots: void slotIppReport(); private: - KListView *m_list; + TDEListView *m_list; NetworkScanner *m_scanner; TQLineEdit *m_uri; TQTextView *m_info; diff --git a/tdeprint/cups/kmwippselect.cpp b/tdeprint/cups/kmwippselect.cpp index a10a14ba5..c889edbf9 100644 --- a/tdeprint/cups/kmwippselect.cpp +++ b/tdeprint/cups/kmwippselect.cpp @@ -38,7 +38,7 @@ KMWIppSelect::KMWIppSelect(TQWidget *parent, const char *name) m_title = i18n("Remote IPP Printer Selection"); m_nextpage = KMWizard::Driver; - m_list = new KListBox(this); + m_list = new TDEListBox(this); TQVBoxLayout *lay = new TQVBoxLayout(this, 0, 0); lay->addWidget(m_list); diff --git a/tdeprint/cups/kmwippselect.h b/tdeprint/cups/kmwippselect.h index 8d1711e8c..6b8d788e6 100644 --- a/tdeprint/cups/kmwippselect.h +++ b/tdeprint/cups/kmwippselect.h @@ -22,7 +22,7 @@ #include "kmwizardpage.h" -class KListBox; +class TDEListBox; class KMWIppSelect : public KMWizardPage { @@ -34,7 +34,7 @@ public: void updatePrinter(KMPrinter*); private: - KListBox *m_list; + TDEListBox *m_list; }; #endif diff --git a/tdeprint/cups/kmwother.cpp b/tdeprint/cups/kmwother.cpp index 596f61990..7e86cbfb6 100644 --- a/tdeprint/cups/kmwother.cpp +++ b/tdeprint/cups/kmwother.cpp @@ -49,7 +49,7 @@ KMWOther::KMWOther(TQWidget *parent, const char *name) "<li>lpd://server/queue</li>" "<li>parallel:/dev/lp0</li></ul>")); TQLabel *l2 = new TQLabel(i18n("URI:"), this); - m_uriview = new KListView( this ); + m_uriview = new TDEListView( this ); m_uriview->addColumn( "" ); m_uriview->header()->hide(); m_uriview->setSorting( -1 ); diff --git a/tdeprint/cups/kmwother.h b/tdeprint/cups/kmwother.h index eba5ac2b1..a650482f4 100644 --- a/tdeprint/cups/kmwother.h +++ b/tdeprint/cups/kmwother.h @@ -23,7 +23,7 @@ #include "kmwizardpage.h" class TQLineEdit; -class KListView; +class TDEListView; class TQListViewItem; class KMWOther : public KMWizardPage @@ -40,7 +40,7 @@ protected slots: private: TQLineEdit *m_uri; - KListView *m_uriview; + TDEListView *m_uriview; }; #endif diff --git a/tdeprint/driverview.cpp b/tdeprint/driverview.cpp index 68e705a7d..02c7be610 100644 --- a/tdeprint/driverview.cpp +++ b/tdeprint/driverview.cpp @@ -30,7 +30,7 @@ #include <klocale.h> DrListView::DrListView(TQWidget *parent, const char *name) -: KListView(parent,name) +: TDEListView(parent,name) { addColumn(""); header()->hide(); diff --git a/tdeprint/driverview.h b/tdeprint/driverview.h index a975fd26e..96c225ee4 100644 --- a/tdeprint/driverview.h +++ b/tdeprint/driverview.h @@ -30,7 +30,7 @@ class DrOptionView; class DrMain; -class TDEPRINT_EXPORT DrListView : public KListView +class TDEPRINT_EXPORT DrListView : public TDEListView { public: DrListView(TQWidget *parent = 0, const char *name = 0); diff --git a/tdeprint/droptionview.cpp b/tdeprint/droptionview.cpp index 2ba4d1799..a11ec7ee0 100644 --- a/tdeprint/droptionview.cpp +++ b/tdeprint/droptionview.cpp @@ -191,7 +191,7 @@ void OptionStringView::setValue(const TQString& val) OptionListView::OptionListView(TQWidget *parent, const char *name) : OptionBaseView(parent,name) { - m_list = new KListBox(this); + m_list = new TDEListBox(this); TQVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); main_->addWidget(m_list); diff --git a/tdeprint/droptionview.h b/tdeprint/droptionview.h index 70f60a814..6114efcbd 100644 --- a/tdeprint/droptionview.h +++ b/tdeprint/droptionview.h @@ -27,7 +27,7 @@ class TQLineEdit; class TQSlider; class TQLabel; -class KListBox; +class TDEListBox; class TQListBoxItem; class TQVButtonGroup; class TQWidgetStack; @@ -92,7 +92,7 @@ protected slots: void slotSelectionChanged(); private: - KListBox *m_list; + TDEListBox *m_list; TQStringList m_choices; }; diff --git a/tdeprint/kmjobmanager.cpp b/tdeprint/kmjobmanager.cpp index 2a0e2ae50..db1b7c9b0 100644 --- a/tdeprint/kmjobmanager.cpp +++ b/tdeprint/kmjobmanager.cpp @@ -203,12 +203,12 @@ int KMJobManager::actions() return 0; } -TQValueList<KAction*> KMJobManager::createPluginActions(KActionCollection*) +TQValueList<TDEAction*> KMJobManager::createPluginActions(TDEActionCollection*) { - return TQValueList<KAction*>(); + return TQValueList<TDEAction*>(); } -void KMJobManager::validatePluginActions(KActionCollection*, const TQPtrList<KMJob>&) +void KMJobManager::validatePluginActions(TDEActionCollection*, const TQPtrList<KMJob>&) { } diff --git a/tdeprint/kmjobmanager.h b/tdeprint/kmjobmanager.h index b1cdac627..fce6e61d2 100644 --- a/tdeprint/kmjobmanager.h +++ b/tdeprint/kmjobmanager.h @@ -33,8 +33,8 @@ class KMJob; class KMThreadJob; -class KActionCollection; -class KAction; +class TDEActionCollection; +class TDEAction; /** * @internal @@ -78,8 +78,8 @@ public: KMThreadJob* threadJob(); virtual int actions(); - virtual TQValueList<KAction*> createPluginActions(KActionCollection*); - virtual void validatePluginActions(KActionCollection*, const TQPtrList<KMJob>&); + virtual TQValueList<TDEAction*> createPluginActions(TDEActionCollection*); + virtual void validatePluginActions(TDEActionCollection*, const TQPtrList<KMJob>&); virtual bool doPluginAction(int, const TQPtrList<KMJob>&); protected: diff --git a/tdeprint/kmmanager.cpp b/tdeprint/kmmanager.cpp index a597b94b6..1c772ec3c 100644 --- a/tdeprint/kmmanager.cpp +++ b/tdeprint/kmmanager.cpp @@ -511,11 +511,11 @@ bool KMManager::invokeOptionsDialog(TQWidget *parent) return false; } -void KMManager::createPluginActions(KActionCollection*) +void KMManager::createPluginActions(TDEActionCollection*) { } -void KMManager::validatePluginActions(KActionCollection*, KMPrinter*) +void KMManager::validatePluginActions(TDEActionCollection*, KMPrinter*) { } diff --git a/tdeprint/kmmanager.h b/tdeprint/kmmanager.h index be69c73e6..9c5820f3a 100644 --- a/tdeprint/kmmanager.h +++ b/tdeprint/kmmanager.h @@ -35,7 +35,7 @@ class KMDBEntry; class KMVirtualManager; class KMSpecialManager; class TQWidget; -class KActionCollection; +class TDEActionCollection; class PrinterFilter; /** @@ -135,8 +135,8 @@ public: virtual TQStringList detectLocalPrinters(); // additional actions (for print manager) - virtual void createPluginActions(KActionCollection*); - virtual void validatePluginActions(KActionCollection*, KMPrinter*); + virtual void createPluginActions(TDEActionCollection*); + virtual void validatePluginActions(TDEActionCollection*, KMPrinter*); // utility function void checkUpdatePossible(); diff --git a/tdeprint/kpfilterpage.cpp b/tdeprint/kpfilterpage.cpp index 66eda203d..9fabfc6d4 100644 --- a/tdeprint/kpfilterpage.cpp +++ b/tdeprint/kpfilterpage.cpp @@ -126,7 +126,7 @@ KPFilterPage::KPFilterPage(TQWidget *parent, const char *name) m_activefilters.setAutoDelete(true); m_valid = true; - m_view = new KListView(this); + m_view = new TDEListView(this); TQWhatsThis::add(m_view, whatsThisFilterchainListView); m_view->addColumn(""); m_view->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); diff --git a/tdeprint/kpfilterpage.h b/tdeprint/kpfilterpage.h index 72065b3f1..a5bc7f757 100644 --- a/tdeprint/kpfilterpage.h +++ b/tdeprint/kpfilterpage.h @@ -25,7 +25,7 @@ #include <tqdict.h> #include <tqstringlist.h> -class KListView; +class TDEListView; class KXmlCommand; class TQListViewItem; class TQToolButton; @@ -57,7 +57,7 @@ protected: TQStringList activeList(); void updateButton(); private: - KListView *m_view; + TDEListView *m_view; TQStringList m_filters; // <idname,description> pairs TQDict<KXmlCommand> m_activefilters; TQToolButton *m_add, *m_remove, *m_up, *m_down, *m_configure; diff --git a/tdeprint/kprintaction.cpp b/tdeprint/kprintaction.cpp index a9e1b2bb8..6ce7f3f79 100644 --- a/tdeprint/kprintaction.cpp +++ b/tdeprint/kprintaction.cpp @@ -40,21 +40,21 @@ public: }; KPrintAction::KPrintAction(const TQString& text, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name) -: KActionMenu(text, parent, name) +: TDEActionMenu(text, parent, name) { d = new KPrintActionPrivate(); initialize(type, parentWidget); } KPrintAction::KPrintAction(const TQString& text, const TQIconSet& icon, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name) -: KActionMenu(text, icon, parent, name) +: TDEActionMenu(text, icon, parent, name) { d = new KPrintActionPrivate(); initialize(type, parentWidget); } KPrintAction::KPrintAction(const TQString& text, const TQString& icon, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name) -: KActionMenu(text, icon, parent, name) +: TDEActionMenu(text, icon, parent, name) { d = new KPrintActionPrivate(); initialize(type, parentWidget); diff --git a/tdeprint/kprintaction.h b/tdeprint/kprintaction.h index 5c8688e8f..9916629ba 100644 --- a/tdeprint/kprintaction.h +++ b/tdeprint/kprintaction.h @@ -24,7 +24,7 @@ class KPrinter; -class TDEPRINT_EXPORT KPrintAction : public KActionMenu +class TDEPRINT_EXPORT KPrintAction : public TDEActionMenu { Q_OBJECT public: diff --git a/tdeprint/kprintpreview.cpp b/tdeprint/kprintpreview.cpp index fe105379c..6f763fe75 100644 --- a/tdeprint/kprintpreview.cpp +++ b/tdeprint/kprintpreview.cpp @@ -81,26 +81,26 @@ public: KPrintPreviewPrivate(KPrintPreview *dlg) : gvpart_(0) { mainwidget_ = new TQWidget(dlg, "MainWidget"); - toolbar_ = new KToolBar(mainwidget_, "PreviewToolBar", true); - actions_ = new KActionCollection(dlg); - accel_ = new KAccel(dlg); + toolbar_ = new TDEToolBar(mainwidget_, "PreviewToolBar", true); + actions_ = new TDEActionCollection(dlg); + accel_ = new TDEAccel(dlg); previewonly_ = false; } ~KPrintPreviewPrivate() { if (gvpart_) delete gvpart_; } - void plugAction(KAction *act) + void plugAction(TDEAction *act) { act->plug(toolbar_); act->plugAccel(accel_); } KParts::ReadOnlyPart *gvpart_; - KToolBar *toolbar_; - KActionCollection *actions_; + TDEToolBar *toolbar_; + TDEActionCollection *actions_; TQWidget *mainwidget_; - KAccel *accel_; + TDEAccel *accel_; bool previewonly_; }; @@ -157,8 +157,8 @@ KPrintPreview::KPrintPreview(TQWidget *parent, bool previewOnly) KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(reject()), d->actions_, "close_print"); else { - new KAction(i18n("Print"), "fileprint", Qt::Key_Return, TQT_TQOBJECT(this), TQT_SLOT(accept()), d->actions_, "continue_print"); - new KAction(i18n("Cancel"), "stop", Qt::Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(reject()), d->actions_, "stop_print"); + new TDEAction(i18n("Print"), "fileprint", Qt::Key_Return, TQT_TQOBJECT(this), TQT_SLOT(accept()), d->actions_, "continue_print"); + new TDEAction(i18n("Cancel"), "stop", Qt::Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(reject()), d->actions_, "stop_print"); } } @@ -193,13 +193,13 @@ void KPrintPreview::initView(KLibFactory *factory) TQDomElement a = acts.item( i ).toElement(); if ( a.attribute( "name" ) == "goToPage" ) continue; - KAction *act = d->gvpart_->action( a ); + TDEAction *act = d->gvpart_->action( a ); if ( act != 0 ) d->plugAction( act ); } } /* - KAction *act; + TDEAction *act; d->toolbar_->insertLineSeparator(); if ((act = d->gvpart_->action("zoomIn")) != 0) d->plugAction(act); @@ -212,8 +212,8 @@ void KPrintPreview::initView(KLibFactory *factory) d->plugAction(act); */ } - d->toolbar_->setIconText(KToolBar::IconTextRight); - d->toolbar_->setBarPos(KToolBar::Top); + d->toolbar_->setIconText(TDEToolBar::IconTextRight); + d->toolbar_->setBarPos(TDEToolBar::Top); d->toolbar_->setMovingEnabled(false); //d->adjustSize(); diff --git a/tdeprint/lpr/editentrydialog.cpp b/tdeprint/lpr/editentrydialog.cpp index 6c4ecc30c..5d9f52bea 100644 --- a/tdeprint/lpr/editentrydialog.cpp +++ b/tdeprint/lpr/editentrydialog.cpp @@ -39,7 +39,7 @@ EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, TQWidget *parent, const c TQLabel *lab0 = new TQLabel(i18n("Aliases:"), w); m_aliases = new TQLineEdit(w); - m_view = new KListView(w); + m_view = new TDEListView(w); m_view->addColumn(""); m_view->header()->hide(); m_type = new TQComboBox(w); diff --git a/tdeprint/lpr/kmlprmanager.cpp b/tdeprint/lpr/kmlprmanager.cpp index 5d73d4d54..a81a24a72 100644 --- a/tdeprint/lpr/kmlprmanager.cpp +++ b/tdeprint/lpr/kmlprmanager.cpp @@ -453,13 +453,13 @@ TQString KMLprManager::printOptions(KPrinter *prt) return TQString::null; } -void KMLprManager::createPluginActions(KActionCollection *coll) +void KMLprManager::createPluginActions(TDEActionCollection *coll) { - KAction *act = new KAction(i18n("&Edit printcap Entry..."), "tdeprint_report", 0, this, TQT_SLOT(slotEditPrintcap()), coll, "plugin_editprintcap"); + TDEAction *act = new TDEAction(i18n("&Edit printcap Entry..."), "tdeprint_report", 0, this, TQT_SLOT(slotEditPrintcap()), coll, "plugin_editprintcap"); act->setGroup("plugin"); } -void KMLprManager::validatePluginActions(KActionCollection *coll, KMPrinter *prt) +void KMLprManager::validatePluginActions(TDEActionCollection *coll, KMPrinter *prt) { m_currentprinter = prt; // FIXME: disabled until completion diff --git a/tdeprint/lpr/kmlprmanager.h b/tdeprint/lpr/kmlprmanager.h index 34d38340f..d26af4d77 100644 --- a/tdeprint/lpr/kmlprmanager.h +++ b/tdeprint/lpr/kmlprmanager.h @@ -54,8 +54,8 @@ public: LpcHelper* lpcHelper() { return m_lpchelper; } TQString printOptions(KPrinter*); - void createPluginActions(KActionCollection*); - void validatePluginActions(KActionCollection*, KMPrinter*); + void createPluginActions(TDEActionCollection*); + void validatePluginActions(TDEActionCollection*, KMPrinter*); TQString stateInformation(); protected slots: diff --git a/tdeprint/management/cjanuswidget.cpp b/tdeprint/management/cjanuswidget.cpp index 92ea782e5..1642fb5c6 100644 --- a/tdeprint/management/cjanuswidget.cpp +++ b/tdeprint/management/cjanuswidget.cpp @@ -79,7 +79,7 @@ void CJanusWidget::CListBoxItem::paint(TQPainter *p) //*********************************************************************************** -class CJanusWidget::CListBox : public KListBox +class CJanusWidget::CListBox : public TDEListBox { public: CListBox(TQWidget *parent = 0, const char *name = 0); @@ -92,7 +92,7 @@ protected: }; CJanusWidget::CListBox::CListBox(TQWidget *parent, const char *name) -: KListBox(parent,name) +: TDEListBox(parent,name) { verticalScrollBar()->installEventFilter(this); } @@ -105,7 +105,7 @@ bool CJanusWidget::CListBox::eventFilter(TQObject *o, TQEvent *e) { if (e->type() == TQEvent::Show || e->type() == TQEvent::Hide) computeWidth(); - return KListBox::eventFilter(o,e); + return TDEListBox::eventFilter(o,e); } void CJanusWidget::CListBox::computeWidth() diff --git a/tdeprint/management/kiconselectaction.cpp b/tdeprint/management/kiconselectaction.cpp index 8bf4d5a10..f5df42299 100644 --- a/tdeprint/management/kiconselectaction.cpp +++ b/tdeprint/management/kiconselectaction.cpp @@ -37,7 +37,7 @@ public: }; KIconSelectAction::KIconSelectAction(const TQString& text, int accel, TQObject* parent, const char* name) -: KSelectAction(text, accel, parent, name) +: TDESelectAction(text, accel, parent, name) { d = new KIconSelectActionPrivate; } @@ -68,7 +68,7 @@ void KIconSelectAction::createPopupMenu() void KIconSelectAction::setItems(const TQStringList& lst, const TQStringList& iconlst) { - KSelectAction::setItems(lst); + TDESelectAction::setItems(lst); d->m_iconlst = iconlst; updateIcons(); } @@ -79,12 +79,12 @@ int KIconSelectAction::plug(TQWidget* widget, int index) if (widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) { createPopupMenu(); - value = KSelectAction::plug(widget, index); + value = TDESelectAction::plug(widget, index); } - else if (widget->inherits("KToolBar")) + else if (widget->inherits("TDEToolBar")) { - KToolBar* bar = static_cast<KToolBar*>(widget); - int id = KAction::getToolButtonID(); + TDEToolBar* bar = static_cast<TDEToolBar*>(widget); + int id = TDEAction::getToolButtonID(); // To have a correct layout in the toolbar, a non // empty icon has to be used. Use "unknown" by default. TQString iconName = (currentItem() != -1 ? d->m_iconlst[currentItem()] : "unknown"); @@ -104,15 +104,15 @@ int KIconSelectAction::plug(TQWidget* widget, int index) void KIconSelectAction::updateCurrentItem(int id) { TQWidget* w = container(id); - if (w->inherits("KToolBar")) - static_cast<KToolBar*>(w)->getButton(itemId(id))->setIcon(d->m_iconlst[currentItem()]); + if (w->inherits("TDEToolBar")) + static_cast<TDEToolBar*>(w)->getButton(itemId(id))->setIcon(d->m_iconlst[currentItem()]); else - KSelectAction::updateCurrentItem(id); + TDESelectAction::updateCurrentItem(id); } void KIconSelectAction::setCurrentItem(int index) { - KSelectAction::setCurrentItem(index); + TDESelectAction::setCurrentItem(index); } #include "kiconselectaction.moc" diff --git a/tdeprint/management/kiconselectaction.h b/tdeprint/management/kiconselectaction.h index 84bef60d2..917dc742b 100644 --- a/tdeprint/management/kiconselectaction.h +++ b/tdeprint/management/kiconselectaction.h @@ -24,7 +24,7 @@ class KIconSelectActionPrivate; -class KIconSelectAction : public KSelectAction +class KIconSelectAction : public TDESelectAction { Q_OBJECT public: diff --git a/tdeprint/management/kmconfigfilter.cpp b/tdeprint/management/kmconfigfilter.cpp index bcbe1b0f7..637f06ecc 100644 --- a/tdeprint/management/kmconfigfilter.cpp +++ b/tdeprint/management/kmconfigfilter.cpp @@ -43,10 +43,10 @@ KMConfigFilter::KMConfigFilter(TQWidget *parent, const char *name) TQGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Printer Filter"), this); - m_list1 = new KListBox(box); - m_list1->setSelectionMode(KListBox::Extended); - m_list2 = new KListBox(box); - m_list2->setSelectionMode(KListBox::Extended); + m_list1 = new TDEListBox(box); + m_list1->setSelectionMode(TDEListBox::Extended); + m_list2 = new TDEListBox(box); + m_list2->setSelectionMode(TDEListBox::Extended); m_add = new TQToolButton( box ); m_add->setIconSet(TQApplication::reverseLayout() ? SmallIconSet( "back" ) : SmallIconSet( "forward" )); m_remove = new TQToolButton( box ); @@ -97,7 +97,7 @@ void KMConfigFilter::loadConfig(TDEConfig *conf) { if (!it.current()->isSpecial() && !it.current()->isVirtual()) { - KListBox *lb = (m_plist.find(it.current()->printerName()) == m_plist.end() ? m_list1 : m_list2); + TDEListBox *lb = (m_plist.find(it.current()->printerName()) == m_plist.end() ? m_list1 : m_list2); lb->insertItem(SmallIcon(it.current()->pixmap()), it.current()->printerName()); } } @@ -116,7 +116,7 @@ void KMConfigFilter::saveConfig(TDEConfig *conf) conf->writeEntry("LocationRe", m_locationre->text()); } -void KMConfigFilter::transfer(KListBox *from, KListBox *to) +void KMConfigFilter::transfer(TDEListBox *from, TDEListBox *to) { for (uint i=0; i<from->count();) { @@ -143,7 +143,7 @@ void KMConfigFilter::slotRemoveClicked() void KMConfigFilter::slotSelectionChanged() { - const KListBox *lb = static_cast<const KListBox*>(sender()); + const TDEListBox *lb = static_cast<const TDEListBox*>(sender()); if (!lb) return; TQToolButton *pb = (lb == m_list1 ? m_add : m_remove); diff --git a/tdeprint/management/kmconfigfilter.h b/tdeprint/management/kmconfigfilter.h index 298c83de2..8338ebd6f 100644 --- a/tdeprint/management/kmconfigfilter.h +++ b/tdeprint/management/kmconfigfilter.h @@ -22,7 +22,7 @@ #include "kmconfigpage.h" -class KListBox; +class TDEListBox; class TQToolButton; class TQLineEdit; @@ -41,10 +41,10 @@ protected slots: void slotRemoveClicked(); protected: - void transfer(KListBox *from, KListBox *to); + void transfer(TDEListBox *from, TDEListBox *to); private: - KListBox *m_list1, *m_list2; + TDEListBox *m_list1, *m_list2; TQToolButton *m_add, *m_remove; TQLineEdit *m_locationre; }; diff --git a/tdeprint/management/kmconfigfonts.cpp b/tdeprint/management/kmconfigfonts.cpp index 91861f5ca..cd681db3d 100644 --- a/tdeprint/management/kmconfigfonts.cpp +++ b/tdeprint/management/kmconfigfonts.cpp @@ -47,7 +47,7 @@ KMConfigFonts::KMConfigFonts(TQWidget *parent, const char *name) TQGroupBox *box2 = new TQGroupBox(0, Qt::Vertical, i18n("Fonts Path"), this); m_embedfonts = new TQCheckBox(i18n("&Embed fonts in PostScript data when printing"), box); - m_fontpath = new KListView(box2); + m_fontpath = new TDEListView(box2); m_fontpath->addColumn(""); m_fontpath->header()->setStretchEnabled(true, 0); m_fontpath->header()->hide(); diff --git a/tdeprint/management/kmconfigfonts.h b/tdeprint/management/kmconfigfonts.h index dd65d3901..8bd285f38 100644 --- a/tdeprint/management/kmconfigfonts.h +++ b/tdeprint/management/kmconfigfonts.h @@ -22,7 +22,7 @@ #include "kmconfigpage.h" -class KListView; +class TDEListView; class KURLRequester; class TQPushButton; class TQCheckBox; @@ -46,7 +46,7 @@ protected slots: private: TQCheckBox *m_embedfonts; - KListView *m_fontpath; + TDEListView *m_fontpath; KURLRequester *m_addpath; TQPushButton *m_up, *m_down, *m_add, *m_remove; }; diff --git a/tdeprint/management/kmdriverdbwidget.cpp b/tdeprint/management/kmdriverdbwidget.cpp index 1b05f8e9c..ee442113a 100644 --- a/tdeprint/management/kmdriverdbwidget.cpp +++ b/tdeprint/management/kmdriverdbwidget.cpp @@ -46,8 +46,8 @@ KMDriverDbWidget::KMDriverDbWidget(TQWidget *parent, const char *name) m_valid = false; // build widget - m_manu = new KListBox(this); - m_model = new KListBox(this); + m_manu = new TDEListBox(this); + m_model = new TDEListBox(this); m_postscript = new TQCheckBox(i18n("&PostScript printer"),this); m_raw = new TQCheckBox(i18n("&Raw printer (no driver needed)"),this); m_postscript->setCursor(KCursor::handCursor()); diff --git a/tdeprint/management/kminstancepage.cpp b/tdeprint/management/kminstancepage.cpp index 25c037516..2d73c6ecd 100644 --- a/tdeprint/management/kminstancepage.cpp +++ b/tdeprint/management/kminstancepage.cpp @@ -41,7 +41,7 @@ KMInstancePage::KMInstancePage(TQWidget *parent, const char *name) : TQWidget(parent,name) { - m_view = new KListBox(this); + m_view = new TDEListBox(this); m_printer = 0; initActions(); diff --git a/tdeprint/management/kminstancepage.h b/tdeprint/management/kminstancepage.h index 7a3075d73..56b045fe2 100644 --- a/tdeprint/management/kminstancepage.h +++ b/tdeprint/management/kminstancepage.h @@ -24,7 +24,7 @@ #include <tqvaluelist.h> #include <tqwidget.h> -class KListBox; +class TDEListBox; class KMPrinter; class TQButton; @@ -50,7 +50,7 @@ protected: void addButton(const TQString& text, const TQString& pixmap, const char *receiver); private: - KListBox *m_view; + TDEListBox *m_view; TQValueList<TQButton*> m_buttons; KMPrinter *m_printer; }; diff --git a/tdeprint/management/kmjobviewer.cpp b/tdeprint/management/kmjobviewer.cpp index 5e4561c19..0af246f80 100644 --- a/tdeprint/management/kmjobviewer.cpp +++ b/tdeprint/management/kmjobviewer.cpp @@ -57,7 +57,7 @@ #undef m_manager #define m_manager KMFactory::self()->jobManager() -class KJobListView : public KListView +class KJobListView : public TDEListView { public: KJobListView( TQWidget *parent = 0, const char *name = 0 ); @@ -67,7 +67,7 @@ protected: }; KJobListView::KJobListView( TQWidget *parent, const char *name ) - : KListView( parent, name ) + : TDEListView( parent, name ) { setAcceptDrops( true ); setDropVisualizer( false ); @@ -78,11 +78,11 @@ bool KJobListView::acceptDrag( TQDropEvent *e ) const if ( KURLDrag::canDecode( e ) ) return true; else - return KListView::acceptDrag( e ); + return TDEListView::acceptDrag( e ); } KMJobViewer::KMJobViewer(TQWidget *parent, const char *name) -: KMainWindow(parent,name) +: TDEMainWindow(parent,name) { m_view = 0; m_pop = 0; @@ -259,20 +259,20 @@ void KMJobViewer::init() void KMJobViewer::initActions() { // job actions - KAction *hact = new KAction(i18n("&Hold"),"stop",0,TQT_TQOBJECT(this),TQT_SLOT(slotHold()),actionCollection(),"job_hold"); - KAction *ract = new KAction(i18n("&Resume"),"run",0,TQT_TQOBJECT(this),TQT_SLOT(slotResume()),actionCollection(),"job_resume"); - KAction *dact = new KAction(i18n("Remo&ve"),"edittrash",Qt::Key_Delete,TQT_TQOBJECT(this),TQT_SLOT(slotRemove()),actionCollection(),"job_remove"); - KAction *sact = new KAction(i18n("Res&tart"),"redo",0,TQT_TQOBJECT(this),TQT_SLOT(slotRestart()),actionCollection(),"job_restart"); - KActionMenu *mact = new KActionMenu(i18n("&Move to Printer"),"fileprint",actionCollection(),"job_move"); + TDEAction *hact = new TDEAction(i18n("&Hold"),"stop",0,TQT_TQOBJECT(this),TQT_SLOT(slotHold()),actionCollection(),"job_hold"); + TDEAction *ract = new TDEAction(i18n("&Resume"),"run",0,TQT_TQOBJECT(this),TQT_SLOT(slotResume()),actionCollection(),"job_resume"); + TDEAction *dact = new TDEAction(i18n("Remo&ve"),"edittrash",Qt::Key_Delete,TQT_TQOBJECT(this),TQT_SLOT(slotRemove()),actionCollection(),"job_remove"); + TDEAction *sact = new TDEAction(i18n("Res&tart"),"redo",0,TQT_TQOBJECT(this),TQT_SLOT(slotRestart()),actionCollection(),"job_restart"); + TDEActionMenu *mact = new TDEActionMenu(i18n("&Move to Printer"),"fileprint",actionCollection(),"job_move"); mact->setDelayed(false); connect(mact->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(slotMove(int))); connect(mact->popupMenu(),TQT_SIGNAL(aboutToShow()),KMTimer::self(),TQT_SLOT(hold())); connect(mact->popupMenu(),TQT_SIGNAL(aboutToHide()),KMTimer::self(),TQT_SLOT(release())); connect(mact->popupMenu(),TQT_SIGNAL(aboutToShow()),TQT_SLOT(slotShowMoveMenu())); - KToggleAction *tact = new KToggleAction(i18n("&Toggle Completed Jobs"),"history",0,actionCollection(),"view_completed"); + TDEToggleAction *tact = new TDEToggleAction(i18n("&Toggle Completed Jobs"),"history",0,actionCollection(),"view_completed"); tact->setEnabled(m_manager->actions() & KMJob::ShowCompleted); connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotShowCompleted(bool))); - KToggleAction *uact = new KToggleAction(i18n("Show Only User Jobs"), "personal", 0, actionCollection(), "view_user_jobs"); + TDEToggleAction *uact = new TDEToggleAction(i18n("Show Only User Jobs"), "personal", 0, actionCollection(), "view_user_jobs"); uact->setCheckedState(KGuiItem(i18n("Hide Only User Jobs"),"personal")); connect(uact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotUserOnly(bool))); m_userfield = new TQLineEdit(0); @@ -298,7 +298,7 @@ void KMJobViewer::initActions() } // Filter actions - KActionMenu *fact = new KActionMenu(i18n("&Select Printer"), "tdeprint_printer", actionCollection(), "filter_modify"); + TDEActionMenu *fact = new TDEActionMenu(i18n("&Select Printer"), "tdeprint_printer", actionCollection(), "filter_modify"); fact->setDelayed(false); connect(fact->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(slotPrinterSelected(int))); connect(fact->popupMenu(),TQT_SIGNAL(aboutToShow()),KMTimer::self(),TQT_SLOT(hold())); @@ -307,7 +307,7 @@ void KMJobViewer::initActions() if (!m_standalone) { - KToolBar *toolbar = toolBar(); + TDEToolBar *toolbar = toolBar(); hact->plug(toolbar); ract->plug(toolbar); toolbar->insertSeparator(); @@ -327,7 +327,7 @@ void KMJobViewer::initActions() KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), actionCollection()); // refresh action - new KAction(i18n("Refresh"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotRefresh()),actionCollection(),"refresh"); + new TDEAction(i18n("Refresh"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotRefresh()),actionCollection(),"refresh"); // create status bar KStatusBar *statusbar = statusBar(); @@ -367,13 +367,13 @@ void KMJobViewer::buildPrinterMenu(TQPopupMenu *menu, bool use_all, bool use_spe void KMJobViewer::slotShowMoveMenu() { - TQPopupMenu *menu = static_cast<KActionMenu*>(actionCollection()->action("job_move"))->popupMenu(); + TQPopupMenu *menu = static_cast<TDEActionMenu*>(actionCollection()->action("job_move"))->popupMenu(); buildPrinterMenu(menu, false, false); } void KMJobViewer::slotShowPrinterMenu() { - TQPopupMenu *menu = static_cast<KActionMenu*>(actionCollection()->action("filter_modify"))->popupMenu(); + TQPopupMenu *menu = static_cast<TDEActionMenu*>(actionCollection()->action("filter_modify"))->popupMenu(); buildPrinterMenu(menu, true, true); } @@ -583,7 +583,7 @@ void KMJobViewer::loadPluginActions() if (m_standalone) { // standalone window, insert actions into main menubar - KAction *act = actionCollection()->action("job_restart"); + TDEAction *act = actionCollection()->action("job_restart"); for (int i=0;i<act->containerCount();i++) { if (menuBar()->findItem(act->itemId(i), &menu)) @@ -594,8 +594,8 @@ void KMJobViewer::loadPluginActions() } } - TQValueList<KAction*> acts = m_manager->createPluginActions(actionCollection()); - for (TQValueListIterator<KAction*> it=acts.begin(); it!=acts.end(); ++it) + TQValueList<TDEAction*> acts = m_manager->createPluginActions(actionCollection()); + for (TQValueListIterator<TDEAction*> it=acts.begin(); it!=acts.end(); ++it) { // connect the action to this connect((*it), TQT_SIGNAL(activated(int)), TQT_SLOT(pluginActionActivated(int))); @@ -611,8 +611,8 @@ void KMJobViewer::loadPluginActions() void KMJobViewer::removePluginActions() { - TQValueList<KAction*> acts = actionCollection()->actions("plugin"); - for (TQValueListIterator<KAction*> it=acts.begin(); it!=acts.end(); ++it) + TQValueList<TDEAction*> acts = actionCollection()->actions("plugin"); + for (TQValueListIterator<TDEAction*> it=acts.begin(); it!=acts.end(); ++it) { (*it)->unplugAll(); delete (*it); @@ -650,7 +650,7 @@ void KMJobViewer::reload() // update the "History" action state actionCollection()->action("view_completed")->setEnabled(m_manager->actions() & KMJob::ShowCompleted); - static_cast<KToggleAction*>(actionCollection()->action("view_completed"))->setChecked(false); + static_cast<TDEToggleAction*>(actionCollection()->action("view_completed"))->setChecked(false); } void KMJobViewer::closeEvent(TQCloseEvent *e) diff --git a/tdeprint/management/kmjobviewer.h b/tdeprint/management/kmjobviewer.h index 1dca024a8..534958656 100644 --- a/tdeprint/management/kmjobviewer.h +++ b/tdeprint/management/kmjobviewer.h @@ -30,7 +30,7 @@ class KMJobManager; class KMJob; -class KListView; +class TDEListView; class JobItem; class TQPopupMenu; class TQListViewItem; @@ -46,7 +46,7 @@ class TQCheckBox; * if you're a TDEPrint developer. The API might change in the * future and binary compatibility might be broken. */ -class TDEPRINT_EXPORT KMJobViewer : public KMainWindow, public KMPrinterPage, public KPReloadObject +class TDEPRINT_EXPORT KMJobViewer : public TDEMainWindow, public KMPrinterPage, public KPReloadObject { Q_OBJECT public: @@ -108,7 +108,7 @@ protected: void updateStatusBar(); private: - KListView *m_view; + TDEListView *m_view; TQPtrList<KMJob> m_jobs; TQPtrList<JobItem> m_items; TQPopupMenu *m_pop; diff --git a/tdeprint/management/kmmainview.cpp b/tdeprint/management/kmmainview.cpp index 858fca0fc..9673d214f 100644 --- a/tdeprint/management/kmmainview.cpp +++ b/tdeprint/management/kmmainview.cpp @@ -78,7 +78,7 @@ int tdeprint_management_add_printer_wizard( TQWidget* parent ) return flag; } -KMMainView::KMMainView(TQWidget *parent, const char *name, KActionCollection *coll) +KMMainView::KMMainView(TQWidget *parent, const char *name, TDEActionCollection *coll) : TQWidget(parent, name) { m_current = 0; @@ -88,15 +88,15 @@ KMMainView::KMMainView(TQWidget *parent, const char *name, KActionCollection *co m_printerview = new KMPrinterView(this, "PrinterView"); m_printerpages = new KMPages(this, "PrinterPages"); m_pop = new TQPopupMenu(this); - m_toolbar = new KToolBar(this, "ToolBar"); + m_toolbar = new TDEToolBar(this, "ToolBar"); m_toolbar->setMovingEnabled(false); m_plugin = new PluginComboBox(this, "Plugin"); /* m_menubar = new KMenuBar( this ); static_cast<KMenuBar*>( m_menubar )->setTopLevelMenu( false ); */ - m_menubar = new KToolBar( this, "MenuBar", false, false ); - m_menubar->setIconText( KToolBar::IconTextRight ); + m_menubar = new TDEToolBar( this, "MenuBar", false, false ); + m_menubar->setIconText( TDEToolBar::IconTextRight ); m_menubar->setMovingEnabled( false ); // layout @@ -122,7 +122,7 @@ KMMainView::KMMainView(TQWidget *parent, const char *name, KActionCollection *co if (coll) m_actions = coll; else - m_actions = new KActionCollection(this); + m_actions = new TDEActionCollection(this); initActions(); // first update @@ -151,13 +151,13 @@ void KMMainView::restoreSettings() setOrientation(conf->readNumEntry("Orientation", Qt::Vertical)); bool view = conf->readBoolEntry("ViewToolBar",false); slotToggleToolBar(view); - ((KToggleAction*)m_actions->action("view_toolbar"))->setChecked(view); + ((TDEToggleAction*)m_actions->action("view_toolbar"))->setChecked(view); view = conf->readBoolEntry( "ViewMenuBar", true ); slotToggleMenuBar( view ); - static_cast<KToggleAction*>( m_actions->action( "view_menubar" ) )->setChecked( view ); + static_cast<TDEToggleAction*>( m_actions->action( "view_menubar" ) )->setChecked( view ); view = conf->readBoolEntry("ViewPrinterInfos",true); slotShowPrinterInfos(view); - ((KToggleAction*)m_actions->action("view_printerinfos"))->setChecked(view); + ((TDEToggleAction*)m_actions->action("view_printerinfos"))->setChecked(view); } void KMMainView::saveSettings() @@ -166,9 +166,9 @@ void KMMainView::saveSettings() conf->setGroup("General"); conf->writeEntry("ViewType",(int)m_printerview->viewType()); conf->writeEntry("Orientation",(int)orientation()); - conf->writeEntry("ViewToolBar",((KToggleAction*)m_actions->action("view_toolbar"))->isChecked()); - conf->writeEntry("ViewMenuBar",static_cast<KToggleAction*>( m_actions->action("view_menubar") )->isChecked()); - conf->writeEntry("ViewPrinterInfos",((KToggleAction*)m_actions->action("view_printerinfos"))->isChecked()); + conf->writeEntry("ViewToolBar",((TDEToggleAction*)m_actions->action("view_toolbar"))->isChecked()); + conf->writeEntry("ViewMenuBar",static_cast<TDEToggleAction*>( m_actions->action("view_menubar") )->isChecked()); + conf->writeEntry("ViewPrinterInfos",((TDEToggleAction*)m_actions->action("view_printerinfos"))->isChecked()); conf->sync(); } @@ -181,25 +181,25 @@ void KMMainView::initActions() vact->setCurrentItem(0); connect(vact,TQT_SIGNAL(activated(int)),TQT_SLOT(slotChangeView(int))); - KActionMenu *stateAct = new KActionMenu(i18n("Start/Stop Printer"), "tdeprint_printstate", m_actions, "printer_state_change"); + TDEActionMenu *stateAct = new TDEActionMenu(i18n("Start/Stop Printer"), "tdeprint_printstate", m_actions, "printer_state_change"); stateAct->setDelayed(false); - stateAct->insert(new KAction(i18n("&Start Printer"),"tdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_start")); - stateAct->insert(new KAction(i18n("Sto&p Printer"),"tdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_stop")); + stateAct->insert(new TDEAction(i18n("&Start Printer"),"tdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_start")); + stateAct->insert(new TDEAction(i18n("Sto&p Printer"),"tdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_stop")); - stateAct = new KActionMenu(i18n("Enable/Disable Job Spooling"), "tdeprint_queuestate", m_actions, "printer_spool_change"); + stateAct = new TDEActionMenu(i18n("Enable/Disable Job Spooling"), "tdeprint_queuestate", m_actions, "printer_spool_change"); stateAct->setDelayed(false); - stateAct->insert(new KAction(i18n("&Enable Job Spooling"),"tdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_enable")); - stateAct->insert(new KAction(i18n("&Disable Job Spooling"),"tdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_disable")); - - new KAction(i18n("&Remove"),"edittrash",0,TQT_TQOBJECT(this),TQT_SLOT(slotRemove()),m_actions,"printer_remove"); - new KAction(i18n("&Configure..."),"configure",0,TQT_TQOBJECT(this),TQT_SLOT(slotConfigure()),m_actions,"printer_configure"); - new KAction(i18n("Add &Printer/Class..."),"tdeprint_addprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotAdd()),m_actions,"printer_add"); - new KAction(i18n("Add &Special (pseudo) Printer..."),"tdeprint_addpseudo",0,TQT_TQOBJECT(this),TQT_SLOT(slotAddSpecial()),m_actions,"printer_add_special"); - new KAction(i18n("Set as &Local Default"),"tdeprint_defaulthard",0,TQT_TQOBJECT(this),TQT_SLOT(slotHardDefault()),m_actions,"printer_hard_default"); - new KAction(i18n("Set as &User Default"),"tdeprint_defaultsoft",0,TQT_TQOBJECT(this),TQT_SLOT(slotSoftDefault()),m_actions,"printer_soft_default"); - new KAction(i18n("&Test Printer..."),"tdeprint_testprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotTest()),m_actions,"printer_test"); - new KAction(i18n("Configure &Manager..."),"tdeprint_configmgr",0,TQT_TQOBJECT(this),TQT_SLOT(slotManagerConfigure()),m_actions,"manager_configure"); - new KAction(i18n("Initialize Manager/&View"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotInit()),m_actions,"view_refresh"); + stateAct->insert(new TDEAction(i18n("&Enable Job Spooling"),"tdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_enable")); + stateAct->insert(new TDEAction(i18n("&Disable Job Spooling"),"tdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_disable")); + + new TDEAction(i18n("&Remove"),"edittrash",0,TQT_TQOBJECT(this),TQT_SLOT(slotRemove()),m_actions,"printer_remove"); + new TDEAction(i18n("&Configure..."),"configure",0,TQT_TQOBJECT(this),TQT_SLOT(slotConfigure()),m_actions,"printer_configure"); + new TDEAction(i18n("Add &Printer/Class..."),"tdeprint_addprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotAdd()),m_actions,"printer_add"); + new TDEAction(i18n("Add &Special (pseudo) Printer..."),"tdeprint_addpseudo",0,TQT_TQOBJECT(this),TQT_SLOT(slotAddSpecial()),m_actions,"printer_add_special"); + new TDEAction(i18n("Set as &Local Default"),"tdeprint_defaulthard",0,TQT_TQOBJECT(this),TQT_SLOT(slotHardDefault()),m_actions,"printer_hard_default"); + new TDEAction(i18n("Set as &User Default"),"tdeprint_defaultsoft",0,TQT_TQOBJECT(this),TQT_SLOT(slotSoftDefault()),m_actions,"printer_soft_default"); + new TDEAction(i18n("&Test Printer..."),"tdeprint_testprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotTest()),m_actions,"printer_test"); + new TDEAction(i18n("Configure &Manager..."),"tdeprint_configmgr",0,TQT_TQOBJECT(this),TQT_SLOT(slotManagerConfigure()),m_actions,"manager_configure"); + new TDEAction(i18n("Initialize Manager/&View"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotInit()),m_actions,"view_refresh"); KIconSelectAction *dact = new KIconSelectAction(i18n("&Orientation"),0,m_actions,"orientation_change"); iconlst.clear(); @@ -208,29 +208,29 @@ void KMMainView::initActions() dact->setCurrentItem(0); connect(dact,TQT_SIGNAL(activated(int)),TQT_SLOT(slotChangeDirection(int))); - new KAction(i18n("R&estart Server"),"tdeprint_restartsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerRestart()),m_actions,"server_restart"); - new KAction(i18n("Configure &Server..."),"tdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerConfigure()),m_actions,"server_configure"); - new KAction(i18n("Configure Server Access..."),"tdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerConfigureAccess()),m_actions,"server_access_configure"); + new TDEAction(i18n("R&estart Server"),"tdeprint_restartsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerRestart()),m_actions,"server_restart"); + new TDEAction(i18n("Configure &Server..."),"tdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerConfigure()),m_actions,"server_configure"); + new TDEAction(i18n("Configure Server Access..."),"tdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerConfigureAccess()),m_actions,"server_access_configure"); - KToggleAction *tact = new KToggleAction(i18n("Show &Toolbar"),0,m_actions,"view_toolbar"); + TDEToggleAction *tact = new TDEToggleAction(i18n("Show &Toolbar"),0,m_actions,"view_toolbar"); tact->setCheckedState(i18n("Hide &Toolbar")); connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotToggleToolBar(bool))); - tact = new KToggleAction( i18n( "Show Me&nu Toolbar" ), 0, m_actions, "view_menubar" ); + tact = new TDEToggleAction( i18n( "Show Me&nu Toolbar" ), 0, m_actions, "view_menubar" ); tact->setCheckedState(i18n("Hide Me&nu Toolbar")); connect( tact, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotToggleMenuBar( bool ) ) ); - tact = new KToggleAction(i18n("Show Pr&inter Details"),"tdeprint_printer_infos", 0,m_actions,"view_printerinfos"); + tact = new TDEToggleAction(i18n("Show Pr&inter Details"),"tdeprint_printer_infos", 0,m_actions,"view_printerinfos"); tact->setCheckedState(KGuiItem(i18n("Hide Pr&inter Details"),"tdeprint_printer_infos")); tact->setChecked(true); connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotShowPrinterInfos(bool))); - tact = new KToggleAction(i18n("Toggle Printer &Filtering"), "filter", 0, m_actions, "view_pfilter"); + tact = new TDEToggleAction(i18n("Toggle Printer &Filtering"), "filter", 0, m_actions, "view_pfilter"); tact->setChecked(KMManager::self()->isFilterEnabled()); connect(tact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggleFilter(bool))); - new KAction( i18n( "%1 &Handbook" ).arg( "TDEPrint" ), "contents", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHelp() ), m_actions, "invoke_help" ); - new KAction( i18n( "%1 &Web Site" ).arg( "TDEPrint" ), "network", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHelp() ), m_actions, "invoke_web" ); + new TDEAction( i18n( "%1 &Handbook" ).arg( "TDEPrint" ), "contents", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHelp() ), m_actions, "invoke_help" ); + new TDEAction( i18n( "%1 &Web Site" ).arg( "TDEPrint" ), "network", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHelp() ), m_actions, "invoke_web" ); - KActionMenu *mact = new KActionMenu(i18n("Pri&nter Tools"), "package_utilities", m_actions, "printer_tool"); + TDEActionMenu *mact = new TDEActionMenu(i18n("Pri&nter Tools"), "package_utilities", m_actions, "printer_tool"); mact->setDelayed(false); connect(mact->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotToolSelected(int))); TQStringList files = TDEGlobal::dirs()->findAllResources("data", "tdeprint/tools/*.desktop"); @@ -412,7 +412,7 @@ void KMMainView::slotPrinterSelected(const TQString& prname) void KMMainView::setViewType(int ID) { - ((KSelectAction*)m_actions->action("view_change"))->setCurrentItem(ID); + ((TDESelectAction*)m_actions->action("view_change"))->setCurrentItem(ID); slotChangeView(ID); } @@ -468,8 +468,8 @@ void KMMainView::slotRightButtonClicked(const TQString& prname, const TQPoint& p } if (!printer->isSpecial()) { - TQValueList<KAction*> pactions = m_actions->actions("plugin"); - for (TQValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it) + TQValueList<TDEAction*> pactions = m_actions->actions("plugin"); + for (TQValueList<TDEAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it) (*it)->plug(m_pop); if (pactions.count() > 0) m_pop->insertSeparator(); @@ -617,7 +617,7 @@ void KMMainView::slotSoftDefault() void KMMainView::setOrientation(int o) { int ID = (o == Qt::Horizontal ? 1 : 0); - ((KSelectAction*)m_actions->action("orientation_change"))->setCurrentItem(ID); + ((TDESelectAction*)m_actions->action("orientation_change"))->setCurrentItem(ID); slotChangeDirection(ID); } @@ -757,7 +757,7 @@ void KMMainView::slotShowPrinterInfos(bool on) void KMMainView::enableToolbar(bool on) { - KToggleAction *act = (KToggleAction*)m_actions->action("view_toolbar"); + TDEToggleAction *act = (TDEToggleAction*)m_actions->action("view_toolbar"); m_toolbar->setEnabled(on); act->setEnabled(on); if (on && act->isChecked()) @@ -766,7 +766,7 @@ void KMMainView::enableToolbar(bool on) m_toolbar->hide(); } -KAction* KMMainView::action(const char *name) +TDEAction* KMMainView::action(const char *name) { return m_actions->action(name); } @@ -793,23 +793,23 @@ void KMMainView::reload() void KMMainView::showPrinterInfos(bool on) { - static_cast<KToggleAction*>(m_actions->action("view_printerinfos"))->setChecked(on); + static_cast<TDEToggleAction*>(m_actions->action("view_printerinfos"))->setChecked(on); slotShowPrinterInfos(on); } bool KMMainView::printerInfosShown() const { - return (static_cast<KToggleAction*>(m_actions->action("view_printerinfos"))->isChecked()); + return (static_cast<TDEToggleAction*>(m_actions->action("view_printerinfos"))->isChecked()); } void KMMainView::loadPluginActions() { KMFactory::self()->manager()->createPluginActions(m_actions); - TQValueList<KAction*> pactions = m_actions->actions("plugin"); + TQValueList<TDEAction*> pactions = m_actions->actions("plugin"); int index = m_pactionsindex; //TQPopupMenu *menu = m_menubar->findItem( m_menubar->idAt( 1 ) )->popup(); TQPopupMenu *menu = m_menubar->getButton( 1 )->popup(); - for (TQValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it) + for (TQValueList<TDEAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it) { (*it)->plug(m_toolbar, index++); ( *it )->plug( menu ); @@ -818,8 +818,8 @@ void KMMainView::loadPluginActions() void KMMainView::removePluginActions() { - TQValueList<KAction*> pactions = m_actions->actions("plugin"); - for (TQValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it) + TQValueList<TDEAction*> pactions = m_actions->actions("plugin"); + for (TQValueList<TDEAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it) { (*it)->unplugAll(); delete (*it); diff --git a/tdeprint/management/kmmainview.h b/tdeprint/management/kmmainview.h index 7ed53a5c8..54cdffbc2 100644 --- a/tdeprint/management/kmmainview.h +++ b/tdeprint/management/kmmainview.h @@ -32,12 +32,12 @@ class KMManager; class KMPrinterView; class KMPrinter; class KMPages; -class KActionCollection; +class TDEActionCollection; class TQPopupMenu; class TQTimer; class TQSplitter; -class KToolBar; -class KAction; +class TDEToolBar; +class TDEAction; class PluginComboBox; class TQBoxLayout; class MessageWindow; @@ -54,7 +54,7 @@ class TDEPRINT_EXPORT KMMainView : public TQWidget, public KPReloadObject { Q_OBJECT public: - KMMainView(TQWidget *parent = 0, const char *name = 0, KActionCollection *coll = 0); + KMMainView(TQWidget *parent = 0, const char *name = 0, TDEActionCollection *coll = 0); ~KMMainView(); void setOrientation(int); @@ -62,7 +62,7 @@ public: void setViewType(int); int viewType() const; void enableToolbar(bool on = true); - KAction* action(const char *name); + TDEAction* action(const char *name); void showPrinterInfos(bool on); bool printerInfosShown() const; @@ -115,17 +115,17 @@ private: KMPrinterView *m_printerview; KMPages *m_printerpages; TQPopupMenu *m_pop; - KActionCollection *m_actions; + TDEActionCollection *m_actions; KMPrinter *m_current; - KToolBar *m_toolbar; + TDEToolBar *m_toolbar; PluginComboBox *m_plugin; int m_pactionsindex; TQStringList m_toollist; bool m_first; TQBoxLayout *m_boxlayout; - class KMainWindowPrivate; - KMainWindowPrivate *d; - KToolBar *m_menubar; + class TDEMainWindowPrivate; + TDEMainWindowPrivate *d; + TDEToolBar *m_menubar; }; TDEPRINT_EXPORT int tdeprint_management_add_printer_wizard( TQWidget* parent ); diff --git a/tdeprint/management/kmwbackend.cpp b/tdeprint/management/kmwbackend.cpp index cd98a8b07..6fd8cf2dc 100644 --- a/tdeprint/management/kmwbackend.cpp +++ b/tdeprint/management/kmwbackend.cpp @@ -33,13 +33,13 @@ #include <kdialog.h> #include <kdebug.h> -class KRadioButton : public TQRadioButton +class TDERadioButton : public TQRadioButton { public: - KRadioButton(const TQString& txt, TQWidget *parent = 0, const char *name = 0); + TDERadioButton(const TQString& txt, TQWidget *parent = 0, const char *name = 0); }; -KRadioButton::KRadioButton(const TQString& txt, TQWidget *parent, const char *name) +TDERadioButton::TDERadioButton(const TQString& txt, TQWidget *parent, const char *name) : TQRadioButton(txt,parent,name) { setCursor(KCursor::handCursor()); @@ -158,7 +158,7 @@ void KMWBackend::addBackend(int ID, const TQString& txt, bool on, const TQString } else { - KRadioButton *btn = new KRadioButton(txt, this); + TDERadioButton *btn = new TDERadioButton(txt, this); btn->setEnabled(on); if ( !whatsThis.isEmpty() ) TQWhatsThis::add( btn, whatsThis ); diff --git a/tdeprint/management/kmwclass.cpp b/tdeprint/management/kmwclass.cpp index a87388a6f..cadddf5d0 100644 --- a/tdeprint/management/kmwclass.cpp +++ b/tdeprint/management/kmwclass.cpp @@ -37,9 +37,9 @@ KMWClass::KMWClass(TQWidget *parent, const char *name) m_title = i18n("Class Composition"); m_nextpage = KMWizard::Name; - m_list1 = new KListBox(this); + m_list1 = new TDEListBox(this); m_list1->setSelectionMode(TQListBox::Extended); - m_list2 = new KListBox(this); + m_list2 = new TDEListBox(this); m_list2->setSelectionMode(TQListBox::Extended); TQToolButton *add = new TQToolButton(this); diff --git a/tdeprint/management/kmwclass.h b/tdeprint/management/kmwclass.h index c9b63befb..a74f20117 100644 --- a/tdeprint/management/kmwclass.h +++ b/tdeprint/management/kmwclass.h @@ -22,7 +22,7 @@ #include "kmwizardpage.h" -class KListBox; +class TDEListBox; class KMWClass : public KMWizardPage { @@ -40,7 +40,7 @@ protected slots: void slotRemove(); private: - KListBox *m_list1, *m_list2; + TDEListBox *m_list1, *m_list2; }; #endif diff --git a/tdeprint/management/kmwdriverselect.cpp b/tdeprint/management/kmwdriverselect.cpp index 88b9410d5..94bf7d02e 100644 --- a/tdeprint/management/kmwdriverselect.cpp +++ b/tdeprint/management/kmwdriverselect.cpp @@ -38,7 +38,7 @@ KMWDriverSelect::KMWDriverSelect(TQWidget *parent, const char *name) m_nextpage = KMWizard::DriverTest; m_entries = NULL; - m_list = new KListBox(this); + m_list = new TDEListBox(this); TQLabel *l1 = new TQLabel(this); l1->setText(i18n("<p>Several drivers have been detected for this model. Select the driver " "you want to use. You will have the opportunity to test it as well as to " diff --git a/tdeprint/management/kmwdriverselect.h b/tdeprint/management/kmwdriverselect.h index 464a78239..9c78008c1 100644 --- a/tdeprint/management/kmwdriverselect.h +++ b/tdeprint/management/kmwdriverselect.h @@ -23,7 +23,7 @@ #include "kmwizardpage.h" #include "kmdbentry.h" -class KListBox; +class TDEListBox; class TQPushButton; class KMWDriverSelect : public KMWizardPage @@ -40,7 +40,7 @@ protected slots: void slotDriverComment(); private: - KListBox *m_list; + TDEListBox *m_list; KMDBEntryList *m_entries; TQPushButton *m_drivercomment; }; diff --git a/tdeprint/management/kmwlocal.cpp b/tdeprint/management/kmwlocal.cpp index 7b56b2deb..624e87a44 100644 --- a/tdeprint/management/kmwlocal.cpp +++ b/tdeprint/management/kmwlocal.cpp @@ -41,7 +41,7 @@ KMWLocal::KMWLocal(TQWidget *parent, const char *name) m_initialized = false; m_block = false; - m_ports = new KListView(this); + m_ports = new TDEListView(this); m_ports->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); m_ports->setLineWidth(1); m_ports->header()->hide(); diff --git a/tdeprint/management/kmwlocal.h b/tdeprint/management/kmwlocal.h index 681d94e51..e65128747 100644 --- a/tdeprint/management/kmwlocal.h +++ b/tdeprint/management/kmwlocal.h @@ -25,7 +25,7 @@ #include <tqstringlist.h> class TQLineEdit; -class KListView; +class TDEListView; class TQListViewItem; class KMWLocal : public KMWizardPage @@ -47,7 +47,7 @@ protected: TQListViewItem* lookForItem( const TQString& ); protected: - KListView *m_ports; + TDEListView *m_ports; TQLineEdit *m_localuri; TQStringList m_uris; TQListViewItem *m_parents[4]; diff --git a/tdeprint/management/kmwsocket.cpp b/tdeprint/management/kmwsocket.cpp index ca5defde4..71a70f2e9 100644 --- a/tdeprint/management/kmwsocket.cpp +++ b/tdeprint/management/kmwsocket.cpp @@ -39,7 +39,7 @@ KMWSocket::KMWSocket(TQWidget *parent, const char *name) m_ID = KMWizard::TCP; m_nextpage = KMWizard::Driver; - m_list = new KListView(this); + m_list = new TDEListView(this); m_list->addColumn(""); m_list->header()->hide(); m_list->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); diff --git a/tdeprint/management/kmwsocket.h b/tdeprint/management/kmwsocket.h index 687b52fd4..7489d6ec7 100644 --- a/tdeprint/management/kmwsocket.h +++ b/tdeprint/management/kmwsocket.h @@ -22,7 +22,7 @@ #include "kmwizardpage.h" -class KListView; +class TDEListView; class TQListViewItem; class TQLineEdit; class NetworkScanner; @@ -43,7 +43,7 @@ protected slots: void slotScanFinished(); private: - KListView *m_list; + TDEListView *m_list; NetworkScanner *m_scanner; TQLineEdit *m_printer, *m_port; }; diff --git a/tdeprint/management/kxmlcommanddlg.cpp b/tdeprint/management/kxmlcommanddlg.cpp index e8e43ba09..df256f082 100644 --- a/tdeprint/management/kxmlcommanddlg.cpp +++ b/tdeprint/management/kxmlcommanddlg.cpp @@ -84,7 +84,7 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *nam m_xmlcmd = 0; m_command = new TQLineEdit(this); - m_view = new KListView(this); + m_view = new TDEListView(this); m_view->addColumn(""); m_view->header()->hide(); m_view->setSorting(-1); @@ -137,7 +137,7 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *nam TQLabel *m_editlab2 = new TQLabel(i18n("Ma&ximum value:"), w1); m_editlab1->setBuddy(m_edit1); m_editlab2->setBuddy(m_edit2); - m_values = new KListView(w2); + m_values = new TDEListView(w2); m_values->addColumn(i18n("Name")); m_values->addColumn(i18n("Description")); m_values->setAllColumnsShowFocus(true); @@ -841,7 +841,7 @@ KXmlCommandDlg::KXmlCommandDlg(TQWidget *parent, const char *name) m_description = new TQLineEdit(topmain); m_idname = new TQLabel(topmain); - m_requirements = new KListView(m_gb2); + m_requirements = new TDEListView(m_gb2); m_requirements->addColumn(""); m_requirements->header()->hide(); m_addreq = new TQToolButton(m_gb2); @@ -850,8 +850,8 @@ KXmlCommandDlg::KXmlCommandDlg(TQWidget *parent, const char *name) m_removereq->setIconSet(SmallIconSet("editdelete")); TQPushButton *m_edit = new KPushButton(KGuiItem(i18n("&Edit Command..."), "edit"), topmain); m_mimetype = new TQComboBox(dummy); - m_availablemime = new KListBox(m_gb1); - m_selectedmime = new KListBox(m_gb1); + m_availablemime = new TDEListBox(m_gb1); + m_selectedmime = new TDEListBox(m_gb1); m_addmime = new TQToolButton(m_gb1); m_addmime->setIconSet(TQApplication::reverseLayout()? SmallIconSet("forward") : SmallIconSet("back")); m_removemime = new TQToolButton(m_gb1); diff --git a/tdeprint/management/kxmlcommanddlg.h b/tdeprint/management/kxmlcommanddlg.h index 88e590325..d69c19e62 100644 --- a/tdeprint/management/kxmlcommanddlg.h +++ b/tdeprint/management/kxmlcommanddlg.h @@ -25,13 +25,13 @@ #include <tqstringlist.h> #include <kdialogbase.h> -class KListView; +class TDEListView; class TQListViewItem; class TQLineEdit; class TQComboBox; class TQWidgetStack; class TQToolButton; -class KListBox; +class TDEListBox; class TQListBoxItem; class TQTextEdit; class TQCheckBox; @@ -74,11 +74,11 @@ protected slots: void slotChanged(); private: - KListView *m_view; + TDEListView *m_view; TQLineEdit *m_name, *m_desc, *m_format, *m_default, *m_command; TQComboBox *m_type; TQWidget *m_dummy; - KListView *m_values; + TDEListView *m_values; TQLineEdit *m_edit1, *m_edit2; TQWidgetStack *m_stack; TQToolButton *m_apply, *m_addgrp, *m_addopt, *m_delopt, *m_up, *m_down; @@ -115,9 +115,9 @@ private: TQLineEdit *m_description; TQLabel *m_idname; TQComboBox *m_mimetype; - KListBox *m_availablemime, *m_selectedmime; + TDEListBox *m_availablemime, *m_selectedmime; TQToolButton *m_addmime, *m_removemime; - KListView *m_requirements; + TDEListView *m_requirements; TQToolButton *m_removereq, *m_addreq; TQStringList m_mimelist; diff --git a/tdeprint/management/kxmlcommandselector.cpp b/tdeprint/management/kxmlcommandselector.cpp index 093d2a909..67627fb53 100644 --- a/tdeprint/management/kxmlcommandselector.cpp +++ b/tdeprint/management/kxmlcommandselector.cpp @@ -273,7 +273,7 @@ void KXmlCommandSelector::slotXmlCommandToggled( bool on ) void KXmlCommandSelector::slotHelpCommand() { - KPopupFrame *pop = new KPopupFrame( m_helpbtn ); + TDEPopupFrame *pop = new TDEPopupFrame( m_helpbtn ); KActiveLabel *lab = new KActiveLabel( m_help, pop ); lab->resize( lab->sizeHint() ); pop->setMainWidget( lab ); diff --git a/tdeprint/management/pluginaction.cpp b/tdeprint/management/pluginaction.cpp index 0aa3c10a3..377a28217 100644 --- a/tdeprint/management/pluginaction.cpp +++ b/tdeprint/management/pluginaction.cpp @@ -21,7 +21,7 @@ // automatically connect to "pluginActionActived(int)" in the receiver. PluginAction::PluginAction(int ID, const TQString& txt, const TQString& icon, int accel, TQObject *parent, const char *name) -: KAction(txt, icon, accel, parent, name), m_id(ID) +: TDEAction(txt, icon, accel, parent, name), m_id(ID) { connect(this, TQT_SIGNAL(activated()), TQT_SLOT(slotActivated())); } diff --git a/tdeprint/management/pluginaction.h b/tdeprint/management/pluginaction.h index 0bb368ed2..1d77b71b7 100644 --- a/tdeprint/management/pluginaction.h +++ b/tdeprint/management/pluginaction.h @@ -22,7 +22,7 @@ #include <kaction.h> -class TDEPRINT_EXPORT PluginAction : public KAction +class TDEPRINT_EXPORT PluginAction : public TDEAction { Q_OBJECT diff --git a/tdeprint/management/smbview.cpp b/tdeprint/management/smbview.cpp index c5b40f942..10ac359f9 100644 --- a/tdeprint/management/smbview.cpp +++ b/tdeprint/management/smbview.cpp @@ -38,7 +38,7 @@ //********************************************************************************************* SmbView::SmbView(TQWidget *parent, const char *name) -: KListView(parent,name) +: TDEListView(parent,name) { addColumn(i18n("Printer")); addColumn(i18n("Comment")); diff --git a/tdeprint/management/smbview.h b/tdeprint/management/smbview.h index 9b571f4dd..2226fd705 100644 --- a/tdeprint/management/smbview.h +++ b/tdeprint/management/smbview.h @@ -25,7 +25,7 @@ class TDEProcess; class KTempFile; -class SmbView : public KListView +class SmbView : public TDEListView { Q_OBJECT public: diff --git a/tdeprint/rlpr/kmwrlpr.cpp b/tdeprint/rlpr/kmwrlpr.cpp index 15ad88ec2..dc12da040 100644 --- a/tdeprint/rlpr/kmwrlpr.cpp +++ b/tdeprint/rlpr/kmwrlpr.cpp @@ -50,7 +50,7 @@ KMWRlpr::KMWRlpr(TQWidget *parent, const char *name) m_title = i18n("Remote LPD Queue Settings"); m_nextpage = KMWizard::Name; - m_view = new KListView(this); + m_view = new TDEListView(this); m_view->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); m_view->setLineWidth(1); m_view->addColumn(TQString::fromLatin1("")); diff --git a/tdeprint/rlpr/kmwrlpr.h b/tdeprint/rlpr/kmwrlpr.h index 7c1aa74f2..dc375303d 100644 --- a/tdeprint/rlpr/kmwrlpr.h +++ b/tdeprint/rlpr/kmwrlpr.h @@ -22,7 +22,7 @@ #include "kmwizardpage.h" -class KListView; +class TDEListView; class TQLineEdit; class TQListViewItem; @@ -43,7 +43,7 @@ protected: void initialize(); private: - KListView *m_view; + TDEListView *m_view; TQLineEdit *m_host, *m_queue; }; diff --git a/tdeprint/tdefilelist.cpp b/tdeprint/tdefilelist.cpp index 9d02b77f6..b365c1fb6 100644 --- a/tdeprint/tdefilelist.cpp +++ b/tdeprint/tdefilelist.cpp @@ -97,7 +97,7 @@ KFileList::KFileList(TQWidget *parent, const char *name) m_block = false; - m_files = new KListView(this); + m_files = new TDEListView(this); m_files->addColumn(i18n("Name")); m_files->addColumn(i18n("Type")); m_files->addColumn(i18n("Path")); diff --git a/tdeprint/tdefilelist.h b/tdeprint/tdefilelist.h index 9b376a15a..912abd07a 100644 --- a/tdeprint/tdefilelist.h +++ b/tdeprint/tdefilelist.h @@ -24,7 +24,7 @@ #include <tqptrlist.h> #include <kurl.h> -class KListView; +class TDEListView; class TQToolButton; class TQListViewItem; @@ -54,7 +54,7 @@ protected: void selection(TQPtrList<TQListViewItem>&); private: - KListView *m_files; + TDEListView *m_files; TQToolButton *m_add, *m_remove, *m_open, *m_up, *m_down; bool m_block; }; diff --git a/tdeprint/tests/helpwindow.cpp b/tdeprint/tests/helpwindow.cpp index 9f92734f4..aedb9e2b8 100644 --- a/tdeprint/tests/helpwindow.cpp +++ b/tdeprint/tests/helpwindow.cpp @@ -39,7 +39,7 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, TQWidget* parent, const char *name ) - : KMainWindow( parent, name, WDestructiveClose ), + : TDEMainWindow( parent, name, WDestructiveClose ), pathCombo( 0 ), selectedURL() { readHistory(); diff --git a/tdeprint/tests/helpwindow.h b/tdeprint/tests/helpwindow.h index c444b8144..d32f2f773 100644 --- a/tdeprint/tests/helpwindow.h +++ b/tdeprint/tests/helpwindow.h @@ -20,7 +20,7 @@ class TQComboBox; class TQPopupMenu; -class HelpWindow : public KMainWindow +class HelpWindow : public TDEMainWindow { Q_OBJECT public: diff --git a/tderesources/configpage.cpp b/tderesources/configpage.cpp index 0660710db..3465562fb 100644 --- a/tderesources/configpage.cpp +++ b/tderesources/configpage.cpp @@ -113,7 +113,7 @@ ConfigPage::ConfigPage( TQWidget *parent, const char *name ) mFamilyCombo = new KComboBox( false, groupBox ); groupBoxLayout->addMultiCellWidget( mFamilyCombo, 0, 0, 0, 1 ); - mListView = new KListView( groupBox ); + mListView = new TDEListView( groupBox ); mListView->setAllColumnsShowFocus( true ); mListView->setFullWidth( true ); mListView->addColumn( i18n( "Name" ) ); diff --git a/tderesources/configpage.h b/tderesources/configpage.h index 5f3819c0f..789735d5e 100644 --- a/tderesources/configpage.h +++ b/tderesources/configpage.h @@ -30,7 +30,7 @@ #include "manager.h" class KComboBox; -class KListView; +class TDEListView; class TQListViewItem; class TQPushButton; @@ -96,7 +96,7 @@ class TDERESOURCES_EXPORT ConfigPage : public TQWidget, public ManagerObserver<R TQValueList<TDESharedPtr<ResourcePageInfo> > mInfoMap; KComboBox* mFamilyCombo; - KListView* mListView; + TDEListView* mListView; TQPushButton* mAddButton; TQPushButton* mRemoveButton; TQPushButton* mEditButton; diff --git a/tderesources/selectdialog.cpp b/tderesources/selectdialog.cpp index e505140a6..c9355a86c 100644 --- a/tderesources/selectdialog.cpp +++ b/tderesources/selectdialog.cpp @@ -48,7 +48,7 @@ SelectDialog::SelectDialog( TQPtrList<Resource> list, TQWidget *parent, TQGroupBox *groupBox = new TQGroupBox( 2, Qt::Horizontal, this ); groupBox->setTitle( i18n( "Resources" ) ); - mResourceId = new KListBox( groupBox ); + mResourceId = new TDEListBox( groupBox ); mainLayout->addWidget( groupBox ); diff --git a/tderesources/selectdialog.h b/tderesources/selectdialog.h index e982b7282..0e8ca5153 100644 --- a/tderesources/selectdialog.h +++ b/tderesources/selectdialog.h @@ -30,7 +30,7 @@ #include <kdialog.h> -class KListBox; +class TDEListBox; namespace KRES { @@ -77,7 +77,7 @@ class TDERESOURCES_EXPORT SelectDialog : KDialog static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 ); private: - KListBox *mResourceId; + TDEListBox *mResourceId; TQMap<int, Resource*> mResourceMap; }; diff --git a/tdersync/tdersync.h b/tdersync/tdersync.h index 1e11cb959..03d7c6190 100644 --- a/tdersync/tdersync.h +++ b/tdersync/tdersync.h @@ -72,7 +72,7 @@ #include <kgenericfactory.h> #include <tdeparts/browserextension.h> -class KActionMenu; +class TDEActionMenu; class KonqDirPart; class KLineEdit; class RsyncConfigDialog; 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 <alex@darkstar.ping.at> Read and write numerical config entries, KPanner, KTabControl, -KPopupMenu, KMessageBox, KEdit widgets. +TDEPopupMenu, KMessageBox, KEdit widgets. Martin Jones <mjones@powerup.com.au> -Bugfixes in KPixmap and KURL, KColorDialog, KSelector +Bugfixes in KPixmap and KURL, KColorDialog, TDESelector KColorButton Keith Brown <kbrown@pdq.net> KTreeList class Bernd Johannes Wuebben <wuebben@math.cornell.edu> -KFontDialog class +TDEFontDialog class Tim D. Gilman <tdgilman@best.com> KDatePicker, KDateTable class @@ -49,7 +49,7 @@ Christoph Neerfeld <Christoph.Neerfeld@mail.bonn.netsurf.de> KIconLoader class Sven Radej <sven.radej@iname.com> -KLineEdit, KCombo, KToolbar, KStatusBar +KLineEdit, KCombo, TDEToolbar, KStatusBar Rainer Bawidamann <Rainer.Bawidamann@wohnheim.uni-ulm.de> Rubberbanding in KTreeList @@ -65,7 +65,7 @@ KWMModuleApplication, tearing/docking of ktoolbar and kmenubar, heavy modifications to kbutton Stephan Kulow <coolo@kde.org> -first versions of KTopLevelWidget and KToolBar, heavy modifications to +first versions of KTopLevelWidget and TDEToolBar, heavy modifications to automake and autoconf Joerg Habenicht <j.habenicht@europemail.com> @@ -93,5 +93,5 @@ Falk Brettschneider <gigafalk@yahoo.com> contributes for the Dockwidget class set Holger Freyther <freyther@yahoo.com> -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<KToolBarPos> KToolBarPosList; +typedef QValueVector<TDEToolBarPos> 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<TQString,Data>& 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<KAccel*> m_kaccelList; + TDEAccel *m_kaccel; + TQValueList<TDEAccel*> 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<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::const_iterator itr = accelList.constBegin(); - const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd(); + const TQValueList<TDEAccel*> & accelList = d->m_kaccelList; + TQValueList<TDEAccel*>::const_iterator itr = accelList.constBegin(); + const TQValueList<TDEAccel*>::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<KActionCollection *>( parent() ); - kdDebug(129) << "KAction::initPrivate(): this = " << this << " name = \"" << name() << "\" cut = " << cut.toStringInternal() << " m_parentCollection = " << m_parentCollection << endl; + m_parentCollection = tqt_dynamic_cast<TDEActionCollection *>( 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<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::const_iterator itr = accelList.constBegin(); - const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd(); + // Check if already plugged into current TDEAccel object + const TQValueList<TDEAccel*> & accelList = d->m_kaccelList; + TQValueList<TDEAccel*>::const_iterator itr = accelList.constBegin(); + const TQValueList<TDEAccel*>::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<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::const_iterator itr = accelList.constBegin(); - const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd(); + const TQValueList<TDEAccel*> & accelList = d->m_kaccelList; + TQValueList<TDEAccel*>::const_iterator itr = accelList.constBegin(); + const TQValueList<TDEAccel*>::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<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::iterator itr = accelList.begin(); - const TQValueList<KAccel*>::iterator itrEnd = accelList.end(); + //kdDebug(129) << "TDEAction::removeTDEAccel( " << i << " ): this = " << this << endl; + TQValueList<TDEAccel*> & accelList = d->m_kaccelList; + TQValueList<TDEAccel*>::iterator itr = accelList.begin(); + const TQValueList<TDEAccel*>::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<TQMenuBar*>(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<KToolBar *>( w ) ) - TQToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() ); + if ( ::tqqt_cast<TDEToolBar *>( w ) ) + TQToolTip::add( static_cast<TDEToolBar*>(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<TQPopupMenu*>( 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<KToolBar *>( w ) ) + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) { - KToolBar *bar = static_cast<KToolBar *>( w ); + TDEToolBar *bar = static_cast<TDEToolBar *>( 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<TQPopupMenu *>( w ); menu->removeItem( id ); } - else if ( ::tqqt_cast<KToolBar *>( w ) ) + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) { - KToolBar *bar = static_cast<KToolBar *>( w ); + TDEToolBar *bar = static_cast<TDEToolBar *>( w ); bar->removeItemDelayed( id ); } else if ( ::tqqt_cast<TQMenuBar *>( 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<KMainWindow *>(tl); // try to see if it's a kmainwindow + TDEMainWindow * mw = tqt_dynamic_cast<TDEMainWindow *>(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<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::const_iterator itr = accelList.constBegin(); - const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd(); + const TQValueList<TDEAccel*> & accelList = d->m_kaccelList; + TQValueList<TDEAccel*>::const_iterator itr = accelList.constBegin(); + const TQValueList<TDEAccel*>::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<TQPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); else if ( ::tqqt_cast<TQMenuBar *>( w ) ) static_cast<TQMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); - else if ( ::tqqt_cast<KToolBar *>( w ) ) - static_cast<KToolBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) + static_cast<TDEToolBar*>(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<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::const_iterator itr = accelList.constBegin(); - const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd(); + const TQValueList<TDEAccel*> & accelList = d->m_kaccelList; + TQValueList<TDEAccel*>::const_iterator itr = accelList.constBegin(); + const TQValueList<TDEAccel*>::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<TQMenuBar *>( w ) ) static_cast<TQMenuBar*>(w)->changeItem( itemId( i ), d->text() ); - else if ( ::tqqt_cast<KToolBar *>( w ) ) + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) { - TQWidget *button = static_cast<KToolBar *>(w)->getWidget( itemId( i ) ); - if ( ::tqqt_cast<KToolBarButton *>( button ) ) - static_cast<KToolBarButton *>(button)->setText( d->plainText() ); + TQWidget *button = static_cast<TDEToolBar *>(w)->getWidget( itemId( i ) ); + if ( ::tqqt_cast<TDEToolBarButton *>( button ) ) + static_cast<TDEToolBarButton *>(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<TQMenuBar *>( w ) ) static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( KIcon::Small ), d->text() ); - else if ( ::tqqt_cast<KToolBar *>( w ) ) - static_cast<KToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() ); + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) + static_cast<TDEToolBar *>(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<TQMenuBar *>( w ) ) static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet(), d->text() ); - else if ( ::tqqt_cast<KToolBar *>( w ) ) + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) { if ( icon().isEmpty() && d->hasIcon() ) // only if there is no named icon ( scales better ) - static_cast<KToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet() ); + static_cast<TDEToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet() ); else - static_cast<KToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet( KIcon::Small ) ); + static_cast<TDEToolBar *>(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<KToolBar *>( d->m_containers[ index ].m_container ); + return tqt_dynamic_cast<TDEToolBar *>( d->m_containers[ index ].m_container ); } -TQPopupMenu* KAction::popupMenu( int index ) const +TQPopupMenu* TDEAction::popupMenu( int index ) const { return tqt_dynamic_cast<TQPopupMenu *>( 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<KAccelPrivate *>( senderObj ) ) - emit activated( KAction::AccelActivation, Qt::NoButton ); + if ( ::tqqt_cast<TDEAccelPrivate *>( 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<TQSignal *>(sender())) { @@ -1127,30 +1127,30 @@ void KAction::slotPopupActivated() TQPopupMenu* qpm = tqt_dynamic_cast<TQPopupMenu *>( container(pos) ); if(qpm) { - KPopupMenu* kpm = tqt_dynamic_cast<KPopupMenu *>( qpm ); + TDEPopupMenu* kpm = tqt_dynamic_cast<TDEPopupMenu *>( 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."<<endl; - emit activated( KAction::PopupMenuActivation, Qt::NoButton ); + kdWarning(129)<<"Don't connect TDEAction::slotPopupActivated() to anything, expect into QPopupMenus which are in containers. Use slotActivated instead."<<endl; + emit activated( TDEAction::PopupMenuActivation, Qt::NoButton ); slotActivated(); } -void KAction::slotButtonClicked( int, TQt::ButtonState state ) +void TDEAction::slotButtonClicked( int, TQt::ButtonState state ) { kdDebug(129) << "slotButtonClicked() state=" << state << endl; - emit activated( KAction::ToolBarActivation, state ); + emit activated( TDEAction::ToolBarActivation, state ); // RightButton isn't really an activation if ( ( state & Qt::LeftButton ) || ( state & Qt::MidButton ) ) @@ -1158,9 +1158,9 @@ void KAction::slotButtonClicked( int, TQt::ButtonState state ) } -void KAction::slotDestroyed() +void TDEAction::slotDestroyed() { - kdDebug(129) << "KAction::slotDestroyed(): this = " << this << ", name = \"" << name() << "\", sender = " << sender() << endl; + kdDebug(129) << "TDEAction::slotDestroyed(): this = " << this << ", name = \"" << name() << "\", sender = " << sender() << endl; const TQObject* const o = TQT_TQOBJECT_CONST(sender()); #ifndef KDE_NO_COMPAT // KDE 4: remove @@ -1170,9 +1170,9 @@ void KAction::slotDestroyed() return; } #endif // KDE 4: remove end - TQValueList<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::iterator itr = accelList.begin(); - const TQValueList<KAccel*>::iterator itrEnd = accelList.end(); + TQValueList<TDEAccel*> & accelList = d->m_kaccelList; + TQValueList<TDEAccel*>::iterator itr = accelList.begin(); + const TQValueList<TDEAccel*>::iterator itrEnd = accelList.end(); for( ; itr != itrEnd; ++itr) { @@ -1193,14 +1193,14 @@ void KAction::slotDestroyed() } while ( i != -1 ); } -int KAction::findContainer( const TQWidget* widget ) const +int TDEAction::findContainer( const TQWidget* widget ) const { int pos = 0; - const TQValueList<KActionPrivate::Container> & containers = d->m_containers; + const TQValueList<TDEActionPrivate::Container> & containers = d->m_containers; - TQValueList<KActionPrivate::Container>::ConstIterator it = containers.constBegin(); - const TQValueList<KActionPrivate::Container>::ConstIterator itEnd = containers.constEnd(); + TQValueList<TDEActionPrivate::Container>::ConstIterator it = containers.constBegin(); + const TQValueList<TDEActionPrivate::Container>::ConstIterator itEnd = containers.constEnd(); while( it != itEnd ) { @@ -1213,14 +1213,14 @@ int KAction::findContainer( const TQWidget* widget ) const return -1; } -int KAction::findContainer( const int id ) const +int TDEAction::findContainer( const int id ) const { int pos = 0; - const TQValueList<KActionPrivate::Container> & containers = d->m_containers; + const TQValueList<TDEActionPrivate::Container> & containers = d->m_containers; - TQValueList<KActionPrivate::Container>::ConstIterator it = containers.constBegin(); - const TQValueList<KActionPrivate::Container>::ConstIterator itEnd = containers.constEnd(); + TQValueList<TDEActionPrivate::Container>::ConstIterator it = containers.constBegin(); + const TQValueList<TDEActionPrivate::Container>::ConstIterator itEnd = containers.constEnd(); while( it != itEnd ) { @@ -1233,14 +1233,14 @@ int KAction::findContainer( const int id ) const return -1; } -void KAction::removeContainer( int index ) +void TDEAction::removeContainer( int index ) { int i = 0; - TQValueList<KActionPrivate::Container> & containers = d->m_containers; + TQValueList<TDEActionPrivate::Container> & containers = d->m_containers; - TQValueList<KActionPrivate::Container>::Iterator it = containers.begin(); - const TQValueList<KActionPrivate::Container>::Iterator itEnd = containers.end(); + TQValueList<TDEActionPrivate::Container>::Iterator it = containers.begin(); + const TQValueList<TDEActionPrivate::Container>::Iterator itEnd = containers.end(); while( it != itEnd ) { @@ -1255,31 +1255,31 @@ void KAction::removeContainer( int index ) } // FIXME: Remove this (ellis) -void KAction::slotKeycodeChanged() +void TDEAction::slotKeycodeChanged() { - kdDebug(129) << "KAction::slotKeycodeChanged()" << endl; // -- ellis - KAccelAction* pAction = d->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; * * <b>Usage Within the XML Framework:</b>\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 <kactioncollection.h> 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 <kstandarddirs.h> #include <kstringhandler.h> -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<TQPopupMenu *>( widget ) && !::tqqt_cast<KToolBar *>( widget ) ) + if ( !::tqqt_cast<TQPopupMenu *>( widget ) && !::tqqt_cast<TDEToolBar *>( 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<KToolBar *>( widget ) ) { - KToolBar *bar = static_cast<KToolBar *>( widget ); + if ( ::tqqt_cast<TDEToolBar *>( widget ) ) { + TDEToolBar *bar = static_cast<TDEToolBar *>( 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<KToggleAction *>( it.current() ) && it.current() != this && - static_cast<KToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) { - KToggleAction *a = static_cast<KToggleAction*>(it.current()); + if ( ::tqqt_cast<TDEToggleAction *>( it.current() ) && it.current() != this && + static_cast<TDEToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) { + TDEToggleAction *a = static_cast<TDEToggleAction*>(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<TQMenuBar *>( w ) ) // not handled in plug... static_cast<TQMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked ); - else if ( ::tqqt_cast<KToolBar *>( w ) ) + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) { - TQWidget* r = static_cast<KToolBar*>( w )->getButton( itemId( id ) ); - if ( r && ::tqqt_cast<KToolBarButton *>( r ) ) { - static_cast<KToolBar*>( w )->setButton( itemId( id ), d->m_checked ); + TQWidget* r = static_cast<TDEToolBar*>( w )->getButton( itemId( id ) ); + if ( r && ::tqqt_cast<TDEToolBarButton *>( r ) ) { + static_cast<TDEToolBar*>( 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<KToolBar*>( w )->setButtonIconSet( itemId( id ), gui->iconSet( KIcon::Toolbar ) ); + static_cast<TDEToolBar*>( 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<const KToolBarButton *>( senderObj ) ) + if ( !senderObj || !::tqqt_cast<const TDEToolBarButton *>( senderObj ) ) return; - const_cast<KToolBarButton *>( static_cast<const KToolBarButton *>( TQT_TQWIDGET_CONST(senderObj) ) )->on( true ); + const_cast<TDEToolBarButton *>( static_cast<const TDEToolBarButton *>( 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<KToolBar *>( w ) ) + if ( ::tqqt_cast<TDEToolBar *>( w ) ) { - TQWidget* r = (static_cast<KToolBar*>( w ))->getWidget( itemId( id ) ); + TQWidget* r = (static_cast<TDEToolBar*>( w ))->getWidget( itemId( id ) ); if ( ::tqqt_cast<TQComboBox *>( r ) ) { TQComboBox *b = static_cast<TQComboBox*>( 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<KToolBar *>( w ) ) { - TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast<TDEToolBar *>( w ) ) { + TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast<TQComboBox *>( r ) ) { TQComboBox *b = static_cast<TQComboBox*>( 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<KToolBar *>( w ) ) { - TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast<TDEToolBar *>( w ) ) { + TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast<TQComboBox *>( r ) ) { TQComboBox *cb = static_cast<TQComboBox*>( 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<KToolBar *>( w ) ) { - TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast<TDEToolBar *>( w ) ) { + TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast<TQComboBox *>( r ) ) { TQComboBox *cb = static_cast<TQComboBox*>( 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<TQPopupMenu *>( 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<KToolBar *>( widget ) ) + else if ( ::tqqt_cast<TDEToolBar *>( widget ) ) { - KToolBar* bar = static_cast<KToolBar*>( widget ); - int id_ = KAction::getToolButtonID(); + TDEToolBar* bar = static_cast<TDEToolBar*>( 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<KToolBar *>( w ) ) { - TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast<TDEToolBar *>( w ) ) { + TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast<TQComboBox *>( r ) ) { TQComboBox *b = static_cast<TQComboBox*>( 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<TQString, TQString> m_shortNames; TQMap<TQString, KURL> 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<KRecentFilesAction*>(this); - that->d->m_popup = new KPopupMenu; + TDERecentFilesAction *that = const_cast<TDERecentFilesAction*>(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<KToolBar *>( widget ) ) + // This is very related to TDEActionMenu::plug. + // In fact this class could be an interesting base class for TDEActionMenu + if ( ::tqqt_cast<TDEToolBar *>( 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<KToolBar *>( w ) ) + if ( ::tqqt_cast<TDEToolBar *>( w ) ) { - KToolBar* bar = static_cast<KToolBar*>( w ); - int id_ = KAction::getToolButtonID(); - KFontCombo *cb = new KFontCombo( items(), bar ); + TDEToolBar* bar = static_cast<TDEToolBar*>( 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<int>::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<TQPopupMenu *>( widget ) ) { TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget ); @@ -1815,11 +1815,11 @@ int KActionMenu::plug( TQWidget* widget, int index ) return containerCount() - 1; } - else if ( ::tqqt_cast<KToolBar *>( widget ) ) + else if ( ::tqqt_cast<TDEToolBar *>( widget ) ) { - KToolBar *bar = static_cast<KToolBar *>( widget ); + TDEToolBar *bar = static_cast<TDEToolBar *>( 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<KToolBar *>( widget ) ) + // This is very related to TDEActionMenu::plug. + // In fact this class could be an interesting base class for TDEActionMenu + if ( ::tqqt_cast<TDEToolBar *>( 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<KToolBarPopupAction*>(this); - that->m_popup = new KPopupMenu; + TDEToolBarPopupAction *that = const_cast<TDEToolBarPopupAction*>(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<KMainWindow *>(tl); // try to see if it's a kmainwindow + TDEMainWindow * mw = tqt_dynamic_cast<TDEMainWindow *>(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<KMainWindow *>( mw ) ) - static_cast<KMainWindow *>( mw )->setSettingsDirty(); + if ( mw && ::tqqt_cast<TDEMainWindow *>( mw ) ) + static_cast<TDEMainWindow *>( 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<KToolBar *>( w ) ) { - kdError() << "KWidgetAction::plug: KWidgetAction must be plugged into KToolBar." << endl; + if ( !::tqqt_cast<TDEToolBar *>( 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<KToolBar*>( w ); + TDEToolBar* toolBar = static_cast<TDEToolBar*>( 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<TQPopupMenu *>( widget) ) { @@ -2239,9 +2239,9 @@ int KActionSeparator::plug( TQWidget *widget, int index ) return containerCount() - 1; } - else if ( ::tqqt_cast<KToolBar *>( widget ) ) + else if ( ::tqqt_cast<TDEToolBar *>( widget ) ) { - KToolBar *toolBar = static_cast<KToolBar *>( widget ); + TDEToolBar *toolBar = static_cast<TDEToolBar *>( 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<KToolBar *>( widget ) ) + if ( ::tqqt_cast<TDEToolBar *>( 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<KToolBar> m_toolBar; + TQGuardedPtr<TDEToolBar> 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 <tqptrdict.h> #include <tqvariant.h> -class KActionCollection::KActionCollectionPrivate +class TDEActionCollection::TDEActionCollectionPrivate { public: - KActionCollectionPrivate() + TDEActionCollectionPrivate() { m_instance = 0; - //m_bOneKAccelOnly = false; + //m_bOneTDEAccelOnly = false; //m_iWidgetCurrent = 0; m_bAutoConnectShortcuts = true; m_widget = 0; - m_kaccel = m_builderKAccel = 0; + m_kaccel = m_builderTDEAccel = 0; m_dctHighlightContainers.setAutoDelete( true ); m_highlight = false; m_currentHighlightAction = 0; @@ -59,169 +59,169 @@ public: TDEInstance *m_instance; TQString m_sXMLFile; bool m_bAutoConnectShortcuts; - //bool m_bOneKAccelOnly; + //bool m_bOneTDEAccelOnly; //int m_iWidgetCurrent; //TQValueList<TQWidget*> m_widgetList; - //TQValueList<KAccel*> m_kaccelList; - TQValueList<KActionCollection*> m_docList; + //TQValueList<TDEAccel*> m_kaccelList; + TQValueList<TDEActionCollection*> m_docList; TQWidget *m_widget; - KAccel *m_kaccel; - KAccel *m_builderKAccel; + TDEAccel *m_kaccel; + TDEAccel *m_builderTDEAccel; - TQAsciiDict<KAction> m_actionDict; - TQPtrDict< TQPtrList<KAction> > m_dctHighlightContainers; + TQAsciiDict<TDEAction> m_actionDict; + TQPtrDict< TQPtrList<TDEAction> > m_dctHighlightContainers; bool m_highlight; - KAction *m_currentHighlightAction; + TDEAction *m_currentHighlightAction; bool m_statusCleared; const KXMLGUIClient *m_parentGUIClient; }; -KActionCollection::KActionCollection( TQWidget *parent, const char *name, +TDEActionCollection::TDEActionCollection( TQWidget *parent, const char *name, TDEInstance *instance ) : TQObject( parent, name ) { - kdDebug(129) << "KActionCollection::KActionCollection( " << parent << ", " << name << " ): this = " << this << endl; // ellis - d = new KActionCollectionPrivate; + kdDebug(129) << "TDEActionCollection::TDEActionCollection( " << parent << ", " << name << " ): this = " << this << endl; // ellis + d = new TDEActionCollectionPrivate; if( parent ) setWidget( parent ); - //d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0); + //d->m_bOneTDEAccelOnly = (d->m_kaccelList.count() > 0); setInstance( instance ); } -KActionCollection::KActionCollection( TQWidget *watch, TQObject* parent, const char *name, +TDEActionCollection::TDEActionCollection( TQWidget *watch, TQObject* parent, const char *name, TDEInstance *instance ) : TQObject( parent, name ) { - kdDebug(129) << "KActionCollection::KActionCollection( " << watch << ", " << parent << ", " << name << " ): this = " << this << endl; //ellis - d = new KActionCollectionPrivate; + kdDebug(129) << "TDEActionCollection::TDEActionCollection( " << watch << ", " << parent << ", " << name << " ): this = " << this << endl; //ellis + d = new TDEActionCollectionPrivate; if( watch ) setWidget( watch ); - //d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0); + //d->m_bOneTDEAccelOnly = (d->m_kaccelList.count() > 0); setInstance( instance ); } #ifndef KDE_NO_COMPAT // KDE 4: remove -KActionCollection::KActionCollection( TQObject *parent, const char *name, +TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, TDEInstance *instance ) : TQObject( parent, name ) { - kdWarning(129) << "KActionCollection::KActionCollection( TQObject *parent, const char *name, TDEInstance *instance )" << endl; //ellis + kdWarning(129) << "TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, TDEInstance *instance )" << endl; //ellis kdDebug(129) << kdBacktrace() << endl; - d = new KActionCollectionPrivate; + d = new TDEActionCollectionPrivate; TQWidget* w = tqt_dynamic_cast<TQWidget*>( parent ); if( w ) setWidget( w ); - //d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0); + //d->m_bOneTDEAccelOnly = (d->m_kaccelList.count() > 0); setInstance( instance ); } -KActionCollection::KActionCollection( const KActionCollection © ) +TDEActionCollection::TDEActionCollection( const TDEActionCollection © ) : TQObject() { - kdWarning(129) << "KActionCollection::KActionCollection( const KActionCollection & ): function is severely deprecated." << endl; - d = new KActionCollectionPrivate; + kdWarning(129) << "TDEActionCollection::TDEActionCollection( const TDEActionCollection & ): function is severely deprecated." << endl; + d = new TDEActionCollectionPrivate; *this = copy; } #endif // KDE 4: remove end -KActionCollection::KActionCollection( const char *name, const KXMLGUIClient *parent ) +TDEActionCollection::TDEActionCollection( const char *name, const KXMLGUIClient *parent ) : TQObject( 0L, name ) { - d = new KActionCollectionPrivate; + d = new TDEActionCollectionPrivate; d->m_parentGUIClient=parent; d->m_instance=parent->instance(); } -KActionCollection::~KActionCollection() +TDEActionCollection::~TDEActionCollection() { - kdDebug(129) << "KActionCollection::~KActionCollection(): this = " << this << endl; - for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); + kdDebug(129) << "TDEActionCollection::~TDEActionCollection(): this = " << this << endl; + for ( TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); it.current(); ++it ) { + TDEAction* pAction = it.current(); if ( pAction->m_parentCollection == this ) pAction->m_parentCollection = 0L; } delete d->m_kaccel; - delete d->m_builderKAccel; + delete d->m_builderTDEAccel; delete d; d = 0; } -void KActionCollection::setWidget( TQWidget* w ) +void TDEActionCollection::setWidget( TQWidget* w ) { //if ( d->m_actionDict.count() > 0 ) { - // kdError(129) << "KActionCollection::setWidget(): must be called before any actions are added to collection!" << endl; + // kdError(129) << "TDEActionCollection::setWidget(): must be called before any actions are added to collection!" << endl; // kdDebug(129) << kdBacktrace() << endl; //} //else if ( !d->m_widget ) { d->m_widget = w; - d->m_kaccel = new KAccel( w, this, "KActionCollection-KAccel" ); + d->m_kaccel = new TDEAccel( w, this, "TDEActionCollection-TDEAccel" ); } else if ( d->m_widget != w ) - kdWarning(129) << "KActionCollection::setWidget(): tried to change widget from " << d->m_widget << " to " << w << endl; + kdWarning(129) << "TDEActionCollection::setWidget(): tried to change widget from " << d->m_widget << " to " << w << endl; } -void KActionCollection::setAutoConnectShortcuts( bool b ) +void TDEActionCollection::setAutoConnectShortcuts( bool b ) { d->m_bAutoConnectShortcuts = b; } -bool KActionCollection::isAutoConnectShortcuts() +bool TDEActionCollection::isAutoConnectShortcuts() { return d->m_bAutoConnectShortcuts; } -bool KActionCollection::addDocCollection( KActionCollection* pDoc ) +bool TDEActionCollection::addDocCollection( TDEActionCollection* pDoc ) { d->m_docList.append( pDoc ); return true; } -void KActionCollection::beginXMLPlug( TQWidget *widget ) +void TDEActionCollection::beginXMLPlug( TQWidget *widget ) { - kdDebug(129) << "KActionCollection::beginXMLPlug( buildWidget = " << widget << " ): this = " << this << " d->m_builderKAccel = " << d->m_builderKAccel << endl; + kdDebug(129) << "TDEActionCollection::beginXMLPlug( buildWidget = " << widget << " ): this = " << this << " d->m_builderTDEAccel = " << d->m_builderTDEAccel << endl; - if( widget && !d->m_builderKAccel ) { - d->m_builderKAccel = new KAccel( widget, this, "KActionCollection-BuilderKAccel" ); + if( widget && !d->m_builderTDEAccel ) { + d->m_builderTDEAccel = new TDEAccel( widget, this, "TDEActionCollection-BuilderTDEAccel" ); } } -void KActionCollection::endXMLPlug() +void TDEActionCollection::endXMLPlug() { - kdDebug(129) << "KActionCollection::endXMLPlug(): this = " << this << endl; + kdDebug(129) << "TDEActionCollection::endXMLPlug(): this = " << this << endl; //s_kaccelXML = 0; } -void KActionCollection::prepareXMLUnplug() +void TDEActionCollection::prepareXMLUnplug() { - kdDebug(129) << "KActionCollection::prepareXMLUnplug(): this = " << this << endl; + kdDebug(129) << "TDEActionCollection::prepareXMLUnplug(): this = " << this << endl; unplugShortcuts( d->m_kaccel ); - if( d->m_builderKAccel ) { - unplugShortcuts( d->m_builderKAccel ); - delete d->m_builderKAccel; - d->m_builderKAccel = 0; + if( d->m_builderTDEAccel ) { + unplugShortcuts( d->m_builderTDEAccel ); + delete d->m_builderTDEAccel; + d->m_builderTDEAccel = 0; } } -void KActionCollection::unplugShortcuts( KAccel* kaccel ) +void TDEActionCollection::unplugShortcuts( TDEAccel* kaccel ) { - for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); - pAction->removeKAccel( kaccel ); + for ( TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); it.current(); ++it ) { + TDEAction* pAction = it.current(); + pAction->removeTDEAccel( kaccel ); } for( uint i = 0; i < d->m_docList.count(); i++ ) d->m_docList[i]->unplugShortcuts( kaccel ); } -/*void KActionCollection::addWidget( TQWidget* w ) +/*void TDEActionCollection::addWidget( TQWidget* w ) { - if( !d->m_bOneKAccelOnly ) { - kdDebug(129) << "KActionCollection::addWidget( " << w << " ): this = " << this << endl; + if( !d->m_bOneTDEAccelOnly ) { + kdDebug(129) << "TDEActionCollection::addWidget( " << w << " ): this = " << this << endl; for( uint i = 0; i < d->m_widgetList.count(); i++ ) { if( d->m_widgetList[i] == w ) { d->m_iWidgetCurrent = i; @@ -230,25 +230,25 @@ void KActionCollection::unplugShortcuts( KAccel* kaccel ) } d->m_iWidgetCurrent = d->m_widgetList.count(); d->m_widgetList.append( w ); - d->m_kaccelList.append( new KAccel( w, this, "KActionCollection-KAccel" ) ); + d->m_kaccelList.append( new TDEAccel( w, this, "TDEActionCollection-TDEAccel" ) ); } } -void KActionCollection::removeWidget( TQWidget* w ) +void TDEActionCollection::removeWidget( TQWidget* w ) { - if( !d->m_bOneKAccelOnly ) { - kdDebug(129) << "KActionCollection::removeWidget( " << w << " ): this = " << this << endl; + if( !d->m_bOneTDEAccelOnly ) { + kdDebug(129) << "TDEActionCollection::removeWidget( " << w << " ): this = " << this << endl; for( uint i = 0; i < d->m_widgetList.count(); i++ ) { if( d->m_widgetList[i] == w ) { - // Remove KAccel object from children. - KAccel* pKAccel = d->m_kaccelList[i]; - for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); + // Remove TDEAccel object from children. + TDEAccel* pTDEAccel = d->m_kaccelList[i]; + for ( TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); it.current(); ++it ) { + TDEAction* pAction = it.current(); if ( pAction->m_parentCollection == this ) { - pAction->removeKAccel( pKAccel ); + pAction->removeTDEAccel( pTDEAccel ); } } - delete pKAccel; + delete pTDEAccel; d->m_widgetList.remove( d->m_widgetList.at( i ) ); d->m_kaccelList.remove( d->m_kaccelList.at( i ) ); @@ -260,26 +260,26 @@ void KActionCollection::removeWidget( TQWidget* w ) return; } } - kdWarning(129) << "KActionCollection::removeWidget( " << w << " ): widget not in list." << endl; + kdWarning(129) << "TDEActionCollection::removeWidget( " << w << " ): widget not in list." << endl; } } -bool KActionCollection::ownsKAccel() const +bool TDEActionCollection::ownsTDEAccel() const { - return d->m_bOneKAccelOnly; + return d->m_bOneTDEAccelOnly; } -uint KActionCollection::widgetCount() const +uint TDEActionCollection::widgetCount() const { return d->m_widgetList.count(); } -const KAccel* KActionCollection::widgetKAccel( uint i ) const +const TDEAccel* TDEActionCollection::widgetTDEAccel( uint i ) const { return d->m_kaccelList[i]; }*/ -KAccel* KActionCollection::kaccel() +TDEAccel* TDEActionCollection::kaccel() { //if( d->m_kaccelList.count() > 0 ) // return d->m_kaccelList[d->m_iWidgetCurrent]; @@ -288,7 +288,7 @@ KAccel* KActionCollection::kaccel() return d->m_kaccel; } -const KAccel* KActionCollection::kaccel() const +const TDEAccel* TDEActionCollection::kaccel() const { //if( d->m_kaccelList.count() > 0 ) // return d->m_kaccelList[d->m_iWidgetCurrent]; @@ -299,7 +299,7 @@ const KAccel* KActionCollection::kaccel() const // Return the key to use in d->m_actionDict for the given action. // Usually name(), except when unnamed. -static const char* actionDictKey( KAction* action, char* buffer ) +static const char* actionDictKey( TDEAction* action, char* buffer ) { const char* name = action->name(); if( !qstrcmp( name, "unnamed" ) ) @@ -310,11 +310,11 @@ static const char* actionDictKey( KAction* action, char* buffer ) return name; } -void KActionCollection::_insert( KAction* action ) +void TDEActionCollection::_insert( TDEAction* action ) { char unnamed_name[100]; const char *name = actionDictKey( action, unnamed_name ); - KAction *a = d->m_actionDict[ name ]; + TDEAction *a = d->m_actionDict[ name ]; if ( a == action ) return; @@ -323,12 +323,12 @@ void KActionCollection::_insert( KAction* action ) emit inserted( action ); } -void KActionCollection::_remove( KAction* action ) +void TDEActionCollection::_remove( TDEAction* action ) { char unnamed_name[100]; const char *name = actionDictKey( action, unnamed_name ); - KAction *a = d->m_actionDict.take( name ); + TDEAction *a = d->m_actionDict.take( name ); if ( !a || a != action ) return; @@ -338,12 +338,12 @@ void KActionCollection::_remove( KAction* action ) delete a; } -KAction* KActionCollection::_take( KAction* action ) +TDEAction* TDEActionCollection::_take( TDEAction* action ) { char unnamed_name[100]; const char *name = actionDictKey( action, unnamed_name ); - KAction *a = d->m_actionDict.take( name ); + TDEAction *a = d->m_actionDict.take( name ); if ( !a || a != action ) return 0; @@ -355,30 +355,30 @@ KAction* KActionCollection::_take( KAction* action ) return a; } -void KActionCollection::_clear() +void TDEActionCollection::_clear() { - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); while ( it.current() ) _remove( it.current() ); } -void KActionCollection::insert( KAction* action ) { _insert( action ); } -void KActionCollection::remove( KAction* action ) { _remove( action ); } -KAction* KActionCollection::take( KAction* action ) { return _take( action ); } -void KActionCollection::clear() { _clear(); } -KAccel* KActionCollection::accel() { return kaccel(); } -const KAccel* KActionCollection::accel() const { return kaccel(); } -KAccel* KActionCollection::builderKAccel() const { return d->m_builderKAccel; } +void TDEActionCollection::insert( TDEAction* action ) { _insert( action ); } +void TDEActionCollection::remove( TDEAction* action ) { _remove( action ); } +TDEAction* TDEActionCollection::take( TDEAction* action ) { return _take( action ); } +void TDEActionCollection::clear() { _clear(); } +TDEAccel* TDEActionCollection::accel() { return kaccel(); } +const TDEAccel* TDEActionCollection::accel() const { return kaccel(); } +TDEAccel* TDEActionCollection::builderTDEAccel() const { return d->m_builderTDEAccel; } -KAction* KActionCollection::action( const char* name, const char* classname ) const +TDEAction* TDEActionCollection::action( const char* name, const char* classname ) const { - KAction* pAction = 0; + TDEAction* pAction = 0; if ( !classname && name ) pAction = d->m_actionDict[ name ]; else { - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); for( ; it.current(); ++it ) { if ( ( !name || !strcmp( it.current()->name(), name ) ) && @@ -397,34 +397,34 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co return pAction; } -KAction* KActionCollection::action( int index ) const +TDEAction* TDEActionCollection::action( int index ) const { - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); it += index; return it.current(); // return d->m_actions.at( index ); } -bool KActionCollection::readShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) +bool TDEActionCollection::readShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) { - return KActionShortcutList(this).readSettings( sConfigGroup, pConfig ); + return TDEActionShortcutList(this).readSettings( sConfigGroup, pConfig ); } -bool KActionCollection::writeShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) const +bool TDEActionCollection::writeShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) const { - return KActionShortcutList((KActionCollection*)this).writeSettings( sConfigGroup, pConfig ); + return TDEActionShortcutList((TDEActionCollection*)this).writeSettings( sConfigGroup, pConfig ); } -uint KActionCollection::count() const +uint TDEActionCollection::count() const { return d->m_actionDict.count(); } -TQStringList KActionCollection::groups() const +TQStringList TDEActionCollection::groups() const { TQStringList lst; - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); for( ; it.current(); ++it ) if ( !it.current()->group().isEmpty() && !lst.contains( it.current()->group() ) ) lst.append( it.current()->group() ); @@ -432,11 +432,11 @@ TQStringList KActionCollection::groups() const return lst; } -KActionPtrList KActionCollection::actions( const TQString& group ) const +TDEActionPtrList TDEActionCollection::actions( const TQString& group ) const { - KActionPtrList lst; + TDEActionPtrList lst; - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); for( ; it.current(); ++it ) if ( it.current()->group() == group ) lst.append( it.current() ); @@ -446,18 +446,18 @@ KActionPtrList KActionCollection::actions( const TQString& group ) const return lst; } -KActionPtrList KActionCollection::actions() const +TDEActionPtrList TDEActionCollection::actions() const { - KActionPtrList lst; + TDEActionPtrList lst; - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); for( ; it.current(); ++it ) lst.append( it.current() ); return lst; } -void KActionCollection::setInstance( TDEInstance *instance ) +void TDEActionCollection::setInstance( TDEInstance *instance ) { if ( instance ) d->m_instance = instance; @@ -465,41 +465,41 @@ void KActionCollection::setInstance( TDEInstance *instance ) d->m_instance = TDEGlobal::instance(); } -TDEInstance *KActionCollection::instance() const +TDEInstance *TDEActionCollection::instance() const { return d->m_instance; } -void KActionCollection::setXMLFile( const TQString& sXMLFile ) +void TDEActionCollection::setXMLFile( const TQString& sXMLFile ) { d->m_sXMLFile = sXMLFile; } -const TQString& KActionCollection::xmlFile() const +const TQString& TDEActionCollection::xmlFile() const { return d->m_sXMLFile; } -void KActionCollection::setHighlightingEnabled( bool enable ) +void TDEActionCollection::setHighlightingEnabled( bool enable ) { d->m_highlight = enable; } -bool KActionCollection::highlightingEnabled() const +bool TDEActionCollection::highlightingEnabled() const { return d->m_highlight; } -void KActionCollection::connectHighlight( TQWidget *container, KAction *action ) +void TDEActionCollection::connectHighlight( TQWidget *container, TDEAction *action ) { if ( !d->m_highlight ) return; - TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; + TQPtrList<TDEAction> *actionList = d->m_dctHighlightContainers[ container ]; if ( !actionList ) { - actionList = new TQPtrList<KAction>; + actionList = new TQPtrList<TDEAction>; if ( ::tqqt_cast<TQPopupMenu *>( container ) ) { @@ -508,7 +508,7 @@ void KActionCollection::connectHighlight( TQWidget *container, KAction *action ) connect( container, TQT_SIGNAL( aboutToHide() ), this, TQT_SLOT( slotMenuAboutToHide() ) ); } - else if ( ::tqqt_cast<KToolBar *>( container ) ) + else if ( ::tqqt_cast<TDEToolBar *>( container ) ) { connect( container, TQT_SIGNAL( highlighted( int, bool ) ), this, TQT_SLOT( slotToolBarButtonHighlighted( int, bool ) ) ); @@ -523,12 +523,12 @@ void KActionCollection::connectHighlight( TQWidget *container, KAction *action ) actionList->append( action ); } -void KActionCollection::disconnectHighlight( TQWidget *container, KAction *action ) +void TDEActionCollection::disconnectHighlight( TQWidget *container, TDEAction *action ) { if ( !d->m_highlight ) return; - TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; + TQPtrList<TDEAction> *actionList = d->m_dctHighlightContainers[ container ]; if ( !actionList ) return; @@ -539,7 +539,7 @@ void KActionCollection::disconnectHighlight( TQWidget *container, KAction *actio d->m_dctHighlightContainers.remove( container ); } -void KActionCollection::slotMenuItemHighlighted( int id ) +void TDEActionCollection::slotMenuItemHighlighted( int id ) { if ( !d->m_highlight ) return; @@ -565,7 +565,7 @@ void KActionCollection::slotMenuItemHighlighted( int id ) emit actionStatusText( d->m_currentHighlightAction->toolTip() ); } -void KActionCollection::slotMenuAboutToHide() +void TDEActionCollection::slotMenuAboutToHide() { if ( d->m_currentHighlightAction ) emit actionHighlighted( d->m_currentHighlightAction, false ); @@ -576,14 +576,14 @@ void KActionCollection::slotMenuAboutToHide() d->m_statusCleared = true; } -void KActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) +void TDEActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) { if ( !d->m_highlight ) return; TQWidget *container = const_cast<TQWidget*>(TQT_TQWIDGET_CONST( sender() )); - KAction *action = findAction( container, id ); + TDEAction *action = findAction( container, id ); if ( !action ) { @@ -604,19 +604,19 @@ void KActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) } } -void KActionCollection::slotDestroyed() +void TDEActionCollection::slotDestroyed() { d->m_dctHighlightContainers.remove( reinterpret_cast<void *>( const_cast<TQObject*>(TQT_TQOBJECT_CONST(sender())) ) ); } -KAction *KActionCollection::findAction( TQWidget *container, int id ) +TDEAction *TDEActionCollection::findAction( TQWidget *container, int id ) { - TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ]; + TQPtrList<TDEAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ]; if ( !actionList ) return 0; - TQPtrListIterator<KAction> it( *actionList ); + TQPtrListIterator<TDEAction> it( *actionList ); for (; it.current(); ++it ) if ( it.current()->isPlugged( container, id ) ) return it.current(); @@ -624,31 +624,31 @@ KAction *KActionCollection::findAction( TQWidget *container, int id ) return 0; } -const KXMLGUIClient *KActionCollection::parentGUIClient() const +const KXMLGUIClient *TDEActionCollection::parentGUIClient() const { return d->m_parentGUIClient; } #ifndef KDE_NO_COMPAT // KDE 4: remove -KActionCollection KActionCollection::operator+(const KActionCollection &c ) const +TDEActionCollection TDEActionCollection::operator+(const TDEActionCollection &c ) const { - kdWarning(129) << "KActionCollection::operator+(): function is severely deprecated." << endl; - KActionCollection ret( *this ); + kdWarning(129) << "TDEActionCollection::operator+(): function is severely deprecated." << endl; + TDEActionCollection ret( *this ); - TQValueList<KAction *> actions = c.actions(); - TQValueList<KAction *>::ConstIterator it = actions.begin(); - TQValueList<KAction *>::ConstIterator end = actions.end(); + TQValueList<TDEAction *> actions = c.actions(); + TQValueList<TDEAction *>::ConstIterator it = actions.begin(); + TQValueList<TDEAction *>::ConstIterator end = actions.end(); for (; it != end; ++it ) ret.insert( *it ); return ret; } -KActionCollection &KActionCollection::operator=( const KActionCollection © ) +TDEActionCollection &TDEActionCollection::operator=( const TDEActionCollection © ) { - kdWarning(129) << "KActionCollection::operator=(): function is severely deprecated." << endl; - //d->m_bOneKAccelOnly = copy.d->m_bOneKAccelOnly; + kdWarning(129) << "TDEActionCollection::operator=(): function is severely deprecated." << endl; + //d->m_bOneTDEAccelOnly = copy.d->m_bOneTDEAccelOnly; //d->m_iWidgetCurrent = copy.d->m_iWidgetCurrent; //d->m_widgetList = copy.d->m_widgetList; //d->m_kaccelList = copy.d->m_kaccelList; @@ -659,10 +659,10 @@ KActionCollection &KActionCollection::operator=( const KActionCollection © ) return *this; } -KActionCollection &KActionCollection::operator+=( const KActionCollection &c ) +TDEActionCollection &TDEActionCollection::operator+=( const TDEActionCollection &c ) { - kdWarning(129) << "KActionCollection::operator+=(): function is severely deprecated." << endl; - TQAsciiDictIterator<KAction> it(c.d->m_actionDict); + kdWarning(129) << "TDEActionCollection::operator+=(): function is severely deprecated." << endl; + TQAsciiDictIterator<TDEAction> it(c.d->m_actionDict); for ( ; it.current(); ++it ) insert( it.current() ); @@ -671,44 +671,44 @@ KActionCollection &KActionCollection::operator+=( const KActionCollection &c ) #endif // KDE 4: remove end //--------------------------------------------------------------------- -// KActionShortcutList +// TDEActionShortcutList //--------------------------------------------------------------------- -KActionShortcutList::KActionShortcutList( KActionCollection* pColl ) +TDEActionShortcutList::TDEActionShortcutList( TDEActionCollection* pColl ) : m_actions( *pColl ) { } -KActionShortcutList::~KActionShortcutList() +TDEActionShortcutList::~TDEActionShortcutList() { } -uint KActionShortcutList::count() const +uint TDEActionShortcutList::count() const { return m_actions.count(); } -TQString KActionShortcutList::name( uint i ) const +TQString TDEActionShortcutList::name( uint i ) const { return m_actions.action(i)->name(); } -TQString KActionShortcutList::label( uint i ) const +TQString TDEActionShortcutList::label( uint i ) const { return m_actions.action(i)->text(); } -TQString KActionShortcutList::whatsThis( uint i ) const +TQString TDEActionShortcutList::whatsThis( uint i ) const { return m_actions.action(i)->whatsThis(); } -const KShortcut& KActionShortcutList::shortcut( uint i ) const +const TDEShortcut& TDEActionShortcutList::shortcut( uint i ) const { return m_actions.action(i)->shortcut(); } -const KShortcut& KActionShortcutList::shortcutDefault( uint i ) const +const TDEShortcut& TDEActionShortcutList::shortcutDefault( uint i ) const { return m_actions.action(i)->shortcutDefault(); } -bool KActionShortcutList::isConfigurable( uint i ) const +bool TDEActionShortcutList::isConfigurable( uint i ) const { return m_actions.action(i)->isShortcutConfigurable(); } -bool KActionShortcutList::setShortcut( uint i, const KShortcut& cut ) +bool TDEActionShortcutList::setShortcut( uint i, const TDEShortcut& cut ) { return m_actions.action(i)->setShortcut( cut ); } -const TDEInstance* KActionShortcutList::instance() const +const TDEInstance* TDEActionShortcutList::instance() const { return m_actions.instance(); } -TQVariant KActionShortcutList::getOther( Other, uint ) const +TQVariant TDEActionShortcutList::getOther( Other, uint ) const { return TQVariant(); } -bool KActionShortcutList::setOther( Other, uint, TQVariant ) +bool TDEActionShortcutList::setOther( Other, uint, TQVariant ) { return false; } -const KAction *KActionShortcutList::action( uint i) const +const TDEAction *TDEActionShortcutList::action( uint i) const { return m_actions.action(i); } -bool KActionShortcutList::save() const +bool TDEActionShortcutList::save() const { const KXMLGUIClient* guiClient=m_actions.parentGUIClient(); const TQString xmlFile=guiClient ? guiClient->xmlFile() : m_actions.xmlFile(); - kdDebug(129) << "KActionShortcutList::save(): xmlFile = " << xmlFile << endl; + kdDebug(129) << "TDEActionShortcutList::save(): xmlFile = " << xmlFile << endl; if( m_actions.xmlFile().isEmpty() ) return writeSettings(); @@ -756,44 +756,44 @@ bool KActionShortcutList::save() const } //--------------------------------------------------------------------- -// KActionPtrShortcutList +// TDEActionPtrShortcutList //--------------------------------------------------------------------- -KActionPtrShortcutList::KActionPtrShortcutList( KActionPtrList& list ) +TDEActionPtrShortcutList::TDEActionPtrShortcutList( TDEActionPtrList& list ) : m_actions( list ) { } -KActionPtrShortcutList::~KActionPtrShortcutList() +TDEActionPtrShortcutList::~TDEActionPtrShortcutList() { } -uint KActionPtrShortcutList::count() const +uint TDEActionPtrShortcutList::count() const { return m_actions.count(); } -TQString KActionPtrShortcutList::name( uint i ) const +TQString TDEActionPtrShortcutList::name( uint i ) const { return m_actions[i]->name(); } -TQString KActionPtrShortcutList::label( uint i ) const +TQString TDEActionPtrShortcutList::label( uint i ) const { return m_actions[i]->text(); } -TQString KActionPtrShortcutList::whatsThis( uint i ) const +TQString TDEActionPtrShortcutList::whatsThis( uint i ) const { return m_actions[i]->whatsThis(); } -const KShortcut& KActionPtrShortcutList::shortcut( uint i ) const +const TDEShortcut& TDEActionPtrShortcutList::shortcut( uint i ) const { return m_actions[i]->shortcut(); } -const KShortcut& KActionPtrShortcutList::shortcutDefault( uint i ) const +const TDEShortcut& TDEActionPtrShortcutList::shortcutDefault( uint i ) const { return m_actions[i]->shortcutDefault(); } -bool KActionPtrShortcutList::isConfigurable( uint i ) const +bool TDEActionPtrShortcutList::isConfigurable( uint i ) const { return m_actions[i]->isShortcutConfigurable(); } -bool KActionPtrShortcutList::setShortcut( uint i, const KShortcut& cut ) +bool TDEActionPtrShortcutList::setShortcut( uint i, const TDEShortcut& cut ) { return m_actions[i]->setShortcut( cut ); } -TQVariant KActionPtrShortcutList::getOther( Other, uint ) const +TQVariant TDEActionPtrShortcutList::getOther( Other, uint ) const { return TQVariant(); } -bool KActionPtrShortcutList::setOther( Other, uint, TQVariant ) +bool TDEActionPtrShortcutList::setOther( Other, uint, TQVariant ) { return false; } -bool KActionPtrShortcutList::save() const +bool TDEActionPtrShortcutList::save() const { return false; } -void KActionShortcutList::virtual_hook( int id, void* data ) -{ KShortcutList::virtual_hook( id, data ); } +void TDEActionShortcutList::virtual_hook( int id, void* data ) +{ TDEShortcutList::virtual_hook( id, data ); } -void KActionPtrShortcutList::virtual_hook( int id, void* data ) -{ KShortcutList::virtual_hook( id, data ); } +void TDEActionPtrShortcutList::virtual_hook( int id, void* data ) +{ TDEShortcutList::virtual_hook( id, data ); } -void KActionCollection::virtual_hook( int, void* ) +void TDEActionCollection::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } /* vim: et sw=2 ts=2 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<KAction *> KActionPtrList; +typedef TQValueList<TDEAction *> 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<KAction *> 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 <tqevent.h> #include <tqwhatsthis.h> -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!"<<endl; + kdDebug(13001)<<"TDEActionSelector::setButtonIcon: DAINBREAD!"<<endl; } } -void KActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton button ) +void TDEActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton button ) { switch ( button ) { @@ -177,11 +177,11 @@ void KActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton but d->btnDown->setIconSet( iconset ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonIconSet: DAINBREAD!"<<endl; + kdDebug(13001)<<"TDEActionSelector::setButtonIconSet: DAINBREAD!"<<endl; } } -void KActionSelector::setButtonTooltip( const TQString &tip, MoveButton button ) +void TDEActionSelector::setButtonTooltip( const TQString &tip, MoveButton button ) { switch ( button ) { @@ -198,11 +198,11 @@ void KActionSelector::setButtonTooltip( const TQString &tip, MoveButton button ) d->btnDown->setTextLabel( tip ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonToolTip: DAINBREAD!"<<endl; + kdDebug(13001)<<"TDEActionSelector::setButtonToolTip: DAINBREAD!"<<endl; } } -void KActionSelector::setButtonWhatsThis( const TQString &text, MoveButton button ) +void TDEActionSelector::setButtonWhatsThis( const TQString &text, MoveButton button ) { switch ( button ) { @@ -219,11 +219,11 @@ void KActionSelector::setButtonWhatsThis( const TQString &text, MoveButton butto TQWhatsThis::add( d->btnDown, text ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonWhatsThis: DAINBREAD!"<<endl; + kdDebug(13001)<<"TDEActionSelector::setButtonWhatsThis: DAINBREAD!"<<endl; } } -void KActionSelector::setButtonsEnabled() +void TDEActionSelector::setButtonsEnabled() { d->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 <anders@alweb.dk> */ -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 <kaction.h> //--------------------------------------------------------------------- -// 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<KCompletion>. * * 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 <tqobject.h> #include <tdelibs_export.h> -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<KCommand> 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 <pfeiffer@kde.org> */ -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 <tdelibs_export.h> -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; } -TQValueList<KAction *>KDCOPActionProxy::actions() const +TQValueList<TDEAction *>KDCOPActionProxy::actions() const { if ( !d->m_actionCollection ) - return TQValueList<KAction *>(); + return TQValueList<TDEAction *>(); 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<TQCString,DCOPRef> KDCOPActionProxy::actionMap( const TQCString &appId ) c if ( id.isEmpty() ) id = kapp->dcopClient()->appId(); - TQValueList<KAction *> lst = actions(); - TQValueList<KAction *>::ConstIterator it = lst.begin(); - TQValueList<KAction *>::ConstIterator end = lst.end(); + TQValueList<TDEAction *> lst = actions(); + TQValueList<TDEAction *>::ConstIterator it = lst.begin(); + TQValueList<TDEAction *>::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 <dcopref.h> #include <tdelibs_export.h> -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<KAction *> actions() const; + virtual TQValueList<TDEAction *> 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<XmlData> 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<KAction*> m_actionList; - KActionCollection* m_collection; + //TQValueList<TDEAction*> 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<TQString, bool> 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 <kdialogbase.h> 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 <X11/Xft/Xft.h> -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<KFontListItem *>(listBox()->item(i)); + TDEFontListItem *item = static_cast<TDEFontListItem *>(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 <malte@kde.org> */ -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 <pbrown@kde.org>, Bernd Wuebben <wuebben@kde.org> * @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: * <p>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 * <p> * 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 <pbrown@kde.org>, Bernd Wuebben <wuebben@kde.org> * @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 <kfontdialog.h> #include <klocale.h> -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 <nhasan@kde.org> * */ -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 <tdelibs_export.h> -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 <tqstringlist.h> #include <tqmap.h> -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<KShortcutList*> rgpLists; - TQValueList<KShortcutList*> rgpListsAllocated; + TQValueList<TDEShortcutList*> rgpLists; + TQValueList<TDEShortcutList*> rgpListsAllocated; - KListView *pList; + TDEListView *pList; TQLabel *lInfo; KKeyButton *pbtnShortcut; TQGroupBox *fCArea; TQButtonGroup *kbGroup; - TQMap<TQString, KShortcut> mapGlobals; + TQMap<TQString, TDEShortcut> 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<int> 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<KActionShortcutList*>(pList); + TDEShortcutList* pList = d->rgpLists[iList]; + TDEActionShortcutList *pAList = dynamic_cast<TDEActionShortcutList*>(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<KKeyChooserItem*>( 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<TQString, TQString> mapEntry = TDEGlobal::config()->entryMap( "Global Shortcuts" ); TQMap<TQString, TQString>::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<KKeyChooserItem*>(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<KKeyChooserItem*>(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<TQString, KShortcut>::ConstIterator it; + TQMap<TQString, TDEShortcut>::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<KKeyChooserItem*>(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<int> 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<TQFocusEvent*>(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()"<<endl; + // kdDebug()<<"TDEListView::focusInEvent()"<<endl; TQListView::focusInEvent( fe ); if ((d->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<TQListViewItem> 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<TQListViewItem> KListView::selectedItems() const +TQPtrList<TQListViewItem> TDEListView::selectedItems() const { return selectedItems(true); } -TQPtrList<TQListViewItem> KListView::selectedItems(bool includeHiddenItems) const +TQPtrList<TQListViewItem> TDEListView::selectedItems(bool includeHiddenItems) const { TQPtrList<TQListViewItem> list; @@ -1248,7 +1248,7 @@ TQPtrList<TQListViewItem> KListView::selectedItems(bool includeHiddenItems) cons flags |= TQListViewItemIterator::Visible; } - TQListViewItemIterator it(const_cast<KListView *>(this), flags); + TQListViewItemIterator it(const_cast<TDEListView *>(this), flags); for(; it.current(); ++it) list.append(it.current()); @@ -1261,7 +1261,7 @@ TQPtrList<TQListViewItem> 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<KListViewItem*>(item); + TDEListViewItem *kItem = dynamic_cast<TDEListViewItem*>(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<KListView *>(listView())->itemRemoved(this); + emit static_cast<TDEListView *>(listView())->itemRemoved(this); } -void KListViewItem::init() +void TDEListViewItem::init() { m_odd = m_known = false; - KListView *lv = static_cast<KListView *>(listView()); + TDEListView *lv = static_cast<TDEListView *>(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<KListView *>(listView())->itemAdded(item); + emit static_cast<TDEListView *>(listView())->itemAdded(item); } -void KListViewItem::takeItem(TQListViewItem *item) +void TDEListViewItem::takeItem(TQListViewItem *item) { TQListViewItem::takeItem(item); if(listView()) - emit static_cast<KListView *>(listView())->itemRemoved(item); + emit static_cast<TDEListView *>(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<KListView *>(listView()); + TDEListView* const lv = static_cast<TDEListView *>(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<KListViewItem *>(lvD->paintAbove); + above = dynamic_cast<TDEListViewItem *>(lvD->paintAbove); } else { - above = dynamic_cast<KListViewItem *>(itemAbove()); + above = dynamic_cast<TDEListViewItem *>(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<KListViewItem *>(parent()); + item = dynamic_cast<TDEListViewItem *>(parent()); if (item) previous = item->m_odd; - item = dynamic_cast<KListViewItem *>(parent()->firstChild()); + item = dynamic_cast<TDEListViewItem *>(parent()->firstChild()); } else { - item = dynamic_cast<KListViewItem *>(lv->firstChild()); + item = dynamic_cast<TDEListViewItem *>(lv->firstChild()); } while(item) @@ -2327,7 +2327,7 @@ bool KListViewItem::isAlternate() previous = !previous; item->m_odd = previous; item->m_known = true; - item = dynamic_cast<KListViewItem *>(item->nextSibling()); + item = dynamic_cast<TDEListViewItem *>(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 <klistview.h> /** - * 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<int> KListViewSearchLine::searchColumns() const +TQValueList<int> 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<int> &columns) +void TDEListViewSearchLine::setSearchColumns(const TQValueList<int> &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<KToolBar *>(parent()); + TDEToolBar *toolBar = tqt_dynamic_cast<TDEToolBar *>(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 <klineedit.h> #include <tqhbox.h> -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<int> &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 <ctype.h> #include <assert.h> -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<TQDockWindow> hiddenDockWindows; }; -TQPtrList<KMainWindow>* KMainWindow::memberList = 0L; +TQPtrList<TDEMainWindow>* TDEMainWindow::memberList = 0L; static bool no_query_exit = false; static KMWSessionManaged* ksm = 0; static KStaticDeleter<KMWSessionManaged> 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 <digisnap@cs.tu-berlin.de>, this // hook is useful for better document orientation - KMainWindow::memberList->first()->saveGlobalProperties(config); + TDEMainWindow::memberList->first()->saveGlobalProperties(config); } - TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList); + TQPtrListIterator<TDEMainWindow> 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<KMainWindow> it(*KMainWindow::memberList); + TQPtrListIterator<TDEMainWindow> 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<KMainWindow>; + memberList = new TQPtrList<TDEMainWindow>; 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<KMainWindow> it(*KMainWindow::memberList); + TQPtrListIterator<TDEMainWindow> 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<KToolBar> it( toolBarIterator() ); + TDEToolBar *toolbar = 0; + TQPtrListIterator<TDEToolBar> 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<KToolBar> it( toolBarIterator() ); // must use own iterator + TDEToolBar *toolbar; + TQPtrListIterator<TDEToolBar> 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<KToolBar> it( toolBarIterator() ); + TQPtrListIterator<TDEToolBar> 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<KToolBar> KMainWindow::toolBarIterator() +TQPtrListIterator<TDEToolBar> TDEMainWindow::toolBarIterator() { toolbarList.clear(); TQPtrList<TQToolBar> 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<KToolBar>( toolbarList ); + return TQPtrListIterator<TDEToolBar>( 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>* KMainWindow::getMemberList() { return memberList; } +TQPtrList<TDEMainWindow>* 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 <tqmetaobject.h> #include <ktoolbar.h> -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( <myTextString> ); + * TDEPopupMenu *help = helpMenu( <myTextString> ); * 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 ); /** * <b>Session Management</b> @@ -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<KMainWindow>* memberList; + static TQPtrList<TDEMainWindow>* 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<KMainWindow>* getMemberList(); + static TQPtrList<TDEMainWindow>* 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<KToolBar> toolBarIterator(); + TQPtrListIterator<TDEToolBar> 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 \<toolbar name here\>' 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<KToolBar> toolbarList; + TQPtrList<TDEToolBar> 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 <typename T> 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 <tqclipboard.h> -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<KAction *> lst = m_dcopActionProxy->actions(); - TQValueList<KAction *>::ConstIterator it = lst.begin(); - TQValueList<KAction *>::ConstIterator end = lst.end(); + TQValueList<TDEAction *> lst = m_dcopActionProxy->actions(); + TQValueList<TDEAction *>::ConstIterator it = lst.begin(); + TQValueList<TDEAction *>::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<TQCString,DCOPRef> KMainWindowInterface::actionMap() +TQMap<TQCString,DCOPRef> 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 <geiseri@yahoo.com> */ -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 <tdeprint@swing.be> */ -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 @@ <!-- 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. - append: this is used to control the placement of the action during the merging with ui_standards.rc. This is mapped to MergeLocal tags 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. + to TDEAction properties. --> <!ELEMENT Action EMPTY> -<!-- We defined only a few standard KAction properties here. Theoritically we can have +<!-- We defined only a few standard TDEAction properties here. Theoritically we can have any property here --> <!ATTLIST Action name CDATA #REQUIRED diff --git a/tdeui/kpixmapregionselectorwidget.cpp b/tdeui/kpixmapregionselectorwidget.cpp index 615b50a23..8f6568534 100644 --- a/tdeui/kpixmapregionselectorwidget.cpp +++ b/tdeui/kpixmapregionselectorwidget.cpp @@ -135,17 +135,17 @@ void KPixmapRegionSelectorWidget::updatePixmap() } -KPopupMenu *KPixmapRegionSelectorWidget::createPopupMenu() +TDEPopupMenu *KPixmapRegionSelectorWidget::createPopupMenu() { - KPopupMenu *popup=new KPopupMenu(this, "PixmapRegionSelectorPopup"); + TDEPopupMenu *popup=new TDEPopupMenu(this, "PixmapRegionSelectorPopup"); popup->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 <tqlabel.h> #include <kimageeffect.h> -class KPopupMenu; +class TDEPopupMenu; #include <tdelibs_export.h> @@ -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 <kdebug.h> #include <kapplication.h> -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 <kpixmap.h> #include <tdelibs_export.h> /** - * @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 <mosfet@kde.org> */ -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 <mosfet@kde.org> * @author Hamish Rodda <rodda@kde.org> */ -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 <kstdguiitem.h> #include <kpushbutton.h> -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<TQKeyEvent*>(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 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> -<class>KShortcutDialogAdvanced</class> +<class>TDEShortcutDialogAdvanced</class> <widget class="TQWidget"> <property name="name"> - <cstring>KShortcutDialogAdvanced</cstring> + <cstring>TDEShortcutDialogAdvanced</cstring> </property> <property name="geometry"> <rect> @@ -243,7 +243,7 @@ <include location="global" impldecl="in implementation">kpushbutton.h</include> </includes> <forwards> - <forward>class KShortcut</forward> + <forward>class TDEShortcut</forward> </forwards> <layoutdefaults spacing="6" margin="11"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> 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 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> -<class>KShortcutDialogSimple</class> +<class>TDEShortcutDialogSimple</class> <widget class="TQWidget"> <property name="name"> - <cstring>KShortcutDialogSimple</cstring> + <cstring>TDEShortcutDialogSimple</cstring> </property> <property name="geometry"> <rect> @@ -110,7 +110,7 @@ <include location="global" impldecl="in implementation">kpushbutton.h</include> </includes> <forwards> - <forward>class KShortcut</forward> + <forward>class TDEShortcut</forward> </forwards> <layoutdefaults spacing="6" margin="11"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> 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 <radej@kde.org> - * @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<p>" "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<p>" "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 <tqstringlist.h> @@ -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. * * <b>Simple Example:</b>\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 <kglobal.h> #include <tqlabel.h> -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<TQWidget> 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<TQMainWindow*>(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<KToolBar*>( this )->getButton( id ); + TDEToolBarButton * button = const_cast<TDEToolBar*>( 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<KToolBar*>( this )->getLined( id ); + KLineEdit * lineEdit = const_cast<TDEToolBar*>( 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<KToolBar*>( this )->getCombo( id ); + KComboBox * comboBox = const_cast<TDEToolBar*>( 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<KToolBarButton *>( *it ); + return tqt_dynamic_cast<TDEToolBarButton *>( *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<KMainWindow *>(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(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<KMainWindow *>(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(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<KToolBar> toolbarList; + TQPtrList<TDEToolBar> toolbarList; TQPtrList<TQToolBar> 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<KToolBar> toolbarIterator( toolbarList ); + TQPtrListIterator<TDEToolBar> 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<KToolBar> guard( this ); + TQGuardedPtr<TDEToolBar> 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<KMainWindow *>(mw); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(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<KToolBarSeparator *>(w); + TDEToolBarSeparator *ktbs = tqt_dynamic_cast<TDEToolBarSeparator *>(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<TQWidget *>(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<KToolBar *>(this); + TDEToolBar *ncThis = const_cast<TDEToolBar *>(this); ncThis->polish(); int margin = static_cast<TQWidget*>(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<KMainWindow *>(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(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<KMainWindow *>(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(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<KMainWindow *>(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(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<KMainWindow *>(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(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 <reggie@kde.org>, Stephan Kulow <coolo@kde.org>, Sven Radej <radej@kde.org>. */ -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<TQWidget*, int > widget2id; typedef TQMap<int, TQWidget* > Id2WidgetMap; Id2WidgetMap id2widget; - KPopupMenu *context; + TDEPopupMenu *context; TQPtrList<TQWidget> widgets; TQTimer *layoutTimer; TQGuardedPtr<TQWidget> 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 <kmainwindow.h> -template class TQIntDict<KToolBarButton>; +template class TQIntDict<TDEToolBarButton>; -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<KToolBar*>(_parent); + d->m_parent = tqt_dynamic_cast<TDEToolBar*>(_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<KToolBar*>(_parent); + d->m_parent = tqt_dynamic_cast<TDEToolBar*>(_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<int>( 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 <tqstring.h> #include <kglobal.h> -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<KToolBarButton> +class TDEUI_EXPORT TDEToolBarButtonList : public TQIntDict<TDEToolBarButton> { 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<KToolBar> &oldToolBarList ) + BarActionBuilder( TDEActionCollection *actionCollection, TDEMainWindow *mainWindow, TQPtrList<TDEToolBar> &oldToolBarList ) : m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false ) { TQPtrList<TQDockWindow> dockWindows = m_mainWindow->dockWindows(); TQPtrListIterator<TQDockWindow> dockWindowIt( dockWindows ); for ( ; dockWindowIt.current(); ++dockWindowIt ) { - KToolBar *toolBar = tqt_dynamic_cast<KToolBar *>( dockWindowIt.current() ); + TDEToolBar *toolBar = tqt_dynamic_cast<TDEToolBar *>( dockWindowIt.current() ); if ( !toolBar ) continue; @@ -67,30 +67,30 @@ namespace bool needsRebuild() const { return m_needsRebuild; } - TQPtrList<KAction> create() + TQPtrList<TDEAction> create() { if ( !m_needsRebuild ) - return TQPtrList<KAction>(); + return TQPtrList<TDEAction>(); - TQPtrListIterator<KToolBar> toolBarIt( m_toolBars ); + TQPtrListIterator<TDEToolBar> toolBarIt( m_toolBars ); for ( ; toolBarIt.current(); ++toolBarIt ) handleToolBar( toolBarIt.current() ); - TQPtrList<KAction> actions; + TQPtrList<TDEAction> actions; if ( m_toolBarActions.count() == 0 ) return actions; if ( m_toolBarActions.count() == 1 ) { - KToggleToolBarAction* action = static_cast<KToggleToolBarAction *>( m_toolBarActions.getFirst() ); + TDEToggleToolBarAction* action = static_cast<TDEToggleToolBarAction *>( 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<KAction> actionIt( m_toolBarActions ); + TQPtrListIterator<TDEAction> actionIt( m_toolBarActions ); for ( ; actionIt.current(); ++actionIt ) menuAction->insert( actionIt.current() ); @@ -98,12 +98,12 @@ namespace return actions; } - const TQPtrList<KToolBar> &toolBars() const { return m_toolBars; } + const TQPtrList<TDEToolBar> &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<KToolBar> m_toolBars; - TQPtrList<KAction> m_toolBarActions; + TQPtrList<TDEToolBar> m_toolBars; + TQPtrList<TDEAction> 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<KToolBar> toolBarIt( m_toolBars ); + for ( TQPtrListIterator<TDEToolBar> toolBarIt( m_toolBars ); toolBarIt.current(); ++toolBarIt ) toolBarIt.current()->disconnect( this ); */ @@ -175,13 +175,13 @@ void ToolBarHandler::setupActions() m_toolBars = builder.toolBars(); /* - for ( TQPtrListIterator<KToolBar> toolBarIt( m_toolBars ); + for ( TQPtrListIterator<TDEToolBar> 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<KAction> actionIt( m_actions ); + TQPtrListIterator<TDEAction> 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 <tqguardedptr.h> #include <kxmlguiclient.h> -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<KMainWindow> m_mainWindow; - TQPtrList<KAction> m_actions; - TQPtrList<KToolBar> m_toolBars; + TQGuardedPtr<TDEMainWindow> m_mainWindow; + TQPtrList<TDEAction> m_actions; + TQPtrList<TDEToolBar> 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 <tqlabel.h> #include <tqapplication.h> -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<TQLabel*>(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 <felixberger@beldesign.de> */ -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<KToolBarButton> it(*buttons); + TQIntDictIterator<TDEToolBarButton> 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 <tdelibs_export.h> -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 <radej@kde.org> */ -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. </xsd:documentation> 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<KMainWindow *>( d->m_widget ) ) - mainwindow = static_cast<KMainWindow *>(d->m_widget); + TDEMainWindow *mainwindow = 0; + if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) + mainwindow = static_cast<TDEMainWindow *>(d->m_widget); return mainwindow; } @@ -127,8 +127,8 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ { KMenuBar *bar; - if ( ::tqqt_cast<KMainWindow *>( d->m_widget ) ) - bar = static_cast<KMainWindow *>(d->m_widget)->menuBar(); + if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) + bar = static_cast<TDEMainWindow *>(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<KMainWindow *>( p ) ) + while ( p && !::tqqt_cast<TDEMainWindow *>( 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<KToolBar*>(TQT_TQWIDGET(d->m_widget->child( name, "KToolBar" ))); + TDEToolBar *bar = static_cast<TDEToolBar*>(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<KMainWindow *>( d->m_widget ) ) + if ( ::tqqt_cast<TDEMainWindow *>( 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<KMainWindow *>( d->m_widget ) ) + if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) { - KMainWindow *mainWin = static_cast<KMainWindow *>(d->m_widget); + TDEMainWindow *mainWin = static_cast<TDEMainWindow *>(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<KToolBar *>( container ) ) + else if ( ::tqqt_cast<TDEToolBar *>( container ) ) { - KToolBar *tb = static_cast<KToolBar *>( container ); + TDEToolBar *tb = static_cast<TDEToolBar *>( container ); tb->saveState( element ); delete tb; @@ -271,7 +271,7 @@ void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQD } else if ( ::tqqt_cast<KStatusBar *>( container ) ) { - if ( ::tqqt_cast<KMainWindow *>( d->m_widget ) ) + if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) container->hide(); else delete static_cast<KStatusBar *>(container); @@ -319,9 +319,9 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo } else if ( ::tqqt_cast<TQMenuBar *>( parent ) ) return static_cast<TQMenuBar *>(parent)->insertSeparator( index ); - else if ( ::tqqt_cast<KToolBar *>( parent ) ) + else if ( ::tqqt_cast<TDEToolBar *>( parent ) ) { - KToolBar *bar = static_cast<KToolBar *>( parent ); + TDEToolBar *bar = static_cast<TDEToolBar *>( 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<KPopupMenu *>( parent ) ) + if ( ::tqqt_cast<TDEPopupMenu *>( 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<KPopupMenu *>(parent)->insertTitle( pix, i18nText, -1, index ); + return static_cast<TDEPopupMenu *>(parent)->insertTitle( pix, i18nText, -1, index ); else - return static_cast<KPopupMenu *>(parent)->insertTitle( i18nText, -1, index ); + return static_cast<TDEPopupMenu *>(parent)->insertTitle( i18nText, -1, index ); } } return 0; @@ -393,8 +393,8 @@ void KXMLGUIBuilder::removeCustomElement( TQWidget *parent, int id ) static_cast<TQPopupMenu *>(parent)->removeItem( id ); else if ( ::tqqt_cast<TQMenuBar *>( parent ) ) static_cast<TQMenuBar *>(parent)->removeItem( id ); - else if ( ::tqqt_cast<KToolBar *>( parent ) ) - static_cast<KToolBar *>(parent)->removeItemDelayed( id ); + else if ( ::tqqt_cast<TDEToolBar *>( parent ) ) + static_cast<TDEToolBar *>(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<KMainWindow *>( d->m_widget ) ) + if ( !d->m_widget || !::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) return; #if 0 - KToolBar *toolbar = 0; - QListIterator<KToolBar> it( ( (KMainWindow*)d->m_widget )->toolBarIterator() ); + TDEToolBar *toolbar = 0; + QListIterator<TDEToolBar> it( ( (TDEMainWindow*)d->m_widget )->toolBarIterator() ); while ( ( toolbar = it.current() ) ) { kdDebug() << "KXMLGUIBuilder::finalizeGUI toolbar=" << (void*)toolbar << endl; ++it; toolbar->positionYourself(); } #else - static_cast<KMainWindow *>(d->m_widget)->finalizeGUI( false ); + static_cast<TDEMainWindow *>(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<KXMLGUIFactory> 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<KXMLGUIClient> 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<KAction> &actionList ) +void KXMLGUIClient::plugActionList( const TQString &name, const TQPtrList<TDEAction> &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 <tdelibs_export.h> 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<KAction> file_actions; + * TQPtrList<TDEAction> 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<KAction> &actionList ); + void plugActionList( const TQString &name, const TQPtrList<TDEAction> &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<TQWidget> KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node, } void KXMLGUIFactory::plugActionList( KXMLGUIClient *client, const TQString &name, - const TQPtrList<KAction> &actionList ) + const TQPtrList<TDEAction> &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 <tdelibs_export.h> -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<KAction> &actionList ); + void plugActionList( KXMLGUIClient *client, const TQString &name, const TQPtrList<TDEAction> &actionList ); void unplugActionList( KXMLGUIClient *client, const TQString &name ); /** @@ -206,8 +206,8 @@ class TDEUI_EXPORT KXMLGUIFactory : public TQObject TQPtrList<TQWidget> 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<KAction> +class TDEUI_EXPORT ActionList : public TQPtrList<TDEAction> { public: ActionList() {} - ActionList( const TQPtrList<KAction> &rhs ) - : TQPtrList<KAction>( rhs ) + ActionList( const TQPtrList<TDEAction> &rhs ) + : TQPtrList<TDEAction>( rhs ) {} - ActionList &operator=( const TQPtrList<KAction> &rhs ) - { TQPtrList<KAction>::operator=( rhs ); return *this; } + ActionList &operator=( const TQPtrList<TDEAction> &rhs ) + { TQPtrList<TDEAction>::operator=( rhs ); return *this; } void plug( TQWidget *container, int index ) const; void unplug( TQWidget *container ) const; }; -typedef TQPtrListIterator<KAction> ActionListIt; +typedef TQPtrListIterator<TDEAction> 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 <michael.reiher@gmx.de> * @@ -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 <tqwidget.h> 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<TQString,TQString> 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<TQObject *>( 0 ) ); - - TQGuardedPtr<KAction> action1 = new KRadioAction("test",0, &coll); - TQGuardedPtr<KAction> action2 = new KRadioAction("test",0, &coll); - TQGuardedPtr<KAction> action3 = new KRadioAction("test",0, &coll); - TQGuardedPtr<KAction> action4 = new KRadioAction("test",0, &coll); - TQGuardedPtr<KAction> action5 = new KRadioAction("test",0, &coll); - TQGuardedPtr<KAction> action6 = new KRadioAction("test",0, &coll); - TQGuardedPtr<KAction> action7 = new KRadioAction("test",0, &coll); + TDEActionCollection coll( static_cast<TQObject *>( 0 ) ); + + TQGuardedPtr<TDEAction> action1 = new TDERadioAction("test",0, &coll); + TQGuardedPtr<TDEAction> action2 = new TDERadioAction("test",0, &coll); + TQGuardedPtr<TDEAction> action3 = new TDERadioAction("test",0, &coll); + TQGuardedPtr<TDEAction> action4 = new TDERadioAction("test",0, &coll); + TQGuardedPtr<TDEAction> action5 = new TDERadioAction("test",0, &coll); + TQGuardedPtr<TDEAction> action6 = new TDERadioAction("test",0, &coll); + TQGuardedPtr<TDEAction> 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 <kmainwindow.h> -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 <kmainwindow.h> -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 <assert.h> -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 <dclock.h> /* - 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 <kmainwindow.h> 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 diff --git a/tdeutils/kpluginselector.cpp b/tdeutils/kpluginselector.cpp index 8e30f75d4..a6390ec19 100644 --- a/tdeutils/kpluginselector.cpp +++ b/tdeutils/kpluginselector.cpp @@ -67,7 +67,7 @@ class KPluginInfoLVI : public TQCheckListItem { public: - KPluginInfoLVI( KPluginInfo *pluginInfo, KListView *parent ) + KPluginInfoLVI( KPluginInfo *pluginInfo, TDEListView *parent ) : TQCheckListItem( parent, pluginInfo->name(), TQCheckListItem::CheckBox ), m_pluginInfo( pluginInfo ) { } @@ -86,15 +86,15 @@ private: class KPluginListViewToolTip : public TQToolTip { public: - KPluginListViewToolTip( TQWidget *parent, KListView *lv ); + KPluginListViewToolTip( TQWidget *parent, TDEListView *lv ); void maybeTip( const TQPoint &pos ); private: - KListView *m_listView; + TDEListView *m_listView; }; -KPluginListViewToolTip::KPluginListViewToolTip( TQWidget *parent, KListView *lv ) +KPluginListViewToolTip::KPluginListViewToolTip( TQWidget *parent, TDEListView *lv ) : TQToolTip( parent ), m_listView( lv ) { } @@ -182,7 +182,7 @@ void KPluginSelectionWidget::init( const TQValueList<KPluginInfo*> & plugininfos { // setup Widgets ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true ); - KListView * listview = new KListView( this ); + TDEListView * listview = new TDEListView( this ); d->tooltip = new KPluginListViewToolTip( listview->viewport(), listview ); connect( listview, TQT_SIGNAL( pressed( TQListViewItem * ) ), this, TQT_SLOT( executed( TQListViewItem * ) ) ); @@ -195,7 +195,7 @@ void KPluginSelectionWidget::init( const TQValueList<KPluginInfo*> & plugininfos listview->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred ); listview->setAcceptDrops( false ); listview->setFullWidth( true ); - listview->setSelectionModeExt( KListView::Single ); + listview->setSelectionModeExt( TDEListView::Single ); listview->setAllColumnsShowFocus( true ); listview->addColumn( i18n( "Name" ) ); for( TQValueList<KPluginInfo*>::ConstIterator it = plugininfos.begin(); diff --git a/tdeutils/ksettings/componentsdialog.cpp b/tdeutils/ksettings/componentsdialog.cpp index 89a5e2cd7..97a0bad4f 100644 --- a/tdeutils/ksettings/componentsdialog.cpp +++ b/tdeutils/ksettings/componentsdialog.cpp @@ -35,7 +35,7 @@ namespace KSettings class ComponentsDialog::ComponentsDialogPrivate { public: - KListView * listview; + TDEListView * listview; TQFrame * infowidget; TQLabel * iconwidget; TQLabel * commentwidget; @@ -51,7 +51,7 @@ ComponentsDialog::ComponentsDialog( TQWidget * parent, const char * name ) TQWidget * page = new TQWidget( this ); setMainWidget( page ); ( new TQHBoxLayout( page, 0, KDialog::spacingHint() ) )->setAutoAdd( true ); - d->listview = new KListView( page ); + d->listview = new TDEListView( page ); d->listview->setMinimumSize( 200, 200 ); d->infowidget = new TQFrame( page ); d->infowidget->setMinimumSize( 200, 200 ); @@ -68,7 +68,7 @@ ComponentsDialog::ComponentsDialog( TQWidget * parent, const char * name ) d->listview->setRootIsDecorated( true ); d->listview->setSorting( -1 ); d->listview->setAcceptDrops( false ); - d->listview->setSelectionModeExt( KListView::Single ); + d->listview->setSelectionModeExt( TDEListView::Single ); d->listview->setAllColumnsShowFocus( true ); connect( d->listview, TQT_SIGNAL( pressed( TQListViewItem * ) ), this, diff --git a/tdeutils/tdemultitabbar.cpp b/tdeutils/tdemultitabbar.cpp index 313d23d55..da2f3b23e 100644 --- a/tdeutils/tdemultitabbar.cpp +++ b/tdeutils/tdemultitabbar.cpp @@ -870,7 +870,7 @@ KMultiTabBar::~KMultiTabBar() { /*int KMultiTabBar::insertButton(TQPixmap pic,int id ,const TQString&) { - (new KToolbarButton(pic,id,m_internal))->show(); + (new TDEToolbarButton(pic,id,m_internal))->show(); return 0; }*/ |