summaryrefslogtreecommitdiffstats
path: root/kdeui
diff options
context:
space:
mode:
Diffstat (limited to 'kdeui')
-rw-r--r--kdeui/kaboutapplication.cpp42
-rw-r--r--kdeui/kaboutapplication.h14
-rw-r--r--kdeui/kaboutdialog.cpp618
-rw-r--r--kdeui/kaboutdialog.h184
-rw-r--r--kdeui/kaboutdialog_private.h72
-rw-r--r--kdeui/kaboutkde.cpp18
-rw-r--r--kdeui/kaboutkde.h6
-rw-r--r--kdeui/kaccelgen.h50
-rw-r--r--kdeui/kaction.cpp362
-rw-r--r--kdeui/kaction.h160
-rw-r--r--kdeui/kactionclasses.cpp756
-rw-r--r--kdeui/kactionclasses.h380
-rw-r--r--kdeui/kactioncollection.cpp168
-rw-r--r--kdeui/kactioncollection.h52
-rw-r--r--kdeui/kactionselector.cpp146
-rw-r--r--kdeui/kactionselector.h64
-rw-r--r--kdeui/kactionshortcutlist.h20
-rw-r--r--kdeui/kactivelabel.cpp74
-rw-r--r--kdeui/kactivelabel.h28
-rw-r--r--kdeui/kanimwidget.cpp58
-rw-r--r--kdeui/kanimwidget.h26
-rw-r--r--kdeui/karrowbutton.cpp38
-rw-r--r--kdeui/karrowbutton.h12
-rw-r--r--kdeui/kauthicon.cpp28
-rw-r--r--kdeui/kauthicon.h38
-rw-r--r--kdeui/kbugreport.cpp226
-rw-r--r--kdeui/kbugreport.h22
-rw-r--r--kdeui/kbuttonbox.cpp94
-rw-r--r--kdeui/kbuttonbox.h30
-rw-r--r--kdeui/kcharselect.cpp198
-rw-r--r--kdeui/kcharselect.h102
-rw-r--r--kdeui/kcmenumngr.cpp50
-rw-r--r--kdeui/kcmenumngr.h22
-rw-r--r--kdeui/kcmodule.cpp30
-rw-r--r--kdeui/kcmodule.h22
-rw-r--r--kdeui/kcolorbutton.cpp92
-rw-r--r--kdeui/kcolorbutton.h40
-rw-r--r--kdeui/kcolorcombo.cpp70
-rw-r--r--kdeui/kcolorcombo.h20
-rw-r--r--kdeui/kcolordialog.cpp424
-rw-r--r--kdeui/kcolordialog.h158
-rw-r--r--kdeui/kcolordrag.cpp48
-rw-r--r--kdeui/kcolordrag.h22
-rw-r--r--kdeui/kcombobox.cpp156
-rw-r--r--kdeui/kcombobox.h102
-rw-r--r--kdeui/kcommand.cpp22
-rw-r--r--kdeui/kcommand.h26
-rw-r--r--kdeui/kcompletionbox.cpp122
-rw-r--r--kdeui/kcompletionbox.h38
-rw-r--r--kdeui/kconfigdialog.cpp74
-rw-r--r--kdeui/kconfigdialog.h28
-rw-r--r--kdeui/kcursor.cpp132
-rw-r--r--kdeui/kcursor.h46
-rw-r--r--kdeui/kcursor_private.h26
-rw-r--r--kdeui/kdatepicker.cpp218
-rw-r--r--kdeui/kdatepicker.h62
-rw-r--r--kdeui/kdatetbl.cpp244
-rw-r--r--kdeui/kdatetbl.h108
-rw-r--r--kdeui/kdatetimewidget.cpp30
-rw-r--r--kdeui/kdatetimewidget.h18
-rw-r--r--kdeui/kdatewidget.cpp68
-rw-r--r--kdeui/kdatewidget.h18
-rw-r--r--kdeui/kdcopactionproxy.cpp34
-rw-r--r--kdeui/kdcopactionproxy.h14
-rw-r--r--kdeui/kdetrayproxy/kdetrayproxy.cpp10
-rw-r--r--kdeui/kdetrayproxy/kdetrayproxy.h10
-rw-r--r--kdeui/kdetrayproxy/module.cpp4
-rw-r--r--kdeui/kdetrayproxy/module.h2
-rw-r--r--kdeui/kdialog.cpp78
-rw-r--r--kdeui/kdialog.h24
-rw-r--r--kdeui/kdialogbase.cpp398
-rw-r--r--kdeui/kdialogbase.h250
-rw-r--r--kdeui/kdialogbase_priv.h10
-rw-r--r--kdeui/kdockwidget.cpp784
-rw-r--r--kdeui/kdockwidget.h194
-rw-r--r--kdeui/kdockwidget_p.h26
-rw-r--r--kdeui/kdockwidget_private.cpp74
-rw-r--r--kdeui/kdockwidget_private.h52
-rw-r--r--kdeui/kdockwindow.h4
-rw-r--r--kdeui/kdualcolorbutton.cpp98
-rw-r--r--kdeui/kdualcolorbutton.h56
-rw-r--r--kdeui/keditcl.h90
-rw-r--r--kdeui/keditcl1.cpp126
-rw-r--r--kdeui/keditcl2.cpp158
-rw-r--r--kdeui/keditlistbox.cpp90
-rw-r--r--kdeui/keditlistbox.h84
-rw-r--r--kdeui/kedittoolbar.cpp450
-rw-r--r--kdeui/kedittoolbar.h70
-rw-r--r--kdeui/kfontcombo.cpp70
-rw-r--r--kdeui/kfontcombo.h12
-rw-r--r--kdeui/kfontdialog.cpp326
-rw-r--r--kdeui/kfontdialog.h126
-rw-r--r--kdeui/kfontrequester.cpp48
-rw-r--r--kdeui/kfontrequester.h42
-rw-r--r--kdeui/kguiitem.cpp60
-rw-r--r--kdeui/kguiitem.h48
-rw-r--r--kdeui/khelpmenu.cpp76
-rw-r--r--kdeui/khelpmenu.h20
-rw-r--r--kdeui/kiconview.cpp248
-rw-r--r--kdeui/kiconview.h126
-rw-r--r--kdeui/kiconviewsearchline.cpp74
-rw-r--r--kdeui/kiconviewsearchline.h38
-rw-r--r--kdeui/kinputdialog.cpp186
-rw-r--r--kdeui/kinputdialog.h96
-rw-r--r--kdeui/kjanuswidget.cpp396
-rw-r--r--kdeui/kjanuswidget.h156
-rw-r--r--kdeui/kkeybutton.cpp30
-rw-r--r--kdeui/kkeybutton.h8
-rw-r--r--kdeui/kkeydialog.cpp326
-rw-r--r--kdeui/kkeydialog.h82
-rw-r--r--kdeui/klanguagebutton.cpp120
-rw-r--r--kdeui/klanguagebutton.h48
-rw-r--r--kdeui/kled.cpp126
-rw-r--r--kdeui/kled.h40
-rw-r--r--kdeui/klineedit.cpp262
-rw-r--r--kdeui/klineedit.h126
-rw-r--r--kdeui/klineeditdlg.cpp94
-rw-r--r--kdeui/klineeditdlg.h26
-rw-r--r--kdeui/klistbox.cpp90
-rw-r--r--kdeui/klistbox.h44
-rw-r--r--kdeui/klistview.cpp582
-rw-r--r--kdeui/klistview.h248
-rw-r--r--kdeui/klistviewlineedit.h20
-rw-r--r--kdeui/klistviewsearchline.cpp116
-rw-r--r--kdeui/klistviewsearchline.h28
-rw-r--r--kdeui/kmainwindow.cpp312
-rw-r--r--kdeui/kmainwindow.h114
-rw-r--r--kdeui/kmainwindowiface.cpp30
-rw-r--r--kdeui/kmainwindowiface.h22
-rw-r--r--kdeui/kmenubar.cpp150
-rw-r--r--kdeui/kmenubar.h24
-rw-r--r--kdeui/kmessagebox.cpp474
-rw-r--r--kdeui/kmessagebox.h366
-rw-r--r--kdeui/knuminput.cpp192
-rw-r--r--kdeui/knuminput.h148
-rw-r--r--kdeui/knumvalidator.cpp88
-rw-r--r--kdeui/knumvalidator.h48
-rw-r--r--kdeui/kpanelapplet.cpp32
-rw-r--r--kdeui/kpanelapplet.h18
-rw-r--r--kdeui/kpanelappmenu.cpp90
-rw-r--r--kdeui/kpanelappmenu.h22
-rw-r--r--kdeui/kpanelextension.cpp14
-rw-r--r--kdeui/kpanelextension.h16
-rw-r--r--kdeui/kpanelmenu.cpp28
-rw-r--r--kdeui/kpanelmenu.h16
-rw-r--r--kdeui/kpassdlg.cpp174
-rw-r--r--kdeui/kpassdlg.h52
-rw-r--r--kdeui/kpassivepopup.cpp202
-rw-r--r--kdeui/kpassivepopup.h118
-rw-r--r--kdeui/kpixmapio.cpp54
-rw-r--r--kdeui/kpixmapio.h20
-rw-r--r--kdeui/kpixmapregionselectordialog.cpp50
-rw-r--r--kdeui/kpixmapregionselectordialog.h12
-rw-r--r--kdeui/kpixmapregionselectorwidget.cpp104
-rw-r--r--kdeui/kpixmapregionselectorwidget.h40
-rw-r--r--kdeui/kpopupmenu.cpp182
-rw-r--r--kdeui/kpopupmenu.h76
-rw-r--r--kdeui/kprogress.cpp80
-rw-r--r--kdeui/kprogress.h42
-rw-r--r--kdeui/kprogressbox.cpp48
-rw-r--r--kdeui/kprogressbox.h28
-rw-r--r--kdeui/kpushbutton.cpp66
-rw-r--r--kdeui/kpushbutton.h34
-rw-r--r--kdeui/krestrictedline.cpp20
-rw-r--r--kdeui/krestrictedline.h22
-rw-r--r--kdeui/krootpixmap.cpp74
-rw-r--r--kdeui/krootpixmap.h32
-rw-r--r--kdeui/kruler.cpp54
-rw-r--r--kdeui/kruler.h46
-rw-r--r--kdeui/ksconfig.cpp144
-rw-r--r--kdeui/ksconfig.h46
-rw-r--r--kdeui/kscrollview.cpp28
-rw-r--r--kdeui/kscrollview.h8
-rw-r--r--kdeui/kselect.cpp138
-rw-r--r--kdeui/kselect.h104
-rw-r--r--kdeui/kseparator.cpp40
-rw-r--r--kdeui/kseparator.h14
-rw-r--r--kdeui/ksharedpixmap.cpp40
-rw-r--r--kdeui/ksharedpixmap.h16
-rw-r--r--kdeui/kshortcutdialog.cpp76
-rw-r--r--kdeui/kshortcutdialog.h8
-rw-r--r--kdeui/kspell.cpp270
-rw-r--r--kdeui/kspell.h104
-rw-r--r--kdeui/kspelldlg.cpp82
-rw-r--r--kdeui/kspelldlg.h24
-rw-r--r--kdeui/ksplashscreen.cpp6
-rw-r--r--kdeui/ksplashscreen.h8
-rw-r--r--kdeui/ksqueezedtextlabel.cpp46
-rw-r--r--kdeui/ksqueezedtextlabel.h20
-rw-r--r--kdeui/kstatusbar.cpp32
-rw-r--r--kdeui/kstatusbar.h42
-rw-r--r--kdeui/kstdaction.cpp150
-rw-r--r--kdeui/kstdaction.h154
-rw-r--r--kdeui/kstdaction_p.h4
-rw-r--r--kdeui/kstdguiitem.cpp66
-rw-r--r--kdeui/kstdguiitem.h6
-rw-r--r--kdeui/kstringvalidator.cpp18
-rw-r--r--kdeui/kstringvalidator.h36
-rw-r--r--kdeui/kswitchlanguagedialog.cpp92
-rw-r--r--kdeui/kswitchlanguagedialog.h8
-rw-r--r--kdeui/ksyntaxhighlighter.cpp180
-rw-r--r--kdeui/ksyntaxhighlighter.h66
-rw-r--r--kdeui/ksystemtray.cpp44
-rw-r--r--kdeui/ksystemtray.h20
-rw-r--r--kdeui/ktabbar.cpp154
-rw-r--r--kdeui/ktabbar.h44
-rw-r--r--kdeui/ktabctl.cpp90
-rw-r--r--kdeui/ktabctl.h36
-rw-r--r--kdeui/ktabwidget.cpp166
-rw-r--r--kdeui/ktabwidget.h72
-rw-r--r--kdeui/ktextbrowser.cpp32
-rw-r--r--kdeui/ktextbrowser.h26
-rw-r--r--kdeui/ktextedit.cpp90
-rw-r--r--kdeui/ktextedit.h40
-rw-r--r--kdeui/ktimewidget.cpp24
-rw-r--r--kdeui/ktimewidget.h18
-rw-r--r--kdeui/ktimezonewidget.cpp30
-rw-r--r--kdeui/ktimezonewidget.h12
-rw-r--r--kdeui/ktip.cpp146
-rw-r--r--kdeui/ktip.h28
-rw-r--r--kdeui/ktoolbar.cpp556
-rw-r--r--kdeui/ktoolbar.h204
-rw-r--r--kdeui/ktoolbarbutton.cpp342
-rw-r--r--kdeui/ktoolbarbutton.h76
-rw-r--r--kdeui/ktoolbarhandler.cpp54
-rw-r--r--kdeui/ktoolbarhandler.h16
-rw-r--r--kdeui/ktoolbarlabelaction.cpp38
-rw-r--r--kdeui/ktoolbarlabelaction.h34
-rw-r--r--kdeui/ktoolbarradiogroup.cpp6
-rw-r--r--kdeui/ktoolbarradiogroup.h2
-rw-r--r--kdeui/kurllabel.cpp188
-rw-r--r--kdeui/kurllabel.h78
-rw-r--r--kdeui/kwhatsthismanager.cpp52
-rw-r--r--kdeui/kwhatsthismanager_p.h6
-rw-r--r--kdeui/kwindowinfo.cpp58
-rw-r--r--kdeui/kwindowinfo.h38
-rw-r--r--kdeui/kwindowlistmenu.cpp44
-rw-r--r--kdeui/kwindowlistmenu.h6
-rw-r--r--kdeui/kwizard.cpp12
-rw-r--r--kdeui/kwizard.h8
-rw-r--r--kdeui/kwordwrap.cpp54
-rw-r--r--kdeui/kwordwrap.h40
-rw-r--r--kdeui/kxmlguibuilder.cpp146
-rw-r--r--kdeui/kxmlguibuilder.h24
-rw-r--r--kdeui/kxmlguiclient.cpp270
-rw-r--r--kdeui/kxmlguiclient.h86
-rw-r--r--kdeui/kxmlguifactory.cpp222
-rw-r--r--kdeui/kxmlguifactory.h58
-rw-r--r--kdeui/kxmlguifactory_p.cpp176
-rw-r--r--kdeui/kxmlguifactory_p.h134
-rw-r--r--kdeui/qxembed.cpp206
-rw-r--r--kdeui/qxembed.h32
-rw-r--r--kdeui/tests/itemcontainertest.cpp106
-rw-r--r--kdeui/tests/itemcontainertest.h24
-rw-r--r--kdeui/tests/kaboutdialogtest.cpp8
-rw-r--r--kdeui/tests/kaccelgentest.cpp16
-rw-r--r--kdeui/tests/kactiontest.cpp18
-rw-r--r--kdeui/tests/kalphaicontest.h14
-rw-r--r--kdeui/tests/kblendtest.cpp32
-rw-r--r--kdeui/tests/kblendtest.h12
-rw-r--r--kdeui/tests/kbuttonboxtest.cpp104
-rw-r--r--kdeui/tests/kcolordlgtest.cpp4
-rw-r--r--kdeui/tests/kcolortest.cpp14
-rw-r--r--kdeui/tests/kcolortest.h10
-rw-r--r--kdeui/tests/kcomboboxtest.cpp104
-rw-r--r--kdeui/tests/kcomboboxtest.h16
-rw-r--r--kdeui/tests/kcompletiontest.cpp76
-rw-r--r--kdeui/tests/kcompletiontest.h42
-rw-r--r--kdeui/tests/kdatepicktest.cpp2
-rw-r--r--kdeui/tests/kdatewidgettest.cpp2
-rw-r--r--kdeui/tests/kdesattest.cpp24
-rw-r--r--kdeui/tests/kdesattest.h10
-rw-r--r--kdeui/tests/kdialogbasetest.cpp14
-rw-r--r--kdeui/tests/kdocktest.cpp12
-rw-r--r--kdeui/tests/kdocktest.h2
-rw-r--r--kdeui/tests/kdockwidgetdemo.cpp268
-rw-r--r--kdeui/tests/kdockwidgetdemo.h102
-rw-r--r--kdeui/tests/kdockwidgettest.cpp46
-rw-r--r--kdeui/tests/kdockwidgettest.h18
-rw-r--r--kdeui/tests/kdualcolortest.cpp38
-rw-r--r--kdeui/tests/kdualcolortest.h10
-rw-r--r--kdeui/tests/keditlistboxtest.cpp12
-rw-r--r--kdeui/tests/kedittest.cpp4
-rw-r--r--kdeui/tests/kfontdialogtest.cpp6
-rw-r--r--kdeui/tests/kgradienttest.cpp16
-rw-r--r--kdeui/tests/kgradienttest.h8
-rw-r--r--kdeui/tests/khashtest.cpp20
-rw-r--r--kdeui/tests/khashtest.h8
-rw-r--r--kdeui/tests/kinputdialogtest.cpp12
-rw-r--r--kdeui/tests/kjanuswidgettest.cpp16
-rw-r--r--kdeui/tests/kledtest.cpp24
-rw-r--r--kdeui/tests/kledtest.h18
-rw-r--r--kdeui/tests/klineeditdlgtest.cpp4
-rw-r--r--kdeui/tests/klineedittest.cpp54
-rw-r--r--kdeui/tests/klineedittest.h20
-rw-r--r--kdeui/tests/klistviewtest.cpp2
-rw-r--r--kdeui/tests/kmainwindowrestoretest.cpp4
-rw-r--r--kdeui/tests/kmainwindowtest.cpp8
-rw-r--r--kdeui/tests/kmessageboxtest.cpp46
-rw-r--r--kdeui/tests/knuminputtest.cpp32
-rw-r--r--kdeui/tests/knuminputtest.h4
-rw-r--r--kdeui/tests/kpalettetest.cpp10
-rw-r--r--kdeui/tests/kpanelmenutest.cpp10
-rw-r--r--kdeui/tests/kpanelmenutest.h4
-rw-r--r--kdeui/tests/kpixmapregionselectordialogtest.cpp8
-rw-r--r--kdeui/tests/kpopuptest.cpp18
-rw-r--r--kdeui/tests/kprogresstest.cpp10
-rw-r--r--kdeui/tests/krulertest.cpp140
-rw-r--r--kdeui/tests/krulertest.h34
-rw-r--r--kdeui/tests/kseparatortest.cpp10
-rw-r--r--kdeui/tests/kspelltest.cpp18
-rw-r--r--kdeui/tests/kstatusbartest.cpp34
-rw-r--r--kdeui/tests/kstatusbartest.h10
-rw-r--r--kdeui/tests/ksystemtraytest.cpp2
-rw-r--r--kdeui/tests/ktabctltest.cpp56
-rw-r--r--kdeui/tests/ktabctltest.h12
-rw-r--r--kdeui/tests/ktabwidgettest.cpp164
-rw-r--r--kdeui/tests/ktabwidgettest.h54
-rw-r--r--kdeui/tests/ktextedittest.cpp4
-rw-r--r--kdeui/tests/ktoolbarlabelactiontest.cpp8
-rw-r--r--kdeui/tests/kunbalancedgrdtest.cpp36
-rw-r--r--kdeui/tests/kunbalancedgrdtest.h22
-rw-r--r--kdeui/tests/kwindowtest.cpp122
-rw-r--r--kdeui/tests/kwindowtest.h24
-rw-r--r--kdeui/tests/kwizardtest.cpp22
-rw-r--r--kdeui/tests/kwordwraptest.cpp10
-rw-r--r--kdeui/tests/kxmlguitest.cpp12
-rw-r--r--kdeui/tests/kxmlguitest.h6
-rw-r--r--kdeui/tests/qxembedtest.cpp24
329 files changed, 13487 insertions, 13487 deletions
diff --git a/kdeui/kaboutapplication.cpp b/kdeui/kaboutapplication.cpp
index dff83b19f..8d5828960 100644
--- a/kdeui/kaboutapplication.cpp
+++ b/kdeui/kaboutapplication.cpp
@@ -22,7 +22,7 @@
// I (espen) prefer that header files are included alphabetically
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kaboutapplication.h>
#include <kaboutdialog_private.h>
#include <kaboutdata.h>
@@ -33,17 +33,17 @@
#include <kactivelabel.h>
#include "ktextedit.h"
-KAboutApplication::KAboutApplication( QWidget *parent, const char *name,
+KAboutApplication::KAboutApplication( TQWidget *parent, const char *name,
bool modal )
:KAboutDialog( AbtTabbed|AbtProduct,
- kapp ? kapp->caption() : QString::null,
+ kapp ? kapp->caption() : TQString::null,
Close, Close,
parent, name, modal )
{
buildDialog(KGlobal::instance()->aboutData());
}
-KAboutApplication::KAboutApplication( const KAboutData *aboutData, QWidget *parent,
+KAboutApplication::KAboutApplication( const KAboutData *aboutData, TQWidget *parent,
const char *name, bool modal )
:KAboutDialog( AbtTabbed|AbtProduct, aboutData->programName(), Close, Close,
parent, name, modal )
@@ -60,24 +60,24 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
//
//i18n "??" is displayed as (pseudo-)version when no data is known about the application
- setProduct( kapp ? kapp->caption() : QString::null, i18n("??"), QString::null, QString::null );
+ setProduct( kapp ? kapp->caption() : TQString::null, i18n("??"), TQString::null, TQString::null );
KAboutContainer *appPage = addContainerPage( i18n("&About"));
- QString appPageText =
+ TQString appPageText =
i18n("No information available.\n"
"The supplied KAboutData object does not exist.");
- QLabel *appPageLabel = new QLabel( "\n\n\n\n"+appPageText+"\n\n\n\n", 0 );
+ TQLabel *appPageLabel = new TQLabel( "\n\n\n\n"+appPageText+"\n\n\n\n", 0 );
appPage->addWidget( appPageLabel );
return;
}
setProduct( aboutData->programName(), aboutData->version(),
- QString::null, QString::null );
+ TQString::null, TQString::null );
if (!aboutData->programLogo().isNull())
setProgramLogo( aboutData->programLogo() );
- QString appPageText = aboutData->shortDescription() + "\n";
+ TQString appPageText = aboutData->shortDescription() + "\n";
if (!aboutData->otherText().isEmpty())
appPageText += "\n" + aboutData->otherText()+"\n";
@@ -87,7 +87,7 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
KAboutContainer *appPage = addContainerPage( i18n("&About"));
- QLabel *appPageLabel = new QLabel( appPageText, 0 );
+ TQLabel *appPageLabel = new TQLabel( appPageText, 0 );
appPage->addWidget( appPageLabel );
if (!aboutData->homepage().isEmpty())
@@ -96,20 +96,20 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
url->setText(aboutData->homepage());
url->setURL(aboutData->homepage());
appPage->addWidget( url );
- connect( url, SIGNAL(leftClickedURL(const QString &)),
- this, SLOT(openURLSlot(const QString &)));
+ connect( url, TQT_SIGNAL(leftClickedURL(const TQString &)),
+ this, TQT_SLOT(openURLSlot(const TQString &)));
}
int authorCount = aboutData->authors().count();
if (authorCount)
{
- QString authorPageTitle = authorCount == 1 ?
+ TQString authorPageTitle = authorCount == 1 ?
i18n("A&uthor") : i18n("A&uthors");
KAboutContainer *authorPage = addScrolledContainerPage( authorPageTitle );
if (!aboutData->customAuthorTextEnabled() || !aboutData->customAuthorRichText().isEmpty ())
{
- QString text;
+ TQString text;
KActiveLabel* activeLabel = new KActiveLabel( authorPage );
if (!aboutData->customAuthorTextEnabled())
{
@@ -133,7 +133,7 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
authorPage->addWidget( activeLabel );
}
- QValueList<KAboutPerson>::ConstIterator it;
+ TQValueList<KAboutPerson>::ConstIterator it;
for (it = aboutData->authors().begin();
it != aboutData->authors().end(); ++it)
{
@@ -147,7 +147,7 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
{
KAboutContainer *creditsPage =
addScrolledContainerPage( i18n("&Thanks To") );
- QValueList<KAboutPerson>::ConstIterator it;
+ TQValueList<KAboutPerson>::ConstIterator it;
for (it = aboutData->credits().begin();
it != aboutData->credits().end(); ++it)
{
@@ -156,16 +156,16 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
}
}
- const QValueList<KAboutTranslator> translatorList = aboutData->translators();
+ const TQValueList<KAboutTranslator> translatorList = aboutData->translators();
if(translatorList.count() > 0)
{
- QString text = "<qt>";
+ TQString text = "<qt>";
- QValueList<KAboutTranslator>::ConstIterator it;
+ TQValueList<KAboutTranslator>::ConstIterator it;
for(it = translatorList.begin(); it != translatorList.end(); ++it)
{
- text += QString("<p>%1<br>&nbsp;&nbsp;&nbsp;"
+ text += TQString("<p>%1<br>&nbsp;&nbsp;&nbsp;"
"<a href=\"mailto:%2\">%2</a></p>")
.arg((*it).name())
.arg((*it).emailAddress())
@@ -184,5 +184,5 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData )
//
// Make sure the dialog has a reasonable width
//
- setInitialSize( QSize(400,1) );
+ setInitialSize( TQSize(400,1) );
}
diff --git a/kdeui/kaboutapplication.h b/kdeui/kaboutapplication.h
index b3c0ea632..d8356ce66 100644
--- a/kdeui/kaboutapplication.h
+++ b/kdeui/kaboutapplication.h
@@ -54,10 +54,10 @@ class KDEUI_EXPORT KAboutApplication : public KAboutDialog
* @param name Internal name of the widget. This name is not used in the
* caption.
* @param modal If false, this widget will be modeless and must be
- * made visible using QWidget::show(). Otherwise it will be
- * modal and must be made visible using QWidget::exec().
+ * made visible using TQWidget::show(). Otherwise it will be
+ * modal and must be made visible using TQWidget::exec().
*/
- KAboutApplication( QWidget *parent=0, const char *name=0, bool modal=true );
+ KAboutApplication( TQWidget *parent=0, const char *name=0, bool modal=true );
/**
* Constructor. Mostly does the same stuff as the previous constructor, except
@@ -73,15 +73,15 @@ class KDEUI_EXPORT KAboutApplication : public KAboutDialog
* @param name Internal name of the widget. This name is not used in the
* caption.
* @param modal If false, this widget will be modeless and must be
- * made visible using QWidget::show(). Otherwise it will be
- * modal and must be made visible using QWidget::exec().
+ * made visible using TQWidget::show(). Otherwise it will be
+ * modal and must be made visible using TQWidget::exec().
*/
- KAboutApplication( const KAboutData *aboutData, QWidget *parent=0, const char *name=0, bool modal=true );
+ KAboutApplication( const KAboutData *aboutData, TQWidget *parent=0, const char *name=0, bool modal=true );
/*
FIXME: The two constructors should be replaced with the following after the lib freeze:
- KAboutApplication( const KAboutData *aboutData=0, QWidget *parent=0, const char *name=0, bool modal=true );
+ KAboutApplication( const KAboutData *aboutData=0, TQWidget *parent=0, const char *name=0, bool modal=true );
This will make buildDialog() obsolete as well (Frerich).
*/
diff --git a/kdeui/kaboutdialog.cpp b/kdeui/kaboutdialog.cpp
index 3e534acfd..12e610791 100644
--- a/kdeui/kaboutdialog.cpp
+++ b/kdeui/kaboutdialog.cpp
@@ -20,16 +20,16 @@
*
*/
-#include <qclipboard.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqclipboard.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <ktextedit.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qrect.h>
-#include <qtabwidget.h>
-#include <qtabbar.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqtabwidget.h>
+#include <tqtabbar.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -42,7 +42,7 @@
#include <kdebug.h>
//MOC_SKIP_BEGIN
-template class QPtrList<KAboutContributor>;
+template class TQPtrList<KAboutContributor>;
//MOC_SKIP_END
#define WORKTEXT_IDENTATION 16
@@ -57,35 +57,35 @@ template class QPtrList<KAboutContributor>;
class KAboutTabWidget : public QTabWidget
{
public:
- KAboutTabWidget( QWidget* parent ) : QTabWidget( parent ) {}
- QSize sizeHint() const {
- return QTabWidget::sizeHint().expandedTo( tabBar()->sizeHint() + QSize(4,4) );
+ KAboutTabWidget( TQWidget* parent ) : TQTabWidget( parent ) {}
+ TQSize sizeHint() const {
+ return TQTabWidget::sizeHint().expandedTo( tabBar()->sizeHint() + TQSize(4,4) );
}
};
-KAboutContributor::KAboutContributor( QWidget *_parent, const char *wname,
- const QString &_name,const QString &_email,
- const QString &_url, const QString &_work,
+KAboutContributor::KAboutContributor( TQWidget *_parent, const char *wname,
+ const TQString &_name,const TQString &_email,
+ const TQString &_url, const TQString &_work,
bool showHeader, bool showFrame,
bool showBold )
- : QFrame( _parent, wname ), mShowHeader(showHeader), mShowBold(showBold), d(0)
+ : TQFrame( _parent, wname ), mShowHeader(showHeader), mShowBold(showBold), d(0)
{
if( showFrame )
{
- setFrameStyle(QFrame::Panel | QFrame::Raised);
+ setFrameStyle(TQFrame::Panel | TQFrame::Raised);
}
- mLabel[0] = new QLabel( this );
- mLabel[1] = new QLabel( this );
- mLabel[2] = new QLabel( this );
- mLabel[3] = new QLabel( this );
- mText[0] = new QLabel( this );
+ mLabel[0] = new TQLabel( this );
+ mLabel[1] = new TQLabel( this );
+ mLabel[2] = new TQLabel( this );
+ mLabel[3] = new TQLabel( this );
+ mText[0] = new TQLabel( this );
mText[1] = new KURLLabel( this );
mText[2] = new KURLLabel( this );
- mText[3] = new QLabel( this );
+ mText[3] = new TQLabel( this );
setName( _name, i18n("Author"), false );
setEmail( _email, i18n("Email"), false );
@@ -96,15 +96,15 @@ KAboutContributor::KAboutContributor( QWidget *_parent, const char *wname,
kurl->setFloat(true);
kurl->setUnderline(true);
kurl->setMargin(0);
- connect(kurl, SIGNAL(leftClickedURL(const QString &)),
- SLOT(emailClickedSlot(const QString &)));
+ connect(kurl, TQT_SIGNAL(leftClickedURL(const TQString &)),
+ TQT_SLOT(emailClickedSlot(const TQString &)));
kurl = static_cast<KURLLabel *>(mText[2]);
kurl->setFloat(true);
kurl->setUnderline(true);
kurl->setMargin(0);
- connect(kurl, SIGNAL(leftClickedURL(const QString &)),
- SLOT(urlClickedSlot(const QString &)));
+ connect(kurl, TQT_SIGNAL(leftClickedURL(const TQString &)),
+ TQT_SLOT(urlClickedSlot(const TQString &)));
mLabel[3]->setAlignment( AlignTop );
@@ -113,7 +113,7 @@ KAboutContributor::KAboutContributor( QWidget *_parent, const char *wname,
}
-void KAboutContributor::setName( const QString &_text, const QString &_header,
+void KAboutContributor::setName( const TQString &_text, const TQString &_header,
bool _update )
{
mLabel[0]->setText(_header);
@@ -122,7 +122,7 @@ void KAboutContributor::setName( const QString &_text, const QString &_header,
}
-void KAboutContributor::setEmail( const QString &_text, const QString &_header,
+void KAboutContributor::setEmail( const TQString &_text, const TQString &_header,
bool _update )
{
mLabel[1]->setText(_header);
@@ -133,7 +133,7 @@ void KAboutContributor::setEmail( const QString &_text, const QString &_header,
}
-void KAboutContributor::setURL( const QString &_text, const QString &_header,
+void KAboutContributor::setURL( const TQString &_text, const TQString &_header,
bool _update )
{
mLabel[2]->setText(_header);
@@ -144,7 +144,7 @@ void KAboutContributor::setURL( const QString &_text, const QString &_header,
}
-void KAboutContributor::setWork( const QString &_text, const QString &_header,
+void KAboutContributor::setWork( const TQString &_text, const TQString &_header,
bool _update )
{
mLabel[3]->setText(_header);
@@ -153,25 +153,25 @@ void KAboutContributor::setWork( const QString &_text, const QString &_header,
}
-QString KAboutContributor::getName( void ) const
+TQString KAboutContributor::getName( void ) const
{
return mText[0]->text();
}
-QString KAboutContributor::getEmail( void ) const
+TQString KAboutContributor::getEmail( void ) const
{
return mText[1]->text();
}
-QString KAboutContributor::getURL( void ) const
+TQString KAboutContributor::getURL( void ) const
{
return mText[2]->text();
}
-QString KAboutContributor::getWork( void ) const
+TQString KAboutContributor::getWork( void ) const
{
return mText[3]->text();
}
@@ -189,10 +189,10 @@ void KAboutContributor::updateLayout( void )
if( !mText[3]->text().isEmpty() ) { ++row; }
- QGridLayout *gbox;
+ TQGridLayout *gbox;
if( row == 0 )
{
- gbox = new QGridLayout( this, 1, 1, 0 );
+ gbox = new TQGridLayout( this, 1, 1, 0 );
for( int i=0; i<4; ++i )
{
mLabel[i]->hide();
@@ -203,11 +203,11 @@ void KAboutContributor::updateLayout( void )
{
if( mText[0]->text().isEmpty() && !mShowHeader )
{
- gbox = new QGridLayout( this, row, 1, frameWidth()+1, 2 );
+ gbox = new TQGridLayout( this, row, 1, frameWidth()+1, 2 );
}
else
{
- gbox = new QGridLayout( this, row, 2, frameWidth()+1, 2 );
+ gbox = new TQGridLayout( this, row, 2, frameWidth()+1, 2 );
if( !mShowHeader )
{
gbox->addColSpacing( 0, KDialog::spacingHint()*2 );
@@ -260,11 +260,11 @@ void KAboutContributor::updateLayout( void )
}
-void KAboutContributor::fontChange( const QFont &/*oldFont*/ )
+void KAboutContributor::fontChange( const TQFont &/*oldFont*/ )
{
if( mShowBold )
{
- QFont f( font() );
+ TQFont f( font() );
f.setBold( true );
mText[0]->setFont( f );
}
@@ -272,19 +272,19 @@ void KAboutContributor::fontChange( const QFont &/*oldFont*/ )
}
-QSize KAboutContributor::sizeHint( void ) const
+TQSize KAboutContributor::sizeHint( void ) const
{
return minimumSizeHint();
}
-void KAboutContributor::urlClickedSlot( const QString &u )
+void KAboutContributor::urlClickedSlot( const TQString &u )
{
emit openURL(u);
}
-void KAboutContributor::emailClickedSlot( const QString &e )
+void KAboutContributor::emailClickedSlot( const TQString &e )
{
emit sendEmail( mText[0]->text(), e ) ;
}
@@ -293,13 +293,13 @@ void KAboutContributor::emailClickedSlot( const QString &e )
//
// Internal widget for the KAboutDialog class.
//
-KAboutContainerBase::KAboutContainerBase( int layoutType, QWidget *_parent,
+KAboutContainerBase::KAboutContainerBase( int layoutType, TQWidget *_parent,
char *_name )
- : QWidget( _parent, _name ),
+ : TQWidget( _parent, _name ),
mImageLabel(0), mTitleLabel(0), mIconLabel(0),mVersionLabel(0),
mAuthorLabel(0), mImageFrame(0),mPageTab(0),mPlainSpace(0),d(0)
{
- mTopLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ mTopLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
if( !mTopLayout ) { return; }
if( layoutType & AbtImageOnly )
@@ -313,7 +313,7 @@ KAboutContainerBase::KAboutContainerBase( int layoutType, QWidget *_parent,
if( layoutType & AbtTitle )
{
- mTitleLabel = new QLabel( this, "title" );
+ mTitleLabel = new TQLabel( this, "title" );
mTitleLabel->setAlignment(AlignCenter);
mTopLayout->addWidget( mTitleLabel );
mTopLayout->addSpacing( KDialog::spacingHint() );
@@ -321,21 +321,21 @@ KAboutContainerBase::KAboutContainerBase( int layoutType, QWidget *_parent,
if( layoutType & AbtProduct )
{
- QWidget* const productArea = new QWidget( this, "area" );
- mTopLayout->addWidget( productArea, 0, QApplication::reverseLayout() ? AlignRight : AlignLeft );
+ TQWidget* const productArea = new TQWidget( this, "area" );
+ mTopLayout->addWidget( productArea, 0, TQApplication::reverseLayout() ? AlignRight : AlignLeft );
- QHBoxLayout* const hbox = new QHBoxLayout(productArea,0,KDialog::spacingHint());
+ TQHBoxLayout* const hbox = new TQHBoxLayout(productArea,0,KDialog::spacingHint());
if( !hbox ) { return; }
- mIconLabel = new QLabel( productArea );
+ mIconLabel = new TQLabel( productArea );
hbox->addWidget( mIconLabel, 0, AlignLeft|AlignHCenter );
- QVBoxLayout* const vbox = new QVBoxLayout();
+ TQVBoxLayout* const vbox = new TQVBoxLayout();
if( !vbox ) { return; }
hbox->addLayout( vbox );
- mVersionLabel = new QLabel( productArea, "version" );
- mAuthorLabel = new QLabel( productArea, "author" );
+ mVersionLabel = new TQLabel( productArea, "version" );
+ mAuthorLabel = new TQLabel( productArea, "author" );
vbox->addWidget( mVersionLabel );
vbox->addWidget( mAuthorLabel );
hbox->activate();
@@ -343,24 +343,24 @@ KAboutContainerBase::KAboutContainerBase( int layoutType, QWidget *_parent,
mTopLayout->addSpacing( KDialog::spacingHint() );
}
- QHBoxLayout* const hbox = new QHBoxLayout();
+ TQHBoxLayout* const hbox = new TQHBoxLayout();
if( !hbox ) { return; }
mTopLayout->addLayout( hbox, 10 );
if( layoutType & AbtImageLeft )
{
- QVBoxLayout* vbox = new QVBoxLayout();
+ TQVBoxLayout* vbox = new TQVBoxLayout();
hbox->addLayout(vbox);
vbox->addSpacing(1);
- mImageFrame = new QFrame( this );
+ mImageFrame = new TQFrame( this );
setImageFrame( true );
vbox->addWidget( mImageFrame );
vbox->addSpacing(1);
- vbox = new QVBoxLayout( mImageFrame, 1 );
+ vbox = new TQVBoxLayout( mImageFrame, 1 );
mImageLabel = new KImageTrackLabel( mImageFrame );
- connect( mImageLabel, SIGNAL(mouseTrack( int, const QMouseEvent * )),
- SLOT( slotMouseTrack( int, const QMouseEvent * )) );
+ connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )),
+ TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) );
vbox->addStretch(10);
vbox->addWidget( mImageLabel );
vbox->addStretch(10);
@@ -375,43 +375,43 @@ KAboutContainerBase::KAboutContainerBase( int layoutType, QWidget *_parent,
}
else if( layoutType & AbtImageOnly )
{
- mImageFrame = new QFrame( this );
+ mImageFrame = new TQFrame( this );
setImageFrame( true );
hbox->addWidget( mImageFrame, 10 );
- QGridLayout* const gbox = new QGridLayout(mImageFrame, 3, 3, 1, 0 );
+ TQGridLayout* const gbox = new TQGridLayout(mImageFrame, 3, 3, 1, 0 );
gbox->setRowStretch( 0, 10 );
gbox->setRowStretch( 2, 10 );
gbox->setColStretch( 0, 10 );
gbox->setColStretch( 2, 10 );
mImageLabel = new KImageTrackLabel( mImageFrame );
- connect( mImageLabel, SIGNAL(mouseTrack( int, const QMouseEvent * )),
- SLOT( slotMouseTrack( int, const QMouseEvent * )) );
+ connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )),
+ TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) );
gbox->addWidget( mImageLabel, 1, 1 );
gbox->activate();
}
else
{
- mPlainSpace = new QFrame( this );
+ mPlainSpace = new TQFrame( this );
if( !mPlainSpace ) { return; }
hbox->addWidget( mPlainSpace, 10 );
}
if( layoutType & AbtImageRight )
{
- QVBoxLayout *vbox = new QVBoxLayout();
+ TQVBoxLayout *vbox = new TQVBoxLayout();
hbox->addLayout(vbox);
vbox->addSpacing(1);
- mImageFrame = new QFrame( this );
+ mImageFrame = new TQFrame( this );
setImageFrame( true );
vbox->addWidget( mImageFrame );
vbox->addSpacing(1);
- vbox = new QVBoxLayout( mImageFrame, 1 );
+ vbox = new TQVBoxLayout( mImageFrame, 1 );
mImageLabel = new KImageTrackLabel( mImageFrame );
- connect( mImageLabel, SIGNAL(mouseTrack( int, const QMouseEvent * )),
- SLOT( slotMouseTrack( int, const QMouseEvent * )) );
+ connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )),
+ TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) );
vbox->addStretch(10);
vbox->addWidget( mImageLabel );
vbox->addStretch(10);
@@ -424,30 +424,30 @@ KAboutContainerBase::KAboutContainerBase( int layoutType, QWidget *_parent,
void KAboutContainerBase::show( void )
{
- QWidget::show();
+ TQWidget::show();
}
-QSize KAboutContainerBase::sizeHint( void ) const
+TQSize KAboutContainerBase::sizeHint( void ) const
{
- return minimumSize().expandedTo( QSize( QWidget::sizeHint().width(), 0 ) );
+ return minimumSize().expandedTo( TQSize( TQWidget::sizeHint().width(), 0 ) );
}
-void KAboutContainerBase::fontChange( const QFont &/*oldFont*/ )
+void KAboutContainerBase::fontChange( const TQFont &/*oldFont*/ )
{
if( mTitleLabel )
{
- QFont f( KGlobalSettings::generalFont() );
+ TQFont f( KGlobalSettings::generalFont() );
f.setBold( true );
int fs = f.pointSize();
if (fs == -1)
- fs = QFontInfo(f).pointSize();
+ fs = TQFontInfo(f).pointSize();
f.setPointSize( fs+2 ); // Lets not make it too big
mTitleLabel->setFont(f);
}
if( mVersionLabel )
{
- QFont f( KGlobalSettings::generalFont() );
+ TQFont f( KGlobalSettings::generalFont() );
f.setBold( true );
mVersionLabel->setFont(f);
mAuthorLabel->setFont(f);
@@ -457,54 +457,54 @@ void KAboutContainerBase::fontChange( const QFont &/*oldFont*/ )
update();
}
-QFrame *KAboutContainerBase::addTextPage( const QString &title,
- const QString &text,
+TQFrame *KAboutContainerBase::addTextPage( const TQString &title,
+ const TQString &text,
bool richText, int numLines )
{
- QFrame* const page = addEmptyPage( title );
+ TQFrame* const page = addEmptyPage( title );
if( !page ) { return 0; }
if( numLines <= 0 ) { numLines = 10; }
- QVBoxLayout* const vbox = new QVBoxLayout( page, KDialog::spacingHint() );
+ TQVBoxLayout* const vbox = new TQVBoxLayout( page, KDialog::spacingHint() );
if( richText )
{
KTextBrowser* const browser = new KTextBrowser( page, "browser" );
- browser->setHScrollBarMode( QScrollView::AlwaysOff );
+ browser->setHScrollBarMode( TQScrollView::AlwaysOff );
browser->setText( text );
browser->setMinimumHeight( fontMetrics().lineSpacing()*numLines );
vbox->addWidget(browser);
- connect(browser, SIGNAL(urlClick(const QString &)),
- SLOT(slotUrlClick(const QString &)));
- connect(browser, SIGNAL(mailClick(const QString &,const QString &)),
- SLOT(slotMailClick(const QString &,const QString &)));
+ connect(browser, TQT_SIGNAL(urlClick(const TQString &)),
+ TQT_SLOT(slotUrlClick(const TQString &)));
+ connect(browser, TQT_SIGNAL(mailClick(const TQString &,const TQString &)),
+ TQT_SLOT(slotMailClick(const TQString &,const TQString &)));
}
else
{
KTextEdit* const textEdit = new KTextEdit( page, "text" );
textEdit->setReadOnly( true );
textEdit->setMinimumHeight( fontMetrics().lineSpacing()*numLines );
- textEdit->setWordWrap( QTextEdit::NoWrap );
+ textEdit->setWordWrap( TQTextEdit::NoWrap );
vbox->addWidget( textEdit );
}
return page;
}
-QFrame *KAboutContainerBase::addLicensePage( const QString &title,
- const QString &text, int numLines)
+TQFrame *KAboutContainerBase::addLicensePage( const TQString &title,
+ const TQString &text, int numLines)
{
- QFrame* const page = addEmptyPage( title );
+ TQFrame* const page = addEmptyPage( title );
if( !page ) { return 0; }
if( numLines <= 0 ) { numLines = 10; }
- QVBoxLayout* const vbox = new QVBoxLayout( page, KDialog::spacingHint() );
+ TQVBoxLayout* const vbox = new TQVBoxLayout( page, KDialog::spacingHint() );
KTextEdit* const textEdit = new KTextEdit( page, "license" );
textEdit->setFont( KGlobalSettings::fixedFont() );
textEdit->setReadOnly( true );
- textEdit->setWordWrap( QTextEdit::NoWrap );
+ textEdit->setWordWrap( TQTextEdit::NoWrap );
textEdit->setText( text );
textEdit->setMinimumHeight( fontMetrics().lineSpacing()*numLines );
vbox->addWidget( textEdit );
@@ -512,7 +512,7 @@ QFrame *KAboutContainerBase::addLicensePage( const QString &title,
}
-KAboutContainer *KAboutContainerBase::addContainerPage( const QString &title,
+KAboutContainer *KAboutContainerBase::addContainerPage( const TQString &title,
int childAlignment,
int innerAlignment )
{
@@ -527,17 +527,17 @@ KAboutContainer *KAboutContainerBase::addContainerPage( const QString &title,
innerAlignment );
mPageTab->addTab( container, title );
- connect(container, SIGNAL(urlClick(const QString &)),
- SLOT(slotUrlClick(const QString &)));
- connect(container, SIGNAL(mailClick(const QString &,const QString &)),
- SLOT(slotMailClick(const QString &,const QString &)));
+ connect(container, TQT_SIGNAL(urlClick(const TQString &)),
+ TQT_SLOT(slotUrlClick(const TQString &)));
+ connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)),
+ TQT_SLOT(slotMailClick(const TQString &,const TQString &)));
return container;
}
KAboutContainer *KAboutContainerBase::addScrolledContainerPage(
- const QString &title,
+ const TQString &title,
int childAlignment,
int innerAlignment )
{
@@ -547,9 +547,9 @@ KAboutContainer *KAboutContainerBase::addScrolledContainerPage(
return 0;
}
- QFrame* const page = addEmptyPage( title );
- QVBoxLayout* const vbox = new QVBoxLayout( page, KDialog::spacingHint() );
- QScrollView* const scrollView = new QScrollView( page );
+ TQFrame* const page = addEmptyPage( title );
+ TQVBoxLayout* const vbox = new TQVBoxLayout( page, KDialog::spacingHint() );
+ TQScrollView* const scrollView = new TQScrollView( page );
scrollView->viewport()->setBackgroundMode( PaletteBackground );
vbox->addWidget( scrollView );
@@ -559,16 +559,16 @@ KAboutContainer *KAboutContainerBase::addScrolledContainerPage(
scrollView->addChild( container );
- connect(container, SIGNAL(urlClick(const QString &)),
- SLOT(slotUrlClick(const QString &)));
- connect(container, SIGNAL(mailClick(const QString &,const QString &)),
- SLOT(slotMailClick(const QString &,const QString &)));
+ connect(container, TQT_SIGNAL(urlClick(const TQString &)),
+ TQT_SLOT(slotUrlClick(const TQString &)));
+ connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)),
+ TQT_SLOT(slotMailClick(const TQString &,const TQString &)));
return container;
}
-QFrame *KAboutContainerBase::addEmptyPage( const QString &title )
+TQFrame *KAboutContainerBase::addEmptyPage( const TQString &title )
{
if( !mPageTab )
{
@@ -576,8 +576,8 @@ QFrame *KAboutContainerBase::addEmptyPage( const QString &title )
return 0;
}
- QFrame* const page = new QFrame( mPageTab, title.latin1() );
- page->setFrameStyle( QFrame::NoFrame );
+ TQFrame* const page = new TQFrame( mPageTab, title.latin1() );
+ page->setFrameStyle( TQFrame::NoFrame );
mPageTab->addTab( page, title );
return page;
@@ -591,17 +591,17 @@ KAboutContainer *KAboutContainerBase::addContainer( int childAlignment,
0, KDialog::spacingHint(), childAlignment, innerAlignment );
mTopLayout->addWidget( container, 0, childAlignment );
- connect(container, SIGNAL(urlClick(const QString &)),
- SLOT(slotUrlClick(const QString &)));
- connect(container, SIGNAL(mailClick(const QString &,const QString &)),
- SLOT(slotMailClick(const QString &,const QString &)));
+ connect(container, TQT_SIGNAL(urlClick(const TQString &)),
+ TQT_SLOT(slotUrlClick(const TQString &)));
+ connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)),
+ TQT_SLOT(slotMailClick(const TQString &,const TQString &)));
return container;
}
-void KAboutContainerBase::setTitle( const QString &title )
+void KAboutContainerBase::setTitle( const TQString &title )
{
if( !mTitleLabel )
{
@@ -612,7 +612,7 @@ void KAboutContainerBase::setTitle( const QString &title )
}
-void KAboutContainerBase::setImage( const QString &fileName )
+void KAboutContainerBase::setImage( const TQString &fileName )
{
if( !mImageLabel )
{
@@ -624,25 +624,25 @@ void KAboutContainerBase::setImage( const QString &fileName )
return;
}
- const QPixmap logo( fileName );
+ const TQPixmap logo( fileName );
if( !logo.isNull() )
mImageLabel->setPixmap( logo );
mImageFrame->layout()->activate();
}
-void KAboutContainerBase::setProgramLogo( const QString &fileName )
+void KAboutContainerBase::setProgramLogo( const TQString &fileName )
{
if( fileName.isNull() )
{
return;
}
- const QPixmap logo( fileName );
+ const TQPixmap logo( fileName );
setProgramLogo( logo );
}
-void KAboutContainerBase::setProgramLogo( const QPixmap &pixmap )
+void KAboutContainerBase::setProgramLogo( const TQPixmap &pixmap )
{
if( !mIconLabel )
{
@@ -655,7 +655,7 @@ void KAboutContainerBase::setProgramLogo( const QPixmap &pixmap )
}
}
-void KAboutContainerBase::setImageBackgroundColor( const QColor &color )
+void KAboutContainerBase::setImageBackgroundColor( const TQColor &color )
{
if( mImageFrame )
{
@@ -670,22 +670,22 @@ void KAboutContainerBase::setImageFrame( bool state )
{
if( state )
{
- mImageFrame->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mImageFrame->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
mImageFrame->setLineWidth(1);
}
else
{
- mImageFrame->setFrameStyle( QFrame::NoFrame );
+ mImageFrame->setFrameStyle( TQFrame::NoFrame );
mImageFrame->setLineWidth(0);
}
}
}
-void KAboutContainerBase::setProduct( const QString &appName,
- const QString &version,
- const QString &author,
- const QString &year )
+void KAboutContainerBase::setProduct( const TQString &appName,
+ const TQString &version,
+ const TQString &author,
+ const TQString &year )
{
if( !mIconLabel )
{
@@ -701,10 +701,10 @@ void KAboutContainerBase::setProduct( const QString &appName,
else
kdDebug(291) << "no kapp" << endl;
- const QString msg1 = i18n("%1 %2 (Using KDE %3)").arg(appName).arg(version).
- arg(QString::fromLatin1(KDE_VERSION_STRING));
- const QString msg2 = !year.isEmpty() ? i18n("%1 %2, %3").arg('©').arg(year).
- arg(author) : QString::fromLatin1("");
+ const TQString msg1 = i18n("%1 %2 (Using KDE %3)").arg(appName).arg(version).
+ arg(TQString::fromLatin1(KDE_VERSION_STRING));
+ const TQString msg2 = !year.isEmpty() ? i18n("%1 %2, %3").arg('©').arg(year).
+ arg(author) : TQString::fromLatin1("");
//if (!year.isEmpty())
// msg2 = i18n("%1 %2, %3").arg('©').arg(year).arg(author);
@@ -720,33 +720,33 @@ void KAboutContainerBase::setProduct( const QString &appName,
}
-void KAboutContainerBase::slotMouseTrack( int mode, const QMouseEvent *e )
+void KAboutContainerBase::slotMouseTrack( int mode, const TQMouseEvent *e )
{
emit mouseTrack( mode, e );
}
-void KAboutContainerBase::slotUrlClick( const QString &url )
+void KAboutContainerBase::slotUrlClick( const TQString &url )
{
emit urlClick( url );
}
-void KAboutContainerBase::slotMailClick( const QString &_name,
- const QString &_address )
+void KAboutContainerBase::slotMailClick( const TQString &_name,
+ const TQString &_address )
{
emit mailClick( _name, _address );
}
-KAboutContainer::KAboutContainer( QWidget *_parent, const char *_name,
+KAboutContainer::KAboutContainer( TQWidget *_parent, const char *_name,
int _margin, int _spacing,
int childAlignment, int innerAlignment )
- : QFrame( _parent, _name ), d(0)
+ : TQFrame( _parent, _name ), d(0)
{
mAlignment = innerAlignment;
- QGridLayout* const gbox = new QGridLayout( this, 3, 3, _margin, _spacing );
+ TQGridLayout* const gbox = new TQGridLayout( this, 3, 3, _margin, _spacing );
if( childAlignment & AlignHCenter )
{
gbox->setColStretch( 0, 10 );
@@ -775,38 +775,38 @@ KAboutContainer::KAboutContainer( QWidget *_parent, const char *_name,
gbox->setRowStretch( 2, 10 );
}
- mVbox = new QVBoxLayout( _spacing );
+ mVbox = new TQVBoxLayout( _spacing );
gbox->addLayout( mVbox, 1, 1 );
gbox->activate();
}
-void KAboutContainer::childEvent( QChildEvent *e )
+void KAboutContainer::childEvent( TQChildEvent *e )
{
if( !e->inserted() || !e->child()->isWidgetType() )
{
return;
}
- QWidget* const w = static_cast<QWidget *>(e->child());
+ TQWidget* const w = static_cast<TQWidget *>(e->child());
mVbox->addWidget( w, 0, mAlignment );
- const QSize s( sizeHint() );
+ const TQSize s( sizeHint() );
setMinimumSize( s );
- QObjectList* const l = const_cast<QObjectList *>(children()); // silence please
- QObjectListIterator itr( *l );
- QObject * o;
+ TQObjectList* const l = const_cast<TQObjectList *>(children()); // silence please
+ TQObjectListIterator itr( *l );
+ TQObject * o;
while ( (o = itr.current()) ) {
++itr;
if( o->isWidgetType() )
{
- static_cast<QWidget *>(o)->setMinimumWidth( s.width() );
+ static_cast<TQWidget *>(o)->setMinimumWidth( s.width() );
}
}
}
-QSize KAboutContainer::sizeHint( void ) const
+TQSize KAboutContainer::sizeHint( void ) const
{
//
// The size is computed by adding the sizeHint().height() of all
@@ -814,21 +814,21 @@ QSize KAboutContainer::sizeHint( void ) const
// layout()->margin() and layout()->spacing()
//
- QSize total_size;
+ TQSize total_size;
int numChild = 0;
- QObjectList* const l = const_cast<QObjectList *>(children()); // silence please
+ TQObjectList* const l = const_cast<TQObjectList *>(children()); // silence please
- QObjectListIterator itr( *l );
- QObject * o;
+ TQObjectListIterator itr( *l );
+ TQObject * o;
while ( (o = itr.current()) ) {
++itr;
if( o->isWidgetType() )
{
++numChild;
- QWidget* const w= static_cast<QWidget *>(o);
+ TQWidget* const w= static_cast<TQWidget *>(o);
- QSize s = w->minimumSize();
+ TQSize s = w->minimumSize();
if( s.isEmpty() )
{
s = w->minimumSizeHint();
@@ -837,7 +837,7 @@ QSize KAboutContainer::sizeHint( void ) const
s = w->sizeHint();
if( s.isEmpty() )
{
- s = QSize( 100, 100 ); // Default size
+ s = TQSize( 100, 100 ); // Default size
}
}
}
@@ -854,62 +854,62 @@ QSize KAboutContainer::sizeHint( void ) const
//
total_size.setHeight( total_size.height() + layout()->spacing()*(numChild-1) );
- total_size += QSize( layout()->margin()*2, layout()->margin()*2 + 1 );
+ total_size += TQSize( layout()->margin()*2, layout()->margin()*2 + 1 );
}
else
{
- total_size = QSize( 1, 1 );
+ total_size = TQSize( 1, 1 );
}
return total_size;
}
-QSize KAboutContainer::minimumSizeHint( void ) const
+TQSize KAboutContainer::minimumSizeHint( void ) const
{
return sizeHint();
}
-void KAboutContainer::addWidget( QWidget *widget )
+void KAboutContainer::addWidget( TQWidget *widget )
{
- widget->reparent( this, 0, QPoint(0,0) );
+ widget->reparent( this, 0, TQPoint(0,0) );
}
-void KAboutContainer::addPerson( const QString &_name, const QString &_email,
- const QString &_url, const QString &_task,
+void KAboutContainer::addPerson( const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_task,
bool showHeader, bool showFrame,bool showBold)
{
KAboutContributor* const cont = new KAboutContributor( this, "pers",
_name, _email, _url, _task, showHeader, showFrame, showBold );
- connect( cont, SIGNAL( openURL(const QString&)),
- this, SIGNAL( urlClick(const QString &)));
- connect( cont, SIGNAL( sendEmail(const QString &, const QString &)),
- this, SIGNAL( mailClick(const QString &, const QString &)));
+ connect( cont, TQT_SIGNAL( openURL(const TQString&)),
+ this, TQT_SIGNAL( urlClick(const TQString &)));
+ connect( cont, TQT_SIGNAL( sendEmail(const TQString &, const TQString &)),
+ this, TQT_SIGNAL( mailClick(const TQString &, const TQString &)));
}
-void KAboutContainer::addTitle( const QString &title, int alignment,
+void KAboutContainer::addTitle( const TQString &title, int alignment,
bool showFrame, bool showBold )
{
- QLabel* const label = new QLabel( title, this, "title" );
+ TQLabel* const label = new TQLabel( title, this, "title" );
if( showBold )
{
- QFont labelFont( font() );
+ TQFont labelFont( font() );
labelFont.setBold( true );
label->setFont( labelFont );
}
if( showFrame )
{
- label->setFrameStyle(QFrame::Panel | QFrame::Raised);
+ label->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
}
label->setAlignment( alignment );
}
-void KAboutContainer::addImage( const QString &fileName, int alignment )
+void KAboutContainer::addImage( const TQString &fileName, int alignment )
{
if( fileName.isNull() )
{
@@ -917,10 +917,10 @@ void KAboutContainer::addImage( const QString &fileName, int alignment )
}
KImageTrackLabel* const label = new KImageTrackLabel( this, "image" );
- const QImage logo( fileName );
+ const TQImage logo( fileName );
if( !logo.isNull() )
{
- QPixmap pix;
+ TQPixmap pix;
pix = logo;
label->setPixmap( pix );
}
@@ -942,64 +942,64 @@ class KAboutContributor : public QFrame
// ----------------------------------------------------------------------------
public:
/** The Qt constructor. */
- KAboutContributor(QWidget* parent=0, const char* name=0);
+ KAboutContributor(TQWidget* parent=0, const char* name=0);
/** Set the name (a literal string). */
- void setName(const QString&);
+ void setName(const TQString&);
/** Get the name. */
- QString getName();
+ TQString getName();
/** The email address (dito). */
- void setEmail(const QString&);
+ void setEmail(const TQString&);
/** Get the email address. */
- QString getEmail();
+ TQString getEmail();
/** The URL (dito). */
- void setURL(const QString&);
+ void setURL(const TQString&);
/** Get the URL. */
- QString getURL();
+ TQString getURL();
/** The tasks the person worked on (a literal string). More than one line is
* possible, but very long texts might look ugly. */
- void setWork(const QString&);
+ void setWork(const TQString&);
/** The size hint. Very important here, since KAboutWidget relies on it for
* geometry management. */
- QSize sizeHint();
- QSize minimumSizeHint(void);
+ TQSize sizeHint();
+ TQSize minimumSizeHint(void);
virtual void show( void );
// ----------------------------------------------------------------------------
protected:
// events:
/** The resize event. */
- void resizeEvent(QResizeEvent*);
+ void resizeEvent(TQResizeEvent*);
/** The paint event. */
- void paintEvent(QPaintEvent*);
+ void paintEvent(TQPaintEvent*);
/** The label showing the program version. */
- QLabel *name;
+ TQLabel *name;
/** The clickable URL label showing the email address. It is only visible if
* its text is not empty. */
KURLLabel *email;
/** Another interactive part that displays the homepage URL. */
KURLLabel *url;
/** The description of the contributions of the person. */
- QString work;
+ TQString work;
// ----------------------------------------------------------------------------
protected slots:
/** The homepage URL has been clicked. */
- void urlClickedSlot(const QString&);
+ void urlClickedSlot(const TQString&);
/** The email address has been clicked. */
- void emailClickedSlot(const QString& emailaddress);
+ void emailClickedSlot(const TQString& emailaddress);
// ----------------------------------------------------------------------------
signals:
/** The email address has been clicked. */
- void sendEmail(const QString& name, const QString& email);
+ void sendEmail(const TQString& name, const TQString& email);
/** The URL has been clicked. */
- void openURL(const QString& url);
+ void openURL(const TQString& url);
// ############################################################################
};
-KAboutContributor::KAboutContributor(QWidget* parent, const char* n)
- : QFrame(parent, n),
- name(new QLabel(this)),
+KAboutContributor::KAboutContributor(TQWidget* parent, const char* n)
+ : TQFrame(parent, n),
+ name(new TQLabel(this)),
email(new KURLLabel(this)),
url(new KURLLabel(this))
{
@@ -1009,17 +1009,17 @@ KAboutContributor::KAboutContributor(QWidget* parent, const char* n)
kdDebug() << "KAboutContributor::KAboutContributor: Out of memory." << endl;
qApp->quit();
}
- setFrameStyle(QFrame::Panel | QFrame::Raised);
+ setFrameStyle(TQFrame::Panel | TQFrame::Raised);
// -----
- connect(email, SIGNAL(leftClickedURL(const QString&)),
- SLOT(emailClickedSlot(const QString&)));
- connect(url, SIGNAL(leftClickedURL(const QString&)),
- SLOT(urlClickedSlot(const QString&)));
+ connect(email, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ TQT_SLOT(emailClickedSlot(const TQString&)));
+ connect(url, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ TQT_SLOT(urlClickedSlot(const TQString&)));
// ############################################################
}
void
-KAboutContributor::setName(const QString& n)
+KAboutContributor::setName(const TQString& n)
{
// ############################################################
name->setText(n);
@@ -1034,7 +1034,7 @@ KAboutContributor::getName()
// ###########################################################
}
void
-KAboutContributor::setURL(const QString& u)
+KAboutContributor::setURL(const TQString& u)
{
// ###########################################################
url->setText(u);
@@ -1050,7 +1050,7 @@ KAboutContributor::getURL()
}
void
-KAboutContributor::setEmail(const QString& e)
+KAboutContributor::setEmail(const TQString& e)
{
// ###########################################################
email->setText(e);
@@ -1066,7 +1066,7 @@ KAboutContributor::getEmail()
}
void
-KAboutContributor::emailClickedSlot(const QString& e)
+KAboutContributor::emailClickedSlot(const TQString& e)
{
// ###########################################################
kdDebug() << "KAboutContributor::emailClickedSlot: called." << endl;
@@ -1075,7 +1075,7 @@ KAboutContributor::emailClickedSlot(const QString& e)
}
void
-KAboutContributor::urlClickedSlot(const QString& u)
+KAboutContributor::urlClickedSlot(const TQString& u)
{
// ###########################################################
kdDebug() << "KAboutContributor::urlClickedSlot: called." << endl;
@@ -1084,7 +1084,7 @@ KAboutContributor::urlClickedSlot(const QString& u)
}
void
-KAboutContributor::setWork(const QString& w)
+KAboutContributor::setWork(const TQString& w)
{
// ###########################################################
work=w;
@@ -1102,7 +1102,7 @@ KAboutContributor::sizeHint()
const int FrameWidth=frameWidth();
const int WorkTextWidth=200;
int maxx, maxy;
- QRect rect;
+ TQRect rect;
// ----- first calculate name and email width:
maxx=name->sizeHint().width();
maxx=QMAX(maxx, email->sizeHint().width()+WORKTEXT_IDENTATION);
@@ -1124,11 +1124,11 @@ KAboutContributor::sizeHint()
// -----
maxx+=2*FrameWidth;
maxy+=2*FrameWidth;
- return QSize(maxx, maxy);
+ return TQSize(maxx, maxy);
// ############################################################################
}
-QSize KAboutContributor::minimumSizeHint(void)
+TQSize KAboutContributor::minimumSizeHint(void)
{
return( sizeHint() );
}
@@ -1136,14 +1136,14 @@ QSize KAboutContributor::minimumSizeHint(void)
void KAboutContributor::show( void )
{
- QFrame::show();
+ TQFrame::show();
setMinimumSize( sizeHint() );
}
void
-KAboutContributor::resizeEvent(QResizeEvent*)
+KAboutContributor::resizeEvent(TQResizeEvent*)
{ // the widgets are simply aligned from top to bottom, since the parent is
// expected to respect the size hint
// ############################################################################
@@ -1166,7 +1166,7 @@ KAboutContributor::resizeEvent(QResizeEvent*)
void
-KAboutContributor::paintEvent(QPaintEvent* e)
+KAboutContributor::paintEvent(TQPaintEvent* e)
{ // the widgets are simply aligned from top to bottom, since the parent is
// expected to respect the size hint (the widget is only used locally by now)
// ############################################################################
@@ -1174,9 +1174,9 @@ KAboutContributor::paintEvent(QPaintEvent* e)
int h=height()-cy-frameWidth();
int w=width()-WORKTEXT_IDENTATION-2*frameWidth();
// -----
- QFrame::paintEvent(e);
+ TQFrame::paintEvent(e);
if(work.isEmpty()) return;
- QPainter paint(this); // construct painter only if there is something to draw
+ TQPainter paint(this); // construct painter only if there is something to draw
// -----
paint.drawText(WORKTEXT_IDENTATION, cy, w, h, AlignLeft | WordBreak, work);
// ############################################################################
@@ -1186,7 +1186,7 @@ KAboutContributor::paintEvent(QPaintEvent* e)
#if 0
-QSize KAboutContributor::sizeHint( void )
+TQSize KAboutContributor::sizeHint( void )
{
int s = KDialog::spacingHint();
int h = fontMetrics().lineSpacing()*3 + 2*s;
@@ -1199,7 +1199,7 @@ QSize KAboutContributor::sizeHint( void )
if( work.isEmpty() == false )
{
const int WorkTextWidth=200;
- QRect r = fontMetrics().boundingRect
+ TQRect r = fontMetrics().boundingRect
(0, 0, WorkTextWidth, 32000, WordBreak | AlignLeft, work);
if( w < r.width() )
{
@@ -1207,7 +1207,7 @@ QSize KAboutContributor::sizeHint( void )
}
h += QMAX( fontMetrics().lineSpacing(), r.height() ) + s;
}
- return( QSize( w + 2*m, h + 2*m ) );
+ return( TQSize( w + 2*m, h + 2*m ) );
/*
@@ -1222,7 +1222,7 @@ QSize KAboutContributor::sizeHint( void )
{
const int WorkTextWidth=200;
- QRect r = fontMetrics().boundingRect
+ TQRect r = fontMetrics().boundingRect
(0, 0, WorkTextWidth, 32000, WordBreak | AlignLeft, work);
if( w < r.width() )
{
@@ -1230,7 +1230,7 @@ QSize KAboutContributor::sizeHint( void )
}
h += r.height() + s;
}
- return( QSize( w + 2*m, h + 2*m ) );
+ return( TQSize( w + 2*m, h + 2*m ) );
*/
}
@@ -1239,7 +1239,7 @@ QSize KAboutContributor::sizeHint( void )
// The widgets are simply aligned from top to bottom, since the parent is
// expected to respect the size hint
//
-void KAboutContributor::resizeEvent(QResizeEvent*)
+void KAboutContributor::resizeEvent(TQResizeEvent*)
{
int x = frameWidth();
int s = KDialog::spacingHint();
@@ -1273,9 +1273,9 @@ void KAboutContributor::resizeEvent(QResizeEvent*)
-void KAboutContributor::paintEvent( QPaintEvent *e )
+void KAboutContributor::paintEvent( TQPaintEvent *e )
{
- QFrame::paintEvent(e);
+ TQFrame::paintEvent(e);
if(work.isEmpty()) return;
int x = frameWidth() + KDialog::spacingHint();
@@ -1283,7 +1283,7 @@ void KAboutContributor::paintEvent( QPaintEvent *e )
int y = height() - frameWidth() - fontMetrics().lineSpacing();
int w = width() - frameWidth()*2 - KDialog::spacingHint();
- QPainter paint( this );
+ TQPainter paint( this );
paint.drawText( x, y, w, h, AlignLeft | WordBreak, work );
/*
@@ -1294,7 +1294,7 @@ void KAboutContributor::paintEvent( QPaintEvent *e )
int y = frameWidth()+KDialog::spacingHint()+(name->sizeHint().height()+s)*3;
int h = height()-y-frameWidth();
- QPainter paint( this );
+ TQPainter paint( this );
paint.drawText( x, y, w, h, AlignLeft | WordBreak, work );
*/
}
@@ -1305,11 +1305,11 @@ void KAboutContributor::paintEvent( QPaintEvent *e )
-KAboutWidget::KAboutWidget(QWidget *_parent, const char *_name)
- : QWidget(_parent, _name),
- version(new QLabel(this)),
- cont(new QLabel(this)),
- logo(new QLabel(this)),
+KAboutWidget::KAboutWidget(TQWidget *_parent, const char *_name)
+ : TQWidget(_parent, _name),
+ version(new TQLabel(this)),
+ cont(new TQLabel(this)),
+ logo(new TQLabel(this)),
author(new KAboutContributor(this)),
maintainer(new KAboutContributor(this)),
showMaintainer(false),
@@ -1325,17 +1325,17 @@ KAboutWidget::KAboutWidget(QWidget *_parent, const char *_name)
// -----
cont->setText(i18n("Other Contributors:"));
logo->setText(i18n("(No logo available)"));
- logo->setFrameStyle(QFrame::Panel | QFrame::Raised);
+ logo->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
version->setAlignment(AlignCenter);
// -----
- connect(author, SIGNAL(sendEmail(const QString&, const QString&)),
- SLOT(sendEmailSlot(const QString&, const QString&)));
- connect(author, SIGNAL(openURL(const QString&)),
- SLOT(openURLSlot(const QString&)));
- connect(maintainer, SIGNAL(sendEmail(const QString&, const QString&)),
- SLOT(sendEmailSlot(const QString&, const QString&)));
- connect(maintainer, SIGNAL(openURL(const QString&)),
- SLOT(openURLSlot(const QString&)));
+ connect(author, TQT_SIGNAL(sendEmail(const TQString&, const TQString&)),
+ TQT_SLOT(sendEmailSlot(const TQString&, const TQString&)));
+ connect(author, TQT_SIGNAL(openURL(const TQString&)),
+ TQT_SLOT(openURLSlot(const TQString&)));
+ connect(maintainer, TQT_SIGNAL(sendEmail(const TQString&, const TQString&)),
+ TQT_SLOT(sendEmailSlot(const TQString&, const TQString&)));
+ connect(maintainer, TQT_SIGNAL(openURL(const TQString&)),
+ TQT_SLOT(openURLSlot(const TQString&)));
// #################################################################
}
@@ -1346,7 +1346,7 @@ KAboutWidget::adjust()
// #################################################################
int cx, cy, tempx;
int maintWidth, maintHeight;
- QSize total_size;
+ TQSize total_size;
// -----
if(showMaintainer)
{
@@ -1371,7 +1371,7 @@ KAboutWidget::adjust()
{
cx=QMAX(cx, cont->sizeHint().width());
cy+=cont->sizeHint().height()+Grid;
- QPtrListIterator<KAboutContributor> _pos(contributors);
+ TQPtrListIterator<KAboutContributor> _pos(contributors);
KAboutContributor* currEntry;
while ( (currEntry = _pos.current()) )
{
@@ -1385,26 +1385,26 @@ KAboutWidget::adjust()
}
void
-KAboutWidget::setLogo(const QPixmap& i)
+KAboutWidget::setLogo(const TQPixmap& i)
{
// ############################################################################
logo->setPixmap(i);
// ############################################################################
}
-void KAboutWidget::sendEmailSlot(const QString &_name, const QString &_email)
+void KAboutWidget::sendEmailSlot(const TQString &_name, const TQString &_email)
{
emit(sendEmail(_name, _email));
}
-void KAboutWidget::openURLSlot(const QString& _url)
+void KAboutWidget::openURLSlot(const TQString& _url)
{
emit(openURL(_url));
}
void
-KAboutWidget::setAuthor(const QString &_name, const QString &_email,
- const QString &_url, const QString &_w)
+KAboutWidget::setAuthor(const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_w)
{
// ############################################################################
author->setName(_name);
@@ -1415,8 +1415,8 @@ KAboutWidget::setAuthor(const QString &_name, const QString &_email,
}
void
-KAboutWidget::setMaintainer(const QString &_name, const QString &_email,
- const QString &_url, const QString &_w)
+KAboutWidget::setMaintainer(const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_w)
{
// ############################################################################
maintainer->setName(_name);
@@ -1428,8 +1428,8 @@ KAboutWidget::setMaintainer(const QString &_name, const QString &_email,
}
void
-KAboutWidget::addContributor(const QString &_name, const QString &_email,
- const QString &_url, const QString &_w)
+KAboutWidget::addContributor(const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_w)
{
// ############################################################################
KAboutContributor* const c=new KAboutContributor(this);
@@ -1439,14 +1439,14 @@ KAboutWidget::addContributor(const QString &_name, const QString &_email,
c->setURL(_url);
c->setWork(_w);
contributors.append(c);
- connect(c, SIGNAL(sendEmail(const QString&, const QString&)),
- SLOT(sendEmailSlot(const QString&, const QString&)));
- connect(c, SIGNAL(openURL(const QString&)), SLOT(openURLSlot(const QString&)));
+ connect(c, TQT_SIGNAL(sendEmail(const TQString&, const TQString&)),
+ TQT_SLOT(sendEmailSlot(const TQString&, const TQString&)));
+ connect(c, TQT_SIGNAL(openURL(const TQString&)), TQT_SLOT(openURLSlot(const TQString&)));
// ############################################################################
}
void
-KAboutWidget::setVersion(const QString &_name)
+KAboutWidget::setVersion(const TQString &_name)
{
// ############################################################################
version->setText(_name);
@@ -1454,7 +1454,7 @@ KAboutWidget::setVersion(const QString &_name)
}
void
-KAboutWidget::resizeEvent(QResizeEvent*)
+KAboutWidget::resizeEvent(TQResizeEvent*)
{
// ############################################################################
int _x=0, _y, cx, tempx, tempy;
@@ -1484,7 +1484,7 @@ KAboutWidget::resizeEvent(QResizeEvent*)
} else {
cont->hide();
}
- QPtrListIterator<KAboutContributor> _pos(contributors);
+ TQPtrListIterator<KAboutContributor> _pos(contributors);
KAboutContributor* currEntry;
while( (currEntry = _pos.current()) )
{
@@ -1503,8 +1503,8 @@ KAboutWidget::resizeEvent(QResizeEvent*)
// ############################################################################
}
-KAboutDialog::KAboutDialog(QWidget *_parent, const char *_name, bool modal)
- : KDialogBase(_parent, _name, modal, QString::null, Ok, Ok ),
+KAboutDialog::KAboutDialog(TQWidget *_parent, const char *_name, bool modal)
+ : KDialogBase(_parent, _name, modal, TQString::null, Ok, Ok ),
about(new KAboutWidget(this)), mContainerBase(0), d(0)
{
// #################################################################
@@ -1515,20 +1515,20 @@ KAboutDialog::KAboutDialog(QWidget *_parent, const char *_name, bool modal)
qApp->quit();
}
setMainWidget(about);
- connect(about, SIGNAL(sendEmail(const QString&, const QString&)),
- SLOT(sendEmailSlot(const QString&, const QString&)));
- connect(about, SIGNAL(openURL(const QString&)),
- SLOT(openURLSlot(const QString&)));
+ connect(about, TQT_SIGNAL(sendEmail(const TQString&, const TQString&)),
+ TQT_SLOT(sendEmailSlot(const TQString&, const TQString&)));
+ connect(about, TQT_SIGNAL(openURL(const TQString&)),
+ TQT_SLOT(openURLSlot(const TQString&)));
// #################################################################
}
-KAboutDialog::KAboutDialog( int layoutType, const QString &_caption,
+KAboutDialog::KAboutDialog( int layoutType, const TQString &_caption,
int buttonMask, ButtonCode defaultButton,
- QWidget *_parent, const char *_name, bool modal,
- bool separator, const QString &user1,
- const QString &user2, const QString &user3 )
- :KDialogBase( _parent, _name, modal, QString::null, buttonMask, defaultButton,
+ TQWidget *_parent, const char *_name, bool modal,
+ bool separator, const TQString &user1,
+ const TQString &user2, const TQString &user3 )
+ :KDialogBase( _parent, _name, modal, TQString::null, buttonMask, defaultButton,
separator, user1, user2, user3 ),
about(0), d(0)
{
@@ -1537,12 +1537,12 @@ KAboutDialog::KAboutDialog( int layoutType, const QString &_caption,
mContainerBase = new KAboutContainerBase( layoutType, this );
setMainWidget(mContainerBase);
- connect( mContainerBase, SIGNAL(urlClick(const QString &)),
- this, SLOT(openURLSlot(const QString &)));
- connect( mContainerBase, SIGNAL(mailClick(const QString &,const QString &)),
- this, SLOT(sendEmailSlot(const QString &,const QString &)));
- connect( mContainerBase, SIGNAL(mouseTrack(int, const QMouseEvent *)),
- this, SLOT(mouseTrackSlot(int, const QMouseEvent *)));
+ connect( mContainerBase, TQT_SIGNAL(urlClick(const TQString &)),
+ this, TQT_SLOT(openURLSlot(const TQString &)));
+ connect( mContainerBase, TQT_SIGNAL(mailClick(const TQString &,const TQString &)),
+ this, TQT_SLOT(sendEmailSlot(const TQString &,const TQString &)));
+ connect( mContainerBase, TQT_SIGNAL(mouseTrack(int, const TQMouseEvent *)),
+ this, TQT_SLOT(mouseTrackSlot(int, const TQMouseEvent *)));
}
@@ -1550,15 +1550,15 @@ void KAboutDialog::show( void )
{
adjust();
if( mContainerBase ) { mContainerBase->show(); }
- QDialog::show();
+ TQDialog::show();
}
-void KAboutDialog::show( QWidget * /*centerParent*/ )
+void KAboutDialog::show( TQWidget * /*centerParent*/ )
{
adjust();
if( mContainerBase ) { mContainerBase->show(); }
- QDialog::show();
+ TQDialog::show();
}
@@ -1571,15 +1571,15 @@ void KAboutDialog::adjust()
}
-void KAboutDialog::setLogo(const QPixmap& i)
+void KAboutDialog::setLogo(const TQPixmap& i)
{
if( !about ) { return; }
about->setLogo(i);
}
-void KAboutDialog::setMaintainer(const QString &_name, const QString &_email,
- const QString &_url, const QString &_w)
+void KAboutDialog::setMaintainer(const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_w)
{
// #################################################################
if( !about ) { return; }
@@ -1587,8 +1587,8 @@ void KAboutDialog::setMaintainer(const QString &_name, const QString &_email,
// #################################################################
}
-void KAboutDialog::setAuthor(const QString &_name, const QString &_email,
- const QString &_url, const QString &_work)
+void KAboutDialog::setAuthor(const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_work)
{
// #################################################################
if( !about ) { return; }
@@ -1596,8 +1596,8 @@ void KAboutDialog::setAuthor(const QString &_name, const QString &_email,
// #################################################################
}
-void KAboutDialog::addContributor(const QString &_name, const QString &_email,
- const QString &_url, const QString &_w)
+void KAboutDialog::addContributor(const TQString &_name, const TQString &_email,
+ const TQString &_url, const TQString &_w)
{
// #################################################################
if( !about ) { return; }
@@ -1605,7 +1605,7 @@ void KAboutDialog::addContributor(const QString &_name, const QString &_email,
// #################################################################
}
-void KAboutDialog::setVersion(const QString &_name)
+void KAboutDialog::setVersion(const TQString &_name)
{
// #################################################################
if( !about ) { return; }
@@ -1613,10 +1613,10 @@ void KAboutDialog::setVersion(const QString &_name)
// #################################################################
}
-void KAboutDialog::sendEmailSlot(const QString& /*name*/, const QString& email)
+void KAboutDialog::sendEmailSlot(const TQString& /*name*/, const TQString& email)
{
if ( kapp )
- kapp->invokeMailer( email, QString::null );
+ kapp->invokeMailer( email, TQString::null );
/*
kdDebug() << "KAboutDialog::sendEmailSlot: request to send an email to "
<< name << ", " << email << endl;
@@ -1624,7 +1624,7 @@ void KAboutDialog::sendEmailSlot(const QString& /*name*/, const QString& email)
*/
}
-void KAboutDialog::openURLSlot(const QString& url)
+void KAboutDialog::openURLSlot(const TQString& url)
{
if ( kapp )
kapp->invokeBrowser( url );
@@ -1633,20 +1633,20 @@ void KAboutDialog::openURLSlot(const QString& url)
}
-void KAboutDialog::mouseTrackSlot( int /*mode*/, const QMouseEvent * /*e*/ )
+void KAboutDialog::mouseTrackSlot( int /*mode*/, const TQMouseEvent * /*e*/ )
{
// By default we do nothing. This method must be reimplemented.
}
-QFrame *KAboutDialog::addTextPage( const QString &title, const QString &text,
+TQFrame *KAboutDialog::addTextPage( const TQString &title, const TQString &text,
bool richText, int numLines )
{
if( !mContainerBase ) { return 0; }
return mContainerBase->addTextPage( title, text, richText, numLines );
}
-QFrame *KAboutDialog::addLicensePage( const QString &title, const QString &text,
+TQFrame *KAboutDialog::addLicensePage( const TQString &title, const TQString &text,
int numLines )
{
if( !mContainerBase ) { return 0; }
@@ -1654,7 +1654,7 @@ QFrame *KAboutDialog::addLicensePage( const QString &title, const QString &text,
}
-KAboutContainer *KAboutDialog::addContainerPage( const QString &title,
+KAboutContainer *KAboutDialog::addContainerPage( const TQString &title,
int childAlignment, int innerAlignment )
{
if( !mContainerBase ) { return 0; }
@@ -1663,7 +1663,7 @@ KAboutContainer *KAboutDialog::addContainerPage( const QString &title,
}
-KAboutContainer *KAboutDialog::addScrolledContainerPage( const QString &title,
+KAboutContainer *KAboutDialog::addScrolledContainerPage( const TQString &title,
int childAlignment, int innerAlignment )
{
if( !mContainerBase ) { return 0; }
@@ -1673,7 +1673,7 @@ KAboutContainer *KAboutDialog::addScrolledContainerPage( const QString &title,
-QFrame *KAboutDialog::addPage( const QString &title )
+TQFrame *KAboutDialog::addPage( const TQString &title )
{
if( !mContainerBase ) { return 0; }
return mContainerBase->addEmptyPage( title );
@@ -1688,39 +1688,39 @@ KAboutContainer *KAboutDialog::addContainer( int childAlignment,
}
-void KAboutDialog::setTitle( const QString &title )
+void KAboutDialog::setTitle( const TQString &title )
{
if( !mContainerBase ) { return; }
mContainerBase->setTitle( title );
}
-void KAboutDialog::setImage( const QString &fileName )
+void KAboutDialog::setImage( const TQString &fileName )
{
if( !mContainerBase ) { return; }
mContainerBase->setImage( fileName );
}
// KDE4: remove
-void KAboutDialog::setIcon( const QString &fileName )
+void KAboutDialog::setIcon( const TQString &fileName )
{
if( !mContainerBase ) { return; }
mContainerBase->setProgramLogo( fileName );
}
-void KAboutDialog::setProgramLogo( const QString &fileName )
+void KAboutDialog::setProgramLogo( const TQString &fileName )
{
if( !mContainerBase ) { return; }
mContainerBase->setProgramLogo( fileName );
}
-void KAboutDialog::setProgramLogo( const QPixmap &pixmap )
+void KAboutDialog::setProgramLogo( const TQPixmap &pixmap )
{
if( !mContainerBase ) { return; }
mContainerBase->setProgramLogo( pixmap );
}
-void KAboutDialog::setImageBackgroundColor( const QColor &color )
+void KAboutDialog::setImageBackgroundColor( const TQColor &color )
{
if( !mContainerBase ) { return; }
mContainerBase->setImageBackgroundColor( color );
@@ -1734,8 +1734,8 @@ void KAboutDialog::setImageFrame( bool state )
}
-void KAboutDialog::setProduct( const QString &appName, const QString &version,
- const QString &author, const QString &year )
+void KAboutDialog::setProduct( const TQString &appName, const TQString &version,
+ const TQString &author, const TQString &year )
{
if( !mContainerBase ) { return; }
mContainerBase->setProduct( appName, version, author, year );
@@ -1743,11 +1743,11 @@ void KAboutDialog::setProduct( const QString &appName, const QString &version,
-void KAboutDialog::imageURL( QWidget *_parent, const QString &_caption,
- const QString &_path, const QColor &_imageColor,
- const QString &_url )
+void KAboutDialog::imageURL( TQWidget *_parent, const TQString &_caption,
+ const TQString &_path, const TQColor &_imageColor,
+ const TQString &_url )
{
- KAboutDialog a( AbtImageOnly, QString::null, Close, Close, _parent, "image", true );
+ KAboutDialog a( AbtImageOnly, TQString::null, Close, Close, _parent, "image", true );
a.setPlainCaption( _caption );
a.setImage( _path );
a.setImageBackgroundColor( _imageColor );
@@ -1755,7 +1755,7 @@ void KAboutDialog::imageURL( QWidget *_parent, const QString &_caption,
KAboutContainer* const c = a.addContainer( AlignCenter, AlignCenter );
if( c )
{
- c->addPerson( QString::null, QString::null, _url, QString::null );
+ c->addPerson( TQString::null, TQString::null, _url, TQString::null );
}
a.exec();
}
@@ -1766,28 +1766,28 @@ void KAboutDialog::imageURL( QWidget *_parent, const QString &_caption,
//
// A class that can can monitor mouse movements on the image
//
-KImageTrackLabel::KImageTrackLabel( QWidget *_parent, const char *_name, WFlags f )
- : QLabel( _parent, _name, f )
+KImageTrackLabel::KImageTrackLabel( TQWidget *_parent, const char *_name, WFlags f )
+ : TQLabel( _parent, _name, f )
{
setText( i18n("Image missing"));
}
-void KImageTrackLabel::mousePressEvent( QMouseEvent *e )
+void KImageTrackLabel::mousePressEvent( TQMouseEvent *e )
{
emit mouseTrack( MousePress, e );
}
-void KImageTrackLabel::mouseReleaseEvent( QMouseEvent *e )
+void KImageTrackLabel::mouseReleaseEvent( TQMouseEvent *e )
{
emit mouseTrack( MouseRelease, e );
}
-void KImageTrackLabel::mouseDoubleClickEvent( QMouseEvent *e )
+void KImageTrackLabel::mouseDoubleClickEvent( TQMouseEvent *e )
{
emit mouseTrack( MouseDoubleClick, e );
}
-void KImageTrackLabel::mouseMoveEvent ( QMouseEvent *e )
+void KImageTrackLabel::mouseMoveEvent ( TQMouseEvent *e )
{
emit mouseTrack( MouseDoubleClick, e );
}
diff --git a/kdeui/kaboutdialog.h b/kdeui/kaboutdialog.h
index 25afc0a3b..21f648eb0 100644
--- a/kdeui/kaboutdialog.h
+++ b/kdeui/kaboutdialog.h
@@ -31,7 +31,7 @@
#define _KABOUTDIALOG_H_
#include <kdialogbase.h>
-#include <qstring.h>
+#include <tqstring.h>
class QFrame;
class QLabel;
@@ -52,33 +52,33 @@ class KDEUI_EXPORT KAboutContainer : public QFrame
Q_OBJECT
public:
- KAboutContainer( QWidget *parent=0, const char *name=0,
+ KAboutContainer( TQWidget *parent=0, const char *name=0,
int margin=0, int spacing=0,
int childAlignment = AlignCenter,
int innerAlignment = AlignCenter );
- void addWidget( QWidget *widget );
- void addPerson( const QString &name, const QString &email,
- const QString &url, const QString &task,
+ void addWidget( TQWidget *widget );
+ void addPerson( const TQString &name, const TQString &email,
+ const TQString &url, const TQString &task,
bool showHeader = false, bool showframe = false,
bool showBold = false );
- void addTitle( const QString &title, int alignment=AlignLeft,
+ void addTitle( const TQString &title, int alignment=AlignLeft,
bool showframe = false, bool showBold = false );
- void addImage( const QString &fileName, int alignment=AlignLeft );
+ void addImage( const TQString &fileName, int alignment=AlignLeft );
- virtual QSize sizeHint( void ) const;
- virtual QSize minimumSizeHint( void ) const;
+ virtual TQSize sizeHint( void ) const;
+ virtual TQSize minimumSizeHint( void ) const;
protected:
- virtual void childEvent( QChildEvent *e );
+ virtual void childEvent( TQChildEvent *e );
signals:
- void urlClick( const QString &url );
- void mailClick( const QString &name, const QString &address );
+ void urlClick( const TQString &url );
+ void mailClick( const TQString &name, const TQString &address );
private:
- QVBoxLayout *mVbox;
+ TQVBoxLayout *mVbox;
int mAlignment;
KAboutContainerPrivate* const d;
};
@@ -94,52 +94,52 @@ class KDEUI_EXPORT KAboutContributor : public QFrame
Q_OBJECT
public:
- KAboutContributor( QWidget *parent=0, const char *name=0,
- const QString &username=QString::null,
- const QString &email=QString::null,
- const QString &url=QString::null,
- const QString &work=QString::null,
+ KAboutContributor( TQWidget *parent=0, const char *name=0,
+ const TQString &username=TQString::null,
+ const TQString &email=TQString::null,
+ const TQString &url=TQString::null,
+ const TQString &work=TQString::null,
bool showHeader=false, bool showFrame=true,
bool showBold=false );
- void setName( const QString &text, const QString &header=QString::null,
+ void setName( const TQString &text, const TQString &header=TQString::null,
bool update = true );
- void setEmail( const QString &text, const QString &header=QString::null,
+ void setEmail( const TQString &text, const TQString &header=TQString::null,
bool update = true );
- void setURL( const QString &text, const QString &header=QString::null,
+ void setURL( const TQString &text, const TQString &header=TQString::null,
bool update = true );
- void setWork( const QString &text, const QString &header=QString::null,
+ void setWork( const TQString &text, const TQString &header=TQString::null,
bool update = true );
- QString getName( void ) const;
- QString getEmail( void ) const;
- QString getURL( void ) const;
- QString getWork( void ) const;
+ TQString getName( void ) const;
+ TQString getEmail( void ) const;
+ TQString getURL( void ) const;
+ TQString getWork( void ) const;
- virtual QSize sizeHint( void ) const;
+ virtual TQSize sizeHint( void ) const;
protected:
- virtual void fontChange( const QFont &oldFont );
+ virtual void fontChange( const TQFont &oldFont );
protected slots:
- void urlClickedSlot( const QString& );
- void emailClickedSlot( const QString& emailaddress );
+ void urlClickedSlot( const TQString& );
+ void emailClickedSlot( const TQString& emailaddress );
private:
void updateLayout( void );
signals:
- void sendEmail(const QString& name, const QString& email);
- void openURL(const QString& url);
+ void sendEmail(const TQString& name, const TQString& email);
+ void openURL(const TQString& url);
private:
- QLabel *mLabel[4];
- QLabel *mText[4];
+ TQLabel *mLabel[4];
+ TQLabel *mText[4];
bool mShowHeader;
bool mShowBold;
KAboutContributorPrivate* const d;
- virtual void setName(const char *_name) { QFrame::setName(_name); }
+ virtual void setName(const char *_name) { TQFrame::setName(_name); }
};
/**
@@ -156,7 +156,7 @@ public:
/**
* The Qt constructor.
*/
- KAboutWidget(QWidget* parent=0, const char* name=0 );
+ KAboutWidget(TQWidget* parent=0, const char* name=0 );
/**
* Adjust the minimum size (after setting the properties of the image and
@@ -167,65 +167,65 @@ public:
/**
* Sets the image as the application logo.
*/
- void setLogo(const QPixmap&);
+ void setLogo(const TQPixmap&);
/**
* Sets the author's name and email address.
*/
- void setAuthor(const QString& name, const QString& email,
- const QString& url, const QString& work);
+ void setAuthor(const TQString& name, const TQString& email,
+ const TQString& url, const TQString& work);
/**
* Sets the maintainers name and email address.
*/
- void setMaintainer(const QString& name, const QString& email,
- const QString& url, const QString& work);
+ void setMaintainer(const TQString& name, const TQString& email,
+ const TQString& url, const TQString& work);
/**
* Shows this person as one of the major contributors.
*/
- void addContributor(const QString& name, const QString& email,
- const QString& url, const QString& work);
+ void addContributor(const TQString& name, const TQString& email,
+ const TQString& url, const TQString& work);
/**
* Sets the text describing the version.
*/
- void setVersion(const QString& name);
+ void setVersion(const TQString& name);
// -------------------------------------------------------------------------
protected slots:
/**
* Catches the signals from the contributors elements.
*/
- void sendEmailSlot(const QString& name, const QString& email);
+ void sendEmailSlot(const TQString& name, const TQString& email);
/**
* Catches the clicked URLs.
*/
- void openURLSlot(const QString& url);
+ void openURLSlot(const TQString& url);
// -------------------------------------------------------------------------
signals:
/**
* An email address has been selected by the user.
*/
- void sendEmail(const QString& name, const QString& email);
+ void sendEmail(const TQString& name, const TQString& email);
/**
* An URL has been clicked.
*/
- void openURL(const QString& url);
+ void openURL(const TQString& url);
// -------------------------------------------------------------------------
protected:
// events:
/**
* The resize event.
*/
- void resizeEvent(QResizeEvent*);
+ void resizeEvent(TQResizeEvent*);
/**
* The label showing the program version.
*/
- QLabel *version;
+ TQLabel *version;
/**
* The label showing the text "Other contributors:".
*/
- QLabel *cont;
+ TQLabel *cont;
/**
* The frame showing the logo.
*/
- QLabel *logo;
+ TQLabel *logo;
/**
* The application developer.
*/
@@ -241,7 +241,7 @@ protected:
/**
* A set of people who contributed to the application.
*/
- QPtrList<KAboutContributor> contributors;
+ TQPtrList<KAboutContributor> contributors;
// #########################################################################
//
private:
@@ -311,7 +311,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* addContributor(), or setVersion().
* The dialog will be laid out automatically.
*/
- KAboutDialog( QWidget *parent=0, const char *name=0, bool modal=true );
+ KAboutDialog( TQWidget *parent=0, const char *name=0, bool modal=true );
/**
* The extended constructor. (Constructor II).
@@ -338,12 +338,12 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* @param user3 User button3 text.
*
*/
- KAboutDialog( int dialogLayout, const QString &caption, int buttonMask,
- ButtonCode defaultButton, QWidget *parent=0,
+ KAboutDialog( int dialogLayout, const TQString &caption, int buttonMask,
+ ButtonCode defaultButton, TQWidget *parent=0,
const char *name=0, bool modal=false, bool separator = false,
- const QString &user1 = QString::null,
- const QString &user2 = QString::null,
- const QString &user3 = QString::null );
+ const TQString &user1 = TQString::null,
+ const TQString &user2 = TQString::null,
+ const TQString &user3 = TQString::null );
/**
* Adjusts the dialog.
@@ -371,7 +371,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
*
* @param centerParent Center the dialog with respect to this widget.
*/
- virtual void show( QWidget *centerParent );
+ virtual void show( TQWidget *centerParent );
/**
* (Constructor II only)
@@ -379,7 +379,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
*
* @param title Title string.
*/
- void setTitle( const QString &title );
+ void setTitle( const TQString &title );
/**
* (Constructor II only)
@@ -388,7 +388,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
*
* @param fileName Path to image file.
*/
- void setImage( const QString &fileName );
+ void setImage( const TQString &fileName );
/**
* (Constructor II only)
@@ -398,18 +398,18 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* appletproxy logo with your own pixmap.
*
* @param fileName Path to file containing logo data in a format that
- * can be loaded by QPixmap.
+ * can be loaded by TQPixmap.
*
* @since 3.3
*/
- void setIcon( const QString &fileName ) KDE_DEPRECATED; // KDE4: remove
+ void setIcon( const TQString &fileName ) KDE_DEPRECATED; // KDE4: remove
/**
- * Overloaded version of setProgramLogo(const QPixmap& pixmap).
+ * Overloaded version of setProgramLogo(const TQPixmap& pixmap).
*
* @since 3.4
*/
- void setProgramLogo( const QString &fileName );
+ void setProgramLogo( const TQString &fileName );
/**
* (Constructor II only)
@@ -422,7 +422,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
*
* @since 3.4
*/
- void setProgramLogo( const QPixmap &pixmap );
+ void setProgramLogo( const TQPixmap &pixmap );
/**
* (Constructor II only)
@@ -432,7 +432,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
*
* @param color Background color.
*/
- void setImageBackgroundColor( const QColor &color );
+ void setImageBackgroundColor( const TQColor &color );
/**
* (Constructor II only)
@@ -454,8 +454,8 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* @param author One or more authors.
* @param year A string telling when the application was made.
*/
- void setProduct( const QString &appName, const QString &version,
- const QString &author, const QString &year );
+ void setProduct( const TQString &appName, const TQString &version,
+ const TQString &author, const TQString &year );
/**
* (Constructor II only)
@@ -469,7 +469,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* is the minimum number of lines of text that are visible.
* @return The frame that contains the page.
*/
- QFrame *addTextPage( const QString &title, const QString &text,
+ TQFrame *addTextPage( const TQString &title, const TQString &text,
bool richText=false, int numLines=10 );
/**
@@ -482,7 +482,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* is the minimum number of lines of text that are visible.
* @return The frame that contains the page.
*/
- QFrame *addLicensePage( const QString &title, const QString &text,
+ TQFrame *addLicensePage( const TQString &title, const TQString &text,
int numLines=10 );
/**
@@ -497,12 +497,12 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* respect to each other.
* @return The new container.
*/
- KAboutContainer *addContainerPage( const QString &title,
+ KAboutContainer *addContainerPage( const TQString &title,
int childAlignment = AlignCenter, int innerAlignment = AlignCenter );
/**
* (Constructor II only)
- * Adds a container inside a QScrollView to a tab box. You can add text
+ * Adds a container inside a TQScrollView to a tab box. You can add text
* and images to a container.
*
* @param title Tab name.
@@ -512,7 +512,7 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* respect to each other.
* @return The new container.
*/
- KAboutContainer *addScrolledContainerPage( const QString &title,
+ KAboutContainer *addScrolledContainerPage( const TQString &title,
int childAlignment = AlignCenter, int innerAlignment = AlignCenter );
/**
@@ -534,49 +534,49 @@ class KDEUI_EXPORT KAboutDialog : public KDialogBase
* @param title Tab name
* @return The new page.
*/
- QFrame *addPage( const QString &title );
+ TQFrame *addPage( const TQString &title );
/**
* (Constructor I only)
* Sets the image as the application logo.
*/
- void setLogo(const QPixmap&);
+ void setLogo(const TQPixmap&);
/**
* (Constructor I only)
* Sets the author's name and email address.
*/
- void setAuthor(const QString& name, const QString& email,
- const QString& url, const QString& work);
+ void setAuthor(const TQString& name, const TQString& email,
+ const TQString& url, const TQString& work);
/**
* (Constructor I only)
* Sets the maintainer's name and email address.
*/
- void setMaintainer(const QString& name, const QString& email,
- const QString& url, const QString& work);
+ void setMaintainer(const TQString& name, const TQString& email,
+ const TQString& url, const TQString& work);
/**
* (Constructor I only)
* Show this person as one of the major contributors.
*/
- void addContributor(const QString& name, const QString& email,
- const QString& url, const QString& work);
+ void addContributor(const TQString& name, const TQString& email,
+ const TQString& url, const TQString& work);
/**
* (Constructor I only)
* Sets the text describing the version.
*/
- void setVersion(const QString& name);
+ void setVersion(const TQString& name);
/**
* Create a modal dialog with an image in the upper area with a
* URL link below.
*/
- static void imageURL( QWidget *parent, const QString &caption,
- const QString &path, const QColor &imageColor,
- const QString &url );
+ static void imageURL( TQWidget *parent, const TQString &caption,
+ const TQString &path, const TQColor &imageColor,
+ const TQString &url );
signals:
/**
@@ -585,12 +585,12 @@ signals:
* The application must provide the
* functionality.
*/
- void sendEmail(const QString& name, const QString& email);
+ void sendEmail(const TQString& name, const TQString& email);
/**
* Open the selected URL.
*/
- void openURL(const QString& url);
+ void openURL(const TQString& url);
// ----------------------------------------------------------------------------
protected:
/**
@@ -609,19 +609,19 @@ protected slots:
/**
* Connected to widget->sendEmail.
*/
- void sendEmailSlot(const QString& name, const QString& email);
+ void sendEmailSlot(const TQString& name, const TQString& email);
/**
* Open this URL.
*/
- void openURLSlot(const QString& url);
+ void openURLSlot(const TQString& url);
/**
* (Constructor II only)
* Tells the position of the mouse cursor when the left mouse button
* is pressed above an image
*/
- virtual void mouseTrackSlot( int mode, const QMouseEvent *e );
+ virtual void mouseTrackSlot( int mode, const TQMouseEvent *e );
// #########################################################################
protected:
diff --git a/kdeui/kaboutdialog_private.h b/kdeui/kaboutdialog_private.h
index 9546937af..c13881864 100644
--- a/kdeui/kaboutdialog_private.h
+++ b/kdeui/kaboutdialog_private.h
@@ -23,7 +23,7 @@
#ifndef _KABOUTDIALOG_PRIVATE_H_
#define _KABOUTDIALOG_PRIVATE_H_
-#include <qlabel.h>
+#include <tqlabel.h>
class QFrame;
class QTabWidget;
class QVBoxLayout;
@@ -46,16 +46,16 @@ class KImageTrackLabel : public QLabel
};
public:
- KImageTrackLabel( QWidget * parent, const char * name=0, WFlags f=0 );
+ KImageTrackLabel( TQWidget * parent, const char * name=0, WFlags f=0 );
signals:
- void mouseTrack( int mode, const QMouseEvent *e );
+ void mouseTrack( int mode, const TQMouseEvent *e );
protected:
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseReleaseEvent( QMouseEvent *e );
- virtual void mouseDoubleClickEvent( QMouseEvent *e );
- virtual void mouseMoveEvent ( QMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
+ virtual void mouseDoubleClickEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent ( TQMouseEvent *e );
};
class KAboutContainer;
@@ -86,55 +86,55 @@ class KAboutContainerBase : public QWidget
};
public:
- KAboutContainerBase( int layoutType, QWidget *parent = 0, char *name = 0 );
+ KAboutContainerBase( int layoutType, TQWidget *parent = 0, char *name = 0 );
virtual void show( void );
- virtual QSize sizeHint( void ) const;
+ virtual TQSize sizeHint( void ) const;
- void setTitle( const QString &title );
- void setImage( const QString &fileName );
- void setImageBackgroundColor( const QColor &color );
+ void setTitle( const TQString &title );
+ void setImage( const TQString &fileName );
+ void setImageBackgroundColor( const TQColor &color );
void setImageFrame( bool state );
- void setProgramLogo( const QString &fileName );
- void setProgramLogo( const QPixmap &pixmap );
- void setProduct( const QString &appName, const QString &version,
- const QString &author, const QString &year );
+ void setProgramLogo( const TQString &fileName );
+ void setProgramLogo( const TQPixmap &pixmap );
+ void setProduct( const TQString &appName, const TQString &version,
+ const TQString &author, const TQString &year );
- QFrame *addTextPage( const QString &title, const QString &text,
+ TQFrame *addTextPage( const TQString &title, const TQString &text,
bool richText=false, int numLines=10 );
- QFrame *addLicensePage( const QString &title, const QString &text,
+ TQFrame *addLicensePage( const TQString &title, const TQString &text,
int numLines=10 );
- KAboutContainer *addContainerPage( const QString &title,
+ KAboutContainer *addContainerPage( const TQString &title,
int childAlignment = AlignCenter, int innerAlignment = AlignCenter );
- KAboutContainer *addScrolledContainerPage( const QString &title,
+ KAboutContainer *addScrolledContainerPage( const TQString &title,
int childAlignment = AlignCenter, int innerAlignment = AlignCenter );
- QFrame *addEmptyPage( const QString &title );
+ TQFrame *addEmptyPage( const TQString &title );
KAboutContainer *addContainer( int childAlignment, int innerAlignment );
public slots:
- virtual void slotMouseTrack( int mode, const QMouseEvent *e );
- virtual void slotUrlClick( const QString &url );
- virtual void slotMailClick( const QString &name, const QString &address );
+ virtual void slotMouseTrack( int mode, const TQMouseEvent *e );
+ virtual void slotUrlClick( const TQString &url );
+ virtual void slotMailClick( const TQString &name, const TQString &address );
protected:
- virtual void fontChange( const QFont &oldFont );
+ virtual void fontChange( const TQFont &oldFont );
signals:
- void mouseTrack( int mode, const QMouseEvent *e );
- void urlClick( const QString &url );
- void mailClick( const QString &name, const QString &address );
+ void mouseTrack( int mode, const TQMouseEvent *e );
+ void urlClick( const TQString &url );
+ void mailClick( const TQString &name, const TQString &address );
private:
- QVBoxLayout *mTopLayout;
+ TQVBoxLayout *mTopLayout;
KImageTrackLabel *mImageLabel;
- QLabel *mTitleLabel;
- QLabel *mIconLabel;
- QLabel *mVersionLabel;
- QLabel *mAuthorLabel;
- QFrame *mImageFrame;
- QTabWidget *mPageTab;
- QFrame *mPlainSpace;
+ TQLabel *mTitleLabel;
+ TQLabel *mIconLabel;
+ TQLabel *mVersionLabel;
+ TQLabel *mAuthorLabel;
+ TQFrame *mImageFrame;
+ TQTabWidget *mPageTab;
+ TQFrame *mPlainSpace;
KAboutContainerBasePrivate* const d;
};
diff --git a/kdeui/kaboutkde.cpp b/kdeui/kaboutkde.cpp
index ba4e84fad..1d05e289c 100644
--- a/kdeui/kaboutkde.cpp
+++ b/kdeui/kaboutkde.cpp
@@ -26,12 +26,12 @@
#include <kstandarddirs.h>
-KAboutKDE::KAboutKDE( QWidget *parent, const char *name, bool modal )
- :KAboutDialog( KAboutDialog::AbtKDEStandard, QString::fromLatin1("KDE"),
+KAboutKDE::KAboutKDE( TQWidget *parent, const char *name, bool modal )
+ :KAboutDialog( KAboutDialog::AbtKDEStandard, TQString::fromLatin1("KDE"),
KDialogBase::Help|KDialogBase::Close, KDialogBase::Close,
parent, name, modal )
{
- const QString text1 = i18n(""
+ const TQString text1 = i18n(""
"The <b>Trinity Desktop Environment</b> is a fork of the "
"K Desktop Environment version 3.5, which was originally written by the KDE Team, "
"a world-wide network of software engineers committed to <a "
@@ -42,7 +42,7 @@ KAboutKDE::KAboutKDE( QWidget *parent, const char *name, bool modal )
"about Trinity, and <A HREF=\"http://www.kde.org/\">http://www.kde.org</A> "
"for more information on the KDE project. ");
- const QString text2 = i18n(""
+ const TQString text2 = i18n(""
"Software can always be improved, and the Trinity Team is ready to "
"do so. However, you - the user - must tell us when "
"something does not work as expected or could be done better.<br><br>"
@@ -53,7 +53,7 @@ KAboutKDE::KAboutKDE( QWidget *parent, const char *name, bool modal )
"the bug tracking system to register your wish. Make sure you use the "
"severity called \"Wishlist\"." );
- const QString text3 = i18n(""
+ const TQString text3 = i18n(""
"You do not have to be a software developer to be a member of the "
"Trinity team. You can join the national teams that translate "
"program interfaces. You can provide graphics, themes, sounds, and "
@@ -66,7 +66,7 @@ KAboutKDE::KAboutKDE( QWidget *parent, const char *name, bool modal )
"If you need more information or documentation, then a visit to "
"<A HREF=\"http://trinity.pearsoncomputing.net/docs/\">http://trinity.pearsoncomputing.net/docs/</A> "
"will provide you with what you need.");
- const QString text4 = i18n(""
+ const TQString text4 = i18n(""
"Trinity is available free of charge, but making it is not free.<br><br>"
"<br><br>"
"The Trinity team does need financial support. Most of the money is used to "
@@ -75,13 +75,13 @@ KAboutKDE::KAboutKDE( QWidget *parent, const char *name, bool modal )
"donation, using one of the ways described at "
"<a href=\"http://trinity.pearsoncomputing.net/support/\">http://trinity.pearsoncomputing.net/support/</a>."
"<br><br>Thank you very much in advance for your support!");
- setHelp( QString::fromLatin1("khelpcenter/main.html"), QString::null );
+ setHelp( TQString::fromLatin1("khelpcenter/main.html"), TQString::null );
setTitle(i18n("Trinity Desktop Environment. Release %1").
- arg(QString::fromLatin1(KDE_VERSION_STRING)) );
+ arg(TQString::fromLatin1(KDE_VERSION_STRING)) );
addTextPage( i18n("About Trinity","&About"), text1, true );
addTextPage( i18n("&Report Bugs or Wishes"), text2, true );
addTextPage( i18n("&Join the Trinity Team"), text3, true );
addTextPage( i18n("&Support Trinity"), text4, true );
- setImage( locate( "data", QString::fromLatin1("kdeui/pics/aboutkde.png")) );
+ setImage( locate( "data", TQString::fromLatin1("kdeui/pics/aboutkde.png")) );
setImageBackgroundColor( white );
}
diff --git a/kdeui/kaboutkde.h b/kdeui/kaboutkde.h
index 357dc339a..07e325dd8 100644
--- a/kdeui/kaboutkde.h
+++ b/kdeui/kaboutkde.h
@@ -50,10 +50,10 @@ class KDEUI_EXPORT KAboutKDE : public KAboutDialog
* @param name Internal name of the widget. This name in not used in the
* caption.
* @param modal If false, this widget will be modeless and must be
- * made visible using QWidget::show(). Otherwise it will be
- * modal and must be made visible using QWidget::exec()
+ * made visible using TQWidget::show(). Otherwise it will be
+ * modal and must be made visible using TQWidget::exec()
*/
- KAboutKDE( QWidget *parent=0, const char *name=0, bool modal=true );
+ KAboutKDE( TQWidget *parent=0, const char *name=0, bool modal=true );
};
diff --git a/kdeui/kaccelgen.h b/kdeui/kaccelgen.h
index 2d5d69549..8f0c50bed 100644
--- a/kdeui/kaccelgen.h
+++ b/kdeui/kaccelgen.h
@@ -20,9 +20,9 @@
#ifndef KACCELGEN_H
#define KACCELGEN_H
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -39,7 +39,7 @@
* In the Qt library, the mechanism for adding a keyboard accelerator
* to a menu item is to insert an '&' before the letter. Since we
* usually don't want to disturb the original collection, the idiom in
- * these functions is to populate a "target" QStringList parameter
+ * these functions is to populate a "target" TQStringList parameter
* with the input collectin's QStrings, plus possibly some added '&'
* characters.
*
@@ -89,7 +89,7 @@ template <class Iter>
class Deref
{
public:
- static QString deref(Iter i) { return *i; }
+ static TQString deref(Iter i) { return *i; }
};
/**
@@ -100,7 +100,7 @@ template <class Iter>
class Deref_Key
{
public:
- static QString deref(Iter i) { return i.key(); }
+ static TQString deref(Iter i) { return i.key(); }
};
/**
@@ -111,7 +111,7 @@ public:
* @param index offset to check
*/
inline bool
-isLegalAccelerator(const QString& str, uint index)
+isLegalAccelerator(const TQString& str, uint index)
{
return index < str.length()
&& str[index].isLetterOrNumber();
@@ -119,7 +119,7 @@ isLegalAccelerator(const QString& str, uint index)
/**
* Loads all legal predefined accelerators in the (implicitly
- * specified) collection into the given QMap.
+ * specified) collection into the given TQMap.
*
* @param begin start iterator
* @param end (last+1) iterator
@@ -127,11 +127,11 @@ isLegalAccelerator(const QString& str, uint index)
*/
template <class Iter, class Deref>
inline void
-loadPredefined(Iter begin, Iter end, QMap<QChar,bool>& keys)
+loadPredefined(Iter begin, Iter end, TQMap<TQChar,bool>& keys)
{
for (Iter i = begin; i != end; ++i) {
- QString item = Deref::deref(i);
- int user_ampersand = item.find(QChar('&'));
+ TQString item = Deref::deref(i);
+ int user_ampersand = item.find(TQChar('&'));
if( user_ampersand >= 0 ) {
// Sanity check. Note that we don't try to find an
// accelerator if the user shoots him/herself in the foot
@@ -164,21 +164,21 @@ loadPredefined(Iter begin, Iter end, QMap<QChar,bool>& keys)
*/
template <class Iter, class Iter_Deref >
void
-generate(Iter begin, Iter end, QStringList& target)
+generate(Iter begin, Iter end, TQStringList& target)
{
// Will keep track of used accelerator chars
- QMap<QChar,bool> used_accels;
+ TQMap<TQChar,bool> used_accels;
// Prepass to detect manually user-coded accelerators
loadPredefined<Iter,Iter_Deref>(begin, end, used_accels);
// Main pass
for (Iter i = begin; i != end; ++i) {
- QString item = Iter_Deref::deref(i);
+ TQString item = Iter_Deref::deref(i);
// Attempt to find a good accelerator, but only if the user
// has not manually hardcoded one.
- int user_ampersand = item.find(QChar('&'));
+ int user_ampersand = item.find(TQChar('&'));
if( user_ampersand < 0 || item[user_ampersand+1] == '&') {
bool found = false;
uint found_idx;
@@ -211,7 +211,7 @@ generate(Iter begin, Iter end, QStringList& target)
// Both upper and lower case marked as used
used_accels.insert(item[j].upper(),true);
used_accels.insert(item[j].lower(),true);
- item.insert(j,QChar('&'));
+ item.insert(j,TQChar('&'));
}
}
@@ -229,7 +229,7 @@ generate(Iter begin, Iter end, QStringList& target)
*/
template <class Iter>
inline void
-generateFromKeys(Iter begin, Iter end, QStringList& target)
+generateFromKeys(Iter begin, Iter end, TQStringList& target)
{
generate< Iter, Deref_Key<Iter> >(begin, end, target);
}
@@ -237,38 +237,38 @@ generateFromKeys(Iter begin, Iter end, QStringList& target)
/**
* Convenience function; generates accelerators for all the items in
- * a QStringList.
+ * a TQStringList.
*
* @param source Strings for which to generate accelerators
* @param target Output for accelerator-added strings */
inline void
-generate(const QStringList& source, QStringList& target)
+generate(const TQStringList& source, TQStringList& target)
{
- generate<QStringList::ConstIterator, Deref<QStringList::ConstIterator> >(source.begin(), source.end(), target);
+ generate<TQStringList::ConstIterator, Deref<TQStringList::ConstIterator> >(source.begin(), source.end(), target);
}
/**
* Convenience function; generates accelerators for all the values in
- * a QMap<T,QString>.
+ * a TQMap<T,TQString>.
*
* @param source Map with input strings as VALUES.
* @param target Output for accelerator-added strings */
template <class Key>
inline void
-generateFromValues(const QMap<Key,QString>& source, QStringList& target)
+generateFromValues(const TQMap<Key,TQString>& source, TQStringList& target)
{
- generate<QMapConstIterator<Key,QString>, Deref_Key<QMapConstIterator<Key,QString> > >(source.begin(), source.end(), target);
+ generate<TQMapConstIterator<Key,TQString>, Deref_Key<TQMapConstIterator<Key,TQString> > >(source.begin(), source.end(), target);
}
/**
* Convenience function; generates an accelerator mapping from all the
- * keys in a QMap<QString,T>
+ * keys in a TQMap<TQString,T>
*
* @param source Map with input strings as KEYS.
* @param target Output for accelerator-added strings */
template <class Data>
inline void
-generateFromKeys(const QMap<QString,Data>& source, QStringList& target)
+generateFromKeys(const TQMap<TQString,Data>& source, TQStringList& target)
{
generateFromKeys(source.begin(), source.end(), target);
}
diff --git a/kdeui/kaction.cpp b/kdeui/kaction.cpp
index 2740763d9..ffc957658 100644
--- a/kdeui/kaction.cpp
+++ b/kdeui/kaction.cpp
@@ -27,8 +27,8 @@
#include <assert.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kaccel.h>
#include <kaccelbase.h>
@@ -50,7 +50,7 @@
*
* Focus Widget pointer:
* This is the widget which is the focus for action shortcuts.
-* It is set either by passing a QWidget* to the KActionCollection constructor
+* It is set either by passing a TQWidget* to the KActionCollection constructor
* or by calling setWidget() if the widget wasn't known when the object was
* initially constructed (as in KXMLGUIClient and KParts::PartBase)
*
@@ -83,10 +83,10 @@ public:
}
KAccel *m_kaccel;
- QValueList<KAccel*> m_kaccelList;
+ TQValueList<KAccel*> m_kaccelList;
- QString m_groupText;
- QString m_group;
+ TQString m_groupText;
+ TQString m_group;
KShortcut m_cut;
KShortcut m_cutDefault;
@@ -98,48 +98,48 @@ public:
Container() { m_container = 0; m_representative = 0; m_id = 0; }
Container( const Container& s ) { m_container = s.m_container;
m_id = s.m_id; m_representative = s.m_representative; }
- QWidget* m_container;
+ TQWidget* m_container;
int m_id;
- QWidget* m_representative;
+ TQWidget* m_representative;
};
- QValueList<Container> m_containers;
+ TQValueList<Container> m_containers;
};
//---------------------------------------------------------------------
// KAction
//---------------------------------------------------------------------
-KAction::KAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+KAction::KAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name )
-: QObject( parent, name ), d(new KActionPrivate)
+: TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, receiver, slot );
}
-KAction::KAction( const QString& text, const QString& sIconName, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+KAction::KAction( const TQString& text, const TQString& sIconName, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name )
-: QObject( parent, name ), d(new KActionPrivate)
+: TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, receiver, slot );
d->setIconName( sIconName );
}
-KAction::KAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+KAction::KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name )
-: QObject( parent, name ), d(new KActionPrivate)
+: TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, receiver, slot );
d->setIconSet( pix );
}
KAction::KAction( const KGuiItem& item, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name )
-: QObject( parent, name ), d(new KActionPrivate)
+: TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( item.text(), cut, receiver, slot );
if( item.hasIcon() )
@@ -149,63 +149,63 @@ KAction::KAction( const KGuiItem& item, const KShortcut& cut,
}
#ifndef KDE_NO_COMPAT // KDE 4: remove
-KAction::KAction( const QString& text, const KShortcut& cut,
- QObject* parent, const char* name )
- : QObject( parent, name ), d(new KActionPrivate)
+KAction::KAction( const TQString& text, const KShortcut& cut,
+ TQObject* parent, const char* name )
+ : TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, 0, 0 );
}
-KAction::KAction( const QString& text, const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent, const char* name )
- : QObject( parent, name ), d(new KActionPrivate)
+KAction::KAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent, const char* name )
+ : TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, receiver, slot );
}
-KAction::KAction( const QString& text, const QIconSet& pix,
+KAction::KAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
- : QObject( parent, name ), d(new KActionPrivate)
+ TQObject* parent, const char* name )
+ : TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, 0, 0 );
setIconSet( pix );
}
-KAction::KAction( const QString& text, const QString& pix,
+KAction::KAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
-: QObject( parent, name ), d(new KActionPrivate)
+ TQObject* parent, const char* name )
+: TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, 0, 0 );
d->setIconName( pix );
}
-KAction::KAction( const QString& text, const QIconSet& pix,
+KAction::KAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name )
- : QObject( parent, name ), d(new KActionPrivate)
+ : TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, receiver, slot );
setIconSet( pix );
}
-KAction::KAction( const QString& text, const QString& pix,
+KAction::KAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name )
- : QObject( parent, name ), d(new KActionPrivate)
+ : TQObject( parent, name ), d(new KActionPrivate)
{
initPrivate( text, cut, receiver, slot );
d->setIconName(pix);
}
-KAction::KAction( QObject* parent, const char* name )
- : QObject( parent, name ), d(new KActionPrivate)
+KAction::KAction( TQObject* parent, const char* name )
+ : TQObject( parent, name ), d(new KActionPrivate)
{
- initPrivate( QString::null, KShortcut(), 0, 0 );
+ initPrivate( TQString::null, KShortcut(), 0, 0 );
}
#endif // KDE 4: remove end
@@ -221,9 +221,9 @@ KAction::~KAction()
if ( m_parentCollection ) {
m_parentCollection->take( this );
- const QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::const_iterator itr = accelList.constBegin();
- const QValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
+ const TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::const_iterator itr = accelList.constBegin();
+ const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
const char * const namePtr = name();
for (; itr != itrEnd; ++itr )
@@ -241,8 +241,8 @@ KAction::~KAction()
delete d;
}
-void KAction::initPrivate( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot )
+void KAction::initPrivate( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot )
{
d->m_cutDefault = cut;
@@ -252,7 +252,7 @@ void KAction::initPrivate( const QString& text, const KShortcut& cut,
m_parentCollection->insert( this );
if ( receiver && slot )
- connect( this, SIGNAL( activated() ), receiver, slot );
+ 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;
@@ -265,18 +265,18 @@ bool KAction::isPlugged() const
return (!d->m_containers.empty()) || d->m_kaccel;
}
-bool KAction::isPlugged( const QWidget *container ) const
+bool KAction::isPlugged( const TQWidget *container ) const
{
return findContainer( container ) > -1;
}
-bool KAction::isPlugged( const QWidget *container, int id ) const
+bool KAction::isPlugged( const TQWidget *container, int id ) const
{
int i = findContainer( container );
return ( i > -1 && itemId( i ) == id );
}
-bool KAction::isPlugged( const QWidget *container, const QWidget *_representative ) const
+bool KAction::isPlugged( const TQWidget *container, const TQWidget *_representative ) const
{
int i = findContainer( container );
return ( i > -1 && representative( i ) == _representative );
@@ -388,9 +388,9 @@ void KAction::plugShortcut()
//kdDebug(129) << "KAction::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 QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::const_iterator itr = accelList.constBegin();
- const QValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
+ const TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::const_iterator itr = accelList.constBegin();
+ const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
for( ; itr != itrEnd; ++itr) {
if( (*itr) == kaccel )
@@ -410,9 +410,9 @@ bool KAction::setShortcut( const KShortcut& cut )
bool bInsertRequired = true;
// Apply new shortcut to all existing KAccel objects
- const QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::const_iterator itr = accelList.constBegin();
- const QValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
+ const TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::const_iterator itr = accelList.constBegin();
+ const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
for( ; itr != itrEnd; ++itr) {
// Check whether shortcut has already been plugged into
@@ -450,9 +450,9 @@ bool KAction::updateKAccelShortcut( KAccel* kaccel )
if ( !kaccel->actions().actionPtr( name() ) ) {
if(!d->m_cut.isNull() ) {
kdDebug(129) << "Inserting " << name() << ", " << d->text() << ", " << d->plainText() << endl;
- b = kaccel->insert( name(), d->plainText(), QString::null,
+ b = kaccel->insert( name(), d->plainText(), TQString::null,
d->m_cut,
- this, SLOT(slotActivated()),
+ this, TQT_SLOT(slotActivated()),
isShortcutConfigurable(), isEnabled() );
}
}
@@ -468,7 +468,7 @@ void KAction::insertKAccel( KAccel* kaccel )
if ( !kaccel->actions().actionPtr( name() ) ) {
if( updateKAccelShortcut( kaccel ) ) {
d->m_kaccelList.append( kaccel );
- connect( kaccel, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) );
+ connect( kaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) );
}
}
else
@@ -478,15 +478,15 @@ void KAction::insertKAccel( KAccel* kaccel )
void KAction::removeKAccel( KAccel* kaccel )
{
//kdDebug(129) << "KAction::removeKAccel( " << i << " ): this = " << this << endl;
- QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::iterator itr = accelList.begin();
- const QValueList<KAccel*>::iterator itrEnd = accelList.end();
+ TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::iterator itr = accelList.begin();
+ const TQValueList<KAccel*>::iterator itrEnd = accelList.end();
for( ; itr != itrEnd; ++itr) {
if( (*itr) == kaccel ) {
kaccel->remove( name() );
accelList.remove( itr );
- disconnect( kaccel, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) );
+ disconnect( kaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) );
break;
}
}
@@ -504,22 +504,22 @@ void KAction::updateShortcut( int i )
{
int id = itemId( i );
- QWidget* w = container( i );
- if ( ::qt_cast<QPopupMenu *>( w ) ) {
- QPopupMenu* menu = static_cast<QPopupMenu*>(w);
+ TQWidget* w = container( i );
+ if ( ::qt_cast<TQPopupMenu *>( w ) ) {
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>(w);
updateShortcut( menu, id );
}
- else if ( ::qt_cast<QMenuBar *>( w ) )
- static_cast<QMenuBar*>(w)->setAccel( d->m_cut.keyCodeQt(), id );
+ else if ( ::qt_cast<TQMenuBar *>( w ) )
+ static_cast<TQMenuBar*>(w)->setAccel( d->m_cut.keyCodeQt(), id );
}
-void KAction::updateShortcut( QPopupMenu* menu, int id )
+void KAction::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,
// show the string representation of its shortcut.
if ( d->m_kaccel || d->m_kaccelList.count() ) {
- QString s = menu->text( id );
+ TQString s = menu->text( id );
int i = s.find( '\t' );
if ( i >= 0 )
s.replace( i+1, s.length()-i, d->m_cut.seq(0).toString() );
@@ -547,12 +547,12 @@ const KShortcut& KAction::shortcutDefault() const
return d->m_cutDefault;
}
-QString KAction::shortcutText() const
+TQString KAction::shortcutText() const
{
return d->m_cut.toStringInternal();
}
-void KAction::setShortcutText( const QString& s )
+void KAction::setShortcutText( const TQString& s )
{
setShortcut( KShortcut(s) );
}
@@ -564,7 +564,7 @@ int KAction::accel() const
}
#endif
-void KAction::setGroup( const QString& grp )
+void KAction::setGroup( const TQString& grp )
{
d->m_group = grp;
@@ -578,7 +578,7 @@ void KAction::updateGroup( int )
// DO SOMETHING
}
-QString KAction::group() const
+TQString KAction::group() const
{
return d->m_group;
}
@@ -593,7 +593,7 @@ bool KAction::isShortcutConfigurable() const
return d->m_configurable;
}
-void KAction::setToolTip( const QString& tt )
+void KAction::setToolTip( const TQString& tt )
{
d->setToolTip( tt );
@@ -604,18 +604,18 @@ void KAction::setToolTip( const QString& tt )
void KAction::updateToolTip( int i )
{
- QWidget *w = container( i );
+ TQWidget *w = container( i );
if ( ::qt_cast<KToolBar *>( w ) )
- QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
+ TQToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
}
-QString KAction::toolTip() const
+TQString KAction::toolTip() const
{
return d->toolTip();
}
-int KAction::plug( QWidget *w, int index )
+int KAction::plug( TQWidget *w, int index )
{
//kdDebug(129) << "KAction::plug( " << w << ", " << index << " )" << endl;
if (!w ) {
@@ -624,7 +624,7 @@ int KAction::plug( QWidget *w, int index )
}
// Ellis: print warning if there is a shortcut, but no KAccel 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 QAccel.
+ // 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).
#if 0 //ndef NDEBUG
KAccel* kaccel = kaccelCurrent();
@@ -639,9 +639,9 @@ int KAction::plug( QWidget *w, int index )
plugShortcut();
- if ( ::qt_cast<QPopupMenu *>( w ) )
+ if ( ::qt_cast<TQPopupMenu *>( w ) )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( w );
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>( w );
int id;
// Don't insert shortcut into menu if it's already in a KAccel object.
int keyQt = (d->m_kaccelList.count() || d->m_kaccel) ? 0 : d->m_cut.keyCodeQt();
@@ -654,12 +654,12 @@ int KAction::plug( QWidget *w, int index )
else
instance = KGlobal::instance();
id = menu->insertItem( d->iconSet( KIcon::Small, 0, instance ), d->text(), this,//dsweet
- SLOT( slotPopupActivated() ), keyQt,
+ TQT_SLOT( slotPopupActivated() ), keyQt,
-1, index );
}
else
id = menu->insertItem( d->text(), this,
- SLOT( slotPopupActivated() ),
+ TQT_SLOT( slotPopupActivated() ),
keyQt, -1, index );
// If the shortcut is already in a KAccel object, then
@@ -676,7 +676,7 @@ int KAction::plug( QWidget *w, int index )
menu->setWhatsThis( id, whatsThisWithIcon() );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if ( m_parentCollection )
m_parentCollection->connectHighlight( menu, this );
@@ -694,34 +694,34 @@ int KAction::plug( QWidget *w, int index )
else
instance = KGlobal::instance();
- if ( icon().isEmpty() && !iconSet().pixmap().isNull() ) // old code using QIconSet directly
+ if ( icon().isEmpty() && !iconSet().pixmap().isNull() ) // old code using TQIconSet directly
{
- bar->insertButton( iconSet().pixmap(), id_, SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
- SLOT( slotButtonClicked(int, Qt::ButtonState) ),
+ bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
+ TQT_SLOT( slotButtonClicked(int, Qt::ButtonState) ),
d->isEnabled(), d->plainText(), index );
}
else
{
- QString icon = d->iconName();
+ TQString icon = d->iconName();
if ( icon.isEmpty() )
icon = "unknown";
- bar->insertButton( icon, id_, SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
- SLOT( slotButtonClicked(int, Qt::ButtonState) ),
+ bar->insertButton( icon, id_, TQT_SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
+ TQT_SLOT( slotButtonClicked(int, Qt::ButtonState) ),
d->isEnabled(), d->plainText(), index, instance );
}
KToolBarButton* ktb = bar->getButton(id_);
- ktb->setName( QCString("toolbutton_")+name() );
+ ktb->setName( TQCString("toolbutton_")+name() );
if ( !d->whatsThis().isEmpty() )
- QWhatsThis::add( bar->getButton(id_), whatsThisWithIcon() );
+ TQWhatsThis::add( bar->getButton(id_), whatsThisWithIcon() );
if ( !d->toolTip().isEmpty() )
- QToolTip::add( bar->getButton(id_), d->toolTip() );
+ TQToolTip::add( bar->getButton(id_), d->toolTip() );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if ( m_parentCollection )
m_parentCollection->connectHighlight( bar, this );
@@ -732,16 +732,16 @@ int KAction::plug( QWidget *w, int index )
return -1;
}
-void KAction::unplug( QWidget *w )
+void KAction::unplug( TQWidget *w )
{
int i = findContainer( w );
if ( i == -1 )
return;
int id = itemId( i );
- if ( ::qt_cast<QPopupMenu *>( w ) )
+ if ( ::qt_cast<TQPopupMenu *>( w ) )
{
- QPopupMenu *menu = static_cast<QPopupMenu *>( w );
+ TQPopupMenu *menu = static_cast<TQPopupMenu *>( w );
menu->removeItem( id );
}
else if ( ::qt_cast<KToolBar *>( w ) )
@@ -749,9 +749,9 @@ void KAction::unplug( QWidget *w )
KToolBar *bar = static_cast<KToolBar *>( w );
bar->removeItemDelayed( id );
}
- else if ( ::qt_cast<QMenuBar *>( w ) )
+ else if ( ::qt_cast<TQMenuBar *>( w ) )
{
- QMenuBar *bar = static_cast<QMenuBar *>( w );
+ TQMenuBar *bar = static_cast<TQMenuBar *>( w );
bar->removeItem( id );
}
@@ -777,12 +777,12 @@ void KAction::plugAccel(KAccel *kacc, bool configurable)
if ( !kacc->actions().actionPtr(name()) )
{
d->m_kaccel = kacc;
- d->m_kaccel->insert(name(), d->plainText(), QString::null,
+ d->m_kaccel->insert(name(), d->plainText(), TQString::null,
KShortcut(d->m_cut),
- this, SLOT(slotActivated()),
+ this, TQT_SLOT(slotActivated()),
configurable, isEnabled());
- connect(d->m_kaccel, SIGNAL(destroyed()), this, SLOT(slotDestroyed()));
- //connect(d->m_kaccel, SIGNAL(keycodeChanged()), this, SLOT(slotKeycodeChanged()));
+ 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
@@ -798,11 +798,11 @@ void KAction::unplugAccel()
}
}
-void KAction::plugMainWindowAccel( QWidget *w )
+void KAction::plugMainWindowAccel( TQWidget *w )
{
// Note: topLevelWidget() stops too early, we can't use it.
- QWidget * tl = w;
- QWidget * n;
+ TQWidget * tl = w;
+ TQWidget * n;
while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store
tl = n;
@@ -825,9 +825,9 @@ void KAction::setEnabled(bool enable)
d->m_kaccel->setEnabled(name(), enable);
#endif // KDE 4: remove end
- const QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::const_iterator itr = accelList.constBegin();
- const QValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
+ const TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::const_iterator itr = accelList.constBegin();
+ const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
const char * const namePtr = name();
@@ -845,12 +845,12 @@ void KAction::setEnabled(bool enable)
void KAction::updateEnabled( int i )
{
- QWidget *w = container( i );
+ TQWidget *w = container( i );
- if ( ::qt_cast<QPopupMenu *>( w ) )
- static_cast<QPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
- else if ( ::qt_cast<QMenuBar *>( w ) )
- static_cast<QMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
+ if ( ::qt_cast<TQPopupMenu *>( w ) )
+ static_cast<TQPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
+ else if ( ::qt_cast<TQMenuBar *>( w ) )
+ static_cast<TQMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
else if ( ::qt_cast<KToolBar *>( w ) )
static_cast<KToolBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
}
@@ -860,7 +860,7 @@ void KAction::setShortcutConfigurable( bool b )
d->m_configurable = b;
}
-void KAction::setText( const QString& text )
+void KAction::setText( const TQString& text )
{
#ifndef KDE_NO_COMPAT
// KDE 4: remove
@@ -870,9 +870,9 @@ void KAction::setText( const QString& text )
pAction->setLabel( text );
}
#endif // KDE 4: remove end
- const QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::const_iterator itr = accelList.constBegin();
- const QValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
+ const TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::const_iterator itr = accelList.constBegin();
+ const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd();
const char * const namePtr = name();
@@ -891,35 +891,35 @@ void KAction::setText( const QString& text )
void KAction::updateText( int i )
{
- QWidget *w = container( i );
+ TQWidget *w = container( i );
- if ( ::qt_cast<QPopupMenu *>( w ) ) {
+ if ( ::qt_cast<TQPopupMenu *>( w ) ) {
int id = itemId( i );
- static_cast<QPopupMenu*>(w)->changeItem( id, d->text() );
+ static_cast<TQPopupMenu*>(w)->changeItem( id, d->text() );
if (!d->m_cut.isNull())
- updateShortcut( static_cast<QPopupMenu*>(w), id );
+ updateShortcut( static_cast<TQPopupMenu*>(w), id );
}
- else if ( ::qt_cast<QMenuBar *>( w ) )
- static_cast<QMenuBar*>(w)->changeItem( itemId( i ), d->text() );
+ else if ( ::qt_cast<TQMenuBar *>( w ) )
+ static_cast<TQMenuBar*>(w)->changeItem( itemId( i ), d->text() );
else if ( ::qt_cast<KToolBar *>( w ) )
{
- QWidget *button = static_cast<KToolBar *>(w)->getWidget( itemId( i ) );
+ TQWidget *button = static_cast<KToolBar *>(w)->getWidget( itemId( i ) );
if ( ::qt_cast<KToolBarButton *>( button ) )
static_cast<KToolBarButton *>(button)->setText( d->plainText() );
}
}
-QString KAction::text() const
+TQString KAction::text() const
{
return d->text();
}
-QString KAction::plainText() const
+TQString KAction::plainText() const
{
return d->plainText( );
}
-void KAction::setIcon( const QString &icon )
+void KAction::setIcon( const TQString &icon )
{
d->setIconName( icon );
@@ -931,26 +931,26 @@ void KAction::setIcon( const QString &icon )
void KAction::updateIcon( int id )
{
- QWidget* w = container( id );
+ TQWidget* w = container( id );
- if ( ::qt_cast<QPopupMenu *>( w ) ) {
+ if ( ::qt_cast<TQPopupMenu *>( w ) ) {
int itemId_ = itemId( id );
- static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() );
+ static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() );
if (!d->m_cut.isNull())
- updateShortcut( static_cast<QPopupMenu*>(w), itemId_ );
+ updateShortcut( static_cast<TQPopupMenu*>(w), itemId_ );
}
- else if ( ::qt_cast<QMenuBar *>( w ) )
- static_cast<QMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( KIcon::Small ), d->text() );
+ else if ( ::qt_cast<TQMenuBar *>( w ) )
+ static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( KIcon::Small ), d->text() );
else if ( ::qt_cast<KToolBar *>( w ) )
static_cast<KToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() );
}
-QString KAction::icon() const
+TQString KAction::icon() const
{
return d->iconName( );
}
-void KAction::setIconSet( const QIconSet &iconset )
+void KAction::setIconSet( const TQIconSet &iconset )
{
d->setIconSet( iconset );
@@ -962,17 +962,17 @@ void KAction::setIconSet( const QIconSet &iconset )
void KAction::updateIconSet( int id )
{
- QWidget *w = container( id );
+ TQWidget *w = container( id );
- if ( ::qt_cast<QPopupMenu *>( w ) )
+ if ( ::qt_cast<TQPopupMenu *>( w ) )
{
int itemId_ = itemId( id );
- static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() );
+ static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() );
if (!d->m_cut.isNull())
- updateShortcut( static_cast<QPopupMenu*>(w), itemId_ );
+ updateShortcut( static_cast<TQPopupMenu*>(w), itemId_ );
}
- else if ( ::qt_cast<QMenuBar *>( w ) )
- static_cast<QMenuBar*>(w)->changeItem( itemId( id ), d->iconSet(), d->text() );
+ else if ( ::qt_cast<TQMenuBar *>( w ) )
+ static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet(), d->text() );
else if ( ::qt_cast<KToolBar *>( w ) )
{
if ( icon().isEmpty() && d->hasIcon() ) // only if there is no named icon ( scales better )
@@ -982,7 +982,7 @@ void KAction::updateIconSet( int id )
}
}
-QIconSet KAction::iconSet( KIcon::Group group, int size ) const
+TQIconSet KAction::iconSet( KIcon::Group group, int size ) const
{
return d->iconSet( group, size );
}
@@ -992,7 +992,7 @@ bool KAction::hasIcon() const
return d->hasIcon();
}
-void KAction::setWhatsThis( const QString& text )
+void KAction::setWhatsThis( const TQString& text )
{
d->setWhatsThis( text );
@@ -1003,7 +1003,7 @@ void KAction::setWhatsThis( const QString& text )
void KAction::updateWhatsThis( int i )
{
- QPopupMenu* pm = popupMenu( i );
+ TQPopupMenu* pm = popupMenu( i );
if ( pm )
{
pm->setWhatsThis( itemId( i ), d->whatsThis() );
@@ -1013,27 +1013,27 @@ void KAction::updateWhatsThis( int i )
KToolBar *tb = toolBar( i );
if ( tb )
{
- QWidget *w = tb->getButton( itemId( i ) );
- QWhatsThis::remove( w );
- QWhatsThis::add( w, d->whatsThis() );
+ TQWidget *w = tb->getButton( itemId( i ) );
+ TQWhatsThis::remove( w );
+ TQWhatsThis::add( w, d->whatsThis() );
return;
}
}
-QString KAction::whatsThis() const
+TQString KAction::whatsThis() const
{
return d->whatsThis();
}
-QString KAction::whatsThisWithIcon() const
+TQString KAction::whatsThisWithIcon() const
{
- QString text = whatsThis();
+ TQString text = whatsThis();
if (!d->iconName().isEmpty())
- return QString::fromLatin1("<img source=\"small|%1\"> %2").arg(d->iconName() ).arg(text);
+ return TQString::fromLatin1("<img source=\"small|%1\"> %2").arg(d->iconName() ).arg(text);
return text;
}
-QWidget* KAction::container( int index ) const
+TQWidget* KAction::container( int index ) const
{
assert( index < containerCount() );
return d->m_containers[ index ].m_container;
@@ -1044,12 +1044,12 @@ KToolBar* KAction::toolBar( int index ) const
return dynamic_cast<KToolBar *>( d->m_containers[ index ].m_container );
}
-QPopupMenu* KAction::popupMenu( int index ) const
+TQPopupMenu* KAction::popupMenu( int index ) const
{
- return dynamic_cast<QPopupMenu *>( d->m_containers[ index ].m_container );
+ return dynamic_cast<TQPopupMenu *>( d->m_containers[ index ].m_container );
}
-QWidget* KAction::representative( int index ) const
+TQWidget* KAction::representative( int index ) const
{
return d->m_containers[ index ].m_representative;
}
@@ -1069,7 +1069,7 @@ uint KAction::kaccelCount() const
return d->m_kaccelList.count();
}
-void KAction::addContainer( QWidget* c, int id )
+void KAction::addContainer( TQWidget* c, int id )
{
KActionPrivate::Container p;
p.m_container = c;
@@ -1077,7 +1077,7 @@ void KAction::addContainer( QWidget* c, int id )
d->m_containers.append( p );
}
-void KAction::addContainer( QWidget* c, QWidget* w )
+void KAction::addContainer( TQWidget* c, TQWidget* w )
{
KActionPrivate::Container p;
p.m_container = c;
@@ -1093,7 +1093,7 @@ void KAction::activate()
void KAction::slotActivated()
{
- const QObject *senderObj = sender();
+ const TQObject *senderObj = sender();
if ( senderObj )
{
if ( ::qt_cast<KAccelPrivate *>( senderObj ) )
@@ -1104,17 +1104,17 @@ void KAction::slotActivated()
// This catches signals emitted by KActions inserted into QPopupMenu
// We do crude things inside it, because we need to know which
-// QPopupMenu emitted the signal. We need to be sure that it is
+// TQPopupMenu emitted the signal. We need to be sure that it is
// only called by QPopupMenus, we plugged us in.
void KAction::slotPopupActivated()
{
- if( ::qt_cast<QSignal *>(sender()))
+ if( ::qt_cast<TQSignal *>(sender()))
{
- int id = dynamic_cast<const QSignal *>(sender())->value().toInt();
+ int id = dynamic_cast<const TQSignal *>(sender())->value().toInt();
int pos = findContainer(id);
if(pos != -1)
{
- QPopupMenu* qpm = dynamic_cast<QPopupMenu *>( container(pos) );
+ TQPopupMenu* qpm = dynamic_cast<TQPopupMenu *>( container(pos) );
if(qpm)
{
KPopupMenu* kpm = dynamic_cast<KPopupMenu *>( qpm );
@@ -1151,7 +1151,7 @@ void KAction::slotButtonClicked( int, Qt::ButtonState state )
void KAction::slotDestroyed()
{
kdDebug(129) << "KAction::slotDestroyed(): this = " << this << ", name = \"" << name() << "\", sender = " << sender() << endl;
- const QObject* const o = sender();
+ const TQObject* const o = sender();
#ifndef KDE_NO_COMPAT // KDE 4: remove
if ( o == d->m_kaccel )
@@ -1160,15 +1160,15 @@ void KAction::slotDestroyed()
return;
}
#endif // KDE 4: remove end
- QValueList<KAccel*> & accelList = d->m_kaccelList;
- QValueList<KAccel*>::iterator itr = accelList.begin();
- const QValueList<KAccel*>::iterator itrEnd = accelList.end();
+ TQValueList<KAccel*> & accelList = d->m_kaccelList;
+ TQValueList<KAccel*>::iterator itr = accelList.begin();
+ const TQValueList<KAccel*>::iterator itrEnd = accelList.end();
for( ; itr != itrEnd; ++itr)
{
if ( o == *itr )
{
- disconnect( *itr, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) );
+ disconnect( *itr, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) );
accelList.remove(itr);
return;
}
@@ -1177,20 +1177,20 @@ void KAction::slotDestroyed()
int i;
do
{
- i = findContainer( static_cast<const QWidget*>( o ) );
+ i = findContainer( static_cast<const TQWidget*>( o ) );
if ( i != -1 )
removeContainer( i );
} while ( i != -1 );
}
-int KAction::findContainer( const QWidget* widget ) const
+int KAction::findContainer( const TQWidget* widget ) const
{
int pos = 0;
- const QValueList<KActionPrivate::Container> & containers = d->m_containers;
+ const TQValueList<KActionPrivate::Container> & containers = d->m_containers;
- QValueList<KActionPrivate::Container>::ConstIterator it = containers.constBegin();
- const QValueList<KActionPrivate::Container>::ConstIterator itEnd = containers.constEnd();
+ TQValueList<KActionPrivate::Container>::ConstIterator it = containers.constBegin();
+ const TQValueList<KActionPrivate::Container>::ConstIterator itEnd = containers.constEnd();
while( it != itEnd )
{
@@ -1207,10 +1207,10 @@ int KAction::findContainer( const int id ) const
{
int pos = 0;
- const QValueList<KActionPrivate::Container> & containers = d->m_containers;
+ const TQValueList<KActionPrivate::Container> & containers = d->m_containers;
- QValueList<KActionPrivate::Container>::ConstIterator it = containers.constBegin();
- const QValueList<KActionPrivate::Container>::ConstIterator itEnd = containers.constEnd();
+ TQValueList<KActionPrivate::Container>::ConstIterator it = containers.constBegin();
+ const TQValueList<KActionPrivate::Container>::ConstIterator itEnd = containers.constEnd();
while( it != itEnd )
{
@@ -1227,10 +1227,10 @@ void KAction::removeContainer( int index )
{
int i = 0;
- QValueList<KActionPrivate::Container> & containers = d->m_containers;
+ TQValueList<KActionPrivate::Container> & containers = d->m_containers;
- QValueList<KActionPrivate::Container>::Iterator it = containers.begin();
- const QValueList<KActionPrivate::Container>::Iterator itEnd = containers.end();
+ TQValueList<KActionPrivate::Container>::Iterator it = containers.begin();
+ const TQValueList<KActionPrivate::Container>::Iterator itEnd = containers.end();
while( it != itEnd )
{
diff --git a/kdeui/kaction.h b/kdeui/kaction.h
index 1217ce1e7..61b3d9b1d 100644
--- a/kdeui/kaction.h
+++ b/kdeui/kaction.h
@@ -26,10 +26,10 @@
#ifndef __kaction_h__
#define __kaction_h__
-#include <qkeysequence.h>
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qguardedptr.h>
+#include <tqkeysequence.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqguardedptr.h>
#include <kguiitem.h>
#include <kshortcut.h>
#include <kstdaction.h>
@@ -105,16 +105,16 @@ class KMainWindow;
* If you are in the situation of wanting to map the activated()
* signal of multiple action objects to one slot, with a special
* argument bound to each action, then you might consider using
- * QSignalMapper . A tiny example:
+ * TQSignalMapper . A tiny example:
*
* \code
- * QSignalMapper *desktopNumberMapper = new QSignalMapper( this );
- * connect( desktopNumberMapper, SIGNAL( mapped( int ) ),
- * this, SLOT( moveWindowToDesktop( int ) ) );
+ * TQSignalMapper *desktopNumberMapper = new TQSignalMapper( this );
+ * connect( desktopNumberMapper, TQT_SIGNAL( mapped( int ) ),
+ * this, TQT_SLOT( moveWindowToDesktop( int ) ) );
*
* for ( uint i = 0; i < numberOfDesktops; ++i ) {
* KAction *desktopAction = new KAction( i18n( "Move Window to Desktop %i" ).arg( i ), ... );
- * connect( desktopAction, SIGNAL( activated() ), desktopNumberMapper, SLOT( map() ) );
+ * connect( desktopAction, TQT_SIGNAL( activated() ), desktopNumberMapper, TQT_SLOT( map() ) );
* desktopNumberMapper->setMapping( desktopAction, i );
* }
* \endcode
@@ -135,7 +135,7 @@ class KMainWindow;
* \code
* KAction *newAct = new KAction(i18n("&New"), "filenew",
* KStdAccel::shortcut(KStdAccel::New),
- * this, SLOT(fileNew()),
+ * this, TQT_SLOT(fileNew()),
* actionCollection(), "new");
* \endcode
* This line creates our action. It says that wherever this action is
@@ -144,7 +144,7 @@ class KMainWindow;
* is invoked, it will use the fileNew() slot to execute it.
*
* \code
- * QPopupMenu *file = new QPopupMenu;
+ * TQPopupMenu *file = new QPopupMenu;
* newAct->plug(file);
* \endcode
* That just inserted the action into the File menu. The point is, it's not
@@ -204,18 +204,18 @@ class KDEUI_EXPORT KAction : public QObject
friend class KActionCollection;
Q_OBJECT
Q_PROPERTY( int containerCount READ containerCount )
- Q_PROPERTY( QString plainText READ plainText )
- Q_PROPERTY( QString text READ text WRITE setText )
- Q_PROPERTY( QString shortcut READ shortcutText WRITE setShortcutText )
+ Q_PROPERTY( TQString plainText READ plainText )
+ Q_PROPERTY( TQString text READ text WRITE setText )
+ Q_PROPERTY( TQString shortcut READ shortcutText WRITE setShortcutText )
Q_PROPERTY( bool enabled READ isEnabled WRITE setEnabled )
- Q_PROPERTY( QString group READ group WRITE setGroup )
- Q_PROPERTY( QString whatsThis READ whatsThis WRITE setWhatsThis )
- Q_PROPERTY( QString toolTip READ toolTip WRITE setToolTip )
- Q_PROPERTY( QString icon READ icon WRITE setIcon )
+ Q_PROPERTY( TQString group READ group WRITE setGroup )
+ Q_PROPERTY( TQString whatsThis READ whatsThis WRITE setWhatsThis )
+ Q_PROPERTY( TQString toolTip READ toolTip WRITE setToolTip )
+ Q_PROPERTY( TQString icon READ icon WRITE setIcon )
public:
/**
* Constructs an action with text, potential keyboard
- * shortcut, and a SLOT to call when this action is invoked by
+ * shortcut, and a TQT_SLOT to call when this action is invoked by
* the user.
*
* If you do not want or have a keyboard shortcut,
@@ -229,17 +229,17 @@ public:
* @param text The text that will be displayed.
* @param cut The corresponding keyboard shortcut.
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ KAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name );
/**
* Constructs an action with text, icon, potential keyboard
- * shortcut, and a SLOT to call when this action is invoked by
+ * shortcut, and a TQT_SLOT to call when this action is invoked by
* the user.
*
* If you do not want or have a keyboard shortcut, set the
@@ -252,17 +252,17 @@ public:
* @param pix The icon to display.
* @param cut The corresponding keyboard shortcut.
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name );
/**
* Constructs an action with text, icon, potential keyboard
- * shortcut, and a SLOT to call when this action is invoked by
+ * shortcut, and a TQT_SLOT to call when this action is invoked by
* the user. The icon is loaded on demand later based on where it
* is plugged in.
*
@@ -276,12 +276,12 @@ public:
* @param pix The icon to display.
* @param cut The corresponding keyboard shortcut (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ KAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name );
/**
@@ -291,48 +291,48 @@ public:
* @param item The KGuiItem with the label and (optional) icon.
* @param cut The corresponding keyboard shortcut (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
KAction( const KGuiItem& item, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name );
/**
* @obsolete
*/
- KAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
+ KAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 );
/**
* @obsolete
*/
- KAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @obsolete
*/
- KAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @obsolete
*/
- KAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @obsolete
*/
- KAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @obsolete
*/
- KAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ KAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name = 0 );
/**
* @obsolete
*/
- KAction( QObject* parent = 0, const char* name = 0 );
+ KAction( TQObject* parent = 0, const char* name = 0 );
/**
* Standard destructor
@@ -352,7 +352,7 @@ public:
* @param index The position into which the action is plugged. If
* this is negative, the action is inserted at the end.
*/
- virtual int plug( QWidget *widget, int index = -1 );
+ virtual int plug( TQWidget *widget, int index = -1 );
/**
* @deprecated. Shouldn't be used. No substitute available.
@@ -378,7 +378,7 @@ public:
*
* @param w Remove the action from this GUI element.
*/
- virtual void unplug( QWidget *w );
+ virtual void unplug( TQWidget *w );
/**
* @deprecated. Complement method to plugAccel().
@@ -395,23 +395,23 @@ public:
/**
* returns whether the action is plugged into the given container
*/
- bool isPlugged( const QWidget *container ) const;
+ bool isPlugged( const TQWidget *container ) const;
/**
* returns whether the action is plugged into the given container with the given, container specific, id (often
* menu or toolbar id ) .
*/
- virtual bool isPlugged( const QWidget *container, int id ) const;
+ virtual bool isPlugged( const TQWidget *container, int id ) const;
/**
* returns whether the action is plugged into the given container with the given, container specific, representative
* container widget item.
*/
- virtual bool isPlugged( const QWidget *container, const QWidget *_representative ) const;
+ virtual bool isPlugged( const TQWidget *container, const TQWidget *_representative ) const;
- QWidget* container( int index ) const;
+ TQWidget* container( int index ) const;
int itemId( int index ) const;
- QWidget* representative( int index ) const;
+ TQWidget* representative( int index ) const;
int containerCount() const;
/// @since 3.1
uint kaccelCount() const;
@@ -420,12 +420,12 @@ public:
#ifndef KDE_NO_COMPAT
bool hasIconSet() const { return hasIcon(); }
#endif
- virtual QString plainText() const;
+ virtual TQString plainText() const;
/**
* Get the text associated with this action.
*/
- virtual QString text() const;
+ virtual TQString text() const;
/**
* Get the keyboard shortcut associated with this action.
@@ -437,8 +437,8 @@ public:
virtual const KShortcut& shortcutDefault() const;
// These two methods are for Q_PROPERTY
- QString shortcutText() const;
- void setShortcutText( const QString& );
+ TQString shortcutText() const;
+ void setShortcutText( const TQString& );
/**
* Returns true if this action is enabled.
@@ -450,32 +450,32 @@ public:
*/
virtual bool isShortcutConfigurable() const;
- virtual QString group() const;
+ virtual TQString group() const;
/**
* Get the What's this text for the action.
*/
- virtual QString whatsThis() const;
+ virtual TQString whatsThis() const;
/**
* Get the tooltip text for the action.
*/
- virtual QString toolTip() const;
+ virtual TQString toolTip() const;
/**
- * Get the QIconSet from which the icons used to display this action will
+ * Get the TQIconSet from which the icons used to display this action will
* be chosen.
*
* In KDE4 set group default to KIcon::Small while removing the other
* iconSet() function.
*/
- virtual QIconSet iconSet( KIcon::Group group, int size=0 ) const;
+ virtual TQIconSet iconSet( KIcon::Group group, int size=0 ) const;
/**
* Remove in KDE4
*/
- QIconSet iconSet() const { return iconSet( KIcon::Small ); }
+ TQIconSet iconSet() const { return iconSet( KIcon::Small ); }
- virtual QString icon() const;
+ virtual TQString icon() const;
KActionCollection *parentCollection() const;
@@ -498,14 +498,14 @@ public slots:
* Sets the text associated with this action. The text is used for menu
* and toolbar labels etc.
*/
- virtual void setText(const QString &text);
+ virtual void setText(const TQString &text);
/**
* Sets the keyboard shortcut associated with this action.
*/
virtual bool setShortcut( const KShortcut& );
- virtual void setGroup( const QString& );
+ virtual void setGroup( const TQString& );
/**
* Sets the What's this text for the action. This text will be displayed when
@@ -514,7 +514,7 @@ public slots:
*
* The What's this text can include QML markup as well as raw text.
*/
- virtual void setWhatsThis( const QString& text );
+ virtual void setWhatsThis( const TQString& text );
/**
* Sets the tooltip text for the action.
@@ -530,15 +530,15 @@ public slots:
* @see KActionCollection
*
*/
- virtual void setToolTip( const QString& );
+ virtual void setToolTip( const TQString& );
/**
- * Sets the QIconSet from which the icons used to display this action will
+ * Sets the TQIconSet from which the icons used to display this action will
* be chosen.
*/
- virtual void setIconSet( const QIconSet &iconSet );
+ virtual void setIconSet( const TQIconSet &iconSet );
- virtual void setIcon( const QString& icon );
+ virtual void setIcon( const TQString& icon );
/**
* Enables or disables this action. All uses of this action (eg. in menus
@@ -574,17 +574,17 @@ protected slots:
protected:
KToolBar* toolBar( int index ) const;
- QPopupMenu* popupMenu( int index ) const;
+ TQPopupMenu* popupMenu( int index ) const;
void removeContainer( int index );
- int findContainer( const QWidget* widget ) const;
+ int findContainer( const TQWidget* widget ) const;
int findContainer( int id ) const;
- void plugMainWindowAccel( QWidget *w );
+ void plugMainWindowAccel( TQWidget *w );
- void addContainer( QWidget* parent, int id );
- void addContainer( QWidget* parent, QWidget* representative );
+ void addContainer( TQWidget* parent, int id );
+ void addContainer( TQWidget* parent, TQWidget* representative );
virtual void updateShortcut( int i );
- virtual void updateShortcut( QPopupMenu* menu, int id );
+ virtual void updateShortcut( TQPopupMenu* menu, int id );
virtual void updateGroup( int id );
virtual void updateText(int i );
virtual void updateEnabled(int i);
@@ -594,7 +594,7 @@ protected:
virtual void updateWhatsThis( int i );
KActionCollection *m_parentCollection;
- QString whatsThisWithIcon() const;
+ TQString whatsThisWithIcon() const;
/**
* Return the underlying KGuiItem
* @since 3.3
@@ -624,8 +624,8 @@ signals:
void enabled( bool );
private:
- void initPrivate( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot );
+ void initPrivate( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot );
KAccel* kaccelCurrent();
bool initShortcut( const KShortcut& );
void plugShortcut();
@@ -642,7 +642,7 @@ public:
*/
int accel() const KDE_DEPRECATED;
- QString statusText() const
+ TQString statusText() const
{ return toolTip(); }
/**
@@ -654,7 +654,7 @@ public:
/**
* @deprecated. Use setToolTip instead (they do the same thing now).
*/
- void setStatusText( const QString &text )
+ void setStatusText( const TQString &text )
{ setToolTip( text ); }
/**
diff --git a/kdeui/kactionclasses.cpp b/kdeui/kactionclasses.cpp
index 08ec02201..1fa7223cb 100644
--- a/kdeui/kactionclasses.cpp
+++ b/kdeui/kactionclasses.cpp
@@ -28,13 +28,13 @@
#include <assert.h>
-#include <qcursor.h>
-#include <qclipboard.h>
-#include <qfontdatabase.h>
-#include <qobjectlist.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqcursor.h>
+#include <tqclipboard.h>
+#include <tqfontdatabase.h>
+#include <tqobjectlist.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -64,63 +64,63 @@ public:
}
bool m_checked;
- QString m_exclusiveGroup;
+ TQString m_exclusiveGroup;
KGuiItem* m_checkedGuiItem;
};
-KToggleAction::KToggleAction( const QString& text, const KShortcut& cut,
- QObject* parent,
+KToggleAction::KToggleAction( const TQString& text, const KShortcut& cut,
+ TQObject* parent,
const char* name )
: KAction( text, cut, parent, name )
{
d = new KToggleActionPrivate;
}
-KToggleAction::KToggleAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+KToggleAction::KToggleAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KAction( text, cut, receiver, slot, parent, name )
{
d = new KToggleActionPrivate;
}
-KToggleAction::KToggleAction( const QString& text, const QIconSet& pix,
+KToggleAction::KToggleAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KAction( text, pix, cut, parent, name )
{
d = new KToggleActionPrivate;
}
-KToggleAction::KToggleAction( const QString& text, const QString& pix,
+KToggleAction::KToggleAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KAction( text, pix, cut, parent, name )
{
d = new KToggleActionPrivate;
}
-KToggleAction::KToggleAction( const QString& text, const QIconSet& pix,
+KToggleAction::KToggleAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KAction( text, pix, cut, receiver, slot, parent, name )
{
d = new KToggleActionPrivate;
}
-KToggleAction::KToggleAction( const QString& text, const QString& pix,
+KToggleAction::KToggleAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KAction( text, pix, cut, receiver, slot, parent, name )
{
d = new KToggleActionPrivate;
}
-KToggleAction::KToggleAction( QObject* parent, const char* name )
+KToggleAction::KToggleAction( TQObject* parent, const char* name )
: KAction( parent, name )
{
d = new KToggleActionPrivate;
@@ -132,9 +132,9 @@ KToggleAction::~KToggleAction()
delete d;
}
-int KToggleAction::plug( QWidget* widget, int index )
+int KToggleAction::plug( TQWidget* widget, int index )
{
- if ( !::qt_cast<QPopupMenu *>( widget ) && !::qt_cast<KToolBar *>( widget ) )
+ if ( !::qt_cast<TQPopupMenu *>( widget ) && !::qt_cast<KToolBar *>( widget ) )
{
kdWarning() << "Can not plug KToggleAction in " << widget->className() << endl;
return -1;
@@ -173,9 +173,9 @@ void KToggleAction::setChecked( bool c )
updateChecked( i );
if ( c && parent() && !exclusiveGroup().isEmpty() ) {
- const QObjectList *list = parent()->children();
+ const TQObjectList *list = parent()->children();
if ( list ) {
- QObjectListIt it( *list );
+ TQObjectListIt it( *list );
for( ; it.current(); ++it ) {
if ( ::qt_cast<KToggleAction *>( it.current() ) && it.current() != this &&
static_cast<KToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) {
@@ -192,10 +192,10 @@ void KToggleAction::setChecked( bool c )
void KToggleAction::updateChecked( int id )
{
- QWidget *w = container( id );
+ TQWidget *w = container( id );
- if ( ::qt_cast<QPopupMenu *>( w ) ) {
- QPopupMenu* pm = static_cast<QPopupMenu*>(w);
+ if ( ::qt_cast<TQPopupMenu *>( w ) ) {
+ TQPopupMenu* pm = static_cast<TQPopupMenu*>(w);
int itemId_ = itemId( id );
if ( !d->m_checkedGuiItem )
pm->setItemChecked( itemId_, d->m_checked );
@@ -216,11 +216,11 @@ void KToggleAction::updateChecked( int id )
updateShortcut( pm, itemId_ );
}
}
- else if ( ::qt_cast<QMenuBar *>( w ) ) // not handled in plug...
- static_cast<QMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked );
+ else if ( ::qt_cast<TQMenuBar *>( w ) ) // not handled in plug...
+ static_cast<TQMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked );
else if ( ::qt_cast<KToolBar *>( w ) )
{
- QWidget* r = static_cast<KToolBar*>( w )->getButton( itemId( id ) );
+ TQWidget* r = static_cast<KToolBar*>( w )->getButton( itemId( id ) );
if ( r && ::qt_cast<KToolBarButton *>( r ) ) {
static_cast<KToolBar*>( w )->setButton( itemId( id ), d->m_checked );
if ( d->m_checkedGuiItem && d->m_checkedGuiItem->hasIcon() ) {
@@ -243,12 +243,12 @@ bool KToggleAction::isChecked() const
return d->m_checked;
}
-void KToggleAction::setExclusiveGroup( const QString& name )
+void KToggleAction::setExclusiveGroup( const TQString& name )
{
d->m_exclusiveGroup = name;
}
-QString KToggleAction::exclusiveGroup() const
+TQString KToggleAction::exclusiveGroup() const
{
return d->m_exclusiveGroup;
}
@@ -259,7 +259,7 @@ void KToggleAction::setCheckedState( const KGuiItem& checkedItem )
d->m_checkedGuiItem = new KGuiItem( checkedItem );
}
-QString KToggleAction::toolTip() const
+TQString KToggleAction::toolTip() const
{
if ( d->m_checkedGuiItem && d->m_checked )
return d->m_checkedGuiItem->toolTip();
@@ -267,50 +267,50 @@ QString KToggleAction::toolTip() const
return KAction::toolTip();
}
-KRadioAction::KRadioAction( const QString& text, const KShortcut& cut,
- QObject* parent, const char* name )
+KRadioAction::KRadioAction( const TQString& text, const KShortcut& cut,
+ TQObject* parent, const char* name )
: KToggleAction( text, cut, parent, name )
{
}
-KRadioAction::KRadioAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+KRadioAction::KRadioAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KToggleAction( text, cut, receiver, slot, parent, name )
{
}
-KRadioAction::KRadioAction( const QString& text, const QIconSet& pix,
+KRadioAction::KRadioAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KToggleAction( text, pix, cut, parent, name )
{
}
-KRadioAction::KRadioAction( const QString& text, const QString& pix,
+KRadioAction::KRadioAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KToggleAction( text, pix, cut, parent, name )
{
}
-KRadioAction::KRadioAction( const QString& text, const QIconSet& pix,
+KRadioAction::KRadioAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KToggleAction( text, pix, cut, receiver, slot, parent, name )
{
}
-KRadioAction::KRadioAction( const QString& text, const QString& pix,
+KRadioAction::KRadioAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KToggleAction( text, pix, cut, receiver, slot, parent, name )
{
}
-KRadioAction::KRadioAction( QObject* parent, const char* name )
+KRadioAction::KRadioAction( TQObject* parent, const char* name )
: KToggleAction( parent, name )
{
}
@@ -319,7 +319,7 @@ void KRadioAction::slotActivated()
{
if ( isChecked() )
{
- const QObject *senderObj = sender();
+ const TQObject *senderObj = sender();
if ( !senderObj || !::qt_cast<const KToolBarButton *>( senderObj ) )
return;
@@ -346,17 +346,17 @@ public:
}
bool m_edit;
bool m_menuAccelsEnabled;
- QPopupMenu *m_menu;
+ TQPopupMenu *m_menu;
int m_current;
int m_comboWidth;
- QStringList m_list;
+ TQStringList m_list;
int m_maxComboViewCount;
- QString makeMenuText( const QString &_text )
+ TQString makeMenuText( const TQString &_text )
{
if ( m_menuAccelsEnabled )
return _text;
- QString text = _text;
+ TQString text = _text;
uint i = 0;
while ( i < text.length() ) {
if ( text[ i ] == '&' ) {
@@ -370,58 +370,58 @@ public:
}
};
-KSelectAction::KSelectAction( const QString& text, const KShortcut& cut,
- QObject* parent, const char* name )
+KSelectAction::KSelectAction( const TQString& text, const KShortcut& cut,
+ TQObject* parent, const char* name )
: KAction( text, cut, parent, name )
{
d = new KSelectActionPrivate;
}
-KSelectAction::KSelectAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+KSelectAction::KSelectAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KAction( text, cut, receiver, slot, parent, name )
{
d = new KSelectActionPrivate;
}
-KSelectAction::KSelectAction( const QString& text, const QIconSet& pix,
+KSelectAction::KSelectAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KAction( text, pix, cut, parent, name )
{
d = new KSelectActionPrivate;
}
-KSelectAction::KSelectAction( const QString& text, const QString& pix,
+KSelectAction::KSelectAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KAction( text, pix, cut, parent, name )
{
d = new KSelectActionPrivate;
}
-KSelectAction::KSelectAction( const QString& text, const QIconSet& pix,
+KSelectAction::KSelectAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KAction( text, pix, cut, receiver, slot, parent, name )
{
d = new KSelectActionPrivate;
}
-KSelectAction::KSelectAction( const QString& text, const QString& pix,
+KSelectAction::KSelectAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KAction( text, pix, cut, receiver, slot, parent, name )
{
d = new KSelectActionPrivate;
}
-KSelectAction::KSelectAction( QObject* parent, const char* name )
+KSelectAction::KSelectAction( TQObject* parent, const char* name )
: KAction( parent, name )
{
d = new KSelectActionPrivate;
@@ -480,7 +480,7 @@ void KSelectAction::setMaxComboViewCount( int n )
d->m_maxComboViewCount = n;
}
-QPopupMenu* KSelectAction::popupMenu() const
+TQPopupMenu* KSelectAction::popupMenu() const
{
kdDebug(129) << "KAction::popupMenu()" << endl; // remove -- ellis
if ( !d->m_menu )
@@ -500,17 +500,17 @@ void KSelectAction::setupMenu() const
return;
d->m_menu->clear();
- QStringList::ConstIterator it = d->m_list.begin();
+ TQStringList::ConstIterator it = d->m_list.begin();
for( uint id = 0; it != d->m_list.end(); ++it, ++id ) {
- QString text = *it;
+ TQString text = *it;
if ( !text.isEmpty() )
- d->m_menu->insertItem( d->makeMenuText( text ), this, SLOT( slotActivated( int ) ), 0, id );
+ d->m_menu->insertItem( d->makeMenuText( text ), this, TQT_SLOT( slotActivated( int ) ), 0, id );
else
d->m_menu->insertSeparator();
}
}
-void KSelectAction::changeItem( int index, const QString& text )
+void KSelectAction::changeItem( int index, const TQString& text )
{
if ( index < 0 || index >= (int)d->m_list.count() )
{
@@ -528,24 +528,24 @@ void KSelectAction::changeItem( int index, const QString& text )
changeItem( i, index, text );
}
-void KSelectAction::changeItem( int id, int index, const QString& text)
+void KSelectAction::changeItem( int id, int index, const TQString& text)
{
if ( index < 0 )
return;
- QWidget* w = container( id );
+ TQWidget* w = container( id );
if ( ::qt_cast<KToolBar *>( w ) )
{
- QWidget* r = (static_cast<KToolBar*>( w ))->getWidget( itemId( id ) );
- if ( ::qt_cast<QComboBox *>( r ) )
+ TQWidget* r = (static_cast<KToolBar*>( w ))->getWidget( itemId( id ) );
+ if ( ::qt_cast<TQComboBox *>( r ) )
{
- QComboBox *b = static_cast<QComboBox*>( r );
+ TQComboBox *b = static_cast<TQComboBox*>( r );
b->changeItem(text, index );
}
}
}
-void KSelectAction::setItems( const QStringList &lst )
+void KSelectAction::setItems( const TQStringList &lst )
{
d->m_list = lst;
d->m_current = -1;
@@ -560,15 +560,15 @@ void KSelectAction::setItems( const QStringList &lst )
setEnabled ( lst.count() > 0 || d->m_edit );
}
-QStringList KSelectAction::items() const
+TQStringList KSelectAction::items() const
{
return d->m_list;
}
-QString KSelectAction::currentText() const
+TQString KSelectAction::currentText() const
{
if ( currentItem() < 0 )
- return QString::null;
+ return TQString::null;
return d->m_list[ currentItem() ];
}
@@ -583,11 +583,11 @@ void KSelectAction::updateCurrentItem( int id )
if ( d->m_current < 0 )
return;
- QWidget* w = container( id );
+ TQWidget* w = container( id );
if ( ::qt_cast<KToolBar *>( w ) ) {
- QWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
- if ( ::qt_cast<QComboBox *>( r ) ) {
- QComboBox *b = static_cast<QComboBox*>( r );
+ TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
+ if ( ::qt_cast<TQComboBox *>( r ) ) {
+ TQComboBox *b = static_cast<TQComboBox*>( r );
b->setCurrentItem( d->m_current );
}
}
@@ -600,11 +600,11 @@ int KSelectAction::comboWidth() const
void KSelectAction::updateComboWidth( int id )
{
- QWidget* w = container( id );
+ TQWidget* w = container( id );
if ( ::qt_cast<KToolBar *>( w ) ) {
- QWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
- if ( ::qt_cast<QComboBox *>( r ) ) {
- QComboBox *cb = static_cast<QComboBox*>( r );
+ TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
+ if ( ::qt_cast<TQComboBox *>( r ) ) {
+ TQComboBox *cb = static_cast<TQComboBox*>( r );
cb->setMinimumWidth( d->m_comboWidth );
cb->setMaximumWidth( d->m_comboWidth );
}
@@ -614,14 +614,14 @@ void KSelectAction::updateComboWidth( int id )
void KSelectAction::updateItems( int id )
{
kdDebug(129) << "KAction::updateItems( " << id << ", lst )" << endl; // remove -- ellis
- QWidget* w = container( id );
+ TQWidget* w = container( id );
if ( ::qt_cast<KToolBar *>( w ) ) {
- QWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
- if ( ::qt_cast<QComboBox *>( r ) ) {
- QComboBox *cb = static_cast<QComboBox*>( r );
+ TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
+ if ( ::qt_cast<TQComboBox *>( r ) ) {
+ TQComboBox *cb = static_cast<TQComboBox*>( r );
cb->clear();
- QStringList lst = comboItems();
- QStringList::ConstIterator it = lst.begin();
+ TQStringList lst = comboItems();
+ TQStringList::ConstIterator it = lst.begin();
for( ; it != lst.end(); ++it )
cb->insertItem( *it );
// qt caches and never recalculates the sizeHint()
@@ -633,17 +633,17 @@ void KSelectAction::updateItems( int id )
}
}
-int KSelectAction::plug( QWidget *widget, int index )
+int KSelectAction::plug( TQWidget *widget, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
kdDebug(129) << "KSelectAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis
- if ( ::qt_cast<QPopupMenu *>( widget) )
+ if ( ::qt_cast<TQPopupMenu *>( widget) )
{
// Create the PopupMenu and store it in m_menu
(void)popupMenu();
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget );
int id;
if ( hasIcon() )
id = menu->insertItem( iconSet(), text(), d->m_menu, -1, index );
@@ -653,12 +653,12 @@ int KSelectAction::plug( QWidget *widget, int index )
if ( !isEnabled() )
menu->setItemEnabled( id, false );
- QString wth = whatsThis();
+ TQString wth = whatsThis();
if ( !wth.isEmpty() )
menu->setWhatsThis( id, wth );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -667,50 +667,50 @@ int KSelectAction::plug( QWidget *widget, int index )
KToolBar* bar = static_cast<KToolBar*>( widget );
int id_ = KAction::getToolButtonID();
bar->insertCombo( comboItems(), id_, isEditable(),
- SIGNAL( activated( const QString & ) ), this,
- SLOT( slotActivated( const QString & ) ), isEnabled(),
+ TQT_SIGNAL( activated( const TQString & ) ), this,
+ TQT_SLOT( slotActivated( const TQString & ) ), isEnabled(),
toolTip(), -1, index );
- QComboBox *cb = bar->getCombo( id_ );
+ TQComboBox *cb = bar->getCombo( id_ );
if ( cb )
{
- if (!isEditable()) cb->setFocusPolicy(QWidget::NoFocus);
+ if (!isEditable()) cb->setFocusPolicy(TQWidget::NoFocus);
cb->setMinimumWidth( cb->sizeHint().width() );
if ( d->m_comboWidth > 0 )
{
cb->setMinimumWidth( d->m_comboWidth );
cb->setMaximumWidth( d->m_comboWidth );
}
- cb->setInsertionPolicy( QComboBox::NoInsertion );
- QWhatsThis::add( cb, whatsThis() );
+ cb->setInsertionPolicy( TQComboBox::NoInsertion );
+ TQWhatsThis::add( cb, whatsThis() );
if ( d->m_maxComboViewCount != -1 ) cb->setSizeLimit( d->m_maxComboViewCount );
}
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
updateCurrentItem( containerCount() - 1 );
return containerCount() - 1;
}
- else if ( ::qt_cast<QMenuBar *>( widget ) )
+ else if ( ::qt_cast<TQMenuBar *>( widget ) )
{
// Create the PopupMenu and store it in m_menu
(void)popupMenu();
- QMenuBar* menu = static_cast<QMenuBar*>( widget );
+ TQMenuBar* menu = static_cast<TQMenuBar*>( widget );
int id = menu->insertItem( text(), d->m_menu, -1, index );
if ( !isEnabled() )
menu->setItemEnabled( id, false );
- QString wth = whatsThis();
+ TQString wth = whatsThis();
if ( !wth.isEmpty() )
menu->setWhatsThis( id, wth );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -719,14 +719,14 @@ int KSelectAction::plug( QWidget *widget, int index )
return -1;
}
-QStringList KSelectAction::comboItems() const
+TQStringList KSelectAction::comboItems() const
{
if( d->m_menuAccelsEnabled ) {
- QStringList lst;
- QStringList::ConstIterator it = d->m_list.begin();
+ TQStringList lst;
+ TQStringList::ConstIterator it = d->m_list.begin();
for( ; it != d->m_list.end(); ++it )
{
- QString item = *it;
+ TQString item = *it;
int i = item.find( '&' );
if ( i > -1 )
item = item.remove( i, 1 );
@@ -750,11 +750,11 @@ void KSelectAction::clear()
void KSelectAction::updateClear( int id )
{
- QWidget* w = container( id );
+ TQWidget* w = container( id );
if ( ::qt_cast<KToolBar *>( w ) ) {
- QWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
- if ( ::qt_cast<QComboBox *>( r ) ) {
- QComboBox *b = static_cast<QComboBox*>( r );
+ TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
+ if ( ::qt_cast<TQComboBox *>( r ) ) {
+ TQComboBox *b = static_cast<TQComboBox*>( r );
b->clear();
}
}
@@ -768,14 +768,14 @@ void KSelectAction::slotActivated( int id )
setCurrentItem( id );
// Delay this. Especially useful when the slot connected to activated() will re-create
// the menu, e.g. in the recent files action. This prevents a crash.
- QTimer::singleShot( 0, this, SLOT( slotActivated() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotActivated() ) );
}
-void KSelectAction::slotActivated( const QString &text )
+void KSelectAction::slotActivated( const TQString &text )
{
if ( isEditable() )
{
- QStringList lst = d->m_list;
+ TQStringList lst = d->m_list;
if(!lst.contains(text))
{
lst.append( text );
@@ -790,7 +790,7 @@ void KSelectAction::slotActivated( const QString &text )
setCurrentItem( comboItems().findIndex( text ) );
// Delay this. Especially useful when the slot connected to activated() will re-create
// the menu, e.g. in the recent files action. This prevents a crash.
- QTimer::singleShot( 0, this, SLOT( slotActivated() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotActivated() ) );
}
void KSelectAction::slotActivated()
@@ -841,62 +841,62 @@ public:
int m_current;
};
-KListAction::KListAction( const QString& text, const KShortcut& cut,
- QObject* parent, const char* name )
+KListAction::KListAction( const TQString& text, const KShortcut& cut,
+ TQObject* parent, const char* name )
: KSelectAction( text, cut, parent, name )
{
d = new KListActionPrivate;
}
-KListAction::KListAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+KListAction::KListAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KSelectAction( text, cut, parent, name )
{
d = new KListActionPrivate;
if ( receiver )
- connect( this, SIGNAL( activated( int ) ), receiver, slot );
+ connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot );
}
-KListAction::KListAction( const QString& text, const QIconSet& pix,
+KListAction::KListAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KListActionPrivate;
}
-KListAction::KListAction( const QString& text, const QString& pix,
+KListAction::KListAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KListActionPrivate;
}
-KListAction::KListAction( const QString& text, const QIconSet& pix,
- const KShortcut& cut, const QObject* receiver,
- const char* slot, QObject* parent,
+KListAction::KListAction( const TQString& text, const TQIconSet& pix,
+ const KShortcut& cut, const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KListActionPrivate;
if ( receiver )
- connect( this, SIGNAL( activated( int ) ), receiver, slot );
+ connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot );
}
-KListAction::KListAction( const QString& text, const QString& pix,
- const KShortcut& cut, const QObject* receiver,
- const char* slot, QObject* parent,
+KListAction::KListAction( const TQString& text, const TQString& pix,
+ const KShortcut& cut, const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KListActionPrivate;
if ( receiver )
- connect( this, SIGNAL( activated( int ) ), receiver, slot );
+ connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot );
}
-KListAction::KListAction( QObject* parent, const char* name )
+KListAction::KListAction( TQObject* parent, const char* name )
: KSelectAction( parent, name )
{
d = new KListActionPrivate;
@@ -917,7 +917,7 @@ void KListAction::setCurrentItem( int index )
// emit activated( currentText() );
}
-QString KListAction::currentText() const
+TQString KListAction::currentText() const
{
return KSelectAction::currentText();
}
@@ -937,13 +937,13 @@ public:
}
uint m_maxItems;
KPopupMenu *m_popup;
- QMap<QString, QString> m_shortNames;
- QMap<QString, KURL> m_urls;
+ TQMap<TQString, TQString> m_shortNames;
+ TQMap<TQString, KURL> m_urls;
};
-KRecentFilesAction::KRecentFilesAction( const QString& text,
+KRecentFilesAction::KRecentFilesAction( const TQString& text,
const KShortcut& cut,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
uint maxItems )
: KListAction( text, cut, parent, name)
{
@@ -953,11 +953,11 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
init();
}
-KRecentFilesAction::KRecentFilesAction( const QString& text,
+KRecentFilesAction::KRecentFilesAction( const TQString& text,
const KShortcut& cut,
- const QObject* receiver,
+ const TQObject* receiver,
const char* slot,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
uint maxItems )
: KListAction( text, cut, parent, name)
{
@@ -967,14 +967,14 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
init();
if ( receiver )
- connect( this, SIGNAL(urlSelected(const KURL&)),
+ connect( this, TQT_SIGNAL(urlSelected(const KURL&)),
receiver, slot );
}
-KRecentFilesAction::KRecentFilesAction( const QString& text,
- const QIconSet& pix,
+KRecentFilesAction::KRecentFilesAction( const TQString& text,
+ const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
uint maxItems )
: KListAction( text, pix, cut, parent, name)
{
@@ -984,10 +984,10 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
init();
}
-KRecentFilesAction::KRecentFilesAction( const QString& text,
- const QString& pix,
+KRecentFilesAction::KRecentFilesAction( const TQString& text,
+ const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
uint maxItems )
: KListAction( text, pix, cut, parent, name)
{
@@ -997,12 +997,12 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
init();
}
-KRecentFilesAction::KRecentFilesAction( const QString& text,
- const QIconSet& pix,
+KRecentFilesAction::KRecentFilesAction( const TQString& text,
+ const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver,
+ const TQObject* receiver,
const char* slot,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
uint maxItems )
: KListAction( text, pix, cut, parent, name)
{
@@ -1012,16 +1012,16 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
init();
if ( receiver )
- connect( this, SIGNAL(urlSelected(const KURL&)),
+ connect( this, TQT_SIGNAL(urlSelected(const KURL&)),
receiver, slot );
}
-KRecentFilesAction::KRecentFilesAction( const QString& text,
- const QString& pix,
+KRecentFilesAction::KRecentFilesAction( const TQString& text,
+ const TQString& pix,
const KShortcut& cut,
- const QObject* receiver,
+ const TQObject* receiver,
const char* slot,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
uint maxItems )
: KListAction( text, pix, cut, parent, name)
{
@@ -1031,11 +1031,11 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
init();
if ( receiver )
- connect( this, SIGNAL(urlSelected(const KURL&)),
+ connect( this, TQT_SIGNAL(urlSelected(const KURL&)),
receiver, slot );
}
-KRecentFilesAction::KRecentFilesAction( QObject* parent, const char* name,
+KRecentFilesAction::KRecentFilesAction( TQObject* parent, const char* name,
uint maxItems )
: KListAction( parent, name )
{
@@ -1049,10 +1049,10 @@ void KRecentFilesAction::init()
{
KRecentFilesAction *that = const_cast<KRecentFilesAction*>(this);
that->d->m_popup = new KPopupMenu;
- connect(d->m_popup, SIGNAL(aboutToShow()), this, SLOT(menuAboutToShow()));
- connect(d->m_popup, SIGNAL(activated(int)), this, SLOT(menuItemActivated(int)));
- connect( this, SIGNAL( activated( const QString& ) ),
- this, SLOT( itemSelected( const QString& ) ) );
+ 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& ) ),
+ this, TQT_SLOT( itemSelected( const TQString& ) ) );
setMenuAccelsEnabled( false );
}
@@ -1070,7 +1070,7 @@ uint KRecentFilesAction::maxItems() const
void KRecentFilesAction::setMaxItems( uint maxItems )
{
- QStringList lst = KSelectAction::items();
+ TQStringList lst = KSelectAction::items();
uint oldCount = lst.count();
// set new maxItems
@@ -1080,7 +1080,7 @@ void KRecentFilesAction::setMaxItems( uint maxItems )
while( lst.count() > maxItems )
{
// remove last item
- QString lastItem = lst.last();
+ TQString lastItem = lst.last();
d->m_shortNames.erase( lastItem );
d->m_urls.erase( lastItem );
lst.remove( lastItem );
@@ -1096,18 +1096,18 @@ void KRecentFilesAction::addURL( const KURL& url )
addURL( url, url.fileName() );
}
-void KRecentFilesAction::addURL( const KURL& url, const QString& name )
+void KRecentFilesAction::addURL( const KURL& url, const TQString& name )
{
if ( url.isLocalFile() && !KGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/"))
return;
- const QString file = url.pathOrURL();
- QStringList lst = KSelectAction::items();
+ const TQString file = url.pathOrURL();
+ TQStringList lst = KSelectAction::items();
// remove file if already in list
- const QStringList::Iterator end = lst.end();
- for ( QStringList::Iterator it = lst.begin(); it != end; ++it )
+ const TQStringList::Iterator end = lst.end();
+ for ( TQStringList::Iterator it = lst.begin(); it != end; ++it )
{
- QString title = (*it);
+ TQString title = (*it);
if ( title.endsWith( file + "]" ) )
{
lst.remove( it );
@@ -1120,14 +1120,14 @@ void KRecentFilesAction::addURL( const KURL& url, const QString& name )
if( lst.count() == d->m_maxItems )
{
// remove last item
- const QString lastItem = lst.last();
+ const TQString lastItem = lst.last();
d->m_shortNames.erase( lastItem );
d->m_urls.erase( lastItem );
lst.remove( lastItem );
}
// add file to list
- const QString title = name + " [" + file + "]";
+ const TQString title = name + " [" + file + "]";
d->m_shortNames.insert( title, name );
d->m_urls.insert( title, url );
lst.prepend( title );
@@ -1136,12 +1136,12 @@ void KRecentFilesAction::addURL( const KURL& url, const QString& name )
void KRecentFilesAction::removeURL( const KURL& url )
{
- QStringList lst = KSelectAction::items();
- QString file = url.pathOrURL();
+ TQStringList lst = KSelectAction::items();
+ TQString file = url.pathOrURL();
// remove url
- QStringList::Iterator end = lst.end();
- for ( QStringList::Iterator it = lst.begin(); it != end; ++it )
+ TQStringList::Iterator end = lst.end();
+ for ( TQStringList::Iterator it = lst.begin(); it != end; ++it )
{
if ( (*it).endsWith( file + "]" ))
{
@@ -1161,15 +1161,15 @@ void KRecentFilesAction::clearURLList()
d->m_urls.clear();
}
-void KRecentFilesAction::loadEntries( KConfig* config, QString groupname)
+void KRecentFilesAction::loadEntries( KConfig* config, TQString groupname)
{
- QString key;
- QString value;
- QString nameKey;
- QString nameValue;
- QString title;
- QString oldGroup;
- QStringList lst;
+ TQString key;
+ TQString value;
+ TQString nameKey;
+ TQString nameValue;
+ TQString title;
+ TQString oldGroup;
+ TQStringList lst;
KURL url;
oldGroup = config->group();
@@ -1181,15 +1181,15 @@ void KRecentFilesAction::loadEntries( KConfig* config, QString groupname)
// read file list
for( unsigned int i = 1 ; i <= d->m_maxItems ; i++ )
{
- key = QString( "File%1" ).arg( i );
+ key = TQString( "File%1" ).arg( i );
value = config->readPathEntry( key );
url = KURL::fromPathOrURL( value );
// Don't restore if file doesn't exist anymore
- if (url.isLocalFile() && !QFile::exists(url.path()))
+ if (url.isLocalFile() && !TQFile::exists(url.path()))
continue;
- nameKey = QString( "Name%1" ).arg( i );
+ nameKey = TQString( "Name%1" ).arg( i );
nameValue = config->readPathEntry( nameKey, url.fileName() );
title = nameValue + " [" + value + "]";
if (!value.isNull())
@@ -1206,12 +1206,12 @@ void KRecentFilesAction::loadEntries( KConfig* config, QString groupname)
config->setGroup( oldGroup );
}
-void KRecentFilesAction::saveEntries( KConfig* config, QString groupname )
+void KRecentFilesAction::saveEntries( KConfig* config, TQString groupname )
{
- QString key;
- QString value;
- QString oldGroup;
- QStringList lst = KSelectAction::items();
+ TQString key;
+ TQString value;
+ TQString oldGroup;
+ TQStringList lst = KSelectAction::items();
oldGroup = config->group();
@@ -1224,10 +1224,10 @@ void KRecentFilesAction::saveEntries( KConfig* config, QString groupname )
for( unsigned int i = 1 ; i <= lst.count() ; i++ )
{
//kdDebug(129) << "Entry for " << lst[i-1] << d->m_urls[ lst[ i - 1 ] ] << endl;
- key = QString( "File%1" ).arg( i );
+ key = TQString( "File%1" ).arg( i );
value = d->m_urls[ lst[ i - 1 ] ].pathOrURL();
config->writePathEntry( key, value );
- key = QString( "Name%1" ).arg( i );
+ key = TQString( "Name%1" ).arg( i );
value = d->m_shortNames[ lst[ i - 1 ] ];
config->writePathEntry( key, value );
}
@@ -1235,7 +1235,7 @@ void KRecentFilesAction::saveEntries( KConfig* config, QString groupname )
config->setGroup( oldGroup );
}
-void KRecentFilesAction::itemSelected( const QString& text )
+void KRecentFilesAction::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
@@ -1245,7 +1245,7 @@ void KRecentFilesAction::itemSelected( const QString& text )
void KRecentFilesAction::menuItemActivated( int id )
{
- QString text = d->m_popup->text(id);
+ TQString text = d->m_popup->text(id);
//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
//d->m_urls[ text ] and the emitted URL will be invalid in the rest of the slot
@@ -1256,14 +1256,14 @@ void KRecentFilesAction::menuAboutToShow()
{
KPopupMenu *menu = d->m_popup;
menu->clear();
- QStringList list = KSelectAction::items();
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ TQStringList list = KSelectAction::items();
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
menu->insertItem(*it);
}
}
-int KRecentFilesAction::plug( QWidget *widget, int index )
+int KRecentFilesAction::plug( TQWidget *widget, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
@@ -1281,18 +1281,18 @@ int KRecentFilesAction::plug( QWidget *widget, int index )
else
instance = KGlobal::instance();
- bar->insertButton( icon(), id_, SIGNAL( clicked() ), this,
- SLOT( slotClicked() ), isEnabled(), plainText(),
+ bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotClicked() ), isEnabled(), plainText(),
index, instance );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
bar->setDelayedPopup( id_, d->m_popup, true);
if ( !whatsThis().isEmpty() )
- QWhatsThis::add( bar->getButton( id_ ), whatsThisWithIcon() );
+ TQWhatsThis::add( bar->getButton( id_ ), whatsThisWithIcon() );
return containerCount() - 1;
}
@@ -1305,7 +1305,7 @@ void KRecentFilesAction::slotClicked()
KAction::slotActivated();
}
-void KRecentFilesAction::slotActivated(const QString& text)
+void KRecentFilesAction::slotActivated(const TQString& text)
{
KListAction::slotActivated(text);
}
@@ -1324,10 +1324,10 @@ void KRecentFilesAction::slotActivated()
}
//KDE4: rename to urls() and return a KURL::List
-QStringList KRecentFilesAction::items() const
+TQStringList KRecentFilesAction::items() const
{
- QStringList lst = KSelectAction::items();
- QStringList result;
+ TQStringList lst = KSelectAction::items();
+ TQStringList result;
for( unsigned int i = 1 ; i <= lst.count() ; i++ )
{
@@ -1338,7 +1338,7 @@ QStringList KRecentFilesAction::items() const
}
//KDE4: remove
-QStringList KRecentFilesAction::completeItems() const
+TQStringList KRecentFilesAction::completeItems() const
{
return KSelectAction::items();
}
@@ -1350,11 +1350,11 @@ public:
KFontActionPrivate()
{
}
- QStringList m_fonts;
+ TQStringList m_fonts;
};
-KFontAction::KFontAction( const QString& text,
- const KShortcut& cut, QObject* parent,
+KFontAction::KFontAction( const TQString& text,
+ const KShortcut& cut, TQObject* parent,
const char* name )
: KSelectAction( text, cut, parent, name )
{
@@ -1364,9 +1364,9 @@ KFontAction::KFontAction( const QString& text,
setEditable( true );
}
-KFontAction::KFontAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+KFontAction::KFontAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KSelectAction( text, cut, receiver, slot, parent, name )
{
d = new KFontActionPrivate;
@@ -1375,9 +1375,9 @@ KFontAction::KFontAction( const QString& text, const KShortcut& cut,
setEditable( true );
}
-KFontAction::KFontAction( const QString& text, const QIconSet& pix,
+KFontAction::KFontAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KFontActionPrivate;
@@ -1386,9 +1386,9 @@ KFontAction::KFontAction( const QString& text, const QIconSet& pix,
setEditable( true );
}
-KFontAction::KFontAction( const QString& text, const QString& pix,
+KFontAction::KFontAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KFontActionPrivate;
@@ -1397,10 +1397,10 @@ KFontAction::KFontAction( const QString& text, const QString& pix,
setEditable( true );
}
-KFontAction::KFontAction( const QString& text, const QIconSet& pix,
+KFontAction::KFontAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, receiver, slot, parent, name )
{
d = new KFontActionPrivate;
@@ -1409,10 +1409,10 @@ KFontAction::KFontAction( const QString& text, const QIconSet& pix,
setEditable( true );
}
-KFontAction::KFontAction( const QString& text, const QString& pix,
+KFontAction::KFontAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, receiver, slot, parent, name )
{
d = new KFontActionPrivate;
@@ -1421,8 +1421,8 @@ KFontAction::KFontAction( const QString& text, const QString& pix,
setEditable( true );
}
-KFontAction::KFontAction( uint fontListCriteria, const QString& text,
- const KShortcut& cut, QObject* parent,
+KFontAction::KFontAction( uint fontListCriteria, const TQString& text,
+ const KShortcut& cut, TQObject* parent,
const char* name )
: KSelectAction( text, cut, parent, name )
{
@@ -1432,9 +1432,9 @@ KFontAction::KFontAction( uint fontListCriteria, const QString& text,
setEditable( true );
}
-KFontAction::KFontAction( uint fontListCriteria, const QString& text, const QString& pix,
+KFontAction::KFontAction( uint fontListCriteria, const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
d = new KFontActionPrivate;
@@ -1443,7 +1443,7 @@ KFontAction::KFontAction( uint fontListCriteria, const QString& text, const QStr
setEditable( true );
}
-KFontAction::KFontAction( QObject* parent, const char* name )
+KFontAction::KFontAction( TQObject* parent, const char* name )
: KSelectAction( parent, name )
{
d = new KFontActionPrivate;
@@ -1461,11 +1461,11 @@ KFontAction::~KFontAction()
/*
* Maintenance note: Keep in sync with KFontCombo::setCurrentFont()
*/
-void KFontAction::setFont( const QString &family )
+void KFontAction::setFont( const TQString &family )
{
- QString lowerName = family.lower();
+ TQString lowerName = family.lower();
int i = 0;
- for ( QStringList::Iterator it = d->m_fonts.begin(); it != d->m_fonts.end(); ++it, ++i )
+ for ( TQStringList::Iterator it = d->m_fonts.begin(); it != d->m_fonts.end(); ++it, ++i )
{
if ((*it).lower() == lowerName)
{
@@ -1478,7 +1478,7 @@ void KFontAction::setFont( const QString &family )
{
lowerName = lowerName.left(i);
i = 0;
- for ( QStringList::Iterator it = d->m_fonts.begin(); it != d->m_fonts.end(); ++it, ++i )
+ for ( TQStringList::Iterator it = d->m_fonts.begin(); it != d->m_fonts.end(); ++it, ++i )
{
if ((*it).lower() == lowerName)
{
@@ -1490,7 +1490,7 @@ void KFontAction::setFont( const QString &family )
lowerName += " [";
i = 0;
- for ( QStringList::Iterator it = d->m_fonts.begin(); it != d->m_fonts.end(); ++it, ++i )
+ for ( TQStringList::Iterator it = d->m_fonts.begin(); it != d->m_fonts.end(); ++it, ++i )
{
if ((*it).lower().startsWith(lowerName))
{
@@ -1501,7 +1501,7 @@ void KFontAction::setFont( const QString &family )
kdDebug(129) << "Font not found " << family.lower() << endl;
}
-int KFontAction::plug( QWidget *w, int index )
+int KFontAction::plug( TQWidget *w, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
@@ -1510,15 +1510,15 @@ int KFontAction::plug( QWidget *w, int index )
KToolBar* bar = static_cast<KToolBar*>( w );
int id_ = KAction::getToolButtonID();
KFontCombo *cb = new KFontCombo( items(), bar );
- connect( cb, SIGNAL( activated( const QString & ) ),
- SLOT( slotActivated( const QString & ) ) );
+ connect( cb, TQT_SIGNAL( activated( const TQString & ) ),
+ TQT_SLOT( slotActivated( const TQString & ) ) );
cb->setEnabled( isEnabled() );
bar->insertWidget( id_, comboWidth(), cb, index );
cb->setMinimumWidth( cb->sizeHint().width() );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
updateCurrentItem( containerCount() - 1 );
@@ -1535,60 +1535,60 @@ public:
}
};
-KFontSizeAction::KFontSizeAction( const QString& text,
+KFontSizeAction::KFontSizeAction( const TQString& text,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, cut, parent, name )
{
init();
}
-KFontSizeAction::KFontSizeAction( const QString& text,
+KFontSizeAction::KFontSizeAction( const TQString& text,
const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name )
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name )
: KSelectAction( text, cut, receiver, slot, parent, name )
{
init();
}
-KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix,
+KFontSizeAction::KFontSizeAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
init();
}
-KFontSizeAction::KFontSizeAction( const QString& text, const QString& pix,
+KFontSizeAction::KFontSizeAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KSelectAction( text, pix, cut, parent, name )
{
init();
}
-KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix,
+KFontSizeAction::KFontSizeAction( const TQString& text, const TQIconSet& pix,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KSelectAction( text, pix, cut, receiver, slot, parent, name )
{
init();
}
-KFontSizeAction::KFontSizeAction( const QString& text, const QString& pix,
+KFontSizeAction::KFontSizeAction( const TQString& text, const TQString& pix,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KSelectAction( text, pix, cut, receiver, slot, parent, name )
{
init();
}
-KFontSizeAction::KFontSizeAction( QObject* parent, const char* name )
+KFontSizeAction::KFontSizeAction( TQObject* parent, const char* name )
: KSelectAction( parent, name )
{
init();
@@ -1605,11 +1605,11 @@ void KFontSizeAction::init()
d = new KFontSizeActionPrivate;
setEditable( true );
- QFontDatabase fontDB;
- QValueList<int> sizes = fontDB.standardSizes();
- QStringList lst;
- for ( QValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it )
- lst.append( QString::number( *it ) );
+ TQFontDatabase fontDB;
+ TQValueList<int> sizes = fontDB.standardSizes();
+ TQStringList lst;
+ for ( TQValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it )
+ lst.append( TQString::number( *it ) );
setItems( lst );
}
@@ -1617,7 +1617,7 @@ void KFontSizeAction::init()
void KFontSizeAction::setFontSize( int size )
{
if ( size == fontSize() ) {
- setCurrentItem( items().findIndex( QString::number( size ) ) );
+ setCurrentItem( items().findIndex( TQString::number( size ) ) );
return;
}
@@ -1626,22 +1626,22 @@ void KFontSizeAction::setFontSize( int size )
return;
}
- int index = items().findIndex( QString::number( size ) );
+ int index = items().findIndex( TQString::number( size ) );
if ( index == -1 ) {
// Insert at the correct position in the list (to keep sorting)
- QValueList<int> lst;
+ TQValueList<int> lst;
// Convert to list of ints
- QStringList itemsList = items();
- for (QStringList::Iterator it = itemsList.begin() ; it != itemsList.end() ; ++it)
+ TQStringList itemsList = items();
+ for (TQStringList::Iterator it = itemsList.begin() ; it != itemsList.end() ; ++it)
lst.append( (*it).toInt() );
// New size
lst.append( size );
// Sort the list
qHeapSort( lst );
// Convert back to string list
- QStringList strLst;
- for (QValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it)
- strLst.append( QString::number(*it) );
+ TQStringList strLst;
+ for (TQValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it)
+ strLst.append( TQString::number(*it) );
KSelectAction::setItems( strLst );
// Find new current item
index = lst.findIndex( size );
@@ -1653,7 +1653,7 @@ void KFontSizeAction::setFontSize( int size )
//emit KAction::activated();
//emit activated( index );
- //emit activated( QString::number( size ) );
+ //emit activated( TQString::number( size ) );
//emit fontSizeChanged( size );
}
@@ -1669,7 +1669,7 @@ void KFontSizeAction::slotActivated( int index )
emit fontSizeChanged( items()[ index ].toInt() );
}
-void KFontSizeAction::slotActivated( const QString& size )
+void KFontSizeAction::slotActivated( const TQString& size )
{
setFontSize( size.toInt() ); // insert sorted first
KSelectAction::slotActivated( size );
@@ -1694,14 +1694,14 @@ public:
bool m_stickyMenu;
};
-KActionMenu::KActionMenu( QObject* parent, const char* name )
+KActionMenu::KActionMenu( TQObject* parent, const char* name )
: KAction( parent, name )
{
d = new KActionMenuPrivate;
setShortcutConfigurable( false );
}
-KActionMenu::KActionMenu( const QString& text, QObject* parent,
+KActionMenu::KActionMenu( const TQString& text, TQObject* parent,
const char* name )
: KAction( text, 0, parent, name )
{
@@ -1709,16 +1709,16 @@ KActionMenu::KActionMenu( const QString& text, QObject* parent,
setShortcutConfigurable( false );
}
-KActionMenu::KActionMenu( const QString& text, const QIconSet& icon,
- QObject* parent, const char* name )
+KActionMenu::KActionMenu( const TQString& text, const TQIconSet& icon,
+ TQObject* parent, const char* name )
: KAction( text, icon, 0, parent, name )
{
d = new KActionMenuPrivate;
setShortcutConfigurable( false );
}
-KActionMenu::KActionMenu( const QString& text, const QString& icon,
- QObject* parent, const char* name )
+KActionMenu::KActionMenu( const TQString& text, const TQString& icon,
+ TQObject* parent, const char* name )
: KAction( text, icon, 0, parent, name )
{
d = new KActionMenuPrivate;
@@ -1732,7 +1732,7 @@ KActionMenu::~KActionMenu()
delete d; d = 0;
}
-void KActionMenu::popup( const QPoint& global )
+void KActionMenu::popup( const TQPoint& global )
{
popupMenu()->popup( global );
}
@@ -1770,14 +1770,14 @@ void KActionMenu::setStickyMenu(bool sticky) {
d->m_stickyMenu = sticky;
}
-int KActionMenu::plug( QWidget* widget, int index )
+int KActionMenu::plug( TQWidget* widget, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
kdDebug(129) << "KActionMenu::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis
- if ( ::qt_cast<QPopupMenu *>( widget ) )
+ if ( ::qt_cast<TQPopupMenu *>( widget ) )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget );
int id;
if ( hasIcon() )
id = menu->insertItem( iconSet(), text(), d->m_popup, -1, index );
@@ -1788,7 +1788,7 @@ int KActionMenu::plug( QWidget* widget, int index )
menu->setItemEnabled( id, false );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if ( m_parentCollection )
m_parentCollection->connectHighlight( menu, this );
@@ -1802,8 +1802,8 @@ int KActionMenu::plug( QWidget* widget, int index )
int id_ = KAction::getToolButtonID();
if ( icon().isEmpty() && !iconSet().isNull() )
- bar->insertButton( iconSet().pixmap(), id_, SIGNAL( clicked() ), this,
- SLOT( slotActivated() ), isEnabled(), plainText(),
+ bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotActivated() ), isEnabled(), plainText(),
index );
else
{
@@ -1814,17 +1814,17 @@ int KActionMenu::plug( QWidget* widget, int index )
else
instance = KGlobal::instance();
- bar->insertButton( icon(), id_, SIGNAL( clicked() ), this,
- SLOT( slotActivated() ), isEnabled(), plainText(),
+ bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotActivated() ), isEnabled(), plainText(),
index, instance );
}
addContainer( bar, id_ );
if (!whatsThis().isEmpty())
- QWhatsThis::add( bar->getButton(id_), whatsThis() );
+ TQWhatsThis::add( bar->getButton(id_), whatsThis() );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if (delayed()) {
bar->setDelayedPopup( id_, popupMenu(), stickyMenu() );
@@ -1837,9 +1837,9 @@ int KActionMenu::plug( QWidget* widget, int index )
return containerCount() - 1;
}
- else if ( ::qt_cast<QMenuBar *>( widget ) )
+ else if ( ::qt_cast<TQMenuBar *>( widget ) )
{
- QMenuBar *bar = static_cast<QMenuBar *>( widget );
+ TQMenuBar *bar = static_cast<TQMenuBar *>( widget );
int id;
@@ -1849,7 +1849,7 @@ int KActionMenu::plug( QWidget* widget, int index )
bar->setItemEnabled( id, false );
addContainer( bar, id );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -1859,10 +1859,10 @@ int KActionMenu::plug( QWidget* widget, int index )
////////
-KToolBarPopupAction::KToolBarPopupAction( const QString& text,
- const QString& icon,
+KToolBarPopupAction::KToolBarPopupAction( const TQString& text,
+ const TQString& icon,
const KShortcut& cut,
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: KAction( text, icon, cut, parent, name )
{
m_popup = 0;
@@ -1870,11 +1870,11 @@ KToolBarPopupAction::KToolBarPopupAction( const QString& text,
m_stickyMenu = true;
}
-KToolBarPopupAction::KToolBarPopupAction( const QString& text,
- const QString& icon,
+KToolBarPopupAction::KToolBarPopupAction( const TQString& text,
+ const TQString& icon,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name )
: KAction( text, icon, cut, receiver, slot, parent, name )
{
@@ -1885,7 +1885,7 @@ KToolBarPopupAction::KToolBarPopupAction( const QString& text,
KToolBarPopupAction::KToolBarPopupAction( const KGuiItem& item,
const KShortcut& cut,
- const QObject* receiver,
+ const TQObject* receiver,
const char* slot, KActionCollection* parent,
const char* name )
: KAction( item, cut, receiver, slot, parent, name )
@@ -1916,7 +1916,7 @@ void KToolBarPopupAction::setStickyMenu(bool sticky) {
m_stickyMenu = sticky;
}
-int KToolBarPopupAction::plug( QWidget *widget, int index )
+int KToolBarPopupAction::plug( TQWidget *widget, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
@@ -1929,8 +1929,8 @@ int KToolBarPopupAction::plug( QWidget *widget, int index )
int id_ = KAction::getToolButtonID();
if ( icon().isEmpty() && !iconSet().isNull() ) {
- bar->insertButton( iconSet().pixmap(), id_, SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
- SLOT( slotButtonClicked(int, Qt::ButtonState) ),
+ bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
+ TQT_SLOT( slotButtonClicked(int, Qt::ButtonState) ),
isEnabled(), plainText(),
index );
} else {
@@ -1940,15 +1940,15 @@ int KToolBarPopupAction::plug( QWidget *widget, int index )
else
instance = KGlobal::instance();
- bar->insertButton( icon(), id_, SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
- SLOT( slotButtonClicked(int, Qt::ButtonState) ),
+ bar->insertButton( icon(), id_, TQT_SIGNAL( buttonClicked(int, Qt::ButtonState) ), this,
+ TQT_SLOT( slotButtonClicked(int, Qt::ButtonState) ),
isEnabled(), plainText(),
index, instance );
}
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if (delayed()) {
bar->setDelayedPopup( id_, popupMenu(), stickyMenu() );
@@ -1957,7 +1957,7 @@ int KToolBarPopupAction::plug( QWidget *widget, int index )
}
if ( !whatsThis().isEmpty() )
- QWhatsThis::add( bar->getButton( id_ ), whatsThisWithIcon() );
+ TQWhatsThis::add( bar->getButton( id_ ), whatsThisWithIcon() );
return containerCount() - 1;
}
@@ -1977,14 +1977,14 @@ KPopupMenu *KToolBarPopupAction::popupMenu() const
////////
KToggleToolBarAction::KToggleToolBarAction( const char* toolBarName,
- const QString& text, KActionCollection* parent, const char* name )
+ const TQString& text, KActionCollection* parent, const char* name )
: KToggleAction( text, KShortcut(), parent, name )
, m_toolBarName( toolBarName )
, m_toolBar( 0L )
{
}
-KToggleToolBarAction::KToggleToolBarAction( KToolBar *toolBar, const QString &text,
+KToggleToolBarAction::KToggleToolBarAction( KToolBar *toolBar, const TQString &text,
KActionCollection *parent, const char *name )
: KToggleAction( text, KShortcut(), parent, name )
, m_toolBarName( 0 ), m_toolBar( toolBar )
@@ -1995,15 +1995,15 @@ KToggleToolBarAction::~KToggleToolBarAction()
{
}
-int KToggleToolBarAction::plug( QWidget* w, int index )
+int KToggleToolBarAction::plug( TQWidget* w, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
if ( !m_toolBar ) {
// Note: topLevelWidget() stops too early, we can't use it.
- QWidget * tl = w;
- QWidget * n;
+ TQWidget * tl = w;
+ TQWidget * n;
while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store
tl = n;
@@ -2015,9 +2015,9 @@ int KToggleToolBarAction::plug( QWidget* w, int index )
if( m_toolBar ) {
setChecked( m_toolBar->isVisible() );
- connect( m_toolBar, SIGNAL(visibilityChanged(bool)), this, SLOT(setChecked(bool)) );
+ connect( m_toolBar, TQT_SIGNAL(visibilityChanged(bool)), this, TQT_SLOT(setChecked(bool)) );
// Also emit toggled when the toolbar's visibility changes (see comment in header)
- connect( m_toolBar, SIGNAL(visibilityChanged(bool)), this, SIGNAL(toggled(bool)) );
+ connect( m_toolBar, TQT_SIGNAL(visibilityChanged(bool)), this, TQT_SIGNAL(toggled(bool)) );
} else {
setEnabled( false );
}
@@ -2033,7 +2033,7 @@ void KToggleToolBarAction::setChecked( bool c )
} else {
m_toolBar->hide();
}
- QMainWindow* mw = m_toolBar->mainWindow();
+ TQMainWindow* mw = m_toolBar->mainWindow();
if ( mw && ::qt_cast<KMainWindow *>( mw ) )
static_cast<KMainWindow *>( mw )->setSettingsDirty();
}
@@ -2043,10 +2043,10 @@ void KToggleToolBarAction::setChecked( bool c )
////////
KToggleFullScreenAction::KToggleFullScreenAction( const KShortcut &cut,
- const QObject* receiver, const char* slot,
- QObject* parent, QWidget* window,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, TQWidget* window,
const char* name )
- : KToggleAction( QString::null, cut, receiver, slot, parent, name ),
+ : KToggleAction( TQString::null, cut, receiver, slot, parent, name ),
window( NULL )
{
setWindow( window );
@@ -2056,7 +2056,7 @@ KToggleFullScreenAction::~KToggleFullScreenAction()
{
}
-void KToggleFullScreenAction::setWindow( QWidget* w )
+void KToggleFullScreenAction::setWindow( TQWidget* w )
{
if( window )
window->removeEventFilter( this );
@@ -2080,10 +2080,10 @@ void KToggleFullScreenAction::setChecked( bool c )
KToggleAction::setChecked( c );
}
-bool KToggleFullScreenAction::eventFilter( QObject* o, QEvent* e )
+bool KToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e )
{
if( o == window )
- if( e->type() == QEvent::WindowStateChange )
+ if( e->type() == TQEvent::WindowStateChange )
{
if( window->isFullScreen() != isChecked())
slotActivated(); // setChecked( window->isFullScreen()) wouldn't emit signals
@@ -2093,15 +2093,15 @@ bool KToggleFullScreenAction::eventFilter( QObject* o, QEvent* e )
////////
-KWidgetAction::KWidgetAction( QWidget* widget,
- const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+KWidgetAction::KWidgetAction( TQWidget* widget,
+ const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name )
: KAction( text, cut, receiver, slot, parent, name )
, m_widget( widget )
, m_autoSized( false )
{
- connect( this, SIGNAL(enabled(bool)), widget, SLOT(setEnabled(bool)) );
+ connect( this, TQT_SIGNAL(enabled(bool)), widget, TQT_SLOT(setEnabled(bool)) );
}
KWidgetAction::~KWidgetAction()
@@ -2127,7 +2127,7 @@ void KWidgetAction::setAutoSized( bool autoSized )
toolBar->setItemAutoSized( id, m_autoSized );
}
-int KWidgetAction::plug( QWidget* w, int index )
+int KWidgetAction::plug( TQWidget* w, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
@@ -2145,20 +2145,20 @@ int KWidgetAction::plug( QWidget* w, int index )
int id = KAction::getToolButtonID();
- m_widget->reparent( toolBar, QPoint() );
+ m_widget->reparent( toolBar, TQPoint() );
toolBar->insertWidget( id, 0, m_widget, index );
toolBar->setItemAutoSized( id, m_autoSized );
- QWhatsThis::add( m_widget, whatsThis() );
+ TQWhatsThis::add( m_widget, whatsThis() );
addContainer( toolBar, id );
- connect( toolBar, SIGNAL( toolbarDestroyed() ), this, SLOT( slotToolbarDestroyed() ) );
- connect( toolBar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( toolBar, TQT_SIGNAL( toolbarDestroyed() ), this, TQT_SLOT( slotToolbarDestroyed() ) );
+ connect( toolBar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
-void KWidgetAction::unplug( QWidget *w )
+void KWidgetAction::unplug( TQWidget *w )
{
if( !m_widget || !isPlugged() )
return;
@@ -2166,8 +2166,8 @@ void KWidgetAction::unplug( QWidget *w )
KToolBar* toolBar = (KToolBar*)m_widget->parent();
if ( toolBar == w )
{
- disconnect( toolBar, SIGNAL( toolbarDestroyed() ), this, SLOT( slotToolbarDestroyed() ) );
- m_widget->reparent( 0L, QPoint(), false /*showIt*/ );
+ disconnect( toolBar, TQT_SIGNAL( toolbarDestroyed() ), this, TQT_SLOT( slotToolbarDestroyed() ) );
+ m_widget->reparent( 0L, TQPoint(), false /*showIt*/ );
}
KAction::unplug( w );
}
@@ -2180,12 +2180,12 @@ void KWidgetAction::slotToolbarDestroyed()
return;
// Don't let a toolbar being destroyed, delete my widget.
- m_widget->reparent( 0L, QPoint(), false /*showIt*/ );
+ m_widget->reparent( 0L, TQPoint(), false /*showIt*/ );
}
////////
-KActionSeparator::KActionSeparator( QObject *parent, const char *name )
+KActionSeparator::KActionSeparator( TQObject *parent, const char *name )
: KAction( parent, name )
{
}
@@ -2194,28 +2194,28 @@ KActionSeparator::~KActionSeparator()
{
}
-int KActionSeparator::plug( QWidget *widget, int index )
+int KActionSeparator::plug( TQWidget *widget, int index )
{
- if ( ::qt_cast<QPopupMenu *>( widget) )
+ if ( ::qt_cast<TQPopupMenu *>( widget) )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget );
int id = menu->insertSeparator( index );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
- else if ( ::qt_cast<QMenuBar *>( widget ) )
+ else if ( ::qt_cast<TQMenuBar *>( widget ) )
{
- QMenuBar *menuBar = static_cast<QMenuBar *>( widget );
+ TQMenuBar *menuBar = static_cast<TQMenuBar *>( widget );
int id = menuBar->insertSeparator( index );
addContainer( menuBar, id );
- connect( menuBar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menuBar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -2227,7 +2227,7 @@ int KActionSeparator::plug( QWidget *widget, int index )
addContainer( toolBar, id );
- connect( toolBar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( toolBar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -2235,17 +2235,17 @@ int KActionSeparator::plug( QWidget *widget, int index )
return -1;
}
-KPasteTextAction::KPasteTextAction( const QString& text,
- const QString& icon,
+KPasteTextAction::KPasteTextAction( const TQString& text,
+ const TQString& icon,
const KShortcut& cut,
- const QObject* receiver,
- const char* slot, QObject* parent,
+ const TQObject* receiver,
+ const char* slot, TQObject* parent,
const char* name)
: KAction( text, icon, cut, receiver, slot, parent, name )
{
m_popup = new KPopupMenu;
- connect(m_popup, SIGNAL(aboutToShow()), this, SLOT(menuAboutToShow()));
- connect(m_popup, SIGNAL(activated(int)), this, SLOT(menuItemActivated(int)));
+ 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;
}
@@ -2260,7 +2260,7 @@ void KPasteTextAction::setMixedMode(bool mode)
m_mixedMode = mode;
}
-int KPasteTextAction::plug( QWidget *widget, int index )
+int KPasteTextAction::plug( TQWidget *widget, int index )
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
@@ -2276,18 +2276,18 @@ int KPasteTextAction::plug( QWidget *widget, int index )
else
instance = KGlobal::instance();
- bar->insertButton( icon(), id_, SIGNAL( clicked() ), this,
- SLOT( slotActivated() ), isEnabled(), plainText(),
+ bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotActivated() ), isEnabled(), plainText(),
index, instance );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
bar->setDelayedPopup( id_, m_popup, true );
if ( !whatsThis().isEmpty() )
- QWhatsThis::add( bar->getButton( id_ ), whatsThisWithIcon() );
+ TQWhatsThis::add( bar->getButton( id_ ), whatsThisWithIcon() );
return containerCount() - 1;
}
@@ -2298,7 +2298,7 @@ int KPasteTextAction::plug( QWidget *widget, int index )
void KPasteTextAction::menuAboutToShow()
{
m_popup->clear();
- QStringList list;
+ TQStringList list;
DCOPClient *client = kapp->dcopClient();
if (client->isAttached() && client->isApplicationRegistered("klipper")) {
DCOPRef klipper("klipper","klipper");
@@ -2306,13 +2306,13 @@ void KPasteTextAction::menuAboutToShow()
if (reply.isValid())
list = reply;
}
- QString clipboardText = qApp->clipboard()->text(QClipboard::Clipboard);
+ TQString clipboardText = qApp->clipboard()->text(QClipboard::Clipboard);
if (list.isEmpty())
list << clipboardText;
bool found = false;
- for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
{
- QString text = KStringHandler::cEmSqueeze((*it).simplifyWhiteSpace(), m_popup->fontMetrics(), 20);
+ TQString text = KStringHandler::cEmSqueeze((*it).simplifyWhiteSpace(), m_popup->fontMetrics(), 20);
text.replace("&", "&&");
int id = m_popup->insertItem(text);
if (!found && *it == clipboardText)
@@ -2331,21 +2331,21 @@ void KPasteTextAction::menuItemActivated( int id)
DCOPReply reply = klipper.call("getClipboardHistoryItem(int)", m_popup->indexOf(id));
if (!reply.isValid())
return;
- QString clipboardText = reply;
- reply = klipper.call("setClipboardContents(QString)", clipboardText);
+ TQString clipboardText = reply;
+ reply = klipper.call("setClipboardContents(TQString)", clipboardText);
if (reply.isValid())
kdDebug(129) << "Clipboard: " << qApp->clipboard()->text(QClipboard::Clipboard) << endl;
}
- QTimer::singleShot(20, this, SLOT(slotActivated()));
+ TQTimer::singleShot(20, this, TQT_SLOT(slotActivated()));
}
void KPasteTextAction::slotActivated()
{
if (!m_mixedMode) {
- QWidget *w = qApp->widgetAt(QCursor::pos(), true);
- QMimeSource *data = QApplication::clipboard()->data();
+ TQWidget *w = qApp->widgetAt(TQCursor::pos(), true);
+ TQMimeSource *data = TQApplication::clipboard()->data();
if (!data->provides("text/plain") && w) {
- m_popup->popup(w->mapToGlobal(QPoint(0, w->height())));
+ m_popup->popup(w->mapToGlobal(TQPoint(0, w->height())));
} else
KAction::slotActivated();
} else
diff --git a/kdeui/kactionclasses.h b/kdeui/kactionclasses.h
index 6c6fe5ca8..7fa3a98ac 100644
--- a/kdeui/kactionclasses.h
+++ b/kdeui/kactionclasses.h
@@ -29,10 +29,10 @@
#include <kaction.h>
-#include <qkeysequence.h>
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qguardedptr.h>
+#include <tqkeysequence.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqguardedptr.h>
#include <kguiitem.h>
#include <kshortcut.h>
#include <kstdaction.h>
@@ -69,7 +69,7 @@ class KDEUI_EXPORT KToggleAction : public KAction
{
Q_OBJECT
Q_PROPERTY( bool checked READ isChecked WRITE setChecked )
- Q_PROPERTY( QString exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup )
+ Q_PROPERTY( TQString exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup )
public:
/**
@@ -82,18 +82,18 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
+ KToggleAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KToggleAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -102,8 +102,8 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KToggleAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -112,39 +112,39 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KToggleAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The icons that go with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KToggleAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The dynamically loaded icon that goes with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0 );
+ KToggleAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0 );
/**
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToggleAction( QObject* parent = 0, const char* name = 0 );
+ KToggleAction( TQObject* parent = 0, const char* name = 0 );
/**
* Destructor
@@ -162,7 +162,7 @@ public:
* @param widget The GUI element to display this action.
* @param index The index of the item.
*/
- virtual int plug( QWidget* widget, int index = -1 );
+ virtual int plug( TQWidget* widget, int index = -1 );
/**
* Returns the actual state of the action.
@@ -173,7 +173,7 @@ public:
* @return which "exclusive group" this action is part of.
* @see setExclusiveGroup
*/
- QString exclusiveGroup() const;
+ TQString exclusiveGroup() const;
/**
* Defines which "exclusive group" this action is part of.
@@ -181,7 +181,7 @@ public:
* at a any moment. Checking an action unchecks the other actions
* of the group.
*/
- virtual void setExclusiveGroup( const QString& name );
+ virtual void setExclusiveGroup( const TQString& name );
/**
* Defines the text (and icon, tooltip, whatsthis) that should be displayed
@@ -197,7 +197,7 @@ public:
void setCheckedState( const KGuiItem& checkedItem );
/// Reimplemented for internal reasons
- virtual QString toolTip() const;
+ virtual TQString toolTip() const;
public slots:
/**
@@ -241,18 +241,18 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
+ KRadioAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KRadioAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -261,8 +261,8 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KRadioAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -271,39 +271,39 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KRadioAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The icons that go with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KRadioAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The dynamically loaded icon that goes with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0 );
+ KRadioAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0 );
/**
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KRadioAction( QObject* parent = 0, const char* name = 0 );
+ KRadioAction( TQObject* parent = 0, const char* name = 0 );
protected:
virtual void slotActivated();
@@ -330,10 +330,10 @@ class KDEUI_EXPORT KSelectAction : public KAction
{
Q_OBJECT
Q_PROPERTY( int currentItem READ currentItem WRITE setCurrentItem )
- Q_PROPERTY( QStringList items READ items WRITE setItems )
+ Q_PROPERTY( TQStringList items READ items WRITE setItems )
Q_PROPERTY( bool editable READ isEditable WRITE setEditable )
Q_PROPERTY( int comboWidth READ comboWidth WRITE setComboWidth )
- Q_PROPERTY( QString currentText READ currentText )
+ Q_PROPERTY( TQString currentText READ currentText )
Q_PROPERTY( bool menuAccelsEnabled READ menuAccelsEnabled WRITE setMenuAccelsEnabled )
public:
@@ -347,18 +347,18 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
+ KSelectAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KSelectAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -367,8 +367,8 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KSelectAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -377,39 +377,39 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KSelectAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The icons that go with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KSelectAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The dynamically loaded icon that goes with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0 );
+ KSelectAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0 );
/**
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KSelectAction( QObject* parent = 0, const char* name = 0 );
+ KSelectAction( TQObject* parent = 0, const char* name = 0 );
/**
* Destructor
@@ -427,7 +427,7 @@ public:
* @param widget The GUI element to display this action.
* @param index The index of the item.
*/
- virtual int plug( QWidget* widget, int index = -1 );
+ virtual int plug( TQWidget* widget, int index = -1 );
/**
* When this action is plugged into a toolbar, it creates a combobox.
@@ -439,17 +439,17 @@ public:
* @return the items that can be selected with this action.
* Use setItems to set them.
*/
- virtual QStringList items() const;
+ virtual TQStringList items() const;
/**
* Changes the text of item @param index to @param text .
*/
- virtual void changeItem( int index, const QString& text );
+ virtual void changeItem( int index, const TQString& text );
/**
* Returns the text of the currently selected item.
*/
- virtual QString currentText() const;
+ virtual TQString currentText() const;
/**
* Returns the index of the current item.
@@ -474,7 +474,7 @@ public:
/**
* Returns a pointer to the popup menu used by this action.
*/
- QPopupMenu* popupMenu() const;
+ TQPopupMenu* popupMenu() const;
/**
* @deprecated See setMenuAccelsEnabled .
@@ -508,7 +508,7 @@ public slots:
* Sets the items to be displayed in this action
* You need to call this.
*/
- virtual void setItems( const QStringList &lst );
+ virtual void setItems( const TQStringList &lst );
/**
* Clears up all the items in this action
@@ -529,7 +529,7 @@ public slots:
virtual void setComboWidth( int width );
protected:
- virtual void changeItem( int id, int index, const QString& text );
+ virtual void changeItem( int id, int index, const TQString& text );
/**
* Depending on the menuAccelsEnabled property this method will return the
@@ -537,11 +537,11 @@ protected:
* character removed from all items or not.
* @since 3.1
*/
- QStringList comboItems() const;
+ TQStringList comboItems() const;
protected slots:
virtual void slotActivated( int id );
- virtual void slotActivated( const QString &text );
+ virtual void slotActivated( const TQString &text );
virtual void slotActivated();
signals:
@@ -554,7 +554,7 @@ signals:
* This signal is emitted when an item is selected; @param text indicates
* the item selected.
*/
- void activated( const QString& text );
+ void activated( const TQString& text );
protected:
virtual void updateCurrentItem( int id );
@@ -592,19 +592,19 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0,
+ KListAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0,
const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const KShortcut& cut, const QObject* receiver,
- const char* slot, QObject* parent, const char* name = 0 );
+ KListAction( const TQString& text, const KShortcut& cut, const TQObject* receiver,
+ const char* slot, TQObject* parent, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -613,8 +613,8 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KListAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
@@ -623,20 +623,20 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KListAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* @param text The text that will be displayed.
* @param pix The icons that go with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ KListAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name = 0 );
/**
@@ -644,19 +644,19 @@ public:
* @param pix The dynamically loaded icon that goes with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ KListAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name = 0 );
/**
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KListAction( QObject* parent = 0, const char* name = 0 );
+ KListAction( TQObject* parent = 0, const char* name = 0 );
/**
* Destructor
@@ -664,7 +664,7 @@ public:
virtual ~KListAction();
- virtual QString currentText() const;
+ virtual TQString currentText() const;
virtual int currentItem() const;
@@ -705,23 +705,23 @@ public:
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const KShortcut& cut,
- QObject* parent, const char* name = 0,
+ KRecentFilesAction( const TQString& text, const KShortcut& cut,
+ TQObject* parent, const char* name = 0,
uint maxItems = 10 );
/**
* @param text The text that will be displayed.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke when a URL is selected.
+ * @param slot The TQT_SLOT to invoke when a URL is selected.
* Its signature is of the form slotURLSelected( const KURL & ).
* @param parent This action's parent.
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0,
+ KRecentFilesAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0,
uint maxItems = 10 );
/**
@@ -732,8 +732,8 @@ public:
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- QObject* parent, const char* name = 0,
+ KRecentFilesAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ TQObject* parent, const char* name = 0,
uint maxItems = 10 );
/**
@@ -744,8 +744,8 @@ public:
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const QString& pix, const KShortcut& cut,
- QObject* parent, const char* name = 0,
+ KRecentFilesAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ TQObject* parent, const char* name = 0,
uint maxItems = 10 );
/**
@@ -753,15 +753,15 @@ public:
* @param pix The icons that go with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke when a URL is selected.
+ * @param slot The TQT_SLOT to invoke when a URL is selected.
* Its signature is of the form slotURLSelected( const KURL & ).
* @param parent This action's parent.
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0,
+ KRecentFilesAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0,
uint maxItems = 10 );
/**
@@ -769,15 +769,15 @@ public:
* @param pix The dynamically loaded icon that goes with this action.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke when a URL is selected.
+ * @param slot The TQT_SLOT to invoke when a URL is selected.
* Its signature is of the form slotURLSelected( const KURL & ).
* @param parent This action's parent.
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0,
+ KRecentFilesAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0,
uint maxItems = 10 );
/**
@@ -785,7 +785,7 @@ public:
* @param name An internal name for this action.
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( QObject* parent = 0, const char* name = 0,
+ KRecentFilesAction( TQObject* parent = 0, const char* name = 0,
uint maxItems = 10 );
/**
@@ -793,7 +793,7 @@ public:
*/
virtual ~KRecentFilesAction();
- virtual int plug( QWidget *widget, int index = -1 );
+ virtual int plug( TQWidget *widget, int index = -1 );
/**
* Returns the maximum of items in the recent files list.
@@ -808,14 +808,14 @@ public:
* matching the pre-3.5 behavior.
*/
- virtual QStringList items() const;
+ virtual TQStringList items() const;
/**
* @return the items that can be selected with this action.
* The returned items contain the pretty name that can be set by addURL.
* @since 3.5
*/
- QStringList completeItems() const;
+ TQStringList completeItems() const;
public slots:
/**
@@ -835,7 +835,7 @@ public slots:
*
* This method does not effect the active group of KConfig.
*/
- void loadEntries( KConfig* config, QString groupname=QString::null );
+ void loadEntries( KConfig* config, TQString groupname=TQString::null );
/**
* Saves the current recent files entries to a given KConfig object.
@@ -844,7 +844,7 @@ public slots:
*
* This method does not effect the active group of KConfig.
*/
- void saveEntries( KConfig* config, QString groupname=QString::null );
+ void saveEntries( KConfig* config, TQString groupname=TQString::null );
/**
* Add URL to recent files list.
@@ -860,7 +860,7 @@ public slots:
* @param name The user visible pretty name that appears before the URL
* @since 3.5
*/
- void addURL( const KURL& url, const QString& name ); //KDE4: Combine the above two methods
+ void addURL( const KURL& url, const TQString& name ); //KDE4: Combine the above two methods
/**
* Remove an URL from the recent files list.
@@ -884,12 +884,12 @@ signals:
void urlSelected( const KURL& url );
protected slots:
- void itemSelected( const QString& string );
+ void itemSelected( const TQString& string );
void menuAboutToShow();
void menuItemActivated( int id );
void slotClicked();
virtual void slotActivated(int);
- virtual void slotActivated(const QString& );
+ virtual void slotActivated(const TQString& );
virtual void slotActivated();
protected:
@@ -905,45 +905,45 @@ private:
class KDEUI_EXPORT KFontAction : public KSelectAction
{
Q_OBJECT
- Q_PROPERTY( QString font READ font WRITE setFont )
+ Q_PROPERTY( TQString font READ font WRITE setFont )
public:
- KFontAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0,
+ KFontAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0,
const char* name = 0 );
- KFontAction( const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ KFontAction( const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name = 0 );
- KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
- KFontAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
- KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ KFontAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
+ KFontAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
+ KFontAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, TQObject* parent,
const char* name = 0 );
- KFontAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot, QObject* parent,
+ KFontAction( const TQString& text, const TQString& pix, const KShortcut& 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 kdelibs-3.3 or more.
#define KFONTACTION_HAS_CRITERIA_ARG
- KFontAction( uint fontListCriteria, const QString& text,
- const KShortcut& cut = KShortcut(), QObject* parent = 0,
+ KFontAction( uint fontListCriteria, const TQString& text,
+ const KShortcut& cut = KShortcut(), TQObject* parent = 0,
const char* name = 0 );
- KFontAction( uint fontListCriteria, const QString& text, const QString& pix,
+ KFontAction( uint fontListCriteria, const TQString& text, const TQString& pix,
const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ TQObject* parent = 0, const char* name = 0 );
- KFontAction( QObject* parent = 0, const char* name = 0 );
+ KFontAction( TQObject* parent = 0, const char* name = 0 );
~KFontAction();
- QString font() const {
+ TQString font() const {
return currentText();
}
- int plug( QWidget*widget, int index = -1 );
+ int plug( TQWidget*widget, int index = -1 );
public slots:
- void setFont( const QString &family );
+ void setFont( const TQString &family );
protected:
virtual void virtual_hook( int id, void* data );
@@ -957,21 +957,21 @@ class KDEUI_EXPORT KFontSizeAction : public KSelectAction
Q_OBJECT
Q_PROPERTY( int fontSize READ fontSize WRITE setFontSize )
public:
- KFontSizeAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0,
+ KFontSizeAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0,
const char* name = 0 );
- KFontSizeAction( const QString& text, const KShortcut& cut, const QObject* receiver,
- const char* slot, QObject* parent, const char* name = 0 );
- KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
- KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
- KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0 );
- KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent, const char* name = 0 );
- KFontSizeAction( QObject* parent = 0, const char* name = 0 );
+ KFontSizeAction( const TQString& text, const KShortcut& cut, const TQObject* receiver,
+ const char* slot, TQObject* parent, const char* name = 0 );
+ KFontSizeAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
+ KFontSizeAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
+ KFontSizeAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0 );
+ KFontSizeAction( const TQString& text, const TQString& pix, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, const char* name = 0 );
+ KFontSizeAction( TQObject* parent = 0, const char* name = 0 );
virtual ~KFontSizeAction();
@@ -982,7 +982,7 @@ public slots:
protected slots:
virtual void slotActivated( int );
- virtual void slotActivated( const QString& );
+ virtual void slotActivated( const TQString& );
virtual void slotActivated() { KAction::slotActivated(); }
signals:
@@ -1017,20 +1017,20 @@ class KDEUI_EXPORT KActionMenu : public KAction
Q_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu )
public:
- KActionMenu( const QString& text, QObject* parent = 0,
+ KActionMenu( const TQString& text, TQObject* parent = 0,
const char* name = 0 );
- KActionMenu( const QString& text, const QIconSet& icon,
- QObject* parent = 0, const char* name = 0 );
- KActionMenu( const QString& text, const QString& icon,
- QObject* parent = 0, const char* name = 0 );
- KActionMenu( QObject* parent = 0, const char* name = 0 );
+ KActionMenu( const TQString& text, const TQIconSet& icon,
+ TQObject* parent = 0, const char* name = 0 );
+ KActionMenu( const TQString& text, const TQString& icon,
+ TQObject* parent = 0, const char* name = 0 );
+ KActionMenu( TQObject* parent = 0, const char* name = 0 );
virtual ~KActionMenu();
virtual void insert( KAction*, int index = -1 );
virtual void remove( KAction* );
KPopupMenu* popupMenu() const;
- void popup( const QPoint& global );
+ void popup( const TQPoint& global );
/**
* Returns true if this action creates a delayed popup menu
@@ -1067,7 +1067,7 @@ public:
*/
void setStickyMenu(bool sticky);
- virtual int plug( QWidget* widget, int index = -1 );
+ virtual int plug( TQWidget* widget, int index = -1 );
protected:
virtual void virtual_hook( int id, void* data );
@@ -1102,8 +1102,8 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToolBarPopupAction( const QString& text, const QString& icon, const KShortcut& cut = KShortcut(),
- QObject* parent = 0, const char* name = 0 );
+ KToolBarPopupAction( const TQString& text, const TQString& icon, const KShortcut& cut = KShortcut(),
+ TQObject* parent = 0, const char* name = 0 );
/**
* Create a KToolBarPopupAction, with a text, an icon, an accelerator,
@@ -1116,13 +1116,13 @@ public:
* @param icon The icon to display.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's owner.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToolBarPopupAction( const QString& text, const QString& icon, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent = 0, const char* name = 0 );
+ KToolBarPopupAction( const TQString& text, const TQString& icon, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent = 0, const char* name = 0 );
/**
* Create a KToolBarPopupAction, with a KGuiItem, an accelerator,
@@ -1135,17 +1135,17 @@ public:
* @param item The text and icon that will be displayed.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's owner.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
KToolBarPopupAction( const KGuiItem& item, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name );
virtual ~KToolBarPopupAction();
- virtual int plug( QWidget *widget, int index = -1 );
+ virtual int plug( TQWidget *widget, int index = -1 );
/**
* The popup menu that is shown when clicking (some time) on the toolbar
@@ -1215,13 +1215,13 @@ public:
* toolbar in an xml ui file, or a toolbar programmatically
* created with that name.
*/
- KToggleToolBarAction( const char* toolBarName, const QString& text,
+ KToggleToolBarAction( const char* toolBarName, const TQString& text,
KActionCollection* parent, const char* name );
- KToggleToolBarAction( KToolBar *toolBar, const QString &text,
+ KToggleToolBarAction( KToolBar *toolBar, const TQString &text,
KActionCollection *parent, const char *name );
virtual ~KToggleToolBarAction();
- virtual int plug( QWidget * widget, int index = -1 );
+ virtual int plug( TQWidget * widget, int index = -1 );
KToolBar *toolBar() { return m_toolBar; }
@@ -1229,8 +1229,8 @@ public slots:
virtual void setChecked( bool );
private:
- QCString m_toolBarName;
- QGuardedPtr<KToolBar> m_toolBar;
+ TQCString m_toolBarName;
+ TQGuardedPtr<KToolBar> m_toolBar;
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -1240,13 +1240,13 @@ private:
/**
* An action for switching between to/from full screen mode. Note that
- * QWidget::isFullScreen() may reflect the new or the old state
+ * TQWidget::isFullScreen() may reflect the new or the old state
* depending on how the action was triggered (by the application or
* from the window manager). Also don't try to track the window state
* yourself. Rely on this action's state (isChecked()) instead.
*
* Important: If you need to set/change the fullscreen state manually,
- * use the relevant QWidget function (showFullScreen etc.), do not
+ * use the relevant TQWidget function (showFullScreen etc.), do not
* call directly the slot connected to the toggled() signal. The slot
* still needs to explicitly set the window state though.
* @since 3.2
@@ -1259,30 +1259,30 @@ public:
* Create a KToggleFullScreenAction
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param window the window that will switch to/from full screen mode
* @param name An internal name for this action.
*/
KToggleFullScreenAction( const KShortcut &cut,
- const QObject* receiver, const char* slot,
- QObject* parent, QWidget* window,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent, TQWidget* window,
const char* name );
virtual ~KToggleFullScreenAction();
/**
* Sets the window that will be related to this action.
*/
- void setWindow( QWidget* window );
+ void setWindow( TQWidget* window );
public slots:
virtual void setChecked( bool );
protected:
/**
* @internal
*/
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
private:
- QWidget* window;
+ TQWidget* window;
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -1304,16 +1304,16 @@ public:
* when plugged. This action may only be plugged into
* a toolbar.
*/
- KWidgetAction( QWidget* widget, const QString& text,
+ KWidgetAction( TQWidget* widget, const TQString& text,
const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name );
virtual ~KWidgetAction();
/**
* Returns the widget associated with this action.
*/
- QWidget* widget() { return m_widget; }
+ TQWidget* widget() { return m_widget; }
void setAutoSized( bool );
@@ -1321,16 +1321,16 @@ public:
* Plug the action. The widget passed to the constructor
* will be reparented to w, which must inherit KToolBar.
*/
- virtual int plug( QWidget* widget, int index = -1 );
+ virtual int plug( TQWidget* widget, int index = -1 );
/**
* Unplug the action. Ensures that the action is not
* destroyed. It will be hidden and reparented to 0L instead.
*/
- virtual void unplug( QWidget *w );
+ virtual void unplug( TQWidget *w );
protected slots:
void slotToolbarDestroyed();
private:
- QGuardedPtr<QWidget> m_widget;
+ TQGuardedPtr<TQWidget> m_widget;
bool m_autoSized;
protected:
virtual void virtual_hook( int id, void* data );
@@ -1343,10 +1343,10 @@ class KDEUI_EXPORT KActionSeparator : public KAction
{
Q_OBJECT
public:
- KActionSeparator( QObject* parent = 0, const char* name = 0 );
+ KActionSeparator( TQObject* parent = 0, const char* name = 0 );
virtual ~KActionSeparator();
- virtual int plug( QWidget *widget, int index = -1 );
+ virtual int plug( TQWidget *widget, int index = -1 );
protected:
virtual void virtual_hook( int id, void* data );
@@ -1380,13 +1380,13 @@ public:
* @param icon The icon to display.
* @param cut The corresponding keyboard accelerator (shortcut).
* @param receiver The SLOT's owner.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KPasteTextAction( const QString& text, const QString& icon, const KShortcut& cut,
- const QObject* receiver, const char* slot,
- QObject* parent = 0, const char* name = 0 );
+ KPasteTextAction( const TQString& text, const TQString& icon, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
+ TQObject* parent = 0, const char* name = 0 );
virtual ~KPasteTextAction();
@@ -1402,7 +1402,7 @@ public:
*/
void setMixedMode(bool mode);
- virtual int plug( QWidget *widget, int index = -1 );
+ virtual int plug( TQWidget *widget, int index = -1 );
protected slots:
void menuAboutToShow();
diff --git a/kdeui/kactioncollection.cpp b/kdeui/kactioncollection.cpp
index 26a3de9b3..e383809c6 100644
--- a/kdeui/kactioncollection.cpp
+++ b/kdeui/kactioncollection.cpp
@@ -34,9 +34,9 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qpopupmenu.h>
-#include <qptrdict.h>
-#include <qvariant.h>
+#include <tqpopupmenu.h>
+#include <tqptrdict.h>
+#include <tqvariant.h>
class KActionCollection::KActionCollectionPrivate
{
@@ -57,28 +57,28 @@ public:
}
KInstance *m_instance;
- QString m_sXMLFile;
+ TQString m_sXMLFile;
bool m_bAutoConnectShortcuts;
//bool m_bOneKAccelOnly;
//int m_iWidgetCurrent;
- //QValueList<QWidget*> m_widgetList;
- //QValueList<KAccel*> m_kaccelList;
- QValueList<KActionCollection*> m_docList;
- QWidget *m_widget;
+ //TQValueList<TQWidget*> m_widgetList;
+ //TQValueList<KAccel*> m_kaccelList;
+ TQValueList<KActionCollection*> m_docList;
+ TQWidget *m_widget;
KAccel *m_kaccel;
KAccel *m_builderKAccel;
- QAsciiDict<KAction> m_actionDict;
- QPtrDict< QPtrList<KAction> > m_dctHighlightContainers;
+ TQAsciiDict<KAction> m_actionDict;
+ TQPtrDict< TQPtrList<KAction> > m_dctHighlightContainers;
bool m_highlight;
KAction *m_currentHighlightAction;
bool m_statusCleared;
const KXMLGUIClient *m_parentGUIClient;
};
-KActionCollection::KActionCollection( QWidget *parent, const char *name,
+KActionCollection::KActionCollection( TQWidget *parent, const char *name,
KInstance *instance )
- : QObject( parent, name )
+ : TQObject( parent, name )
{
kdDebug(129) << "KActionCollection::KActionCollection( " << parent << ", " << name << " ): this = " << this << endl; // ellis
d = new KActionCollectionPrivate;
@@ -89,9 +89,9 @@ KActionCollection::KActionCollection( QWidget *parent, const char *name,
}
-KActionCollection::KActionCollection( QWidget *watch, QObject* parent, const char *name,
+KActionCollection::KActionCollection( TQWidget *watch, TQObject* parent, const char *name,
KInstance *instance )
- : QObject( parent, name )
+ : TQObject( parent, name )
{
kdDebug(129) << "KActionCollection::KActionCollection( " << watch << ", " << parent << ", " << name << " ): this = " << this << endl; //ellis
d = new KActionCollectionPrivate;
@@ -103,14 +103,14 @@ KActionCollection::KActionCollection( QWidget *watch, QObject* parent, const cha
#ifndef KDE_NO_COMPAT
// KDE 4: remove
-KActionCollection::KActionCollection( QObject *parent, const char *name,
+KActionCollection::KActionCollection( TQObject *parent, const char *name,
KInstance *instance )
- : QObject( parent, name )
+ : TQObject( parent, name )
{
- kdWarning(129) << "KActionCollection::KActionCollection( QObject *parent, const char *name, KInstance *instance )" << endl; //ellis
+ kdWarning(129) << "KActionCollection::KActionCollection( TQObject *parent, const char *name, KInstance *instance )" << endl; //ellis
kdDebug(129) << kdBacktrace() << endl;
d = new KActionCollectionPrivate;
- QWidget* w = dynamic_cast<QWidget*>( parent );
+ TQWidget* w = dynamic_cast<TQWidget*>( parent );
if( w )
setWidget( w );
//d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0);
@@ -118,7 +118,7 @@ KActionCollection::KActionCollection( QObject *parent, const char *name,
}
KActionCollection::KActionCollection( const KActionCollection &copy )
- : QObject()
+ : TQObject()
{
kdWarning(129) << "KActionCollection::KActionCollection( const KActionCollection & ): function is severely deprecated." << endl;
d = new KActionCollectionPrivate;
@@ -127,7 +127,7 @@ KActionCollection::KActionCollection( const KActionCollection &copy )
#endif // KDE 4: remove end
KActionCollection::KActionCollection( const char *name, const KXMLGUIClient *parent )
- : QObject( 0L, name )
+ : TQObject( 0L, name )
{
d = new KActionCollectionPrivate;
d->m_parentGUIClient=parent;
@@ -138,7 +138,7 @@ KActionCollection::KActionCollection( const char *name, const KXMLGUIClient *par
KActionCollection::~KActionCollection()
{
kdDebug(129) << "KActionCollection::~KActionCollection(): this = " << this << endl;
- for ( QAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
+ for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
KAction* pAction = it.current();
if ( pAction->m_parentCollection == this )
pAction->m_parentCollection = 0L;
@@ -149,7 +149,7 @@ KActionCollection::~KActionCollection()
delete d; d = 0;
}
-void KActionCollection::setWidget( QWidget* w )
+void KActionCollection::setWidget( TQWidget* w )
{
//if ( d->m_actionDict.count() > 0 ) {
// kdError(129) << "KActionCollection::setWidget(): must be called before any actions are added to collection!" << endl;
@@ -180,7 +180,7 @@ bool KActionCollection::addDocCollection( KActionCollection* pDoc )
return true;
}
-void KActionCollection::beginXMLPlug( QWidget *widget )
+void KActionCollection::beginXMLPlug( TQWidget *widget )
{
kdDebug(129) << "KActionCollection::beginXMLPlug( buildWidget = " << widget << " ): this = " << this << " d->m_builderKAccel = " << d->m_builderKAccel << endl;
@@ -209,7 +209,7 @@ void KActionCollection::prepareXMLUnplug()
void KActionCollection::unplugShortcuts( KAccel* kaccel )
{
- for ( QAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
+ for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
KAction* pAction = it.current();
pAction->removeKAccel( kaccel );
}
@@ -218,7 +218,7 @@ void KActionCollection::unplugShortcuts( KAccel* kaccel )
d->m_docList[i]->unplugShortcuts( kaccel );
}
-/*void KActionCollection::addWidget( QWidget* w )
+/*void KActionCollection::addWidget( TQWidget* w )
{
if( !d->m_bOneKAccelOnly ) {
kdDebug(129) << "KActionCollection::addWidget( " << w << " ): this = " << this << endl;
@@ -234,7 +234,7 @@ void KActionCollection::unplugShortcuts( KAccel* kaccel )
}
}
-void KActionCollection::removeWidget( QWidget* w )
+void KActionCollection::removeWidget( TQWidget* w )
{
if( !d->m_bOneKAccelOnly ) {
kdDebug(129) << "KActionCollection::removeWidget( " << w << " ): this = " << this << endl;
@@ -242,7 +242,7 @@ void KActionCollection::removeWidget( QWidget* w )
if( d->m_widgetList[i] == w ) {
// Remove KAccel object from children.
KAccel* pKAccel = d->m_kaccelList[i];
- for ( QAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
+ for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
KAction* pAction = it.current();
if ( pAction->m_parentCollection == this ) {
pAction->removeKAccel( pKAccel );
@@ -357,7 +357,7 @@ KAction* KActionCollection::_take( KAction* action )
void KActionCollection::_clear()
{
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ TQAsciiDictIterator<KAction> it( d->m_actionDict );
while ( it.current() )
_remove( it.current() );
}
@@ -378,7 +378,7 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co
pAction = d->m_actionDict[ name ];
else {
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ TQAsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
{
if ( ( !name || !strcmp( it.current()->name(), name ) ) &&
@@ -399,18 +399,18 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co
KAction* KActionCollection::action( int index ) const
{
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ TQAsciiDictIterator<KAction> it( d->m_actionDict );
it += index;
return it.current();
// return d->m_actions.at( index );
}
-bool KActionCollection::readShortcutSettings( const QString& sConfigGroup, KConfigBase* pConfig )
+bool KActionCollection::readShortcutSettings( const TQString& sConfigGroup, KConfigBase* pConfig )
{
return KActionShortcutList(this).readSettings( sConfigGroup, pConfig );
}
-bool KActionCollection::writeShortcutSettings( const QString& sConfigGroup, KConfigBase* pConfig ) const
+bool KActionCollection::writeShortcutSettings( const TQString& sConfigGroup, KConfigBase* pConfig ) const
{
return KActionShortcutList((KActionCollection*)this).writeSettings( sConfigGroup, pConfig );
}
@@ -420,11 +420,11 @@ uint KActionCollection::count() const
return d->m_actionDict.count();
}
-QStringList KActionCollection::groups() const
+TQStringList KActionCollection::groups() const
{
- QStringList lst;
+ TQStringList lst;
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ TQAsciiDictIterator<KAction> 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 @@ QStringList KActionCollection::groups() const
return lst;
}
-KActionPtrList KActionCollection::actions( const QString& group ) const
+KActionPtrList KActionCollection::actions( const TQString& group ) const
{
KActionPtrList lst;
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ TQAsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
if ( it.current()->group() == group )
lst.append( it.current() );
@@ -450,7 +450,7 @@ KActionPtrList KActionCollection::actions() const
{
KActionPtrList lst;
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ TQAsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
lst.append( it.current() );
@@ -470,12 +470,12 @@ KInstance *KActionCollection::instance() const
return d->m_instance;
}
-void KActionCollection::setXMLFile( const QString& sXMLFile )
+void KActionCollection::setXMLFile( const TQString& sXMLFile )
{
d->m_sXMLFile = sXMLFile;
}
-const QString& KActionCollection::xmlFile() const
+const TQString& KActionCollection::xmlFile() const
{
return d->m_sXMLFile;
}
@@ -490,32 +490,32 @@ bool KActionCollection::highlightingEnabled() const
return d->m_highlight;
}
-void KActionCollection::connectHighlight( QWidget *container, KAction *action )
+void KActionCollection::connectHighlight( TQWidget *container, KAction *action )
{
if ( !d->m_highlight )
return;
- QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
+ TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
if ( !actionList )
{
- actionList = new QPtrList<KAction>;
+ actionList = new TQPtrList<KAction>;
- if ( ::qt_cast<QPopupMenu *>( container ) )
+ if ( ::qt_cast<TQPopupMenu *>( container ) )
{
- connect( container, SIGNAL( highlighted( int ) ),
- this, SLOT( slotMenuItemHighlighted( int ) ) );
- connect( container, SIGNAL( aboutToHide() ),
- this, SLOT( slotMenuAboutToHide() ) );
+ connect( container, TQT_SIGNAL( highlighted( int ) ),
+ this, TQT_SLOT( slotMenuItemHighlighted( int ) ) );
+ connect( container, TQT_SIGNAL( aboutToHide() ),
+ this, TQT_SLOT( slotMenuAboutToHide() ) );
}
else if ( ::qt_cast<KToolBar *>( container ) )
{
- connect( container, SIGNAL( highlighted( int, bool ) ),
- this, SLOT( slotToolBarButtonHighlighted( int, bool ) ) );
+ connect( container, TQT_SIGNAL( highlighted( int, bool ) ),
+ this, TQT_SLOT( slotToolBarButtonHighlighted( int, bool ) ) );
}
- connect( container, SIGNAL( destroyed() ),
- this, SLOT( slotDestroyed() ) );
+ connect( container, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotDestroyed() ) );
d->m_dctHighlightContainers.insert( container, actionList );
}
@@ -523,12 +523,12 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action )
actionList->append( action );
}
-void KActionCollection::disconnectHighlight( QWidget *container, KAction *action )
+void KActionCollection::disconnectHighlight( TQWidget *container, KAction *action )
{
if ( !d->m_highlight )
return;
- QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
+ TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
if ( !actionList )
return;
@@ -547,7 +547,7 @@ void KActionCollection::slotMenuItemHighlighted( int id )
if ( d->m_currentHighlightAction )
emit actionHighlighted( d->m_currentHighlightAction, false );
- QWidget *container = static_cast<QWidget *>( const_cast<QObject *>( sender() ) );
+ TQWidget *container = static_cast<TQWidget *>( const_cast<TQObject *>( sender() ) );
d->m_currentHighlightAction = findAction( container, id );
@@ -581,7 +581,7 @@ void KActionCollection::slotToolBarButtonHighlighted( int id, bool highlight )
if ( !d->m_highlight )
return;
- QWidget *container = static_cast<QWidget *>( const_cast<QObject *>( sender() ) );
+ TQWidget *container = static_cast<TQWidget *>( const_cast<TQObject *>( sender() ) );
KAction *action = findAction( container, id );
@@ -606,17 +606,17 @@ void KActionCollection::slotToolBarButtonHighlighted( int id, bool highlight )
void KActionCollection::slotDestroyed()
{
- d->m_dctHighlightContainers.remove( reinterpret_cast<void *>( const_cast<QObject *>(sender()) ) );
+ d->m_dctHighlightContainers.remove( reinterpret_cast<void *>( const_cast<TQObject *>(sender()) ) );
}
-KAction *KActionCollection::findAction( QWidget *container, int id )
+KAction *KActionCollection::findAction( TQWidget *container, int id )
{
- QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ];
+ TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ];
if ( !actionList )
return 0;
- QPtrListIterator<KAction> it( *actionList );
+ TQPtrListIterator<KAction> it( *actionList );
for (; it.current(); ++it )
if ( it.current()->isPlugged( container, id ) )
return it.current();
@@ -636,9 +636,9 @@ KActionCollection KActionCollection::operator+(const KActionCollection &c ) cons
kdWarning(129) << "KActionCollection::operator+(): function is severely deprecated." << endl;
KActionCollection ret( *this );
- QValueList<KAction *> actions = c.actions();
- QValueList<KAction *>::ConstIterator it = actions.begin();
- QValueList<KAction *>::ConstIterator end = actions.end();
+ TQValueList<KAction *> actions = c.actions();
+ TQValueList<KAction *>::ConstIterator it = actions.begin();
+ TQValueList<KAction *>::ConstIterator end = actions.end();
for (; it != end; ++it )
ret.insert( *it );
@@ -662,7 +662,7 @@ KActionCollection &KActionCollection::operator=( const KActionCollection &copy )
KActionCollection &KActionCollection::operator+=( const KActionCollection &c )
{
kdWarning(129) << "KActionCollection::operator+=(): function is severely deprecated." << endl;
- QAsciiDictIterator<KAction> it(c.d->m_actionDict);
+ TQAsciiDictIterator<KAction> it(c.d->m_actionDict);
for ( ; it.current(); ++it )
insert( it.current() );
@@ -681,11 +681,11 @@ KActionShortcutList::~KActionShortcutList()
{ }
uint KActionShortcutList::count() const
{ return m_actions.count(); }
-QString KActionShortcutList::name( uint i ) const
+TQString KActionShortcutList::name( uint i ) const
{ return m_actions.action(i)->name(); }
-QString KActionShortcutList::label( uint i ) const
+TQString KActionShortcutList::label( uint i ) const
{ return m_actions.action(i)->text(); }
-QString KActionShortcutList::whatsThis( uint i ) const
+TQString KActionShortcutList::whatsThis( uint i ) const
{ return m_actions.action(i)->whatsThis(); }
const KShortcut& KActionShortcutList::shortcut( uint i ) const
{ return m_actions.action(i)->shortcut(); }
@@ -697,9 +697,9 @@ bool KActionShortcutList::setShortcut( uint i, const KShortcut& cut )
{ return m_actions.action(i)->setShortcut( cut ); }
const KInstance* KActionShortcutList::instance() const
{ return m_actions.instance(); }
-QVariant KActionShortcutList::getOther( Other, uint ) const
- { return QVariant(); }
-bool KActionShortcutList::setOther( Other, uint, QVariant )
+TQVariant KActionShortcutList::getOther( Other, uint ) const
+ { return TQVariant(); }
+bool KActionShortcutList::setOther( Other, uint, TQVariant )
{ return false; }
const KAction *KActionShortcutList::action( uint i) const
{ return m_actions.action(i); }
@@ -707,36 +707,36 @@ const KAction *KActionShortcutList::action( uint i) const
bool KActionShortcutList::save() const
{
const KXMLGUIClient* guiClient=m_actions.parentGUIClient();
- const QString xmlFile=guiClient ? guiClient->xmlFile() : m_actions.xmlFile();
+ const TQString xmlFile=guiClient ? guiClient->xmlFile() : m_actions.xmlFile();
kdDebug(129) << "KActionShortcutList::save(): xmlFile = " << xmlFile << endl;
if( m_actions.xmlFile().isEmpty() )
return writeSettings();
- QString attrShortcut = QString::fromLatin1("shortcut");
- QString attrAccel = QString::fromLatin1("accel"); // Depricated attribute
+ TQString attrShortcut = TQString::fromLatin1("shortcut");
+ TQString attrAccel = TQString::fromLatin1("accel"); // Depricated attribute
// Read XML file
- QString sXml( KXMLGUIFactory::readConfigFile( xmlFile, false, instance() ) );
- QDomDocument doc;
+ TQString sXml( KXMLGUIFactory::readConfigFile( xmlFile, false, instance() ) );
+ TQDomDocument doc;
doc.setContent( sXml );
// Process XML data
// Get hold of ActionProperties tag
- QDomElement elem = KXMLGUIFactory::actionPropertiesElement( doc );
+ TQDomElement elem = KXMLGUIFactory::actionPropertiesElement( doc );
// now, iterate through our actions
uint nSize = count();
for( uint i = 0; i < nSize; i++ ) {
- const QString& sName = name(i);
+ const TQString& sName = name(i);
bool bSameAsDefault = (shortcut(i) == shortcutDefault(i));
//kdDebug(129) << "name = " << sName << " shortcut = " << shortcut(i).toStringInternal() << " def = " << shortcutDefault(i).toStringInternal() << endl;
// now see if this element already exists
// and create it if necessary (unless bSameAsDefault)
- QDomElement act_elem = KXMLGUIFactory::findActionByName( elem, sName, !bSameAsDefault );
+ TQDomElement act_elem = KXMLGUIFactory::findActionByName( elem, sName, !bSameAsDefault );
if ( act_elem.isNull() )
continue;
@@ -766,11 +766,11 @@ KActionPtrShortcutList::~KActionPtrShortcutList()
{ }
uint KActionPtrShortcutList::count() const
{ return m_actions.count(); }
-QString KActionPtrShortcutList::name( uint i ) const
+TQString KActionPtrShortcutList::name( uint i ) const
{ return m_actions[i]->name(); }
-QString KActionPtrShortcutList::label( uint i ) const
+TQString KActionPtrShortcutList::label( uint i ) const
{ return m_actions[i]->text(); }
-QString KActionPtrShortcutList::whatsThis( uint i ) const
+TQString KActionPtrShortcutList::whatsThis( uint i ) const
{ return m_actions[i]->whatsThis(); }
const KShortcut& KActionPtrShortcutList::shortcut( uint i ) const
{ return m_actions[i]->shortcut(); }
@@ -780,9 +780,9 @@ bool KActionPtrShortcutList::isConfigurable( uint i ) const
{ return m_actions[i]->isShortcutConfigurable(); }
bool KActionPtrShortcutList::setShortcut( uint i, const KShortcut& cut )
{ return m_actions[i]->setShortcut( cut ); }
-QVariant KActionPtrShortcutList::getOther( Other, uint ) const
- { return QVariant(); }
-bool KActionPtrShortcutList::setOther( Other, uint, QVariant )
+TQVariant KActionPtrShortcutList::getOther( Other, uint ) const
+ { return TQVariant(); }
+bool KActionPtrShortcutList::setOther( Other, uint, TQVariant )
{ return false; }
bool KActionPtrShortcutList::save() const
{ return false; }
diff --git a/kdeui/kactioncollection.h b/kdeui/kactioncollection.h
index cf3c88e81..5d30318fb 100644
--- a/kdeui/kactioncollection.h
+++ b/kdeui/kactioncollection.h
@@ -27,10 +27,10 @@
#include <kaction.h>
-#include <qkeysequence.h>
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qguardedptr.h>
+#include <tqkeysequence.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqguardedptr.h>
#include <kguiitem.h>
#include <kshortcut.h>
#include <kstdaction.h>
@@ -56,7 +56,7 @@ class KPopupMenu;
class KMainWindow;
class KXMLGUIClient;
-typedef QValueList<KAction *> KActionPtrList;
+typedef TQValueList<KAction *> KActionPtrList;
/**
* A managed set of KAction objects.
@@ -69,10 +69,10 @@ typedef QValueList<KAction *> KActionPtrList;
*
* \code
* actionCollection()->setHighlightingEnabled(true);
- * connect(actionCollection(), SIGNAL( actionStatusText( const QString & ) ),
- * statusBar(), SLOT( message( const QString & ) ) );
- * connect(actionCollection(), SIGNAL( clearStatusText() ),
- * statusBar(), SLOT( clear() ) );
+ * connect(actionCollection(), TQT_SIGNAL( actionStatusText( const TQString & ) ),
+ * statusBar(), TQT_SLOT( message( const TQString & ) ) );
+ * connect(actionCollection(), TQT_SIGNAL( clearStatusText() ),
+ * statusBar(), TQT_SLOT( clear() ) );
* \endcode
*/
class KDEUI_EXPORT KActionCollection : public QObject
@@ -83,13 +83,13 @@ class KDEUI_EXPORT KActionCollection : public QObject
Q_OBJECT
public:
- KActionCollection( QWidget *parent, const char *name = 0, KInstance *instance = 0 );
+ KActionCollection( TQWidget *parent, const char *name = 0, KInstance *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( QWidget *watch, QObject* parent, const char *name = 0, KInstance *instance = 0 );
+ KActionCollection( TQWidget *watch, TQObject* parent, const char *name = 0, KInstance *instance = 0 );
#ifndef KDE_NO_COMPAT
KActionCollection( const KActionCollection &copy );
#endif
@@ -99,7 +99,7 @@ public:
* This sets the widget to which the keyboard shortcuts should be attached.
* You only need to call this if a null pointer was passed in the constructor.
*/
- virtual void setWidget( QWidget *widget );
+ virtual void setWidget( TQWidget *widget );
/**
* This indicates whether new actions which are created in this collection
@@ -179,23 +179,23 @@ public:
* @see KAction::group()
* @see KAction::setGroup()
*/
- virtual QStringList groups() const;
+ 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 QString& group ) const;
+ virtual KActionPtrList actions( const TQString& group ) const;
/** Returns the list of actions managed by this action collection. */
virtual KActionPtrList actions() const;
/**
* Used for reading shortcut configuration from a non-XML rc file.
*/
- bool readShortcutSettings( const QString& sConfigGroup = QString::null, KConfigBase* pConfig = 0 );
+ bool readShortcutSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 );
/**
* Used for writing shortcut configuration to a non-XML rc file.
*/
- bool writeShortcutSettings( const QString& sConfigGroup = QString::null, KConfigBase* pConfig = 0 ) const;
+ bool writeShortcutSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 ) const;
void setInstance( KInstance *instance );
/** The instance with which this class is associated. */
@@ -204,11 +204,11 @@ public:
/**
* @deprecated
*/
- void setXMLFile( const QString& );
+ void setXMLFile( const TQString& );
/**
* @deprecated
*/
- const QString& xmlFile() const;
+ const TQString& xmlFile() const;
//TODO FOR KDE4 make this default true
/**
@@ -238,7 +238,7 @@ public:
* 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 QPopupMenu or KToolBar)
+ * @param container A container in which the KAction is plugged (must inherit TQPopupMenu or KToolBar)
* @param action The action you are interested in
* @see disconnectHighlight()
* @see actionHighlighted()
@@ -246,13 +246,13 @@ public:
* @see highlightingEnabled()
* @see actionHighlighted()
*/
- void connectHighlight( QWidget *container, KAction *action );
+ void connectHighlight( TQWidget *container, KAction *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 QPopupMenu or KToolBar)
+ * @param container A container in which the KAction is plugged (must inherit TQPopupMenu or KToolBar)
* @param action The action you are interested in
* @see connectHighlight()
* @see actionHighlighted()
@@ -260,7 +260,7 @@ public:
* @see highlightingEnabled()
* @see actionHighlighted()
*/
- void disconnectHighlight( QWidget *container, KAction *action );
+ void disconnectHighlight( TQWidget *container, KAction *action );
/**
* The parent KXMLGUIClient, return 0L if not available.
@@ -298,7 +298,7 @@ signals:
*
* @see setHighlightingEnabled()
*/
- void actionStatusText( const QString &text );
+ void actionStatusText( const TQString &text );
/** Emitted when an action loses highlighting.
* This is only emitted if you have setHighlightingEnabled()
*
@@ -313,7 +313,7 @@ private:
* widget it should connect widget-scope actions to, and what
* main window it should connect
*/
- void beginXMLPlug( QWidget *widget );
+ void beginXMLPlug( TQWidget *widget );
void endXMLPlug();
/** @internal. Only to be called by KXMLGUIFactory::removeClient() */
void prepareXMLUnplug();
@@ -331,11 +331,11 @@ private slots:
void slotDestroyed();
private:
- KAction *findAction( QWidget *container, int id );
+ KAction *findAction( TQWidget *container, int id );
#ifndef KDE_NO_COMPAT
public:
- KActionCollection( QObject *parent, const char *name = 0, KInstance *instance = 0 );
+ KActionCollection( TQObject *parent, const char *name = 0, KInstance *instance = 0 );
#endif
public:
diff --git a/kdeui/kactionselector.cpp b/kdeui/kactionselector.cpp
index 68d1094f4..a34582d35 100644
--- a/kdeui/kactionselector.cpp
+++ b/kdeui/kactionselector.cpp
@@ -23,37 +23,37 @@
#include <kiconloader.h>
#include <kdialog.h> // for spacingHint()
#include <kdebug.h>
-#include <qapplication.h>
-#include <qlistbox.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qevent.h>
-#include <qwhatsthis.h>
+#include <tqapplication.h>
+#include <tqlistbox.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqevent.h>
+#include <tqwhatsthis.h>
class KActionSelectorPrivate {
public:
- QListBox *availableListBox, *selectedListBox;
- QToolButton *btnAdd, *btnRemove, *btnUp, *btnDown;
- QLabel *lAvailable, *lSelected;
+ TQListBox *availableListBox, *selectedListBox;
+ TQToolButton *btnAdd, *btnRemove, *btnUp, *btnDown;
+ TQLabel *lAvailable, *lSelected;
bool moveOnDoubleClick, keyboardEnabled;
KActionSelector::ButtonIconSize iconSize;
- QString addIcon, removeIcon, upIcon, downIcon;
+ TQString addIcon, removeIcon, upIcon, downIcon;
KActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy;
bool showUpDownButtons;
};
//BEGIN Constructor/destructor
-KActionSelector::KActionSelector( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KActionSelector::KActionSelector( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
d = new KActionSelectorPrivate();
d->moveOnDoubleClick = true;
d->keyboardEnabled = true;
d->iconSize = SmallIcon;
- d->addIcon = QApplication::reverseLayout()? "back" : "forward";
- d->removeIcon = QApplication::reverseLayout()? "forward" : "back";
+ d->addIcon = TQApplication::reverseLayout()? "back" : "forward";
+ d->removeIcon = TQApplication::reverseLayout()? "forward" : "back";
d->upIcon = "up";
d->downIcon = "down";
d->availableInsertionPolicy = Sorted;
@@ -62,55 +62,55 @@ KActionSelector::KActionSelector( QWidget *parent, const char *name )
//int isz = IconSize( KIcon::Small );
- QHBoxLayout *lo = new QHBoxLayout( this );
+ TQHBoxLayout *lo = new TQHBoxLayout( this );
lo->setSpacing( KDialog::spacingHint() );
- QVBoxLayout *loAv = new QVBoxLayout( lo );
- d->lAvailable = new QLabel( i18n("&Available:"), this );
+ TQVBoxLayout *loAv = new TQVBoxLayout( lo );
+ d->lAvailable = new TQLabel( i18n("&Available:"), this );
loAv->addWidget( d->lAvailable );
- d->availableListBox = new QListBox( this );
+ d->availableListBox = new TQListBox( this );
loAv->addWidget( d->availableListBox );
d->lAvailable->setBuddy( d->availableListBox );
- QVBoxLayout *loHBtns = new QVBoxLayout( lo );
+ TQVBoxLayout *loHBtns = new TQVBoxLayout( lo );
loHBtns->addStretch( 1 );
- d->btnAdd = new QToolButton( this );
+ d->btnAdd = new TQToolButton( this );
loHBtns->addWidget( d->btnAdd );
- d->btnRemove = new QToolButton( this );
+ d->btnRemove = new TQToolButton( this );
loHBtns->addWidget( d->btnRemove );
loHBtns->addStretch( 1 );
- QVBoxLayout *loS = new QVBoxLayout( lo );
- d->lSelected = new QLabel( i18n("&Selected:"), this );
+ TQVBoxLayout *loS = new TQVBoxLayout( lo );
+ d->lSelected = new TQLabel( i18n("&Selected:"), this );
loS->addWidget( d->lSelected );
- d->selectedListBox = new QListBox( this );
+ d->selectedListBox = new TQListBox( this );
loS->addWidget( d->selectedListBox );
d->lSelected->setBuddy( d->selectedListBox );
- QVBoxLayout *loVBtns = new QVBoxLayout( lo );
+ TQVBoxLayout *loVBtns = new TQVBoxLayout( lo );
loVBtns->addStretch( 1 );
- d->btnUp = new QToolButton( this );
+ d->btnUp = new TQToolButton( this );
d->btnUp->setAutoRepeat( true );
loVBtns->addWidget( d->btnUp );
- d->btnDown = new QToolButton( this );
+ d->btnDown = new TQToolButton( this );
d->btnDown->setAutoRepeat( true );
loVBtns->addWidget( d->btnDown );
loVBtns->addStretch( 1 );
loadIcons();
- connect( d->btnAdd, SIGNAL(clicked()), this, SLOT(buttonAddClicked()) );
- connect( d->btnRemove, SIGNAL(clicked()), this, SLOT(buttonRemoveClicked()) );
- connect( d->btnUp, SIGNAL(clicked()), this, SLOT(buttonUpClicked()) );
- connect( d->btnDown, SIGNAL(clicked()), this, SLOT(buttonDownClicked()) );
- connect( d->availableListBox, SIGNAL(doubleClicked(QListBoxItem*)),
- this, SLOT(itemDoubleClicked(QListBoxItem*)) );
- connect( d->selectedListBox, SIGNAL(doubleClicked(QListBoxItem*)),
- this, SLOT(itemDoubleClicked(QListBoxItem*)) );
- connect( d->availableListBox, SIGNAL(currentChanged(QListBoxItem*)),
- this, SLOT(slotCurrentChanged(QListBoxItem *)) );
- connect( d->selectedListBox, SIGNAL(currentChanged(QListBoxItem*)),
- this, SLOT(slotCurrentChanged(QListBoxItem *)) );
+ connect( d->btnAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonAddClicked()) );
+ connect( d->btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonRemoveClicked()) );
+ connect( d->btnUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonUpClicked()) );
+ connect( d->btnDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonDownClicked()) );
+ connect( d->availableListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)),
+ this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) );
+ connect( d->selectedListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)),
+ this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) );
+ connect( d->availableListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)),
+ this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) );
+ connect( d->selectedListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)),
+ this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) );
d->availableListBox->installEventFilter( this );
d->selectedListBox->installEventFilter( this );
@@ -125,17 +125,17 @@ KActionSelector::~KActionSelector()
//BEGIN Public Methods
-QListBox *KActionSelector::availableListBox() const
+TQListBox *KActionSelector::availableListBox() const
{
return d->availableListBox;
}
-QListBox *KActionSelector::selectedListBox() const
+TQListBox *KActionSelector::selectedListBox() const
{
return d->selectedListBox;
}
-void KActionSelector::setButtonIcon( const QString &icon, MoveButton button )
+void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button )
{
switch ( button )
{
@@ -160,7 +160,7 @@ void KActionSelector::setButtonIcon( const QString &icon, MoveButton button )
}
}
-void KActionSelector::setButtonIconSet( const QIconSet &iconset, MoveButton button )
+void KActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton button )
{
switch ( button )
{
@@ -181,7 +181,7 @@ void KActionSelector::setButtonIconSet( const QIconSet &iconset, MoveButton butt
}
}
-void KActionSelector::setButtonTooltip( const QString &tip, MoveButton button )
+void KActionSelector::setButtonTooltip( const TQString &tip, MoveButton button )
{
switch ( button )
{
@@ -202,21 +202,21 @@ void KActionSelector::setButtonTooltip( const QString &tip, MoveButton button )
}
}
-void KActionSelector::setButtonWhatsThis( const QString &text, MoveButton button )
+void KActionSelector::setButtonWhatsThis( const TQString &text, MoveButton button )
{
switch ( button )
{
case ButtonAdd:
- QWhatsThis::add( d->btnAdd, text );
+ TQWhatsThis::add( d->btnAdd, text );
break;
case ButtonRemove:
- QWhatsThis::add( d->btnRemove, text );
+ TQWhatsThis::add( d->btnRemove, text );
break;
case ButtonUp:
- QWhatsThis::add( d->btnUp, text );
+ TQWhatsThis::add( d->btnUp, text );
break;
case ButtonDown:
- QWhatsThis::add( d->btnDown, text );
+ TQWhatsThis::add( d->btnDown, text );
break;
default:
kdDebug(13001)<<"KActionSelector::setButtonWhatsThis: DAINBREAD!"<<endl;
@@ -256,22 +256,22 @@ void KActionSelector::setKeyboardEnabled( bool b )
d->keyboardEnabled = b;
}
-QString KActionSelector::availableLabel() const
+TQString KActionSelector::availableLabel() const
{
return d->lAvailable->text();
}
-void KActionSelector::setAvailableLabel( const QString &text )
+void KActionSelector::setAvailableLabel( const TQString &text )
{
d->lAvailable->setText( text );
}
-QString KActionSelector::selectedLabel() const
+TQString KActionSelector::selectedLabel() const
{
return d->lSelected->text();
}
-void KActionSelector::setSelectedLabel( const QString &text )
+void KActionSelector::setSelectedLabel( const TQString &text )
{
d->lSelected->setText( text );
}
@@ -340,7 +340,7 @@ void KActionSelector::polish()
//END Public Slots
//BEGIN Protected
-void KActionSelector::keyPressEvent( QKeyEvent *e )
+void KActionSelector::keyPressEvent( TQKeyEvent *e )
{
if ( ! d->keyboardEnabled ) return;
if ( (e->state() & Qt::ControlButton) )
@@ -366,13 +366,13 @@ void KActionSelector::keyPressEvent( QKeyEvent *e )
}
}
-bool KActionSelector::eventFilter( QObject *o, QEvent *e )
+bool KActionSelector::eventFilter( TQObject *o, TQEvent *e )
{
- if ( d->keyboardEnabled && e->type() == QEvent::KeyPress )
+ if ( d->keyboardEnabled && e->type() == TQEvent::KeyPress )
{
- if ( (((QKeyEvent*)e)->state() & Qt::ControlButton) )
+ if ( (((TQKeyEvent*)e)->state() & Qt::ControlButton) )
{
- switch ( ((QKeyEvent*)e)->key() )
+ switch ( ((TQKeyEvent*)e)->key() )
{
case Key_Right:
buttonAddClicked();
@@ -387,18 +387,18 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
buttonDownClicked();
break;
default:
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
break;
}
return true;
}
- else if ( o->inherits( "QListBox" ) )
+ else if ( o->inherits( "TQListBox" ) )
{
- switch ( ((QKeyEvent*)e)->key() )
+ switch ( ((TQKeyEvent*)e)->key() )
{
case Key_Return:
case Key_Enter:
- QListBox *lb = (QListBox*)o;
+ TQListBox *lb = (TQListBox*)o;
int index = lb->currentItem();
if ( index < 0 ) break;
moveItem( lb->item( index ) );
@@ -406,7 +406,7 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
}
}
}
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
//END Protected
@@ -416,7 +416,7 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
void KActionSelector::buttonAddClicked()
{
// move all selected items from available to selected listbox
- QListBoxItem *item = d->availableListBox->firstItem();
+ TQListBoxItem *item = d->availableListBox->firstItem();
while ( item ) {
if ( item->isSelected() ) {
d->availableListBox->takeItem( item );
@@ -434,7 +434,7 @@ void KActionSelector::buttonAddClicked()
void KActionSelector::buttonRemoveClicked()
{
// move all selected items from selected to available listbox
- QListBoxItem *item = d->selectedListBox->firstItem();
+ TQListBoxItem *item = d->selectedListBox->firstItem();
while ( item ) {
if ( item->isSelected() ) {
d->selectedListBox->takeItem( item );
@@ -453,7 +453,7 @@ void KActionSelector::buttonUpClicked()
{
int c = d->selectedListBox->currentItem();
if ( c < 1 ) return;
- QListBoxItem *item = d->selectedListBox->item( c );
+ TQListBoxItem *item = d->selectedListBox->item( c );
d->selectedListBox->takeItem( item );
d->selectedListBox->insertItem( item, c-1 );
d->selectedListBox->setCurrentItem( item );
@@ -464,14 +464,14 @@ void KActionSelector::buttonDownClicked()
{
int c = d->selectedListBox->currentItem();
if ( c < 0 || c == int( d->selectedListBox->count() ) - 1 ) return;
- QListBoxItem *item = d->selectedListBox->item( c );
+ TQListBoxItem *item = d->selectedListBox->item( c );
d->selectedListBox->takeItem( item );
d->selectedListBox->insertItem( item, c+1 );
d->selectedListBox->setCurrentItem( item );
emit movedDown( item );
}
-void KActionSelector::itemDoubleClicked( QListBoxItem *item )
+void KActionSelector::itemDoubleClicked( TQListBoxItem *item )
{
if ( d->moveOnDoubleClick )
moveItem( item );
@@ -489,10 +489,10 @@ void KActionSelector::loadIcons()
d->btnDown->setIconSet( SmallIconSet( d->downIcon, d->iconSize ) );
}
-void KActionSelector::moveItem( QListBoxItem *item )
+void KActionSelector::moveItem( TQListBoxItem *item )
{
- QListBox *lbFrom = item->listBox();
- QListBox *lbTo;
+ TQListBox *lbFrom = item->listBox();
+ TQListBox *lbTo;
if ( lbFrom == d->availableListBox )
lbTo = d->selectedListBox;
else if ( lbFrom == d->selectedListBox )
@@ -516,7 +516,7 @@ void KActionSelector::moveItem( QListBoxItem *item )
emit removed( item );
}
-int KActionSelector::insertionIndex( QListBox *lb, InsertionPolicy policy )
+int KActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy )
{
int index;
switch ( policy )
diff --git a/kdeui/kactionselector.h b/kdeui/kactionselector.h
index b41412266..bba4e31da 100644
--- a/kdeui/kactionselector.h
+++ b/kdeui/kactionselector.h
@@ -19,7 +19,7 @@
#ifndef _KACTION_SELECTOR_H_
#define _KACTION_SELECTOR_H_
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -48,13 +48,13 @@ class KActionSelectorPrivate;
see keyboardEnabled.
Note that this may conflist with keyboard selection in the selected list box,
- if you set that to anything else than QListBox::Single (which is the default).
+ if you set that to anything else than TQListBox::Single (which is the default).
To use it, simply construct an instance and then add items to the two listboxes,
available through lbAvailable() and lbSelected(). Whenever you want, you can retrieve
- the selected options using QListBox methods on lbSelected().
+ the selected options using TQListBox methods on lbSelected().
- This way, you can use your own QListBoxItem class, allowing you to easily
+ This way, you can use your own TQListBoxItem class, allowing you to easily
store object data in those.
When an item is moved to a listbox, it is placed below the current item
@@ -76,31 +76,31 @@ class KActionSelectorPrivate;
@author Anders Lund <anders@alweb.dk>
*/
-class KDEUI_EXPORT KActionSelector : public QWidget {
+class KDEUI_EXPORT KActionSelector : public TQWidget {
Q_OBJECT
Q_ENUMS( ButtonIconSize InsertionPolicy )
Q_PROPERTY( bool moveOnDoubleClick READ moveOnDoubleClick WRITE setMoveOnDoubleClick )
Q_PROPERTY( bool keyboardEnabled READ keyboardEnabled WRITE setKeyboardEnabled )
- Q_PROPERTY( QString availableLabel READ availableLabel WRITE setAvailableLabel )
- Q_PROPERTY( QString selectedLabel READ selectedLabel WRITE setSelectedLabel )
+ Q_PROPERTY( TQString availableLabel READ availableLabel WRITE setAvailableLabel )
+ Q_PROPERTY( TQString selectedLabel READ selectedLabel WRITE setSelectedLabel )
Q_PROPERTY( ButtonIconSize buttonIconSize READ buttonIconSize WRITE setButtonIconSize )
Q_PROPERTY( InsertionPolicy availableInsertionPolicy READ availableInsertionPolicy WRITE setAvailableInsertionPolicy )
Q_PROPERTY( InsertionPolicy selectedInsertionPolicy READ selectedInsertionPolicy WRITE setSelectedInsertionPolicy )
Q_PROPERTY( bool showUpDownButtons READ showUpDownButtons WRITE setShowUpDownButtons )
public:
- KActionSelector( QWidget *parent=0, const char *name=0 );
+ KActionSelector( TQWidget *parent=0, const char *name=0 );
~KActionSelector();
/**
- @return The QListBox holding the available actions
+ @return The TQListBox holding the available actions
*/
- QListBox *availableListBox() const;
+ TQListBox *availableListBox() const;
/**
- @return The QListBox holding the selected actions
+ @return The TQListBox holding the selected actions
*/
- QListBox *selectedListBox() const;
+ TQListBox *selectedListBox() const;
/**
This enum indentifies the moving buttons
@@ -193,7 +193,7 @@ public:
/**
@return The text of the label for the available items listbox.
*/
- QString availableLabel() const;
+ TQString availableLabel() const;
/**
Sets the label for the available items listbox to @p text.
@@ -201,12 +201,12 @@ public:
if you have a single ampersand in the text, the following character
will become the accellerator to focus te listbox.
*/
- void setAvailableLabel( const QString & text );
+ void setAvailableLabel( const TQString & text );
/**
@return the label of the selected items listbox.
*/
- QString selectedLabel() const;
+ TQString selectedLabel() const;
/**
Sets the label for the selected items listbox to @p text.
@@ -214,7 +214,7 @@ public:
if you have a single ampersand in the text, the following character
will become the accellerator to focus te listbox.
*/
- void setSelectedLabel( const QString & text );
+ void setSelectedLabel( const TQString & text );
/**
@return the current ButtonIconSize.
@@ -268,25 +268,25 @@ public:
Sets the pixmap of the button @p button to @p icon.
It calls SmallIconSet(pm) to generate the icon set.
*/
- void setButtonIcon( const QString &icon, MoveButton button );
+ void setButtonIcon( const TQString &icon, MoveButton button );
/**
Sets the iconset for button @p button to @p iconset.
You can use this method to et a costum icon set. Either
- created by QIconSet, or use the application instance of
+ created by TQIconSet, or use the application instance of
KIconLoader (recommended).
*/
- void setButtonIconSet( const QIconSet &iconset, MoveButton button );
+ void setButtonIconSet( const TQIconSet &iconset, MoveButton button );
/**
Sets the tooltip for the button @p button to @p tip.
*/
- void setButtonTooltip( const QString &tip, MoveButton button );
+ void setButtonTooltip( const TQString &tip, MoveButton button );
/**
Sets the whatsthis help for button @p button to @p text.
*/
- void setButtonWhatsThis( const QString &text, MoveButton button );
+ void setButtonWhatsThis( const TQString &text, MoveButton button );
/**
Sets the enabled state of all moving buttons to reflect the current
@@ -301,27 +301,27 @@ signals:
/**
Emitted when an item is moved to the "selected" listbox.
*/
- void added( QListBoxItem *item );
+ void added( TQListBoxItem *item );
/**
Emitted when an item is moved out of the "selected" listbox.
*/
- void removed( QListBoxItem *item );
+ void removed( TQListBoxItem *item );
/**
Emitted when an item is moved upwards in the "selected" listbox.
*/
- void movedUp( QListBoxItem *item );
+ void movedUp( TQListBoxItem *item );
/**
Emitted when an item is moved downwards in the "selected" listbox.
*/
- void movedDown( QListBoxItem *item );
+ void movedDown( TQListBoxItem *item );
/**
Emitted when an item is moved to the "selected" listbox.
*/
-// void addedToSelection( QListBoxItem *item );
+// void addedToSelection( TQListBoxItem *item );
public slots:
/**
@@ -334,12 +334,12 @@ protected:
/**
Reimplamented for internal reasons.
*/
- void keyPressEvent( QKeyEvent * );
+ void keyPressEvent( TQKeyEvent * );
/**
Reimplemented for internal reasons.
*/
- bool eventFilter( QObject *, QEvent * );
+ bool eventFilter( TQObject *, TQEvent * );
private slots:
/**
@@ -365,19 +365,19 @@ private slots:
/**
Moves the item @p item to the other listbox if moveOnDoubleClick is enabled.
*/
- void itemDoubleClicked( QListBoxItem *item );
+ void itemDoubleClicked( TQListBoxItem *item );
/**
connected to both list boxes to set the buttons enabled
*/
- void slotCurrentChanged( QListBoxItem * ) { setButtonsEnabled(); }
+ void slotCurrentChanged( TQListBoxItem * ) { setButtonsEnabled(); }
private:
/**
Move item @p item to the other listbox
*/
- void moveItem( QListBoxItem *item );
+ void moveItem( TQListBoxItem *item );
/**
loads the icons for the move buttons.
@@ -391,7 +391,7 @@ private:
Note that if policy is Sorted, this will return -1.
Sort the listbox after inserting the item in that case.
*/
- int insertionIndex( QListBox *lb, InsertionPolicy policy );
+ int insertionIndex( TQListBox *lb, InsertionPolicy policy );
/** @private
Private data storage
diff --git a/kdeui/kactionshortcutlist.h b/kdeui/kactionshortcutlist.h
index 322f507d0..a7b8d303e 100644
--- a/kdeui/kactionshortcutlist.h
+++ b/kdeui/kactionshortcutlist.h
@@ -16,9 +16,9 @@ class KDEUI_EXPORT KActionShortcutList : public KShortcutList
virtual ~KActionShortcutList();
virtual uint count() const;
- virtual QString name( uint index ) const;
- virtual QString label( uint index ) const;
- virtual QString whatsThis( uint index ) 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 bool isConfigurable( uint index ) const;
@@ -26,8 +26,8 @@ class KDEUI_EXPORT KActionShortcutList : public KShortcutList
virtual const KInstance* instance() const;
- virtual QVariant getOther( Other, uint index ) const;
- virtual bool setOther( Other, uint index, QVariant );
+ virtual TQVariant getOther( Other, uint index ) const;
+ virtual bool setOther( Other, uint index, TQVariant );
virtual bool save() const;
@@ -54,16 +54,16 @@ class KDEUI_EXPORT KActionPtrShortcutList : public KShortcutList
virtual ~KActionPtrShortcutList();
virtual uint count() const;
- virtual QString name( uint index ) const;
- virtual QString label( uint index ) const;
- virtual QString whatsThis( uint index ) 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 bool isConfigurable( uint index ) const;
virtual bool setShortcut( uint index, const KShortcut& shortcut);
- virtual QVariant getOther( Other, uint index ) const;
- virtual bool setOther( Other, uint index, QVariant );
+ virtual TQVariant getOther( Other, uint index ) const;
+ virtual bool setOther( Other, uint index, TQVariant );
virtual bool save() const;
diff --git a/kdeui/kactivelabel.cpp b/kdeui/kactivelabel.cpp
index 5efdea418..c01a91d41 100644
--- a/kdeui/kactivelabel.cpp
+++ b/kdeui/kactivelabel.cpp
@@ -20,19 +20,19 @@
#include "kactivelabel.h"
#include <kapplication.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
-#include <qsimplerichtext.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
+#include <tqsimplerichtext.h>
#include <kdebug.h>
-KActiveLabel::KActiveLabel(QWidget * parent, const char * name)
- : QTextBrowser(parent, name)
+KActiveLabel::KActiveLabel(TQWidget * parent, const char * name)
+ : TQTextBrowser(parent, name)
{
init();
}
-KActiveLabel::KActiveLabel(const QString &text, QWidget * parent, const char * name)
- : QTextBrowser(parent, name)
+KActiveLabel::KActiveLabel(const TQString &text, TQWidget * parent, const char * name)
+ : TQTextBrowser(parent, name)
{
init();
setText(text);
@@ -41,38 +41,38 @@ KActiveLabel::KActiveLabel(const QString &text, QWidget * parent, const char * n
void KActiveLabel::init()
{
setTextFormat(Qt::RichText);
- setVScrollBarMode(QScrollView::AlwaysOff);
- setHScrollBarMode(QScrollView::AlwaysOff);
- setFrameStyle(QFrame::NoFrame);
- setFocusPolicy( QWidget::TabFocus );
+ setVScrollBarMode(TQScrollView::AlwaysOff);
+ setHScrollBarMode(TQScrollView::AlwaysOff);
+ setFrameStyle(TQFrame::NoFrame);
+ setFocusPolicy( TQWidget::TabFocus );
paletteChanged();
- connect(this, SIGNAL(linkClicked(const QString &)),
- this, SLOT(openLink(const QString &)));
+ connect(this, TQT_SIGNAL(linkClicked(const TQString &)),
+ this, TQT_SLOT(openLink(const TQString &)));
if (kapp)
{
- connect(kapp, SIGNAL(kdisplayPaletteChanged()),
- this, SLOT(paletteChanged()));
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()),
+ this, TQT_SLOT(paletteChanged()));
}
}
void KActiveLabel::paletteChanged()
{
- QPalette p = kapp ? kapp->palette() : palette();
- p.setBrush(QColorGroup::Base, p.brush(QPalette::Normal, QColorGroup::Background));
- p.setColor(QColorGroup::Text, p.color(QPalette::Normal, QColorGroup::Foreground));
+ TQPalette p = kapp ? kapp->palette() : palette();
+ p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background));
+ p.setColor(TQColorGroup::Text, p.color(TQPalette::Normal, TQColorGroup::Foreground));
setPalette(p);
}
-void KActiveLabel::openLink(const QString & link)
+void KActiveLabel::openLink(const TQString & link)
{
- QRegExp whatsthis("whatsthis:/*([^/].*)");
+ TQRegExp whatsthis("whatsthis:/*([^/].*)");
if (whatsthis.exactMatch(link)) {
- QWhatsThis::display(whatsthis.cap(1));
+ TQWhatsThis::display(whatsthis.cap(1));
return;
}
- QStringList args;
+ TQStringList args;
args << "exec" << link;
kapp->kdeinitExec("kfmclient", args);
}
@@ -80,21 +80,21 @@ void KActiveLabel::openLink(const QString & link)
void KActiveLabel::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-void KActiveLabel::focusInEvent( QFocusEvent* fe )
+void KActiveLabel::focusInEvent( TQFocusEvent* fe )
{
- QTextBrowser::focusInEvent(fe);
- if(fe->reason() == QFocusEvent::Tab || fe->reason() == QFocusEvent::Backtab)
+ TQTextBrowser::focusInEvent(fe);
+ if(fe->reason() == TQFocusEvent::Tab || fe->reason() == TQFocusEvent::Backtab)
selectAll(true);
}
-void KActiveLabel::focusOutEvent( QFocusEvent* fe )
+void KActiveLabel::focusOutEvent( TQFocusEvent* fe )
{
- QTextBrowser::focusOutEvent(fe);
- if(fe->reason() == QFocusEvent::Tab || fe->reason() == QFocusEvent::Backtab)
+ TQTextBrowser::focusOutEvent(fe);
+ if(fe->reason() == TQFocusEvent::Tab || fe->reason() == TQFocusEvent::Backtab)
selectAll(false);
}
-void KActiveLabel::keyPressEvent( QKeyEvent *e )
+void KActiveLabel::keyPressEvent( TQKeyEvent *e )
{
switch ( e->key() )
{
@@ -104,16 +104,16 @@ void KActiveLabel::keyPressEvent( QKeyEvent *e )
case Key_Right:
// jump over QTextEdit's key navigation breakage.
// we're not interested in keyboard navigation within the text
- QWidget::keyPressEvent( e );
+ TQWidget::keyPressEvent( e );
break;
default:
- QTextBrowser::keyPressEvent( e );
+ TQTextBrowser::keyPressEvent( e );
}
}
-QSize KActiveLabel::minimumSizeHint() const
+TQSize KActiveLabel::minimumSizeHint() const
{
- QSize ms = minimumSize();
+ TQSize ms = minimumSize();
if ((ms.width() > 0) && (ms.height() > 0))
return ms;
@@ -121,8 +121,8 @@ QSize KActiveLabel::minimumSizeHint() const
if (ms.width() > 0)
w = ms.width();
- QString txt = text();
- QSimpleRichText rt(txt, font());
+ TQString txt = text();
+ TQSimpleRichText rt(txt, font());
rt.setWidth(w - 2*frameWidth() - 10);
w = 10 + rt.widthUsed() + 2*frameWidth();
if (w < ms.width())
@@ -131,10 +131,10 @@ QSize KActiveLabel::minimumSizeHint() const
if ( h < ms.height())
h = ms.height();
- return QSize(w, h);
+ return TQSize(w, h);
}
-QSize KActiveLabel::sizeHint() const
+TQSize KActiveLabel::sizeHint() const
{
return minimumSizeHint();
}
diff --git a/kdeui/kactivelabel.h b/kdeui/kactivelabel.h
index ad5dd12b5..8ab2bacf2 100644
--- a/kdeui/kactivelabel.h
+++ b/kdeui/kactivelabel.h
@@ -19,7 +19,7 @@
#ifndef _KACTIVELABEL_H_
#define _KACTIVELABEL_H_
-#include <qtextbrowser.h>
+#include <tqtextbrowser.h>
#include <kdelibs_export.h>
@@ -41,23 +41,23 @@ public:
/**
* Constructor.
*
- * It connects the "linkClicked(const QString &)" signal to the
- * "openLink(const QString &)" slot. You will need to disconnect
+ * It connects the "linkClicked(const TQString &)" signal to the
+ * "openLink(const TQString &)" slot. You will need to disconnect
* this if you want to process linkClicked() yourself.
*/
- KActiveLabel(QWidget * parent, const char * name = 0);
+ KActiveLabel(TQWidget * parent, const char * name = 0);
/**
* Constructor.
*
- * It connects the "linkClicked(const QString &)" signal to the
- * "openLink(const QString &)" slot. You will need to disconnect
+ * It connects the "linkClicked(const TQString &)" signal to the
+ * "openLink(const TQString &)" slot. You will need to disconnect
* this if you want to process linkClicked() yourself.
*/
- KActiveLabel(const QString & text, QWidget * parent, const char * name = 0);
+ KActiveLabel(const TQString & text, TQWidget * parent, const char * name = 0);
- QSize minimumSizeHint() const;
- QSize sizeHint() const;
+ TQSize minimumSizeHint() const;
+ TQSize sizeHint() const;
public slots:
/**
@@ -67,19 +67,19 @@ public slots:
* box will appear and then display the rest of the text. The WhatsThis
* functionality is available since KDE 3.2.
*/
- virtual void openLink(const QString & link);
+ virtual void openLink(const TQString & link);
private slots:
void paletteChanged();
- void setSource( const QString &) { }
+ void setSource( const TQString &) { }
private:
void init();
protected:
virtual void virtual_hook( int id, void* data );
- virtual void focusInEvent( QFocusEvent* fe );
- virtual void focusOutEvent( QFocusEvent* fe );
- virtual void keyPressEvent ( QKeyEvent * e );
+ virtual void focusInEvent( TQFocusEvent* fe );
+ virtual void focusOutEvent( TQFocusEvent* fe );
+ virtual void keyPressEvent ( TQKeyEvent * e );
private:
KActiveLabelPrivate *d;
};
diff --git a/kdeui/kanimwidget.cpp b/kdeui/kanimwidget.cpp
index 8d5ca6b6c..5ff1037d5 100644
--- a/kdeui/kanimwidget.cpp
+++ b/kdeui/kanimwidget.cpp
@@ -18,10 +18,10 @@
Boston, MA 02110-1301, USA.
*/
#include <kanimwidget.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qimage.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqimage.h>
#include <ktoolbar.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -34,21 +34,21 @@ public:
bool transparent : 1;
int frames;
int current_frame;
- QPixmap pixmap;
- QTimer timer;
- QString icon_name;
+ TQPixmap pixmap;
+ TQTimer timer;
+ TQString icon_name;
int size;
};
-KAnimWidget::KAnimWidget( const QString& icons, int size, QWidget *parent,
+KAnimWidget::KAnimWidget( const TQString& icons, int size, TQWidget *parent,
const char *name )
- : QFrame( parent, name ),
+ : TQFrame( parent, name ),
d( new KAnimWidgetPrivate )
{
- connect( &d->timer, SIGNAL(timeout()), this, SLOT(slotTimerUpdate()));
+ connect( &d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimerUpdate()));
if (parent && parent->inherits( "KToolBar" ))
- connect(parent, SIGNAL(modechange()), this, SLOT(updateIcons()));
+ connect(parent, TQT_SIGNAL(modechange()), this, TQT_SLOT(updateIcons()));
d->loadingCompleted = false;
d->size = size;
@@ -86,7 +86,7 @@ void KAnimWidget::setSize( int size )
updateIcons();
}
-void KAnimWidget::setIcons( const QString& icons )
+void KAnimWidget::setIcons( const TQString& icons )
{
if ( d->icon_name == icons )
return;
@@ -95,7 +95,7 @@ void KAnimWidget::setIcons( const QString& icons )
updateIcons();
}
-QString KAnimWidget::icons( ) const
+TQString KAnimWidget::icons( ) const
{
return d->icon_name;
}
@@ -106,47 +106,47 @@ int KAnimWidget::size( ) const
}
-void KAnimWidget::showEvent(QShowEvent* e)
+void KAnimWidget::showEvent(TQShowEvent* e)
{
if (!d->initDone)
{
d->initDone = true;
updateIcons();
}
- QFrame::showEvent(e);
+ TQFrame::showEvent(e);
}
-void KAnimWidget::hideEvent(QHideEvent* e)
+void KAnimWidget::hideEvent(TQHideEvent* e)
{
- QFrame::hideEvent(e);
+ TQFrame::hideEvent(e);
}
-void KAnimWidget::enterEvent( QEvent *e )
+void KAnimWidget::enterEvent( TQEvent *e )
{
setFrameStyle( Panel | Raised );
- QFrame::enterEvent( e );
+ TQFrame::enterEvent( e );
}
-void KAnimWidget::leaveEvent( QEvent *e )
+void KAnimWidget::leaveEvent( TQEvent *e )
{
setFrameStyle( StyledPanel | Sunken );
- QFrame::leaveEvent( e );
+ TQFrame::leaveEvent( e );
}
-void KAnimWidget::mousePressEvent( QMouseEvent *e )
+void KAnimWidget::mousePressEvent( TQMouseEvent *e )
{
- QFrame::mousePressEvent( e );
+ TQFrame::mousePressEvent( e );
}
-void KAnimWidget::mouseReleaseEvent( QMouseEvent *e )
+void KAnimWidget::mouseReleaseEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton &&
rect().contains( e->pos() ) )
emit clicked();
- QFrame::mouseReleaseEvent( e );
+ TQFrame::mouseReleaseEvent( e );
}
void KAnimWidget::slotTimerUpdate()
@@ -165,7 +165,7 @@ void KAnimWidget::slotTimerUpdate()
repaint(d->transparent);
}
-void KAnimWidget::drawContents( QPainter *p )
+void KAnimWidget::drawContents( TQPainter *p )
{
if ( d->pixmap.isNull() )
return;
@@ -174,7 +174,7 @@ void KAnimWidget::drawContents( QPainter *p )
int h = w;
int x = (width() - w) / 2;
int y = (height() - h) / 2;
- p->drawPixmap(QPoint(x, y), d->pixmap, QRect(0, d->current_frame*h, w, h));
+ p->drawPixmap(TQPoint(x, y), d->pixmap, TQRect(0, d->current_frame*h, w, h));
}
void KAnimWidget::updateIcons()
@@ -187,8 +187,8 @@ void KAnimWidget::updateIcons()
if (!d->size)
d->size = KGlobal::iconLoader()->currentSize(KIcon::MainToolbar);
- QString path = KGlobal::iconLoader()->iconPath(d->icon_name, -d->size);
- QImage img(path);
+ TQString path = KGlobal::iconLoader()->iconPath(d->icon_name, -d->size);
+ TQImage img(path);
if (img.isNull())
return;
diff --git a/kdeui/kanimwidget.h b/kdeui/kanimwidget.h
index 3c0d5f3e5..6261a5cb3 100644
--- a/kdeui/kanimwidget.h
+++ b/kdeui/kanimwidget.h
@@ -18,7 +18,7 @@
#ifndef _KANIMWIDGET_H
#define _KANIMWIDGET_H
-#include <qframe.h>
+#include <tqframe.h>
#include <kdelibs_export.h>
@@ -56,7 +56,7 @@ class KDEUI_EXPORT KAnimWidget : public QFrame
{
Q_OBJECT
Q_PROPERTY( int size READ size WRITE setSize )
- Q_PROPERTY( QString icons READ icons WRITE setIcons )
+ Q_PROPERTY( TQString icons READ icons WRITE setIcons )
public:
/**
@@ -73,8 +73,8 @@ public:
* @param parent The standard parent
* @param name The standard internal name
*/
- KAnimWidget( const QString& icons, int size = 0,
- QWidget *parent = 0L, const char *name = 0L );
+ KAnimWidget( const TQString& icons, int size = 0,
+ TQWidget *parent = 0L, const char *name = 0L );
/**
* Destructor
@@ -98,7 +98,7 @@ public:
* Returns the current icons
* since 3.4
*/
- QString icons() const;
+ TQString icons() const;
/**
* Sets the name of the animated icons to load. This will use the
@@ -106,7 +106,7 @@ public:
*
* @param icons The name of the icons to use for the animation
*/
- void setIcons( const QString& icons );
+ void setIcons( const TQString& icons );
public slots:
/**
@@ -123,13 +123,13 @@ signals:
void clicked();
protected:
- virtual void drawContents( QPainter *p );
- virtual void leaveEvent( QEvent *e );
- virtual void enterEvent( QEvent *e );
- virtual void hideEvent( QHideEvent *e);
- virtual void showEvent( QShowEvent *e);
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseReleaseEvent( QMouseEvent *e );
+ virtual void drawContents( TQPainter *p );
+ virtual void leaveEvent( TQEvent *e );
+ virtual void enterEvent( TQEvent *e );
+ virtual void hideEvent( TQHideEvent *e);
+ virtual void showEvent( TQShowEvent *e);
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
protected slots:
void slotTimerUpdate();
diff --git a/kdeui/karrowbutton.cpp b/kdeui/karrowbutton.cpp
index c9c423697..fd9624b67 100644
--- a/kdeui/karrowbutton.cpp
+++ b/kdeui/karrowbutton.cpp
@@ -18,8 +18,8 @@
#include "karrowbutton.h"
-#include <qstyle.h>
-#include <qpainter.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
class KArrowButtonPrivate
{
@@ -27,9 +27,9 @@ class KArrowButtonPrivate
Qt::ArrowType arrow;
};
-KArrowButton::KArrowButton(QWidget *parent, Qt::ArrowType arrow,
+KArrowButton::KArrowButton(TQWidget *parent, Qt::ArrowType arrow,
const char *name)
- : QPushButton(parent, name)
+ : TQPushButton(parent, name)
{
d = new KArrowButtonPrivate();
d->arrow = arrow;
@@ -40,9 +40,9 @@ KArrowButton::~KArrowButton()
delete d;
}
-QSize KArrowButton::sizeHint() const
+TQSize KArrowButton::sizeHint() const
{
- return QSize( 12, 12 );
+ return TQSize( 12, 12 );
}
void KArrowButton::setArrowType(Qt::ArrowType a)
@@ -57,16 +57,16 @@ Qt::ArrowType KArrowButton::arrowType() const
return d->arrow;
}
-void KArrowButton::drawButton(QPainter *p)
+void KArrowButton::drawButton(TQPainter *p)
{
const unsigned int arrowSize = 8;
const unsigned int margin = 2;
- p->fillRect( rect(), colorGroup().brush( QColorGroup::Background ) );
- style().drawPrimitive( QStyle::PE_Panel, p, QRect( 0, 0, width(), height() ),
+ p->fillRect( rect(), colorGroup().brush( TQColorGroup::Background ) );
+ style().drawPrimitive( TQStyle::PE_Panel, p, TQRect( 0, 0, width(), height() ),
colorGroup(),
- isDown() ? QStyle::Style_Sunken : QStyle::Style_Default,
- QStyleOption( 2, 0 ) );
+ isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Default,
+ TQStyleOption( 2, 0 ) );
if (static_cast<unsigned int>(width()) < arrowSize + margin ||
static_cast<unsigned int>(height()) < arrowSize + margin)
@@ -92,18 +92,18 @@ void KArrowButton::drawButton(QPainter *p)
y++;
}
- QStyle::PrimitiveElement e = QStyle::PE_ArrowLeft;
+ TQStyle::PrimitiveElement e = TQStyle::PE_ArrowLeft;
switch (d->arrow)
{
- case Qt::LeftArrow: e = QStyle::PE_ArrowLeft; break;
- case Qt::RightArrow: e = QStyle::PE_ArrowRight; break;
- case Qt::UpArrow: e = QStyle::PE_ArrowUp; break;
- case Qt::DownArrow: e = QStyle::PE_ArrowDown; break;
+ case Qt::LeftArrow: e = TQStyle::PE_ArrowLeft; break;
+ case Qt::RightArrow: e = TQStyle::PE_ArrowRight; break;
+ case Qt::UpArrow: e = TQStyle::PE_ArrowUp; break;
+ case Qt::DownArrow: e = TQStyle::PE_ArrowDown; break;
}
- int flags = QStyle::Style_Enabled;
+ int flags = TQStyle::Style_Enabled;
if ( isDown() )
- flags |= QStyle::Style_Down;
- style().drawPrimitive( e, p, QRect( QPoint( x, y ), QSize( arrowSize, arrowSize ) ),
+ flags |= TQStyle::Style_Down;
+ style().drawPrimitive( e, p, TQRect( TQPoint( x, y ), TQSize( arrowSize, arrowSize ) ),
colorGroup(), flags );
}
diff --git a/kdeui/karrowbutton.h b/kdeui/karrowbutton.h
index 8f5410908..e20278692 100644
--- a/kdeui/karrowbutton.h
+++ b/kdeui/karrowbutton.h
@@ -19,7 +19,7 @@
#ifndef __karrowbutton_h__
#define __karrowbutton_h__
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kdelibs_export.h>
@@ -48,7 +48,7 @@ class KDEUI_EXPORT KArrowButton : public QPushButton
* @param arrow The direction the arrrow should be pointing in
* @param name An internal name for this widget
*/
- KArrowButton(QWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow,
+ KArrowButton(TQWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow,
const char *name = 0);
/**
@@ -57,9 +57,9 @@ class KDEUI_EXPORT KArrowButton : public QPushButton
virtual ~KArrowButton();
/**
- * Reimplemented from QPushButton.
+ * Reimplemented from TQPushButton.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* Returns the arrow type
@@ -81,9 +81,9 @@ class KDEUI_EXPORT KArrowButton : public QPushButton
protected:
/**
- * Reimplemented from QPushButton.
+ * Reimplemented from TQPushButton.
*/
- virtual void drawButton(QPainter *);
+ virtual void drawButton(TQPainter *);
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kauthicon.cpp b/kdeui/kauthicon.cpp
index 9dd567b18..d4c18a114 100644
--- a/kdeui/kauthicon.cpp
+++ b/kdeui/kauthicon.cpp
@@ -21,9 +21,9 @@
#include <unistd.h> // For getuid
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
#include <klocale.h>
@@ -91,21 +91,21 @@ static const char * const openlock_xpm[] = {
" ",
" "};
-KAuthIcon::KAuthIcon(QWidget *parent, const char *name)
- : QWidget(parent, name),
+KAuthIcon::KAuthIcon(TQWidget *parent, const char *name)
+ : TQWidget(parent, name),
lockPM( const_cast< const char** >( lock_xpm)),
openLockPM( const_cast< const char** >(openlock_xpm))
{
lockText = i18n("Editing disabled");
openLockText = i18n("Editing enabled");
- lockBox = new QLabel(this);
- lockBox->setFrameStyle(QFrame::WinPanel|QFrame::Raised);
+ lockBox = new TQLabel(this);
+ lockBox->setFrameStyle(TQFrame::WinPanel|TQFrame::Raised);
lockBox->setPixmap(lockPM);
lockBox->setFixedSize(lockBox->sizeHint());
- lockLabel = new QLabel(this);
- lockLabel->setFrameStyle(QFrame::NoFrame);
+ lockLabel = new TQLabel(this);
+ lockLabel->setFrameStyle(TQFrame::NoFrame);
// set fixed size of this frame to whichever phrase is longer
if (lockLabel->fontMetrics().boundingRect(lockText).width() >
@@ -117,7 +117,7 @@ KAuthIcon::KAuthIcon(QWidget *parent, const char *name)
lockLabel->setMinimumSize(lockLabel->sizeHint());
lockLabel->setText(lockText);
- layout = new QHBoxLayout(this);
+ layout = new TQHBoxLayout(this);
layout->addWidget(lockBox, 0, AlignLeft|AlignVCenter);
layout->addSpacing(5);
@@ -132,7 +132,7 @@ KAuthIcon::~KAuthIcon()
}
-QSize KAuthIcon::sizeHint() const
+TQSize KAuthIcon::sizeHint() const
{
return layout->minimumSize();
}
@@ -140,7 +140,7 @@ QSize KAuthIcon::sizeHint() const
/************************************************************************/
-KRootPermsIcon::KRootPermsIcon(QWidget *parent, const char *name)
+KRootPermsIcon::KRootPermsIcon(TQWidget *parent, const char *name)
: KAuthIcon(parent, name)
{
updateStatus();
@@ -165,8 +165,8 @@ void KRootPermsIcon::updateStatus()
/************************************************************************/
-KWritePermsIcon::KWritePermsIcon(const QString & fileName,
- QWidget *parent, const char *name)
+KWritePermsIcon::KWritePermsIcon(const TQString & fileName,
+ TQWidget *parent, const char *name)
: KAuthIcon(parent, name)
{
fi.setFile(fileName);
diff --git a/kdeui/kauthicon.h b/kdeui/kauthicon.h
index ddbbfe9d5..e0e381077 100644
--- a/kdeui/kauthicon.h
+++ b/kdeui/kauthicon.h
@@ -18,10 +18,10 @@
#ifndef _KAUTHICON_H
#define _KAUTHICON_H "$Id$"
-#include <qfileinfo.h>
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqfileinfo.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -52,10 +52,10 @@ public:
/**
* Constructor.
*/
- KAuthIcon(QWidget *parent = 0, const char *name = 0);
+ KAuthIcon(TQWidget *parent = 0, const char *name = 0);
~KAuthIcon();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* return the status of whatever is being monitored.
*/
@@ -78,14 +78,14 @@ signals:
void authChanged(bool authorized);
protected:
- QHBoxLayout *layout;
+ TQHBoxLayout *layout;
- QLabel *lockBox;
- QLabel *lockLabel;
- QPixmap lockPM;
- QPixmap openLockPM;
- QString lockText;
- QString openLockText;
+ TQLabel *lockBox;
+ TQLabel *lockLabel;
+ TQPixmap lockPM;
+ TQPixmap openLockPM;
+ TQString lockText;
+ TQString openLockText;
protected:
virtual void virtual_hook( int id, void* data );
@@ -105,7 +105,7 @@ class KDEUI_EXPORT KRootPermsIcon : public KAuthIcon
Q_OBJECT
public:
- KRootPermsIcon(QWidget *parent = 0, const char *name = 0);
+ KRootPermsIcon(TQWidget *parent = 0, const char *name = 0);
~KRootPermsIcon();
/**
@@ -135,10 +135,10 @@ class KWritePermsIconPrivate;
class KDEUI_EXPORT KWritePermsIcon : public KAuthIcon
{
Q_OBJECT
- Q_PROPERTY( QString fileName READ fileName WRITE setFileName )
+ Q_PROPERTY( TQString fileName READ fileName WRITE setFileName )
public:
- KWritePermsIcon(const QString & fileName, QWidget *parent = 0, const char *name = 0);
+ KWritePermsIcon(const TQString & fileName, TQWidget *parent = 0, const char *name = 0);
~KWritePermsIcon();
/**
* @return whether or not the monitored file is writable.
@@ -149,20 +149,20 @@ public:
* make the icon watch a new filename.
* @param fileName the new file to monitor / display status for.
*/
- void setFileName(const QString & fileName) { fi.setFile(fileName); updateStatus(); }
+ void setFileName(const TQString & fileName) { fi.setFile(fileName); updateStatus(); }
/**
* return the filename of the currently watched file.
* @since 3.4
*/
- QString fileName() const { return fi.fileName(); }
+ TQString fileName() const { return fi.fileName(); }
public slots:
void updateStatus();
protected:
bool writable;
- QFileInfo fi;
+ TQFileInfo fi;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kbugreport.cpp b/kdeui/kbugreport.cpp
index ad261eebd..3d7898861 100644
--- a/kdeui/kbugreport.cpp
+++ b/kdeui/kbugreport.cpp
@@ -17,14 +17,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qhbuttongroup.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmultilineedit.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
-#include <qregexp.h>
+#include <tqhbuttongroup.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmultilineedit.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
+#include <tqregexp.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -51,21 +51,21 @@
#include <kcombobox.h>
#include <config.h>
#include <ktempfile.h>
-#include <qtextstream.h>
-#include <qfile.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
class KBugReportPrivate {
public:
KComboBox *appcombo;
- QString lastError;
- QString kde_version;
- QString appname;
- QString os;
- QPushButton *submitBugButton;
+ TQString lastError;
+ TQString kde_version;
+ TQString appname;
+ TQString os;
+ TQPushButton *submitBugButton;
KURL url;
};
-KBugReport::KBugReport( QWidget * parentw, bool modal, const KAboutData *aboutData )
+KBugReport::KBugReport( TQWidget * parentw, bool modal, const KAboutData *aboutData )
: KDialogBase( Plain,
i18n("Submit Bug Report"),
Ok | Cancel,
@@ -85,21 +85,21 @@ KBugReport::KBugReport( QWidget * parentw, bool modal, const KAboutData *aboutDa
: ( KGlobal::_activeInstance ? KGlobal::_activeInstance->aboutData()
: KGlobal::instance()->aboutData() );
m_process = 0;
- QWidget * parent = plainPage();
+ TQWidget * parent = plainPage();
d->submitBugButton = 0;
- //if ( m_aboutData->bugAddress() == QString::fromLatin1("submit@bugs.pearsoncomputing.net") )
+ //if ( m_aboutData->bugAddress() == TQString::fromLatin1("submit@bugs.pearsoncomputing.net") )
//{
// // This is a core KDE application -> redirect to the web form
// Always redirect to the Web form for Trinity
- d->submitBugButton = new QPushButton( parent );
+ d->submitBugButton = new TQPushButton( parent );
setButtonCancel( KStdGuiItem::close() );
//}
- QLabel * tmpLabel;
- QVBoxLayout * lay = new QVBoxLayout( parent, 0, spacingHint() );
+ TQLabel * tmpLabel;
+ TQVBoxLayout * lay = new TQVBoxLayout( parent, 0, spacingHint() );
- QGridLayout *glay = new QGridLayout( lay, 4, 3 );
+ TQGridLayout *glay = new TQGridLayout( lay, 4, 3 );
glay->setColStretch( 1, 10 );
glay->setColStretch( 2, 10 );
@@ -108,30 +108,30 @@ KBugReport::KBugReport( QWidget * parentw, bool modal, const KAboutData *aboutDa
if ( !d->submitBugButton )
{
// From
- QString qwtstr = i18n( "Your email address. If incorrect, use the Configure Email button to change it" );
- tmpLabel = new QLabel( i18n("From:"), parent );
+ TQString qwtstr = i18n( "Your email address. If incorrect, use the Configure Email button to change it" );
+ tmpLabel = new TQLabel( i18n("From:"), parent );
glay->addWidget( tmpLabel, row,0 );
- QWhatsThis::add( tmpLabel, qwtstr );
- m_from = new QLabel( parent );
+ TQWhatsThis::add( tmpLabel, qwtstr );
+ m_from = new TQLabel( parent );
glay->addWidget( m_from, row, 1 );
- QWhatsThis::add( m_from, qwtstr );
+ TQWhatsThis::add( m_from, qwtstr );
// Configure email button
- m_configureEmail = new QPushButton( i18n("Configure Email..."),
+ m_configureEmail = new TQPushButton( i18n("Configure Email..."),
parent );
- connect( m_configureEmail, SIGNAL( clicked() ), this,
- SLOT( slotConfigureEmail() ) );
+ connect( m_configureEmail, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotConfigureEmail() ) );
glay->addMultiCellWidget( m_configureEmail, 0, 2, 2, 2, AlignTop|AlignRight );
// To
qwtstr = i18n( "The email address this bug report is sent to." );
- tmpLabel = new QLabel( i18n("To:"), parent );
+ tmpLabel = new TQLabel( i18n("To:"), parent );
glay->addWidget( tmpLabel, ++row,0 );
- QWhatsThis::add( tmpLabel, qwtstr );
- tmpLabel = new QLabel( m_aboutData->bugAddress(), parent );
+ TQWhatsThis::add( tmpLabel, qwtstr );
+ tmpLabel = new TQLabel( m_aboutData->bugAddress(), parent );
glay->addWidget( tmpLabel, row, 1 );
- QWhatsThis::add( tmpLabel, qwtstr );
+ TQWhatsThis::add( tmpLabel, qwtstr );
setButtonOK( KGuiItem( i18n("&Send"), "mail_send", i18n( "Send bug report." ),
i18n( "Send this bug report to %1." ).arg( m_aboutData->bugAddress() ) ) );
@@ -145,15 +145,15 @@ KBugReport::KBugReport( QWidget * parentw, bool modal, const KAboutData *aboutDa
}
// Program name
- QString qwtstr = i18n( "The application for which you wish to submit a bug report - if incorrect, please use the Report Bug menu item of the correct application" );
- tmpLabel = new QLabel( i18n("Application: "), parent );
+ TQString qwtstr = i18n( "The application for which you wish to submit a bug report - if incorrect, please use the Report Bug menu item of the correct application" );
+ tmpLabel = new TQLabel( i18n("Application: "), parent );
glay->addWidget( tmpLabel, ++row, 0 );
- QWhatsThis::add( tmpLabel, qwtstr );
+ TQWhatsThis::add( tmpLabel, qwtstr );
d->appcombo = new KComboBox( false, parent, "app");
- QWhatsThis::add( d->appcombo, qwtstr );
+ TQWhatsThis::add( d->appcombo, qwtstr );
d->appcombo->insertStrList((const char**)packages);
- connect(d->appcombo, SIGNAL(activated(int)), SLOT(appChanged(int)));
- d->appname = QString::fromLatin1( m_aboutData
+ connect(d->appcombo, TQT_SIGNAL(activated(int)), TQT_SLOT(appChanged(int)));
+ d->appname = TQString::fromLatin1( m_aboutData
? m_aboutData->productName()
: qApp->name() );
glay->addWidget( d->appcombo, row, 1 );
@@ -168,81 +168,81 @@ KBugReport::KBugReport( QWidget * parentw, bool modal, const KAboutData *aboutDa
}
d->appcombo->setCurrentItem(index);
- QWhatsThis::add( tmpLabel, qwtstr );
+ TQWhatsThis::add( tmpLabel, qwtstr );
// Version
qwtstr = i18n( "The version of this application - please make sure that no newer version is available before sending a bug report" );
- tmpLabel = new QLabel( i18n("Version:"), parent );
+ tmpLabel = new TQLabel( i18n("Version:"), parent );
glay->addWidget( tmpLabel, ++row, 0 );
- QWhatsThis::add( tmpLabel, qwtstr );
+ TQWhatsThis::add( tmpLabel, qwtstr );
if (m_aboutData)
m_strVersion = m_aboutData->version();
else
m_strVersion = i18n("no version set (programmer error!)");
- d->kde_version = QString::fromLatin1( KDE_VERSION_STRING );
- d->kde_version += ", " + QString::fromLatin1( KDE_DISTRIBUTION_TEXT );
+ d->kde_version = TQString::fromLatin1( KDE_VERSION_STRING );
+ d->kde_version += ", " + TQString::fromLatin1( KDE_DISTRIBUTION_TEXT );
if ( !d->submitBugButton )
m_strVersion += " " + d->kde_version;
- m_version = new QLabel( m_strVersion, parent );
+ m_version = new TQLabel( m_strVersion, parent );
//glay->addWidget( m_version, row, 1 );
glay->addMultiCellWidget( m_version, row, row, 1, 2 );
- QWhatsThis::add( m_version, qwtstr );
+ TQWhatsThis::add( m_version, qwtstr );
- tmpLabel = new QLabel(i18n("OS:"), parent);
+ tmpLabel = new TQLabel(i18n("OS:"), parent);
glay->addWidget( tmpLabel, ++row, 0 );
struct utsname unameBuf;
uname( &unameBuf );
- d->os = QString::fromLatin1( unameBuf.sysname ) +
- " (" + QString::fromLatin1( unameBuf.machine ) + ") "
- "release " + QString::fromLatin1( unameBuf.release );
+ d->os = TQString::fromLatin1( unameBuf.sysname ) +
+ " (" + TQString::fromLatin1( unameBuf.machine ) + ") "
+ "release " + TQString::fromLatin1( unameBuf.release );
- tmpLabel = new QLabel(d->os, parent);
+ tmpLabel = new TQLabel(d->os, parent);
glay->addMultiCellWidget( tmpLabel, row, row, 1, 2 );
- tmpLabel = new QLabel(i18n("Compiler:"), parent);
+ tmpLabel = new TQLabel(i18n("Compiler:"), parent);
glay->addWidget( tmpLabel, ++row, 0 );
- tmpLabel = new QLabel(QString::fromLatin1(KDE_COMPILER_VERSION), parent);
+ tmpLabel = new TQLabel(TQString::fromLatin1(KDE_COMPILER_VERSION), parent);
glay->addMultiCellWidget( tmpLabel, row, row, 1, 2 );
if ( !d->submitBugButton )
{
// Severity
- m_bgSeverity = new QHButtonGroup( i18n("Se&verity"), parent );
+ m_bgSeverity = new TQHButtonGroup( i18n("Se&verity"), parent );
static const char * const sevNames[5] = { "critical", "grave", "normal", "wishlist", "i18n" };
- const QString sevTexts[5] = { i18n("Critical"), i18n("Grave"), i18n("normal severity","Normal"), i18n("Wishlist"), i18n("Translation") };
+ const TQString sevTexts[5] = { i18n("Critical"), i18n("Grave"), i18n("normal severity","Normal"), i18n("Wishlist"), i18n("Translation") };
for (int i = 0 ; i < 5 ; i++ )
{
// Store the severity string as the name
- QRadioButton *rb = new QRadioButton( sevTexts[i], m_bgSeverity, sevNames[i] );
+ TQRadioButton *rb = new TQRadioButton( sevTexts[i], m_bgSeverity, sevNames[i] );
if (i==2) rb->setChecked(true); // default : "normal"
}
lay->addWidget( m_bgSeverity );
// Subject
- QHBoxLayout * hlay = new QHBoxLayout( lay );
- tmpLabel = new QLabel( i18n("S&ubject: "), parent );
+ TQHBoxLayout * hlay = new TQHBoxLayout( lay );
+ tmpLabel = new TQLabel( i18n("S&ubject: "), parent );
hlay->addWidget( tmpLabel );
m_subject = new KLineEdit( parent );
m_subject->setFocus();
tmpLabel->setBuddy(m_subject);
hlay->addWidget( m_subject );
- QString text = i18n("Enter the text (in English if possible) that you wish to submit for the "
+ TQString text = i18n("Enter the text (in English if possible) that you wish to submit for the "
"bug report.\n"
"If you press \"Send\", a mail message will be sent to the maintainer of "
"this program.\n");
- QLabel * label = new QLabel( parent, "label" );
+ TQLabel * label = new TQLabel( parent, "label" );
label->setText( text );
lay->addWidget( label );
// The multiline-edit
- m_lineedit = new QMultiLineEdit( parent, "QMultiLineEdit" );
+ m_lineedit = new TQMultiLineEdit( parent, "TQMultiLineEdit" );
m_lineedit->setMinimumHeight( 180 ); // make it big
- m_lineedit->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_lineedit->setWordWrap(TQMultiLineEdit::WidgetWidth);
lay->addWidget( m_lineedit, 10 /*stretch*/ );
slotSetFrom();
@@ -250,21 +250,21 @@ KBugReport::KBugReport( QWidget * parentw, bool modal, const KAboutData *aboutDa
// Point to the web form
lay->addSpacing(10);
- QString text = i18n("To submit a bug report, click on the button below.\n"
+ TQString text = i18n("To submit a bug report, click on the button below.\n"
"This will open a web browser window on http://bugs.pearsoncomputing.net where you will find a form to fill in.\n"
"The information displayed above will be transferred to that server.");
- QLabel * label = new QLabel( text, parent, "label");
+ TQLabel * label = new TQLabel( text, parent, "label");
lay->addWidget( label );
lay->addSpacing(10);
updateURL();
d->submitBugButton->setText( i18n("&Launch Bug Report Wizard") );
- d->submitBugButton->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
+ d->submitBugButton->setSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Fixed);
lay->addWidget( d->submitBugButton );
lay->addSpacing(10);
- connect( d->submitBugButton, SIGNAL(clicked()),
- this, SLOT(slotOk()));
+ connect( d->submitBugButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotOk()));
}
}
@@ -288,7 +288,7 @@ void KBugReport::updateURL()
void KBugReport::appChanged(int i)
{
- QString appName = d->appcombo->text(i);
+ TQString appName = d->appcombo->text(i);
int index = appName.find( '/' );
if ( index > 0 )
appName = appName.left( index );
@@ -311,8 +311,8 @@ void KBugReport::slotConfigureEmail()
{
if (m_process) return;
m_process = new KProcess;
- *m_process << QString::fromLatin1("kcmshell") << QString::fromLatin1("kcm_useraccount");
- connect(m_process, SIGNAL(processExited(KProcess *)), SLOT(slotSetFrom()));
+ *m_process << TQString::fromLatin1("kcmshell") << TQString::fromLatin1("kcm_useraccount");
+ connect(m_process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(slotSetFrom()));
if (!m_process->start())
{
kdDebug() << "Couldn't start kcmshell.." << endl;
@@ -330,29 +330,29 @@ void KBugReport::slotSetFrom()
m_configureEmail->setEnabled(true);
// ### KDE4: why oh why is KEmailSettings in kio?
- KConfig emailConf( QString::fromLatin1("emaildefaults") );
+ KConfig emailConf( TQString::fromLatin1("emaildefaults") );
// find out the default profile
- emailConf.setGroup( QString::fromLatin1("Defaults") );
- QString profile = QString::fromLatin1("PROFILE_");
- profile += emailConf.readEntry( QString::fromLatin1("Profile"),
- QString::fromLatin1("Default") );
+ emailConf.setGroup( TQString::fromLatin1("Defaults") );
+ TQString profile = TQString::fromLatin1("PROFILE_");
+ profile += emailConf.readEntry( TQString::fromLatin1("Profile"),
+ TQString::fromLatin1("Default") );
emailConf.setGroup( profile );
- QString fromaddr = emailConf.readEntry( QString::fromLatin1("EmailAddress") );
+ TQString fromaddr = emailConf.readEntry( TQString::fromLatin1("EmailAddress") );
if (fromaddr.isEmpty()) {
struct passwd *p;
p = getpwuid(getuid());
- fromaddr = QString::fromLatin1(p->pw_name);
+ fromaddr = TQString::fromLatin1(p->pw_name);
} else {
- QString name = emailConf.readEntry( QString::fromLatin1("FullName"));
+ TQString name = emailConf.readEntry( TQString::fromLatin1("FullName"));
if (!name.isEmpty())
- fromaddr = name + QString::fromLatin1(" <") + fromaddr + QString::fromLatin1(">");
+ fromaddr = name + TQString::fromLatin1(" <") + fromaddr + TQString::fromLatin1(">");
}
m_from->setText( fromaddr );
}
-void KBugReport::slotUrlClicked(const QString &urlText)
+void KBugReport::slotUrlClicked(const TQString &urlText)
{
if ( kapp )
kapp->invokeBrowser( urlText );
@@ -375,7 +375,7 @@ void KBugReport::slotOk( void )
if( m_lineedit->text().isEmpty() ||
m_subject->text().isEmpty() )
{
- QString msg = i18n("You must specify both a subject and a description "
+ TQString msg = i18n("You must specify both a subject and a description "
"before the report can be sent.");
KMessageBox::error(this,msg);
return;
@@ -391,7 +391,7 @@ void KBugReport::slotOk( void )
"<li>cause serious data loss</li>"
"<li>introduce a security hole on the system where the affected package is installed</li></ul>\n"
"<p>Does the bug you are reporting cause any of the above damage? "
- "If it does not, please select a lower severity. Thank you!</p>" ),QString::null,KStdGuiItem::cont(),KStdGuiItem::cancel() ) == KMessageBox::No )
+ "If it does not, please select a lower severity. Thank you!</p>" ),TQString::null,KStdGuiItem::cont(),KStdGuiItem::cancel() ) == KMessageBox::No )
return;
break;
case 1: // grave
@@ -402,13 +402,13 @@ void KBugReport::slotOk( void )
"<li>cause data loss</li>"
"<li>introduce a security hole allowing access to the accounts of users who use the affected package</li></ul>\n"
"<p>Does the bug you are reporting cause any of the above damage? "
- "If it does not, please select a lower severity. Thank you!</p>" ),QString::null,KStdGuiItem::cont(),KStdGuiItem::cancel() ) == KMessageBox::No )
+ "If it does not, please select a lower severity. Thank you!</p>" ),TQString::null,KStdGuiItem::cont(),KStdGuiItem::cancel() ) == KMessageBox::No )
return;
break;
}
if( !sendBugReport() )
{
- QString msg = i18n("Unable to send the bug report.\n"
+ TQString msg = i18n("Unable to send the bug report.\n"
"Please submit a bug report manually...\n"
"See http://bugs.pearsoncomputing.net/ for instructions.");
KMessageBox::error(this, msg + "\n\n" + d->lastError);
@@ -434,61 +434,61 @@ void KBugReport::slotCancel()
}
-QString KBugReport::text() const
+TQString KBugReport::text() const
{
kdDebug() << m_bgSeverity->selected()->name() << endl;
// Prepend the pseudo-headers to the contents of the mail
- QString severity = QString::fromLatin1(m_bgSeverity->selected()->name());
- QString appname = d->appcombo->currentText();
- QString os = QString::fromLatin1("OS: %1 (%2)\n").
+ TQString severity = TQString::fromLatin1(m_bgSeverity->selected()->name());
+ TQString appname = d->appcombo->currentText();
+ TQString os = TQString::fromLatin1("OS: %1 (%2)\n").
arg(KDE_COMPILING_OS).
arg(KDE_DISTRIBUTION_TEXT);
- QString bodyText;
+ TQString bodyText;
for(int i = 0; i < m_lineedit->numLines(); i++)
{
- QString line = m_lineedit->textLine(i);
+ TQString line = m_lineedit->textLine(i);
if (!line.endsWith("\n"))
line += '\n';
bodyText += line;
}
- if (severity == QString::fromLatin1("i18n") && KGlobal::locale()->language() != KLocale::defaultLanguage()) {
+ if (severity == TQString::fromLatin1("i18n") && KGlobal::locale()->language() != KLocale::defaultLanguage()) {
// Case 1 : i18n bug
- QString package = QString::fromLatin1("i18n_%1").arg(KGlobal::locale()->language());
- package = package.replace(QString::fromLatin1("_"), QString::fromLatin1("-"));
- return QString::fromLatin1("Package: %1").arg(package) +
- QString::fromLatin1("\n"
+ TQString package = TQString::fromLatin1("i18n_%1").arg(KGlobal::locale()->language());
+ package = package.replace(TQString::fromLatin1("_"), TQString::fromLatin1("-"));
+ return TQString::fromLatin1("Package: %1").arg(package) +
+ TQString::fromLatin1("\n"
"Application: %1\n"
// not really i18n's version, so better here IMHO
"Version: %2\n").arg(appname).arg(m_strVersion)+
- os+QString::fromLatin1("\n")+bodyText;
+ os+TQString::fromLatin1("\n")+bodyText;
} else {
- appname = appname.replace(QString::fromLatin1("_"), QString::fromLatin1("-"));
+ appname = appname.replace(TQString::fromLatin1("_"), TQString::fromLatin1("-"));
// Case 2 : normal bug
- return QString::fromLatin1("Package: %1\n"
+ return TQString::fromLatin1("Package: %1\n"
"Version: %2\n"
"Severity: %3\n")
.arg(appname).arg(m_strVersion).arg(severity)+
- QString::fromLatin1("Compiler: %1\n").arg(KDE_COMPILER_VERSION)+
- os+QString::fromLatin1("\n")+bodyText;
+ TQString::fromLatin1("Compiler: %1\n").arg(KDE_COMPILER_VERSION)+
+ os+TQString::fromLatin1("\n")+bodyText;
}
}
bool KBugReport::sendBugReport()
{
- QString recipient ( m_aboutData ?
+ TQString recipient ( m_aboutData ?
m_aboutData->bugAddress() :
- QString::fromLatin1("submit@bugs.pearsoncomputing.net") );
+ TQString::fromLatin1("submit@bugs.pearsoncomputing.net") );
- QString command;
+ TQString command;
command = locate("exe", "ksendbugmail");
if (command.isEmpty())
- command = KStandardDirs::findExe( QString::fromLatin1("ksendbugmail") );
+ command = KStandardDirs::findExe( TQString::fromLatin1("ksendbugmail") );
KTempFile outputfile;
outputfile.close();
- QString subject = m_subject->text();
+ TQString subject = m_subject->text();
command += " --subject ";
command += KProcess::quote(subject);
command += " --recipient ";
@@ -499,14 +499,14 @@ bool KBugReport::sendBugReport()
fflush(stdin);
fflush(stderr);
- FILE * fd = popen(QFile::encodeName(command), "w");
+ FILE * fd = popen(TQFile::encodeName(command), "w");
if (!fd)
{
kdError() << "Unable to open a pipe to " << command << endl;
return false;
}
- QString btext = text();
+ TQString btext = text();
fwrite(btext.ascii(),btext.length(),1,fd);
fflush(fd);
@@ -514,16 +514,16 @@ bool KBugReport::sendBugReport()
kdDebug() << "exit status1 " << error << " " << (WIFEXITED(error)) << " " << WEXITSTATUS(error) << endl;
if ((WIFEXITED(error)) && WEXITSTATUS(error) == 1) {
- QFile of(outputfile.name());
+ TQFile of(outputfile.name());
if (of.open(IO_ReadOnly )) {
- QTextStream is(&of);
- is.setEncoding(QTextStream::UnicodeUTF8);
- QString line;
+ TQTextStream is(&of);
+ is.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString line;
while (!is.eof())
line = is.readLine();
d->lastError = line;
} else {
- d->lastError = QString::null;
+ d->lastError = TQString::null;
}
outputfile.unlink();
return false;
diff --git a/kdeui/kbugreport.h b/kdeui/kbugreport.h
index 3220903e0..e9a3184cb 100644
--- a/kdeui/kbugreport.h
+++ b/kdeui/kbugreport.h
@@ -49,7 +49,7 @@ public:
* since KHelpMenu takes care of the menu item
* for "Report Bug..." and of creating a KBugReport dialog.
*/
- KBugReport( QWidget * parent = 0L, bool modal=true, const KAboutData *aboutData = 0L );
+ KBugReport( TQWidget * parent = 0L, bool modal=true, const KAboutData *aboutData = 0L );
/**
* Destructor
*/
@@ -69,7 +69,7 @@ protected slots:
* The URL-Label "http://bugs.pearsoncomputing.net/" was clicked.
* @deprecated remove in KDE4.0
*/
- virtual void slotUrlClicked(const QString &);
+ virtual void slotUrlClicked(const TQString &);
/**
* OK has been clicked
*/
@@ -91,9 +91,9 @@ protected slots:
protected:
/**
* A complete copy of the bug report
- * @return QString copy of the bug report.
+ * @return TQString copy of the bug report.
*/
- QString text() const;
+ TQString text() const;
/**
* Attempt to e-mail the bug report.
* @return true on success
@@ -103,13 +103,13 @@ protected:
KProcess * m_process;
const KAboutData * m_aboutData;
- QMultiLineEdit * m_lineedit;
- QLineEdit * m_subject;
- QLabel * m_from;
- QLabel * m_version;
- QString m_strVersion;
- QHButtonGroup * m_bgSeverity;
- QPushButton * m_configureEmail;
+ TQMultiLineEdit * m_lineedit;
+ TQLineEdit * m_subject;
+ TQLabel * m_from;
+ TQLabel * m_version;
+ TQString m_strVersion;
+ TQHButtonGroup * m_bgSeverity;
+ TQPushButton * m_configureEmail;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kbuttonbox.cpp b/kdeui/kbuttonbox.cpp
index eab9fa072..eb0e27827 100644
--- a/kdeui/kbuttonbox.cpp
+++ b/kdeui/kbuttonbox.cpp
@@ -53,7 +53,7 @@
#include <kglobalsettings.h>
#include <kguiitem.h>
#include <kpushbutton.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <assert.h>
#define minButtonWidth 50
@@ -68,7 +68,7 @@ public:
Item(KPushButton* const _button) : button(_button) {}
};
-template class QPtrList<KButtonBox::Item>;
+template class TQPtrList<KButtonBox::Item>;
class KButtonBoxPrivate {
public:
@@ -76,12 +76,12 @@ public:
unsigned short autoborder;
unsigned short orientation;
bool activated;
- QPtrList<KButtonBox::Item> buttons;
+ TQPtrList<KButtonBox::Item> buttons;
};
-KButtonBox::KButtonBox(QWidget *parent, Orientation _orientation,
+KButtonBox::KButtonBox(TQWidget *parent, Orientation _orientation,
int border, int autoborder)
- : QWidget(parent), data(new KButtonBoxPrivate)
+ : TQWidget(parent), data(new KButtonBoxPrivate)
{
assert(data);
@@ -95,7 +95,7 @@ KButtonBox::~KButtonBox() {
delete data;
}
-QPushButton *KButtonBox::addButton(const QString& text, bool noexpand) {
+TQPushButton *KButtonBox::addButton(const TQString& text, bool noexpand) {
Item* const item = new Item(new KPushButton(text, this));
item->noexpand = noexpand;
@@ -107,7 +107,7 @@ QPushButton *KButtonBox::addButton(const QString& text, bool noexpand) {
return item->button;
}
-QPushButton *KButtonBox::addButton(const KGuiItem& guiitem, bool noexpand) {
+TQPushButton *KButtonBox::addButton(const KGuiItem& guiitem, bool noexpand) {
Item* const item = new Item(new KPushButton(guiitem, this));
item->noexpand = noexpand;
@@ -119,34 +119,34 @@ QPushButton *KButtonBox::addButton(const KGuiItem& guiitem, bool noexpand) {
return item->button;
}
- QPushButton *
+ TQPushButton *
KButtonBox::addButton(
- const QString & text,
- QObject * receiver,
+ const TQString & text,
+ TQObject * receiver,
const char * slot,
bool noexpand
)
{
- QPushButton * pb = addButton(text, noexpand);
+ TQPushButton * pb = addButton(text, noexpand);
if ((0 != receiver) && (0 != slot))
- QObject::connect(pb, SIGNAL(clicked()), receiver, slot);
+ TQObject::connect(pb, TQT_SIGNAL(clicked()), receiver, slot);
return pb;
}
- QPushButton *
+ TQPushButton *
KButtonBox::addButton(
const KGuiItem& guiitem,
- QObject * receiver,
+ TQObject * receiver,
const char * slot,
bool noexpand
)
{
- QPushButton * pb = addButton(guiitem, noexpand);
+ TQPushButton * pb = addButton(guiitem, noexpand);
if ((0 != receiver) && (0 != slot))
- QObject::connect(pb, SIGNAL(clicked()), receiver, slot);
+ TQObject::connect(pb, TQT_SIGNAL(clicked()), receiver, slot);
return pb;
}
@@ -162,13 +162,13 @@ void KButtonBox::addStretch(int scale) {
void KButtonBox::layout() {
// resize all buttons
- const QSize bs = bestButtonSize();
+ const TQSize bs = bestButtonSize();
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item* item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b) {
if(item->noexpand)
b->setFixedSize(buttonSizeHint(b));
@@ -188,11 +188,11 @@ void KButtonBox::placeButtons() {
int fs = width() - 2 * data->border;
int stretch = 0;
{
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item *item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b) {
fs -= b->width();
@@ -210,11 +210,11 @@ void KButtonBox::placeButtons() {
// distribute buttons
int x_pos = data->border;
{
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item *item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b) {
b->move(x_pos, (height() - b->height()) / 2);
@@ -232,11 +232,11 @@ void KButtonBox::placeButtons() {
int fs = height() - 2 * data->border;
int stretch = 0;
{
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item *item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b)
fs -= b->height() + data->autoborder;
else
@@ -250,11 +250,11 @@ void KButtonBox::placeButtons() {
// distribute buttons
int y_pos = data->border;
{
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item *item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b) {
b->move((width() - b->width()) / 2, y_pos);
@@ -269,22 +269,22 @@ void KButtonBox::placeButtons() {
}
}
-void KButtonBox::resizeEvent(QResizeEvent *) {
+void KButtonBox::resizeEvent(TQResizeEvent *) {
placeButtons();
}
-QSize KButtonBox::bestButtonSize() const {
- QSize s(0, 0);
+TQSize KButtonBox::bestButtonSize() const {
+ TQSize s(0, 0);
// calculate optimal size
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item *item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b && !item->noexpand) {
- const QSize bs = buttonSizeHint(b);
+ const TQSize bs = buttonSizeHint(b);
const int bsWidth = bs.width();
const int bsHeight = bs.height();
@@ -300,24 +300,24 @@ QSize KButtonBox::bestButtonSize() const {
return s;
}
-QSize KButtonBox::sizeHint() const {
+TQSize KButtonBox::sizeHint() const {
unsigned int dw;
if(data->buttons.isEmpty())
- return QSize(0, 0);
+ return TQSize(0, 0);
else {
dw = 2 * data->border;
- const QSize bs = bestButtonSize();
+ const TQSize bs = bestButtonSize();
- QPtrListIterator<KButtonBox::Item> itr(data->buttons);
+ TQPtrListIterator<KButtonBox::Item> itr(data->buttons);
Item *item;
while ( (item = itr.current()) != 0 ) {
- QPushButton* const b = item->button;
+ TQPushButton* const b = item->button;
if(b) {
- QSize s;
+ TQSize s;
if(item->noexpand)
s = buttonSizeHint(b);
else
@@ -336,17 +336,17 @@ QSize KButtonBox::sizeHint() const {
}
if(data->orientation == Horizontal)
- return QSize(dw, bs.height() + 2 * data->border);
+ return TQSize(dw, bs.height() + 2 * data->border);
else
- return QSize(bs.width() + 2 * data->border, dw);
+ return TQSize(bs.width() + 2 * data->border, dw);
}
}
-QSizePolicy KButtonBox::sizePolicy() const
+TQSizePolicy KButtonBox::sizePolicy() const
{
return data->orientation == Horizontal?
- QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) :
- QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum );
+ TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) :
+ TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum );
}
/*
@@ -354,9 +354,9 @@ QSizePolicy KButtonBox::sizePolicy() const
* minButtonWidth pixels wide, return minButtonWidth pixels
* as minimum width
*/
-QSize KButtonBox::buttonSizeHint(QPushButton *b) const {
- QSize s = b->sizeHint();
- const QSize ms = b->minimumSize();
+TQSize KButtonBox::buttonSizeHint(TQPushButton *b) const {
+ TQSize s = b->sizeHint();
+ const TQSize ms = b->minimumSize();
if(s.width() < minButtonWidth)
s.setWidth(minButtonWidth);
diff --git a/kdeui/kbuttonbox.h b/kdeui/kbuttonbox.h
index 51ae7024c..74bab9006 100644
--- a/kdeui/kbuttonbox.h
+++ b/kdeui/kbuttonbox.h
@@ -22,7 +22,7 @@
#include <kdelibs_export.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class QPushButton;
class KGuiItem;
@@ -51,7 +51,7 @@ public:
* addButton() are laid out from top to bottom, otherwise they
* are laid out from left to right.
*/
- KButtonBox(QWidget *parent, Orientation _orientation = Horizontal,
+ KButtonBox(TQWidget *parent, Orientation _orientation = Horizontal,
int border = 0, int _autoborder = 6);
/**
@@ -65,12 +65,12 @@ public:
* This size is
* calculated by the width/height of all buttons plus border/autoborder.
*/
- virtual QSize sizeHint() const;
- virtual QSizePolicy sizePolicy() const;
- virtual void resizeEvent(QResizeEvent *);
+ virtual TQSize sizeHint() const;
+ virtual TQSizePolicy sizePolicy() const;
+ virtual void resizeEvent(TQResizeEvent *);
/**
- * Add a new QPushButton.
+ * Add a new TQPushButton.
*
* @param text the text of the button to add
* @param noexpand If @p noexpand is @p false, the width
@@ -80,10 +80,10 @@ public:
*
* @return A pointer to the new button.
*/
- QPushButton *addButton(const QString& text, bool noexpand = false);
+ TQPushButton *addButton(const TQString& text, bool noexpand = false);
/**
- * Add a new QPushButton.
+ * Add a new TQPushButton.
*
* @param text the text of the button to add.
* @param receiver An object to connect to.
@@ -95,10 +95,10 @@ public:
*
* @return A pointer to the new button.
*/
- QPushButton *addButton(const QString& text, QObject * receiver, const char * slot, bool noexpand = false);
+ TQPushButton *addButton(const TQString& text, TQObject * receiver, const char * slot, bool noexpand = false);
/**
- * Add a new QPushButton.
+ * Add a new TQPushButton.
*
* @param guiitem text and icon on the button
* @param noexpand If @p noexpand is @p false, the width
@@ -110,10 +110,10 @@ public:
*
* @since 3.3
*/
- QPushButton *addButton(const KGuiItem& guiitem, bool noexpand = false);
+ TQPushButton *addButton(const KGuiItem& guiitem, bool noexpand = false);
/**
- * Add a new QPushButton.
+ * Add a new TQPushButton.
*
* @param guiitem text and icon on the button
* @param receiver An object to connect to.
@@ -127,7 +127,7 @@ public:
*
* @since 3.3
*/
- QPushButton *addButton(const KGuiItem& guiitem, QObject * receiver, const char * slot, bool noexpand = false);
+ TQPushButton *addButton(const KGuiItem& guiitem, TQObject * receiver, const char * slot, bool noexpand = false);
/**
* Add a stretch to the buttonbox.
@@ -157,9 +157,9 @@ protected:
* @return the best size for a button. Checks all buttons and takes
* the maximum width/height.
*/
- QSize bestButtonSize() const;
+ TQSize bestButtonSize() const;
void placeButtons();
- QSize buttonSizeHint(QPushButton *) const;
+ TQSize buttonSizeHint(TQPushButton *) const;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kcharselect.cpp b/kdeui/kcharselect.cpp
index 295b3efc9..1eb707c4d 100644
--- a/kdeui/kcharselect.cpp
+++ b/kdeui/kcharselect.cpp
@@ -21,20 +21,20 @@
#include "kcharselect.h"
#include "kcharselect.moc"
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qevent.h>
-#include <qfont.h>
-#include <qfontdatabase.h>
-#include <qhbox.h>
-#include <qkeycode.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qtooltip.h>
-#include <qvalidator.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqevent.h>
+#include <tqfont.h>
+#include <tqfontdatabase.h>
+#include <tqhbox.h>
+#include <tqkeycode.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqtooltip.h>
+#include <tqvalidator.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -45,10 +45,10 @@
class KCharSelect::KCharSelectPrivate
{
public:
- QLineEdit *unicodeLine;
+ TQLineEdit *unicodeLine;
};
-QFontDatabase * KCharSelect::fontDataBase = 0;
+TQFontDatabase * KCharSelect::fontDataBase = 0;
void KCharSelect::cleanupFontDatabase()
{
@@ -61,9 +61,9 @@ void KCharSelect::cleanupFontDatabase()
/******************************************************************/
//==================================================================
-KCharSelectTable::KCharSelectTable( QWidget *parent, const char *name, const QString &_font,
- const QChar &_chr, int _tableNum )
- : QGridView( parent, name ), vFont( _font ), vChr( _chr ),
+KCharSelectTable::KCharSelectTable( TQWidget *parent, const char *name, const TQString &_font,
+ const TQChar &_chr, int _tableNum )
+ : TQGridView( parent, name ), vFont( _font ), vChr( _chr ),
vTableNum( _tableNum ), vPos( 0, 0 ), focusItem( _chr ), focusPos( 0, 0 ), d(0)
{
setBackgroundColor( colorGroup().base() );
@@ -78,12 +78,12 @@ KCharSelectTable::KCharSelectTable( QWidget *parent, const char *name, const QSt
setToolTips();
- setFocusPolicy( QWidget::StrongFocus );
- setBackgroundMode( QWidget::NoBackground );
+ setFocusPolicy( TQWidget::StrongFocus );
+ setBackgroundMode( TQWidget::NoBackground );
}
//==================================================================
-void KCharSelectTable::setFont( const QString &_font )
+void KCharSelectTable::setFont( const TQString &_font )
{
vFont = _font;
repaintContents( false );
@@ -92,7 +92,7 @@ void KCharSelectTable::setFont( const QString &_font )
}
//==================================================================
-void KCharSelectTable::setChar( const QChar &_chr )
+void KCharSelectTable::setChar( const TQChar &_chr )
{
vChr = _chr;
repaintContents( false );
@@ -101,7 +101,7 @@ void KCharSelectTable::setChar( const QChar &_chr )
//==================================================================
void KCharSelectTable::setTableNum( int _tableNum )
{
- focusItem = QChar( _tableNum * 256 );
+ focusItem = TQChar( _tableNum * 256 );
vTableNum = _tableNum;
repaintContents( false );
@@ -110,7 +110,7 @@ void KCharSelectTable::setTableNum( int _tableNum )
}
//==================================================================
-QSize KCharSelectTable::sizeHint() const
+TQSize KCharSelectTable::sizeHint() const
{
int w = cellWidth();
int h = cellHeight();
@@ -118,11 +118,11 @@ QSize KCharSelectTable::sizeHint() const
w *= numCols();
h *= numRows();
- return QSize( w, h );
+ return TQSize( w, h );
}
//==================================================================
-void KCharSelectTable::resizeEvent( QResizeEvent * e )
+void KCharSelectTable::resizeEvent( TQResizeEvent * e )
{
const int new_w = (e->size().width() - 2*(margin()+frameWidth())) / numCols();
const int new_h = (e->size().height() - 2*(margin()+frameWidth())) / numRows();
@@ -136,7 +136,7 @@ void KCharSelectTable::resizeEvent( QResizeEvent * e )
}
//==================================================================
-void KCharSelectTable::paintCell( class QPainter* p, int row, int col )
+void KCharSelectTable::paintCell( class TQPainter* p, int row, int col )
{
const int w = cellWidth();
const int h = cellHeight();
@@ -148,7 +148,7 @@ void KCharSelectTable::paintCell( class QPainter* p, int row, int col )
// fflush( stdout );
// }
- QFont font = QFont( vFont );
+ TQFont font = TQFont( vFont );
font.setPixelSize( int(.7 * h) );
unsigned short c = vTableNum * 256;
@@ -156,31 +156,31 @@ void KCharSelectTable::paintCell( class QPainter* p, int row, int col )
c += col;
if ( c == vChr.unicode() ) {
- p->setBrush( QBrush( colorGroup().highlight() ) );
+ p->setBrush( TQBrush( colorGroup().highlight() ) );
p->setPen( NoPen );
p->drawRect( 0, 0, w, h );
p->setPen( colorGroup().highlightedText() );
- vPos = QPoint( col, row );
+ vPos = TQPoint( col, row );
} else {
- QFontMetrics fm = QFontMetrics( font );
+ TQFontMetrics fm = TQFontMetrics( font );
if( fm.inFont( c ) )
- p->setBrush( QBrush( colorGroup().base() ) );
+ p->setBrush( TQBrush( colorGroup().base() ) );
else
- p->setBrush( QBrush( colorGroup().button() ) );
+ p->setBrush( TQBrush( colorGroup().button() ) );
p->setPen( NoPen );
p->drawRect( 0, 0, w, h );
p->setPen( colorGroup().text() );
}
if ( c == focusItem.unicode() && hasFocus() ) {
- style().drawPrimitive( QStyle::PE_FocusRect, p, QRect( 2, 2, w - 4, h - 4 ),
+ style().drawPrimitive( TQStyle::PE_FocusRect, p, TQRect( 2, 2, w - 4, h - 4 ),
colorGroup() );
- focusPos = QPoint( col, row );
+ focusPos = TQPoint( col, row );
}
p->setFont( font );
- p->drawText( 0, 0, x2, y2, AlignHCenter | AlignVCenter, QString( QChar( c ) ) );
+ p->drawText( 0, 0, x2, y2, AlignHCenter | AlignVCenter, TQString( TQChar( c ) ) );
p->setPen( colorGroup().text() );
p->drawLine( x2, 0, x2, y2 );
@@ -193,19 +193,19 @@ void KCharSelectTable::paintCell( class QPainter* p, int row, int col )
}
//==================================================================
-void KCharSelectTable::mouseMoveEvent( QMouseEvent *e )
+void KCharSelectTable::mouseMoveEvent( TQMouseEvent *e )
{
const int row = rowAt( e->y() );
const int col = columnAt( e->x() );
if ( row >= 0 && row < numRows() && col >= 0 && col < numCols() ) {
- const QPoint oldPos = vPos;
+ const TQPoint oldPos = vPos;
vPos.setX( col );
vPos.setY( row );
- vChr = QChar( vTableNum * 256 + numCols() * vPos.y() + vPos.x() );
+ vChr = TQChar( vTableNum * 256 + numCols() * vPos.y() + vPos.x() );
- const QPoint oldFocus = focusPos;
+ const TQPoint oldFocus = focusPos;
focusPos = vPos;
focusItem = vChr;
@@ -223,7 +223,7 @@ void KCharSelectTable::mouseMoveEvent( QMouseEvent *e )
}
//==================================================================
-void KCharSelectTable::keyPressEvent( QKeyEvent *e )
+void KCharSelectTable::keyPressEvent( TQKeyEvent *e )
{
switch ( e->key() ) {
case Key_Left:
@@ -251,7 +251,7 @@ void KCharSelectTable::keyPressEvent( QKeyEvent *e )
emit highlighted();
break;
case Key_Enter: case Key_Return: {
- const QPoint oldPos = vPos;
+ const TQPoint oldPos = vPos;
vPos = focusPos;
vChr = focusItem;
@@ -271,11 +271,11 @@ void KCharSelectTable::keyPressEvent( QKeyEvent *e )
void KCharSelectTable::gotoLeft()
{
if ( focusPos.x() > 0 ) {
- const QPoint oldPos = focusPos;
+ const TQPoint oldPos = focusPos;
focusPos.setX( focusPos.x() - 1 );
- focusItem = QChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
+ focusItem = TQChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
repaintCell( oldPos.y(), oldPos.x(), true );
repaintCell( focusPos.y(), focusPos.x(), true );
@@ -289,11 +289,11 @@ void KCharSelectTable::gotoLeft()
void KCharSelectTable::gotoRight()
{
if ( focusPos.x() < numCols()-1 ) {
- const QPoint oldPos = focusPos;
+ const TQPoint oldPos = focusPos;
focusPos.setX( focusPos.x() + 1 );
- focusItem = QChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
+ focusItem = TQChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
repaintCell( oldPos.y(), oldPos.x(), true );
repaintCell( focusPos.y(), focusPos.x(), true );
@@ -307,11 +307,11 @@ void KCharSelectTable::gotoRight()
void KCharSelectTable::gotoUp()
{
if ( focusPos.y() > 0 ) {
- const QPoint oldPos = focusPos;
+ const TQPoint oldPos = focusPos;
focusPos.setY( focusPos.y() - 1 );
- focusItem = QChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
+ focusItem = TQChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
repaintCell( oldPos.y(), oldPos.x(), true );
repaintCell( focusPos.y(), focusPos.x(), true );
@@ -325,11 +325,11 @@ void KCharSelectTable::gotoUp()
void KCharSelectTable::gotoDown()
{
if ( focusPos.y() < numRows()-1 ) {
- const QPoint oldPos = focusPos;
+ const TQPoint oldPos = focusPos;
focusPos.setY( focusPos.y() + 1 );
- focusItem = QChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
+ focusItem = TQChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() );
repaintCell( oldPos.y(), oldPos.x(), true );
repaintCell( focusPos.y(), focusPos.x(), true );
@@ -348,12 +348,12 @@ void KCharSelectTable::setToolTips()
{
for( int j=0; j< colCount; ++j )
{
- const QRect r( cellWidth()*j, cellHeight()*i, cellWidth(), cellHeight() );
- QToolTip::remove(this,r);
+ const TQRect r( cellWidth()*j, cellHeight()*i, cellWidth(), cellHeight() );
+ TQToolTip::remove(this,r);
const ushort uni = vTableNum * 256 + numCols()*i + j;
- QString s;
+ TQString s;
s.sprintf( "%04X", uint( uni ) );
- QString character; // Character (which sometimes need to be escaped)
+ TQString character; // Character (which sometimes need to be escaped)
switch ( uni )
{
case 0x3c: character = "&lt;"; break;
@@ -361,9 +361,9 @@ void KCharSelectTable::setToolTips()
case 0x26: character = "&amp;"; break;
case 0x27: character = "&apos;"; break;
case 0x22: character = "&quot;"; break;
- default: character = QChar( uni ); break;
+ default: character = TQChar( uni ); break;
}
- QToolTip::add(this, r, i18n( "Character","<qt><font size=\"+4\" face=\"%1\">%2</font><br>Unicode code point: U+%3<br>(In decimal: %4)<br>(Character: %5)</qt>" ).arg( vFont ).arg( character ).arg( s ).arg( uni ).arg( character ) );
+ TQToolTip::add(this, r, i18n( "Character","<qt><font size=\"+4\" face=\"%1\">%2</font><br>Unicode code point: U+%3<br>(In decimal: %4)<br>(Character: %5)</qt>" ).arg( vFont ).arg( character ).arg( s ).arg( uni ).arg( character ) );
}
}
}
@@ -373,41 +373,41 @@ void KCharSelectTable::setToolTips()
/******************************************************************/
//==================================================================
-KCharSelect::KCharSelect( QWidget *parent, const char *name, const QString &_font, const QChar &_chr, int _tableNum )
- : QVBox( parent, name ), d(new KCharSelectPrivate)
+KCharSelect::KCharSelect( TQWidget *parent, const char *name, const TQString &_font, const TQChar &_chr, int _tableNum )
+ : TQVBox( parent, name ), d(new KCharSelectPrivate)
{
setSpacing( KDialog::spacingHint() );
- QHBox* const bar = new QHBox( this );
+ TQHBox* const bar = new TQHBox( this );
bar->setSpacing( KDialog::spacingHint() );
- QLabel* const lFont = new QLabel( i18n( "Font:" ), bar );
+ TQLabel* const lFont = new TQLabel( i18n( "Font:" ), bar );
lFont->resize( lFont->sizeHint() );
lFont->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
lFont->setMaximumWidth( lFont->sizeHint().width() );
- fontCombo = new QComboBox( true, bar );
+ fontCombo = new TQComboBox( true, bar );
fillFontCombo();
fontCombo->resize( fontCombo->sizeHint() );
- connect( fontCombo, SIGNAL( activated( const QString & ) ), this, SLOT( fontSelected( const QString & ) ) );
+ connect( fontCombo, TQT_SIGNAL( activated( const TQString & ) ), this, TQT_SLOT( fontSelected( const TQString & ) ) );
- QLabel* const lTable = new QLabel( i18n( "Table:" ), bar );
+ TQLabel* const lTable = new TQLabel( i18n( "Table:" ), bar );
lTable->resize( lTable->sizeHint() );
lTable->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
lTable->setMaximumWidth( lTable->sizeHint().width() );
- tableSpinBox = new QSpinBox( 0, 255, 1, bar );
+ tableSpinBox = new TQSpinBox( 0, 255, 1, bar );
tableSpinBox->resize( tableSpinBox->sizeHint() );
- connect( tableSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( tableChanged( int ) ) );
+ connect( tableSpinBox, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( tableChanged( int ) ) );
- QLabel* const lUnicode = new QLabel( i18n( "&Unicode code point:" ), bar );
+ TQLabel* const lUnicode = new TQLabel( i18n( "&Unicode code point:" ), bar );
lUnicode->resize( lUnicode->sizeHint() );
lUnicode->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
lUnicode->setMaximumWidth( lUnicode->sizeHint().width() );
- const QRegExp rx( "[a-fA-F0-9]{1,4}" );
- QValidator* const validator = new QRegExpValidator( rx, this );
+ const TQRegExp rx( "[a-fA-F0-9]{1,4}" );
+ TQValidator* const validator = new TQRegExpValidator( rx, this );
d->unicodeLine = new KLineEdit( bar );
d->unicodeLine->setValidator(validator);
@@ -415,34 +415,34 @@ KCharSelect::KCharSelect( QWidget *parent, const char *name, const QString &_fon
d->unicodeLine->resize( d->unicodeLine->sizeHint() );
slotUpdateUnicode(_chr);
- connect( d->unicodeLine, SIGNAL( returnPressed() ), this, SLOT( slotUnicodeEntered() ) );
+ connect( d->unicodeLine, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotUnicodeEntered() ) );
- charTable = new KCharSelectTable( this, name, _font.isEmpty() ? QVBox::font().family() : _font, _chr, _tableNum );
- const QSize sz( charTable->contentsWidth() + 4 ,
+ charTable = new KCharSelectTable( this, name, _font.isEmpty() ? TQVBox::font().family() : _font, _chr, _tableNum );
+ const TQSize sz( charTable->contentsWidth() + 4 ,
charTable->contentsHeight() + 4 );
charTable->resize( sz );
//charTable->setMaximumSize( sz );
charTable->setMinimumSize( sz );
- charTable->setHScrollBarMode( QScrollView::AlwaysOff );
- charTable->setVScrollBarMode( QScrollView::AlwaysOff );
+ charTable->setHScrollBarMode( TQScrollView::AlwaysOff );
+ charTable->setVScrollBarMode( TQScrollView::AlwaysOff );
- setFont( _font.isEmpty() ? QVBox::font().family() : _font );
+ setFont( _font.isEmpty() ? TQVBox::font().family() : _font );
setTableNum( _tableNum );
- connect( charTable, SIGNAL( highlighted( const QChar & ) ), this, SLOT( slotUpdateUnicode( const QChar & ) ) );
- connect( charTable, SIGNAL( highlighted( const QChar & ) ), this, SLOT( charHighlighted( const QChar & ) ) );
- connect( charTable, SIGNAL( highlighted() ), this, SLOT( charHighlighted() ) );
- connect( charTable, SIGNAL( activated( const QChar & ) ), this, SLOT( charActivated( const QChar & ) ) );
- connect( charTable, SIGNAL( activated() ), this, SLOT( charActivated() ) );
- connect( charTable, SIGNAL( focusItemChanged( const QChar & ) ),
- this, SLOT( charFocusItemChanged( const QChar & ) ) );
- connect( charTable, SIGNAL( focusItemChanged() ), this, SLOT( charFocusItemChanged() ) );
- connect( charTable, SIGNAL( tableUp() ), this, SLOT( charTableUp() ) );
- connect( charTable, SIGNAL( tableDown() ), this, SLOT( charTableDown() ) );
+ connect( charTable, TQT_SIGNAL( highlighted( const TQChar & ) ), this, TQT_SLOT( slotUpdateUnicode( const TQChar & ) ) );
+ connect( charTable, TQT_SIGNAL( highlighted( const TQChar & ) ), this, TQT_SLOT( charHighlighted( const TQChar & ) ) );
+ connect( charTable, TQT_SIGNAL( highlighted() ), this, TQT_SLOT( charHighlighted() ) );
+ connect( charTable, TQT_SIGNAL( activated( const TQChar & ) ), this, TQT_SLOT( charActivated( const TQChar & ) ) );
+ connect( charTable, TQT_SIGNAL( activated() ), this, TQT_SLOT( charActivated() ) );
+ connect( charTable, TQT_SIGNAL( focusItemChanged( const TQChar & ) ),
+ this, TQT_SLOT( charFocusItemChanged( const TQChar & ) ) );
+ connect( charTable, TQT_SIGNAL( focusItemChanged() ), this, TQT_SLOT( charFocusItemChanged() ) );
+ connect( charTable, TQT_SIGNAL( tableUp() ), this, TQT_SLOT( charTableUp() ) );
+ connect( charTable, TQT_SIGNAL( tableDown() ), this, TQT_SLOT( charTableDown() ) );
- connect( charTable, SIGNAL(doubleClicked()),this,SLOT(slotDoubleClicked()));
+ connect( charTable, TQT_SIGNAL(doubleClicked()),this,TQT_SLOT(slotDoubleClicked()));
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
setFocusProxy( charTable );
}
@@ -452,17 +452,17 @@ KCharSelect::~KCharSelect()
}
//==================================================================
-QSize KCharSelect::sizeHint() const
+TQSize KCharSelect::sizeHint() const
{
- return QVBox::sizeHint();
+ return TQVBox::sizeHint();
}
//==================================================================
-void KCharSelect::setFont( const QString &_font )
+void KCharSelect::setFont( const TQString &_font )
{
- const QValueList<QString>::Iterator it = fontList.find( _font );
+ const TQValueList<TQString>::Iterator it = fontList.find( _font );
if ( it != fontList.end() ) {
- QValueList<QString>::Iterator it2 = fontList.begin();
+ TQValueList<TQString>::Iterator it2 = fontList.begin();
int pos = 0;
for ( ; it != it2; ++it2, ++pos);
fontCombo->setCurrentItem( pos );
@@ -473,7 +473,7 @@ void KCharSelect::setFont( const QString &_font )
}
//==================================================================
-void KCharSelect::setChar( const QChar &_chr )
+void KCharSelect::setChar( const TQChar &_chr )
{
charTable->setChar( _chr );
slotUpdateUnicode( _chr );
@@ -490,7 +490,7 @@ void KCharSelect::setTableNum( int _tableNum )
void KCharSelect::fillFontCombo()
{
if ( !fontDataBase ) {
- fontDataBase = new QFontDatabase();
+ fontDataBase = new TQFontDatabase();
qAddPostRoutine( cleanupFontDatabase );
}
fontList=fontDataBase->families();
@@ -498,7 +498,7 @@ void KCharSelect::fillFontCombo()
}
//==================================================================
-void KCharSelect::fontSelected( const QString &_font )
+void KCharSelect::fontSelected( const TQString &_font )
{
charTable->setFont( _font );
emit fontChanged( _font );
@@ -513,7 +513,7 @@ void KCharSelect::tableChanged( int _value )
//==================================================================
void KCharSelect::slotUnicodeEntered( )
{
- const QString s = d->unicodeLine->text();
+ const TQString s = d->unicodeLine->text();
if (s.isEmpty())
return;
@@ -525,15 +525,15 @@ void KCharSelect::slotUnicodeEntered( )
const int table = uc / 256;
charTable->setTableNum( table );
tableSpinBox->setValue(table);
- const QChar ch(uc);
+ const TQChar ch(uc);
charTable->setChar( ch );
charActivated( ch );
}
-void KCharSelect::slotUpdateUnicode( const QChar &c )
+void KCharSelect::slotUpdateUnicode( const TQChar &c )
{
const int uc = c.unicode();
- QString s;
+ TQString s;
s.sprintf("%04X", uc);
d->unicodeLine->setText(s);
}
diff --git a/kdeui/kcharselect.h b/kdeui/kcharselect.h
index a511e5952..6acd546a1 100644
--- a/kdeui/kcharselect.h
+++ b/kdeui/kcharselect.h
@@ -21,13 +21,13 @@
#ifndef kcharselect_h
#define kcharselect_h
-#include <qgridview.h>
-#include <qvbox.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qstring.h>
-#include <qpoint.h>
-#include <qstringlist.h>
+#include <tqgridview.h>
+#include <tqvbox.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqstring.h>
+#include <tqpoint.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -53,54 +53,54 @@ class KDEUI_EXPORT KCharSelectTable : public QGridView
Q_OBJECT
public:
- KCharSelectTable( QWidget *parent, const char *name, const QString &_font,
- const QChar &_chr, int _tableNum );
+ KCharSelectTable( TQWidget *parent, const char *name, const TQString &_font,
+ const TQChar &_chr, int _tableNum );
- virtual QSize sizeHint() const;
- virtual void resizeEvent( QResizeEvent * );
+ virtual TQSize sizeHint() const;
+ virtual void resizeEvent( TQResizeEvent * );
- virtual void setFont( const QString &_font );
- virtual void setChar( const QChar &_chr );
+ virtual void setFont( const TQString &_font );
+ virtual void setChar( const TQChar &_chr );
virtual void setTableNum( int _tableNum );
- virtual QChar chr() { return vChr; }
+ virtual TQChar chr() { return vChr; }
protected:
- virtual void paintCell( class QPainter *p, int row, int col );
+ virtual void paintCell( class TQPainter *p, int row, int col );
- virtual void mousePressEvent( QMouseEvent *e ) { mouseMoveEvent( e ); }
- virtual void mouseDoubleClickEvent ( QMouseEvent *e ){ mouseMoveEvent( e ); emit doubleClicked();}
- virtual void mouseReleaseEvent( QMouseEvent *e ) { mouseMoveEvent( e ); emit activated( chr() ); emit activated(); }
- virtual void mouseMoveEvent( QMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e ) { mouseMoveEvent( e ); }
+ virtual void mouseDoubleClickEvent ( TQMouseEvent *e ){ mouseMoveEvent( e ); emit doubleClicked();}
+ virtual void mouseReleaseEvent( TQMouseEvent *e ) { mouseMoveEvent( e ); emit activated( chr() ); emit activated(); }
+ virtual void mouseMoveEvent( TQMouseEvent *e );
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void keyPressEvent( TQKeyEvent *e );
void gotoLeft();
void gotoRight();
void gotoUp();
void gotoDown();
- QString vFont;
- QChar vChr;
+ TQString vFont;
+ TQChar vChr;
int vTableNum;
- QPoint vPos;
- QChar focusItem;
- QPoint focusPos;
+ TQPoint vPos;
+ TQChar focusItem;
+ TQPoint focusPos;
int temp;
signals:
- void highlighted( const QChar &c );
+ void highlighted( const TQChar &c );
void highlighted();
- void activated( const QChar &c );
+ void activated( const TQChar &c );
void activated();
void focusItemChanged();
- void focusItemChanged( const QChar &c );
+ void focusItemChanged( const TQChar &c );
void tableUp();
void tableDown();
void doubleClicked();
private:
- virtual void setFont(const QFont &f) { QGridView::setFont(f); }
+ virtual void setFont(const TQFont &f) { TQGridView::setFont(f); }
void setToolTips();
protected:
virtual void virtual_hook( int id, void* data );
@@ -140,7 +140,7 @@ private:
class KDEUI_EXPORT KCharSelect : public QVBox
{
Q_OBJECT
- Q_PROPERTY( QString fontFamily READ font WRITE setFont )
+ Q_PROPERTY( TQString fontFamily READ font WRITE setFont )
Q_PROPERTY( int tableNum READ tableNum WRITE setTableNum )
Q_PROPERTY( bool fontComboEnabled READ isFontComboEnabled WRITE enableFontCombo )
Q_PROPERTY( bool tableSpinBoxEnabled READ isTableSpinBoxEnabled WRITE enableTableSpinBox )
@@ -151,23 +151,23 @@ public:
* chr which character should be selected and @p tableNum specifies
* the number of the table which should be displayed.
*/
- KCharSelect( QWidget *parent, const char *name,
- const QString &font = QString::null, const QChar &chr = ' ', int tableNum = 0 );
+ KCharSelect( TQWidget *parent, const char *name,
+ const TQString &font = TQString::null, const TQChar &chr = ' ', int tableNum = 0 );
~KCharSelect();
/**
* Reimplemented.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* Sets the font which is displayed to @p font
*/
- virtual void setFont( const QString &font );
+ virtual void setFont( const TQString &font );
/**
* Sets the currently selected character to @p chr.
*/
- virtual void setChar( const QChar &chr );
+ virtual void setChar( const TQChar &chr );
/**
* Sets the currently displayed table to @p tableNum.
@@ -177,12 +177,12 @@ public:
/**
* Returns the currently selected character.
*/
- virtual QChar chr() const { return charTable->chr(); }
+ virtual TQChar chr() const { return charTable->chr(); }
/**
* Returns the currently displayed font.
*/
- virtual QString font() const { return fontCombo->currentText(); }
+ virtual TQString font() const { return fontCombo->currentText(); }
/**
* Returns the currently displayed table
@@ -224,38 +224,38 @@ protected:
virtual void fillFontCombo();
static void cleanupFontDatabase();
- QComboBox *fontCombo;
- QSpinBox *tableSpinBox;
+ TQComboBox *fontCombo;
+ TQSpinBox *tableSpinBox;
KCharSelectTable *charTable;
- QStringList fontList;
- static QFontDatabase * fontDataBase;
+ TQStringList fontList;
+ static TQFontDatabase * fontDataBase;
protected slots:
- void fontSelected( const QString &_font );
+ void fontSelected( const TQString &_font );
void tableChanged( int _value );
- void charHighlighted( const QChar &c ) { emit highlighted( c ); }
+ void charHighlighted( const TQChar &c ) { emit highlighted( c ); }
void charHighlighted() { emit highlighted(); }
- void charActivated( const QChar &c ) { emit activated( c ); }
+ void charActivated( const TQChar &c ) { emit activated( c ); }
void charActivated() { emit activated(); }
void charFocusItemChanged() { emit focusItemChanged(); }
- void charFocusItemChanged( const QChar &c ) { emit focusItemChanged( c ); }
+ void charFocusItemChanged( const TQChar &c ) { emit focusItemChanged( c ); }
void charTableUp() { if ( tableNum() < 255 ) setTableNum( tableNum() + 1 ); }
void charTableDown() { if ( tableNum() > 0 ) setTableNum( tableNum() - 1 ); }
void slotDoubleClicked() { emit doubleClicked(); }
void slotUnicodeEntered();
- void slotUpdateUnicode( const QChar &c );
+ void slotUpdateUnicode( const TQChar &c );
signals:
- void highlighted( const QChar &c );
+ void highlighted( const TQChar &c );
void highlighted();
- void activated( const QChar &c );
+ void activated( const TQChar &c );
void activated();
- void fontChanged( const QString &_font );
+ void fontChanged( const TQString &_font );
void focusItemChanged();
- void focusItemChanged( const QChar &c );
+ void focusItemChanged( const TQChar &c );
void doubleClicked();
private:
- virtual void setFont(const QFont &f) { QVBox::setFont(f); }
+ virtual void setFont(const TQFont &f) { TQVBox::setFont(f); }
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdeui/kcmenumngr.cpp b/kdeui/kcmenumngr.cpp
index 6255a764d..9cd9d6288 100644
--- a/kdeui/kcmenumngr.cpp
+++ b/kdeui/kcmenumngr.cpp
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*
*/
-#include <qwidget.h>
-#include <qpopupmenu.h>
+#include <tqwidget.h>
+#include <tqpopupmenu.h>
#include "kcmenumngr.h"
#include "kglobal.h"
#include "kconfig.h"
@@ -28,17 +28,17 @@
#undef KeyPress
#undef None
-template class QPtrDict<QPopupMenu>;
+template class TQPtrDict<TQPopupMenu>;
KContextMenuManager* KContextMenuManager::manager = 0;
-KContextMenuManager::KContextMenuManager( QObject* parent, const char* name )
- : QObject( parent, name)
+KContextMenuManager::KContextMenuManager( TQObject* parent, const char* name )
+ : TQObject( parent, name)
{
- KConfigGroupSaver saver ( KGlobal::config(), QString::fromLatin1("Shortcuts") ) ;
- menuKey = KShortcut( saver.config()->readEntry(QString::fromLatin1("PopupContextMenu"), QString::fromLatin1("Menu") ) ).keyCodeQt();
- saver.config()->setGroup( QString::fromLatin1("ContextMenus") ) ;
- showOnPress = saver.config()->readBoolEntry(QString::fromLatin1("ShowOnPress"), true );
+ KConfigGroupSaver saver ( KGlobal::config(), TQString::fromLatin1("Shortcuts") ) ;
+ menuKey = KShortcut( saver.config()->readEntry(TQString::fromLatin1("PopupContextMenu"), TQString::fromLatin1("Menu") ) ).keyCodeQt();
+ saver.config()->setGroup( TQString::fromLatin1("ContextMenus") ) ;
+ showOnPress = saver.config()->readBoolEntry(TQString::fromLatin1("ShowOnPress"), true );
}
KContextMenuManager::~KContextMenuManager()
@@ -54,40 +54,40 @@ bool KContextMenuManager::showOnButtonPress( void )
}
-void KContextMenuManager::insert( QWidget* widget, QPopupMenu* popup )
+void KContextMenuManager::insert( TQWidget* widget, TQPopupMenu* popup )
{
if ( !manager )
manager = new KContextMenuManager;
- manager->connect( widget, SIGNAL( destroyed() ), manager, SLOT( widgetDestroyed() ) );
+ manager->connect( widget, TQT_SIGNAL( destroyed() ), manager, TQT_SLOT( widgetDestroyed() ) );
manager->menus.insert( widget, popup );
widget->installEventFilter( manager );
}
-bool KContextMenuManager::eventFilter( QObject *o, QEvent * e)
+bool KContextMenuManager::eventFilter( TQObject *o, TQEvent * e)
{
- QPopupMenu* popup = 0;
- QPoint pos;
+ TQPopupMenu* popup = 0;
+ TQPoint pos;
switch ( e->type() ) {
- case QEvent::MouseButtonPress:
- if (((QMouseEvent*) e )->button() != RightButton )
+ case TQEvent::MouseButtonPress:
+ if (((TQMouseEvent*) e )->button() != RightButton )
break;
if ( !showOnPress )
return true; // eat event for safety
popup = menus[o];
- pos = ((QMouseEvent*) e )->globalPos();
+ pos = ((TQMouseEvent*) e )->globalPos();
break;
- case QEvent::MouseButtonRelease:
- if ( showOnPress || ((QMouseEvent*) e )->button() != RightButton )
+ case TQEvent::MouseButtonRelease:
+ if ( showOnPress || ((TQMouseEvent*) e )->button() != RightButton )
break;
popup = menus[o];
- pos = ((QMouseEvent*) e )->globalPos();
+ pos = ((TQMouseEvent*) e )->globalPos();
break;
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
{
if ( !o->isWidgetType() )
break;
- QKeyEvent *k = (QKeyEvent *)e;
+ TQKeyEvent *k = (TQKeyEvent *)e;
int key = k->key();
if ( k->state() & ShiftButton )
key |= SHIFT;
@@ -99,7 +99,7 @@ bool KContextMenuManager::eventFilter( QObject *o, QEvent * e)
break;
popup = menus[o];
if ( popup ) {
- QWidget* w = (QWidget*) o ;
+ TQWidget* w = (TQWidget*) o ;
// ### workaround
pos = w->mapToGlobal( w->rect().center() );
@@ -122,8 +122,8 @@ bool KContextMenuManager::eventFilter( QObject *o, QEvent * e)
void KContextMenuManager::widgetDestroyed()
{
- if ( menus.find( (QObject*)sender() ) )
- menus.remove( (QObject*)sender() );
+ if ( menus.find( (TQObject*)sender() ) )
+ menus.remove( (TQObject*)sender() );
}
#include "kcmenumngr.moc"
diff --git a/kdeui/kcmenumngr.h b/kdeui/kcmenumngr.h
index 36a2580ad..81d888fcb 100644
--- a/kdeui/kcmenumngr.h
+++ b/kdeui/kcmenumngr.h
@@ -24,9 +24,9 @@
class QWidget;
class QPopupMenu;
class KContextMenuManagerPrivate;
-#include <qobject.h>
-#include <qptrdict.h>
-#include <qkeysequence.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
+#include <tqkeysequence.h>
#include <kdelibs_export.h>
@@ -35,8 +35,8 @@ class KContextMenuManagerPrivate;
@author Matthias Ettrich <ettrich@kde.org>
KContextMenuManager manages configurable context popup menus. Instead
-of reimplementing QWidget::mousePressEvent() or
- QWidget::mouseReleaseEvent() and/or QWidget::keyPressEvent(), simply
+of reimplementing TQWidget::mousePressEvent() or
+ TQWidget::mouseReleaseEvent() and/or TQWidget::keyPressEvent(), simply
create the popup menu and insert it into the context menu manager with
the static function insert().
@@ -70,7 +70,7 @@ The shortcut key to invoke the context menu is defined in the standard
The key can be configured with the standard keys module in the KDE control center.
If the popup menu is invoked with the keyboard shortcut, it's shown at
-the position of the micro focus hint of the widget ( QWidget::microFocusHint() ).
+the position of the micro focus hint of the widget ( TQWidget::microFocusHint() ).
*/
class KDEUI_EXPORT KContextMenuManager : public QObject
@@ -84,7 +84,7 @@ public:
Ownership of the popup menu is not transferred to the context
menu manager.
*/
- static void insert( QWidget* widget, QPopupMenu* popup );
+ static void insert( TQWidget* widget, TQPopupMenu* popup );
/**
* Use this method to get information about when a popup menu
@@ -99,12 +99,12 @@ public:
private slots:
void widgetDestroyed();
private:
- KContextMenuManager( QObject* parent = 0, const char* name = 0);
+ KContextMenuManager( TQObject* parent = 0, const char* name = 0);
~KContextMenuManager();
- bool eventFilter( QObject *, QEvent * );
- QPtrDict<QPopupMenu> menus;
+ bool eventFilter( TQObject *, TQEvent * );
+ TQPtrDict<TQPopupMenu> menus;
bool showOnPress;
- QKeySequence menuKey;
+ TQKeySequence menuKey;
static KContextMenuManager* manager;
friend class I_really_like_this_class; // avoid warning
diff --git a/kdeui/kcmodule.cpp b/kdeui/kcmodule.cpp
index 43b2cdd95..0c26d11ec 100644
--- a/kdeui/kcmodule.cpp
+++ b/kdeui/kcmodule.cpp
@@ -21,7 +21,7 @@
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kaboutdata.h>
#include <kconfigskeleton.h>
@@ -46,11 +46,11 @@ public:
KInstance *_instance;
KAboutData *_about;
- QString _rootOnlyMsg;
+ TQString _rootOnlyMsg;
bool _useRootOnlyMsg;
bool _hasOwnInstance;
- QPtrList<KConfigDialogManager> managers;
- QString _quickHelp;
+ TQPtrList<KConfigDialogManager> managers;
+ TQString _quickHelp;
// this member is used to record the state on non-automatically
// managed widgets, allowing for mixed KConfigXT-drive and manual
@@ -59,8 +59,8 @@ public:
bool _unmanagedWidgetChangeState;
};
-KCModule::KCModule(QWidget *parent, const char *name, const QStringList &)
- : QWidget(parent, name)
+KCModule::KCModule(TQWidget *parent, const char *name, const TQStringList &)
+ : TQWidget(parent, name)
{
init();
if (name && strlen(name)) {
@@ -74,8 +74,8 @@ KCModule::KCModule(QWidget *parent, const char *name, const QStringList &)
}
-KCModule::KCModule(KInstance *instance, QWidget *parent, const QStringList & )
- : QWidget(parent, instance ? instance->instanceName().data() : 0)
+KCModule::KCModule(KInstance *instance, TQWidget *parent, const TQStringList & )
+ : TQWidget(parent, instance ? instance->instanceName().data() : 0)
{
init();
d->_instance = instance;
@@ -95,10 +95,10 @@ void KCModule::init()
_btn = Help|Default|Apply;
}
-KConfigDialogManager* KCModule::addConfig( KConfigSkeleton *config, QWidget* widget )
+KConfigDialogManager* KCModule::addConfig( KConfigSkeleton *config, TQWidget* widget )
{
KConfigDialogManager* manager = new KConfigDialogManager( widget, config, name() );
- connect( manager, SIGNAL( widgetModified() ), SLOT( widgetChanged() ));
+ connect( manager, TQT_SIGNAL( widgetModified() ), TQT_SLOT( widgetChanged() ));
d->managers.append( manager );
return manager;
}
@@ -167,12 +167,12 @@ void KCModule::setAboutData( KAboutData* about )
d->_about = about;
}
-void KCModule::setRootOnlyMsg(const QString& msg)
+void KCModule::setRootOnlyMsg(const TQString& msg)
{
d->_rootOnlyMsg = msg;
}
-QString KCModule::rootOnlyMsg() const
+TQString KCModule::rootOnlyMsg() const
{
return d->_rootOnlyMsg;
}
@@ -197,19 +197,19 @@ KInstance *KCModule::instance() const
return d->_instance;
}
-void KCModule::setQuickHelp( const QString& help )
+void KCModule::setQuickHelp( const TQString& help )
{
d->_quickHelp = help;
emit( quickHelpChanged() );
}
-QString KCModule::quickHelp() const
+TQString KCModule::quickHelp() const
{
return d->_quickHelp;
}
-const QPtrList<KConfigDialogManager>& KCModule::configs() const
+const TQPtrList<KConfigDialogManager>& KCModule::configs() const
{
return d->managers;
}
diff --git a/kdeui/kcmodule.h b/kdeui/kcmodule.h
index a8297c4ce..1ec52a7f2 100644
--- a/kdeui/kcmodule.h
+++ b/kdeui/kcmodule.h
@@ -23,7 +23,7 @@
#ifndef KCMODULE_H
#define KCMODULE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -54,7 +54,7 @@ class KInstance;
* \code
* #include <kgenericfactory.h>
*
- * typedef KGenericFactory<YourKCModule, QWidget> YourKCModuleFactory;
+ * typedef KGenericFactory<YourKCModule, TQWidget> YourKCModuleFactory;
* K_EXPORT_COMPONENT_FACTORY( yourLibName, YourKCModuleFactory("name_of_the_po_file") );
* \endcode
*
@@ -86,12 +86,12 @@ public:
/*
* Base class for all KControlModules.
- * Make sure you have a QStringList argument in your
+ * Make sure you have a TQStringList argument in your
* implementation.
*/
- KCModule(QWidget *parent=0, const char *name=0, const QStringList &args=QStringList() );
+ KCModule(TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList() );
- KCModule(KInstance *instance, QWidget *parent=0, const QStringList &args=QStringList() );
+ KCModule(KInstance *instance, TQWidget *parent=0, const TQStringList &args=TQStringList() );
/*
* Destroys the module.
@@ -175,7 +175,7 @@ public:
*
* @note make sure the quick help text gets translated (use i18n()).
*/
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
/**
* This is generally only called for the KBugReport.
@@ -214,7 +214,7 @@ public:
*
* @see KCModule::setRootOnlyMsg
*/
- QString rootOnlyMsg() const;
+ TQString rootOnlyMsg() const;
/**
* Tell if KControl should show a RootOnly message when run as
@@ -234,7 +234,7 @@ public:
* @return a list of @ref KConfigDialogManager's in use, if any.
* @since 3.4
*/
- const QPtrList<KConfigDialogManager>& configs() const;
+ const TQPtrList<KConfigDialogManager>& configs() const;
protected:
/**
@@ -247,14 +247,14 @@ protected:
* @param config the KConfigSkeleton to use
* @param widget the widget to watch
*/
- KConfigDialogManager* addConfig( KConfigSkeleton *config, QWidget* widget );
+ KConfigDialogManager* addConfig( KConfigSkeleton *config, TQWidget* widget );
/**
* Sets the quick help.
*
* @since 3.3
*/
- void setQuickHelp( const QString& help );
+ void setQuickHelp( const TQString& help );
signals:
@@ -317,7 +317,7 @@ protected:
*
* @see KCModule::rootOnlyMsg
*/
- void setRootOnlyMsg(const QString& msg);
+ void setRootOnlyMsg(const TQString& msg);
/**
* Change whether or not the RootOnly message should be shown.
diff --git a/kdeui/kcolorbutton.cpp b/kdeui/kcolorbutton.cpp
index a3602ed4e..3cccbe1df 100644
--- a/kdeui/kcolorbutton.cpp
+++ b/kdeui/kcolorbutton.cpp
@@ -20,11 +20,11 @@
#include <config.h>
-#include <qpainter.h>
-#include <qdrawutil.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qstyle.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqstyle.h>
#include <kglobalsettings.h>
#include <kstdaccel.h>
#include "kcolordialog.h"
@@ -35,37 +35,37 @@ class KColorButton::KColorButtonPrivate
{
public:
bool m_bdefaultColor;
- QColor m_defaultColor;
+ TQColor m_defaultColor;
};
-KColorButton::KColorButton( QWidget *parent, const char *name )
- : QPushButton( parent, name )
+KColorButton::KColorButton( TQWidget *parent, const char *name )
+ : TQPushButton( parent, name )
{
d = new KColorButtonPrivate;
d->m_bdefaultColor = false;
- d->m_defaultColor = QColor();
+ d->m_defaultColor = TQColor();
setAcceptDrops( true);
// 2000-10-15 (putzer): fixes broken keyboard usage
- connect (this, SIGNAL(clicked()), this, SLOT(chooseColor()));
+ connect (this, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseColor()));
}
-KColorButton::KColorButton( const QColor &c, QWidget *parent,
+KColorButton::KColorButton( const TQColor &c, TQWidget *parent,
const char *name )
- : QPushButton( parent, name ), col(c)
+ : TQPushButton( parent, name ), col(c)
{
d = new KColorButtonPrivate;
d->m_bdefaultColor = false;
- d->m_defaultColor = QColor();
+ d->m_defaultColor = TQColor();
setAcceptDrops( true);
// 2000-10-15 (putzer): fixes broken keyboard usage
- connect (this, SIGNAL(clicked()), this, SLOT(chooseColor()));
+ connect (this, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseColor()));
}
-KColorButton::KColorButton( const QColor &c, const QColor &defaultColor, QWidget *parent,
+KColorButton::KColorButton( const TQColor &c, const TQColor &defaultColor, TQWidget *parent,
const char *name )
- : QPushButton( parent, name ), col(c)
+ : TQPushButton( parent, name ), col(c)
{
d = new KColorButtonPrivate;
d->m_bdefaultColor = true;
@@ -73,7 +73,7 @@ KColorButton::KColorButton( const QColor &c, const QColor &defaultColor, QWidget
setAcceptDrops( true);
// 2000-10-15 (putzer): fixes broken keyboard usage
- connect (this, SIGNAL(clicked()), this, SLOT(chooseColor()));
+ connect (this, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseColor()));
}
KColorButton::~KColorButton()
@@ -81,7 +81,7 @@ KColorButton::~KColorButton()
delete d;
}
-void KColorButton::setColor( const QColor &c )
+void KColorButton::setColor( const TQColor &c )
{
if ( col != c ) {
col = c;
@@ -90,89 +90,89 @@ void KColorButton::setColor( const QColor &c )
}
}
-QColor KColorButton::defaultColor() const
+TQColor KColorButton::defaultColor() const
{
return d->m_defaultColor;
}
-void KColorButton::setDefaultColor( const QColor &c )
+void KColorButton::setDefaultColor( const TQColor &c )
{
d->m_bdefaultColor = c.isValid();
d->m_defaultColor = c;
}
-void KColorButton::drawButtonLabel( QPainter *painter )
+void KColorButton::drawButtonLabel( TQPainter *painter )
{
int x, y, w, h;
- QRect r = style().subRect( QStyle::SR_PushButtonContents, this );
+ TQRect r = style().subRect( TQStyle::SR_PushButtonContents, this );
r.rect(&x, &y, &w, &h);
- int margin = style().pixelMetric( QStyle::PM_ButtonMargin, this );
+ int margin = style().pixelMetric( TQStyle::PM_ButtonMargin, this );
x += margin;
y += margin;
w -= 2*margin;
h -= 2*margin;
if (isOn() || isDown()) {
- x += style().pixelMetric( QStyle::PM_ButtonShiftHorizontal, this );
- y += style().pixelMetric( QStyle::PM_ButtonShiftVertical, this );
+ x += style().pixelMetric( TQStyle::PM_ButtonShiftHorizontal, this );
+ y += style().pixelMetric( TQStyle::PM_ButtonShiftVertical, this );
}
- QColor fillCol = isEnabled() ? col : backgroundColor();
+ TQColor fillCol = isEnabled() ? col : backgroundColor();
qDrawShadePanel( painter, x, y, w, h, colorGroup(), true, 1, NULL);
if ( fillCol.isValid() )
painter->fillRect( x+1, y+1, w-2, h-2, fillCol );
if ( hasFocus() ) {
- QRect focusRect = style().subRect( QStyle::SR_PushButtonFocusRect, this );
- style().drawPrimitive( QStyle::PE_FocusRect, painter, focusRect, colorGroup() );
+ TQRect focusRect = style().subRect( TQStyle::SR_PushButtonFocusRect, this );
+ style().drawPrimitive( TQStyle::PE_FocusRect, painter, focusRect, colorGroup() );
}
}
-QSize KColorButton::sizeHint() const
+TQSize KColorButton::sizeHint() const
{
- return style().sizeFromContents(QStyle::CT_PushButton, this, QSize(40, 15)).
- expandedTo(QApplication::globalStrut());
+ return style().sizeFromContents(TQStyle::CT_PushButton, this, TQSize(40, 15)).
+ expandedTo(TQApplication::globalStrut());
}
-void KColorButton::dragEnterEvent( QDragEnterEvent *event)
+void KColorButton::dragEnterEvent( TQDragEnterEvent *event)
{
event->accept( KColorDrag::canDecode( event) && isEnabled());
}
-void KColorButton::dropEvent( QDropEvent *event)
+void KColorButton::dropEvent( TQDropEvent *event)
{
- QColor c;
+ TQColor c;
if( KColorDrag::decode( event, c)) {
setColor(c);
}
}
-void KColorButton::keyPressEvent( QKeyEvent *e )
+void KColorButton::keyPressEvent( TQKeyEvent *e )
{
KKey key( e );
if ( KStdAccel::copy().contains( key ) ) {
- QMimeSource* mime = new KColorDrag( color() );
- QApplication::clipboard()->setData( mime, QClipboard::Clipboard );
+ TQMimeSource* mime = new KColorDrag( color() );
+ TQApplication::clipboard()->setData( mime, QClipboard::Clipboard );
}
else if ( KStdAccel::paste().contains( key ) ) {
- QColor color;
- KColorDrag::decode( QApplication::clipboard()->data( QClipboard::Clipboard ), color );
+ TQColor color;
+ KColorDrag::decode( TQApplication::clipboard()->data( QClipboard::Clipboard ), color );
setColor( color );
}
else
- QPushButton::keyPressEvent( e );
+ TQPushButton::keyPressEvent( e );
}
-void KColorButton::mousePressEvent( QMouseEvent *e)
+void KColorButton::mousePressEvent( TQMouseEvent *e)
{
mPos = e->pos();
- QPushButton::mousePressEvent(e);
+ TQPushButton::mousePressEvent(e);
}
-void KColorButton::mouseMoveEvent( QMouseEvent *e)
+void KColorButton::mouseMoveEvent( TQMouseEvent *e)
{
if( (e->state() & LeftButton) &&
(e->pos()-mPos).manhattanLength() > KGlobalSettings::dndEventDelay() )
@@ -186,16 +186,16 @@ void KColorButton::mouseMoveEvent( QMouseEvent *e)
void KColorButton::chooseColor()
{
- QColor c = color();
+ TQColor c = color();
if ( d->m_bdefaultColor )
{
- if( KColorDialog::getColor( c, d->m_defaultColor, this ) != QDialog::Rejected ) {
+ if( KColorDialog::getColor( c, d->m_defaultColor, this ) != TQDialog::Rejected ) {
setColor( c );
}
}
else
{
- if( KColorDialog::getColor( c, this ) != QDialog::Rejected ) {
+ if( KColorDialog::getColor( c, this ) != TQDialog::Rejected ) {
setColor( c );
}
}
diff --git a/kdeui/kcolorbutton.h b/kdeui/kcolorbutton.h
index cb522cdfa..cff929156 100644
--- a/kdeui/kcolorbutton.h
+++ b/kdeui/kcolorbutton.h
@@ -20,7 +20,7 @@
#ifndef __COLBTN_H__
#define __COLBTN_H__
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kdelibs_export.h>
@@ -37,21 +37,21 @@ class KColorButtonPrivate;
class KDEUI_EXPORT KColorButton : public QPushButton
{
Q_OBJECT
- Q_PROPERTY( QColor color READ color WRITE setColor )
- Q_PROPERTY( QColor defaultColor READ defaultColor WRITE setDefaultColor )
+ Q_PROPERTY( TQColor color READ color WRITE setColor )
+ Q_PROPERTY( TQColor defaultColor READ defaultColor WRITE setDefaultColor )
public:
/**
* Creates a color button.
*/
- KColorButton( QWidget *parent, const char *name = 0L );
+ KColorButton( TQWidget *parent, const char *name = 0L );
/**
* Creates a color button with an initial color @p c.
*/
- KColorButton( const QColor &c, QWidget *parent, const char *name = 0L );
+ KColorButton( const TQColor &c, TQWidget *parent, const char *name = 0L );
/// @since 3.1
- KColorButton( const QColor &c, const QColor &defaultColor, QWidget *parent,
+ KColorButton( const TQColor &c, const TQColor &defaultColor, TQWidget *parent,
const char *name=0L );
virtual ~KColorButton();
@@ -59,49 +59,49 @@ public:
/**
* Returns the currently chosen color.
*/
- QColor color() const
+ TQColor color() const
{ return col; }
/**
* Sets the current color to @p c.
*/
- void setColor( const QColor &c );
+ void setColor( const TQColor &c );
/**
* Returns the default color or an invalid color
* if no default color is set.
* @since 3.4
*/
- QColor defaultColor() const;
+ TQColor defaultColor() const;
/**
* Sets the default color to @p c.
* @since 3.4
*/
- void setDefaultColor( const QColor &c );
+ void setDefaultColor( const TQColor &c );
- QSize sizeHint() const;
+ TQSize sizeHint() const;
signals:
/**
* Emitted when the color of the widget
* is changed, either with setColor() or via user selection.
*/
- void changed( const QColor &newColor );
+ void changed( const TQColor &newColor );
protected slots:
void chooseColor();
protected:
- virtual void drawButtonLabel( QPainter *p );
- virtual void dragEnterEvent( QDragEnterEvent *);
- virtual void dropEvent( QDropEvent *);
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e);
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void drawButtonLabel( TQPainter *p );
+ virtual void dragEnterEvent( TQDragEnterEvent *);
+ virtual void dropEvent( TQDropEvent *);
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e);
+ virtual void keyPressEvent( TQKeyEvent *e );
private:
- QColor col;
- QPoint mPos;
+ TQColor col;
+ TQPoint mPos;
bool dragFlag;
protected:
diff --git a/kdeui/kcolorcombo.cpp b/kdeui/kcolorcombo.cpp
index 1e39d75cb..c418b6a81 100644
--- a/kdeui/kcolorcombo.cpp
+++ b/kdeui/kcolorcombo.cpp
@@ -32,17 +32,17 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qdrawutil.h>
-#include <qevent.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qvalidator.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
+#include <tqdrawutil.h>
+#include <tqevent.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqvalidator.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -68,14 +68,14 @@
#ifndef KDE_USE_FINAL
#define STANDARD_PAL_SIZE 17
-static QColor *standardPalette = 0;
+static TQColor *standardPalette = 0;
static void createStandardPalette()
{
if ( standardPalette )
return;
- standardPalette = new QColor [STANDARD_PAL_SIZE];
+ standardPalette = new TQColor [STANDARD_PAL_SIZE];
int i = 0;
@@ -108,8 +108,8 @@ class KColorCombo::KColorComboPrivate
bool showEmptyList;
};
-KColorCombo::KColorCombo( QWidget *parent, const char *name )
- : QComboBox( parent, name )
+KColorCombo::KColorCombo( TQWidget *parent, const char *name )
+ : TQComboBox( parent, name )
{
d=new KColorComboPrivate();
d->showEmptyList=false;
@@ -121,8 +121,8 @@ KColorCombo::KColorCombo( QWidget *parent, const char *name )
addColors();
- connect( this, SIGNAL( activated(int) ), SLOT( slotActivated(int) ) );
- connect( this, SIGNAL( highlighted(int) ), SLOT( slotHighlighted(int) ) );
+ connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) );
+ connect( this, TQT_SIGNAL( highlighted(int) ), TQT_SLOT( slotHighlighted(int) ) );
}
@@ -133,7 +133,7 @@ KColorCombo::~KColorCombo()
/**
Sets the current color
*/
-void KColorCombo::setColor( const QColor &col )
+void KColorCombo::setColor( const TQColor &col )
{
internalcolor = col;
d->showEmptyList=false;
@@ -144,13 +144,13 @@ void KColorCombo::setColor( const QColor &col )
/**
Returns the currently selected color
*/
-QColor KColorCombo::color() const {
+TQColor KColorCombo::color() const {
return internalcolor;
}
-void KColorCombo::resizeEvent( QResizeEvent *re )
+void KColorCombo::resizeEvent( TQResizeEvent *re )
{
- QComboBox::resizeEvent( re );
+ TQComboBox::resizeEvent( re );
addColors();
}
@@ -168,12 +168,12 @@ void KColorCombo::slotActivated( int index )
{
if ( index == 0 )
{
- if ( KColorDialog::getColor( customColor, this ) == QDialog::Accepted )
+ if ( KColorDialog::getColor( customColor, this ) == TQDialog::Accepted )
{
- QPainter painter;
- QPen pen;
- QRect rect( 0, 0, width(), QFontMetrics(painter.font()).height()+4);
- QPixmap pixmap( rect.width(), rect.height() );
+ TQPainter painter;
+ TQPen pen;
+ TQRect rect( 0, 0, width(), TQFontMetrics(painter.font()).height()+4);
+ TQPixmap pixmap( rect.width(), rect.height() );
if ( qGray( customColor.rgb() ) < 128 )
pen.setColor( white );
@@ -181,10 +181,10 @@ void KColorCombo::slotActivated( int index )
pen.setColor( black );
painter.begin( &pixmap );
- QBrush brush( customColor );
+ TQBrush brush( customColor );
painter.fillRect( rect, brush );
painter.setPen( pen );
- painter.drawText( 2, QFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
+ painter.drawText( 2, TQFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
painter.end();
changeItem( pixmap, 0 );
@@ -211,10 +211,10 @@ void KColorCombo::slotHighlighted( int index )
void KColorCombo::addColors()
{
- QPainter painter;
- QPen pen;
- QRect rect( 0, 0, width(), QFontMetrics(painter.font()).height()+4 );
- QPixmap pixmap( rect.width(), rect.height() );
+ TQPainter painter;
+ TQPen pen;
+ TQRect rect( 0, 0, width(), TQFontMetrics(painter.font()).height()+4 );
+ TQPixmap pixmap( rect.width(), rect.height() );
int i;
clear();
@@ -234,10 +234,10 @@ void KColorCombo::addColors()
pen.setColor( black );
painter.begin( &pixmap );
- QBrush brush( customColor );
+ TQBrush brush( customColor );
painter.fillRect( rect, brush );
painter.setPen( pen );
- painter.drawText( 2, QFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
+ painter.drawText( 2, TQFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
painter.end();
insertItem( pixmap );
@@ -246,7 +246,7 @@ void KColorCombo::addColors()
for ( i = 0; i < STANDARD_PAL_SIZE; i++ )
{
painter.begin( &pixmap );
- QBrush brush( standardPalette[i] );
+ TQBrush brush( standardPalette[i] );
painter.fillRect( rect, brush );
painter.end();
diff --git a/kdeui/kcolorcombo.h b/kdeui/kcolorcombo.h
index c4754c55f..8ef33f5c9 100644
--- a/kdeui/kcolorcombo.h
+++ b/kdeui/kcolorcombo.h
@@ -26,7 +26,7 @@
#ifndef _KCOLORCOMBO_H__
#define _KCOLORCOMBO_H__
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include <kcolordialog.h>
#include "kselect.h"
@@ -39,23 +39,23 @@ class KColorComboInternal;
class KDEUI_EXPORT KColorCombo : public QComboBox
{
Q_OBJECT
- Q_PROPERTY( QColor color READ color WRITE setColor )
+ Q_PROPERTY( TQColor color READ color WRITE setColor )
public:
/**
* Constructs a color combo box.
*/
- KColorCombo( QWidget *parent, const char *name = 0L );
+ KColorCombo( TQWidget *parent, const char *name = 0L );
~KColorCombo();
/**
* Selects the color @p col.
*/
- void setColor( const QColor &col );
+ void setColor( const TQColor &col );
/**
* Returns the currently selected color.
**/
- QColor color() const;
+ TQColor color() const;
/**
@@ -67,14 +67,14 @@ signals:
/**
* Emitted when a new color box has been selected.
*/
- void activated( const QColor &col );
+ void activated( const TQColor &col );
/**
* Emitted when a new item has been highlighted.
*/
- void highlighted( const QColor &col );
+ void highlighted( const TQColor &col );
protected:
- virtual void resizeEvent( QResizeEvent *re );
+ virtual void resizeEvent( TQResizeEvent *re );
private slots:
void slotActivated( int index );
@@ -82,8 +82,8 @@ private slots:
private:
void addColors();
- QColor customColor;
- QColor internalcolor;
+ TQColor customColor;
+ TQColor internalcolor;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kcolordialog.cpp b/kdeui/kcolordialog.cpp
index 6eb675977..3e158e928 100644
--- a/kdeui/kcolordialog.cpp
+++ b/kdeui/kcolordialog.cpp
@@ -31,19 +31,19 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdrawutil.h>
-#include <qevent.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qtimer.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdrawutil.h>
+#include <tqevent.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvalidator.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -96,8 +96,8 @@ const int customColorIndex = 1;
class KColorSpinBox : public QSpinBox
{
public:
- KColorSpinBox(int minValue, int maxValue, int step, QWidget* parent)
- : QSpinBox(minValue, maxValue, step, parent, "kcolorspinbox")
+ KColorSpinBox(int minValue, int maxValue, int step, TQWidget* parent)
+ : TQSpinBox(minValue, maxValue, step, parent, "kcolorspinbox")
{ }
// Override Qt's braindead auto-selection.
@@ -114,23 +114,23 @@ public:
#define STANDARD_PAL_SIZE 17
KColor::KColor()
-: QColor()
+: TQColor()
{
r = 0; g = 0; b = 0; h = 0; s = 0; v = 0;
}
KColor::KColor( const KColor &col)
-: QColor( col )
+: TQColor( col )
{
h = col.h; s = col.s; v = col.v;
r = col.r; g = col.g; b = col.b;
}
-KColor::KColor( const QColor &col)
-: QColor( col )
+KColor::KColor( const TQColor &col)
+: TQColor( col )
{
- QColor::getRgb(&r, &g, &b);
- QColor::getHsv(&h, &s, &v);
+ TQColor::getRgb(&r, &g, &b);
+ TQColor::getHsv(&h, &s, &v);
}
bool KColor::operator==(const KColor& col) const
@@ -141,7 +141,7 @@ bool KColor::operator==(const KColor& col) const
KColor& KColor::operator=(const KColor& col)
{
- *(QColor *)this = col;
+ *(TQColor *)this = col;
h = col.h; s = col.s; v = col.v;
r = col.r; g = col.g; b = col.b;
return *this;
@@ -151,16 +151,16 @@ void
KColor::setHsv(int _h, int _s, int _v)
{
h = _h; s = _s; v = _v;
- QColor::setHsv(h, s, v);
- QColor::rgb(&r, &g, &b);
+ TQColor::setHsv(h, s, v);
+ TQColor::rgb(&r, &g, &b);
}
void
KColor::setRgb(int _r, int _g, int _b)
{
r = _r; g = _g; b = _b;
- QColor::setRgb(r, g, b);
- QColor::hsv(&h, &s, &v);
+ TQColor::setRgb(r, g, b);
+ TQColor::hsv(&h, &s, &v);
}
void
@@ -176,15 +176,15 @@ KColor::hsv(int *_h, int *_s, int *_v) const
}
-static QColor *standardPalette = 0;
-static KStaticDeleter<QColor> spd;
+static TQColor *standardPalette = 0;
+static KStaticDeleter<TQColor> spd;
static void createStandardPalette()
{
if ( standardPalette )
return;
- spd.setObject(standardPalette, new QColor [STANDARD_PAL_SIZE], true/*array*/);
+ spd.setObject(standardPalette, new TQColor [STANDARD_PAL_SIZE], true/*array*/);
int i = 0;
@@ -208,7 +208,7 @@ static void createStandardPalette()
}
-KHSSelector::KHSSelector( QWidget *parent, const char *name )
+KHSSelector::KHSSelector( TQWidget *parent, const char *name )
: KXYSelector( parent, name )
{
setRange( 0, 0, 359, 255 );
@@ -219,21 +219,21 @@ void KHSSelector::updateContents()
drawPalette(&pixmap);
}
-void KHSSelector::resizeEvent( QResizeEvent * )
+void KHSSelector::resizeEvent( TQResizeEvent * )
{
updateContents();
}
-void KHSSelector::drawContents( QPainter *painter )
+void KHSSelector::drawContents( TQPainter *painter )
{
painter->drawPixmap( contentsRect().x(), contentsRect().y(), pixmap );
}
-void KHSSelector::drawPalette( QPixmap *pixmap )
+void KHSSelector::drawPalette( TQPixmap *pixmap )
{
int xSize = contentsRect().width(), ySize = contentsRect().height();
- QImage image( xSize, ySize, 32 );
- QColor col;
+ TQImage image( xSize, ySize, 32 );
+ TQColor col;
int h, s;
uint *p;
@@ -248,7 +248,7 @@ void KHSSelector::drawPalette( QPixmap *pixmap )
}
}
- if ( QColor::numBitPlanes() <= 8 )
+ if ( TQColor::numBitPlanes() <= 8 )
{
createStandardPalette();
KImageEffect::dither( image, standardPalette, STANDARD_PAL_SIZE );
@@ -259,19 +259,19 @@ void KHSSelector::drawPalette( QPixmap *pixmap )
//-----------------------------------------------------------------------------
-KValueSelector::KValueSelector( QWidget *parent, const char *name )
+KValueSelector::KValueSelector( TQWidget *parent, const char *name )
: KSelector( KSelector::Vertical, parent, name ), _hue(0), _sat(0)
{
setRange( 0, 255 );
- pixmap.setOptimization( QPixmap::BestOptim );
+ pixmap.setOptimization( TQPixmap::BestOptim );
}
-KValueSelector::KValueSelector(Orientation o, QWidget *parent, const char *name
+KValueSelector::KValueSelector(Orientation o, TQWidget *parent, const char *name
)
: KSelector( o, parent, name), _hue(0), _sat(0)
{
setRange( 0, 255 );
- pixmap.setOptimization( QPixmap::BestOptim );
+ pixmap.setOptimization( TQPixmap::BestOptim );
}
void KValueSelector::updateContents()
@@ -279,21 +279,21 @@ void KValueSelector::updateContents()
drawPalette(&pixmap);
}
-void KValueSelector::resizeEvent( QResizeEvent * )
+void KValueSelector::resizeEvent( TQResizeEvent * )
{
updateContents();
}
-void KValueSelector::drawContents( QPainter *painter )
+void KValueSelector::drawContents( TQPainter *painter )
{
painter->drawPixmap( contentsRect().x(), contentsRect().y(), pixmap );
}
-void KValueSelector::drawPalette( QPixmap *pixmap )
+void KValueSelector::drawPalette( TQPixmap *pixmap )
{
int xSize = contentsRect().width(), ySize = contentsRect().height();
- QImage image( xSize, ySize, 32 );
- QColor col;
+ TQImage image( xSize, ySize, 32 );
+ TQColor col;
uint *p;
QRgb rgb;
@@ -324,7 +324,7 @@ void KValueSelector::drawPalette( QPixmap *pixmap )
}
}
- if ( QColor::numBitPlanes() <= 8 )
+ if ( TQColor::numBitPlanes() <= 8 )
{
createStandardPalette();
KImageEffect::dither( image, standardPalette, STANDARD_PAL_SIZE );
@@ -334,16 +334,16 @@ void KValueSelector::drawPalette( QPixmap *pixmap )
//-----------------------------------------------------------------------------
-KColorCells::KColorCells( QWidget *parent, int rows, int cols )
- : QGridView( parent )
+KColorCells::KColorCells( TQWidget *parent, int rows, int cols )
+ : TQGridView( parent )
{
shade = true;
setNumRows( rows );
setNumCols( cols );
- colors = new QColor [ rows * cols ];
+ colors = new TQColor [ rows * cols ];
for ( int i = 0; i < rows * cols; i++ )
- colors[i] = QColor();
+ colors[i] = TQColor();
selected = 0;
inMouse = false;
@@ -362,15 +362,15 @@ KColorCells::~KColorCells()
delete [] colors;
}
-void KColorCells::setColor( int colNum, const QColor &col )
+void KColorCells::setColor( int colNum, const TQColor &col )
{
colors[colNum] = col;
updateCell( colNum/numCols(), colNum%numCols() );
}
-void KColorCells::paintCell( QPainter *painter, int row, int col )
+void KColorCells::paintCell( TQPainter *painter, int row, int col )
{
- QBrush brush;
+ TQBrush brush;
int w = 1;
if (shade)
@@ -379,7 +379,7 @@ void KColorCells::paintCell( QPainter *painter, int row, int col )
cellHeight()-2, colorGroup(), true, 1, &brush );
w = 2;
}
- QColor color = colors[ row * numCols() + col ];
+ TQColor color = colors[ row * numCols() + col ];
if (!color.isValid())
{
if (!shade) return;
@@ -387,26 +387,26 @@ void KColorCells::paintCell( QPainter *painter, int row, int col )
}
painter->setPen( color );
- painter->setBrush( QBrush( color ) );
+ painter->setBrush( TQBrush( color ) );
painter->drawRect( w, w, cellWidth()-w*2, cellHeight()-w*2 );
if ( row * numCols() + col == selected )
painter->drawWinFocusRect( w, w, cellWidth()-w*2, cellHeight()-w*2 );
}
-void KColorCells::resizeEvent( QResizeEvent * )
+void KColorCells::resizeEvent( TQResizeEvent * )
{
setCellWidth( width() / numCols() );
setCellHeight( height() / numRows() );
}
-void KColorCells::mousePressEvent( QMouseEvent *e )
+void KColorCells::mousePressEvent( TQMouseEvent *e )
{
inMouse = true;
mPos = e->pos();
}
-int KColorCells::posToCell(const QPoint &pos, bool ignoreBorders)
+int KColorCells::posToCell(const TQPoint &pos, bool ignoreBorders)
{
int row = pos.y() / cellHeight();
int col = pos.x() / cellWidth();
@@ -424,7 +424,7 @@ int KColorCells::posToCell(const QPoint &pos, bool ignoreBorders)
return cell;
}
-void KColorCells::mouseMoveEvent( QMouseEvent *e )
+void KColorCells::mouseMoveEvent( TQMouseEvent *e )
{
if( !(e->state() & LeftButton)) return;
@@ -443,21 +443,21 @@ void KColorCells::mouseMoveEvent( QMouseEvent *e )
}
}
-void KColorCells::dragEnterEvent( QDragEnterEvent *event)
+void KColorCells::dragEnterEvent( TQDragEnterEvent *event)
{
event->accept( acceptDrags && KColorDrag::canDecode( event));
}
-void KColorCells::dropEvent( QDropEvent *event)
+void KColorCells::dropEvent( TQDropEvent *event)
{
- QColor c;
+ TQColor c;
if( KColorDrag::decode( event, c)) {
int cell = posToCell(event->pos(), true);
setColor(cell,c);
}
}
-void KColorCells::mouseReleaseEvent( QMouseEvent *e )
+void KColorCells::mouseReleaseEvent( TQMouseEvent *e )
{
int cell = posToCell(mPos);
int currentCell = posToCell(e->pos());
@@ -480,7 +480,7 @@ void KColorCells::mouseReleaseEvent( QMouseEvent *e )
emit colorSelected( cell );
}
-void KColorCells::mouseDoubleClickEvent( QMouseEvent * /*e*/ )
+void KColorCells::mouseDoubleClickEvent( TQMouseEvent * /*e*/ )
{
int cell = posToCell(mPos);
@@ -491,9 +491,9 @@ void KColorCells::mouseDoubleClickEvent( QMouseEvent * /*e*/ )
//-----------------------------------------------------------------------------
-KColorPatch::KColorPatch( QWidget *parent ) : QFrame( parent )
+KColorPatch::KColorPatch( TQWidget *parent ) : TQFrame( parent )
{
- setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
colContext = 0;
setAcceptDrops( true);
}
@@ -501,33 +501,33 @@ KColorPatch::KColorPatch( QWidget *parent ) : QFrame( parent )
KColorPatch::~KColorPatch()
{
if ( colContext )
- QColor::destroyAllocContext( colContext );
+ TQColor::destroyAllocContext( colContext );
}
-void KColorPatch::setColor( const QColor &col )
+void KColorPatch::setColor( const TQColor &col )
{
if ( colContext )
- QColor::destroyAllocContext( colContext );
- colContext = QColor::enterAllocContext();
+ TQColor::destroyAllocContext( colContext );
+ colContext = TQColor::enterAllocContext();
color.setRgb( col.rgb() );
color.alloc();
- QColor::leaveAllocContext();
+ TQColor::leaveAllocContext();
- QPainter painter;
+ TQPainter painter;
painter.begin( this );
drawContents( &painter );
painter.end();
}
-void KColorPatch::drawContents( QPainter *painter )
+void KColorPatch::drawContents( TQPainter *painter )
{
painter->setPen( color );
- painter->setBrush( QBrush( color ) );
+ painter->setBrush( TQBrush( color ) );
painter->drawRect( contentsRect() );
}
-void KColorPatch::mouseMoveEvent( QMouseEvent *e )
+void KColorPatch::mouseMoveEvent( TQMouseEvent *e )
{
// Drag color object
if( !(e->state() & LeftButton)) return;
@@ -535,14 +535,14 @@ void KColorPatch::mouseMoveEvent( QMouseEvent *e )
d->dragCopy();
}
-void KColorPatch::dragEnterEvent( QDragEnterEvent *event)
+void KColorPatch::dragEnterEvent( TQDragEnterEvent *event)
{
event->accept( KColorDrag::canDecode( event));
}
-void KColorPatch::dropEvent( QDropEvent *event)
+void KColorPatch::dropEvent( TQDropEvent *event)
{
- QColor c;
+ TQColor c;
if( KColorDrag::decode( event, c)) {
setColor( c);
emit colorChanged( c);
@@ -552,18 +552,18 @@ void KColorPatch::dropEvent( QDropEvent *event)
class KPaletteTable::KPaletteTablePrivate
{
public:
- QMap<QString,QColor> m_namedColorMap;
+ TQMap<TQString,TQColor> m_namedColorMap;
};
-KPaletteTable::KPaletteTable( QWidget *parent, int minWidth, int cols)
- : QWidget( parent ), cells(0), mPalette(0), mMinWidth(minWidth), mCols(cols)
+KPaletteTable::KPaletteTable( TQWidget *parent, int minWidth, int cols)
+ : TQWidget( parent ), cells(0), mPalette(0), mMinWidth(minWidth), mCols(cols)
{
d = new KPaletteTablePrivate;
i18n_namedColors = i18n("Named Colors");
- QStringList diskPaletteList = KPalette::getPaletteList();
- QStringList paletteList;
+ TQStringList diskPaletteList = KPalette::getPaletteList();
+ TQStringList paletteList;
// We must replace the untranslated file names by translate names (of course only for KDE's standard palettes)
for ( int i = 0; colorPaletteName[i].m_fileName; ++i )
@@ -574,19 +574,19 @@ KPaletteTable::KPaletteTable( QWidget *parent, int minWidth, int cols)
paletteList += diskPaletteList;
paletteList.append( i18n_namedColors );
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
- combo = new QComboBox( false, this );
+ combo = new TQComboBox( false, this );
combo->insertStringList( paletteList );
layout->addWidget(combo);
- sv = new QScrollView( this );
- QSize cellSize = QSize( mMinWidth, 120);
- sv->setHScrollBarMode( QScrollView::AlwaysOff);
- sv->setVScrollBarMode( QScrollView::AlwaysOn);
- QSize minSize = QSize(sv->verticalScrollBar()->width(), 0);
- minSize += QSize(sv->frameWidth(), 0);
- minSize += QSize(cellSize);
+ sv = new TQScrollView( this );
+ TQSize cellSize = TQSize( mMinWidth, 120);
+ sv->setHScrollBarMode( TQScrollView::AlwaysOff);
+ sv->setVScrollBarMode( TQScrollView::AlwaysOn);
+ TQSize minSize = TQSize(sv->verticalScrollBar()->width(), 0);
+ minSize += TQSize(sv->frameWidth(), 0);
+ minSize += TQSize(cellSize);
sv->setFixedSize(minSize);
layout->addWidget(sv);
@@ -594,12 +594,12 @@ KPaletteTable::KPaletteTable( QWidget *parent, int minWidth, int cols)
mNamedColorList->setFixedSize(minSize);
mNamedColorList->hide();
layout->addWidget(mNamedColorList);
- connect( mNamedColorList, SIGNAL(highlighted( const QString & )),
- this, SLOT( slotColorTextSelected( const QString & )) );
+ connect( mNamedColorList, TQT_SIGNAL(highlighted( const TQString & )),
+ this, TQT_SLOT( slotColorTextSelected( const TQString & )) );
setFixedSize( sizeHint());
- connect( combo, SIGNAL(activated(const QString &)),
- this, SLOT(slotSetPalette( const QString &)));
+ connect( combo, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(slotSetPalette( const TQString &)));
}
KPaletteTable::~KPaletteTable()
@@ -654,14 +654,14 @@ KPaletteTable::readNamedColor( void )
const char * const *path = namedColorFilePath();
for( int i=0; path[i]; ++i )
{
- QFile paletteFile( path[i] );
+ TQFile paletteFile( path[i] );
if( !paletteFile.open( IO_ReadOnly ) )
{
continue;
}
- QString line;
- QStringList list;
+ TQString line;
+ TQStringList list;
while( paletteFile.readLine( line, 100 ) != -1 )
{
int red, green, blue;
@@ -673,17 +673,17 @@ KPaletteTable::readNamedColor( void )
// Remove duplicates. Every name with a space and every name
// that start with "gray".
//
- QString name = line.mid(pos).stripWhiteSpace();
+ TQString name = line.mid(pos).stripWhiteSpace();
if( name.isNull() || name.find(' ') != -1 ||
name.find( "gray" ) != -1 || name.find( "grey" ) != -1 )
{
continue;
}
- const QColor color ( red, green, blue );
+ const TQColor color ( red, green, blue );
if ( color.isValid() )
{
- const QString colorName( i18n("color", name.latin1() ) );
+ const TQString colorName( i18n("color", name.latin1() ) );
list.append( colorName );
d->m_namedColorMap[ colorName ] = color;
}
@@ -704,7 +704,7 @@ KPaletteTable::readNamedColor( void )
// preventing the real dialog to become visible until the
// error dialog box is removed (== bad UI).
//
- QTimer::singleShot( 10, this, SLOT(slotShowNamedColorReadError()) );
+ TQTimer::singleShot( 10, this, TQT_SLOT(slotShowNamedColorReadError()) );
}
}
@@ -714,7 +714,7 @@ KPaletteTable::slotShowNamedColorReadError( void )
{
if( mNamedColorList->count() == 0 )
{
- QString msg = i18n(""
+ TQString msg = i18n(""
"Unable to read X11 RGB color strings. The following "
"file location(s) were examined:\n");
@@ -740,7 +740,7 @@ KPaletteTable::slotShowNamedColorReadError( void )
// new color setting. It is only used by the combobox widget.
//
void
-KPaletteTable::slotSetPalette( const QString &_paletteName )
+KPaletteTable::slotSetPalette( const TQString &_paletteName )
{
setPalette( _paletteName );
if( mNamedColorList->isVisible() )
@@ -757,9 +757,9 @@ KPaletteTable::slotSetPalette( const QString &_paletteName )
void
-KPaletteTable::setPalette( const QString &_paletteName )
+KPaletteTable::setPalette( const TQString &_paletteName )
{
- QString paletteName( _paletteName);
+ TQString paletteName( _paletteName);
if (paletteName.isEmpty())
paletteName = i18n_recentColors;
@@ -825,16 +825,16 @@ KPaletteTable::setPalette( const QString &_paletteName )
cells = new KColorCells( sv->viewport(), rows, mCols);
cells->setShading(false);
cells->setAcceptDrags(false);
- QSize cellSize = QSize( mMinWidth, mMinWidth * rows / mCols);
+ TQSize cellSize = TQSize( mMinWidth, mMinWidth * rows / mCols);
cells->setFixedSize( cellSize );
for( int i = 0; i < mPalette->nrColors(); i++)
{
cells->setColor( i, mPalette->color(i) );
}
- connect( cells, SIGNAL( colorSelected( int ) ),
- SLOT( slotColorCellSelected( int ) ) );
- connect( cells, SIGNAL( colorDoubleClicked( int ) ),
- SLOT( slotColorCellDoubleClicked( int ) ) );
+ connect( cells, TQT_SIGNAL( colorSelected( int ) ),
+ TQT_SLOT( slotColorCellSelected( int ) ) );
+ connect( cells, TQT_SIGNAL( colorDoubleClicked( int ) ),
+ TQT_SLOT( slotColorCellDoubleClicked( int ) ) );
sv->addChild( cells );
cells->show();
sv->updateScrollBars();
@@ -862,14 +862,14 @@ KPaletteTable::slotColorCellDoubleClicked( int col )
void
-KPaletteTable::slotColorTextSelected( const QString &colorText )
+KPaletteTable::slotColorTextSelected( const TQString &colorText )
{
emit colorSelected( d->m_namedColorMap[ colorText ], colorText );
}
void
-KPaletteTable::addToCustomColors( const QColor &color)
+KPaletteTable::addToCustomColors( const TQColor &color)
{
setPalette(i18n( "palette name", colorPaletteName[ customColorIndex ].m_displayName ));
mPalette->addColor( color );
@@ -880,7 +880,7 @@ KPaletteTable::addToCustomColors( const QColor &color)
}
void
-KPaletteTable::addToRecentColors( const QColor &color)
+KPaletteTable::addToRecentColors( const TQColor &color)
{
//
// 2000-02-12 Espen Sand.
@@ -907,13 +907,13 @@ KPaletteTable::addToRecentColors( const QColor &color)
class KColorDialog::KColorDialogPrivate {
public:
KPaletteTable *table;
- QString originalPalette;
+ TQString originalPalette;
bool bRecursion;
bool bEditRgb;
bool bEditHsv;
bool bEditHtml;
bool bColorPicking;
- QLabel *colorName;
+ TQLabel *colorName;
KLineEdit *htmlName;
KColorSpinBox *hedit;
KColorSpinBox *sedit;
@@ -925,9 +925,9 @@ public:
KHSSelector *hsSelector;
KPalette *palette;
KValueSelector *valuePal;
- QVBoxLayout* l_right;
- QGridLayout* tl_layout;
- QCheckBox *cbDefaultColor;
+ TQVBoxLayout* l_right;
+ TQGridLayout* tl_layout;
+ TQCheckBox *cbDefaultColor;
KColor defaultColor;
KColor selColor;
#ifdef Q_WS_X11
@@ -936,7 +936,7 @@ public:
};
-KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
+KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal )
:KDialogBase( parent, name, modal, i18n("Select Color"),
modal ? Ok|Cancel : Close,
Ok, true )
@@ -948,18 +948,18 @@ KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
d->oldfilter = 0;
#endif
d->cbDefaultColor = 0L;
- connect( this, SIGNAL(okClicked(void)),this,SLOT(slotWriteSettings(void)));
- connect( this, SIGNAL(closeClicked(void)),this,SLOT(slotWriteSettings(void)));
+ connect( this, TQT_SIGNAL(okClicked(void)),this,TQT_SLOT(slotWriteSettings(void)));
+ connect( this, TQT_SIGNAL(closeClicked(void)),this,TQT_SLOT(slotWriteSettings(void)));
- QLabel *label;
+ TQLabel *label;
//
// Create the top level page and its layout
//
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget( page );
- QGridLayout *tl_layout = new QGridLayout( page, 3, 3, 0, spacingHint() );
+ TQGridLayout *tl_layout = new TQGridLayout( page, 3, 3, 0, spacingHint() );
d->tl_layout = tl_layout;
tl_layout->addColSpacing( 1, spacingHint() * 2 );
@@ -967,20 +967,20 @@ KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
// the more complicated part: the left side
// add a V-box
//
- QVBoxLayout *l_left = new QVBoxLayout();
+ TQVBoxLayout *l_left = new TQVBoxLayout();
tl_layout->addLayout(l_left, 0, 0);
//
// add a H-Box for the XY-Selector and a grid for the
// entry fields
//
- QHBoxLayout *l_ltop = new QHBoxLayout();
+ TQHBoxLayout *l_ltop = new TQHBoxLayout();
l_left->addLayout(l_ltop);
// a little space between
l_left->addSpacing(10);
- QGridLayout *l_lbot = new QGridLayout(3, 6);
+ TQGridLayout *l_lbot = new TQGridLayout(3, 6);
l_left->addLayout(l_lbot);
//
@@ -989,75 +989,75 @@ KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
d->hsSelector = new KHSSelector( page );
d->hsSelector->setMinimumSize(140, 70);
l_ltop->addWidget(d->hsSelector, 8);
- connect( d->hsSelector, SIGNAL( valueChanged( int, int ) ),
- SLOT( slotHSChanged( int, int ) ) );
+ connect( d->hsSelector, TQT_SIGNAL( valueChanged( int, int ) ),
+ TQT_SLOT( slotHSChanged( int, int ) ) );
d->valuePal = new KValueSelector( page );
d->valuePal->setMinimumSize(26, 70);
l_ltop->addWidget(d->valuePal, 1);
- connect( d->valuePal, SIGNAL( valueChanged( int ) ),
- SLOT( slotVChanged( int ) ) );
+ connect( d->valuePal, TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( slotVChanged( int ) ) );
//
// add the HSV fields
//
- label = new QLabel( i18n("H:"), page );
+ label = new TQLabel( i18n("H:"), page );
label->setAlignment(AlignRight | AlignVCenter);
l_lbot->addWidget(label, 0, 2);
d->hedit = new KColorSpinBox( 0, 359, 1, page );
- d->hedit->setValidator( new QIntValidator( d->hedit ) );
+ d->hedit->setValidator( new TQIntValidator( d->hedit ) );
l_lbot->addWidget(d->hedit, 0, 3);
- connect( d->hedit, SIGNAL( valueChanged(int) ),
- SLOT( slotHSVChanged() ) );
+ connect( d->hedit, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotHSVChanged() ) );
- label = new QLabel( i18n("S:"), page );
+ label = new TQLabel( i18n("S:"), page );
label->setAlignment(AlignRight | AlignVCenter);
l_lbot->addWidget(label, 1, 2);
d->sedit = new KColorSpinBox( 0, 255, 1, page );
- d->sedit->setValidator( new QIntValidator( d->sedit ) );
+ d->sedit->setValidator( new TQIntValidator( d->sedit ) );
l_lbot->addWidget(d->sedit, 1, 3);
- connect( d->sedit, SIGNAL( valueChanged(int) ),
- SLOT( slotHSVChanged() ) );
+ connect( d->sedit, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotHSVChanged() ) );
- label = new QLabel( i18n("V:"), page );
+ label = new TQLabel( i18n("V:"), page );
label->setAlignment(AlignRight | AlignVCenter);
l_lbot->addWidget(label, 2, 2);
d->vedit = new KColorSpinBox( 0, 255, 1, page );
- d->vedit->setValidator( new QIntValidator( d->vedit ) );
+ d->vedit->setValidator( new TQIntValidator( d->vedit ) );
l_lbot->addWidget(d->vedit, 2, 3);
- connect( d->vedit, SIGNAL( valueChanged(int) ),
- SLOT( slotHSVChanged() ) );
+ connect( d->vedit, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotHSVChanged() ) );
//
// add the RGB fields
//
- label = new QLabel( i18n("R:"), page );
+ label = new TQLabel( i18n("R:"), page );
label->setAlignment(AlignRight | AlignVCenter);
l_lbot->addWidget(label, 0, 4);
d->redit = new KColorSpinBox( 0, 255, 1, page );
- d->redit->setValidator( new QIntValidator( d->redit ) );
+ d->redit->setValidator( new TQIntValidator( d->redit ) );
l_lbot->addWidget(d->redit, 0, 5);
- connect( d->redit, SIGNAL( valueChanged(int) ),
- SLOT( slotRGBChanged() ) );
+ connect( d->redit, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotRGBChanged() ) );
- label = new QLabel( i18n("G:"), page );
+ label = new TQLabel( i18n("G:"), page );
label->setAlignment(AlignRight | AlignVCenter);
l_lbot->addWidget( label, 1, 4);
d->gedit = new KColorSpinBox( 0, 255,1, page );
- d->gedit->setValidator( new QIntValidator( d->gedit ) );
+ d->gedit->setValidator( new TQIntValidator( d->gedit ) );
l_lbot->addWidget(d->gedit, 1, 5);
- connect( d->gedit, SIGNAL( valueChanged(int) ),
- SLOT( slotRGBChanged() ) );
+ connect( d->gedit, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotRGBChanged() ) );
- label = new QLabel( i18n("B:"), page );
+ label = new TQLabel( i18n("B:"), page );
label->setAlignment(AlignRight | AlignVCenter);
l_lbot->addWidget(label, 2, 4);
d->bedit = new KColorSpinBox( 0, 255, 1, page );
- d->bedit->setValidator( new QIntValidator( d->bedit ) );
+ d->bedit->setValidator( new TQIntValidator( d->bedit ) );
l_lbot->addWidget(d->bedit, 2, 5);
- connect( d->bedit, SIGNAL( valueChanged(int) ),
- SLOT( slotRGBChanged() ) );
+ connect( d->bedit, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotRGBChanged() ) );
//
// the entry fields should be wide enough to hold 8888888
@@ -1083,13 +1083,13 @@ KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
d->table = new KPaletteTable( page );
d->l_right->addWidget(d->table, 10);
- connect( d->table, SIGNAL( colorSelected( const QColor &, const QString & ) ),
- SLOT( slotColorSelected( const QColor &, const QString & ) ) );
+ connect( d->table, TQT_SIGNAL( colorSelected( const TQColor &, const TQString & ) ),
+ TQT_SLOT( slotColorSelected( const TQColor &, const TQString & ) ) );
connect(
d->table,
- SIGNAL( colorDoubleClicked( const QColor &, const QString & ) ),
- SLOT( slotColorDoubleClicked( const QColor &, const QString & ) )
+ TQT_SIGNAL( colorDoubleClicked( const TQColor &, const TQString & ) ),
+ TQT_SLOT( slotColorDoubleClicked( const TQColor &, const TQString & ) )
);
// Store the default value for saving time.
d->originalPalette = d->table->palette();
@@ -1099,23 +1099,23 @@ KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
//
d->l_right->addSpacing(10);
- QHBoxLayout *l_hbox = new QHBoxLayout( d->l_right );
+ TQHBoxLayout *l_hbox = new TQHBoxLayout( d->l_right );
//
// The add to custom colors button
//
- QPushButton *button = new QPushButton( page );
+ TQPushButton *button = new TQPushButton( page );
button->setText(i18n("&Add to Custom Colors"));
l_hbox->addWidget(button, 0, AlignLeft);
- connect( button, SIGNAL( clicked()), SLOT( slotAddToCustomColors()));
+ connect( button, TQT_SIGNAL( clicked()), TQT_SLOT( slotAddToCustomColors()));
//
// The color picker button
//
- button = new QPushButton( page );
+ button = new TQPushButton( page );
button->setPixmap( BarIcon("colorpicker"));
l_hbox->addWidget(button, 0, AlignHCenter );
- connect( button, SIGNAL( clicked()), SLOT( slotColorPicker()));
+ connect( button, TQT_SIGNAL( clicked()), TQT_SLOT( slotColorPicker()));
//
// a little space between
@@ -1125,36 +1125,36 @@ KColorDialog::KColorDialog( QWidget *parent, const char *name, bool modal )
//
// and now the entry fields and the patch (=colored box)
//
- QGridLayout *l_grid = new QGridLayout( d->l_right, 2, 3);
+ TQGridLayout *l_grid = new TQGridLayout( d->l_right, 2, 3);
l_grid->setColStretch(2, 1);
- label = new QLabel( page );
+ label = new TQLabel( page );
label->setText(i18n("Name:"));
l_grid->addWidget(label, 0, 1, AlignLeft);
- d->colorName = new QLabel( page );
+ d->colorName = new TQLabel( page );
l_grid->addWidget(d->colorName, 0, 2, AlignLeft);
- label = new QLabel( page );
+ label = new TQLabel( page );
label->setText(i18n("HTML:"));
l_grid->addWidget(label, 1, 1, AlignLeft);
d->htmlName = new KLineEdit( page );
- d->htmlName->setMaxLength( 13 ); // Qt's QColor allows 12 hexa-digits
+ d->htmlName->setMaxLength( 13 ); // Qt's TQColor allows 12 hexa-digits
d->htmlName->setText("#FFFFFF"); // But HTML uses only 6, so do not worry about the size
- w = d->htmlName->fontMetrics().width(QString::fromLatin1("#DDDDDDD"));
+ w = d->htmlName->fontMetrics().width(TQString::fromLatin1("#DDDDDDD"));
d->htmlName->setFixedWidth(w);
l_grid->addWidget(d->htmlName, 1, 2, AlignLeft);
- connect( d->htmlName, SIGNAL( textChanged(const QString &) ),
- SLOT( slotHtmlChanged() ) );
+ connect( d->htmlName, TQT_SIGNAL( textChanged(const TQString &) ),
+ TQT_SLOT( slotHtmlChanged() ) );
d->patch = new KColorPatch( page );
d->patch->setFixedSize(48, 48);
l_grid->addMultiCellWidget(d->patch, 0, 1, 0, 0, AlignHCenter | AlignVCenter);
- connect( d->patch, SIGNAL( colorChanged( const QColor&)),
- SLOT( setColor( const QColor&)));
+ connect( d->patch, TQT_SIGNAL( colorChanged( const TQColor&)),
+ TQT_SLOT( setColor( const TQColor&)));
tl_layout->activate();
page->setMinimumSize( page->sizeHint() );
@@ -1185,16 +1185,16 @@ KColorDialog::~KColorDialog()
}
bool
-KColorDialog::eventFilter( QObject *obj, QEvent *ev )
+KColorDialog::eventFilter( TQObject *obj, TQEvent *ev )
{
if ((obj == d->htmlName) || (obj == d->hsSelector))
switch(ev->type())
{
- case QEvent::DragEnter:
- case QEvent::DragMove:
- case QEvent::DragLeave:
- case QEvent::Drop:
- case QEvent::DragResponse:
+ case TQEvent::DragEnter:
+ case TQEvent::DragMove:
+ case TQEvent::DragLeave:
+ case TQEvent::Drop:
+ case TQEvent::DragResponse:
qApp->sendEvent(d->patch, ev);
return true;
default:
@@ -1204,7 +1204,7 @@ KColorDialog::eventFilter( QObject *obj, QEvent *ev )
}
void
-KColorDialog::setDefaultColor( const QColor& col )
+KColorDialog::setDefaultColor( const TQColor& col )
{
if ( !d->cbDefaultColor )
{
@@ -1216,7 +1216,7 @@ KColorDialog::setDefaultColor( const QColor& col )
//
// and the "default color" checkbox, under all items on the right side
//
- d->cbDefaultColor = new QCheckBox( i18n( "Default color" ), mainWidget() );
+ d->cbDefaultColor = new TQCheckBox( i18n( "Default color" ), mainWidget() );
d->cbDefaultColor->setChecked(true);
d->l_right->addWidget( d->cbDefaultColor );
@@ -1226,7 +1226,7 @@ KColorDialog::setDefaultColor( const QColor& col )
mainWidget()->setMinimumSize( mainWidget()->sizeHint() );
disableResize();
- connect( d->cbDefaultColor, SIGNAL( clicked() ), SLOT( slotDefaultColorClicked() ) );
+ connect( d->cbDefaultColor, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDefaultColorClicked() ) );
}
d->defaultColor = col;
@@ -1234,7 +1234,7 @@ KColorDialog::setDefaultColor( const QColor& col )
slotDefaultColorClicked();
}
-QColor KColorDialog::defaultColor() const
+TQColor KColorDialog::defaultColor() const
{
return d->defaultColor;
}
@@ -1247,7 +1247,7 @@ void KColorDialog::slotDefaultColorClicked()
showColor( d->selColor, i18n( "-default-" ) );
} else
{
- showColor( d->selColor, QString::null );
+ showColor( d->selColor, TQString::null );
}
}
@@ -1256,7 +1256,7 @@ KColorDialog::readSettings()
{
KConfigGroup group( KGlobal::config(), "Colors" );
- QString palette = group.readEntry("CurrentPalette");
+ TQString palette = group.readEntry("CurrentPalette");
d->table->setPalette(palette);
}
@@ -1265,7 +1265,7 @@ KColorDialog::slotWriteSettings()
{
KConfigGroup group( KGlobal::config(), "Colors" );
- QString palette = d->table->palette();
+ TQString palette = d->table->palette();
if (!group.hasDefault("CurrentPalette") &&
(d->table->palette() == d->originalPalette))
{
@@ -1281,13 +1281,13 @@ QColor
KColorDialog::color() const
{
if ( d->cbDefaultColor && d->cbDefaultColor->isChecked() )
- return QColor();
+ return TQColor();
if ( d->selColor.isValid() )
d->table->addToRecentColors( d->selColor );
return d->selColor;
}
-void KColorDialog::setColor( const QColor &col )
+void KColorDialog::setColor( const TQColor &col )
{
_setColor( col );
}
@@ -1295,7 +1295,7 @@ void KColorDialog::setColor( const QColor &col )
//
// static function to display dialog and return color
//
-int KColorDialog::getColor( QColor &theColor, QWidget *parent )
+int KColorDialog::getColor( TQColor &theColor, TQWidget *parent )
{
KColorDialog dlg( parent, "Color Selector", true );
if ( theColor.isValid() )
@@ -1313,7 +1313,7 @@ int KColorDialog::getColor( QColor &theColor, QWidget *parent )
//
// static function to display dialog and return color
//
-int KColorDialog::getColor( QColor &theColor, const QColor& defaultCol, QWidget *parent )
+int KColorDialog::getColor( TQColor &theColor, const TQColor& defaultCol, TQWidget *parent )
{
KColorDialog dlg( parent, "Color Selector", true );
dlg.setDefaultColor( defaultCol );
@@ -1348,7 +1348,7 @@ void KColorDialog::slotHtmlChanged( void )
{
if (d->bRecursion || d->htmlName->text().isEmpty()) return;
- QString strColor( d->htmlName->text() );
+ TQString strColor( d->htmlName->text() );
// Assume that a user does not want to type the # all the time
if ( strColor[0] != '#' )
@@ -1360,7 +1360,7 @@ void KColorDialog::slotHtmlChanged( void )
d->htmlName->blockSignals(signalsblocked);
}
- const QColor color( strColor );
+ const TQColor color( strColor );
if ( color.isValid() )
{
@@ -1409,7 +1409,7 @@ void KColorDialog::slotVChanged( int v )
_setColor( col );
}
-void KColorDialog::slotColorSelected( const QColor &color )
+void KColorDialog::slotColorSelected( const TQColor &color )
{
_setColor( color );
}
@@ -1419,22 +1419,22 @@ void KColorDialog::slotAddToCustomColors( )
d->table->addToCustomColors( d->selColor );
}
-void KColorDialog::slotColorSelected( const QColor &color, const QString &name )
+void KColorDialog::slotColorSelected( const TQColor &color, const TQString &name )
{
_setColor( color, name);
}
void KColorDialog::slotColorDoubleClicked
(
- const QColor & color,
- const QString & name
+ const TQColor & color,
+ const TQString & name
)
{
_setColor(color, name);
accept();
}
-void KColorDialog::_setColor(const KColor &color, const QString &name)
+void KColorDialog::_setColor(const KColor &color, const TQString &name)
{
if (color.isValid())
{
@@ -1455,7 +1455,7 @@ void KColorDialog::_setColor(const KColor &color, const QString &name)
}
// show but don't set into selColor, nor emit colorSelected
-void KColorDialog::showColor( const KColor &color, const QString &name )
+void KColorDialog::showColor( const KColor &color, const TQString &name )
{
d->bRecursion = true;
@@ -1484,16 +1484,16 @@ void KColorDialog::showColor( const KColor &color, const QString &name )
}
-static QWidget *kde_color_dlg_widget = 0;
+static TQWidget *kde_color_dlg_widget = 0;
#ifdef Q_WS_X11
static int kde_color_dlg_handler(XEvent *event)
{
if (event->type == ButtonRelease)
{
- QMouseEvent e( QEvent::MouseButtonRelease, QPoint(),
- QPoint(event->xmotion.x_root, event->xmotion.y_root) , 0, 0 );
- QApplication::sendEvent( kde_color_dlg_widget, &e );
+ TQMouseEvent e( TQEvent::MouseButtonRelease, TQPoint(),
+ TQPoint(event->xmotion.x_root, event->xmotion.y_root) , 0, 0 );
+ TQApplication::sendEvent( kde_color_dlg_widget, &e );
return true;
}
return false;
@@ -1512,7 +1512,7 @@ KColorDialog::slotColorPicker()
}
void
-KColorDialog::mouseReleaseEvent( QMouseEvent *e )
+KColorDialog::mouseReleaseEvent( TQMouseEvent *e )
{
if (d->bColorPicking)
{
@@ -1530,16 +1530,16 @@ KColorDialog::mouseReleaseEvent( QMouseEvent *e )
}
QColor
-KColorDialog::grabColor(const QPoint &p)
+KColorDialog::grabColor(const TQPoint &p)
{
- QWidget *desktop = QApplication::desktop();
- QPixmap pm = QPixmap::grabWindow( desktop->winId(), p.x(), p.y(), 1, 1);
- QImage i = pm.convertToImage();
+ TQWidget *desktop = TQApplication::desktop();
+ TQPixmap pm = TQPixmap::grabWindow( desktop->winId(), p.x(), p.y(), 1, 1);
+ TQImage i = pm.convertToImage();
return i.pixel(0,0);
}
void
-KColorDialog::keyPressEvent( QKeyEvent *e )
+KColorDialog::keyPressEvent( TQKeyEvent *e )
{
if (d->bColorPicking)
{
@@ -1575,7 +1575,7 @@ void KColorDialog::setHtmlEdit( const KColor &col )
if (d->bEditHtml) return;
int r, g, b;
col.rgb( &r, &g, &b );
- QString num;
+ TQString num;
num.sprintf("#%02X%02X%02X", r,g,b);
d->htmlName->setText( num );
diff --git a/kdeui/kcolordialog.h b/kdeui/kcolordialog.h
index 357efe038..57f77672c 100644
--- a/kdeui/kcolordialog.h
+++ b/kdeui/kcolordialog.h
@@ -27,13 +27,13 @@
#ifdef Q_WS_QWS
// FIXME(E): Do we need the KColorDialog extra functionality in Qt Embedded?
-#include <qcolordialog.h>
+#include <tqcolordialog.h>
#define KColorDialog QColorDialog
#else //UNIX, WIN32
#include <kdialogbase.h>
-#include <qframe.h>
-#include <qpixmap.h>
-#include <qgridview.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
+#include <tqgridview.h>
#include "kselect.h"
@@ -63,26 +63,26 @@ public:
/**
* Constructs a hue/saturation selection widget.
*/
- KHSSelector( QWidget *parent=0, const char *name=0 );
+ KHSSelector( TQWidget *parent=0, const char *name=0 );
protected:
/**
* Draws the contents of the widget on a pixmap,
* which is used for buffering.
*/
- virtual void drawPalette( QPixmap *pixmap );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void drawPalette( TQPixmap *pixmap );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Reimplemented from KXYSelector. This drawing is
* buffered in a pixmap here. As real drawing
* routine, drawPalette() is used.
*/
- virtual void drawContents( QPainter *painter );
+ virtual void drawContents( TQPainter *painter );
private:
void updateContents();
- QPixmap pixmap;
+ TQPixmap pixmap;
protected:
virtual void virtual_hook( int id, void* data );
@@ -107,11 +107,11 @@ public:
/**
* Constructs a widget for color selection.
*/
- KValueSelector( QWidget *parent=0, const char *name=0 );
+ KValueSelector( TQWidget *parent=0, const char *name=0 );
/**
* Constructs a widget for color selection with a given orientation
*/
- KValueSelector( Orientation o, QWidget *parent = 0, const char *name = 0 );
+ KValueSelector( Orientation o, TQWidget *parent = 0, const char *name = 0 );
int hue() const
{ return _hue; }
@@ -128,20 +128,20 @@ protected:
* Draws the contents of the widget on a pixmap,
* which is used for buffering.
*/
- virtual void drawPalette( QPixmap *pixmap );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void drawPalette( TQPixmap *pixmap );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Reimplemented from KSelector. The drawing is
* buffered in a pixmap here. As real drawing
* routine, drawPalette() is used.
*/
- virtual void drawContents( QPainter *painter );
+ virtual void drawContents( TQPainter *painter );
private:
int _hue;
int _sat;
- QPixmap pixmap;
+ TQPixmap pixmap;
protected:
virtual void virtual_hook( int id, void* data );
@@ -155,8 +155,8 @@ private:
* A color class that preserves both RGB and HSV values.
*
* This is
- * unlike QColor which only preserves RGB values and recalculates HSV
- * values. The QColor behavior leads to an accumulation of rounding
+ * unlike TQColor which only preserves RGB values and recalculates HSV
+ * values. The TQColor behavior leads to an accumulation of rounding
* errors when working in the HSV color space.
*
* @author Waldo Bastian <bastian@kde.org>
@@ -166,7 +166,7 @@ class KDEUI_EXPORT KColor : public QColor
public:
KColor();
KColor( const KColor &col);
- KColor( const QColor &col);
+ KColor( const TQColor &col);
KColor& operator=( const KColor& col);
@@ -199,22 +199,22 @@ class KDEUI_EXPORT KPaletteTable : public QWidget
{
Q_OBJECT
public:
- KPaletteTable( QWidget *parent, int minWidth=210, int cols = 16);
+ KPaletteTable( TQWidget *parent, int minWidth=210, int cols = 16);
~KPaletteTable();
- void addToCustomColors( const QColor &);
- void addToRecentColors( const QColor &);
- QString palette() const;
+ void addToCustomColors( const TQColor &);
+ void addToRecentColors( const TQColor &);
+ TQString palette() const;
public slots:
- void setPalette(const QString &paletteName);
+ void setPalette(const TQString &paletteName);
signals:
- void colorSelected( const QColor &, const QString & );
- void colorDoubleClicked( const QColor &, const QString & );
+ void colorSelected( const TQColor &, const TQString & );
+ void colorDoubleClicked( const TQColor &, const TQString & );
protected slots:
void slotColorCellSelected( int );
void slotColorCellDoubleClicked( int );
- void slotColorTextSelected( const QString &colorText );
- void slotSetPalette( const QString &_paletteName );
+ void slotColorTextSelected( const TQString &colorText );
+ void slotSetPalette( const TQString &_paletteName );
void slotShowNamedColorReadError( void );
protected:
@@ -222,13 +222,13 @@ protected:
protected:
/// \deprecated
- QString i18n_customColors; /// ### KDE4: remove
+ TQString i18n_customColors; /// ### KDE4: remove
/// \deprecated
- QString i18n_recentColors; /// ### KDE4: remove
- QString i18n_namedColors;
- QComboBox *combo;
+ TQString i18n_recentColors; /// ### KDE4: remove
+ TQString i18n_namedColors;
+ TQComboBox *combo;
KColorCells *cells;
- QScrollView *sv;
+ TQScrollView *sv;
KListBox *mNamedColorList;
KPalette *mPalette;
int mMinWidth;
@@ -236,7 +236,7 @@ protected:
private:
- virtual void setPalette(const QPalette& p) { QWidget::setPalette(p); }
+ virtual void setPalette(const TQPalette& p) { TQWidget::setPalette(p); }
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -254,11 +254,11 @@ class KDEUI_EXPORT KColorCells : public QGridView
{
Q_OBJECT
public:
- KColorCells( QWidget *parent, int rows, int cols );
+ KColorCells( TQWidget *parent, int rows, int cols );
~KColorCells();
- void setColor( int colNum, const QColor &col );
- QColor color( int indx ) const
+ void setColor( int colNum, const TQColor &col );
+ TQColor color( int indx ) const
{ return colors[indx]; }
int numCells() const
{ return numRows() * numCols(); }
@@ -275,20 +275,20 @@ public:
void colorDoubleClicked( int col );
protected:
- virtual void paintCell( QPainter *painter, int row, int col );
- virtual void resizeEvent( QResizeEvent * );
- virtual void mouseReleaseEvent( QMouseEvent * );
- virtual void mousePressEvent( QMouseEvent * );
- virtual void mouseMoveEvent( QMouseEvent * );
- virtual void dragEnterEvent( QDragEnterEvent *);
- virtual void dropEvent( QDropEvent *);
- virtual void mouseDoubleClickEvent( QMouseEvent * );
-
- int posToCell(const QPoint &pos, bool ignoreBorders=false);
-
- QColor *colors;
+ virtual void paintCell( TQPainter *painter, int row, int col );
+ virtual void resizeEvent( TQResizeEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
+ virtual void mouseMoveEvent( TQMouseEvent * );
+ virtual void dragEnterEvent( TQDragEnterEvent *);
+ virtual void dropEvent( TQDropEvent *);
+ virtual void mouseDoubleClickEvent( TQMouseEvent * );
+
+ int posToCell(const TQPoint &pos, bool ignoreBorders=false);
+
+ TQColor *colors;
bool inMouse;
- QPoint mPos;
+ TQPoint mPos;
int selected;
bool shade;
bool acceptDrags;
@@ -312,22 +312,22 @@ class KDEUI_EXPORT KColorPatch : public QFrame
{
Q_OBJECT
public:
- KColorPatch( QWidget *parent );
+ KColorPatch( TQWidget *parent );
virtual ~KColorPatch();
- void setColor( const QColor &col );
+ void setColor( const TQColor &col );
signals:
- void colorChanged( const QColor&);
+ void colorChanged( const TQColor&);
protected:
- virtual void drawContents( QPainter *painter );
- virtual void mouseMoveEvent( QMouseEvent * );
- virtual void dragEnterEvent( QDragEnterEvent *);
- virtual void dropEvent( QDropEvent *);
+ virtual void drawContents( TQPainter *painter );
+ virtual void mouseMoveEvent( TQMouseEvent * );
+ virtual void dragEnterEvent( TQDragEnterEvent *);
+ virtual void dropEvent( TQDropEvent *);
private:
- QColor color;
+ TQColor color;
uint pixel;
int colContext;
@@ -355,7 +355,7 @@ private:
* Example:
*
* \code
- * QColor myColor;
+ * TQColor myColor;
* int result = KColorDialog::getColor( myColor );
* if ( result == KColorDialog::Accepted )
* ...
@@ -382,7 +382,7 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
/**
* Constructs a color selection dialog.
*/
- KColorDialog( QWidget *parent = 0L, const char *name = 0L,
+ KColorDialog( TQWidget *parent = 0L, const char *name = 0L,
bool modal = false );
/**
* Destroys the color selection dialog.
@@ -392,7 +392,7 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
/**
* Returns the currently selected color.
**/
- QColor color() const;
+ TQColor color() const;
/**
* Creates a modal color dialog, let the user choose a
@@ -400,9 +400,9 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
*
* The selected color is returned in the argument @p theColor.
*
- * @returns QDialog::result().
+ * @returns TQDialog::result().
*/
- static int getColor( QColor &theColor, QWidget *parent=0L );
+ static int getColor( TQColor &theColor, TQWidget *parent=0L );
/**
* Creates a modal color dialog, lets the user choose a
@@ -412,35 +412,35 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
*
* This version takes a @p defaultColor argument, which sets the color
* selected by the "default color" checkbox. When this checkbox is checked,
- * the invalid color (QColor()) is returned into @p theColor.
+ * the invalid color (TQColor()) is returned into @p theColor.
*
- * @returns QDialog::result().
+ * @returns TQDialog::result().
*/
- static int getColor( QColor &theColor, const QColor& defaultColor, QWidget *parent=0L );
+ static int getColor( TQColor &theColor, const TQColor& defaultColor, TQWidget *parent=0L );
/**
* Gets the color from the pixel at point p on the screen.
*/
- static QColor grabColor(const QPoint &p);
+ static TQColor grabColor(const TQPoint &p);
/**
* Call this to make the dialog show a "Default Color" checkbox.
- * If this checkbox is selected, the dialog will return an "invalid" color (QColor()).
+ * If this checkbox is selected, the dialog will return an "invalid" color (TQColor()).
* This can be used to mean "the default text color", for instance,
* the one with the KDE text color on screen, but black when printing.
*/
- void setDefaultColor( const QColor& defaultCol );
+ void setDefaultColor( const TQColor& defaultCol );
/**
* @return the value passed to setDefaultColor
*/
- QColor defaultColor() const;
+ TQColor defaultColor() const;
public slots:
/**
* Preselects a color.
*/
- void setColor( const QColor &col );
+ void setColor( const TQColor &col );
signals:
/**
@@ -448,7 +448,7 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
* Connect to this to monitor the color as it as selected if you are
* not running modal.
*/
- void colorSelected( const QColor &col );
+ void colorSelected( const TQColor &col );
private slots:
void slotRGBChanged( void );
@@ -456,9 +456,9 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
void slotHtmlChanged( void );
void slotHSChanged( int, int );
void slotVChanged( int );
- void slotColorSelected( const QColor &col );
- void slotColorSelected( const QColor &col, const QString &name );
- void slotColorDoubleClicked( const QColor &col, const QString &name );
+ void slotColorSelected( const TQColor &col );
+ void slotColorSelected( const TQColor &col, const TQString &name );
+ void slotColorDoubleClicked( const TQColor &col, const TQString &name );
void slotColorPicker();
void slotAddToCustomColors();
void slotDefaultColorClicked();
@@ -476,13 +476,13 @@ class KDEUI_EXPORT KColorDialog : public KDialogBase
void setRgbEdit( const KColor &col );
void setHsvEdit( const KColor &col );
void setHtmlEdit( const KColor &col );
- void _setColor( const KColor &col, const QString &name=QString::null );
- void showColor( const KColor &color, const QString &name );
+ void _setColor( const KColor &col, const TQString &name=TQString::null );
+ void showColor( const KColor &color, const TQString &name );
protected:
- virtual void mouseReleaseEvent( QMouseEvent * );
- virtual void keyPressEvent( QKeyEvent * );
- virtual bool eventFilter( QObject *obj, QEvent *ev );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
+ virtual bool eventFilter( TQObject *obj, TQEvent *ev );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kcolordrag.cpp b/kdeui/kcolordrag.cpp
index 61eb15ba1..1c56d9ccd 100644
--- a/kdeui/kcolordrag.cpp
+++ b/kdeui/kcolordrag.cpp
@@ -17,38 +17,38 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include "kcolordrag.h"
static const char * const color_mime_string = "application/x-color";
static const char * const text_mime_string = "text/plain";
-KColorDrag::KColorDrag( const QColor &color, QWidget *dragsource,
+KColorDrag::KColorDrag( const TQColor &color, TQWidget *dragsource,
const char *name)
- : QStoredDrag( color_mime_string, dragsource, name)
+ : TQStoredDrag( color_mime_string, dragsource, name)
{
setColor( color);
}
-KColorDrag::KColorDrag( QWidget *dragsource, const char *name)
- : QStoredDrag( color_mime_string, dragsource, name)
+KColorDrag::KColorDrag( TQWidget *dragsource, const char *name)
+ : TQStoredDrag( color_mime_string, dragsource, name)
{
setColor( white );
}
void
-KColorDrag::setColor( const QColor &color)
+KColorDrag::setColor( const TQColor &color)
{
- QColorDrag tmp(color, 0, 0);
+ TQColorDrag tmp(color, 0, 0);
setEncodedData(tmp.encodedData(color_mime_string));
- QPixmap colorpix( 25, 20);
+ TQPixmap colorpix( 25, 20);
colorpix.fill( color);
- QPainter p( &colorpix );
+ TQPainter p( &colorpix );
p.setPen( black );
p.drawRect(0,0,25,20);
p.end();
- setPixmap(colorpix, QPoint(-5,-7));
+ setPixmap(colorpix, TQPoint(-5,-7));
}
const char *KColorDrag::format(int i) const
@@ -56,43 +56,43 @@ const char *KColorDrag::format(int i) const
if (i==1)
return text_mime_string;
else
- return QStoredDrag::format(i);
+ return TQStoredDrag::format(i);
}
-QByteArray KColorDrag::encodedData ( const char * m ) const
+TQByteArray KColorDrag::encodedData ( const char * m ) const
{
if (!qstrcmp(m, text_mime_string) )
{
- QColor color;
- QColorDrag::decode(const_cast<KColorDrag *>(this), color);
- QCString result = color.name().latin1();
- ((QByteArray&)result).resize(result.length());
+ TQColor color;
+ TQColorDrag::decode(const_cast<KColorDrag *>(this), color);
+ TQCString result = color.name().latin1();
+ ((TQByteArray&)result).resize(result.length());
return result;
}
- return QStoredDrag::encodedData(m);
+ return TQStoredDrag::encodedData(m);
}
bool
-KColorDrag::canDecode( QMimeSource *e)
+KColorDrag::canDecode( TQMimeSource *e)
{
if (e->provides(color_mime_string))
return true;
if (e->provides(text_mime_string))
{
- QColor dummy;
+ TQColor dummy;
return decode(e, dummy);
}
return false;
}
bool
-KColorDrag::decode( QMimeSource *e, QColor &color)
+KColorDrag::decode( TQMimeSource *e, TQColor &color)
{
- if (QColorDrag::decode(e, color))
+ if (TQColorDrag::decode(e, color))
return true;
- QByteArray data = e->encodedData( text_mime_string);
- QString colorName = QString::fromLatin1(data.data(), data.size());
+ TQByteArray data = e->encodedData( text_mime_string);
+ TQString colorName = TQString::fromLatin1(data.data(), data.size());
if ((colorName.length() < 4) || (colorName[0] != '#'))
return false;
color.setNamedColor(colorName);
@@ -101,7 +101,7 @@ KColorDrag::decode( QMimeSource *e, QColor &color)
KColorDrag*
-KColorDrag::makeDrag( const QColor &color,QWidget *dragsource)
+KColorDrag::makeDrag( const TQColor &color,TQWidget *dragsource)
{
return new KColorDrag( color, dragsource);
}
diff --git a/kdeui/kcolordrag.h b/kdeui/kcolordrag.h
index 696d8a7ab..7f0cd1ba3 100644
--- a/kdeui/kcolordrag.h
+++ b/kdeui/kcolordrag.h
@@ -22,8 +22,8 @@
#ifndef _KCOLORDRAG_H
#define _KCOLORDRAG_H
-#include <qdragobject.h>
-#include <qcolor.h>
+#include <tqdragobject.h>
+#include <tqcolor.h>
#include <kdelibs_export.h>
class KColorDragPrivate;
@@ -33,42 +33,42 @@ class KColorDragPrivate;
*
* See the Qt drag'n'drop documentation.
*/
-class KDEUI_EXPORT KColorDrag : public QStoredDrag {
+class KDEUI_EXPORT KColorDrag : public TQStoredDrag {
Q_OBJECT
public:
/**
* Constructs a color drag with a white color.
*/
- KColorDrag( QWidget *dragsource = 0, const char *name = 0 );
+ KColorDrag( TQWidget *dragsource = 0, const char *name = 0 );
/**
* Constructs a color drag with the color @p col.
*/
- KColorDrag( const QColor &col, QWidget *dragsource = 0, const char *name = 0 );
+ KColorDrag( const TQColor &col, TQWidget *dragsource = 0, const char *name = 0 );
virtual ~KColorDrag() {}
virtual const char *format(int i) const;
- virtual QByteArray encodedData ( const char * m ) const;
+ virtual TQByteArray encodedData ( const char * m ) const;
/**
* Sets the color of the drag to @p col.
*/
- void setColor(const QColor &col);
+ void setColor(const TQColor &col);
/**
* Returns true if the MIME source @p e contains a color object.
*/
- static bool canDecode(QMimeSource *e);
+ static bool canDecode(TQMimeSource *e);
/**
* Decodes the MIME source @p e and puts the resulting color into @p col.
*/
- static bool decode(QMimeSource *e, QColor &col);
+ static bool decode(TQMimeSource *e, TQColor &col);
/**
* @deprecated This is equivalent with "new KColorDrag(color, dragsource)".
*/
- static KColorDrag* makeDrag( const QColor&,QWidget *dragsource) KDE_DEPRECATED;
+ static KColorDrag* makeDrag( const TQColor&,TQWidget *dragsource) KDE_DEPRECATED;
private:
- QColor m_color; // unused
+ TQColor m_color; // unused
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdeui/kcombobox.cpp b/kdeui/kcombobox.cpp
index 602228c48..31f14ed0f 100644
--- a/kdeui/kcombobox.cpp
+++ b/kdeui/kcombobox.cpp
@@ -20,10 +20,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qclipboard.h>
-#include <qlistbox.h>
-#include <qpopupmenu.h>
-#include <qapplication.h>
+#include <tqclipboard.h>
+#include <tqlistbox.h>
+#include <tqpopupmenu.h>
+#include <tqapplication.h>
#include <kcompletionbox.h>
#include <kcursor.h>
@@ -56,14 +56,14 @@ public:
KLineEdit *klineEdit;
};
-KComboBox::KComboBox( QWidget *parent, const char *name )
- : QComboBox( parent, name ), d(new KComboBoxPrivate)
+KComboBox::KComboBox( TQWidget *parent, const char *name )
+ : TQComboBox( parent, name ), d(new KComboBoxPrivate)
{
init();
}
-KComboBox::KComboBox( bool rw, QWidget *parent, const char *name )
- : QComboBox( rw, parent, name ), d(new KComboBoxPrivate)
+KComboBox::KComboBox( bool rw, TQWidget *parent, const char *name )
+ : TQComboBox( rw, parent, name ), d(new KComboBoxPrivate)
{
init();
@@ -82,7 +82,7 @@ KComboBox::~KComboBox()
void KComboBox::init()
{
// Permanently set some parameters in the parent object.
- QComboBox::setAutoCompletion( false );
+ TQComboBox::setAutoCompletion( false );
// Enable context menu by default if widget
// is editable.
@@ -90,7 +90,7 @@ void KComboBox::init()
}
-bool KComboBox::contains( const QString& _text ) const
+bool KComboBox::contains( const TQString& _text ) const
{
if ( _text.isEmpty() )
return false;
@@ -140,19 +140,19 @@ bool KComboBox::isURLDropsEnabled() const
}
-void KComboBox::setCompletedText( const QString& text, bool marked )
+void KComboBox::setCompletedText( const TQString& text, bool marked )
{
if ( d->klineEdit )
d->klineEdit->setCompletedText( text, marked );
}
-void KComboBox::setCompletedText( const QString& text )
+void KComboBox::setCompletedText( const TQString& text )
{
if ( d->klineEdit )
d->klineEdit->setCompletedText( text );
}
-void KComboBox::makeCompletion( const QString& text )
+void KComboBox::makeCompletion( const TQString& text )
{
if( d->klineEdit )
d->klineEdit->makeCompletion( text );
@@ -175,9 +175,9 @@ void KComboBox::rotateText( KCompletionBase::KeyBindingType type )
}
// not needed anymore
-bool KComboBox::eventFilter( QObject* o, QEvent* ev )
+bool KComboBox::eventFilter( TQObject* o, TQEvent* ev )
{
- return QComboBox::eventFilter( o, ev );
+ return TQComboBox::eventFilter( o, ev );
}
void KComboBox::setTrapReturnKey( bool grab )
@@ -196,30 +196,30 @@ bool KComboBox::trapReturnKey() const
void KComboBox::setEditURL( const KURL& url )
{
- QComboBox::setEditText( url.prettyURL() );
+ TQComboBox::setEditText( url.prettyURL() );
}
void KComboBox::insertURL( const KURL& url, int index )
{
- QComboBox::insertItem( url.prettyURL(), index );
+ TQComboBox::insertItem( url.prettyURL(), index );
}
-void KComboBox::insertURL( const QPixmap& pixmap, const KURL& url, int index )
+void KComboBox::insertURL( const TQPixmap& pixmap, const KURL& url, int index )
{
- QComboBox::insertItem( pixmap, url.prettyURL(), index );
+ TQComboBox::insertItem( pixmap, url.prettyURL(), index );
}
void KComboBox::changeURL( const KURL& url, int index )
{
- QComboBox::changeItem( url.prettyURL(), index );
+ TQComboBox::changeItem( url.prettyURL(), index );
}
-void KComboBox::changeURL( const QPixmap& pixmap, const KURL& url, int index )
+void KComboBox::changeURL( const TQPixmap& pixmap, const KURL& url, int index )
{
- QComboBox::changeItem( pixmap, url.prettyURL(), index );
+ TQComboBox::changeItem( pixmap, url.prettyURL(), index );
}
-void KComboBox::setCompletedItems( const QStringList& items )
+void KComboBox::setCompletedItems( const TQStringList& items )
{
if ( d->klineEdit )
d->klineEdit->setCompletedItems( items );
@@ -232,40 +232,40 @@ KCompletionBox * KComboBox::completionBox( bool create )
return 0;
}
-// QWidget::create() turns off mouse-Tracking which would break auto-hiding
+// TQWidget::create() turns off mouse-Tracking which would break auto-hiding
void KComboBox::create( WId id, bool initializeWindow, bool destroyOldWindow )
{
- QComboBox::create( id, initializeWindow, destroyOldWindow );
+ TQComboBox::create( id, initializeWindow, destroyOldWindow );
KCursor::setAutoHideCursor( lineEdit(), true, true );
}
-void KComboBox::wheelEvent( QWheelEvent *ev )
+void KComboBox::wheelEvent( TQWheelEvent *ev )
{
// Not necessary anymore
- QComboBox::wheelEvent( ev );
+ TQComboBox::wheelEvent( ev );
}
-void KComboBox::setLineEdit( QLineEdit *edit )
+void KComboBox::setLineEdit( TQLineEdit *edit )
{
if ( !editable() && edit &&
- !qstrcmp( edit->className(), "QLineEdit" ) )
+ !qstrcmp( edit->className(), "TQLineEdit" ) )
{
// uic generates code that creates a read-only KComboBox and then
- // calls combo->setEditable( true ), which causes QComboBox to set up
- // a dumb QLineEdit instead of our nice KLineEdit.
+ // calls combo->setEditable( true ), which causes TQComboBox to set up
+ // a dumb TQLineEdit instead of our nice KLineEdit.
// As some KComboBox features rely on the KLineEdit, we reject
// this order here.
delete edit;
edit = new KLineEdit( this, "combo edit" );
}
- QComboBox::setLineEdit( edit );
+ TQComboBox::setLineEdit( edit );
d->klineEdit = dynamic_cast<KLineEdit*>( edit );
setDelegate( d->klineEdit );
// Connect the returnPressed signal for both Q[K]LineEdits'
if (edit)
- connect( edit, SIGNAL( returnPressed() ), SIGNAL( returnPressed() ));
+ connect( edit, TQT_SIGNAL( returnPressed() ), TQT_SIGNAL( returnPressed() ));
if ( d->klineEdit )
{
@@ -273,36 +273,36 @@ void KComboBox::setLineEdit( QLineEdit *edit )
// lineedit without us noticing. And KCompletionBase::delegate would
// be a dangling pointer then, so prevent that. Note: only do this
// when it is a KLineEdit!
- connect( edit, SIGNAL( destroyed() ), SLOT( lineEditDeleted() ));
+ connect( edit, TQT_SIGNAL( destroyed() ), TQT_SLOT( lineEditDeleted() ));
- connect( d->klineEdit, SIGNAL( returnPressed( const QString& )),
- SIGNAL( returnPressed( const QString& ) ));
+ connect( d->klineEdit, TQT_SIGNAL( returnPressed( const TQString& )),
+ TQT_SIGNAL( returnPressed( const TQString& ) ));
- connect( d->klineEdit, SIGNAL( completion( const QString& )),
- SIGNAL( completion( const QString& )) );
+ connect( d->klineEdit, TQT_SIGNAL( completion( const TQString& )),
+ TQT_SIGNAL( completion( const TQString& )) );
- connect( d->klineEdit, SIGNAL( substringCompletion( const QString& )),
- SIGNAL( substringCompletion( const QString& )) );
+ connect( d->klineEdit, TQT_SIGNAL( substringCompletion( const TQString& )),
+ TQT_SIGNAL( substringCompletion( const TQString& )) );
connect( d->klineEdit,
- SIGNAL( textRotation( KCompletionBase::KeyBindingType )),
- SIGNAL( textRotation( KCompletionBase::KeyBindingType )) );
+ TQT_SIGNAL( textRotation( KCompletionBase::KeyBindingType )),
+ TQT_SIGNAL( textRotation( KCompletionBase::KeyBindingType )) );
connect( d->klineEdit,
- SIGNAL( completionModeChanged( KGlobalSettings::Completion )),
- SIGNAL( completionModeChanged( KGlobalSettings::Completion)));
+ TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion )),
+ TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion)));
connect( d->klineEdit,
- SIGNAL( aboutToShowContextMenu( QPopupMenu * )),
- SIGNAL( aboutToShowContextMenu( QPopupMenu * )) );
+ TQT_SIGNAL( aboutToShowContextMenu( TQPopupMenu * )),
+ TQT_SIGNAL( aboutToShowContextMenu( TQPopupMenu * )) );
connect( d->klineEdit,
- SIGNAL( completionBoxActivated( const QString& )),
- SIGNAL( activated( const QString& )) );
+ TQT_SIGNAL( completionBoxActivated( const TQString& )),
+ TQT_SIGNAL( activated( const TQString& )) );
}
}
-void KComboBox::setCurrentItem( const QString& item, bool insert, int index )
+void KComboBox::setCurrentItem( const TQString& item, bool insert, int index )
{
int sel = -1;
@@ -345,7 +345,7 @@ void KComboBox::lineEditDeleted()
// we are always read-write
-KHistoryCombo::KHistoryCombo( QWidget *parent, const char *name )
+KHistoryCombo::KHistoryCombo( TQWidget *parent, const char *name )
: KComboBox( true, parent, name ), d(0)
{
init( true ); // using completion
@@ -353,7 +353,7 @@ KHistoryCombo::KHistoryCombo( QWidget *parent, const char *name )
// we are always read-write
KHistoryCombo::KHistoryCombo( bool useCompletion,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KComboBox( true, parent, name ), d(0)
{
init( useCompletion );
@@ -373,14 +373,14 @@ void KHistoryCombo::init( bool useCompletion )
myPixProvider = 0L;
// obey HISTCONTROL setting
- QCString histControl = getenv("HISTCONTROL");
+ TQCString histControl = getenv("HISTCONTROL");
if ( histControl == "ignoredups" || histControl == "ignoreboth" )
setDuplicatesEnabled( false );
- connect( this, SIGNAL(aboutToShowContextMenu(QPopupMenu*)),
- SLOT(addContextMenuItems(QPopupMenu*)) );
- connect( this, SIGNAL( activated(int) ), SLOT( slotReset() ));
- connect( this, SIGNAL( returnPressed(const QString&) ), SLOT(slotReset()));
+ connect( this, TQT_SIGNAL(aboutToShowContextMenu(TQPopupMenu*)),
+ TQT_SLOT(addContextMenuItems(TQPopupMenu*)) );
+ connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotReset() ));
+ connect( this, TQT_SIGNAL( returnPressed(const TQString&) ), TQT_SLOT(slotReset()));
}
KHistoryCombo::~KHistoryCombo()
@@ -388,7 +388,7 @@ KHistoryCombo::~KHistoryCombo()
delete myPixProvider;
}
-void KHistoryCombo::setHistoryItems( QStringList items,
+void KHistoryCombo::setHistoryItems( TQStringList items,
bool setCompletionList )
{
KComboBox::clear();
@@ -417,9 +417,9 @@ void KHistoryCombo::setHistoryItems( QStringList items,
clearEdit();
}
-QStringList KHistoryCombo::historyItems() const
+TQStringList KHistoryCombo::historyItems() const
{
- QStringList list;
+ TQStringList list;
const int itemCount = count();
for ( int i = 0; i < itemCount; ++i )
list.append( text( i ) );
@@ -429,25 +429,25 @@ QStringList KHistoryCombo::historyItems() const
void KHistoryCombo::clearHistory()
{
- const QString temp = currentText();
+ const TQString temp = currentText();
KComboBox::clear();
if ( useCompletion() )
completionObject()->clear();
setEditText( temp );
}
-void KHistoryCombo::addContextMenuItems( QPopupMenu* menu )
+void KHistoryCombo::addContextMenuItems( TQPopupMenu* menu )
{
if ( menu )
{
menu->insertSeparator();
- int id = menu->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), this, SLOT( slotClear()));
+ int id = menu->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), this, TQT_SLOT( slotClear()));
if (!count())
menu->setItemEnabled(id, false);
}
}
-void KHistoryCombo::addToHistory( const QString& item )
+void KHistoryCombo::addToHistory( const TQString& item )
{
if ( item.isEmpty() || (count() > 0 && item == text(0) )) {
return;
@@ -489,7 +489,7 @@ void KHistoryCombo::addToHistory( const QString& item )
// remove the last item, as long as we are longer than maxCount()
// remove the removed item from the completionObject if it isn't
// anymore available at all in the combobox.
- const QString rmItem = text( rmIndex );
+ const TQString rmItem = text( rmIndex );
removeItem( rmIndex );
if ( useComp && !contains( rmItem ) )
completionObject()->removeItem( rmItem );
@@ -499,13 +499,13 @@ void KHistoryCombo::addToHistory( const QString& item )
completionObject()->addItem( item );
}
-bool KHistoryCombo::removeFromHistory( const QString& item )
+bool KHistoryCombo::removeFromHistory( const TQString& item )
{
if ( item.isEmpty() )
return false;
bool removed = false;
- const QString temp = currentText();
+ const TQString temp = currentText();
int i = 0;
int itemCount = count();
while ( i < itemCount ) {
@@ -535,7 +535,7 @@ void KHistoryCombo::rotateUp()
// skip duplicates/empty items
const int last = count() - 1; // last valid index
- const QString currText = currentText();
+ const TQString currText = currentText();
while ( myIterateIndex < last &&
(currText == text( myIterateIndex ) ||
@@ -564,7 +564,7 @@ void KHistoryCombo::rotateDown()
--myIterateIndex;
- const QString currText = currentText();
+ const TQString currText = currentText();
// skip duplicates/empty items
while ( myIterateIndex >= 0 &&
(currText == text( myIterateIndex ) ||
@@ -594,11 +594,11 @@ void KHistoryCombo::rotateDown()
}
-void KHistoryCombo::keyPressEvent( QKeyEvent *e )
+void KHistoryCombo::keyPressEvent( TQKeyEvent *e )
{
KKey event_key( e );
- // going up in the history, rotating when reaching QListBox::count()
+ // going up in the history, rotating when reaching TQListBox::count()
if ( KStdAccel::rotateUp().contains(event_key) )
rotateUp();
@@ -610,13 +610,13 @@ void KHistoryCombo::keyPressEvent( QKeyEvent *e )
KComboBox::keyPressEvent( e );
}
-void KHistoryCombo::wheelEvent( QWheelEvent *ev )
+void KHistoryCombo::wheelEvent( TQWheelEvent *ev )
{
// Pass to poppable listbox if it's up
- QListBox* const lb = listBox();
+ TQListBox* const lb = listBox();
if ( lb && lb->isVisible() )
{
- QApplication::sendEvent( lb, ev );
+ TQApplication::sendEvent( lb, ev );
return;
}
// Otherwise make it change the text without emitting activated
@@ -647,19 +647,19 @@ void KHistoryCombo::setPixmapProvider( KPixmapProvider *prov )
// I would prefer to use changeItem(), but that doesn't honor the pixmap
// when using an editable combobox (what we do)
if ( count() > 0 ) {
- QStringList items( historyItems() );
+ TQStringList items( historyItems() );
clear();
insertItems( items );
}
}
-void KHistoryCombo::insertItems( const QStringList& items )
+void KHistoryCombo::insertItems( const TQStringList& items )
{
- QStringList::ConstIterator it = items.constBegin();
- const QStringList::ConstIterator itEnd = items.constEnd();
+ TQStringList::ConstIterator it = items.constBegin();
+ const TQStringList::ConstIterator itEnd = items.constEnd();
while ( it != itEnd ) {
- const QString item = *it;
+ const TQString item = *it;
if ( !item.isEmpty() ) { // only insert non-empty items
if ( myPixProvider )
insertItem( myPixProvider->pixmapFor(item, KIcon::SizeSmall),
diff --git a/kdeui/kcombobox.h b/kdeui/kcombobox.h
index 47f76a59e..a03a8abff 100644
--- a/kdeui/kcombobox.h
+++ b/kdeui/kcombobox.h
@@ -22,8 +22,8 @@
#ifndef _KCOMBOBOX_H
#define _KCOMBOBOX_H
-#include <qlineedit.h>
-#include <qcombobox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
#include <kcompletion.h>
@@ -41,18 +41,18 @@ class KURL;
*
* \b Detail \n
*
- * This widget inherits from QComboBox and implements the following
+ * This widget inherits from TQComboBox and implements the following
* additional functionalities: a completion object that provides both automatic
* and manual text completion as well as text rotation features, configurable
* key-bindings to activate these features, and a popup-menu item that can be
* used to allow the user to change the text completion mode on the fly.
*
* To support these new features KComboBox emits a few additional signals
- * such as completion( const QString& ) and textRotation( KeyBindgingType ).
+ * such as completion( const TQString& ) and textRotation( KeyBindgingType ).
* The completion signal can be connected to a slot that will assist the user in
* filling out the remaining text while the rotation signal can be used to traverse
* through all possible matches whenever text completion results in multiple matches.
- * Additionally, a returnPressed() and a returnPressed( const QString& )
+ * Additionally, a returnPressed() and a returnPressed( const TQString& )
* signals are emitted when the user presses the Enter/Return key.
*
* KCombobox by default creates a completion object when you invoke the
@@ -67,7 +67,7 @@ class KURL;
*
* Beware: The completion object can be deleted on you, especially if a call
* such as setEditable(false) is made. Store the pointer at your own risk,
- * and consider using QGuardedPtr<KCompletion>.
+ * 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
@@ -107,7 +107,7 @@ class KURL;
* KComboBox *combo = new KComboBox( true, this, "mywidget" );
* KCompletion *comp = combo->completionObject();
* // Connect to the return pressed signal - optional
- * connect(combo,SIGNAL(returnPressed(const QString&)),comp,SLOT(addItem(const QString&)));
+ * connect(combo,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&)));
*
* // Provide the to be completed strings. Note that those are separate from the combo's
* // contents.
@@ -121,7 +121,7 @@ class KURL;
* KURLCompletion *comp = new KURLCompletion();
* combo->setCompletionObject( comp );
* // Connect to the return pressed signal - optional
- * connect(combo,SIGNAL(returnPressed(const QString&)),comp,SLOT(addItem(const QString&)));
+ * connect(combo,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&)));
* \endcode
*
* Note that you have to either delete the allocated completion object
@@ -141,7 +141,7 @@ class KURL;
*
* @author Dawit Alemayehu <adawit@kde.org>
*/
-class KDEUI_EXPORT KComboBox : public QComboBox, public KCompletionBase
+class KDEUI_EXPORT KComboBox : public TQComboBox, public KCompletionBase
{
Q_OBJECT
Q_PROPERTY( bool autoCompletion READ autoCompletion WRITE setAutoCompletion )
@@ -158,7 +158,7 @@ public:
* @param parent The parent object of this widget
* @param name The name of this widget
*/
- KComboBox( QWidget *parent=0, const char *name=0 );
+ KComboBox( TQWidget *parent=0, const char *name=0 );
/**
* Constructs a "read-write" or "read-only" combo box depending on
@@ -169,7 +169,7 @@ public:
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- KComboBox( bool rw, QWidget *parent=0, const char *name=0 );
+ KComboBox( bool rw, TQWidget *parent=0, const char *name=0 );
/**
* Destructor.
@@ -196,7 +196,7 @@ public:
* KURL::prettyURL() is used so that the url is properly decoded
* for displaying.
*/
- void insertURL( const QPixmap& pixmap, const KURL& url, int index = -1 );
+ void insertURL( const TQPixmap& pixmap, const KURL& url, int index = -1 );
/**
* Replaces the item at position @p index with @p url.
@@ -210,7 +210,7 @@ public:
* KURL::prettyURL() is used so that the url is properly decoded
* for displaying.
*/
- void changeURL( const QPixmap& pixmap, const KURL& url, int index );
+ void changeURL( const TQPixmap& pixmap, const KURL& url, int index );
/**
* Returns the current cursor position.
@@ -223,7 +223,7 @@ public:
int cursorPosition() const { return ( lineEdit() ) ? lineEdit()->cursorPosition() : -1; }
/**
- * Re-implemented from QComboBox.
+ * Re-implemented from TQComboBox.
*
* If @p true, the completion mode will be set to automatic.
* Otherwise, it is defaulted to the global setting. This
@@ -235,7 +235,7 @@ public:
virtual void setAutoCompletion( bool autocomplete );
/**
- * Re-implemented from QComboBox.
+ * Re-implemented from TQComboBox.
*
* Returns @p true if the current completion mode is set
* to automatic. See its more comprehensive replacement
@@ -272,7 +272,7 @@ public:
/**
* Enables/Disables handling of URL drops. If enabled and the user
* drops an URL, the decoded URL will be inserted. Otherwise the default
- * behavior of QComboBox is used, which inserts the encoded URL.
+ * behavior of TQComboBox is used, which inserts the encoded URL.
*
* @param enable If @p true, insert decoded URLs
*/
@@ -292,7 +292,7 @@ public:
*
* @return @p true if an item with the string @p text is in the combobox.
*/
- bool contains( const QString& text ) const;
+ bool contains( const TQString& text ) const;
/**
* By default, KComboBox recognizes Key_Return and Key_Enter
@@ -320,7 +320,7 @@ public:
/**
* Re-implemented for internal reasons. API not affected.
*/
- virtual bool eventFilter( QObject *, QEvent * );
+ virtual bool eventFilter( TQObject *, TQEvent * );
/**
* @returns the completion-box, that is used in completion mode
@@ -339,7 +339,7 @@ public:
* any attempt to assign a line-edit to a non-editable combobox will
* simply be ignored.
*/
- virtual void setLineEdit( QLineEdit * );
+ virtual void setLineEdit( TQLineEdit * );
signals:
/**
@@ -358,7 +358,7 @@ signals:
* Note that this signal is only emitted when the
* widget is editable.
*/
- void returnPressed( const QString& );
+ void returnPressed( const TQString& );
/**
* Emitted when the completion key is pressed.
@@ -368,12 +368,12 @@ signals:
* Note that this signal is @em not available when the widget is non-editable
* or the completion mode is set to @p KGlobalSettings::CompletionNone.
*/
- void completion( const QString& );
+ void completion( const TQString& );
/**
* Emitted when the shortcut for substring completion is pressed.
*/
- void substringCompletion( const QString& );
+ void substringCompletion( const TQString& );
/**
* Emitted when the text rotation key-bindings are pressed.
@@ -398,12 +398,12 @@ signals:
* Emitted before the context menu is displayed.
*
* The signal allows you to add your own entries into the context menu.
- * Note that you MUST NOT store the pointer to the QPopupMenu since it is
+ * Note that you MUST NOT store the pointer to the TQPopupMenu since it is
* created and deleted on demand. Otherwise, you can crash your app.
*
* @param p the context menu about to be displayed
*/
- void aboutToShowContextMenu( QPopupMenu * p );
+ void aboutToShowContextMenu( TQPopupMenu * p );
public slots:
@@ -418,7 +418,7 @@ public slots:
* iteration will not work if there are no previous matches, i.e.
* no text has been completed and the *nix shell history list
* rotation is only available if the insertion policy for this
- * widget is set either @p QComobBox::AtTop or @p QComboBox::AtBottom.
+ * widget is set either @p QComobBox::AtTop or @p TQComboBox::AtBottom.
* For other insertion modes whatever has been typed by the user
* when the rotation event was initiated will be lost.
*
@@ -431,33 +431,33 @@ public slots:
*
* This function is a re-implementation of @p setCompletedText.
*/
- virtual void setCompletedText( const QString& );
+ virtual void setCompletedText( const TQString& );
/**
* Sets @p items into the completion-box if completionMode() is
* CompletionPopup. The popup will be shown immediately.
*/
- void setCompletedItems( const QStringList& items );
+ void setCompletedItems( const TQStringList& items );
/**
* Selects the first item that matches @p item. If there is no such item,
* it is inserted at position @p index if @p insert is true. Otherwise,
* no item is selected.
*/
- void setCurrentItem( const QString& item, bool insert = false, int index = -1 );
+ void setCurrentItem( const TQString& item, bool insert = false, int index = -1 );
/**
* Simply calls QComboBox' implementation. Only here to not become
* shadowed.
*/
- void setCurrentItem(int index) { QComboBox::setCurrentItem(index); }
+ void setCurrentItem(int index) { TQComboBox::setCurrentItem(index); }
protected slots:
/**
* @deprecated
*/
- virtual void itemSelected( QListBoxItem* ) {}
+ virtual void itemSelected( TQListBoxItem* ) {}
/**
* Completes text according to the completion mode.
@@ -470,7 +470,7 @@ protected slots:
* through the remaining matches. This way the rotation functionality
* is left to iterate through the list as usual.
*/
- virtual void makeCompletion( const QString& );
+ virtual void makeCompletion( const TQString& );
protected:
/*
@@ -481,7 +481,7 @@ protected:
* @param
* @param
*/
- virtual void setCompletedText( const QString& /* */, bool /*marked*/ );
+ virtual void setCompletedText( const TQString& /* */, bool /*marked*/ );
/**
* Reimplemented for internal reasons, the API is not affected.
@@ -489,7 +489,7 @@ protected:
virtual void create( WId = 0, bool initializeWindow = true,
bool destroyOldWindow = true );
- virtual void wheelEvent( QWheelEvent *ev );
+ virtual void wheelEvent( TQWheelEvent *ev );
private slots:
void lineEditDeleted();
@@ -533,7 +533,7 @@ class KPixmapProvider;
class KDEUI_EXPORT KHistoryCombo : public KComboBox
{
Q_OBJECT
- Q_PROPERTY( QStringList historyItems READ historyItems WRITE setHistoryItems )
+ Q_PROPERTY( TQStringList historyItems READ historyItems WRITE setHistoryItems )
public:
/**
@@ -546,16 +546,16 @@ public:
* use
*
* \code
- * connect( combo, SIGNAL( activated( const QString& )),
- * combo, SLOT( addToHistory( const QString& )));
+ * connect( combo, TQT_SIGNAL( activated( const TQString& )),
+ * combo, TQT_SLOT( addToHistory( const TQString& )));
* \endcode
*
- * Use QComboBox::setMaxCount() to limit the history.
+ * Use TQComboBox::setMaxCount() to limit the history.
*
* @p parent the parent object of this widget.
* @p name the name of this widget.
*/
- KHistoryCombo( QWidget *parent = 0L, const char *name = 0L );
+ KHistoryCombo( TQWidget *parent = 0L, const char *name = 0L );
// ### merge these two constructors
/**
@@ -565,7 +565,7 @@ public:
* contents of the combobox.
*/
KHistoryCombo( bool useCompletion,
- QWidget *parent = 0L, const char *name = 0L );
+ TQWidget *parent = 0L, const char *name = 0L );
/**
* Destructs the combo, the completion-object and the pixmap-provider
@@ -578,7 +578,7 @@ public:
*
* @see historyItems
*/
- inline void setHistoryItems( QStringList items ) {
+ inline void setHistoryItems( TQStringList items ) {
setHistoryItems(items, false);
}
@@ -593,7 +593,7 @@ public:
* you should do something like
* \code
* KConfig *config = kapp->config();
- * QStringList list;
+ * TQStringList list;
*
* // load the history and completion list after creating the history combo
* list = config->readListEntry( "Completion list" );
@@ -623,7 +623,7 @@ public:
* @see KCompletion::setItems
* @see KCompletion::items
*/
- void setHistoryItems( QStringList items, bool setCompletionList );
+ void setHistoryItems( TQStringList items, bool setCompletionList );
/**
* Returns the list of history items. Empty, when this is not a read-write
@@ -631,7 +631,7 @@ public:
*
* @see setHistoryItems
*/
- QStringList historyItems() const;
+ TQStringList historyItems() const;
/**
* Removes all items named @p item.
@@ -640,7 +640,7 @@ public:
*
* @see addToHistory
*/
- bool removeFromHistory( const QString& item );
+ bool removeFromHistory( const TQString& item );
/**
* Sets a pixmap provider, so that items in the combobox can have a pixmap.
@@ -687,9 +687,9 @@ public slots:
* not in the combobox, and vice versa.
*
* @see removeFromHistory
- * @see QComboBox::setDuplicatesEnabled
+ * @see TQComboBox::setDuplicatesEnabled
*/
- void addToHistory( const QString& item );
+ void addToHistory( const TQString& item );
/**
* Clears the history and the completion list.
@@ -706,12 +706,12 @@ protected:
/**
* Handling key-events, the shortcuts to rotate the items.
*/
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
/**
* Handling wheel-events, to rotate the items.
*/
- virtual void wheelEvent( QWheelEvent *ev );
+ virtual void wheelEvent( TQWheelEvent *ev );
/**
* Inserts @p items into the combo, honoring pixmapProvider()
@@ -721,7 +721,7 @@ protected:
*
* Called from setHistoryItems() and setPixmapProvider()
*/
- void insertItems( const QStringList& items );
+ void insertItems( const TQStringList& items );
/**
* @returns if we can modify the completion object or not.
@@ -743,7 +743,7 @@ private slots:
/**
* Appends our own context menu entry.
*/
- void addContextMenuItems( QPopupMenu* );
+ void addContextMenuItems( TQPopupMenu* );
private:
void init( bool useCompletion );
@@ -758,7 +758,7 @@ private:
/**
* The text typed before Up or Down was pressed.
*/
- QString myText;
+ TQString myText;
/**
* Indicates that the user at least once rotated Up through the entire list
diff --git a/kdeui/kcommand.cpp b/kdeui/kcommand.cpp
index bf133c609..2c76b21cd 100644
--- a/kdeui/kcommand.cpp
+++ b/kdeui/kcommand.cpp
@@ -30,7 +30,7 @@ KCommand::~KCommand()
{
}
-KMacroCommand::KMacroCommand( const QString & name ) : KNamedCommand(name)
+KMacroCommand::KMacroCommand( const TQString & name ) : KNamedCommand(name)
{
m_commands.setAutoDelete(true);
}
@@ -42,14 +42,14 @@ void KMacroCommand::addCommand(KCommand *command)
void KMacroCommand::execute()
{
- QPtrListIterator<KCommand> it(m_commands);
+ TQPtrListIterator<KCommand> it(m_commands);
for ( ; it.current() ; ++it )
it.current()->execute();
}
void KMacroCommand::unexecute()
{
- QPtrListIterator<KCommand> it(m_commands);
+ TQPtrListIterator<KCommand> it(m_commands);
it.toLast();
for ( ; it.current() ; --it )
it.current()->unexecute();
@@ -84,25 +84,25 @@ KCommandHistory::KCommandHistory(KActionCollection * actionCollection, bool with
if (withMenus)
{
KToolBarPopupAction * undo = new KToolBarPopupAction( i18n("&Undo"), "undo",
- KStdAccel::shortcut(KStdAccel::Undo), this, SLOT( undo() ),
+ KStdAccel::shortcut(KStdAccel::Undo), this, TQT_SLOT( undo() ),
actionCollection, KStdAction::stdName( KStdAction::Undo ) );
- connect( undo->popupMenu(), SIGNAL( aboutToShow() ), this, SLOT( slotUndoAboutToShow() ) );
- connect( undo->popupMenu(), SIGNAL( activated( int ) ), this, SLOT( slotUndoActivated( int ) ) );
+ 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, SLOT( redo() ),
+ KStdAccel::shortcut(KStdAccel::Redo), this, TQT_SLOT( redo() ),
actionCollection, KStdAction::stdName( KStdAction::Redo ) );
- connect( redo->popupMenu(), SIGNAL( aboutToShow() ), this, SLOT( slotRedoAboutToShow() ) );
- connect( redo->popupMenu(), SIGNAL( activated( int ) ), this, SLOT( slotRedoActivated( int ) ) );
+ connect( redo->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotRedoAboutToShow() ) );
+ connect( redo->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotRedoActivated( int ) ) );
m_redo = redo;
m_redoPopup = redo->popupMenu();
}
else
{
- m_undo = KStdAction::undo( this, SLOT( undo() ), actionCollection );
- m_redo = KStdAction::redo( this, SLOT( redo() ), actionCollection );
+ m_undo = KStdAction::undo( this, TQT_SLOT( undo() ), actionCollection );
+ m_redo = KStdAction::redo( this, TQT_SLOT( redo() ), actionCollection );
m_undoPopup = 0L;
m_redoPopup = 0L;
}
diff --git a/kdeui/kcommand.h b/kdeui/kcommand.h
index c47838fb4..e65269137 100644
--- a/kdeui/kcommand.h
+++ b/kdeui/kcommand.h
@@ -21,9 +21,9 @@
#ifndef kcommand_h
#define kcommand_h
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
class KAction;
@@ -65,7 +65,7 @@ public:
* @return the name of this command, translated, since it will appear
* in the menus.
*/
- virtual QString name() const = 0;
+ virtual TQString name() const = 0;
protected:
virtual void virtual_hook( int id, void* data );
};
@@ -83,21 +83,21 @@ protected:
* @param name the name of this command, translated, since it will appear
* in the menus.
*/
- KNamedCommand(const QString &name) : KCommand(), m_name(name) {}
+ KNamedCommand(const TQString &name) : KCommand(), m_name(name) {}
public:
/**
* @return the name of this command
*/
- virtual QString name() const { return m_name; }
+ virtual TQString name() const { return m_name; }
/**
* Updates the name of this command.
* Rarely necessary.
*/
- void setName(const QString &name) { m_name=name; }
+ void setName(const TQString &name) { m_name=name; }
private:
- QString m_name;
+ TQString m_name;
protected:
virtual void virtual_hook( int id, void* data );
};
@@ -116,7 +116,7 @@ public:
* @param name the name of this command, translated, since it will appear
* in the menus.
*/
- KMacroCommand( const QString & name );
+ KMacroCommand( const TQString & name );
virtual ~KMacroCommand() {}
/**
@@ -137,7 +137,7 @@ public:
virtual void unexecute();
protected:
- QPtrList<KCommand> m_commands;
+ TQPtrList<KCommand> m_commands;
protected:
virtual void virtual_hook( int id, void* data );
};
@@ -153,7 +153,7 @@ protected:
* undo/redo actions in the menu and changes the text according
* to the name of the command.
*/
-class KDEUI_EXPORT KCommandHistory : public QObject {
+class KDEUI_EXPORT KCommandHistory : public TQObject {
Q_OBJECT
public:
/**
@@ -274,9 +274,9 @@ signals:
private:
void clipCommands(); // ensures that the limits are kept
- QPtrList<KCommand> m_commands;
+ TQPtrList<KCommand> m_commands;
KAction *m_undo, *m_redo;
- QPopupMenu *m_undoPopup, *m_redoPopup;
+ TQPopupMenu *m_undoPopup, *m_redoPopup;
int m_undoLimit, m_redoLimit;
bool m_first; // attention: it's the first command in the list!
protected:
diff --git a/kdeui/kcompletionbox.cpp b/kdeui/kcompletionbox.cpp
index 63791724b..68f5f6343 100644
--- a/kdeui/kcompletionbox.cpp
+++ b/kdeui/kcompletionbox.cpp
@@ -21,10 +21,10 @@
*/
-#include <qapplication.h>
-#include <qcombobox.h>
-#include <qevent.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqcombobox.h>
+#include <tqevent.h>
+#include <tqstyle.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -36,15 +36,15 @@
class KCompletionBox::KCompletionBoxPrivate
{
public:
- QWidget *m_parent; // necessary to set the focus back
- QString cancelText;
+ TQWidget *m_parent; // necessary to set the focus back
+ TQString cancelText;
bool tabHandling;
bool down_workaround;
bool upwardBox;
bool emitSelected;
};
-KCompletionBox::KCompletionBox( QWidget *parent, const char *name )
+KCompletionBox::KCompletionBox( TQWidget *parent, const char *name )
:KListBox( parent, name, WType_Popup ), d(new KCompletionBoxPrivate)
{
@@ -56,7 +56,7 @@ KCompletionBox::KCompletionBox( QWidget *parent, const char *name )
setColumnMode( 1 );
setLineWidth( 1 );
- setFrameStyle( QFrame::Box | QFrame::Plain );
+ setFrameStyle( TQFrame::Box | TQFrame::Plain );
if ( parent )
setFocusProxy( parent );
@@ -66,14 +66,14 @@ KCompletionBox::KCompletionBox( QWidget *parent, const char *name )
setVScrollBarMode( Auto );
setHScrollBarMode( AlwaysOff );
- connect( this, SIGNAL( doubleClicked( QListBoxItem * )),
- SLOT( slotActivated( QListBoxItem * )) );
+ connect( this, TQT_SIGNAL( doubleClicked( TQListBoxItem * )),
+ TQT_SLOT( slotActivated( TQListBoxItem * )) );
- // grmbl, just QListBox workarounds :[ Thanks Volker.
- connect( this, SIGNAL( currentChanged( QListBoxItem * )),
- SLOT( slotCurrentChanged() ));
- connect( this, SIGNAL( clicked( QListBoxItem * )),
- SLOT( slotItemClicked( QListBoxItem * )) );
+ // grmbl, just TQListBox workarounds :[ Thanks Volker.
+ connect( this, TQT_SIGNAL( currentChanged( TQListBoxItem * )),
+ TQT_SLOT( slotCurrentChanged() ));
+ connect( this, TQT_SIGNAL( clicked( TQListBoxItem * )),
+ TQT_SLOT( slotItemClicked( TQListBoxItem * )) );
}
KCompletionBox::~KCompletionBox()
@@ -82,11 +82,11 @@ KCompletionBox::~KCompletionBox()
delete d;
}
-QStringList KCompletionBox::items() const
+TQStringList KCompletionBox::items() const
{
- QStringList list;
+ TQStringList list;
- const QListBoxItem* currItem = firstItem();
+ const TQListBoxItem* currItem = firstItem();
while (currItem) {
list.append(currItem->text());
@@ -96,7 +96,7 @@ QStringList KCompletionBox::items() const
return list;
}
-void KCompletionBox::slotActivated( QListBoxItem *item )
+void KCompletionBox::slotActivated( TQListBoxItem *item )
{
if ( !item )
return;
@@ -105,14 +105,14 @@ void KCompletionBox::slotActivated( QListBoxItem *item )
emit activated( item->text() );
}
-bool KCompletionBox::eventFilter( QObject *o, QEvent *e )
+bool KCompletionBox::eventFilter( TQObject *o, TQEvent *e )
{
int type = e->type();
if ( o == d->m_parent ) {
if ( isVisible() ) {
- if ( type == QEvent::KeyPress ) {
- QKeyEvent *ev = static_cast<QKeyEvent *>( e );
+ if ( type == TQEvent::KeyPress ) {
+ TQKeyEvent *ev = static_cast<TQKeyEvent *>( e );
switch ( ev->key() ) {
case Key_BackTab:
if ( d->tabHandling && (ev->state() == NoButton ||
@@ -137,8 +137,8 @@ bool KCompletionBox::eventFilter( QObject *o, QEvent *e )
// If there is no selected item and we've popped up above
// our parent, select the first item when they press up.
if ( selectedItem() ||
- mapToGlobal( QPoint( 0, 0 ) ).y() >
- d->m_parent->mapToGlobal( QPoint( 0, 0 ) ).y() )
+ mapToGlobal( TQPoint( 0, 0 ) ).y() >
+ d->m_parent->mapToGlobal( TQPoint( 0, 0 ) ).y() )
up();
else
down();
@@ -182,10 +182,10 @@ bool KCompletionBox::eventFilter( QObject *o, QEvent *e )
break;
}
}
- else if ( type == QEvent::AccelOverride ) {
+ else if ( type == TQEvent::AccelOverride ) {
// Override any acceleartors that match
// the key sequences we use here...
- QKeyEvent *ev = static_cast<QKeyEvent *>( e );
+ TQKeyEvent *ev = static_cast<TQKeyEvent *>( e );
switch ( ev->key() ) {
case Key_Down:
case Key_Up:
@@ -220,21 +220,21 @@ bool KCompletionBox::eventFilter( QObject *o, QEvent *e )
}
// parent loses focus or gets a click -> we hide
- else if ( type == QEvent::FocusOut || type == QEvent::Resize ||
- type == QEvent::Close || type == QEvent::Hide ||
- type == QEvent::Move ) {
+ else if ( type == TQEvent::FocusOut || type == TQEvent::Resize ||
+ type == TQEvent::Close || type == TQEvent::Hide ||
+ type == TQEvent::Move ) {
hide();
}
}
}
// any mouse-click on something else than "this" makes us hide
- else if ( type == QEvent::MouseButtonPress ) {
- QMouseEvent *ev = static_cast<QMouseEvent *>( e );
+ else if ( type == TQEvent::MouseButtonPress ) {
+ TQMouseEvent *ev = static_cast<TQMouseEvent *>( e );
if ( !rect().contains( ev->pos() )) // this widget
hide();
- if ( !d->emitSelected && currentItem() && !::qt_cast<QScrollBar*>(o) )
+ if ( !d->emitSelected && currentItem() && !::qt_cast<TQScrollBar*>(o) )
{
emit highlighted( currentText() );
hide();
@@ -268,16 +268,16 @@ void KCompletionBox::popup()
void KCompletionBox::sizeAndPosition()
{
int currentGeom = height();
- QPoint currentPos = pos();
- QRect geom = calculateGeometry();
+ TQPoint currentPos = pos();
+ TQRect geom = calculateGeometry();
resize( geom.size() );
int x = currentPos.x(), y = currentPos.y();
if ( d->m_parent ) {
if ( !isVisible() ) {
- QRect screenSize = KGlobalSettings::desktopGeometry(d->m_parent);
+ TQRect screenSize = KGlobalSettings::desktopGeometry(d->m_parent);
- QPoint orig = d->m_parent->mapToGlobal( QPoint(0, d->m_parent->height()) );
+ TQPoint orig = d->m_parent->mapToGlobal( TQPoint(0, d->m_parent->height()) );
x = orig.x() + geom.x();
y = orig.y() + geom.y();
@@ -312,7 +312,7 @@ void KCompletionBox::show()
// Workaround for I'm not sure whose bug - if this KCompletionBox' parent
// is in a layout, that layout will detect inserting new child (posted
// ChildInserted event), and will trigger relayout (post LayoutHint event).
- // QWidget::show() sends also posted ChildInserted events for the parent,
+ // TQWidget::show() sends also posted ChildInserted events for the parent,
// and later all LayoutHint events, which causes layout updating.
// The problem is, KCompletionBox::eventFilter() detects resizing
// of the parent, and calls hide() - and this hide() happen in the middle
@@ -325,11 +325,11 @@ void KCompletionBox::hide()
{
if ( d->m_parent )
qApp->removeEventFilter( this );
- d->cancelText = QString::null;
+ d->cancelText = TQString::null;
KListBox::hide();
}
-QRect KCompletionBox::calculateGeometry() const
+TQRect KCompletionBox::calculateGeometry() const
{
int x = 0, y = 0;
int ih = itemHeight();
@@ -341,17 +341,17 @@ QRect KCompletionBox::calculateGeometry() const
//If we're inside a combox, Qt by default makes the dropdown
// as wide as the combo, and gives the style a chance
// to adjust it. Do that here as well, for consistency
- const QObject* combo;
+ const TQObject* combo;
if ( d->m_parent && (combo = d->m_parent->parent() ) &&
- combo->inherits("QComboBox") )
+ combo->inherits("TQComboBox") )
{
- const QComboBox* cb = static_cast<const QComboBox*>(combo);
+ const TQComboBox* cb = static_cast<const TQComboBox*>(combo);
//Expand to the combo width
w = QMAX( w, cb->width() );
- QPoint parentCorner = d->m_parent->mapToGlobal(QPoint(0, 0));
- QPoint comboCorner = cb->mapToGlobal(QPoint(0, 0));
+ TQPoint parentCorner = d->m_parent->mapToGlobal(TQPoint(0, 0));
+ TQPoint comboCorner = cb->mapToGlobal(TQPoint(0, 0));
//We need to adjust our horizontal position to also be WRT to the combo
x += comboCorner.x() - parentCorner.x();
@@ -361,19 +361,19 @@ QRect KCompletionBox::calculateGeometry() const
comboCorner.y() - parentCorner.y();
//Ask the style to refine this a bit
- QRect styleAdj = style().querySubControlMetrics(QStyle::CC_ComboBox,
- cb, QStyle::SC_ComboBoxListBoxPopup,
- QStyleOption(x, y, w, h));
- //QCommonStyle returns QRect() by default, so this is what we get if the
+ TQRect styleAdj = style().querySubControlMetrics(TQStyle::CC_ComboBox,
+ cb, TQStyle::SC_ComboBoxListBoxPopup,
+ TQStyleOption(x, y, w, h));
+ //TQCommonStyle returns TQRect() by default, so this is what we get if the
//style doesn't implement this
if (!styleAdj.isNull())
return styleAdj;
}
- return QRect(x, y, w, h);
+ return TQRect(x, y, w, h);
}
-QSize KCompletionBox::sizeHint() const
+TQSize KCompletionBox::sizeHint() const
{
return calculateGeometry().size();
}
@@ -433,12 +433,12 @@ bool KCompletionBox::isTabHandling() const
return d->tabHandling;
}
-void KCompletionBox::setCancelledText( const QString& text )
+void KCompletionBox::setCancelledText( const TQString& text )
{
d->cancelText = text;
}
-QString KCompletionBox::cancelledText() const
+TQString KCompletionBox::cancelledText() const
{
return d->cancelText;
}
@@ -455,7 +455,7 @@ class KCompletionBoxItem : public QListBoxItem
{
public:
//Returns true if dirty.
- bool reuse( const QString& newText )
+ bool reuse( const TQString& newText )
{
if ( text() == newText )
return false;
@@ -465,7 +465,7 @@ public:
};
-void KCompletionBox::insertItems( const QStringList& items, int index )
+void KCompletionBox::insertItems( const TQStringList& items, int index )
{
bool block = signalsBlocked();
blockSignals( true );
@@ -474,12 +474,12 @@ void KCompletionBox::insertItems( const QStringList& items, int index )
d->down_workaround = true;
}
-void KCompletionBox::setItems( const QStringList& items )
+void KCompletionBox::setItems( const TQStringList& items )
{
bool block = signalsBlocked();
blockSignals( true );
- QListBoxItem* item = firstItem();
+ TQListBoxItem* item = firstItem();
if ( !item ) {
insertStringList( items );
}
@@ -489,8 +489,8 @@ void KCompletionBox::setItems( const QStringList& items )
//to reduce flicker
bool dirty = false;
- QStringList::ConstIterator it = items.constBegin();
- const QStringList::ConstIterator itEnd = items.constEnd();
+ TQStringList::ConstIterator it = items.constBegin();
+ const TQStringList::ConstIterator itEnd = items.constEnd();
for ( ; it != itEnd; ++it) {
if ( item ) {
@@ -501,7 +501,7 @@ void KCompletionBox::setItems( const QStringList& items )
else {
dirty = true;
//Inserting an item is a way of making this dirty
- insertItem( new QListBoxText( *it ) );
+ insertItem( new TQListBoxText( *it ) );
}
}
@@ -510,7 +510,7 @@ void KCompletionBox::setItems( const QStringList& items )
dirty = true;
}
- QListBoxItem* tmp = item;
+ TQListBoxItem* tmp = item;
while ( (item = tmp ) ) {
tmp = item->next();
delete item;
@@ -532,7 +532,7 @@ void KCompletionBox::slotCurrentChanged()
d->down_workaround = false;
}
-void KCompletionBox::slotItemClicked( QListBoxItem *item )
+void KCompletionBox::slotItemClicked( TQListBoxItem *item )
{
if ( item )
{
diff --git a/kdeui/kcompletionbox.h b/kdeui/kcompletionbox.h
index f7669802d..2b536d172 100644
--- a/kdeui/kcompletionbox.h
+++ b/kdeui/kcompletionbox.h
@@ -24,7 +24,7 @@
#define KCOMPLETIONBOX_H
class QEvent;
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <klistbox.h>
/**
@@ -44,7 +44,7 @@ class KDEUI_EXPORT KCompletionBox : public KListBox
{
Q_OBJECT
Q_PROPERTY( bool isTabHandling READ isTabHandling WRITE setTabHandling )
- Q_PROPERTY(QString cancelledText READ cancelledText WRITE setCancelledText)
+ Q_PROPERTY(TQString cancelledText READ cancelledText WRITE setCancelledText)
Q_PROPERTY( bool activateOnSelect READ activateOnSelect WRITE setActivateOnSelect )
public:
@@ -54,14 +54,14 @@ public:
* The parent widget is used to give the focus back when pressing the
* up-button on the very first item.
*/
- KCompletionBox( QWidget *parent, const char *name = 0 );
+ KCompletionBox( TQWidget *parent, const char *name = 0 );
/**
* Destroys the box
*/
~KCompletionBox();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* @returns true if selecting an item results in the emition of the selected signal.
@@ -74,19 +74,19 @@ public slots:
/**
* Returns a list of all items currently in the box.
*/
- QStringList items() const;
+ TQStringList items() const;
/**
* Inserts @p items into the box. Does not clear the items before.
* @p index determines at which position @p items will be inserted.
* (defaults to appending them at the end)
*/
- void insertItems( const QStringList& items, int index = -1 );
+ void insertItems( const TQStringList& items, int index = -1 );
/**
* Clears the box and inserts @p items.
*/
- void setItems( const QStringList& items );
+ void setItems( const TQStringList& items );
/**
* Adjusts the size of the box to fit the width of the parent given in the
@@ -129,15 +129,15 @@ public slots:
* If the canceled text is not set through this function, the
* userCancelled signal will not be emitted.
*
- * @see userCancelled( const QString& )
+ * @see userCancelled( const TQString& )
* @param txt the text to be emitted if the user cancels this box
*/
- void setCancelledText( const QString& txt);
+ void setCancelledText( const TQString& txt);
/**
- * @returns the text set via setCancelledText() or QString::null.
+ * @returns the text set via setCancelledText() or TQString::null.
*/
- QString cancelledText() const;
+ TQString cancelledText() const;
/**
* Set whether or not the selected signal should be emitted when an
@@ -194,21 +194,21 @@ signals:
* Emitted when an item was selected, contains the text of
* the selected item.
*/
- void activated( const QString& );
+ void activated( const TQString& );
/**
* Emitted whenever the user chooses to ignore the available
* selections and close the this box.
*/
- void userCancelled( const QString& );
+ void userCancelled( const TQString& );
protected:
/**
* This calculates the size of the dropdown and the relative position of the top
* left corner with respect to the parent widget. This matches the geometry and position
- * normally used by K/QComboBox when used with one.
+ * normally used by K/TQComboBox when used with one.
*/
- QRect calculateGeometry() const;
+ TQRect calculateGeometry() const;
/**
* This properly sizes and positions the listbox.
@@ -219,20 +219,20 @@ protected:
* Reimplemented from KListBox to get events from the viewport (to hide
* this widget on mouse-click, Escape-presses, etc.
*/
- virtual bool eventFilter( QObject *, QEvent * );
+ virtual bool eventFilter( TQObject *, TQEvent * );
protected slots:
/**
* Called when an item was activated. Emits
* activated() with the item.
*/
- virtual void slotActivated( QListBoxItem * );
+ virtual void slotActivated( TQListBoxItem * );
private slots:
- void slotSetCurrentItem( QListBoxItem *i ) { setCurrentItem( i ); } // grrr
+ void slotSetCurrentItem( TQListBoxItem *i ) { setCurrentItem( i ); } // grrr
void slotCurrentChanged();
void canceled();
- void slotItemClicked( QListBoxItem * );
+ void slotItemClicked( TQListBoxItem * );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kconfigdialog.cpp b/kdeui/kconfigdialog.cpp
index 9410379d9..3d5bfd697 100644
--- a/kdeui/kconfigdialog.cpp
+++ b/kdeui/kconfigdialog.cpp
@@ -27,11 +27,11 @@
#include <kiconloader.h>
#include <kdebug.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qmap.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqmap.h>
-QAsciiDict<KConfigDialog> KConfigDialog::openDialogs;
+TQAsciiDict<KConfigDialog> KConfigDialog::openDialogs;
// This class is here purly so we don't break binary compatibility down the road.
class KConfigDialog::KConfigDialogPrivate
@@ -43,10 +43,10 @@ public:
bool shown;
KDialogBase::DialogType type;
KConfigDialogManager *manager;
- QMap<QWidget *, KConfigDialogManager *> managerForPage;
+ TQMap<TQWidget *, KConfigDialogManager *> managerForPage;
};
-KConfigDialog::KConfigDialog( QWidget *parent, const char *name,
+KConfigDialog::KConfigDialog( TQWidget *parent, const char *name,
KConfigSkeleton *config,
DialogType dialogType,
int dialogButtons,
@@ -59,17 +59,17 @@ KConfigDialog::KConfigDialog( QWidget *parent, const char *name,
if ( name ) {
openDialogs.insert(name, this);
} else {
- QCString genericName;
+ TQCString genericName;
genericName.sprintf("SettingsDialog-%p", this);
openDialogs.insert(genericName, this);
setName(genericName);
}
- connect(this, SIGNAL(okClicked()), this, SLOT(updateSettings()));
- connect(this, SIGNAL(applyClicked()), this, SLOT(updateSettings()));
- connect(this, SIGNAL(applyClicked()), this, SLOT(updateButtons()));
- connect(this, SIGNAL(defaultClicked()), this, SLOT(updateWidgetsDefault()));
- connect(this, SIGNAL(defaultClicked()), this, SLOT(updateButtons()));
+ connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(updateSettings()));
+ connect(this, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(updateSettings()));
+ connect(this, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(updateButtons()));
+ connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateWidgetsDefault()));
+ connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateButtons()));
d->manager = new KConfigDialogManager(this, config);
setupManagerConnections(d->manager);
@@ -83,10 +83,10 @@ KConfigDialog::~KConfigDialog()
delete d;
}
-void KConfigDialog::addPage(QWidget *page,
- const QString &itemName,
- const QString &pixmapName,
- const QString &header,
+void KConfigDialog::addPage(TQWidget *page,
+ const TQString &itemName,
+ const TQString &pixmapName,
+ const TQString &header,
bool manage)
{
addPageInternal(page, itemName, pixmapName, header);
@@ -94,21 +94,21 @@ void KConfigDialog::addPage(QWidget *page,
d->manager->addWidget(page);
}
-void KConfigDialog::addPage(QWidget *page,
+void KConfigDialog::addPage(TQWidget *page,
KConfigSkeleton *config,
- const QString &itemName,
- const QString &pixmapName,
- const QString &header)
+ const TQString &itemName,
+ const TQString &pixmapName,
+ const TQString &header)
{
addPageInternal(page, itemName, pixmapName, header);
d->managerForPage[page] = new KConfigDialogManager(page, config);
setupManagerConnections(d->managerForPage[page]);
}
-void KConfigDialog::addPageInternal(QWidget *page,
- const QString &itemName,
- const QString &pixmapName,
- const QString &header)
+void KConfigDialog::addPageInternal(TQWidget *page,
+ const TQString &itemName,
+ const TQString &pixmapName,
+ const TQString &header)
{
if(d->shown)
{
@@ -120,25 +120,25 @@ void KConfigDialog::addPageInternal(QWidget *page,
case TreeList:
case IconList:
case Tabbed: {
- QVBox *frame = addVBoxPage(itemName, header, SmallIcon(pixmapName, 32));
+ TQVBox *frame = addVBoxPage(itemName, header, SmallIcon(pixmapName, 32));
frame->setSpacing( 0 );
frame->setMargin( 0 );
- page->reparent(((QWidget*)frame), 0, QPoint());
+ page->reparent(((TQWidget*)frame), 0, TQPoint());
}
break;
case Swallow:
{
- page->reparent(this, 0, QPoint());
+ page->reparent(this, 0, TQPoint());
setMainWidget(page);
}
break;
case Plain:
{
- QFrame *main = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout( main, 0, 0 );
- page->reparent(((QWidget*)main), 0, QPoint());
+ TQFrame *main = plainPage();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( main, 0, 0 );
+ page->reparent(((TQWidget*)main), 0, TQPoint());
topLayout->addWidget( page );
}
break;
@@ -150,12 +150,12 @@ void KConfigDialog::addPageInternal(QWidget *page,
void KConfigDialog::setupManagerConnections(KConfigDialogManager *manager)
{
- connect(manager, SIGNAL(settingsChanged()), this, SLOT(settingsChangedSlot()));
- connect(manager, SIGNAL(widgetModified()), this, SLOT(updateButtons()));
+ connect(manager, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(settingsChangedSlot()));
+ connect(manager, TQT_SIGNAL(widgetModified()), this, TQT_SLOT(updateButtons()));
- connect(this, SIGNAL(okClicked()), manager, SLOT(updateSettings()));
- connect(this, SIGNAL(applyClicked()), manager, SLOT(updateSettings()));
- connect(this, SIGNAL(defaultClicked()), manager, SLOT(updateWidgetsDefault()));
+ connect(this, TQT_SIGNAL(okClicked()), manager, TQT_SLOT(updateSettings()));
+ connect(this, TQT_SIGNAL(applyClicked()), manager, TQT_SLOT(updateSettings()));
+ connect(this, TQT_SIGNAL(defaultClicked()), manager, TQT_SLOT(updateWidgetsDefault()));
}
KConfigDialog* KConfigDialog::exists(const char* name)
@@ -177,7 +177,7 @@ void KConfigDialog::updateButtons()
if (only_once) return;
only_once = true;
- QMap<QWidget *, KConfigDialogManager *>::iterator it;
+ TQMap<TQWidget *, KConfigDialogManager *>::iterator it;
bool has_changed = d->manager->hasChanged() || hasChanged();
for (it = d->managerForPage.begin();
@@ -213,7 +213,7 @@ void KConfigDialog::settingsChangedSlot()
void KConfigDialog::show()
{
- QMap<QWidget *, KConfigDialogManager *>::iterator it;
+ TQMap<TQWidget *, KConfigDialogManager *>::iterator it;
updateWidgets();
d->manager->updateWidgets();
diff --git a/kdeui/kconfigdialog.h b/kdeui/kconfigdialog.h
index fa0409f29..6c2061e88 100644
--- a/kdeui/kconfigdialog.h
+++ b/kdeui/kconfigdialog.h
@@ -25,7 +25,7 @@ class KConfig;
class KConfigSkeleton;
class KConfigDialogManager;
#include <kdialogbase.h>
-#include <qasciidict.h>
+#include <tqasciidict.h>
/**
* \short Standard %KDE configuration dialog class
@@ -52,8 +52,8 @@ class KConfigDialogManager;
* KConfigDialog *dialog = new KConfigDialog(this, "settings", MySettings::self(), KDialogBase::IconList);
* dialog->addPage(new General(0, "General"), i18n("General") );
* dialog->addPage(new Appearance(0, "Style"), i18n("Appearance") );
- * connect(dialog, SIGNAL(settingsChanged()), mainWidget, SLOT(loadSettings()));
- * connect(dialog, SIGNAL(settingsChanged()), this, SLOT(loadSettings()));
+ * connect(dialog, TQT_SIGNAL(settingsChanged()), mainWidget, TQT_SLOT(loadSettings()));
+ * connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(loadSettings()));
* dialog->show();
* }
* \endcode
@@ -120,7 +120,7 @@ public:
*/
// KDE4: Add the "separator" parameter as in KDialogBase
// Make "dialogType" an int
- KConfigDialog( QWidget *parent, const char *name,
+ KConfigDialog( TQWidget *parent, const char *name,
KConfigSkeleton *config,
DialogType dialogType = IconList,
int dialogButtons = Default|Ok|Apply|Cancel|Help,
@@ -149,9 +149,9 @@ public:
* @param manage - Whether KConfigDialogManager should manage the page or not.
*/
// KDE4: Add a default value for itemName & pixmapName
- void addPage( QWidget *page, const QString &itemName,
- const QString &pixmapName,
- const QString &header=QString::null,
+ void addPage( TQWidget *page, const TQString &itemName,
+ const TQString &pixmapName,
+ const TQString &header=TQString::null,
bool manage=true );
/**
@@ -171,10 +171,10 @@ public:
* mode. If empty, the itemName text is used when needed.
*/
// KDE4: Add a default value for itemName & pixmapName
- void addPage( QWidget *page, KConfigSkeleton *config,
- const QString &itemName,
- const QString &pixmapName,
- const QString &header=QString::null );
+ void addPage( TQWidget *page, KConfigSkeleton *config,
+ const TQString &itemName,
+ const TQString &pixmapName,
+ const TQString &header=TQString::null );
/**
* See if a dialog with the name 'name' already exists.
@@ -253,8 +253,8 @@ private:
/**
* Internal function with common addPage code.
*/
- void addPageInternal(QWidget *page, const QString &itemName,
- const QString &pixmapName, const QString &header);
+ void addPageInternal(TQWidget *page, const TQString &itemName,
+ const TQString &pixmapName, const TQString &header);
/**
* Sets the connections from a manager to the dialog (and the other
@@ -266,7 +266,7 @@ private:
/**
* The list of existing dialogs.
*/
- static QAsciiDict<KConfigDialog> openDialogs;
+ static TQAsciiDict<KConfigDialog> openDialogs;
class KConfigDialogPrivate;
/**
diff --git a/kdeui/kcursor.cpp b/kdeui/kcursor.cpp
index 74e37327d..02f8723f5 100644
--- a/kdeui/kcursor.cpp
+++ b/kdeui/kcursor.cpp
@@ -24,15 +24,15 @@
#include <kcursor.h>
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qevent.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <kglobal.h>
#include <kconfig.h>
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include "kcursor_private.h"
@@ -40,9 +40,9 @@ KCursor::KCursor()
{
}
-QCursor KCursor::handCursor()
+TQCursor KCursor::handCursor()
{
- static QCursor *hand_cursor = 0;
+ static TQCursor *hand_cursor = 0;
if (!hand_cursor)
{
@@ -66,16 +66,16 @@ QCursor KCursor::handCursor()
0xf8, 0xff, 0x07, 0xf8, 0xff, 0x07, 0xf8, 0xff, 0x07, 0xf8, 0xff,
0x07, 0xf8, 0xff, 0x07, 0xf0, 0xff, 0x07, 0xf0, 0xff, 0x07, 0xe0,
0xff, 0x03, 0xc0, 0xff, 0x03, 0xc0, 0xff, 0x01, 0xc0, 0xff, 0x01};
- QBitmap hand_bitmap(22, 22, HAND_BITS, true);
- QBitmap hand_mask(22, 22, HAND_MASK_BITS, true);
- hand_cursor = new QCursor(hand_bitmap, hand_mask, 7, 0);
- // Hack to force QCursor to call XCreatePixmapCursor() immediately
+ TQBitmap hand_bitmap(22, 22, HAND_BITS, true);
+ TQBitmap hand_mask(22, 22, HAND_MASK_BITS, true);
+ hand_cursor = new TQCursor(hand_bitmap, hand_mask, 7, 0);
+ // Hack to force TQCursor to call XCreatePixmapCursor() immediately
// so the bitmaps don't get pushed out of the Xcursor LRU cache.
hand_cursor->handle();
}
else
#endif //! Q_WS_WIN
- hand_cursor = new QCursor(PointingHandCursor);
+ hand_cursor = new TQCursor(PointingHandCursor);
}
Q_CHECK_PTR(hand_cursor);
@@ -122,15 +122,15 @@ static const char * const working_cursor_xpm[]={
"################################"};
-QCursor KCursor::workingCursor()
+TQCursor KCursor::workingCursor()
{
- static QCursor *working_cursor = 0;
+ static TQCursor *working_cursor = 0;
if (!working_cursor)
{
- QPixmap pm( const_cast< const char** >( working_cursor_xpm ));
- working_cursor = new QCursor( pm, 1, 1 );
- // Hack to force QCursor to call XCreatePixmapCursor() immediately
+ TQPixmap pm( const_cast< const char** >( working_cursor_xpm ));
+ working_cursor = new TQCursor( pm, 1, 1 );
+ // Hack to force TQCursor to call XCreatePixmapCursor() immediately
// so the bitmaps don't get pushed out of the Xcursor LRU cache.
working_cursor->handle();
}
@@ -143,90 +143,90 @@ QCursor KCursor::workingCursor()
* All of the follow functions will return the Qt default for now regardless
* of the style. This will change at some later date
*/
-QCursor KCursor::arrowCursor()
+TQCursor KCursor::arrowCursor()
{
return Qt::arrowCursor;
}
-QCursor KCursor::upArrowCursor()
+TQCursor KCursor::upArrowCursor()
{
return Qt::upArrowCursor;
}
-QCursor KCursor::crossCursor()
+TQCursor KCursor::crossCursor()
{
return Qt::crossCursor;
}
-QCursor KCursor::waitCursor()
+TQCursor KCursor::waitCursor()
{
return Qt::waitCursor;
}
-QCursor KCursor::ibeamCursor()
+TQCursor KCursor::ibeamCursor()
{
return Qt::ibeamCursor;
}
-QCursor KCursor::sizeVerCursor()
+TQCursor KCursor::sizeVerCursor()
{
return Qt::sizeVerCursor;
}
-QCursor KCursor::sizeHorCursor()
+TQCursor KCursor::sizeHorCursor()
{
return Qt::sizeHorCursor;
}
-QCursor KCursor::sizeBDiagCursor()
+TQCursor KCursor::sizeBDiagCursor()
{
return Qt::sizeBDiagCursor;
}
-QCursor KCursor::sizeFDiagCursor()
+TQCursor KCursor::sizeFDiagCursor()
{
return Qt::sizeFDiagCursor;
}
-QCursor KCursor::sizeAllCursor()
+TQCursor KCursor::sizeAllCursor()
{
return Qt::sizeAllCursor;
}
-QCursor KCursor::blankCursor()
+TQCursor KCursor::blankCursor()
{
return Qt::blankCursor;
}
-QCursor KCursor::whatsThisCursor()
+TQCursor KCursor::whatsThisCursor()
{
return Qt::whatsThisCursor;
}
// auto-hide cursor stuff
-void KCursor::setAutoHideCursor( QWidget *w, bool enable )
+void KCursor::setAutoHideCursor( TQWidget *w, bool enable )
{
setAutoHideCursor( w, enable, false );
}
-void KCursor::setAutoHideCursor( QWidget *w, bool enable,
+void KCursor::setAutoHideCursor( TQWidget *w, bool enable,
bool customEventFilter )
{
KCursorPrivate::self()->setAutoHideCursor( w, enable, customEventFilter );
}
-void KCursor::autoHideEventFilter( QObject *o, QEvent *e )
+void KCursor::autoHideEventFilter( TQObject *o, TQEvent *e )
{
KCursorPrivate::self()->eventFilter( o, e );
}
@@ -243,15 +243,15 @@ int KCursor::hideCursorDelay()
// **************************************************************************
-KCursorPrivateAutoHideEventFilter::KCursorPrivateAutoHideEventFilter( QWidget* widget )
+KCursorPrivateAutoHideEventFilter::KCursorPrivateAutoHideEventFilter( TQWidget* widget )
: m_widget( widget )
, m_wasMouseTracking( m_widget->hasMouseTracking() )
, m_isCursorHidden( false )
, m_isOwnCursor( false )
{
m_widget->setMouseTracking( true );
- connect( &m_autoHideTimer, SIGNAL( timeout() ),
- this, SLOT( hideCursor() ) );
+ connect( &m_autoHideTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( hideCursor() ) );
}
KCursorPrivateAutoHideEventFilter::~KCursorPrivateAutoHideEventFilter()
@@ -274,7 +274,7 @@ void KCursorPrivateAutoHideEventFilter::hideCursor()
m_isCursorHidden = true;
- QWidget* w = actualWidget();
+ TQWidget* w = actualWidget();
m_isOwnCursor = w->ownCursor();
if ( m_isOwnCursor )
@@ -292,7 +292,7 @@ void KCursorPrivateAutoHideEventFilter::unhideCursor()
m_isCursorHidden = false;
- QWidget* w = actualWidget();
+ TQWidget* w = actualWidget();
if ( w->cursor().shape() != Qt::BlankCursor ) // someone messed with the cursor already
return;
@@ -303,46 +303,46 @@ void KCursorPrivateAutoHideEventFilter::unhideCursor()
w->unsetCursor();
}
-QWidget* KCursorPrivateAutoHideEventFilter::actualWidget() const
+TQWidget* KCursorPrivateAutoHideEventFilter::actualWidget() const
{
- QWidget* w = m_widget;
+ TQWidget* w = m_widget;
// Is w a scrollview ? Call setCursor on the viewport in that case.
- QScrollView * sv = dynamic_cast<QScrollView *>( w );
+ TQScrollView * sv = dynamic_cast<TQScrollView *>( w );
if ( sv )
w = sv->viewport();
return w;
}
-bool KCursorPrivateAutoHideEventFilter::eventFilter( QObject *o, QEvent *e )
+bool KCursorPrivateAutoHideEventFilter::eventFilter( TQObject *o, TQEvent *e )
{
Q_ASSERT( o == m_widget );
switch ( e->type() )
{
- case QEvent::Create:
+ case TQEvent::Create:
// Qt steals mouseTracking on create()
m_widget->setMouseTracking( true );
break;
- case QEvent::Leave:
- case QEvent::FocusOut:
- case QEvent::WindowDeactivate:
+ case TQEvent::Leave:
+ case TQEvent::FocusOut:
+ case TQEvent::WindowDeactivate:
unhideCursor();
break;
- case QEvent::KeyPress:
- case QEvent::AccelOverride:
+ case TQEvent::KeyPress:
+ case TQEvent::AccelOverride:
hideCursor();
break;
- case QEvent::Enter:
- case QEvent::FocusIn:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseMove:
- case QEvent::Show:
- case QEvent::Hide:
- case QEvent::Wheel:
+ case TQEvent::Enter:
+ case TQEvent::FocusIn:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::MouseMove:
+ case TQEvent::Show:
+ case TQEvent::Hide:
+ case TQEvent::Wheel:
unhideCursor();
if ( m_widget->hasFocus() )
m_autoHideTimer.start( KCursorPrivate::self()->hideCursorDelay, true );
@@ -370,16 +370,16 @@ KCursorPrivate::KCursorPrivate()
hideCursorDelay = 5000; // 5s default value
KConfig *kc = KGlobal::config();
- KConfigGroupSaver ks( kc, QString::fromLatin1("KDE") );
+ KConfigGroupSaver ks( kc, TQString::fromLatin1("KDE") );
enabled = kc->readBoolEntry(
- QString::fromLatin1("Autohiding cursor enabled"), true );
+ TQString::fromLatin1("Autohiding cursor enabled"), true );
}
KCursorPrivate::~KCursorPrivate()
{
}
-void KCursorPrivate::setAutoHideCursor( QWidget *w, bool enable, bool customEventFilter )
+void KCursorPrivate::setAutoHideCursor( TQWidget *w, bool enable, bool customEventFilter )
{
if ( !w || !enabled )
return;
@@ -392,8 +392,8 @@ void KCursorPrivate::setAutoHideCursor( QWidget *w, bool enable, bool customEven
m_eventFilters.insert( w, filter );
if ( !customEventFilter )
w->installEventFilter( filter );
- connect( w, SIGNAL( destroyed(QObject*) ),
- this, SLOT( slotWidgetDestroyed(QObject*) ) );
+ connect( w, TQT_SIGNAL( destroyed(TQObject*) ),
+ this, TQT_SLOT( slotWidgetDestroyed(TQObject*) ) );
}
else
{
@@ -402,12 +402,12 @@ void KCursorPrivate::setAutoHideCursor( QWidget *w, bool enable, bool customEven
return;
w->removeEventFilter( filter );
delete filter;
- disconnect( w, SIGNAL( destroyed(QObject*) ),
- this, SLOT( slotWidgetDestroyed(QObject*) ) );
+ disconnect( w, TQT_SIGNAL( destroyed(TQObject*) ),
+ this, TQT_SLOT( slotWidgetDestroyed(TQObject*) ) );
}
}
-bool KCursorPrivate::eventFilter( QObject *o, QEvent *e )
+bool KCursorPrivate::eventFilter( TQObject *o, TQEvent *e )
{
if ( !enabled )
return false;
@@ -421,7 +421,7 @@ bool KCursorPrivate::eventFilter( QObject *o, QEvent *e )
return filter->eventFilter( o, e );
}
-void KCursorPrivate::slotWidgetDestroyed( QObject* o )
+void KCursorPrivate::slotWidgetDestroyed( TQObject* o )
{
KCursorPrivateAutoHideEventFilter* filter = m_eventFilters.take( o );
diff --git a/kdeui/kcursor.h b/kdeui/kcursor.h
index 1c96c49b6..a7a75610c 100644
--- a/kdeui/kcursor.h
+++ b/kdeui/kcursor.h
@@ -23,15 +23,15 @@
#ifndef _KCURSOR_H
#define _KCURSOR_H
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kdelibs_export.h>
class QWidget;
/**
- * @short A QCursor wrapper allowing "themed" cursors and auto-hiding cursors.
+ * @short A TQCursor wrapper allowing "themed" cursors and auto-hiding cursors.
*
- * A wrapper around QCursor that allows for "themed" cursors.
+ * A wrapper around TQCursor that allows for "themed" cursors.
*
* Currently, the only themed cursor is a hand shaped cursor.
*
@@ -56,83 +56,83 @@ public:
* Returns the proper hand cursor according to
* the current GUI style (static function).
*/
- static QCursor handCursor();
+ static TQCursor handCursor();
/**
* Returns the proper arrow+hourglass cursor according to
* the current GUI style (static function).
*/
- static QCursor workingCursor();
+ static TQCursor workingCursor();
/**
* Returns the proper arrow cursor according to
* the current GUI style (static function).
*/
- static QCursor arrowCursor();
+ static TQCursor arrowCursor();
/**
* Returns the proper up arrow cursor according to
* the current GUI style (static function).
*/
- static QCursor upArrowCursor();
+ static TQCursor upArrowCursor();
/**
* Returns the proper cross-hair cursor according to
* the current GUI style (static function).
*/
- static QCursor crossCursor();
+ static TQCursor crossCursor();
/**
* Returns the proper hourglass cursor according to
* the current GUI style (static function).
*/
- static QCursor waitCursor();
+ static TQCursor waitCursor();
/**
* Returns the proper text cursor according to
* the current GUI style (static function).
*/
- static QCursor ibeamCursor();
+ static TQCursor ibeamCursor();
/**
* Returns the proper vertical resize cursor
* according to the current GUI style (static function).
*/
- static QCursor sizeVerCursor();
+ static TQCursor sizeVerCursor();
/**
* Returns the proper horizontal resize cursor
* according to the current GUI style (static function).
*/
- static QCursor sizeHorCursor();
+ static TQCursor sizeHorCursor();
/**
* Returns the proper diagonal resize (/) cursor
* according to the current GUI style (static function).
*/
- static QCursor sizeBDiagCursor();
+ static TQCursor sizeBDiagCursor();
/**
* Returns the proper diagonal resize (\) cursor
* according to the current GUI style (static function).
*/
- static QCursor sizeFDiagCursor();
+ static TQCursor sizeFDiagCursor();
/**
* Returns the proper all-directions resize cursor
* according to the current GUI style (static function).
*/
- static QCursor sizeAllCursor();
+ static TQCursor sizeAllCursor();
/**
* Returns a blank or invisible cursor (static function).
*/
- static QCursor blankCursor();
+ static TQCursor blankCursor();
/**
* Returns a WhatsThis cursor (static function).
*/
- static QCursor whatsThisCursor();
+ static TQCursor whatsThisCursor();
/**
* Sets auto-hiding the cursor for widget @p w. Enabling it will result in
@@ -153,10 +153,10 @@ public:
* mouseTracking.
*
* If you want to use auto-hiding for widgets that don't take focus, e.g.
- * a QCanvasView, then you have to pass all key-events that should trigger
+ * a TQCanvasView, then you have to pass all key-events that should trigger
* auto-hiding to autoHideEventFilter().
*/
- static void setAutoHideCursor( QWidget *w, bool enable );
+ static void setAutoHideCursor( TQWidget *w, bool enable );
/**
* Overloaded method for the case where you have an event-filter installed
@@ -167,7 +167,7 @@ public:
*
* @see autoHideEventFilter
*/
- static void setAutoHideCursor( QWidget *w, bool enable,
+ static void setAutoHideCursor( TQWidget *w, bool enable,
bool customEventFilter );
/**
@@ -201,7 +201,7 @@ public:
*
* [...]
*
- * bool YourClass::eventFilter( QObject *o, QEvent *e )
+ * bool YourClass::eventFilter( TQObject *o, TQEvent *e )
* {
* if ( o == edit ) // only that widget where you enabled auto-hide!
* KCursor::autoHideEventFilter( o, e );
@@ -214,10 +214,10 @@ public:
* Note that you must not call KCursor::autoHideEventFilter() when you
* didn't enable or after disabling auto-hiding.
*/
- static void autoHideEventFilter( QObject *, QEvent * );
+ static void autoHideEventFilter( TQObject *, TQEvent * );
private:
- static QCursor *s_handCursor;
+ static TQCursor *s_handCursor;
};
diff --git a/kdeui/kcursor_private.h b/kdeui/kcursor_private.h
index 0a85d0ec5..b1352bb6b 100644
--- a/kdeui/kcursor_private.h
+++ b/kdeui/kcursor_private.h
@@ -21,9 +21,9 @@
#ifndef KCURSOR_PRIVATE_H
#define KCURSOR_PRIVATE_H
-#include <qcursor.h>
-#include <qobject.h>
-#include <qptrdict.h>
+#include <tqcursor.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
class QPoint;
class QTimer;
@@ -41,10 +41,10 @@ class KCursorPrivateAutoHideEventFilter : public QObject
Q_OBJECT
public:
- KCursorPrivateAutoHideEventFilter( QWidget* widget );
+ KCursorPrivateAutoHideEventFilter( TQWidget* widget );
~KCursorPrivateAutoHideEventFilter();
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
void resetWidget();
@@ -53,14 +53,14 @@ private slots:
void unhideCursor();
private:
- QWidget* actualWidget() const;
+ TQWidget* actualWidget() const;
- QTimer m_autoHideTimer;
- QWidget* m_widget;
+ TQTimer m_autoHideTimer;
+ TQWidget* m_widget;
bool m_wasMouseTracking;
bool m_isCursorHidden;
bool m_isOwnCursor;
- QCursor m_oldCursor;
+ TQCursor m_oldCursor;
};
/**
@@ -76,13 +76,13 @@ class KCursorPrivate : public QObject
public:
static KCursorPrivate *self();
- void setAutoHideCursor( QWidget *w, bool enable, bool customEventFilter );
- virtual bool eventFilter( QObject *o, QEvent *e );
+ void setAutoHideCursor( TQWidget *w, bool enable, bool customEventFilter );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
int hideCursorDelay;
private slots:
- void slotWidgetDestroyed( QObject* );
+ void slotWidgetDestroyed( TQObject* );
private:
KCursorPrivate();
@@ -91,7 +91,7 @@ private:
bool enabled;
static KCursorPrivate *s_self;
- QPtrDict<KCursorPrivateAutoHideEventFilter> m_eventFilters;
+ TQPtrDict<KCursorPrivateAutoHideEventFilter> m_eventFilters;
};
diff --git a/kdeui/kdatepicker.cpp b/kdeui/kdatepicker.cpp
index ae9f97cb7..af9dede01 100644
--- a/kdeui/kdatepicker.cpp
+++ b/kdeui/kdatepicker.cpp
@@ -18,18 +18,18 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qframe.h>
-#include <qpainter.h>
-#include <qdialog.h>
-#include <qstyle.h>
-#include <qtoolbutton.h>
-#include <qcombobox.h>
-#include <qtooltip.h>
-#include <qfont.h>
-#include <qvalidator.h>
-#include <qpopupmenu.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqframe.h>
+#include <tqpainter.h>
+#include <tqdialog.h>
+#include <tqstyle.h>
+#include <tqtoolbutton.h>
+#include <tqcombobox.h>
+#include <tqtooltip.h>
+#include <tqfont.h>
+#include <tqvalidator.h>
+#include <tqpopupmenu.h>
+#include <tqtimer.h>
#include "kdatepicker.h"
#include <kglobal.h>
@@ -54,15 +54,15 @@ class KDatePicker::KDatePickerPrivate
public:
KDatePickerPrivate() : closeButton(0L), selectWeek(0L), todayButton(0), navigationLayout(0) {}
- void fillWeeksCombo(const QDate &date);
+ void fillWeeksCombo(const TQDate &date);
- QToolButton *closeButton;
- QComboBox *selectWeek;
- QToolButton *todayButton;
- QBoxLayout *navigationLayout;
+ TQToolButton *closeButton;
+ TQComboBox *selectWeek;
+ TQToolButton *todayButton;
+ TQBoxLayout *navigationLayout;
};
-void KDatePicker::fillWeeksCombo(const QDate &date)
+void KDatePicker::fillWeeksCombo(const TQDate &date)
{
// every year can have a different number of weeks
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
@@ -75,17 +75,17 @@ void KDatePicker::fillWeeksCombo(const QDate &date)
// We show all week numbers for all weeks between first day of year to last day of year
// This of course can be a list like 53,1,2..52
- QDate day;
+ TQDate day;
int year = calendar->year(date);
calendar->setYMD(day, year, 1, 1);
int lastMonth = calendar->monthsInYear(day);
- QDate lastDay, firstDayOfLastMonth;
+ TQDate lastDay, firstDayOfLastMonth;
calendar->setYMD(firstDayOfLastMonth, year, lastMonth, 1);
calendar->setYMD(lastDay, year, lastMonth, calendar->daysInMonth(firstDayOfLastMonth));
for (; day <= lastDay ; day = calendar->addDays(day, 7 /*calendar->daysOfWeek()*/) )
{
- QString week = i18n("Week %1").arg(calendar->weekNumber(day, &year));
+ TQString week = i18n("Week %1").arg(calendar->weekNumber(day, &year));
if ( year != calendar->year(day) ) week += "*"; // show that this is a week from a different year
d->selectWeek->insertItem(week);
@@ -96,53 +96,53 @@ void KDatePicker::fillWeeksCombo(const QDate &date)
}
}
-KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name)
- : QFrame(parent,name)
+KDatePicker::KDatePicker(TQWidget *parent, TQDate dt, const char *name)
+ : TQFrame(parent,name)
{
init( dt );
}
-KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name, WFlags f)
- : QFrame(parent,name, f)
+KDatePicker::KDatePicker(TQWidget *parent, TQDate dt, const char *name, WFlags f)
+ : TQFrame(parent,name, f)
{
init( dt );
}
-KDatePicker::KDatePicker( QWidget *parent, const char *name )
- : QFrame(parent,name)
+KDatePicker::KDatePicker( TQWidget *parent, const char *name )
+ : TQFrame(parent,name)
{
- init( QDate::currentDate() );
+ init( TQDate::currentDate() );
}
-void KDatePicker::init( const QDate &dt )
+void KDatePicker::init( const TQDate &dt )
{
d = new KDatePickerPrivate();
- QBoxLayout * topLayout = new QVBoxLayout(this);
+ TQBoxLayout * topLayout = new TQVBoxLayout(this);
- d->navigationLayout = new QHBoxLayout(topLayout);
+ d->navigationLayout = new TQHBoxLayout(topLayout);
d->navigationLayout->addStretch();
- yearBackward = new QToolButton(this);
+ yearBackward = new TQToolButton(this);
yearBackward->setAutoRaise(true);
d->navigationLayout->addWidget(yearBackward);
- monthBackward = new QToolButton(this);
+ monthBackward = new TQToolButton(this);
monthBackward ->setAutoRaise(true);
d->navigationLayout->addWidget(monthBackward);
d->navigationLayout->addSpacing(KDialog::spacingHint());
- selectMonth = new QToolButton(this);
+ selectMonth = new TQToolButton(this);
selectMonth ->setAutoRaise(true);
d->navigationLayout->addWidget(selectMonth);
- selectYear = new QToolButton(this);
+ selectYear = new TQToolButton(this);
selectYear->setToggleButton(true);
selectYear->setAutoRaise(true);
d->navigationLayout->addWidget(selectYear);
d->navigationLayout->addSpacing(KDialog::spacingHint());
- monthForward = new QToolButton(this);
+ monthForward = new TQToolButton(this);
monthForward ->setAutoRaise(true);
d->navigationLayout->addWidget(monthForward);
- yearForward = new QToolButton(this);
+ yearForward = new TQToolButton(this);
yearForward ->setAutoRaise(true);
d->navigationLayout->addWidget(yearForward);
d->navigationLayout->addStretch();
@@ -152,58 +152,58 @@ void KDatePicker::init( const QDate &dt )
table = new KDateTable(this);
fontsize = KGlobalSettings::generalFont().pointSize();
if (fontsize == -1)
- fontsize = QFontInfo(KGlobalSettings::generalFont()).pointSize();
+ fontsize = TQFontInfo(KGlobalSettings::generalFont()).pointSize();
fontsize++; // Make a little bigger
- d->selectWeek = new QComboBox(false, this); // read only week selection
- d->todayButton = new QToolButton(this);
+ d->selectWeek = new TQComboBox(false, this); // read only week selection
+ d->todayButton = new TQToolButton(this);
d->todayButton->setIconSet(SmallIconSet("today"));
- QToolTip::add(yearForward, i18n("Next year"));
- QToolTip::add(yearBackward, i18n("Previous year"));
- QToolTip::add(monthForward, i18n("Next month"));
- QToolTip::add(monthBackward, i18n("Previous month"));
- QToolTip::add(d->selectWeek, i18n("Select a week"));
- QToolTip::add(selectMonth, i18n("Select a month"));
- QToolTip::add(selectYear, i18n("Select a year"));
- QToolTip::add(d->todayButton, i18n("Select the current day"));
+ TQToolTip::add(yearForward, i18n("Next year"));
+ TQToolTip::add(yearBackward, i18n("Previous year"));
+ TQToolTip::add(monthForward, i18n("Next month"));
+ TQToolTip::add(monthBackward, i18n("Previous month"));
+ TQToolTip::add(d->selectWeek, i18n("Select a week"));
+ TQToolTip::add(selectMonth, i18n("Select a month"));
+ TQToolTip::add(selectYear, i18n("Select a year"));
+ TQToolTip::add(d->todayButton, i18n("Select the current day"));
// -----
setFontSize(fontsize);
line->setValidator(val);
line->installEventFilter( this );
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
{
- yearForward->setIconSet(BarIconSet(QString::fromLatin1("2leftarrow")));
- yearBackward->setIconSet(BarIconSet(QString::fromLatin1("2rightarrow")));
- monthForward->setIconSet(BarIconSet(QString::fromLatin1("1leftarrow")));
- monthBackward->setIconSet(BarIconSet(QString::fromLatin1("1rightarrow")));
+ yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow")));
+ yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow")));
+ monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow")));
+ monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow")));
}
else
{
- yearForward->setIconSet(BarIconSet(QString::fromLatin1("2rightarrow")));
- yearBackward->setIconSet(BarIconSet(QString::fromLatin1("2leftarrow")));
- monthForward->setIconSet(BarIconSet(QString::fromLatin1("1rightarrow")));
- monthBackward->setIconSet(BarIconSet(QString::fromLatin1("1leftarrow")));
+ yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow")));
+ yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow")));
+ monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow")));
+ monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow")));
}
- connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate)));
- connect(table, SIGNAL(tableClicked()), SLOT(tableClickedSlot()));
- connect(monthForward, SIGNAL(clicked()), SLOT(monthForwardClicked()));
- connect(monthBackward, SIGNAL(clicked()), SLOT(monthBackwardClicked()));
- connect(yearForward, SIGNAL(clicked()), SLOT(yearForwardClicked()));
- connect(yearBackward, SIGNAL(clicked()), SLOT(yearBackwardClicked()));
- connect(d->selectWeek, SIGNAL(activated(int)), SLOT(weekSelected(int)));
- connect(d->todayButton, SIGNAL(clicked()), SLOT(todayButtonClicked()));
- connect(selectMonth, SIGNAL(clicked()), SLOT(selectMonthClicked()));
- connect(selectYear, SIGNAL(toggled(bool)), SLOT(selectYearClicked()));
- connect(line, SIGNAL(returnPressed()), SLOT(lineEnterPressed()));
+ connect(table, TQT_SIGNAL(dateChanged(TQDate)), TQT_SLOT(dateChangedSlot(TQDate)));
+ connect(table, TQT_SIGNAL(tableClicked()), TQT_SLOT(tableClickedSlot()));
+ connect(monthForward, TQT_SIGNAL(clicked()), TQT_SLOT(monthForwardClicked()));
+ connect(monthBackward, TQT_SIGNAL(clicked()), TQT_SLOT(monthBackwardClicked()));
+ connect(yearForward, TQT_SIGNAL(clicked()), TQT_SLOT(yearForwardClicked()));
+ connect(yearBackward, TQT_SIGNAL(clicked()), TQT_SLOT(yearBackwardClicked()));
+ connect(d->selectWeek, TQT_SIGNAL(activated(int)), TQT_SLOT(weekSelected(int)));
+ connect(d->todayButton, TQT_SIGNAL(clicked()), TQT_SLOT(todayButtonClicked()));
+ connect(selectMonth, TQT_SIGNAL(clicked()), TQT_SLOT(selectMonthClicked()));
+ connect(selectYear, TQT_SIGNAL(toggled(bool)), TQT_SLOT(selectYearClicked()));
+ connect(line, TQT_SIGNAL(returnPressed()), TQT_SLOT(lineEnterPressed()));
table->setFocus();
topLayout->addWidget(table);
- QBoxLayout * bottomLayout = new QHBoxLayout(topLayout);
+ TQBoxLayout * bottomLayout = new TQHBoxLayout(topLayout);
bottomLayout->addWidget(d->todayButton);
bottomLayout->addWidget(line);
bottomLayout->addWidget(d->selectWeek);
@@ -218,32 +218,32 @@ KDatePicker::~KDatePicker()
}
bool
-KDatePicker::eventFilter(QObject *o, QEvent *e )
+KDatePicker::eventFilter(TQObject *o, TQEvent *e )
{
- if ( e->type() == QEvent::KeyPress ) {
- QKeyEvent *k = (QKeyEvent *)e;
+ if ( e->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *k = (TQKeyEvent *)e;
if ( (k->key() == Qt::Key_Prior) ||
(k->key() == Qt::Key_Next) ||
(k->key() == Qt::Key_Up) ||
(k->key() == Qt::Key_Down) )
{
- QApplication::sendEvent( table, e );
+ TQApplication::sendEvent( table, e );
table->setFocus();
return true; // eat event
}
}
- return QFrame::eventFilter( o, e );
+ return TQFrame::eventFilter( o, e );
}
void
-KDatePicker::resizeEvent(QResizeEvent* e)
+KDatePicker::resizeEvent(TQResizeEvent* e)
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
}
void
-KDatePicker::dateChangedSlot(QDate date)
+KDatePicker::dateChangedSlot(TQDate date)
{
kdDebug(298) << "KDatePicker::dateChangedSlot: date changed (" << date.year() << "/" << date.month() << "/" << date.day() << ")." << endl;
@@ -254,7 +254,7 @@ KDatePicker::dateChangedSlot(QDate date)
fillWeeksCombo(date);
// calculate the item num in the week combo box; normalize selected day so as if 1.1. is the first day of the week
- QDate firstDay;
+ TQDate firstDay;
calendar->setYMD(firstDay, calendar->year(date), 1, 1);
d->selectWeek->setCurrentItem((calendar->dayOfYear(date) + calendar->dayOfWeek(firstDay) - 2) / 7/*calendar->daysInWeek()*/);
selectYear->setText(calendar->yearString(date, false));
@@ -270,20 +270,20 @@ KDatePicker::tableClickedSlot()
emit(tableClicked());
}
-const QDate&
+const TQDate&
KDatePicker::getDate() const
{
return table->getDate();
}
-const QDate &
+const TQDate &
KDatePicker::date() const
{
return table->getDate();
}
bool
-KDatePicker::setDate(const QDate& date)
+KDatePicker::setDate(const TQDate& date)
{
if(date.isValid())
{
@@ -300,7 +300,7 @@ KDatePicker::setDate(const QDate& date)
void
KDatePicker::monthForwardClicked()
{
- QDate temp;
+ TQDate temp;
temp = KGlobal::locale()->calendar()->addMonths( table->getDate(), 1 );
setDate( temp );
@@ -309,7 +309,7 @@ KDatePicker::monthForwardClicked()
void
KDatePicker::monthBackwardClicked()
{
- QDate temp;
+ TQDate temp;
temp = KGlobal::locale()->calendar()->addMonths( table->getDate(), -1 );
setDate( temp );
@@ -318,7 +318,7 @@ KDatePicker::monthBackwardClicked()
void
KDatePicker::yearForwardClicked()
{
- QDate temp;
+ TQDate temp;
temp = KGlobal::locale()->calendar()->addYears( table->getDate(), 1 );
setDate( temp );
@@ -327,7 +327,7 @@ KDatePicker::yearForwardClicked()
void
KDatePicker::yearBackwardClicked()
{
- QDate temp;
+ TQDate temp;
temp = KGlobal::locale()->calendar()->addYears( table->getDate(), -1 );
setDate( temp );
@@ -340,7 +340,7 @@ KDatePicker::weekSelected(int week)
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QDate date = table->getDate();
+ TQDate date = table->getDate();
int year = calendar->year(date);
calendar->setYMD(date, year, 1, 1); // first day of selected year
@@ -356,17 +356,17 @@ KDatePicker::selectMonthClicked()
{
// every year can have different month names (in some calendar systems)
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QDate date = table->getDate();
+ TQDate date = table->getDate();
int i, month, months = calendar->monthsInYear(date);
- QPopupMenu popup(selectMonth);
+ TQPopupMenu popup(selectMonth);
for (i = 1; i <= months; i++)
popup.insertItem(calendar->monthName(i, calendar->year(date)), i);
popup.setActiveItem(calendar->month(date) - 1);
- if ( (month = popup.exec(selectMonth->mapToGlobal(QPoint(0, 0)), calendar->month(date) - 1)) == -1 ) return; // canceled
+ if ( (month = popup.exec(selectMonth->mapToGlobal(TQPoint(0, 0)), calendar->month(date) - 1)) == -1 ) return; // canceled
int day = calendar->day(date);
// ----- construct a valid date in this month:
@@ -381,7 +381,7 @@ KDatePicker::selectYearClicked()
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- if (selectYear->state() == QButton::Off)
+ if (selectYear->state() == TQButton::Off)
{
return;
}
@@ -394,11 +394,11 @@ KDatePicker::selectYearClicked()
picker->setYear( table->getDate().year() );
picker->selectAll();
popup->setMainWidget(picker);
- connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
+ connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int)));
picker->setFocus();
- if(popup->exec(selectYear->mapToGlobal(QPoint(0, selectMonth->height()))))
+ if(popup->exec(selectYear->mapToGlobal(TQPoint(0, selectMonth->height()))))
{
- QDate date;
+ TQDate date;
int day;
// -----
year=picker->getYear();
@@ -416,7 +416,7 @@ KDatePicker::selectYearClicked()
}
delete popup;
- QTimer::singleShot(0, this, SLOT(ensureSelectYearIsUp()));
+ TQTimer::singleShot(0, this, TQT_SLOT(ensureSelectYearIsUp()));
}
void
@@ -431,7 +431,7 @@ KDatePicker::ensureSelectYearIsUp()
void
KDatePicker::setEnabled(bool enable)
{
- QWidget *widgets[]= {
+ TQWidget *widgets[]= {
yearForward, yearBackward, monthForward, monthBackward,
selectMonth, selectYear,
line, table, d->selectWeek, d->todayButton };
@@ -447,9 +447,9 @@ KDatePicker::setEnabled(bool enable)
void
KDatePicker::lineEnterPressed()
{
- QDate temp;
+ TQDate temp;
// -----
- if(val->date(line->text(), temp)==QValidator::Acceptable)
+ if(val->date(line->text(), temp)==TQValidator::Acceptable)
{
kdDebug(298) << "KDatePicker::lineEnterPressed: valid date entered." << endl;
emit(dateEntered(temp));
@@ -463,19 +463,19 @@ KDatePicker::lineEnterPressed()
void
KDatePicker::todayButtonClicked()
{
- setDate(QDate::currentDate());
+ setDate(TQDate::currentDate());
}
QSize
KDatePicker::sizeHint() const
{
- return QWidget::sizeHint();
+ return TQWidget::sizeHint();
}
void
KDatePicker::setFontSize(int s)
{
- QWidget *buttons[]= {
+ TQWidget *buttons[]= {
// yearBackward,
// monthBackward,
selectMonth,
@@ -485,8 +485,8 @@ KDatePicker::setFontSize(int s)
};
const int NoOfButtons=sizeof(buttons)/sizeof(buttons[0]);
int count;
- QFont font;
- QRect r;
+ TQFont font;
+ TQRect r;
// -----
fontsize=s;
for(count=0; count<NoOfButtons; ++count)
@@ -495,11 +495,11 @@ KDatePicker::setFontSize(int s)
font.setPointSize(s);
buttons[count]->setFont(font);
}
- QFontMetrics metrics(selectMonth->fontMetrics());
+ TQFontMetrics metrics(selectMonth->fontMetrics());
for (int i = 1; ; ++i)
{
- QString str = KGlobal::locale()->calendar()->monthName(i,
+ TQString str = KGlobal::locale()->calendar()->monthName(i,
KGlobal::locale()->calendar()->year(table->getDate()), false);
if (str.isNull()) break;
r=metrics.boundingRect(str);
@@ -507,7 +507,7 @@ KDatePicker::setFontSize(int s)
maxMonthRect.setHeight(QMAX(r.height(), maxMonthRect.height()));
}
- QSize metricBound = style().sizeFromContents(QStyle::CT_ToolButton,
+ TQSize metricBound = style().sizeFromContents(TQStyle::CT_ToolButton,
selectMonth,
maxMonthRect);
selectMonth->setMinimumSize(metricBound);
@@ -522,14 +522,14 @@ KDatePicker::setCloseButton( bool enable )
return;
if ( enable ) {
- d->closeButton = new QToolButton( this );
+ d->closeButton = new TQToolButton( this );
d->closeButton->setAutoRaise(true);
d->navigationLayout->addSpacing(KDialog::spacingHint());
d->navigationLayout->addWidget(d->closeButton);
- QToolTip::add(d->closeButton, i18n("Close"));
+ TQToolTip::add(d->closeButton, i18n("Close"));
d->closeButton->setPixmap( SmallIcon("remove") );
- connect( d->closeButton, SIGNAL( clicked() ),
- topLevelWidget(), SLOT( close() ) );
+ connect( d->closeButton, TQT_SIGNAL( clicked() ),
+ topLevelWidget(), TQT_SLOT( close() ) );
}
else {
delete d->closeButton;
diff --git a/kdeui/kdatepicker.h b/kdeui/kdatepicker.h
index 414fb0ab9..b1f2d5225 100644
--- a/kdeui/kdatepicker.h
+++ b/kdeui/kdatepicker.h
@@ -19,8 +19,8 @@
*/
#ifndef KDATEPICKER_H
#define KDATEPICKER_H
-#include <qdatetime.h>
-#include <qframe.h>
+#include <tqdatetime.h>
+#include <tqframe.h>
#include <kdelibs_export.h>
class QLineEdit;
@@ -51,7 +51,7 @@ class KDateTable;
class KDEUI_EXPORT KDatePicker: public QFrame
{
Q_OBJECT
- Q_PROPERTY( QDate date READ date WRITE setDate)
+ Q_PROPERTY( TQDate date READ date WRITE setDate)
Q_PROPERTY( bool closeButton READ hasCloseButton WRITE setCloseButton )
Q_PROPERTY( int fontSize READ fontSize WRITE setFontSize )
@@ -59,16 +59,16 @@ public:
/** The usual constructor. The given date will be displayed
* initially.
**/
- KDatePicker(QWidget *parent=0,
- QDate=QDate::currentDate(),
+ KDatePicker(TQWidget *parent=0,
+ QDate=TQDate::currentDate(),
const char *name=0);
/** The usual constructor. The given date will be displayed
* initially.
* @since 3.1
**/
- KDatePicker(QWidget *parent,
- QDate,
+ KDatePicker(TQWidget *parent,
+ TQDate,
const char *name,
WFlags f); // ### KDE 4.0: Merge
@@ -77,7 +77,7 @@ public:
* current date.
* @since 3.1
*/
- KDatePicker( QWidget *parent, const char *name );
+ KDatePicker( TQWidget *parent, const char *name );
/**
* The destructor.
@@ -90,7 +90,7 @@ public:
* size hint, try adding 28 to each of the reported numbers of
* pixels.
**/
- QSize sizeHint() const;
+ TQSize sizeHint() const;
/**
* Sets the date.
@@ -98,18 +98,18 @@ public:
* @returns @p false and does not change anything
* if the date given is invalid.
**/
- bool setDate(const QDate&);
+ bool setDate(const TQDate&);
/**
* Returns the selected date.
* @deprecated
**/
- const QDate& getDate() const KDE_DEPRECATED;
+ const TQDate& getDate() const KDE_DEPRECATED;
/**
* @returns the selected date.
*/
- const QDate &date() const;
+ const TQDate &date() const;
/**
* Enables or disables the widget.
@@ -152,34 +152,34 @@ public:
bool hasCloseButton() const;
protected:
- /// to catch move keyEvents when QLineEdit has keyFocus
- virtual bool eventFilter(QObject *o, QEvent *e );
+ /// to catch move keyEvents when TQLineEdit has keyFocus
+ virtual bool eventFilter(TQObject *o, TQEvent *e );
/// the resize event
- virtual void resizeEvent(QResizeEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
/// the year forward button
- QToolButton *yearForward;
+ TQToolButton *yearForward;
/// the year backward button
- QToolButton *yearBackward;
+ TQToolButton *yearBackward;
/// the month forward button
- QToolButton *monthForward;
+ TQToolButton *monthForward;
/// the month backward button
- QToolButton *monthBackward;
+ TQToolButton *monthBackward;
/// the button for selecting the month directly
- QToolButton *selectMonth;
+ TQToolButton *selectMonth;
/// the button for selecting the year directly
- QToolButton *selectYear;
+ TQToolButton *selectYear;
/// the line edit to enter the date directly
- QLineEdit *line;
+ TQLineEdit *line;
/// the validator for the line edit:
KDateValidator *val;
/// the date table
KDateTable *table;
/// the size calculated during resize events
- // QSize sizehint;
+ // TQSize sizehint;
/// the widest month string in pixels:
- QSize maxMonthRect;
+ TQSize maxMonthRect;
protected slots:
- void dateChangedSlot(QDate);
+ void dateChangedSlot(TQDate);
void tableClickedSlot();
void monthForwardClicked();
void monthBackwardClicked();
@@ -212,7 +212,7 @@ protected slots:
void weekSelected(int);
signals:
- // ### KDE 4.0 Make all QDate parameters const references
+ // ### KDE 4.0 Make all TQDate parameters const references
/** This signal is emitted each time the selected date is changed.
* Usually, this does not mean that the date has been entered,
@@ -220,19 +220,19 @@ signals:
* selected.
* @see dateSelected
*/
- void dateChanged(QDate);
+ void dateChanged(TQDate);
/** This signal is emitted each time a day has been selected by
* clicking on the table (hitting a day in the current month). It
* has the same meaning as dateSelected() in older versions of
* KDatePicker.
*/
- void dateSelected(QDate);
+ void dateSelected(TQDate);
/** This signal is emitted when enter is pressed and a VALID date
* has been entered before into the line edit. Connect to both
* dateEntered() and dateSelected() to receive all events where the
* user really enters a date.
*/
- void dateEntered(QDate);
+ void dateEntered(TQDate);
/** This signal is emitted when the day has been selected by
* clicking on it in the table.
*/
@@ -248,8 +248,8 @@ private:
protected:
virtual void virtual_hook( int id, void* data );
private:
- void init( const QDate &dt );
- void fillWeeksCombo(const QDate &date);
+ void init( const TQDate &dt );
+ void fillWeeksCombo(const TQDate &date);
class KDatePickerPrivate;
KDatePickerPrivate *d;
};
diff --git a/kdeui/kdatetbl.cpp b/kdeui/kdatetbl.cpp
index 89d73ed7a..bbf673a15 100644
--- a/kdeui/kdatetbl.cpp
+++ b/kdeui/kdatetbl.cpp
@@ -30,7 +30,7 @@
// be used as a standalone.
//
// When a date is selected by the user, it emits a signal:
-// dateSelected(QDate)
+// dateSelected(TQDate)
#include <kconfig.h>
#include <kglobal.h>
@@ -46,13 +46,13 @@
#include "kdatepicker.h"
#include "kdatetbl.h"
#include "kpopupmenu.h"
-#include <qdatetime.h>
-#include <qguardedptr.h>
-#include <qstring.h>
-#include <qpen.h>
-#include <qpainter.h>
-#include <qdialog.h>
-#include <qdict.h>
+#include <tqdatetime.h>
+#include <tqguardedptr.h>
+#include <tqstring.h>
+#include <tqpen.h>
+#include <tqpainter.h>
+#include <tqdialog.h>
+#include <tqdict.h>
#include <assert.h>
@@ -74,32 +74,32 @@ public:
struct DatePaintingMode
{
- QColor fgColor;
- QColor bgColor;
+ TQColor fgColor;
+ TQColor bgColor;
BackgroundMode bgMode;
};
- QDict <DatePaintingMode> customPaintingModes;
+ TQDict <DatePaintingMode> customPaintingModes;
};
-KDateValidator::KDateValidator(QWidget* parent, const char* name)
- : QValidator(parent, name)
+KDateValidator::KDateValidator(TQWidget* parent, const char* name)
+ : TQValidator(parent, name)
{
}
-QValidator::State
-KDateValidator::validate(QString& text, int&) const
+TQValidator::State
+KDateValidator::validate(TQString& text, int&) const
{
- QDate temp;
+ TQDate temp;
// ----- everything is tested in date():
return date(text, temp);
}
-QValidator::State
-KDateValidator::date(const QString& text, QDate& d) const
+TQValidator::State
+KDateValidator::date(const TQString& text, TQDate& d) const
{
- QDate tmp = KGlobal::locale()->readDate(text);
+ TQDate tmp = KGlobal::locale()->readDate(text);
if (!tmp.isNull())
{
d = tmp;
@@ -109,22 +109,22 @@ KDateValidator::date(const QString& text, QDate& d) const
}
void
-KDateValidator::fixup( QString& ) const
+KDateValidator::fixup( TQString& ) const
{
}
-KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f)
- : QGridView(parent, name, (f | WNoAutoErase))
+KDateTable::KDateTable(TQWidget *parent, TQDate date_, const char* name, WFlags f)
+ : TQGridView(parent, name, (f | WNoAutoErase))
{
d = new KDateTablePrivate;
setFontSize(10);
if(!date_.isValid())
{
kdDebug() << "KDateTable ctor: WARNING: Given date is invalid, using current date." << endl;
- date_=QDate::currentDate();
+ date_=TQDate::currentDate();
}
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
setNumRows(7); // 6 weeks max + headline
setNumCols(7); // 7 days a week
setHScrollBarMode(AlwaysOff);
@@ -135,18 +135,18 @@ KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f)
initAccels();
}
-KDateTable::KDateTable(QWidget *parent, const char* name, WFlags f)
- : QGridView(parent, name, (f | WNoAutoErase))
+KDateTable::KDateTable(TQWidget *parent, const char* name, WFlags f)
+ : TQGridView(parent, name, (f | WNoAutoErase))
{
d = new KDateTablePrivate;
setFontSize(10);
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
setNumRows(7); // 6 weeks max + headline
setNumCols(7); // 7 days a week
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
viewport()->setEraseColor(KGlobalSettings::baseColor());
- setDate(QDate::currentDate()); // this initializes firstday, numdays, numDaysPrevMonth
+ setDate(TQDate::currentDate()); // this initializes firstday, numdays, numDaysPrevMonth
initAccels();
}
@@ -158,16 +158,16 @@ KDateTable::~KDateTable()
void KDateTable::initAccels()
{
KAccel* accel = new KAccel(this, "date table accel");
- accel->insert(KStdAccel::Next, this, SLOT(nextMonth()));
- accel->insert(KStdAccel::Prior, this, SLOT(previousMonth()));
- accel->insert(KStdAccel::Home, this, SLOT(beginningOfMonth()));
- accel->insert(KStdAccel::End, this, SLOT(endOfMonth()));
- accel->insert(KStdAccel::BeginningOfLine, this, SLOT(beginningOfWeek()));
- accel->insert(KStdAccel::EndOfLine, this, SLOT(endOfWeek()));
+ accel->insert(KStdAccel::Next, this, TQT_SLOT(nextMonth()));
+ accel->insert(KStdAccel::Prior, this, TQT_SLOT(previousMonth()));
+ accel->insert(KStdAccel::Home, this, TQT_SLOT(beginningOfMonth()));
+ accel->insert(KStdAccel::End, this, TQT_SLOT(endOfMonth()));
+ accel->insert(KStdAccel::BeginningOfLine, this, TQT_SLOT(beginningOfWeek()));
+ accel->insert(KStdAccel::EndOfLine, this, TQT_SLOT(endOfWeek()));
accel->readSettings();
}
-int KDateTable::posFromDate( const QDate &dt )
+int KDateTable::posFromDate( const TQDate &dt )
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
const int firstWeekDay = KGlobal::locale()->weekStartDay();
@@ -179,9 +179,9 @@ int KDateTable::posFromDate( const QDate &dt )
return pos + offset;
}
-QDate KDateTable::dateFromPos( int pos )
+TQDate KDateTable::dateFromPos( int pos )
{
- QDate pCellDate;
+ TQDate pCellDate;
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
calendar->setYMD(pCellDate, calendar->year(date), calendar->month(date), 1);
@@ -195,13 +195,13 @@ QDate KDateTable::dateFromPos( int pos )
}
void
-KDateTable::paintEmptyArea(QPainter *paint, int, int, int, int)
+KDateTable::paintEmptyArea(TQPainter *paint, int, int, int, int)
{
// Erase the unused areas on the right and bottom.
- QRect unusedRight = frameRect();
+ TQRect unusedRight = frameRect();
unusedRight.setLeft(gridSize().width());
- QRect unusedBottom = frameRect();
+ TQRect unusedBottom = frameRect();
unusedBottom.setTop(gridSize().height());
paint->eraseRect(unusedRight);
@@ -209,16 +209,16 @@ KDateTable::paintEmptyArea(QPainter *paint, int, int, int, int)
}
void
-KDateTable::paintCell(QPainter *painter, int row, int col)
+KDateTable::paintCell(TQPainter *painter, int row, int col)
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QRect rect;
- QString text;
- QPen pen;
+ TQRect rect;
+ TQString text;
+ TQPen pen;
int w=cellWidth();
int h=cellHeight();
- QFont font=KGlobalSettings::generalFont();
+ TQFont font=KGlobalSettings::generalFont();
// -----
if(row == 0)
@@ -233,9 +233,9 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
( daynum == 6 && calendar->calendarName() == "gregorian" ) )
normalday=false;
- QBrush brushInvertTitle(colorGroup().base());
- QColor titleColor(isEnabled()?( KGlobalSettings::activeTitleColor() ):( KGlobalSettings::inactiveTitleColor() ) );
- QColor textColor(isEnabled()?( KGlobalSettings::activeTextColor() ):( KGlobalSettings::inactiveTextColor() ) );
+ TQBrush brushInvertTitle(colorGroup().base());
+ TQColor titleColor(isEnabled()?( KGlobalSettings::activeTitleColor() ):( KGlobalSettings::inactiveTitleColor() ) );
+ TQColor textColor(isEnabled()?( KGlobalSettings::activeTextColor() ):( KGlobalSettings::inactiveTextColor() ) );
if (!normalday)
{
painter->setPen(textColor);
@@ -259,7 +259,7 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
painter->setFont(font);
int pos=7*(row-1)+col;
- QDate pCellDate = dateFromPos( pos );
+ TQDate pCellDate = dateFromPos( pos );
// First day of month
text = calendar->dayString(pCellDate, true);
if( calendar->month(pCellDate) != calendar->month(date) )
@@ -277,7 +277,7 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
{
if (mode->bgMode != NoBgMode)
{
- QBrush oldbrush=painter->brush();
+ TQBrush oldbrush=painter->brush();
painter->setBrush( mode->bgColor );
switch(mode->bgMode)
{
@@ -324,7 +324,7 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
// painter->setPen(colorGroup().base());
}
- if ( pCellDate == QDate::currentDate() )
+ if ( pCellDate == TQDate::currentDate() )
{
painter->setPen(colorGroup().text());
}
@@ -370,7 +370,7 @@ void KDateTable::endOfWeek()
}
void
-KDateTable::keyPressEvent( QKeyEvent *e )
+KDateTable::keyPressEvent( TQKeyEvent *e )
{
switch( e->key() ) {
case Key_Up:
@@ -392,7 +392,7 @@ KDateTable::keyPressEvent( QKeyEvent *e )
setDate(date.addDays(1));
break;
case Key_N:
- setDate(QDate::currentDate());
+ setDate(TQDate::currentDate());
break;
case Key_Return:
case Key_Enter:
@@ -412,9 +412,9 @@ KDateTable::keyPressEvent( QKeyEvent *e )
}
void
-KDateTable::viewportResizeEvent(QResizeEvent * e)
+KDateTable::viewportResizeEvent(TQResizeEvent * e)
{
- QGridView::viewportResizeEvent(e);
+ TQGridView::viewportResizeEvent(e);
setCellWidth(viewport()->width()/7);
setCellHeight(viewport()->height()/7);
@@ -424,8 +424,8 @@ void
KDateTable::setFontSize(int size)
{
int count;
- QFontMetrics metrics(fontMetrics());
- QRect rect;
+ TQFontMetrics metrics(fontMetrics());
+ TQRect rect;
// ----- store rectangles:
fontsize=size;
// ----- find largest day name:
@@ -439,23 +439,23 @@ KDateTable::setFontSize(int size)
maxCell.setHeight(QMAX(maxCell.height(), rect.height()));
}
// ----- compare with a real wide number and add some space:
- rect=metrics.boundingRect(QString::fromLatin1("88"));
+ rect=metrics.boundingRect(TQString::fromLatin1("88"));
maxCell.setWidth(QMAX(maxCell.width()+2, rect.width()));
maxCell.setHeight(QMAX(maxCell.height()+4, rect.height()));
}
void
-KDateTable::wheelEvent ( QWheelEvent * e )
+KDateTable::wheelEvent ( TQWheelEvent * e )
{
setDate(date.addMonths( -(int)(e->delta()/120)) );
e->accept();
}
void
-KDateTable::contentsMousePressEvent(QMouseEvent *e)
+KDateTable::contentsMousePressEvent(TQMouseEvent *e)
{
- if(e->type()!=QEvent::MouseButtonPress)
+ if(e->type()!=TQEvent::MouseButtonPress)
{ // the KDatePicker only reacts on mouse press events:
return;
}
@@ -467,7 +467,7 @@ KDateTable::contentsMousePressEvent(QMouseEvent *e)
// -----
int row, col, pos, temp;
- QPoint mouseCoord;
+ TQPoint mouseCoord;
// -----
mouseCoord = e->pos();
row=rowAt(mouseCoord.y());
@@ -484,7 +484,7 @@ KDateTable::contentsMousePressEvent(QMouseEvent *e)
temp = posFromDate( date );
// new position and date
pos = (7 * (row - 1)) + col;
- QDate clickedDate = dateFromPos( pos );
+ TQDate clickedDate = dateFromPos( pos );
// set the new date. If it is in the previous or next month, the month will
// automatically be changed, no need to do that manually...
@@ -507,10 +507,10 @@ KDateTable::contentsMousePressEvent(QMouseEvent *e)
}
bool
-KDateTable::setDate(const QDate& date_)
+KDateTable::setDate(const TQDate& date_)
{
bool changed=false;
- QDate temp;
+ TQDate temp;
// -----
if(!date_.isValid())
{
@@ -541,23 +541,23 @@ KDateTable::setDate(const QDate& date_)
return true;
}
-const QDate&
+const TQDate&
KDateTable::getDate() const
{
return date;
}
// what are those repaintContents() good for? (pfeiffer)
-void KDateTable::focusInEvent( QFocusEvent *e )
+void KDateTable::focusInEvent( TQFocusEvent *e )
{
// repaintContents(false);
- QGridView::focusInEvent( e );
+ TQGridView::focusInEvent( e );
}
-void KDateTable::focusOutEvent( QFocusEvent *e )
+void KDateTable::focusOutEvent( TQFocusEvent *e )
{
// repaintContents(false);
- QGridView::focusOutEvent( e );
+ TQGridView::focusOutEvent( e );
}
QSize
@@ -565,11 +565,11 @@ KDateTable::sizeHint() const
{
if(maxCell.height()>0 && maxCell.width()>0)
{
- return QSize(maxCell.width()*numCols()+2*frameWidth(),
+ return TQSize(maxCell.width()*numCols()+2*frameWidth(),
(maxCell.height()+2)*numRows()+2*frameWidth());
} else {
kdDebug() << "KDateTable::sizeHint: obscure failure - " << endl;
- return QSize(-1, -1);
+ return TQSize(-1, -1);
}
}
@@ -583,7 +583,7 @@ bool KDateTable::popupMenuEnabled() const
return d->popupMenuEnabled;
}
-void KDateTable::setCustomDatePainting(const QDate &date, const QColor &fgColor, BackgroundMode bgMode, const QColor &bgColor)
+void KDateTable::setCustomDatePainting(const TQDate &date, const TQColor &fgColor, BackgroundMode bgMode, const TQColor &bgColor)
{
if (!fgColor.isValid())
{
@@ -601,24 +601,24 @@ void KDateTable::setCustomDatePainting(const QDate &date, const QColor &fgColor,
update();
}
-void KDateTable::unsetCustomDatePainting( const QDate &date )
+void KDateTable::unsetCustomDatePainting( const TQDate &date )
{
d->customPaintingModes.remove( date.toString() );
}
KDateInternalWeekSelector::KDateInternalWeekSelector
-(QWidget* parent, const char* name)
- : QLineEdit(parent, name),
- val(new QIntValidator(this)),
+(TQWidget* parent, const char* name)
+ : TQLineEdit(parent, name),
+ val(new TQIntValidator(this)),
result(0)
{
- QFont font;
+ TQFont font;
// -----
font=KGlobalSettings::generalFont();
setFont(font);
- setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(TQFrame::NoFrame);
setValidator(val);
- connect(this, SIGNAL(returnPressed()), SLOT(weekEnteredSlot()));
+ connect(this, TQT_SIGNAL(returnPressed()), TQT_SLOT(weekEnteredSlot()));
}
void
@@ -647,7 +647,7 @@ KDateInternalWeekSelector::getWeek()
void
KDateInternalWeekSelector::setWeek(int week)
{
- QString temp;
+ TQString temp;
// -----
temp.setNum(week);
setText(temp);
@@ -677,12 +677,12 @@ KDateInternalMonthPicker::~KDateInternalMonthPicker() {
}
KDateInternalMonthPicker::KDateInternalMonthPicker
-(const QDate & date, QWidget* parent, const char* name)
- : QGridView(parent, name),
+(const TQDate & date, TQWidget* parent, const char* name)
+ : TQGridView(parent, name),
result(0) // invalid
{
- QRect rect;
- QFont font;
+ TQRect rect;
+ TQFont font;
// -----
activeCol = -1;
activeRow = -1;
@@ -690,7 +690,7 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
setFont(font);
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
- setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(TQFrame::NoFrame);
setNumCols(3);
d = new KDateInternalMonthPrivate(date.year(), date.month(), date.day());
// For monthsInYear != 12
@@ -700,10 +700,10 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
viewport()->setEraseColor(KGlobalSettings::baseColor()); // for consistency with the datepicker
// ----- find the preferred size
// (this is slow, possibly, but unfortunately it is needed here):
- QFontMetrics metrics(font);
+ TQFontMetrics metrics(font);
for(int i = 1; ; ++i)
{
- QString str = KGlobal::locale()->calendar()->monthName(i,
+ TQString str = KGlobal::locale()->calendar()->monthName(i,
KGlobal::locale()->calendar()->year(date), false);
if (str.isNull()) break;
rect=metrics.boundingRect(str);
@@ -715,7 +715,7 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
QSize
KDateInternalMonthPicker::sizeHint() const
{
- return QSize((max.width()+6)*numCols()+2*frameWidth(),
+ return TQSize((max.width()+6)*numCols()+2*frameWidth(),
(max.height()+6)*numRows()+2*frameWidth());
}
@@ -726,27 +726,27 @@ KDateInternalMonthPicker::getResult() const
}
void
-KDateInternalMonthPicker::setupPainter(QPainter *p)
+KDateInternalMonthPicker::setupPainter(TQPainter *p)
{
p->setPen(KGlobalSettings::textColor());
}
void
-KDateInternalMonthPicker::viewportResizeEvent(QResizeEvent*)
+KDateInternalMonthPicker::viewportResizeEvent(TQResizeEvent*)
{
setCellWidth(width() / numCols());
setCellHeight(height() / numRows());
}
void
-KDateInternalMonthPicker::paintCell(QPainter* painter, int row, int col)
+KDateInternalMonthPicker::paintCell(TQPainter* painter, int row, int col)
{
int index;
- QString text;
+ TQString text;
// ----- find the number of the cell:
index=3*row+col+1;
text=KGlobal::locale()->calendar()->monthName(index,
- KGlobal::locale()->calendar()->year(QDate(d->year, d->month,
+ KGlobal::locale()->calendar()->year(TQDate(d->year, d->month,
d->day)), false);
painter->drawText(0, 0, cellWidth(), cellHeight(), AlignCenter, text);
if ( activeCol == col && activeRow == row )
@@ -754,7 +754,7 @@ KDateInternalMonthPicker::paintCell(QPainter* painter, int row, int col)
}
void
-KDateInternalMonthPicker::contentsMousePressEvent(QMouseEvent *e)
+KDateInternalMonthPicker::contentsMousePressEvent(TQMouseEvent *e)
{
if(!isEnabled() || e->button() != LeftButton)
{
@@ -763,7 +763,7 @@ KDateInternalMonthPicker::contentsMousePressEvent(QMouseEvent *e)
}
// -----
int row, col;
- QPoint mouseCoord;
+ TQPoint mouseCoord;
// -----
mouseCoord = e->pos();
row=rowAt(mouseCoord.y());
@@ -781,12 +781,12 @@ KDateInternalMonthPicker::contentsMousePressEvent(QMouseEvent *e)
}
void
-KDateInternalMonthPicker::contentsMouseMoveEvent(QMouseEvent *e)
+KDateInternalMonthPicker::contentsMouseMoveEvent(TQMouseEvent *e)
{
if (e->state() & LeftButton)
{
int row, col;
- QPoint mouseCoord;
+ TQPoint mouseCoord;
// -----
mouseCoord = e->pos();
row=rowAt(mouseCoord.y());
@@ -821,7 +821,7 @@ KDateInternalMonthPicker::contentsMouseMoveEvent(QMouseEvent *e)
}
void
-KDateInternalMonthPicker::contentsMouseReleaseEvent(QMouseEvent *e)
+KDateInternalMonthPicker::contentsMouseReleaseEvent(TQMouseEvent *e)
{
if(!isEnabled())
{
@@ -829,7 +829,7 @@ KDateInternalMonthPicker::contentsMouseReleaseEvent(QMouseEvent *e)
}
// -----
int row, col, pos;
- QPoint mouseCoord;
+ TQPoint mouseCoord;
// -----
mouseCoord = e->pos();
row=rowAt(mouseCoord.y());
@@ -848,20 +848,20 @@ KDateInternalMonthPicker::contentsMouseReleaseEvent(QMouseEvent *e)
KDateInternalYearSelector::KDateInternalYearSelector
-(QWidget* parent, const char* name)
- : QLineEdit(parent, name),
- val(new QIntValidator(this)),
+(TQWidget* parent, const char* name)
+ : TQLineEdit(parent, name),
+ val(new TQIntValidator(this)),
result(0)
{
- QFont font;
+ TQFont font;
// -----
font=KGlobalSettings::generalFont();
setFont(font);
- setFrameStyle(QFrame::NoFrame);
- // we have to respect the limits of QDate here, I fear:
+ setFrameStyle(TQFrame::NoFrame);
+ // we have to respect the limits of TQDate here, I fear:
val->setRange(0, 8000);
setValidator(val);
- connect(this, SIGNAL(returnPressed()), SLOT(yearEnteredSlot()));
+ connect(this, TQT_SIGNAL(returnPressed()), TQT_SLOT(yearEnteredSlot()));
}
void
@@ -869,7 +869,7 @@ KDateInternalYearSelector::yearEnteredSlot()
{
bool ok;
int year;
- QDate date;
+ TQDate date;
// ----- check if this is a valid year:
year=text().toInt(&ok);
if(!ok)
@@ -899,7 +899,7 @@ KDateInternalYearSelector::getYear()
void
KDateInternalYearSelector::setYear(int year)
{
- QString temp;
+ TQString temp;
// -----
temp.setNum(year);
setText(temp);
@@ -913,13 +913,13 @@ class KPopupFrame::KPopupFramePrivate
bool exec;
};
-KPopupFrame::KPopupFrame(QWidget* parent, const char* name)
- : QFrame(parent, name, WType_Popup),
+KPopupFrame::KPopupFrame(TQWidget* parent, const char* name)
+ : TQFrame(parent, name, WType_Popup),
result(0), // rejected
main(0),
d(new KPopupFramePrivate)
{
- setFrameStyle(QFrame::Box|QFrame::Raised);
+ setFrameStyle(TQFrame::Box|TQFrame::Raised);
setMidLineWidth(2);
}
@@ -929,7 +929,7 @@ KPopupFrame::~KPopupFrame()
}
void
-KPopupFrame::keyPressEvent(QKeyEvent* e)
+KPopupFrame::keyPressEvent(TQKeyEvent* e)
{
if(e->key()==Key_Escape)
{
@@ -950,7 +950,7 @@ KPopupFrame::close(int r)
void
KPopupFrame::hide()
{
- QFrame::hide();
+ TQFrame::hide();
if (d->exec)
{
d->exec = false;
@@ -959,7 +959,7 @@ KPopupFrame::hide()
}
void
-KPopupFrame::setMainWidget(QWidget* m)
+KPopupFrame::setMainWidget(TQWidget* m)
{
main=m;
if(main)
@@ -969,7 +969,7 @@ KPopupFrame::setMainWidget(QWidget* m)
}
void
-KPopupFrame::resizeEvent(QResizeEvent*)
+KPopupFrame::resizeEvent(TQResizeEvent*)
{
if(main)
{
@@ -979,10 +979,10 @@ KPopupFrame::resizeEvent(QResizeEvent*)
}
void
-KPopupFrame::popup(const QPoint &pos)
+KPopupFrame::popup(const TQPoint &pos)
{
// Make sure the whole popup is visible.
- QRect d = KGlobalSettings::desktopGeometry(pos);
+ TQRect d = KGlobalSettings::desktopGeometry(pos);
int x = pos.x();
int y = pos.y();
@@ -1003,15 +1003,15 @@ KPopupFrame::popup(const QPoint &pos)
}
int
-KPopupFrame::exec(QPoint pos)
+KPopupFrame::exec(TQPoint pos)
{
popup(pos);
repaint();
d->exec = true;
- const QGuardedPtr<QObject> that = this;
+ const TQGuardedPtr<TQObject> that = this;
qApp->enter_loop();
if ( !that )
- return QDialog::Rejected;
+ return TQDialog::Rejected;
hide();
return result;
}
@@ -1019,7 +1019,7 @@ KPopupFrame::exec(QPoint pos)
int
KPopupFrame::exec(int x, int y)
{
- return exec(QPoint(x, y));
+ return exec(TQPoint(x, y));
}
void KPopupFrame::virtual_hook( int, void* )
diff --git a/kdeui/kdatetbl.h b/kdeui/kdatetbl.h
index c29c9d3e1..8827c0a00 100644
--- a/kdeui/kdatetbl.h
+++ b/kdeui/kdatetbl.h
@@ -22,11 +22,11 @@
// KDE4: rename this file to kdatetable.h
-#include <qvalidator.h>
-#include <qgridview.h>
-#include <qlineedit.h>
-#include <qdatetime.h>
-#include <qcolor.h>
+#include <tqvalidator.h>
+#include <tqgridview.h>
+#include <tqlineedit.h>
+#include <tqdatetime.h>
+#include <tqcolor.h>
#include <kdelibs_export.h>
@@ -41,7 +41,7 @@ class KDEUI_EXPORT KDateInternalWeekSelector : public QLineEdit
{
Q_OBJECT
protected:
- QIntValidator *val;
+ TQIntValidator *val;
int result;
public slots:
void weekEnteredSlot();
@@ -49,7 +49,7 @@ public slots:
signals:
void closeMe(int);
public:
- KDateInternalWeekSelector( QWidget* parent=0, const char* name=0);
+ KDateInternalWeekSelector( TQWidget* parent=0, const char* name=0);
int getWeek();
void setWeek(int week);
@@ -80,7 +80,7 @@ protected:
/**
* Contains the largest rectangle needed by the month names.
*/
- QRect max;
+ TQRect max;
signals:
/**
* This is send from the mouse click event handler.
@@ -90,7 +90,7 @@ public:
/**
* The constructor.
*/
- KDateInternalMonthPicker(const QDate& date, QWidget* parent, const char* name=0);
+ KDateInternalMonthPicker(const TQDate& date, TQWidget* parent, const char* name=0);
/**
* The destructor.
*/
@@ -98,7 +98,7 @@ public:
/**
* The size hint.
*/
- QSize sizeHint() const;
+ TQSize sizeHint() const;
/**
* Return the result. 0 means no selection (reject()), 1..12 are the
* months.
@@ -108,24 +108,24 @@ protected:
/**
* Set up the painter.
*/
- void setupPainter(QPainter *p);
+ void setupPainter(TQPainter *p);
/**
* The resize event.
*/
- virtual void viewportResizeEvent(QResizeEvent*);
+ virtual void viewportResizeEvent(TQResizeEvent*);
/**
* Paint a cell. This simply draws the month names in it.
*/
- virtual void paintCell(QPainter* painter, int row, int col);
+ virtual void paintCell(TQPainter* painter, int row, int col);
/**
* Catch mouse click and move events to paint a rectangle around the item.
*/
- virtual void contentsMousePressEvent(QMouseEvent *e);
- virtual void contentsMouseMoveEvent(QMouseEvent *e);
+ virtual void contentsMousePressEvent(TQMouseEvent *e);
+ virtual void contentsMouseMoveEvent(TQMouseEvent *e);
/**
* Emit monthSelected(int) when a cell has been released.
*/
- virtual void contentsMouseReleaseEvent(QMouseEvent *e);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent *e);
private:
class KDateInternalMonthPrivate;
@@ -141,14 +141,14 @@ class KDEUI_EXPORT KDateInternalYearSelector : public QLineEdit
{
Q_OBJECT
protected:
- QIntValidator *val;
+ TQIntValidator *val;
int result;
public slots:
void yearEnteredSlot();
signals:
void closeMe(int);
public:
- KDateInternalYearSelector( QWidget* parent=0, const char* name=0);
+ KDateInternalYearSelector( TQWidget* parent=0, const char* name=0);
int getYear();
void setYear(int year);
@@ -174,11 +174,11 @@ protected:
/**
* Catch key press events.
*/
- virtual void keyPressEvent(QKeyEvent* e);
+ virtual void keyPressEvent(TQKeyEvent* e);
/**
* The only subwidget that uses the whole dialog window.
*/
- QWidget *main;
+ TQWidget *main;
public slots:
/**
* Close the popup window. This is called from the main widget, usually.
@@ -194,7 +194,7 @@ public:
/**
* The contructor. Creates a dialog without buttons.
*/
- KPopupFrame(QWidget* parent=0, const char* name=0);
+ KPopupFrame(TQWidget* parent=0, const char* name=0);
/**
* The destructor.
*/
@@ -206,20 +206,20 @@ public:
* set the main widgets correct size before setting it as the main
* widget.
*/
- void setMainWidget(QWidget* m);
+ void setMainWidget(TQWidget* m);
/**
* The resize event. Simply resizes the main widget to the whole
* widgets client size.
*/
- virtual void resizeEvent(QResizeEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
/**
* Open the popup window at position pos.
*/
- void popup(const QPoint &pos);
+ void popup(const TQPoint &pos);
/**
* Execute the popup window.
*/
- int exec(QPoint p); // KDE4: const QPoint&
+ int exec(TQPoint p); // KDE4: const TQPoint&
/**
* Execute the popup window.
*/
@@ -227,7 +227,7 @@ public:
private:
- virtual bool close(bool alsoDelete) { return QFrame::close(alsoDelete); }
+ virtual bool close(bool alsoDelete) { return TQFrame::close(alsoDelete); }
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -241,10 +241,10 @@ private:
class KDEUI_EXPORT KDateValidator : public QValidator
{
public:
- KDateValidator(QWidget* parent=0, const char* name=0);
- virtual State validate(QString&, int&) const;
- virtual void fixup ( QString & input ) const;
- State date(const QString&, QDate&) const;
+ KDateValidator(TQWidget* parent=0, const char* name=0);
+ virtual State validate(TQString&, int&) const;
+ virtual void fixup ( TQString & input ) const;
+ State date(const TQString&, TQDate&) const;
};
/**
@@ -254,7 +254,7 @@ public:
* be used as a standalone.
*
* When a date is selected by the user, it emits a signal:
- * dateSelected(QDate)
+ * dateSelected(TQDate)
*
* @internal
* @version $Id$
@@ -263,21 +263,21 @@ public:
class KDEUI_EXPORT KDateTable : public QGridView
{
Q_OBJECT
- Q_PROPERTY( QDate date READ getDate WRITE setDate )
+ Q_PROPERTY( TQDate date READ getDate WRITE setDate )
Q_PROPERTY( bool popupMenu READ popupMenuEnabled WRITE setPopupMenuEnabled )
public:
/**
* The constructor.
*/
- KDateTable(QWidget *parent=0, QDate date=QDate::currentDate(),
+ KDateTable(TQWidget *parent=0, TQDate date=TQDate::currentDate(),
const char* name=0, WFlags f=0);
/**
* The constructor.
* @since 3.4
*/
- KDateTable(QWidget *parent, const char* name, WFlags f=0);
+ KDateTable(TQWidget *parent, const char* name, WFlags f=0);
/**
* The destructor.
@@ -291,7 +291,7 @@ public:
* to be done there anyway. The size is stored in maxCell. The
* sizeHint() simply returns a multiple of maxCell.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* Set the font size of the date table.
*/
@@ -299,9 +299,9 @@ public:
/**
* Select and display this date.
*/
- bool setDate(const QDate&);
+ bool setDate(const TQDate&);
// ### KDE 4.0 rename to date()
- const QDate& getDate() const;
+ const TQDate& getDate() const;
/**
* Enables a popup menu when right clicking on a date.
@@ -326,48 +326,48 @@ public:
*
* @since 3.2
*/
- void setCustomDatePainting( const QDate &date, const QColor &fgColor, BackgroundMode bgMode=NoBgMode, const QColor &bgColor=QColor());
+ void setCustomDatePainting( const TQDate &date, const TQColor &fgColor, BackgroundMode bgMode=NoBgMode, const TQColor &bgColor=TQColor());
/**
* Unsets the custom painting of a date so that the date is painted as usual.
*
* @since 3.2
*/
- void unsetCustomDatePainting( const QDate &date );
+ void unsetCustomDatePainting( const TQDate &date );
protected:
/**
* calculate the position of the cell in the matrix for the given date. The result is the 0-based index.
*/
- int posFromDate( const QDate &date ); // KDE4: make this virtual, so subclasses can reimplement this and use a different default for the start of the matrix
+ int posFromDate( const TQDate &date ); // KDE4: make this virtual, so subclasses can reimplement this and use a different default for the start of the matrix
/**
* calculate the date that is displayed at a given cell in the matrix. pos is the
* 0-based index in the matrix. Inverse function to posForDate().
*/
- QDate dateFromPos( int pos ); // KDE4: make this virtual
+ TQDate dateFromPos( int pos ); // KDE4: make this virtual
/**
* Paint a cell.
*/
- virtual void paintCell(QPainter*, int, int);
+ virtual void paintCell(TQPainter*, int, int);
/**
* Paint the empty area (background).
*/
- virtual void paintEmptyArea(QPainter*, int, int, int, int);
+ virtual void paintEmptyArea(TQPainter*, int, int, int, int);
/**
* Handle the resize events.
*/
- virtual void viewportResizeEvent(QResizeEvent *);
+ virtual void viewportResizeEvent(TQResizeEvent *);
/**
* React on mouse clicks that select a date.
*/
- virtual void contentsMousePressEvent(QMouseEvent *);
- virtual void wheelEvent( QWheelEvent * e );
- virtual void keyPressEvent( QKeyEvent *e );
- virtual void focusInEvent( QFocusEvent *e );
- virtual void focusOutEvent( QFocusEvent *e );
+ virtual void contentsMousePressEvent(TQMouseEvent *);
+ virtual void wheelEvent( TQWheelEvent * e );
+ virtual void keyPressEvent( TQKeyEvent *e );
+ virtual void focusInEvent( TQFocusEvent *e );
+ virtual void focusOutEvent( TQFocusEvent *e );
// ### KDE 4.0 make the following private and mark as members
@@ -378,7 +378,7 @@ protected:
/**
* The currently selected date.
*/
- QDate date;
+ TQDate date;
/**
* The day of the first day in the month [1..7].
*/
@@ -399,20 +399,20 @@ protected:
/**
* Save the size of the largest used cell content.
*/
- QRect maxCell;
+ TQRect maxCell;
signals:
/**
* The selected date changed.
*/
// ### KDE 4.0 make parameter a const reference
- void dateChanged(QDate);
+ void dateChanged(TQDate);
/**
* This function behaves essentially like the one above.
* The selected date changed.
* @param cur The current date
* @param old The date before the date was changed
*/
- void dateChanged(const QDate& cur, const QDate& old);
+ void dateChanged(const TQDate& cur, const TQDate& old);
/**
* A date has been selected by clicking on the table.
*/
@@ -425,7 +425,7 @@ signals:
*
* @since 3.2
*/
- void aboutToShowContextMenu( KPopupMenu * menu, const QDate &date);
+ void aboutToShowContextMenu( KPopupMenu * menu, const TQDate &date);
private slots:
void nextMonth();
diff --git a/kdeui/kdatetimewidget.cpp b/kdeui/kdatetimewidget.cpp
index c696a4fcb..76d92edd2 100644
--- a/kdeui/kdatetimewidget.cpp
+++ b/kdeui/kdatetimewidget.cpp
@@ -1,4 +1,4 @@
-#include <qlayout.h>
+#include <tqlayout.h>
#include "kdatewidget.h"
#include "kdebug.h"
@@ -14,15 +14,15 @@ public:
KTimeWidget * timeWidget;
};
-KDateTimeWidget::KDateTimeWidget(QWidget * parent, const char * name)
- : QWidget(parent, name)
+KDateTimeWidget::KDateTimeWidget(TQWidget * parent, const char * name)
+ : TQWidget(parent, name)
{
init();
}
-KDateTimeWidget::KDateTimeWidget(const QDateTime & datetime,
- QWidget * parent, const char * name)
- : QWidget(parent, name)
+KDateTimeWidget::KDateTimeWidget(const TQDateTime & datetime,
+ TQWidget * parent, const char * name)
+ : TQWidget(parent, name)
{
init();
@@ -38,32 +38,32 @@ void KDateTimeWidget::init()
{
d = new KDateTimeWidgetPrivate;
- QHBoxLayout *layout = new QHBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
layout->setAutoAdd(true);
d->dateWidget = new KDateWidget(this);
d->timeWidget = new KTimeWidget(this);
- connect(d->dateWidget, SIGNAL(changed(QDate)),
- SLOT(slotValueChanged()));
- connect(d->timeWidget, SIGNAL(valueChanged(const QTime &)),
- SLOT(slotValueChanged()));
+ connect(d->dateWidget, TQT_SIGNAL(changed(TQDate)),
+ TQT_SLOT(slotValueChanged()));
+ connect(d->timeWidget, TQT_SIGNAL(valueChanged(const TQTime &)),
+ TQT_SLOT(slotValueChanged()));
}
-void KDateTimeWidget::setDateTime(const QDateTime & datetime)
+void KDateTimeWidget::setDateTime(const TQDateTime & datetime)
{
d->dateWidget->setDate(datetime.date());
d->timeWidget->setTime(datetime.time());
}
-QDateTime KDateTimeWidget::dateTime() const
+TQDateTime KDateTimeWidget::dateTime() const
{
- return QDateTime(d->dateWidget->date(), d->timeWidget->time());
+ return TQDateTime(d->dateWidget->date(), d->timeWidget->time());
}
void KDateTimeWidget::slotValueChanged()
{
- QDateTime datetime(d->dateWidget->date(),
+ TQDateTime datetime(d->dateWidget->date(),
d->timeWidget->time());
kdDebug() << "slotValueChanged(): " << datetime << "\n";
diff --git a/kdeui/kdatetimewidget.h b/kdeui/kdatetimewidget.h
index 1a3a98ab4..5505f21af 100644
--- a/kdeui/kdatetimewidget.h
+++ b/kdeui/kdatetimewidget.h
@@ -19,8 +19,8 @@
#ifndef __KDATETIMEWIDGET__
#define __KDATETIMEWIDGET__
-#include <qwidget.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqdatetime.h>
#include <kdelibs_export.h>
@@ -40,20 +40,20 @@
class KDEUI_EXPORT KDateTimeWidget : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QDateTime dateTime READ dateTime WRITE setDateTime )
+ Q_PROPERTY( TQDateTime dateTime READ dateTime WRITE setDateTime )
public:
/**
* Constructs a date and time selection widget.
*/
- KDateTimeWidget(QWidget * parent = 0, const char * name = 0);
+ KDateTimeWidget(TQWidget * parent = 0, const char * name = 0);
/**
* Constructs a date and time selection widget with the initial date and
* time set to @p datetime.
*/
- KDateTimeWidget(const QDateTime & datetime,
- QWidget * parent = 0, const char * name = 0 );
+ KDateTimeWidget(const TQDateTime & datetime,
+ TQWidget * parent = 0, const char * name = 0 );
/**
* Destructs the date and time selection widget.
@@ -63,20 +63,20 @@ public:
/**
* Returns the currently selected date and time.
*/
- QDateTime dateTime() const;
+ TQDateTime dateTime() const;
public slots:
/**
* Changes the selected date and time to @p datetime.
*/
- void setDateTime(const QDateTime & datetime);
+ void setDateTime(const TQDateTime & datetime);
signals:
/**
* Emitted whenever the date or time of the widget
* is changed, either with setDateTime() or via user selection.
*/
- void valueChanged(const QDateTime & datetime);
+ void valueChanged(const TQDateTime & datetime);
private:
void init();
diff --git a/kdeui/kdatewidget.cpp b/kdeui/kdatewidget.cpp
index 1db6d235b..ad6683e7f 100644
--- a/kdeui/kdatewidget.cpp
+++ b/kdeui/kdatewidget.cpp
@@ -17,10 +17,10 @@
*/
-#include <qpopupmenu.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqpopupmenu.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include "knuminput.h"
#include "kglobal.h"
@@ -34,8 +34,8 @@
class KDateWidgetSpinBox : public QSpinBox
{
public:
- KDateWidgetSpinBox(int min, int max, QWidget *parent)
- : QSpinBox(min, max, 1, parent)
+ KDateWidgetSpinBox(int min, int max, TQWidget *parent)
+ : TQSpinBox(min, max, 1, parent)
{
editor()->setAlignment(AlignRight);
}
@@ -45,42 +45,42 @@ class KDateWidget::KDateWidgetPrivate
{
public:
KDateWidgetSpinBox *m_day;
- QComboBox *m_month;
+ TQComboBox *m_month;
KDateWidgetSpinBox *m_year;
- QDate m_dat;
+ TQDate m_dat;
};
-KDateWidget::KDateWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KDateWidget::KDateWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- init(QDate());
- setDate(QDate());
+ init(TQDate());
+ setDate(TQDate());
}
-// ### HPB change QDate to const QDate & in KDE 4.0
-KDateWidget::KDateWidget( QDate date, QWidget *parent,
+// ### HPB change TQDate to const TQDate & in KDE 4.0
+KDateWidget::KDateWidget( TQDate date, TQWidget *parent,
const char *name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
init(date);
setDate(date);
}
-// ### CFM Repaced by init(const QDate&). Can be safely removed
+// ### CFM Repaced by init(const TQDate&). Can be safely removed
// when no risk of BIC
void KDateWidget::init()
{
d = new KDateWidgetPrivate;
KLocale *locale = KGlobal::locale();
- QHBoxLayout *layout = new QHBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
layout->setAutoAdd(true);
d->m_day = new KDateWidgetSpinBox(1, 1, this);
- d->m_month = new QComboBox(false, this);
+ d->m_month = new TQComboBox(false, this);
for (int i = 1; ; ++i)
{
- QString str = locale->calendar()->monthName(i,
- locale->calendar()->year(QDate()));
+ TQString str = locale->calendar()->monthName(i,
+ locale->calendar()->year(TQDate()));
if (str.isNull()) break;
d->m_month->insertItem(str);
}
@@ -88,22 +88,22 @@ void KDateWidget::init()
d->m_year = new KDateWidgetSpinBox(locale->calendar()->minValidYear(),
locale->calendar()->maxValidYear(), this);
- connect(d->m_day, SIGNAL(valueChanged(int)), this, SLOT(slotDateChanged()));
- connect(d->m_month, SIGNAL(activated(int)), this, SLOT(slotDateChanged()));
- connect(d->m_year, SIGNAL(valueChanged(int)), this, SLOT(slotDateChanged()));
+ connect(d->m_day, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged()));
+ connect(d->m_month, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDateChanged()));
+ connect(d->m_year, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged()));
}
-void KDateWidget::init(const QDate& date)
+void KDateWidget::init(const TQDate& date)
{
d = new KDateWidgetPrivate;
KLocale *locale = KGlobal::locale();
- QHBoxLayout *layout = new QHBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
layout->setAutoAdd(true);
d->m_day = new KDateWidgetSpinBox(1, 1, this);
- d->m_month = new QComboBox(false, this);
+ d->m_month = new TQComboBox(false, this);
for (int i = 1; ; ++i)
{
- QString str = locale->calendar()->monthName(i,
+ TQString str = locale->calendar()->monthName(i,
locale->calendar()->year(date));
if (str.isNull()) break;
d->m_month->insertItem(str);
@@ -112,9 +112,9 @@ void KDateWidget::init(const QDate& date)
d->m_year = new KDateWidgetSpinBox(locale->calendar()->minValidYear(),
locale->calendar()->maxValidYear(), this);
- connect(d->m_day, SIGNAL(valueChanged(int)), this, SLOT(slotDateChanged()));
- connect(d->m_month, SIGNAL(activated(int)), this, SLOT(slotDateChanged()));
- connect(d->m_year, SIGNAL(valueChanged(int)), this, SLOT(slotDateChanged()));
+ connect(d->m_day, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged()));
+ connect(d->m_month, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDateChanged()));
+ connect(d->m_year, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged()));
}
KDateWidget::~KDateWidget()
@@ -122,8 +122,8 @@ KDateWidget::~KDateWidget()
delete d;
}
-// ### HPB change QDate to const QDate & in KDE 4.0
-void KDateWidget::setDate( QDate date )
+// ### HPB change TQDate to const TQDate & in KDE 4.0
+void KDateWidget::setDate( TQDate date )
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
@@ -144,7 +144,7 @@ void KDateWidget::setDate( QDate date )
emit changed(d->m_dat);
}
-QDate KDateWidget::date() const
+TQDate KDateWidget::date() const
{
return d->m_dat;
}
@@ -153,7 +153,7 @@ void KDateWidget::slotDateChanged( )
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- QDate date;
+ TQDate date;
int y,m,day;
y = d->m_year->value();
diff --git a/kdeui/kdatewidget.h b/kdeui/kdatewidget.h
index a89bbe6d1..3a7f04d05 100644
--- a/kdeui/kdatewidget.h
+++ b/kdeui/kdatewidget.h
@@ -19,8 +19,8 @@
#ifndef __KDATECTL_H__
#define __KDATECTL_H__
-#include <qwidget.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqdatetime.h>
#include <kdelibs_export.h>
@@ -36,18 +36,18 @@
class KDEUI_EXPORT KDateWidget : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QDate date READ date WRITE setDate )
+ Q_PROPERTY( TQDate date READ date WRITE setDate )
public:
/**
* Constructs a date selection widget.
*/
- KDateWidget( QWidget *parent=0, const char *name=0 );
+ KDateWidget( TQWidget *parent=0, const char *name=0 );
/**
* Constructs a date selection widget with the initial date set to @p date.
*/
- KDateWidget( QDate date, QWidget *parent=0, const char *name=0 );
+ KDateWidget( TQDate date, TQWidget *parent=0, const char *name=0 );
/**
* Destructs the date selection widget.
@@ -57,12 +57,12 @@ public:
/**
* Returns the currently selected date.
*/
- QDate date() const;
+ TQDate date() const;
/**
* Changes the selected date to @p date.
*/
- void setDate(QDate date);
+ void setDate(TQDate date);
signals:
@@ -70,11 +70,11 @@ signals:
* Emitted whenever the date of the widget
* is changed, either with setDate() or via user selection.
*/
- void changed(QDate);
+ void changed(TQDate);
protected:
void init();
- void init(const QDate&);
+ void init(const TQDate&);
protected slots:
void slotDateChanged();
diff --git a/kdeui/kdcopactionproxy.cpp b/kdeui/kdcopactionproxy.cpp
index ac1138ab1..15e431da3 100644
--- a/kdeui/kdcopactionproxy.cpp
+++ b/kdeui/kdcopactionproxy.cpp
@@ -39,7 +39,7 @@ public:
KActionCollection *m_actionCollection;
DCOPObject *m_parent;
- QCString m_prefix;
+ TQCString m_prefix;
int m_pos;
};
@@ -67,10 +67,10 @@ KDCOPActionProxy::~KDCOPActionProxy()
delete d;
}
-QValueList<KAction *>KDCOPActionProxy::actions() const
+TQValueList<KAction *>KDCOPActionProxy::actions() const
{
if ( !d->m_actionCollection )
- return QValueList<KAction *>();
+ return TQValueList<KAction *>();
return d->m_actionCollection->actions();
}
@@ -83,30 +83,30 @@ KAction *KDCOPActionProxy::action( const char *name ) const
return d->m_actionCollection->action( name );
}
-QCString KDCOPActionProxy::actionObjectId( const QCString &name ) const
+TQCString KDCOPActionProxy::actionObjectId( const TQCString &name ) const
{
return d->m_prefix + name;
}
-QMap<QCString,DCOPRef> KDCOPActionProxy::actionMap( const QCString &appId ) const
+TQMap<TQCString,DCOPRef> KDCOPActionProxy::actionMap( const TQCString &appId ) const
{
- QMap<QCString,DCOPRef> res;
+ TQMap<TQCString,DCOPRef> res;
- QCString id = appId;
+ TQCString id = appId;
if ( id.isEmpty() )
id = kapp->dcopClient()->appId();
- QValueList<KAction *> lst = actions();
- QValueList<KAction *>::ConstIterator it = lst.begin();
- QValueList<KAction *>::ConstIterator end = lst.end();
+ TQValueList<KAction *> lst = actions();
+ TQValueList<KAction *>::ConstIterator it = lst.begin();
+ TQValueList<KAction *>::ConstIterator end = lst.end();
for (; it != end; ++it )
res.insert( (*it)->name(), DCOPRef( id, actionObjectId( (*it)->name() ) ) );
return res;
}
-bool KDCOPActionProxy::process( const QCString &obj, const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData )
+bool KDCOPActionProxy::process( const TQCString &obj, const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData )
{
if ( obj.left( d->m_pos ) != d->m_prefix )
return false;
@@ -118,8 +118,8 @@ bool KDCOPActionProxy::process( const QCString &obj, const QCString &fun, const
return processAction( obj, fun, data, replyType, replyData, act );
}
-bool KDCOPActionProxy::processAction( const QCString &, const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData, KAction *action )
+bool KDCOPActionProxy::processAction( const TQCString &, const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData, KAction *action )
{
if ( fun == "activate()" )
{
@@ -131,14 +131,14 @@ bool KDCOPActionProxy::processAction( const QCString &, const QCString &fun, con
if ( fun == "isPlugged()" )
{
replyType = "bool";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << (Q_INT8)action->isPlugged();
return true;
}
if ( fun == "functions()" )
{
- QValueList<QCString> res;
+ TQValueList<TQCString> res;
res << "QCStringList functions()";
res << "void activate()";
res << "bool isPlugged()";
@@ -146,7 +146,7 @@ bool KDCOPActionProxy::processAction( const QCString &, const QCString &fun, con
res += KDCOPPropertyProxy::functions( action );
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << res;
return true;
}
diff --git a/kdeui/kdcopactionproxy.h b/kdeui/kdcopactionproxy.h
index 48a7ea9a0..5b0ffdc1c 100644
--- a/kdeui/kdcopactionproxy.h
+++ b/kdeui/kdcopactionproxy.h
@@ -60,7 +60,7 @@ 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.
*/
- virtual QValueList<KAction *> actions() const;
+ virtual TQValueList<KAction *> 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.
@@ -77,7 +77,7 @@ public:
*
* The action with the given name has to be available through the #action method.
*/
- virtual QCString actionObjectId( const QCString &name ) const;
+ virtual TQCString actionObjectId( const TQCString &name ) const;
/**
* Returns a map of all exported actions, with the action name as keys and a global DCOP reference
@@ -85,20 +85,20 @@ public:
* The appId argument is used to specify the appid component of the DCOP reference. By default the
* global application id is used ( kapp->dcopClient()->appId() ) .
*/
- virtual QMap<QCString,DCOPRef> actionMap( const QCString &appId = QCString() ) const;
+ virtual TQMap<TQCString,DCOPRef> actionMap( const TQCString &appId = TQCString() ) const;
/**
* Internal reimplementation of DCOPObjectProxy::process .
*/
- virtual bool process( const QCString &obj, const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData );
+ virtual bool process( const TQCString &obj, const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData );
/**
* Called by the #process method and takes care of processing the object request for an
* action object.
*/
- virtual bool processAction( const QCString &obj, const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData, KAction *action );
+ virtual bool processAction( const TQCString &obj, const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData, KAction *action );
private:
void init( KActionCollection *collection, DCOPObject *parent );
diff --git a/kdeui/kdetrayproxy/kdetrayproxy.cpp b/kdeui/kdetrayproxy/kdetrayproxy.cpp
index b41b337b3..e49f3a148 100644
--- a/kdeui/kdetrayproxy/kdetrayproxy.cpp
+++ b/kdeui/kdetrayproxy/kdetrayproxy.cpp
@@ -32,10 +32,10 @@
KDETrayProxy::KDETrayProxy()
: selection( makeSelectionAtom())
{
- connect( &selection, SIGNAL( newOwner( Window )), SLOT( newOwner( Window )));
- connect( &module, SIGNAL( windowAdded( WId )), SLOT( windowAdded( WId )));
+ connect( &selection, TQT_SIGNAL( newOwner( Window )), TQT_SLOT( newOwner( Window )));
+ connect( &module, TQT_SIGNAL( windowAdded( WId )), TQT_SLOT( windowAdded( WId )));
selection.owner();
- for( QValueList< WId >::ConstIterator it = module.windows().begin();
+ for( TQValueList< WId >::ConstIterator it = module.windows().begin();
it != module.windows().end();
++it )
windowAdded( *it );
@@ -45,7 +45,7 @@ KDETrayProxy::KDETrayProxy()
Atom KDETrayProxy::makeSelectionAtom()
{
- return XInternAtom( qt_xdisplay(), "_NET_SYSTEM_TRAY_S" + QCString().setNum( qt_xscreen()), False );
+ return XInternAtom( qt_xdisplay(), "_NET_SYSTEM_TRAY_S" + TQCString().setNum( qt_xscreen()), False );
}
extern Time qt_x_time;
@@ -76,7 +76,7 @@ void KDETrayProxy::windowAdded( WId w )
void KDETrayProxy::newOwner( Window owner )
{
// kdDebug() << "New owner:" << owner << endl;
- for( QValueList< Window >::ConstIterator it = pending_windows.begin();
+ for( TQValueList< Window >::ConstIterator it = pending_windows.begin();
it != pending_windows.end();
++it )
dockWindow( *it, owner );
diff --git a/kdeui/kdetrayproxy/kdetrayproxy.h b/kdeui/kdetrayproxy/kdetrayproxy.h
index 67c9c6299..49a7164cc 100644
--- a/kdeui/kdetrayproxy/kdetrayproxy.h
+++ b/kdeui/kdetrayproxy/kdetrayproxy.h
@@ -20,10 +20,10 @@
#ifndef _KDE_TRAY_PROXY_H_
#define _KDE_TRAY_PROXY_H_
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kmanagerselection.h>
#include <kwinmodule.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class KDETrayProxy
: public QWidget
@@ -42,9 +42,9 @@ class KDETrayProxy
static Atom makeSelectionAtom();
KSelectionWatcher selection;
KWinModule module;
- QValueList< Window > pending_windows;
- QValueList< Window > tray_windows;
- QMap< Window, unsigned long > docked_windows;
+ TQValueList< Window > pending_windows;
+ TQValueList< Window > tray_windows;
+ TQMap< Window, unsigned long > docked_windows;
};
#endif
diff --git a/kdeui/kdetrayproxy/module.cpp b/kdeui/kdetrayproxy/module.cpp
index c3a6a7b0c..5da30bab8 100644
--- a/kdeui/kdetrayproxy/module.cpp
+++ b/kdeui/kdetrayproxy/module.cpp
@@ -19,13 +19,13 @@
#include "module.h"
-KDETrayModule::KDETrayModule( const QCString& obj )
+KDETrayModule::KDETrayModule( const TQCString& obj )
: KDEDModule( obj )
{
}
extern "C"
-KDE_EXPORT KDEDModule *create_kdetrayproxy( const QCString& obj )
+KDE_EXPORT KDEDModule *create_kdetrayproxy( const TQCString& obj )
{
return new KDETrayModule( obj );
}
diff --git a/kdeui/kdetrayproxy/module.h b/kdeui/kdetrayproxy/module.h
index f5ef55f6d..67ed1a29d 100644
--- a/kdeui/kdetrayproxy/module.h
+++ b/kdeui/kdetrayproxy/module.h
@@ -31,7 +31,7 @@ class KDETrayModule
Q_OBJECT
K_DCOP
public:
- KDETrayModule( const QCString& obj );
+ KDETrayModule( const TQCString& obj );
private:
KDETrayProxy proxy;
};
diff --git a/kdeui/kdialog.cpp b/kdeui/kdialog.cpp
index b61ea9089..5963a415d 100644
--- a/kdeui/kdialog.cpp
+++ b/kdeui/kdialog.cpp
@@ -25,13 +25,13 @@
#include <kdebug.h>
#include <kstaticdeleter.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qguardedptr.h>
-#include <qlineedit.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
-#include <qcursor.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqguardedptr.h>
+#include <tqlineedit.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
+#include <tqcursor.h>
#include "config.h"
#ifdef Q_WS_X11
@@ -41,10 +41,10 @@
const int KDialog::mMarginSize = 11;
const int KDialog::mSpacingSize = 6;
-template class QPtrList<QLayoutItem>;
+template class TQPtrList<TQLayoutItem>;
-KDialog::KDialog(QWidget *parent, const char *name, bool modal, WFlags f)
- : QDialog(parent, name, modal, f), d(0)
+KDialog::KDialog(TQWidget *parent, const char *name, bool modal, WFlags f)
+ : TQDialog(parent, name, modal, f), d(0)
{
KWhatsThisManager::init ();
}
@@ -52,7 +52,7 @@ KDialog::KDialog(QWidget *parent, const char *name, bool modal, WFlags f)
//
// Grab QDialogs keypresses if non-modal.
//
-void KDialog::keyPressEvent(QKeyEvent *e)
+void KDialog::keyPressEvent(TQKeyEvent *e)
{
if ( e->state() == 0 )
{
@@ -64,7 +64,7 @@ void KDialog::keyPressEvent(QKeyEvent *e)
{
if(testWFlags(WType_Dialog | WShowModal))
{
- QDialog::keyPressEvent(e);
+ TQDialog::keyPressEvent(e);
}
else
{
@@ -108,20 +108,20 @@ int KDialog::spacingHint()
// KDE4: Remove me
void KDialog::polish()
{
- QDialog::polish();
+ TQDialog::polish();
}
-void KDialog::setCaption( const QString &_caption )
+void KDialog::setCaption( const TQString &_caption )
{
- QString caption = kapp ? kapp->makeStdCaption( _caption ) : _caption;
+ TQString caption = kapp ? kapp->makeStdCaption( _caption ) : _caption;
setPlainCaption( caption );
}
-void KDialog::setPlainCaption( const QString &caption )
+void KDialog::setPlainCaption( const TQString &caption )
{
- QDialog::setCaption( caption );
+ TQDialog::setCaption( caption );
#ifdef Q_WS_X11
NETWinInfo info( qt_xdisplay(), winId(), qt_xrootwin(), 0 );
@@ -130,7 +130,7 @@ void KDialog::setPlainCaption( const QString &caption )
}
-void KDialog::resizeLayout( QWidget *w, int margin, int spacing )
+void KDialog::resizeLayout( TQWidget *w, int margin, int spacing )
{
if( w->layout() )
{
@@ -139,13 +139,13 @@ void KDialog::resizeLayout( QWidget *w, int margin, int spacing )
if( w->children() )
{
- const QObjectList * const l = w->children();
- QObjectListIterator itr(*l);
- QObject *o;
+ const TQObjectList * const l = w->children();
+ TQObjectListIterator itr(*l);
+ TQObject *o;
while ((o = itr.current()) != 0) {
if( o->isWidgetType() )
{
- resizeLayout( (QWidget*)o, margin, spacing );
+ resizeLayout( (TQWidget*)o, margin, spacing );
}
++itr;
}
@@ -153,10 +153,10 @@ void KDialog::resizeLayout( QWidget *w, int margin, int spacing )
}
-void KDialog::resizeLayout( QLayoutItem *lay, int margin, int spacing )
+void KDialog::resizeLayout( TQLayoutItem *lay, int margin, int spacing )
{
- QLayoutIterator it = lay->iterator();
- QLayoutItem *child;
+ TQLayoutIterator it = lay->iterator();
+ TQLayoutItem *child;
while ( (child = it.current() ) )
{
resizeLayout( child, margin, spacing );
@@ -169,9 +169,9 @@ void KDialog::resizeLayout( QLayoutItem *lay, int margin, int spacing )
}
}
-static QRect screenRect( QWidget *w, int screen )
+static TQRect screenRect( TQWidget *w, int screen )
{
- QDesktopWidget *desktop = QApplication::desktop();
+ TQDesktopWidget *desktop = TQApplication::desktop();
KConfig gc("kdeglobals", false, false);
gc.setGroup("Windows");
if (desktop->isVirtualDesktop() &&
@@ -181,7 +181,7 @@ static QRect screenRect( QWidget *w, int screen )
if ( screen == -1 ) {
screen = desktop->primaryScreen();
} else if ( screen == -3 ) {
- screen = desktop->screenNumber( QCursor::pos() );
+ screen = desktop->screenNumber( TQCursor::pos() );
} else {
screen = desktop->screenNumber( w );
}
@@ -192,26 +192,26 @@ static QRect screenRect( QWidget *w, int screen )
}
}
-void KDialog::centerOnScreen( QWidget *w, int screen )
+void KDialog::centerOnScreen( TQWidget *w, int screen )
{
if ( !w )
return;
- QRect r = screenRect( w, screen );
+ TQRect r = screenRect( w, screen );
w->move( r.center().x() - w->width()/2,
r.center().y() - w->height()/2 );
}
-bool KDialog::avoidArea( QWidget *w, const QRect& area, int screen )
+bool KDialog::avoidArea( TQWidget *w, const TQRect& area, int screen )
{
if ( !w )
return false;
- QRect fg = w->frameGeometry();
+ TQRect fg = w->frameGeometry();
if ( !fg.intersects( area ) )
return true; // nothing to do.
- QRect scr = screenRect( w, screen );
- QRect avoid( area ); // let's add some margin
+ TQRect scr = screenRect( w, screen );
+ TQRect avoid( area ); // let's add some margin
avoid.moveBy( -5, -5 );
avoid.rRight() += 10;
avoid.rBottom() += 10;
@@ -257,7 +257,7 @@ bool KDialog::avoidArea( QWidget *w, const QRect& area, int screen )
class KDialogQueuePrivate
{
public:
- QValueList< QGuardedPtr<QDialog> > queue;
+ TQValueList< TQGuardedPtr<TQDialog> > queue;
bool busy;
};
@@ -284,18 +284,18 @@ KDialogQueue::~KDialogQueue()
}
// static
-void KDialogQueue::queueDialog(QDialog *dialog)
+void KDialogQueue::queueDialog(TQDialog *dialog)
{
KDialogQueue *_this = self();
_this->d->queue.append(dialog);
- QTimer::singleShot(0, _this, SLOT(slotShowQueuedDialog()));
+ TQTimer::singleShot(0, _this, TQT_SLOT(slotShowQueuedDialog()));
}
void KDialogQueue::slotShowQueuedDialog()
{
if (d->busy)
return;
- QDialog *dialog;
+ TQDialog *dialog;
do {
if(d->queue.isEmpty())
return;
@@ -310,7 +310,7 @@ void KDialogQueue::slotShowQueuedDialog()
delete dialog;
if (!d->queue.isEmpty())
- QTimer::singleShot(20, this, SLOT(slotShowQueuedDialog()));
+ TQTimer::singleShot(20, this, TQT_SLOT(slotShowQueuedDialog()));
else
ksdkdq.destructObject(); // Suicide.
}
diff --git a/kdeui/kdialog.h b/kdeui/kdialog.h
index 78e26187d..ae8cdb490 100644
--- a/kdeui/kdialog.h
+++ b/kdeui/kdialog.h
@@ -21,7 +21,7 @@
#ifndef _KDIALOG_H_
#define _KDIALOG_H_
-#include <qdialog.h>
+#include <tqdialog.h>
#include <kdelibs_export.h>
class QLayoutItem;
@@ -57,9 +57,9 @@ class KDEUI_EXPORT KDialog : public QDialog
/**
* Constructor.
*
- * Takes the same arguments as QDialog.
+ * Takes the same arguments as TQDialog.
*/
- KDialog(QWidget *parent = 0, const char *name = 0,
+ KDialog(TQWidget *parent = 0, const char *name = 0,
bool modal = false, WFlags f = 0);
/**
@@ -81,7 +81,7 @@ class KDEUI_EXPORT KDialog : public QDialog
* @param margin The new layout margin.
* @param spacing The new layout spacing.
*/
- static void resizeLayout( QWidget *widget, int margin, int spacing );
+ static void resizeLayout( TQWidget *widget, int margin, int spacing );
/**
* Resize every layout associated with @p lay and its children.
@@ -90,7 +90,7 @@ class KDEUI_EXPORT KDialog : public QDialog
* @param margin The new layout margin
* @param spacing The new layout spacing
*/
- static void resizeLayout( QLayoutItem *lay, int margin, int spacing );
+ static void resizeLayout( TQLayoutItem *lay, int margin, int spacing );
/**
* Centers @p widget on the desktop, taking multi-head setups into
@@ -102,7 +102,7 @@ class KDEUI_EXPORT KDialog : public QDialog
* in use, or merged display placement is not enabled in kdeglobals.
* @since 3.1
*/
- static void centerOnScreen( QWidget *widget, int screen = -1 );
+ static void centerOnScreen( TQWidget *widget, int screen = -1 );
/**
* Places @p widget so that it doesn't cover a certain @p area of the screen.
@@ -113,11 +113,11 @@ class KDEUI_EXPORT KDialog : public QDialog
* false on failure (not enough space found)
* @since 3.2
*/
- static bool avoidArea( QWidget *widget, const QRect& area, int screen = -1 );
+ static bool avoidArea( TQWidget *widget, const TQRect& area, int screen = -1 );
public slots:
/**
- * If the dialog starts with focus in a QLineEdit child,
+ * If the dialog starts with focus in a TQLineEdit child,
* then call selectAll() on the child.
*/
virtual void polish();
@@ -129,7 +129,7 @@ class KDEUI_EXPORT KDialog : public QDialog
* in this string. It will be added automatically according to the KDE
* standard.
*/
- virtual void setCaption( const QString &caption );
+ virtual void setCaption( const TQString &caption );
/**
* Make a plain caption without any modifications.
@@ -137,14 +137,14 @@ class KDEUI_EXPORT KDialog : public QDialog
* @param caption Your caption. This is the string that will be
* displayed in the window title.
*/
- virtual void setPlainCaption( const QString &caption );
+ virtual void setPlainCaption( const TQString &caption );
protected:
/**
* @internal
*/
- virtual void keyPressEvent(QKeyEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
signals:
@@ -191,7 +191,7 @@ class KDEUI_EXPORT KDialogQueue : public QObject
public:
- static void queueDialog(QDialog *);
+ static void queueDialog(TQDialog *);
~KDialogQueue();
diff --git a/kdeui/kdialogbase.cpp b/kdeui/kdialogbase.cpp
index a0ef23f32..202de5f9b 100644
--- a/kdeui/kdialogbase.cpp
+++ b/kdeui/kdialogbase.cpp
@@ -24,14 +24,14 @@
#include "kdialogbase.h"
#include <stdlib.h>
-#include <qgrid.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
-#include <qfocusdata.h>
+#include <tqgrid.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
+#include <tqfocusdata.h>
#include <kapplication.h>
#include <klocale.h>
@@ -53,7 +53,7 @@ int KDialogBaseButton::id()
return mKey;
}
-template class QPtrList<KDialogBaseButton>;
+template class TQPtrList<KDialogBaseButton>;
/**
* @internal
@@ -75,10 +75,10 @@ struct SButton : public Qt
KPushButton *button( int key );
- QWidget *box;
+ TQWidget *box;
int mask;
int style;
- QPtrList<KDialogBaseButton> list;
+ TQPtrList<KDialogBaseButton> list;
};
}// namespace
@@ -89,15 +89,15 @@ public:
bool bDetails;
bool bFixed;
bool bSettingDetails;
- QWidget *detailsWidget;
- QSize incSize;
- QSize minSize;
- QString detailsButton;
+ TQWidget *detailsWidget;
+ TQSize incSize;
+ TQSize minSize;
+ TQString detailsButton;
SButton mButton;
};
-KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal,
- const QString &caption, int buttonMask,
+KDialogBase::KDialogBase( TQWidget *parent, const char *name, bool modal,
+ const TQString &caption, int buttonMask,
ButtonCode defaultButton, bool separator,
const KGuiItem &user1, const KGuiItem &user2,
const KGuiItem &user3 )
@@ -109,7 +109,7 @@ KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal,
setCaption( caption );
makeRelay();
- connect( this, SIGNAL(layoutHintChanged()), SLOT(updateGeometry()) );
+ connect( this, TQT_SIGNAL(layoutHintChanged()), TQT_SLOT(updateGeometry()) );
enableButtonSeparator( separator );
makeButtonBox( buttonMask, defaultButton, user1, user2, user3 );
@@ -118,9 +118,9 @@ KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal,
setupLayout();
}
-KDialogBase::KDialogBase( int dialogFace, const QString &caption,
+KDialogBase::KDialogBase( int dialogFace, const TQString &caption,
int buttonMask, ButtonCode defaultButton,
- QWidget *parent, const char *name, bool modal,
+ TQWidget *parent, const char *name, bool modal,
bool separator, const KGuiItem &user1,
const KGuiItem &user2, const KGuiItem &user3 )
:KDialog( parent, name, modal, WStyle_DialogBorder ),
@@ -131,11 +131,11 @@ KDialogBase::KDialogBase( int dialogFace, const QString &caption,
setCaption( caption );
makeRelay();
- connect( this, SIGNAL(layoutHintChanged()), SLOT(updateGeometry()) );
+ connect( this, TQT_SIGNAL(layoutHintChanged()), TQT_SLOT(updateGeometry()) );
mJanus = new KJanusWidget( this, "janus", dialogFace );
- connect(mJanus, SIGNAL(aboutToShowPage(QWidget *)),
- this, SIGNAL(aboutToShowPage(QWidget *)));
+ connect(mJanus, TQT_SIGNAL(aboutToShowPage(TQWidget *)),
+ this, TQT_SIGNAL(aboutToShowPage(TQWidget *)));
if( !mJanus || !mJanus->isValid() ) { return; }
@@ -146,9 +146,9 @@ KDialogBase::KDialogBase( int dialogFace, const QString &caption,
setupLayout();
}
-KDialogBase::KDialogBase( KDialogBase::DialogType dialogFace, WFlags f, QWidget *parent, const char *name,
+KDialogBase::KDialogBase( KDialogBase::DialogType dialogFace, WFlags f, TQWidget *parent, const char *name,
bool modal,
- const QString &caption, int buttonMask,
+ const TQString &caption, int buttonMask,
ButtonCode defaultButton, bool separator,
const KGuiItem &user1, const KGuiItem &user2,
const KGuiItem &user3 )
@@ -160,11 +160,11 @@ KDialogBase::KDialogBase( KDialogBase::DialogType dialogFace, WFlags f, QWidget
setCaption( caption );
makeRelay();
- connect( this, SIGNAL(layoutHintChanged()), SLOT(updateGeometry()) );
+ connect( this, TQT_SIGNAL(layoutHintChanged()), TQT_SLOT(updateGeometry()) );
mJanus = new KJanusWidget( this, "janus", dialogFace );
- connect(mJanus, SIGNAL(aboutToShowPage(QWidget *)),
- this, SIGNAL(aboutToShowPage(QWidget *)));
+ connect(mJanus, TQT_SIGNAL(aboutToShowPage(TQWidget *)),
+ this, TQT_SIGNAL(aboutToShowPage(TQWidget *)));
if( !mJanus || !mJanus->isValid() ) { return; }
@@ -175,9 +175,9 @@ KDialogBase::KDialogBase( KDialogBase::DialogType dialogFace, WFlags f, QWidget
setupLayout();
}
-KDialogBase::KDialogBase( const QString &caption, int buttonMask,
+KDialogBase::KDialogBase( const TQString &caption, int buttonMask,
ButtonCode defaultButton, ButtonCode escapeButton,
- QWidget *parent, const char *name, bool modal,
+ TQWidget *parent, const char *name, bool modal,
bool separator, const KGuiItem &yes,
const KGuiItem &no, const KGuiItem &cancel )
:KDialog( parent, name, modal, WStyle_DialogBorder ),
@@ -189,7 +189,7 @@ KDialogBase::KDialogBase( const QString &caption, int buttonMask,
setCaption( caption );
makeRelay();
- connect( this, SIGNAL(layoutHintChanged()), SLOT(updateGeometry()) );
+ connect( this, TQT_SIGNAL(layoutHintChanged()), TQT_SLOT(updateGeometry()) );
enableButtonSeparator( separator );
@@ -230,7 +230,7 @@ void SButton::resize( bool sameWidth, int margin,
for( p = list.first(); p; p = list.next() )
{
- const QSize s( p->sizeHint() );
+ const TQSize s( p->sizeHint() );
if( s.height() > h ) { h = s.height(); }
if( s.width() > w ) { w = s.width(); }
}
@@ -239,7 +239,7 @@ void SButton::resize( bool sameWidth, int margin,
{
for( p = list.first(); p; p = list.next() )
{
- QSize s( p->sizeHint() );
+ TQSize s( p->sizeHint() );
if( sameWidth ) { s.setWidth( w ); }
p->setFixedWidth( s.width() );
t += s.width() + spacing;
@@ -253,7 +253,7 @@ void SButton::resize( bool sameWidth, int margin,
// sameWidth has no effect here
for( p = list.first(); p; p = list.next() )
{
- QSize s( p->sizeHint() );
+ TQSize s( p->sizeHint() );
s.setWidth( w );
p->setFixedSize( s );
t += s.height() + spacing;
@@ -281,7 +281,7 @@ KDialogBase::delayedDestruct()
{
if (isVisible())
hide();
- QTimer::singleShot( 0, this, SLOT(slotDelayedDestruct()));
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotDelayedDestruct()));
}
void
@@ -296,17 +296,17 @@ void KDialogBase::setupLayout()
{
delete mTopLayout;
}
- // mTopLayout = new QVBoxLayout( this, marginHint(), spacingHint() );
+ // mTopLayout = new TQVBoxLayout( this, marginHint(), spacingHint() );
if( mButtonOrientation == Horizontal )
{
- mTopLayout = new QBoxLayout( this, QBoxLayout::TopToBottom,
+ mTopLayout = new TQBoxLayout( this, TQBoxLayout::TopToBottom,
marginHint(), spacingHint() );
}
else
{
- mTopLayout = new QBoxLayout( this, QBoxLayout::LeftToRight,
+ mTopLayout = new TQBoxLayout( this, TQBoxLayout::LeftToRight,
marginHint(), spacingHint() );
}
@@ -350,7 +350,7 @@ void KDialogBase::setButtonBoxOrientation( int orientation )
if( mActionSep )
{
mActionSep->setOrientation( mButtonOrientation == Horizontal ?
- QFrame::HLine : QFrame::VLine );
+ TQFrame::HLine : TQFrame::VLine );
}
if( mButtonOrientation == Vertical )
{
@@ -373,15 +373,15 @@ void KDialogBase::makeRelay()
{
if( mTile )
{
- connect( mTile, SIGNAL(pixmapChanged()), SLOT(updateBackground()) );
+ connect( mTile, TQT_SIGNAL(pixmapChanged()), TQT_SLOT(updateBackground()) );
return;
}
mTile = new KDialogBaseTile;
if( mTile )
{
- connect( mTile, SIGNAL(pixmapChanged()), SLOT(updateBackground()) );
- connect( qApp, SIGNAL(aboutToQuit()), mTile, SLOT(cleanup()) );
+ connect( mTile, TQT_SIGNAL(pixmapChanged()), TQT_SLOT(updateBackground()) );
+ connect( qApp, TQT_SIGNAL(aboutToQuit()), mTile, TQT_SLOT(cleanup()) );
}
}
@@ -395,9 +395,9 @@ void KDialogBase::enableButtonSeparator( bool state )
return;
}
mActionSep = new KSeparator( this );
- mActionSep->setFocusPolicy(QWidget::NoFocus);
+ mActionSep->setFocusPolicy(TQWidget::NoFocus);
mActionSep->setOrientation( mButtonOrientation == Horizontal ?
- QFrame::HLine : QFrame::VLine );
+ TQFrame::HLine : TQFrame::VLine );
mActionSep->show();
}
else
@@ -417,7 +417,7 @@ void KDialogBase::enableButtonSeparator( bool state )
-QFrame *KDialogBase::plainPage()
+TQFrame *KDialogBase::plainPage()
{
return ( mJanus ? mJanus->plainPage() : 0 );
}
@@ -434,20 +434,20 @@ void KDialogBase::adjustSize()
resize( sizeHint() );
}
-QSize KDialogBase::sizeHint() const
+TQSize KDialogBase::sizeHint() const
{
return d->minSize.expandedTo( minimumSizeHint() ) + d->incSize;
}
-QSize KDialogBase::minimumSizeHint() const
+TQSize KDialogBase::minimumSizeHint() const
{
const int m = marginHint();
const int s = spacingHint();
- const QSize zeroByS(0, s);
+ const TQSize zeroByS(0, s);
- QSize s1(0,0);
- QSize s2(0,0);
+ TQSize s1(0,0);
+ TQSize s2(0,0);
//
// Url help area
@@ -473,12 +473,12 @@ QSize KDialogBase::minimumSizeHint() const
s2 = s2.expandedTo( mMainWidget->minimumSizeHint() );
if( s2.isEmpty() )
{
- s2 = QSize( 100, 100+s );
+ s2 = TQSize( 100, 100+s );
}
}
else
{
- s2 = QSize( 100, 100+s );
+ s2 = TQSize( 100, 100+s );
}
s1.rwidth() = QMAX( s1.rwidth(), s2.rwidth() );
s1.rheight() += s2.rheight();
@@ -534,7 +534,7 @@ void KDialogBase::disableResize()
}
-void KDialogBase::setInitialSize( const QSize &s, bool noResize )
+void KDialogBase::setInitialSize( const TQSize &s, bool noResize )
{
d->minSize = s;
d->bFixed = noResize;
@@ -542,7 +542,7 @@ void KDialogBase::setInitialSize( const QSize &s, bool noResize )
}
-void KDialogBase::incInitialSize( const QSize &s, bool noResize )
+void KDialogBase::incInitialSize( const TQSize &s, bool noResize )
{
d->incSize = s;
d->bFixed = noResize;
@@ -569,42 +569,42 @@ void KDialogBase::makeButtonBox( int buttonMask, ButtonCode defaultButton,
mEscapeButton = (buttonMask&Cancel) ? Cancel : Close;
}
- d->mButton.box = new QWidget( this );
+ d->mButton.box = new TQWidget( this );
d->mButton.mask = buttonMask;
if( d->mButton.mask & Help )
{
KPushButton *pb = d->mButton.append( Help, KStdGuiItem::help() );
- connect( pb, SIGNAL(clicked()), SLOT(slotHelp()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotHelp()) );
}
if( d->mButton.mask & Default )
{
KPushButton *pb = d->mButton.append( Default, KStdGuiItem::defaults() );
- connect( pb, SIGNAL(clicked()), SLOT(slotDefault()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefault()) );
}
if( d->mButton.mask & Details )
{
- KPushButton *pb = d->mButton.append( Details, QString::null );
- connect( pb, SIGNAL(clicked()), SLOT(slotDetails()) );
+ KPushButton *pb = d->mButton.append( Details, TQString::null );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotDetails()) );
setDetails(false);
}
if( d->mButton.mask & User3 )
{
KPushButton *pb = d->mButton.append( User3, user3 );
- connect( pb, SIGNAL(clicked()), SLOT(slotUser3()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotUser3()) );
}
if( d->mButton.mask & User2 )
{
KPushButton *pb = d->mButton.append( User2, user2 );
if( mMessageBoxMode )
{
- connect( pb, SIGNAL(clicked()), SLOT(slotYes()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotYes()) );
}
else
{
- connect( pb, SIGNAL(clicked()), this, SLOT(slotUser2()) );
+ connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUser2()) );
}
}
if( d->mButton.mask & User1 )
@@ -612,44 +612,44 @@ void KDialogBase::makeButtonBox( int buttonMask, ButtonCode defaultButton,
KPushButton *pb = d->mButton.append( User1, user1 );
if( mMessageBoxMode )
{
- connect( pb, SIGNAL(clicked()), this, SLOT(slotNo()) );
+ connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNo()) );
}
else
{
- connect( pb, SIGNAL(clicked()), SLOT(slotUser1()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotUser1()) );
}
}
if( d->mButton.mask & Ok )
{
KPushButton *pb = d->mButton.append( Ok, KStdGuiItem::ok() );
- connect( pb, SIGNAL(clicked()), SLOT(slotOk()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotOk()) );
}
if( d->mButton.mask & Apply )
{
KPushButton *pb = d->mButton.append( Apply, KStdGuiItem::apply() );
- connect( pb, SIGNAL(clicked()), SLOT(slotApply()) );
- connect( pb, SIGNAL(clicked()), SLOT(applyPressed()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotApply()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(applyPressed()) );
}
if( d->mButton.mask & Try )
{
KPushButton *pb = d->mButton.append( Try,
i18n( "&Try" ) );
- connect( pb, SIGNAL(clicked()), SLOT(slotTry()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotTry()) );
}
if( d->mButton.mask & Cancel )
{
KPushButton *pb = d->mButton.append( Cancel, KStdGuiItem::cancel() );
- connect( pb, SIGNAL(clicked()), SLOT(slotCancel()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotCancel()) );
}
if( d->mButton.mask & Close )
{
KPushButton *pb = d->mButton.append( Close, KStdGuiItem::close() );
- connect( pb, SIGNAL(clicked()), SLOT(slotClose()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotClose()) );
}
if( defaultButton != NoDefault )
{
- QPushButton *pb = actionButton( defaultButton );
+ TQPushButton *pb = actionButton( defaultButton );
if( pb )
{
setButtonFocus( pb, true, false );
@@ -719,21 +719,21 @@ void KDialogBase::setButtonStyle( int style )
delete d->mButton.box->layout();
}
- QBoxLayout *lay;
+ TQBoxLayout *lay;
if( mButtonOrientation == Horizontal )
{
- lay = new QBoxLayout( d->mButton.box, QBoxLayout::LeftToRight, 0,
+ lay = new TQBoxLayout( d->mButton.box, TQBoxLayout::LeftToRight, 0,
spacingHint());
}
else
{
- lay = new QBoxLayout( d->mButton.box, QBoxLayout::TopToBottom, 0,
+ lay = new TQBoxLayout( d->mButton.box, TQBoxLayout::TopToBottom, 0,
spacingHint());
}
int numButton = 0;
- QPushButton *prevButton = 0;
- QPushButton *newButton;
+ TQPushButton *prevButton = 0;
+ TQPushButton *newButton;
for( int i=0; i<layoutMax; ++i )
{
@@ -829,7 +829,7 @@ void KDialogBase::setButtonStyle( int style )
}
-QPushButton *KDialogBase::actionButton( ButtonCode id )
+TQPushButton *KDialogBase::actionButton( ButtonCode id )
{
return d->mButton.button(id);
}
@@ -837,7 +837,7 @@ QPushButton *KDialogBase::actionButton( ButtonCode id )
void KDialogBase::enableButton( ButtonCode id, bool state )
{
- QPushButton *pb = actionButton( id );
+ TQPushButton *pb = actionButton( id );
if( pb )
{
pb->setEnabled( state );
@@ -865,7 +865,7 @@ void KDialogBase::enableButtonCancel( bool state )
void KDialogBase::showButton( ButtonCode id, bool state )
{
- QPushButton *pb = actionButton( id );
+ TQPushButton *pb = actionButton( id );
if( pb )
{
state ? pb->show() : pb->hide();
@@ -891,25 +891,25 @@ void KDialogBase::showButtonCancel( bool state )
}
-void KDialogBase::setButtonOKText( const QString &text,
- const QString &tooltip,
- const QString &quickhelp )
+void KDialogBase::setButtonOKText( const TQString &text,
+ const TQString &tooltip,
+ const TQString &quickhelp )
{
- QPushButton *pb = actionButton( Ok );
+ TQPushButton *pb = actionButton( Ok );
if( !pb )
{
return;
}
- const QString whatsThis = i18n( ""
+ const TQString whatsThis = i18n( ""
"If you press the <b>OK</b> button, all changes\n"
"you made will be used to proceed.");
pb->setText( text.isEmpty() ? i18n("&OK") : text );
d->mButton.resize( false, 0, spacingHint(), mButtonOrientation );
- QToolTip::add( pb, tooltip.isEmpty() ? i18n("Accept settings") : tooltip );
- QWhatsThis::add( pb, quickhelp.isEmpty() ? whatsThis : quickhelp );
+ TQToolTip::add( pb, tooltip.isEmpty() ? i18n("Accept settings") : tooltip );
+ TQWhatsThis::add( pb, quickhelp.isEmpty() ? whatsThis : quickhelp );
}
@@ -919,17 +919,17 @@ void KDialogBase::setButtonOK( const KGuiItem &item /* = KStdGuiItem::ok() */ )
}
-void KDialogBase::setButtonApplyText( const QString &text,
- const QString &tooltip,
- const QString &quickhelp )
+void KDialogBase::setButtonApplyText( const TQString &text,
+ const TQString &tooltip,
+ const TQString &quickhelp )
{
- QPushButton *pb = actionButton( Apply );
+ TQPushButton *pb = actionButton( Apply );
if( !pb )
{
return;
}
- const QString whatsThis = i18n( ""
+ const TQString whatsThis = i18n( ""
"When clicking <b>Apply</b>, the settings will be\n"
"handed over to the program, but the dialog\n"
"will not be closed. "
@@ -938,8 +938,8 @@ void KDialogBase::setButtonApplyText( const QString &text,
pb->setText( text.isEmpty() ? i18n("&Apply") : text );
d->mButton.resize( false, 0, spacingHint(), mButtonOrientation );
- QToolTip::add( pb, tooltip.isEmpty() ? i18n("Apply settings") : tooltip );
- QWhatsThis::add( pb, quickhelp.isEmpty() ? whatsThis : quickhelp );
+ TQToolTip::add( pb, tooltip.isEmpty() ? i18n("Apply settings") : tooltip );
+ TQWhatsThis::add( pb, quickhelp.isEmpty() ? whatsThis : quickhelp );
}
@@ -949,11 +949,11 @@ void KDialogBase::setButtonApply( const KGuiItem &item /* = KStdGuiItem::apply()
}
-void KDialogBase::setButtonCancelText( const QString& text,
- const QString& tooltip,
- const QString& quickhelp )
+void KDialogBase::setButtonCancelText( const TQString& text,
+ const TQString& tooltip,
+ const TQString& quickhelp )
{
- QPushButton *pb = actionButton( Cancel );
+ TQPushButton *pb = actionButton( Cancel );
if( !pb )
{
return;
@@ -962,8 +962,8 @@ void KDialogBase::setButtonCancelText( const QString& text,
pb->setText( text.isEmpty() ? i18n("&Cancel") : text );
d->mButton.resize( false, 0, spacingHint(), mButtonOrientation );
- QToolTip::add( pb, tooltip );
- QWhatsThis::add( pb, quickhelp );
+ TQToolTip::add( pb, tooltip );
+ TQWhatsThis::add( pb, quickhelp );
}
@@ -983,7 +983,7 @@ void KDialogBase::setButtonGuiItem( ButtonCode id, const KGuiItem &item )
}
-void KDialogBase::setButtonText( ButtonCode id, const QString &text )
+void KDialogBase::setButtonText( ButtonCode id, const TQString &text )
{
if (!d->bSettingDetails && (id == Details))
{
@@ -991,7 +991,7 @@ void KDialogBase::setButtonText( ButtonCode id, const QString &text )
setDetails(d->bDetails);
return;
}
- QPushButton *pb = actionButton( id );
+ TQPushButton *pb = actionButton( id );
if( pb )
{
pb->setText( text );
@@ -1000,33 +1000,33 @@ void KDialogBase::setButtonText( ButtonCode id, const QString &text )
}
-void KDialogBase::setButtonTip( ButtonCode id, const QString &text )
+void KDialogBase::setButtonTip( ButtonCode id, const TQString &text )
{
- QPushButton *pb = actionButton( id );
+ TQPushButton *pb = actionButton( id );
if( pb )
{
if (text.isEmpty())
- QToolTip::remove( pb );
+ TQToolTip::remove( pb );
else
- QToolTip::add( pb, text );
+ TQToolTip::add( pb, text );
}
}
-void KDialogBase::setButtonWhatsThis( ButtonCode id, const QString &text )
+void KDialogBase::setButtonWhatsThis( ButtonCode id, const TQString &text )
{
- QPushButton *pb = actionButton( id );
+ TQPushButton *pb = actionButton( id );
if( pb )
{
if (text.isEmpty())
- QWhatsThis::remove( pb );
+ TQWhatsThis::remove( pb );
else
- QWhatsThis::add( pb, text );
+ TQWhatsThis::add( pb, text );
}
}
-void KDialogBase::setButtonFocus( QPushButton *p,bool isDefault, bool isFocus )
+void KDialogBase::setButtonFocus( TQPushButton *p,bool isDefault, bool isFocus )
{
p->setDefault( isDefault );
if( isFocus )
@@ -1064,19 +1064,19 @@ void KDialogBase::unfoldTreeList( bool persist )
mJanus->unfoldTreeList( persist );
}
-void KDialogBase::addWidgetBelowList( QWidget * widget )
+void KDialogBase::addWidgetBelowList( TQWidget * widget )
{
if( mJanus )
mJanus->addWidgetBelowList( widget );
}
-void KDialogBase::addButtonBelowList( const QString & text, QObject * recv, const char * slot )
+void KDialogBase::addButtonBelowList( const TQString & text, TQObject * recv, const char * slot )
{
if( mJanus )
mJanus->addButtonBelowList( text, recv, slot );
}
-void KDialogBase::addButtonBelowList( const KGuiItem & item, QObject * recv, const char * slot )
+void KDialogBase::addButtonBelowList( const KGuiItem & item, TQObject * recv, const char * slot )
{
if( mJanus )
mJanus->addButtonBelowList( item, recv, slot );
@@ -1109,12 +1109,12 @@ void KDialogBase::slotDetails()
setDetails(!d->bDetails);
}
-void KDialogBase::setDetailsWidget(QWidget *detailsWidget)
+void KDialogBase::setDetailsWidget(TQWidget *detailsWidget)
{
delete d->detailsWidget;
d->detailsWidget = detailsWidget;
if (d->detailsWidget->parentWidget() != this)
- d->detailsWidget->reparent(this, QPoint(0,0));
+ d->detailsWidget->reparent(this, TQPoint(0,0));
d->detailsWidget->hide();
if( mIsActivated )
{
@@ -1226,7 +1226,7 @@ void KDialogBase::slotClose()
}
-void KDialogBase::helpClickedSlot( const QString & )
+void KDialogBase::helpClickedSlot( const TQString & )
{
slotHelp();
}
@@ -1256,8 +1256,8 @@ void KDialogBase::enableLinkedHelp( bool state )
mUrlHelp->setBackgroundPixmap(*mTile->get());
}
mUrlHelp->setMinimumHeight( fontMetrics().height() + marginHint() );
- connect(mUrlHelp,SIGNAL(leftClickedURL(const QString &)),
- SLOT(helpClickedSlot(const QString &)));
+ connect(mUrlHelp,TQT_SIGNAL(leftClickedURL(const TQString &)),
+ TQT_SLOT(helpClickedSlot(const TQString &)));
mUrlHelp->show();
}
else
@@ -1276,14 +1276,14 @@ void KDialogBase::enableLinkedHelp( bool state )
}
-void KDialogBase::setHelp( const QString &anchor, const QString &appname )
+void KDialogBase::setHelp( const TQString &anchor, const TQString &appname )
{
mAnchor = anchor;
mHelpApp = appname;
}
-void KDialogBase::setHelpLinkText( const QString &text )
+void KDialogBase::setHelpLinkText( const TQString &text )
{
mHelpLinkText = text;
if( mUrlHelp )
@@ -1293,62 +1293,62 @@ void KDialogBase::setHelpLinkText( const QString &text )
}
-QFrame *KDialogBase::addPage( const QString &itemName, const QString &header,
- const QPixmap &pixmap )
+TQFrame *KDialogBase::addPage( const TQString &itemName, const TQString &header,
+ const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addPage( itemName, header, pixmap ) : 0);
}
-QFrame *KDialogBase::addPage( const QStringList &items, const QString &header,
- const QPixmap &pixmap )
+TQFrame *KDialogBase::addPage( const TQStringList &items, const TQString &header,
+ const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addPage( items, header, pixmap ) : 0);
}
-QVBox *KDialogBase::addVBoxPage( const QString &itemName,
- const QString &header, const QPixmap &pixmap )
+TQVBox *KDialogBase::addVBoxPage( const TQString &itemName,
+ const TQString &header, const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addVBoxPage( itemName, header, pixmap) : 0);
}
-QVBox *KDialogBase::addVBoxPage( const QStringList &items,
- const QString &header, const QPixmap &pixmap )
+TQVBox *KDialogBase::addVBoxPage( const TQStringList &items,
+ const TQString &header, const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addVBoxPage( items, header, pixmap) : 0);
}
-QHBox *KDialogBase::addHBoxPage( const QString &itemName,
- const QString &header,
- const QPixmap &pixmap )
+TQHBox *KDialogBase::addHBoxPage( const TQString &itemName,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addHBoxPage( itemName, header, pixmap ) : 0);
}
-QHBox *KDialogBase::addHBoxPage( const QStringList &items,
- const QString &header,
- const QPixmap &pixmap )
+TQHBox *KDialogBase::addHBoxPage( const TQStringList &items,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addHBoxPage( items, header, pixmap ) : 0);
}
-QGrid *KDialogBase::addGridPage( int n, Orientation dir,
- const QString &itemName,
- const QString &header, const QPixmap &pixmap )
+TQGrid *KDialogBase::addGridPage( int n, Orientation dir,
+ const TQString &itemName,
+ const TQString &header, const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addGridPage( n, dir, itemName, header, pixmap) : 0);
}
-QGrid *KDialogBase::addGridPage( int n, Orientation dir,
- const QStringList &items,
- const QString &header, const QPixmap &pixmap )
+TQGrid *KDialogBase::addGridPage( int n, Orientation dir,
+ const TQStringList &items,
+ const TQString &header, const TQPixmap &pixmap )
{
return ( mJanus ? mJanus->addGridPage( n, dir, items, header, pixmap) : 0);
}
-void KDialogBase::setFolderIcon(const QStringList &path, const QPixmap &pixmap)
+void KDialogBase::setFolderIcon(const TQStringList &path, const TQPixmap &pixmap)
{
if (!mJanus)
return;
@@ -1356,7 +1356,7 @@ void KDialogBase::setFolderIcon(const QStringList &path, const QPixmap &pixmap)
mJanus->setFolderIcon(path,pixmap);
}
-QFrame *KDialogBase::makeMainWidget()
+TQFrame *KDialogBase::makeMainWidget()
{
if( mJanus || mMainWidget )
{
@@ -1364,13 +1364,13 @@ QFrame *KDialogBase::makeMainWidget()
return 0;
}
- QFrame *mainWidget = new QFrame( this );
+ TQFrame *mainWidget = new TQFrame( this );
setMainWidget( mainWidget );
return mainWidget;
}
-QVBox *KDialogBase::makeVBoxMainWidget()
+TQVBox *KDialogBase::makeVBoxMainWidget()
{
if( mJanus || mMainWidget )
{
@@ -1378,14 +1378,14 @@ QVBox *KDialogBase::makeVBoxMainWidget()
return 0;
}
- QVBox *mainWidget = new QVBox( this );
+ TQVBox *mainWidget = new TQVBox( this );
mainWidget->setSpacing( spacingHint() );
setMainWidget( mainWidget );
return mainWidget;
}
-QHBox *KDialogBase::makeHBoxMainWidget()
+TQHBox *KDialogBase::makeHBoxMainWidget()
{
if( mJanus || mMainWidget )
{
@@ -1393,14 +1393,14 @@ QHBox *KDialogBase::makeHBoxMainWidget()
return 0;
}
- QHBox *mainWidget = new QHBox( this );
+ TQHBox *mainWidget = new TQHBox( this );
mainWidget->setSpacing( spacingHint() );
setMainWidget( mainWidget );
return mainWidget;
}
-QGrid *KDialogBase::makeGridMainWidget( int n, Orientation dir )
+TQGrid *KDialogBase::makeGridMainWidget( int n, Orientation dir )
{
if( mJanus || mMainWidget )
{
@@ -1408,7 +1408,7 @@ QGrid *KDialogBase::makeGridMainWidget( int n, Orientation dir )
return 0;
}
- QGrid *mainWidget = new QGrid( n, dir, this );
+ TQGrid *mainWidget = new TQGrid( n, dir, this );
mainWidget->setSpacing( spacingHint() );
setMainWidget( mainWidget );
return mainWidget;
@@ -1428,7 +1428,7 @@ void KDialogBase::printMakeMainWidgetError()
}
-void KDialogBase::setMainWidget( QWidget *widget )
+void KDialogBase::setMainWidget( TQWidget *widget )
{
if( mJanus )
{
@@ -1447,9 +1447,9 @@ void KDialogBase::setMainWidget( QWidget *widget )
}
if( mMainWidget != NULL )
{
- QFocusData* fd = focusData();
- QWidget* prev = fd->last();
- for( QPtrListIterator<KDialogBaseButton> it( d->mButton.list );
+ TQFocusData* fd = focusData();
+ TQWidget* prev = fd->last();
+ for( TQPtrListIterator<KDialogBaseButton> it( d->mButton.list );
it != NULL;
++it )
{
@@ -1461,7 +1461,7 @@ void KDialogBase::setMainWidget( QWidget *widget )
}
-QWidget *KDialogBase::mainWidget()
+TQWidget *KDialogBase::mainWidget()
{
return mMainWidget;
}
@@ -1479,16 +1479,16 @@ int KDialogBase::activePageIndex() const
}
-int KDialogBase::pageIndex( QWidget *widget ) const
+int KDialogBase::pageIndex( TQWidget *widget ) const
{
return ( mJanus ? mJanus->pageIndex( widget) : -1);
}
// Deprecated
-QRect KDialogBase::getContentsRect() const
+TQRect KDialogBase::getContentsRect() const
{
- QRect r;
+ TQRect r;
r.setLeft( marginHint() );
r.setTop( marginHint() + (mUrlHelp ? mUrlHelp->height() : 0) );
r.setRight( width() - marginHint() );
@@ -1525,15 +1525,15 @@ void KDialogBase::getBorderWidths(int& ulx, int& uly, int& lrx, int& lry) const
}
-QSize KDialogBase::calculateSize(int w, int h) const
+TQSize KDialogBase::calculateSize(int w, int h) const
{
int ulx, uly, lrx, lry;
getBorderWidths(ulx, uly, lrx, lry);
- return QSize(ulx+w+lrx,uly+h+lry);
+ return TQSize(ulx+w+lrx,uly+h+lry);
}
-QString KDialogBase::helpLinkText() const
+TQString KDialogBase::helpLinkText() const
{
return ( mHelpLinkText.isNull() ? i18n("Get help...") : mHelpLinkText );
}
@@ -1550,7 +1550,7 @@ void KDialogBase::updateGeometry()
-void KDialogBase::keyPressEvent( QKeyEvent *e )
+void KDialogBase::keyPressEvent( TQKeyEvent *e )
{
//
// Reimplemented from KDialog to remove the default behavior
@@ -1560,7 +1560,7 @@ void KDialogBase::keyPressEvent( QKeyEvent *e )
{
if( e->key() == Key_F1 )
{
- QPushButton *pb = actionButton( Help );
+ TQPushButton *pb = actionButton( Help );
if( pb )
{
pb->animateClick();
@@ -1570,7 +1570,7 @@ void KDialogBase::keyPressEvent( QKeyEvent *e )
}
if( e->key() == Key_Escape )
{
- QPushButton *pb = actionButton( mEscapeButton );
+ TQPushButton *pb = actionButton( mEscapeButton );
if( pb )
{
pb->animateClick();
@@ -1582,7 +1582,7 @@ void KDialogBase::keyPressEvent( QKeyEvent *e )
}
else if( e->key() == Key_F1 && e->state() == ShiftButton )
{
- QWhatsThis::enterWhatsThisMode();
+ TQWhatsThis::enterWhatsThisMode();
e->accept();
return;
}
@@ -1591,7 +1591,7 @@ void KDialogBase::keyPressEvent( QKeyEvent *e )
else if ( e->state() == ControlButton &&
(e->key() == Key_Return || e->key() == Key_Enter) )
{
- QPushButton *pb = actionButton( Ok );
+ TQPushButton *pb = actionButton( Ok );
if ( pb )
{
pb->animateClick();
@@ -1603,12 +1603,12 @@ void KDialogBase::keyPressEvent( QKeyEvent *e )
//
// Do the default action instead. Note KDialog::keyPressEvent is bypassed
//
- QDialog::keyPressEvent(e);
+ TQDialog::keyPressEvent(e);
}
-void KDialogBase::hideEvent( QHideEvent *ev )
+void KDialogBase::hideEvent( TQHideEvent *ev )
{
emit hidden();
if (!ev->spontaneous())
@@ -1619,13 +1619,13 @@ void KDialogBase::hideEvent( QHideEvent *ev )
-void KDialogBase::closeEvent( QCloseEvent *e )
+void KDialogBase::closeEvent( TQCloseEvent *e )
{
- QPushButton *pb = actionButton( mEscapeButton );
+ TQPushButton *pb = actionButton( mEscapeButton );
if( pb && isShown() ) {
pb->animateClick();
} else {
- QDialog::closeEvent( e );
+ TQDialog::closeEvent( e );
}
}
@@ -1665,15 +1665,15 @@ bool KDialogBase::haveBackgroundTile()
}
// Deprecated. For compatibility only.
-const QPixmap *KDialogBase::getBackgroundTile() { return backgroundTile(); }
+const TQPixmap *KDialogBase::getBackgroundTile() { return backgroundTile(); }
-const QPixmap *KDialogBase::backgroundTile()
+const TQPixmap *KDialogBase::backgroundTile()
{
return ( mTile ? mTile->get() : 0);
}
-void KDialogBase::setBackgroundTile( const QPixmap *pix )
+void KDialogBase::setBackgroundTile( const TQPixmap *pix )
{
if( mTile )
{
@@ -1686,7 +1686,7 @@ void KDialogBase::updateBackground()
{
if( !mTile || !mTile->get() )
{
- QPixmap nullPixmap;
+ TQPixmap nullPixmap;
setBackgroundPixmap(nullPixmap);
if( d->mButton.box )
{
@@ -1697,7 +1697,7 @@ void KDialogBase::updateBackground()
}
else
{
- const QPixmap *pix = mTile->get();
+ const TQPixmap *pix = mTile->get();
setBackgroundPixmap(*pix);
if( d->mButton.box )
{
@@ -1725,7 +1725,7 @@ void KDialogBase::showTile( bool state )
}
else
{
- const QPixmap *pix = mTile->get();
+ const TQPixmap *pix = mTile->get();
setBackgroundPixmap(*pix);
if( d->mButton.box )
{
@@ -1738,54 +1738,54 @@ void KDialogBase::showTile( bool state )
}
}
-QSize KDialogBase::configDialogSize( const QString& groupName ) const
+TQSize KDialogBase::configDialogSize( const TQString& groupName ) const
{
return configDialogSize( *KGlobal::config(), groupName );
}
-QSize KDialogBase::configDialogSize( KConfig& config,
- const QString& groupName ) const
+TQSize KDialogBase::configDialogSize( KConfig& config,
+ const TQString& groupName ) const
{
int w, h;
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ int scnum = TQApplication::desktop()->screenNumber(parentWidget());
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
w = sizeHint().width();
h = sizeHint().height();
KConfigGroupSaver cs(&config, groupName);
- w = config.readNumEntry( QString::fromLatin1("Width %1").arg( desk.width()), w );
- h = config.readNumEntry( QString::fromLatin1("Height %1").arg( desk.height()), h );
+ w = config.readNumEntry( TQString::fromLatin1("Width %1").arg( desk.width()), w );
+ h = config.readNumEntry( TQString::fromLatin1("Height %1").arg( desk.height()), h );
- return QSize( w, h );
+ return TQSize( w, h );
}
-void KDialogBase::saveDialogSize( const QString& groupName, bool global )
+void KDialogBase::saveDialogSize( const TQString& groupName, bool global )
{
saveDialogSize( *KGlobal::config(), groupName, global );
}
-void KDialogBase::saveDialogSize( KConfig& config, const QString& groupName,
+void KDialogBase::saveDialogSize( KConfig& config, const TQString& groupName,
bool global ) const
{
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ int scnum = TQApplication::desktop()->screenNumber(parentWidget());
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
KConfigGroupSaver cs(&config, groupName);
- QSize sizeToSave = size();
+ TQSize sizeToSave = size();
- config.writeEntry( QString::fromLatin1("Width %1").arg( desk.width()),
- QString::number( sizeToSave.width()), true, global);
- config.writeEntry( QString::fromLatin1("Height %1").arg( desk.height()),
- QString::number( sizeToSave.height()), true, global);
+ config.writeEntry( TQString::fromLatin1("Width %1").arg( desk.width()),
+ TQString::number( sizeToSave.width()), true, global);
+ config.writeEntry( TQString::fromLatin1("Height %1").arg( desk.height()),
+ TQString::number( sizeToSave.height()), true, global);
}
KDialogBaseButton::KDialogBaseButton( const KGuiItem &item, int key,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KPushButton( item, parent, name ), mKey(key)
{
}
@@ -1793,8 +1793,8 @@ KDialogBaseButton::KDialogBaseButton( const KGuiItem &item, int key,
-KDialogBaseTile::KDialogBaseTile( QObject *parent, const char *name )
- : QObject( parent, name ), mPixmap(0)
+KDialogBaseTile::KDialogBaseTile( TQObject *parent, const char *name )
+ : TQObject( parent, name ), mPixmap(0)
{
}
@@ -1805,7 +1805,7 @@ KDialogBaseTile::~KDialogBaseTile()
}
-void KDialogBaseTile::set( const QPixmap *pix )
+void KDialogBaseTile::set( const TQPixmap *pix )
{
if( !pix )
{
@@ -1815,7 +1815,7 @@ void KDialogBaseTile::set( const QPixmap *pix )
{
if( !mPixmap )
{
- mPixmap = new QPixmap(*pix);
+ mPixmap = new TQPixmap(*pix);
}
else
{
@@ -1827,7 +1827,7 @@ void KDialogBaseTile::set( const QPixmap *pix )
}
-const QPixmap *KDialogBaseTile::get() const
+const TQPixmap *KDialogBaseTile::get() const
{
return mPixmap;
}
diff --git a/kdeui/kdialogbase.h b/kdeui/kdialogbase.h
index fb46587ad..84b2a425a 100644
--- a/kdeui/kdialogbase.h
+++ b/kdeui/kdialogbase.h
@@ -27,7 +27,7 @@
#include <kjanuswidget.h>
#include <kguiitem.h>
#include <kstdguiitem.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class QPushButton;
class KSeparator;
@@ -83,8 +83,8 @@ class KDialogBaseTile;
* to connect a signal instead of overriding the slot.
* The default implementation of slotHelp() will automatically enable
* the help system if you have provided a path to the help text.
- * slotCancel() and slotClose() will run QDialog::reject()
- * while slotOk() will run QDialog::accept(). You define a default
+ * slotCancel() and slotClose() will run TQDialog::reject()
+ * while slotOk() will run TQDialog::accept(). You define a default
* button in the constructor.
*
* If you don't want any buttons at all because your dialog is special
@@ -147,18 +147,18 @@ class KDialogBaseTile;
* Example:
*
* \code
- * UrlDlg::UrlDlg( QWidget *parent, const QString& caption,
- * const QString& urltext)
+ * UrlDlg::UrlDlg( TQWidget *parent, const TQString& caption,
+ * const TQString& urltext)
* : KDialogBase( parent, "urldialog", true, caption, Ok|Cancel, Ok, true )
* {
- * QWidget *page = new QWidget( this );
+ * TQWidget *page = new TQWidget( this );
* setMainWidget(page);
- * QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ * TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
*
- * QLabel *label = new QLabel( caption, page, "caption" );
+ * TQLabel *label = new TQLabel( caption, page, "caption" );
* topLayout->addWidget( label );
*
- * lineedit = new QLineEdit( urltext, page, "lineedit" );
+ * lineedit = new TQLineEdit( urltext, page, "lineedit" );
* lineedit->setMinimumWidth(fontMetrics().maxWidth()*20);
* topLayout->addWidget( lineedit );
*
@@ -170,14 +170,14 @@ class KDialogBaseTile;
* simpler but you lose the ability to add a stretchable area:
*
* \code
- * UrlDlg::UrlDlg( QWidget *parent, const QString& caption,
- * const QString& urltext)
+ * UrlDlg::UrlDlg( TQWidget *parent, const TQString& caption,
+ * const TQString& urltext)
* : KDialogBase( parent, "urldialog", true, caption, Ok|Cancel, Ok, true )
* {
- * QVBox *page = makeVBoxMainWidget();
- * QLabel *label = new QLabel( caption, page, "caption" );
+ * TQVBox *page = makeVBoxMainWidget();
+ * TQLabel *label = new TQLabel( caption, page, "caption" );
*
- * lineedit = new QLineEdit( urltext, page, "lineedit" );
+ * lineedit = new TQLineEdit( urltext, page, "lineedit" );
* lineedit->setMinimumWidth(fontMetrics().maxWidth()*20);
* }
* \endcode
@@ -227,7 +227,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
/**
* @li @p TreeList - A dialog with a tree on the left side and a
* representation of the contents on the right side.
- * @li @p Tabbed - A dialog using a QTabWidget.
+ * @li @p Tabbed - A dialog using a TQTabWidget.
* @li @p Plain - A normal dialog. Use plainPage() as parent for widgets.
* @li @p Swallow - Simplifes the usage of existing widgets. You specify
* the widget to be displayed by setMainWidget().
@@ -267,8 +267,8 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param user2 User button2 item.
* @param user3 User button3 item.
*/
- KDialogBase( QWidget *parent=0, const char *name=0, bool modal=true,
- const QString &caption=QString::null,
+ KDialogBase( TQWidget *parent=0, const char *name=0, bool modal=true,
+ const TQString &caption=TQString::null,
int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok,
bool separator=false,
const KGuiItem &user1=KGuiItem(),
@@ -302,9 +302,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param user2 User button2 text item.
* @param user3 User button3 text item.
*/
- KDialogBase( int dialogFace, const QString &caption,
+ KDialogBase( int dialogFace, const TQString &caption,
int buttonMask, ButtonCode defaultButton,
- QWidget *parent=0, const char *name=0, bool modal=true,
+ TQWidget *parent=0, const char *name=0, bool modal=true,
bool separator=false,
const KGuiItem &user1=KGuiItem(),
const KGuiItem &user2=KGuiItem(),
@@ -339,8 +339,8 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*/
KDialogBase( KDialogBase::DialogType dialogFace, WFlags f,
- QWidget *parent=0, const char *name=0, bool modal=true,
- const QString &caption=QString::null,
+ TQWidget *parent=0, const char *name=0, bool modal=true,
+ const TQString &caption=TQString::null,
int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok,
bool separator=false,
const KGuiItem &user1=KGuiItem(),
@@ -378,9 +378,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param no Text to use for the second button (defaults to i18n("No"))
* @param cancel Text to use for the third button (defaults to i18n("Cancel"))
*/
- KDialogBase( const QString &caption, int buttonMask=Yes|No|Cancel,
+ KDialogBase( const TQString &caption, int buttonMask=Yes|No|Cancel,
ButtonCode defaultButton=Yes, ButtonCode escapeButton=Cancel,
- QWidget *parent=0, const char *name=0,
+ TQWidget *parent=0, const char *name=0,
bool modal=true, bool separator=false,
const KGuiItem &yes = KStdGuiItem::yes(), // i18n("&Yes")
const KGuiItem &no = KStdGuiItem::no(), // i18n("&No"),
@@ -420,14 +420,14 @@ class KDEUI_EXPORT KDialogBase : public KDialog
/**
* Adjust the size of the dialog to fit the contents just before
- * QDialog::exec() or QDialog::show() is called.
+ * TQDialog::exec() or TQDialog::show() is called.
*
* This method will not be called if the dialog has been explicitly
* resized before showing it.
**/
virtual void adjustSize();
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
/**
* Retrieve the empty page when the predefined layout is used in @p Plain
@@ -439,7 +439,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The widget or 0 if the predefined layout mode is not @p Plain
* or if you don't use any predefined layout.
*/
- QFrame *plainPage();
+ TQFrame *plainPage();
/**
* Add a page to the dialog when the class is used in @p TreeList ,
@@ -452,9 +452,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* create a layout yourself as the example below illustrates:
*
* \code
- * QFrame *page = addPage( i18n("Layout") );
- * QVBoxLayout *topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
- * QLabel *label = new QLabel( i18n("Layout type"), page );
+ * TQFrame *page = addPage( i18n("Layout") );
+ * TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
+ * TQLabel *label = new TQLabel( i18n("Layout type"), page );
* topLayout->addWidget( label );
* ..
* \endcode
@@ -468,9 +468,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The page widget which must be used as the toplevel widget for
* the page.
*/
- QFrame *addPage( const QString &itemName,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQFrame *addPage( const TQString &itemName,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addPage() just above, with the difference that the first
@@ -483,9 +483,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* be added for the @p IconList face too. In other faces than the
* @p TreeList, all the strings except the last one is ignored.
**/
- QFrame *addPage( const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQFrame *addPage( const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* Add a page to the dialog when the class is used in @p TreeList,
@@ -497,8 +497,8 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* use it as follows:
*
* \code
- * QVBox *page = addVBoxPage( i18n("Layout") );
- * QLabel *label = new QLabel( i18n("Layout type"), page );
+ * TQVBox *page = addVBoxPage( i18n("Layout") );
+ * TQLabel *label = new TQLabel( i18n("Layout type"), page );
* ..
* \endcode
*
@@ -511,9 +511,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The page widget which must be used as the toplevel widget for
* the page.
*/
- QVBox *addVBoxPage( const QString &itemName,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQVBox *addVBoxPage( const TQString &itemName,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addVBoxPage() just above, with the difference
@@ -526,9 +526,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* be added for the @p IconList face too. In other faces than the
* @p TreeList, all the strings except the last one is ignored.
**/
- QVBox *addVBoxPage( const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQVBox *addVBoxPage( const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* Add a page to the dialog when the class is used in @p TreeList,
@@ -536,7 +536,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* The returned widget must be used as the
* toplevel widget for this particular page. The widget contains a
- * QHBoxLayout layout so the widget children are lined up horizontally.
+ * TQHBoxLayout layout so the widget children are lined up horizontally.
* You can use it as follows:
*
* @param itemName String used in the list or as tab item name.
@@ -548,9 +548,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The page widget which must be used as the toplevel widget for
* the page.
*/
- QHBox *addHBoxPage( const QString &itemName,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQHBox *addHBoxPage( const TQString &itemName,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addHBoxPage() just above, with the
@@ -563,9 +563,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* be added for the @p IconList face too. In other faces than the
* @p TreeList, all the strings except the last one is ignored.
**/
- QHBox *addHBoxPage( const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQHBox *addHBoxPage( const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* Add a page to the dialog when the class is used in @p TreeList,
@@ -573,7 +573,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* The returned widget must be used as the
* toplevel widget for this particular page. The widget contains a
- * QGridLayout layout so the widget children are positioned in a grid.
+ * TQGridLayout layout so the widget children are positioned in a grid.
*
* @param n Specifies the number of columns if @p dir is Qt::Horizontal
* or the number of rows if @p dir is Qt::Vertical.
@@ -587,10 +587,10 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The page widget which must be used as the toplevel widget for
* the page.
*/
- QGrid *addGridPage( int n, Orientation dir,
- const QString &itemName,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQGrid *addGridPage( int n, Orientation dir,
+ const TQString &itemName,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
@@ -604,10 +604,10 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* be added for the @p IconList face too. In other faces than the
* @p TreeList, all the strings except the last one is ignored.
**/
- QGrid *addGridPage( int n, Orientation dir,
- const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ TQGrid *addGridPage( int n, Orientation dir,
+ const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
@@ -616,12 +616,12 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param path The path for which this icon should be shown.
* @param pixmap The icon used.
**/
- void setFolderIcon(const QStringList &path,const QPixmap &pixmap);
+ void setFolderIcon(const TQStringList &path,const TQPixmap &pixmap);
/**
* Make a main widget.
*
- * The function will make a QFrame widget
+ * The function will make a TQFrame widget
* and use setMainWidget() to register it. You can @em not use this
* function more than once, @em not if you have already defined a
* main widget with setMainWidget() and @em not if you have used the
@@ -631,12 +631,12 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The main widget or 0 if any of the rules described above
* were broken.
*/
- QFrame *makeMainWidget();
+ TQFrame *makeMainWidget();
/**
* Make a main widget.
*
- * The function will make a QVBox widget
+ * The function will make a TQVBox widget
* and use setMainWidget() to register it. You @em can use this
* function more than once, but @em not if you have already defined a
* main widget with setMainWidget() and @em not if you have used the
@@ -646,12 +646,12 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The main widget or 0 if any of the rules described above
* were broken.
*/
- QVBox *makeVBoxMainWidget();
+ TQVBox *makeVBoxMainWidget();
/**
* Make a main widget.
*
- * The function will make a QHBox widget
+ * The function will make a TQHBox widget
* and use setMainWidget() to register it. You can @em not use this
* function more than once, @em not if you have already defined a
* main widget with setMainWidget() and @p not if you have used the
@@ -661,12 +661,12 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The main widget or 0 if any of the rules described above
* were broken.
*/
- QHBox *makeHBoxMainWidget();
+ TQHBox *makeHBoxMainWidget();
/**
* Make a main widget.
*
- * The function will make a QGrid widget
+ * The function will make a TQGrid widget
* and use setMainWidget() to register it. You can @em not use this
* function more than once, @em not if you have already defined a
* main widget with setMainWidget and @em not if you have used the
@@ -680,7 +680,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The main widget or 0 if any of the rules described above
* were broken.
*/
- QGrid *makeGridMainWidget( int n, Orientation dir );
+ TQGrid *makeGridMainWidget( int n, Orientation dir );
/**
@@ -768,7 +768,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The index or -1 if the face is not Tabbed, TreeList or
* IconList
*/
- int pageIndex( QWidget *widget ) const;
+ int pageIndex( TQWidget *widget ) const;
/**
@@ -783,14 +783,14 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* is 0, then the dialog will show an empty space of 100x100 pixels
* instead.
*/
- void setMainWidget( QWidget *widget );
+ void setMainWidget( TQWidget *widget );
/**
* Returns the main widget if any.
*
* @return The current main widget. Can be 0 if no widget has been defined.
*/
- QWidget *mainWidget();
+ TQWidget *mainWidget();
/**
* Convenience method.
@@ -812,7 +812,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param s Startup size.
* @param noResize If @p true the dialog cannot be resized.
*/
- void setInitialSize( const QSize &s, bool noResize=false );
+ void setInitialSize( const TQSize &s, bool noResize=false );
/**
* Convenience method. Add a size to the default minimum size of a
@@ -824,7 +824,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param s Size added to minimum size.
* @param noResize If @p true the dialog cannot be resized.
*/
- void incInitialSize( const QSize &s, bool noResize=false );
+ void incInitialSize( const TQSize &s, bool noResize=false );
/**
* read the dialogs size from the configuration according to the screen size.
@@ -833,7 +833,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param groupName Name of the group to read from. The old group
* of KGlobal::config is preserved.
*/
- QSize configDialogSize( const QString& groupName ) const;
+ TQSize configDialogSize( const TQString& groupName ) const;
/**
* read the dialogs size from the configuration according to the screen size.
@@ -844,7 +844,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* of KGlobal::config is preserved.
* @since 3.2
*/
- QSize configDialogSize( KConfig& config, const QString& groupName ) const;
+ TQSize configDialogSize( KConfig& config, const TQString& groupName ) const;
/**
* save the dialogs size dependant on the screen dimension either to the
@@ -855,7 +855,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param global Set to true if the entry should go to the global config rather
* than to the applications config. Default is false.
*/
- void saveDialogSize( const QString& groupName, bool global=false );
+ void saveDialogSize( const TQString& groupName, bool global=false );
/**
* save the dialogs size dependant on the screen dimension.
@@ -867,7 +867,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* Default is false.
* @since 3.2
*/
- void saveDialogSize( KConfig& config, const QString& groupName,
+ void saveDialogSize( KConfig& config, const TQString& groupName,
bool global=false ) const;
/**
@@ -896,9 +896,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param tooltip Tooltip text.
* @param quickhelp Quick help text.
*/
- void setButtonOKText( const QString &text=QString::null,
- const QString &tooltip=QString::null,
- const QString &quickhelp=QString::null ) KDE_DEPRECATED;
+ void setButtonOKText( const TQString &text=TQString::null,
+ const TQString &tooltip=TQString::null,
+ const TQString &quickhelp=TQString::null ) KDE_DEPRECATED;
/**
* Sets the appearance of the Apply button.
@@ -926,9 +926,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param tooltip Tooltip text.
* @param quickhelp Quick help text.
*/
- void setButtonApplyText( const QString &text=QString::null,
- const QString &tooltip=QString::null,
- const QString &quickhelp=QString::null ) KDE_DEPRECATED;
+ void setButtonApplyText( const TQString &text=TQString::null,
+ const TQString &tooltip=TQString::null,
+ const TQString &quickhelp=TQString::null ) KDE_DEPRECATED;
/**
* Sets the appearance of the Cancel button.
@@ -954,9 +954,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param tooltip Tooltip text.
* @param quickhelp Quick help text.
*/
- void setButtonCancelText( const QString &text=QString::null,
- const QString &tooltip=QString::null,
- const QString &quickhelp=QString::null ) KDE_DEPRECATED;
+ void setButtonCancelText( const TQString &text=TQString::null,
+ const TQString &tooltip=TQString::null,
+ const TQString &quickhelp=TQString::null ) KDE_DEPRECATED;
/**
* Sets the text of any button.
@@ -964,7 +964,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param id The button identifier.
* @param text Button text.
*/
- void setButtonText( ButtonCode id, const QString &text );
+ void setButtonText( ButtonCode id, const TQString &text );
/**
* Sets the tooltip text of any button.
@@ -972,7 +972,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param id The button identifier.
* @param text Button text.
*/
- void setButtonTip( ButtonCode id, const QString &text );
+ void setButtonTip( ButtonCode id, const TQString &text );
/**
* Sets the "What's this?" text of any button.
@@ -980,7 +980,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param id The button identifier.
* @param text Button text.
*/
- void setButtonWhatsThis( ButtonCode id, const QString &text );
+ void setButtonWhatsThis( ButtonCode id, const TQString &text );
/**
* Sets the KGuiItem directly for the button instead of using 3 methods to
@@ -1025,7 +1025,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* This function has only effect in TreeList mode.
*
* This tells the widgets whether the root should be decorated.
- * For details see QListView::setRootIsDecorated
+ * For details see TQListView::setRootIsDecorated
*
* @param state Root will be decorated if true.
**/
@@ -1054,7 +1054,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* KJanusWidget, too. To be on the save side just don't keep
* the pointer to this widget.
*/
- void addWidgetBelowList( QWidget * widget );
+ void addWidgetBelowList( TQWidget * widget );
/**
* Add a button at the bottom of the TreeList/IconList.
@@ -1066,7 +1066,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* @since 3.2
*/
- void addButtonBelowList( const QString & text, QObject * recv, const char * slot );
+ void addButtonBelowList( const TQString & text, TQObject * recv, const char * slot );
/**
* The same as the above function, but with a KGuiItem providing the text
@@ -1079,7 +1079,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* @since 3.2
*/
- void addButtonBelowList( const KGuiItem & guiitem, QObject * recv, const char * slot );
+ void addButtonBelowList( const KGuiItem & guiitem, TQObject * recv, const char * slot );
/**
* This function has only effect in IconList mode.
@@ -1108,12 +1108,12 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The tile pointer or 0 if no tile is defined.
*
**/
- static const QPixmap *backgroundTile();
+ static const TQPixmap *backgroundTile();
/**
* @deprecated
* Use backgroundTile() instead.
*/
- static const QPixmap *getBackgroundTile() KDE_DEPRECATED;
+ static const TQPixmap *getBackgroundTile() KDE_DEPRECATED;
/**
* Sets the background tile.
@@ -1122,7 +1122,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* @param pix The background tile.
*/
- static void setBackgroundTile( const QPixmap *pix );
+ static void setBackgroundTile( const TQPixmap *pix );
/**
* Enable hiding of the background tile (if any).
@@ -1155,7 +1155,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* If you need the "overhead" the dialog needs for its elements,
* use getBorderWidths().
*/
- QRect getContentsRect() const KDE_DEPRECATED;
+ TQRect getContentsRect() const KDE_DEPRECATED;
/**
* Calculate the size hint for the dialog.
@@ -1174,7 +1174,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @return The minimum width and height of the dialog using @p w and @p h
* as the size of the main widget.
*/
- QSize calculateSize( int w, int h ) const;
+ TQSize calculateSize( int w, int h ) const;
/**
* Returns the help link text.
@@ -1184,7 +1184,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* @return The help link text.
*/
- QString helpLinkText() const;
+ TQString helpLinkText() const;
/**
* Returns the action button that corresponds to the @p id.
@@ -1197,9 +1197,9 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param id Integer identifier of the button.
* @return The action button or 0 if the button does not exists.
*
- * FIXME KDE 4: Return the actual KPushButton instead of QPushButton (Martijn)
+ * FIXME KDE 4: Return the actual KPushButton instead of TQPushButton (Martijn)
*/
- QPushButton *actionButton( ButtonCode id );
+ TQPushButton *actionButton( ButtonCode id );
public slots:
/**
@@ -1257,7 +1257,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
*
* @param text The link text.
*/
- void setHelpLinkText( const QString &text );
+ void setHelpLinkText( const TQString &text );
/**
* Sets the help path and topic.
@@ -1271,13 +1271,13 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* function for Dialogs of that type. See
* KCMultiDialog::slotHelp() for more information.
*/
- void setHelp( const QString &anchor,
- const QString &appname = QString::null );
+ void setHelp( const TQString &anchor,
+ const TQString &appname = TQString::null );
/**
* Connected to help link label.
*/
- void helpClickedSlot( const QString & );
+ void helpClickedSlot( const TQString & );
/**
* Sets the status of the Details button.
@@ -1290,7 +1290,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* The dialog takes over ownership of the widget.
* Any previously set widget gets deleted.
*/
- void setDetailsWidget(QWidget *detailsWidget);
+ void setDetailsWidget(TQWidget *detailsWidget);
/**
* This method is called automatically whenever the background has
@@ -1428,7 +1428,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* A page is about to be shown. This signal is only emitted for the TreeList
* and IconList faces.
*/
- void aboutToShowPage(QWidget *page);
+ void aboutToShowPage(TQWidget *page);
protected:
/**
@@ -1436,21 +1436,21 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* button if present and Escape to the Cancel or Close if present. The
* button action event is animated.
*/
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void keyPressEvent( TQKeyEvent *e );
/**
* Emits the #hidden signal. You can connect to that signal to
* detect when a dialog has been closed.
*/
- virtual void hideEvent( QHideEvent * );
+ virtual void hideEvent( TQHideEvent * );
/**
* Detects when a dialog is being closed from the window manager
* controls. If the Cancel or Close button is present then the button
- * is activated. Otherwise standard QDialog behavior
+ * is activated. Otherwise standard TQDialog behavior
* will take place.
*/
- virtual void closeEvent( QCloseEvent *e );
+ virtual void closeEvent( TQCloseEvent *e );
protected slots:
/**
@@ -1487,7 +1487,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
/**
* Activated when the Ok button has been clicked. The
- * QDialog::accept() is activated.
+ * TQDialog::accept() is activated.
*/
virtual void slotOk();
@@ -1503,26 +1503,26 @@ class KDEUI_EXPORT KDialogBase : public KDialog
/**
* Activated when the Yes button has been clicked. The
- * QDialog::done( Yes ) is activated.
+ * TQDialog::done( Yes ) is activated.
*/
virtual void slotYes();
/**
* Activated when the Yes button has been clicked. The
- * QDialog::done( No ) is activated.
+ * TQDialog::done( No ) is activated.
*/
virtual void slotNo();
/**
* Activated when the Cancel button has been clicked. The
- * QDialog::reject() is activated in regular mode and
- * QDialog::done( Cancel ) when in message box mode.
+ * TQDialog::reject() is activated in regular mode and
+ * TQDialog::done( Cancel ) when in message box mode.
*/
virtual void slotCancel();
/**
* Activated when the Close button has been clicked. The
- * QDialog::reject() is activated.
+ * TQDialog::reject() is activated.
*/
virtual void slotClose();
@@ -1540,7 +1540,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
/**
* Deletes the dialog immediately. If you want to delete the dialog
- * delayed use delayedDestruct() or QObject::deleteLater().
+ * delayed use delayedDestruct() or TQObject::deleteLater().
*
* Attention: Do no use connect this slot to signals from user
* actions!
@@ -1584,7 +1584,7 @@ class KDEUI_EXPORT KDialogBase : public KDialog
* @param isDefault If true, make the button default
* @param isFocus If true, give the button focus.
*/
- void setButtonFocus( QPushButton *p, bool isDefault, bool isFocus );
+ void setButtonFocus( TQPushButton *p, bool isDefault, bool isFocus );
/**
* Prints an error message using qDebug if makeMainWidget ,
@@ -1603,17 +1603,17 @@ class KDEUI_EXPORT KDialogBase : public KDialog
private:
- QBoxLayout *mTopLayout;
- QWidget *mMainWidget;
+ TQBoxLayout *mTopLayout;
+ TQWidget *mMainWidget;
KURLLabel *mUrlHelp;
KJanusWidget *mJanus;
KSeparator *mActionSep;
bool mIsActivated;
- QString mAnchor;
- QString mHelpApp;
- QString mHelpLinkText;
+ TQString mAnchor;
+ TQString mHelpApp;
+ TQString mHelpLinkText;
static KDialogBaseTile *mTile;
bool mShowTile;
diff --git a/kdeui/kdialogbase_priv.h b/kdeui/kdialogbase_priv.h
index 8bfc6596e..a5bbf31be 100644
--- a/kdeui/kdialogbase_priv.h
+++ b/kdeui/kdialogbase_priv.h
@@ -33,7 +33,7 @@ class KDEUI_EXPORT KDialogBaseButton : public KPushButton
Q_OBJECT
public:
- KDialogBaseButton( const KGuiItem &text, int key, QWidget *parent=0,
+ KDialogBaseButton( const KGuiItem &text, int key, TQWidget *parent=0,
const char *name=0 );
inline int id();
@@ -50,11 +50,11 @@ class KDEUI_EXPORT KDialogBaseTile : public QObject
Q_OBJECT
public:
- KDialogBaseTile( QObject *parent=0, const char *name=0 );
+ KDialogBaseTile( TQObject *parent=0, const char *name=0 );
~KDialogBaseTile();
- void set( const QPixmap *pix );
- const QPixmap *get() const;
+ void set( const TQPixmap *pix );
+ const TQPixmap *get() const;
public slots:
void cleanup();
@@ -63,7 +63,7 @@ class KDEUI_EXPORT KDialogBaseTile : public QObject
void pixmapChanged();
private:
- QPixmap *mPixmap;
+ TQPixmap *mPixmap;
class KDialogBaseTilePrivate;
KDialogBaseTilePrivate *d;
};
diff --git a/kdeui/kdockwidget.cpp b/kdeui/kdockwidget.cpp
index eded26c55..33ba5e362 100644
--- a/kdeui/kdockwidget.cpp
+++ b/kdeui/kdockwidget.cpp
@@ -21,16 +21,16 @@
#include "kdockwidget_private.h"
#include "kdockwidget_p.h"
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qobjectlist.h>
-#include <qstrlist.h>
-#include <qcursor.h>
-#include <qwidgetlist.h>
-#include <qtabwidget.h>
-#include <qtooltip.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqobjectlist.h>
+#include <tqstrlist.h>
+#include <tqcursor.h>
+#include <tqwidgetlist.h>
+#include <tqtabwidget.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
#ifndef NO_KDE2
#include <kconfig.h>
@@ -49,8 +49,8 @@
#endif
#else
-#include <qtoolbar.h>
-#include <qpopupmenu.h>
+#include <tqtoolbar.h>
+#include <tqpopupmenu.h>
#endif
#include <stdlib.h>
@@ -99,10 +99,10 @@ static const char* const not_close_xpm[]={
*
* @author Max Judin.
*/
-KDockMainWindow::KDockMainWindow( QWidget* parent, const char *name, WFlags f)
+KDockMainWindow::KDockMainWindow( TQWidget* parent, const char *name, WFlags f)
:KMainWindow( parent, name, f )
{
- QString new_name = QString(name) + QString("_DockManager");
+ TQString new_name = TQString(name) + TQString("_DockManager");
dockManager = new KDockManager( this, new_name.latin1() );
mainDockWidget = 0L;
}
@@ -119,7 +119,7 @@ void KDockMainWindow::setMainDockWidget( KDockWidget* mdw )
dockManager->setMainDockWidget2(mdw);
}
-void KDockMainWindow::setView( QWidget *view )
+void KDockMainWindow::setView( TQWidget *view )
{
if ( view->isA("KDockWidget") ){
if ( view->parent() != this ) ((KDockWidget*)view)->applyToWidget( this );
@@ -128,11 +128,11 @@ void KDockMainWindow::setView( QWidget *view )
#ifndef NO_KDE2
KMainWindow::setCentralWidget(view);
#else
- QMainWindow::setCentralWidget(view);
+ TQMainWindow::setCentralWidget(view);
#endif
}
-KDockWidget* KDockMainWindow::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel)
+KDockWidget* KDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel)
{
return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
}
@@ -149,28 +149,28 @@ void KDockMainWindow::makeDockInvisible( KDockWidget* dock )
dock->undock();
}
-void KDockMainWindow::makeWidgetDockVisible( QWidget* widget )
+void KDockMainWindow::makeWidgetDockVisible( TQWidget* widget )
{
makeDockVisible( dockManager->findWidgetParentDock(widget) );
}
-void KDockMainWindow::writeDockConfig(QDomElement &base)
+void KDockMainWindow::writeDockConfig(TQDomElement &base)
{
dockManager->writeConfig(base);
}
-void KDockMainWindow::readDockConfig(QDomElement &base)
+void KDockMainWindow::readDockConfig(TQDomElement &base)
{
dockManager->readConfig(base);
}
#ifndef NO_KDE2
-void KDockMainWindow::writeDockConfig( KConfig* c, QString group )
+void KDockMainWindow::writeDockConfig( KConfig* c, TQString group )
{
dockManager->writeConfig( c, group );
}
-void KDockMainWindow::readDockConfig( KConfig* c, QString group )
+void KDockMainWindow::readDockConfig( KConfig* c, TQString group )
{
dockManager->readConfig( c, group );
}
@@ -178,7 +178,7 @@ void KDockMainWindow::readDockConfig( KConfig* c, QString group )
void KDockMainWindow::slotDockWidgetUndocked()
{
- QObject* pSender = (QObject*) sender();
+ TQObject* pSender = (TQObject*) sender();
if (!pSender->inherits("KDockWidget")) return;
KDockWidget* pDW = (KDockWidget*) pSender;
emit dockWidgetHasUndocked( pDW);
@@ -186,7 +186,7 @@ void KDockMainWindow::slotDockWidgetUndocked()
/*************************************************************************/
KDockWidgetAbstractHeaderDrag::KDockWidgetAbstractHeaderDrag( KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name )
-:QFrame( parent, name )
+:TQFrame( parent, name )
{
dw = dock;
installEventFilter( dock->dockManager() );
@@ -197,19 +197,19 @@ KDockWidgetHeaderDrag::KDockWidgetHeaderDrag( KDockWidgetAbstractHeader* parent,
{
}
-void KDockWidgetHeaderDrag::paintEvent( QPaintEvent* )
+void KDockWidgetHeaderDrag::paintEvent( TQPaintEvent* )
{
- QPainter paint;
+ TQPainter paint;
paint.begin( this );
- style().drawPrimitive (QStyle::PE_DockWindowHandle, &paint, QRect(0,0,width(), height()), colorGroup());
+ style().drawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup());
paint.end();
}
/*************************************************************************/
KDockWidgetAbstractHeader::KDockWidgetAbstractHeader( KDockWidget* parent, const char* name )
-:QFrame( parent, name )
+:TQFrame( parent, name )
{
}
/*************************************************************************/
@@ -217,44 +217,44 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name )
:KDockWidgetAbstractHeader( parent, name )
{
#ifdef BORDERLESS_WINDOWS
- setCursor(QCursor(ArrowCursor));
+ setCursor(TQCursor(ArrowCursor));
#endif
d = new KDockWidgetHeaderPrivate( this );
- layout = new QHBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQHBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
drag = new KDockWidgetHeaderDrag( this, parent );
closeButton = new KDockButton_Private( this, "DockCloseButton" );
- QToolTip::add( closeButton, i18n("Close") );
- closeButton->setPixmap( style().stylePixmap (QStyle::SP_TitleBarCloseButton , this));
+ TQToolTip::add( closeButton, i18n("Close") );
+ closeButton->setPixmap( style().stylePixmap (TQStyle::SP_TitleBarCloseButton , this));
closeButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( closeButton, SIGNAL(clicked()), parent, SIGNAL(headerCloseButtonClicked()));
- connect( closeButton, SIGNAL(clicked()), parent, SLOT(undock()));
+ connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerCloseButtonClicked()));
+ connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock()));
stayButton = new KDockButton_Private( this, "DockStayButton" );
- QToolTip::add( stayButton, i18n("Freeze the window geometry", "Freeze") );
+ TQToolTip::add( stayButton, i18n("Freeze the window geometry", "Freeze") );
stayButton->setToggleButton( true );
stayButton->setPixmap( const_cast< const char** >(not_close_xpm) );
stayButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( stayButton, SIGNAL(clicked()), this, SLOT(slotStayClicked()));
+ connect( stayButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStayClicked()));
dockbackButton = new KDockButton_Private( this, "DockbackButton" );
- QToolTip::add( dockbackButton, i18n("Dock this window", "Dock") );
+ TQToolTip::add( dockbackButton, i18n("Dock this window", "Dock") );
dockbackButton->setPixmap( const_cast< const char** >(dockback_xpm));
dockbackButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( dockbackButton, SIGNAL(clicked()), parent, SIGNAL(headerDockbackButtonClicked()));
- connect( dockbackButton, SIGNAL(clicked()), parent, SLOT(dockBack()));
+ connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerDockbackButtonClicked()));
+ connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(dockBack()));
d->toDesktopButton = new KDockButton_Private( this, "ToDesktopButton" );
- QToolTip::add( d->toDesktopButton, i18n("Detach") );
+ TQToolTip::add( d->toDesktopButton, i18n("Detach") );
d->toDesktopButton->setPixmap( const_cast< const char** >(todesktop_xpm));
d->toDesktopButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( d->toDesktopButton, SIGNAL(clicked()), parent, SLOT(toDesktop()));
+ connect( d->toDesktopButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(toDesktop()));
stayButton->hide();
- d->dummy = new QWidget( this );
+ d->dummy = new TQWidget( this );
d->dummy->setFixedSize( 1,closeButton->pixmap()->height() );
@@ -295,7 +295,7 @@ void KDockWidgetHeader::setTopLevel( bool isTopLevel )
bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
closeButton->isVisibleTo(this);
- for (QPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
+ for (TQPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
}
if (dontShowDummy) d->dummy->hide(); else d->dummy->show();
@@ -318,13 +318,13 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd )
if ( !nd ) return;
delete layout;
- layout = new QHBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQHBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
delete drag;
drag = nd;
if (drag->parentWidget()!=this) {
- drag->reparent(this,QPoint(0,0));
+ drag->reparent(this,TQPoint(0,0));
}
@@ -336,7 +336,7 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd )
bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
closeButton->isVisibleTo(this);
- for (QPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
+ for (TQPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
layout->addWidget(it.current());
dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
}
@@ -352,7 +352,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) {
if (!btn) return;
if (btn->parentWidget()!=this) {
- btn->reparent(this,QPoint(0,0));
+ btn->reparent(this,TQPoint(0,0));
}
btn->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
if (!d->btns.containsRef(btn)) d->btns.append(btn);
@@ -360,8 +360,8 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) {
btn->show();
delete layout;
- layout = new QHBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQHBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
layout->addWidget( drag );
layout->addWidget( dockbackButton );
@@ -371,7 +371,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) {
bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
closeButton->isVisibleTo(this);
- for (QPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
+ for (TQPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
layout->addWidget(it.current());
dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
}
@@ -422,12 +422,12 @@ void KDockWidgetHeader::setDragEnabled(bool b)
#ifndef NO_KDE2
void KDockWidgetHeader::saveConfig( KConfig* c )
{
- c->writeEntry( QString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() );
+ c->writeEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() );
}
void KDockWidgetHeader::loadConfig( KConfig* c )
{
- setDragEnabled( !c->readBoolEntry( QString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) );
+ setDragEnabled( !c->readBoolEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) );
}
#endif
@@ -439,12 +439,12 @@ public:
/**
* This rectangle is used to highlight the current dockposition. It stores global screen coordinates.
*/
- QRect dragRect;
+ TQRect dragRect;
/**
* This rectangle is used to erase the previously highlighted dockposition. It stores global screen coordinates.
*/
- QRect oldDragRect;
+ TQRect oldDragRect;
/**
* This flag stores the information if dragging is ready to start. Used between mousePress and mouseMove event.
@@ -454,7 +454,7 @@ public:
/**
* This variable stores the offset of the mouse cursor to the upper left edge of the current drag widget.
*/
- QPoint dragOffset;
+ TQPoint dragOffset;
/**
* These flags store information about the splitter behavior
@@ -463,30 +463,30 @@ public:
bool splitterKeepSize;
bool splitterHighResolution;
- QGuardedPtr<KDockWidget> mainDockWidget;
+ TQGuardedPtr<KDockWidget> mainDockWidget;
- QObjectList containerDocks;
+ TQObjectList containerDocks;
- QGuardedPtr<KDockWidget> leftContainer;
- QGuardedPtr<KDockWidget> topContainer;
- QGuardedPtr<KDockWidget> rightContainer;
- QGuardedPtr<KDockWidget> bottomContainer;
+ TQGuardedPtr<KDockWidget> leftContainer;
+ TQGuardedPtr<KDockWidget> topContainer;
+ TQGuardedPtr<KDockWidget> rightContainer;
+ TQGuardedPtr<KDockWidget> bottomContainer;
int m_readDockConfigMode;
};
/*************************************************************************/
-KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel, WFlags f)
+KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f)
#ifdef BORDERLESS_WINDOWS
-: QWidget( parent, name, f )//| WType_Dialog | WStyle_Customize | WStyle_NoBorder )
+: TQWidget( parent, name, f )//| WType_Dialog | WStyle_Customize | WStyle_NoBorder )
#else
-: QWidget( parent, name, f )
+: TQWidget( parent, name, f )
#endif
,formerBrotherDockWidget(0L)
,currentDockPos(DockNone)
,formerDockPos(DockNone)
,widget(0L)
- ,pix(new QPixmap(pixmap))
+ ,pix(new TQPixmap(pixmap))
,prevSideDockPosBeforeDrag(DockNone)
,isGroup(false)
{
@@ -494,8 +494,8 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPi
d->_parent = parent;
- layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
manager = dockManager;
manager->childDock->append( this );
@@ -522,18 +522,18 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPi
setIcon( pixmap);
widget = 0L;
- QObject::connect(this, SIGNAL(hasUndocked()), manager->main, SLOT(slotDockWidgetUndocked()) );
- applyToWidget( parent, QPoint(0,0) );
+ TQObject::connect(this, TQT_SIGNAL(hasUndocked()), manager->main, TQT_SLOT(slotDockWidgetUndocked()) );
+ applyToWidget( parent, TQPoint(0,0) );
}
-void KDockWidget::setPixmap(const QPixmap& pixmap) {
+void KDockWidget::setPixmap(const TQPixmap& pixmap) {
delete pix;
- pix=new QPixmap(pixmap);
+ pix=new TQPixmap(pixmap);
setIcon(*pix);
KDockTabGroup *dtg=parentDockTabGroup();
if (dtg)
dtg->changeTab(this,pixmap,dtg->tabLabel(this));
- QWidget *contWid=parentDockContainer();
+ TQWidget *contWid=parentDockContainer();
if (contWid) {
KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
if (x) {
@@ -542,7 +542,7 @@ void KDockWidget::setPixmap(const QPixmap& pixmap) {
}
}
-const QPixmap& KDockWidget::pixmap() const {
+const TQPixmap& KDockWidget::pixmap() const {
return *pix;
}
@@ -569,25 +569,25 @@ KDockWidget::~KDockWidget()
d=0;
}
-void KDockWidget::paintEvent(QPaintEvent* pe)
+void KDockWidget::paintEvent(TQPaintEvent* pe)
{
- QWidget::paintEvent(pe);
- QPainter paint;
+ TQWidget::paintEvent(pe);
+ TQPainter paint;
paint.begin( this );
- style().drawPrimitive (QStyle::PE_Panel, &paint, QRect(0,0,width(), height()), colorGroup());
+ style().drawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), colorGroup());
paint.end();
}
-void KDockWidget::leaveEvent(QEvent *e)
+void KDockWidget::leaveEvent(TQEvent *e)
{
- QWidget::leaveEvent(e);
+ TQWidget::leaveEvent(e);
#ifdef BORDERLESS_WINDOWS
if (parent()) return;
-// setCursor(QCursor(ArrowCursor));
+// setCursor(TQCursor(ArrowCursor));
#endif
}
-void KDockWidget::mousePressEvent(QMouseEvent* mme)
+void KDockWidget::mousePressEvent(TQMouseEvent* mme)
{
#ifdef BORDERLESS_WINDOWS
if (!parent())
@@ -599,9 +599,9 @@ void KDockWidget::mousePressEvent(QMouseEvent* mme)
bool bright;
bool btop;
int styleheight;
- QPoint mp;
+ TQPoint mp;
mp=mme->pos();
- styleheight=2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this);
+ styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this);
bbottom=mp.y()>=height()-styleheight;
btop=mp.y()<=styleheight;
bleft=mp.x()<=styleheight;
@@ -613,52 +613,52 @@ void KDockWidget::mousePressEvent(QMouseEvent* mme)
if (btop)
{
d->resizeMode=KDockWidgetPrivate::ResizeTopRight;
- d->resizePos=QPoint(width(),0)-mme->pos();
+ d->resizePos=TQPoint(width(),0)-mme->pos();
}
else
{
- d->resizePos=QPoint(width(),height())-mme->pos();
+ d->resizePos=TQPoint(width(),height())-mme->pos();
if (bbottom) d->resizeMode=KDockWidgetPrivate::ResizeBottomRight;
else d->resizeMode=KDockWidgetPrivate::ResizeRight;
}
}
else if (bleft)
{
- if (btop) setCursor(QCursor(SizeFDiagCursor));
+ if (btop) setCursor(TQCursor(SizeFDiagCursor));
else
- if (bbottom) setCursor(QCursor(SizeBDiagCursor));
- else setCursor(QCursor(SizeHorCursor));
+ if (bbottom) setCursor(TQCursor(SizeBDiagCursor));
+ else setCursor(TQCursor(SizeHorCursor));
}
else
if (bbottom)
{
d->resizeMode=KDockWidgetPrivate::ResizeBottom;
- d->resizePos=QPoint(0,height())-mme->pos();
+ d->resizePos=TQPoint(0,height())-mme->pos();
}
else
- if (btop) setCursor(QCursor(SizeVerCursor));
+ if (btop) setCursor(TQCursor(SizeVerCursor));
else d->resizing=false;
if (d->resizing) grabMouse(cursor());
}
#endif
- QWidget::mousePressEvent(mme);
+ TQWidget::mousePressEvent(mme);
}
-void KDockWidget::mouseReleaseEvent(QMouseEvent* ev)
+void KDockWidget::mouseReleaseEvent(TQMouseEvent* ev)
{
#ifdef BORDERLESS_WINDOWS
d->resizing=false;
releaseMouse();
#endif
- QWidget::mouseReleaseEvent(ev);
+ TQWidget::mouseReleaseEvent(ev);
}
-void KDockWidget::mouseMoveEvent(QMouseEvent* mme)
+void KDockWidget::mouseMoveEvent(TQMouseEvent* mme)
{
- QWidget::mouseMoveEvent(mme);
+ TQWidget::mouseMoveEvent(mme);
#ifdef BORDERLESS_WINDOWS
if (parent()) return;
@@ -687,9 +687,9 @@ void KDockWidget::mouseMoveEvent(QMouseEvent* mme)
bool bright;
bool btop;
int styleheight;
- QPoint mp;
+ TQPoint mp;
mp=mme->pos();
- styleheight=2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this);
+ styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this);
bbottom=mp.y()>=height()-styleheight;
btop=mp.y()<=styleheight;
bleft=mp.x()<=styleheight;
@@ -697,25 +697,25 @@ void KDockWidget::mouseMoveEvent(QMouseEvent* mme)
kdDebug(282)<<"mousemovevent"<<endl;
if (bright)
{
- if (btop) setCursor(QCursor(SizeBDiagCursor));
+ if (btop) setCursor(TQCursor(SizeBDiagCursor));
else
- if (bbottom) setCursor(QCursor(SizeFDiagCursor));
- else setCursor(QCursor(SizeHorCursor));
+ if (bbottom) setCursor(TQCursor(SizeFDiagCursor));
+ else setCursor(TQCursor(SizeHorCursor));
}
else if (bleft)
{
- if (btop) setCursor(QCursor(SizeFDiagCursor));
+ if (btop) setCursor(TQCursor(SizeFDiagCursor));
else
- if (bbottom) setCursor(QCursor(SizeBDiagCursor));
- else setCursor(QCursor(SizeHorCursor));
+ if (bbottom) setCursor(TQCursor(SizeBDiagCursor));
+ else setCursor(TQCursor(SizeHorCursor));
}
else
- if (bbottom || btop) setCursor(QCursor(SizeVerCursor));
- else setCursor(QCursor(ArrowCursor));
+ if (bbottom || btop) setCursor(TQCursor(SizeVerCursor));
+ else setCursor(TQCursor(ArrowCursor));
#endif
}
-void KDockWidget::setLatestKDockContainer(QWidget* container)
+void KDockWidget::setLatestKDockContainer(TQWidget* container)
{
if (container)
{
@@ -726,7 +726,7 @@ void KDockWidget::setLatestKDockContainer(QWidget* container)
}
}
-QWidget* KDockWidget::latestKDockContainer()
+TQWidget* KDockWidget::latestKDockContainer()
{
if (!(d->container)) return 0;
if (dynamic_cast<KDockContainer*>(d->container.operator->())) return d->container;
@@ -747,8 +747,8 @@ void KDockWidget::setHeader( KDockWidgetAbstractHeader* h )
delete header;
delete layout;
header = h;
- layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
layout->addWidget( header );
setWidget( widget );
} else {
@@ -775,7 +775,7 @@ void KDockWidget::updateHeader()
#ifdef BORDERLESS_WINDOWS
layout->setMargin(0);
setMouseTracking(false);
- setCursor(QCursor(ArrowCursor));
+ setCursor(TQCursor(ArrowCursor));
#endif
if ( (parent() == manager->main) || isGroup || (eDocking == KDockWidget::DockNone) ){
@@ -791,18 +791,18 @@ void KDockWidget::updateHeader()
header->setTopLevel( true );
header->show();
#ifdef BORDERLESS_WINDOWS
- layout->setMargin(2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this));
+ layout->setMargin(2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this));
setMouseTracking(true);
#endif
}
}
-void KDockWidget::applyToWidget( QWidget* s, const QPoint& p )
+void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
{
if ( parent() != s )
{
hide();
- reparent(s, 0, QPoint(0,0), false);
+ reparent(s, 0, TQPoint(0,0), false);
}
if ( s && s->inherits("KDockMainWindow") ){
@@ -810,7 +810,7 @@ void KDockWidget::applyToWidget( QWidget* s, const QPoint& p )
}
if ( manager && s == manager->main ){
- setGeometry( QRect(QPoint(0,0), manager->main->geometry().size()) );
+ setGeometry( TQRect(TQPoint(0,0), manager->main->geometry().size()) );
}
if ( !s )
@@ -846,10 +846,10 @@ void KDockWidget::show()
if ( parent() ){
makeDockVisible();
} else {
- QWidget::show();
+ TQWidget::show();
}
} else {
- QWidget::show();
+ TQWidget::show();
}
}
@@ -858,46 +858,46 @@ void KDockWidget::show()
void KDockWidget::setDockWindowType (NET::WindowType windowType)
{
d->windowType = windowType;
- applyToWidget( parentWidget(), QPoint(0,0) );
+ applyToWidget( parentWidget(), TQPoint(0,0) );
}
#endif
-void KDockWidget::setDockWindowTransient (QWidget *parent, bool transientEnabled)
+void KDockWidget::setDockWindowTransient (TQWidget *parent, bool transientEnabled)
{
d->_parent = parent;
d->transient = transientEnabled;
- applyToWidget( parentWidget(), QPoint(0,0) );
+ applyToWidget( parentWidget(), TQPoint(0,0) );
}
-QWidget *KDockWidget::transientTo() {
+TQWidget *KDockWidget::transientTo() {
if (d->transient && d->_parent) return d->_parent; else return 0;
}
-bool KDockWidget::event( QEvent *event )
+bool KDockWidget::event( TQEvent *event )
{
switch ( event->type() )
{
#undef FocusIn
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
if (widget && !d->pendingFocusInEvent) {
d->pendingFocusInEvent = true;
widget->setFocus();
}
d->pendingFocusInEvent = false;
break;
- case QEvent::ChildRemoved:
- if ( widget == ((QChildEvent*)event)->child() ) widget = 0L;
+ case TQEvent::ChildRemoved:
+ if ( widget == ((TQChildEvent*)event)->child() ) widget = 0L;
break;
- case QEvent::Show:
+ case TQEvent::Show:
if ( widget ) widget->show();
emit manager->change();
break;
- case QEvent::Hide:
+ case TQEvent::Hide:
if ( widget ) widget->hide();
emit manager->change();
break;
- case QEvent::CaptionChange:
+ case TQEvent::CaptionChange:
if ( parentWidget() ){
if ( parent()->inherits("KDockSplitter") ){
((KDockSplitter*)(parent()))->updateName();
@@ -908,13 +908,13 @@ bool KDockWidget::event( QEvent *event )
}
}
break;
- case QEvent::Close:
+ case TQEvent::Close:
emit iMBeingClosed();
break;
default:
break;
}
- return QWidget::event( event );
+ return TQWidget::event( event );
}
KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
@@ -944,7 +944,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
}
-KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, int spliPos, QPoint pos, bool check, int tabIndex )
+KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, int spliPos, TQPoint pos, bool check, int tabIndex )
{
if (this == target)
return 0L; // docking to itself not possible
@@ -1043,10 +1043,10 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
if ( parentTab ){
// add to existing TabGroup
applyToWidget( parentTab );
- parentTab->insertTab( this, icon() ? *icon() : QPixmap(),
+ parentTab->insertTab( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
- QWidget *wantTransient=parentTab->transientTo();
+ TQWidget *wantTransient=parentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);
setDockTabName( parentTab );
@@ -1060,7 +1060,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
else
{
// kdDebug(282)<<"Looking for KDockContainer"<<endl;
- QWidget *contWid=target->parentDockContainer();
+ TQWidget *contWid=target->parentDockContainer();
if (!contWid) contWid=target->widget;
if (contWid)
{
@@ -1075,7 +1075,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
}
// kdDebug(282)<<"KDockContainerFound"<<endl;
applyToWidget( contWid );
- cont->insertWidget( this, icon() ? *icon() : QPixmap(),
+ cont->insertWidget( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
setLatestKDockContainer(contWid);
// setDockTabName( parentTab );
@@ -1091,8 +1091,8 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
}
// create a new dockwidget that will contain the target and this
- QWidget* parentDock = target->parentWidget();
- KDockWidget* newDock = new KDockWidget( manager, "tempName", QPixmap(""), parentDock );
+ TQWidget* parentDock = target->parentWidget();
+ KDockWidget* newDock = new KDockWidget( manager, "tempName", TQPixmap(""), parentDock );
newDock->currentDockPos = target->currentDockPos;
if ( dockPos == KDockWidget::DockCenter ){
@@ -1124,14 +1124,14 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
if ( dockPos == KDockWidget::DockCenter )
{
KDockTabGroup* tab = new KDockTabGroup( newDock, "_dock_tab");
- QObject::connect(tab, SIGNAL(currentChanged(QWidget*)), d, SLOT(slotFocusEmbeddedWidget(QWidget*)));
+ TQObject::connect(tab, TQT_SIGNAL(currentChanged(TQWidget*)), d, TQT_SLOT(slotFocusEmbeddedWidget(TQWidget*)));
newDock->setWidget( tab );
target->applyToWidget( tab );
applyToWidget( tab );
- tab->insertTab( target, target->icon() ? *(target->icon()) : QPixmap(),
+ tab->insertTab( target, target->icon() ? *(target->icon()) : TQPixmap(),
target->tabPageLabel() );
@@ -1139,11 +1139,11 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
if( !target->toolTipString().isEmpty())
tab->setTabToolTip( target, target->toolTipString());
- tab->insertTab( this, icon() ? *icon() : QPixmap(),
+ tab->insertTab( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
- QRect geom=newDock->geometry();
- QWidget *wantTransient=tab->transientTo();
+ TQRect geom=newDock->geometry();
+ TQWidget *wantTransient=tab->transientTo();
newDock->setDockWindowTransient(wantTransient,wantTransient);
newDock->setGeometry(geom);
@@ -1218,15 +1218,15 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
KDockTabGroup* KDockWidget::parentDockTabGroup() const
{
if ( !parent() ) return 0L;
- QWidget* candidate = parentWidget()->parentWidget();
+ TQWidget* candidate = parentWidget()->parentWidget();
if ( candidate && candidate->inherits("KDockTabGroup") ) return (KDockTabGroup*)candidate;
return 0L;
}
-QWidget *KDockWidget::parentDockContainer() const
+TQWidget *KDockWidget::parentDockContainer() const
{
if (!parent()) return 0L;
- QWidget* candidate = parentWidget()->parentWidget();
+ TQWidget* candidate = parentWidget()->parentWidget();
if (candidate && dynamic_cast<KDockContainer*>(candidate)) return candidate;
return 0L;
}
@@ -1275,7 +1275,7 @@ void KDockWidget::restoreFromForcedFixedSize()
void KDockWidget::toDesktop()
{
- QPoint p = mapToGlobal( QPoint( -30, -30 ) );
+ TQPoint p = mapToGlobal( TQPoint( -30, -30 ) );
if( p.x( ) < 0 )
p.setX( 0 );
if( p.y( ) < 0 )
@@ -1292,10 +1292,10 @@ void KDockWidget::undock()
{
// kdDebug(282)<<"KDockWidget::undock()"<<endl;
- manager->d->dragRect = QRect ();
+ manager->d->dragRect = TQRect ();
manager->drawDragRectangle ();
- QWidget* parentW = parentWidget();
+ TQWidget* parentW = parentWidget();
if ( !parentW ){
hide();
if (!d->blockHasUndockedSignal)
@@ -1317,7 +1317,7 @@ void KDockWidget::undock()
d->index = parentTab->indexOf( this); // memorize the page position in the tab widget
parentTab->removePage( this );
/*
- QWidget *wantTransient=parentTab->transientTo();
+ TQWidget *wantTransient=parentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);
*/
setFormerBrotherDockWidget((KDockWidget*)parentTab->page(0));
@@ -1327,7 +1327,7 @@ void KDockWidget::undock()
// last subdock widget in the tab control
KDockWidget* lastTab = (KDockWidget*)parentTab->page(0);
parentTab->removePage( lastTab );
-/* QWidget *wantTransient=parentTab->transientTo();
+/* TQWidget *wantTransient=parentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);*/
lastTab->applyToWidget( 0L );
@@ -1337,7 +1337,7 @@ void KDockWidget::undock()
KDockWidget* parentOfTab = (KDockWidget*)parentTab->parent();
delete parentTab; // KDockTabGroup
- QWidget* parentOfDockWidget = parentOfTab->parentWidget();
+ TQWidget* parentOfDockWidget = parentOfTab->parentWidget();
if ( !parentOfDockWidget ){
if ( isV ) lastTab->show();
} else {
@@ -1376,7 +1376,7 @@ void KDockWidget::undock()
}
} else {
/*********************************************************************************************/
- //QWidget* containerWidget = (QWidget*)parent();
+ //TQWidget* containerWidget = (TQWidget*)parent();
bool undockedFromContainer=false;
if (d->container)
{
@@ -1405,7 +1405,7 @@ void KDockWidget::undock()
secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() );
secondWidget->resize( group->width(), group->height() );
} else {
- QWidget* obj = group->parentWidget();
+ TQWidget* obj = group->parentWidget();
secondWidget->applyToWidget( obj );
if ( obj->inherits("KDockSplitter") ){
KDockSplitter* parentOfGroup = (KDockSplitter*)obj;
@@ -1445,22 +1445,22 @@ void KDockWidget::undock()
emit hasUndocked();
}
-void KDockWidget::setWidget( QWidget* mw )
+void KDockWidget::setWidget( TQWidget* mw )
{
if ( !mw ) return;
if ( mw->parent() != this ){
- mw->reparent(this, 0, QPoint(0,0), false);
+ mw->reparent(this, 0, TQPoint(0,0), false);
}
#ifdef BORDERLESS_WINDOWS
- if (!mw->ownCursor()) mw->setCursor(QCursor(ArrowCursor));
+ if (!mw->ownCursor()) mw->setCursor(TQCursor(ArrowCursor));
#endif
widget = mw;
delete layout;
- layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
KDockContainer* dc = dynamic_cast<KDockContainer*>(widget);
if (dc)
@@ -1484,10 +1484,10 @@ void KDockWidget::setWidget( QWidget* mw )
void KDockWidget::setDockTabName( KDockTabGroup* tab )
{
- QString listOfName;
- QString listOfCaption;
+ TQString listOfName;
+ TQString listOfCaption;
for ( int i = 0; i < tab->count(); ++i ) {
- QWidget *w = tab->page( i );
+ TQWidget *w = tab->page( i );
listOfCaption.append( w->caption() ).append(",");
listOfName.append( w->name() ).append(",");
}
@@ -1537,7 +1537,7 @@ void KDockWidget::makeDockVisible()
parentDockTabGroup()->showPage( this );
}
if (parentDockContainer()) {
- QWidget *contWid=parentDockContainer();
+ TQWidget *contWid=parentDockContainer();
KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
if (x) {
x->showWidget(this);
@@ -1545,7 +1545,7 @@ void KDockWidget::makeDockVisible()
}
if ( isVisible() ) return;
- QWidget* p = parentWidget();
+ TQWidget* p = parentWidget();
while ( p ){
if ( !p->isVisible() )
p->show();
@@ -1560,15 +1560,15 @@ void KDockWidget::setFormerBrotherDockWidget(KDockWidget *dockWidget)
{
formerBrotherDockWidget = dockWidget;
if( formerBrotherDockWidget )
- QObject::connect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()),
- this, SLOT(loseFormerBrotherDockWidget()) );
+ TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
+ this, TQT_SLOT(loseFormerBrotherDockWidget()) );
}
void KDockWidget::loseFormerBrotherDockWidget()
{
if( formerBrotherDockWidget )
- QObject::disconnect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()),
- this, SLOT(loseFormerBrotherDockWidget()) );
+ TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
+ this, TQT_SLOT(loseFormerBrotherDockWidget()) );
formerBrotherDockWidget = 0L;
repaint();
}
@@ -1578,12 +1578,12 @@ void KDockWidget::dockBack()
if( formerBrotherDockWidget) {
// search all children if it tries to dock back to a child
bool found = false;
- QObjectList* cl = queryList("KDockWidget");
- QObjectListIt it( *cl );
- QObject * obj;
+ TQObjectList* cl = queryList("KDockWidget");
+ TQObjectListIt it( *cl );
+ TQObject * obj;
while ( !found && (obj=it.current()) != 0 ) {
++it;
- QWidget* widg = (QWidget*)obj;
+ TQWidget* widg = (TQWidget*)obj;
if( widg == formerBrotherDockWidget)
found = true;
}
@@ -1591,7 +1591,7 @@ void KDockWidget::dockBack()
if( !found) {
// can dock back to the former brother dockwidget
- manualDock( formerBrotherDockWidget, formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index);
+ manualDock( formerBrotherDockWidget, formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index);
formerBrotherDockWidget = 0L;
makeDockVisible();
return;
@@ -1599,7 +1599,7 @@ void KDockWidget::dockBack()
}
// else dockback to the dockmainwindow (default behavior)
- manualDock( ((KDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index);
+ manualDock( ((KDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index);
formerBrotherDockWidget = 0L;
if (parent())
makeDockVisible();
@@ -1616,8 +1616,8 @@ bool KDockWidget::isDockBackPossible() const
/**************************************************************************************/
-KDockManager::KDockManager( QWidget* mainWindow , const char* name )
-:QObject( mainWindow, name )
+KDockManager::KDockManager( TQWidget* mainWindow , const char* name )
+:TQObject( mainWindow, name )
,main(mainWindow)
,currentDragWidget(0L)
,currentMoveWidget(0L)
@@ -1648,20 +1648,20 @@ KDockManager::KDockManager( QWidget* mainWindow , const char* name )
undockProcess = false;
- menuData = new QPtrList<MenuDockData>;
+ menuData = new TQPtrList<MenuDockData>;
menuData->setAutoDelete( true );
menuData->setAutoDelete( true );
#ifndef NO_KDE2
menu = new KPopupMenu();
#else
- menu = new QPopupMenu();
+ menu = new TQPopupMenu();
#endif
- connect( menu, SIGNAL(aboutToShow()), SLOT(slotMenuPopup()) );
- connect( menu, SIGNAL(activated(int)), SLOT(slotMenuActivated(int)) );
+ connect( menu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotMenuPopup()) );
+ connect( menu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotMenuActivated(int)) );
- childDock = new QObjectList();
+ childDock = new TQObjectList();
childDock->setAutoDelete( false );
}
@@ -1676,7 +1676,7 @@ KDockManager::~KDockManager()
delete menuData;
delete menu;
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ) {
@@ -1689,7 +1689,7 @@ KDockManager::~KDockManager()
void KDockManager::activate()
{
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ) {
@@ -1699,17 +1699,17 @@ void KDockManager::activate()
obj->show();
}
}
- if ( !main->inherits("QDialog") ) main->show();
+ if ( !main->inherits("TQDialog") ) main->show();
}
-bool KDockManager::eventFilter( QObject *obj, QEvent *event )
+bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
{
if ( obj->inherits("KDockWidgetAbstractHeaderDrag") ){
KDockWidget* pDockWdgAtCursor = 0L;
KDockWidget* curdw = ((KDockWidgetAbstractHeaderDrag*)obj)->dockWidget();
switch ( event->type() ){
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonDblClick:
if (curdw->currentDockPos == KDockWidget::DockDesktop) curdw->dockBack();
else
{
@@ -1718,8 +1718,8 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
}
break;
- case QEvent::MouseButtonPress:
- if ( ((QMouseEvent*)event)->button() == LeftButton ){
+ case TQEvent::MouseButtonPress:
+ if ( ((TQMouseEvent*)event)->button() == LeftButton ){
if ( curdw->eDocking != (int)KDockWidget::DockNone ){
dropCancel = true;
curdw->setFocus();
@@ -1727,24 +1727,24 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
currentDragWidget = curdw;
currentMoveWidget = 0L;
- childDockWidgetList = new QWidgetList();
+ childDockWidgetList = new TQWidgetList();
childDockWidgetList->append( curdw );
findChildDockWidget( curdw, childDockWidgetList );
- //d->oldDragRect = QRect(); should fix rectangle not erased problem
- d->dragRect = QRect(curdw->geometry());
- QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ //d->oldDragRect = TQRect(); should fix rectangle not erased problem
+ d->dragRect = TQRect(curdw->geometry());
+ TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
drawDragRectangle();
d->readyToDrag = true;
- d->dragOffset = QCursor::pos()-currentDragWidget->mapToGlobal(QPoint(0,0));
+ d->dragOffset = TQCursor::pos()-currentDragWidget->mapToGlobal(TQPoint(0,0));
}
}
break;
- case QEvent::MouseButtonRelease:
- if ( ((QMouseEvent*)event)->button() == LeftButton ){
+ case TQEvent::MouseButtonRelease:
+ if ( ((TQMouseEvent*)event)->button() == LeftButton ){
if ( dragging ){
if ( !dropCancel )
drop();
@@ -1753,9 +1753,9 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
}
if (d->readyToDrag) {
d->readyToDrag = false;
- //d->oldDragRect = QRect(); should fix rectangle not erased problem
- d->dragRect = QRect(curdw->geometry());
- QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ //d->oldDragRect = TQRect(); should fix rectangle not erased problem
+ d->dragRect = TQRect(curdw->geometry());
+ TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
drawDragRectangle();
currentDragWidget = 0L;
@@ -1766,7 +1766,7 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
dropCancel = true;
}
break;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
if ( dragging ) {
#ifdef BORDERLESS_WINDOWS
@@ -1774,31 +1774,31 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
KDockWidget *oldMoveWidget;
if (!curdw->parent())
{
- curdw->move(QCursor::pos()-d->dragOffset);
- pDockWdgAtCursor = findDockWidgetAt( QCursor::pos()-QPoint(0,d->dragOffset.y()+3) );
+ curdw->move(TQCursor::pos()-d->dragOffset);
+ pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos()-TQPoint(0,d->dragOffset.y()+3) );
oldMoveWidget = currentMoveWidget;
}
else
{
- pDockWdgAtCursor = findDockWidgetAt( QCursor::pos() );
+ pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos() );
oldMoveWidget = currentMoveWidget;
}
//END TEST
#else
- pDockWdgAtCursor = findDockWidgetAt( QCursor::pos() );
+ pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos() );
KDockWidget* oldMoveWidget = currentMoveWidget;
#endif
if ( currentMoveWidget && pDockWdgAtCursor == currentMoveWidget ) { //move
- dragMove( currentMoveWidget, currentMoveWidget->mapFromGlobal( QCursor::pos() ) );
+ dragMove( currentMoveWidget, currentMoveWidget->mapFromGlobal( TQCursor::pos() ) );
break;
} else {
if (dropCancel && curdw) {
- d->dragRect = QRect(curdw->geometry());
- QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ d->dragRect = TQRect(curdw->geometry());
+ TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
}else
- d->dragRect = QRect();
+ d->dragRect = TQRect();
drawDragRectangle();
}
@@ -1822,7 +1822,7 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
if (d->readyToDrag) {
d->readyToDrag = false;
}
- if ( (((QMouseEvent*)event)->state() == LeftButton) &&
+ if ( (((TQMouseEvent*)event)->state() == LeftButton) &&
(curdw->eDocking != (int)KDockWidget::DockNone) ) {
startDrag( curdw);
}
@@ -1832,10 +1832,10 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
break;
}
}
- return QObject::eventFilter( obj, event );
+ return TQObject::eventFilter( obj, event );
}
-KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
+KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos )
{
dropCancel = true;
@@ -1844,7 +1844,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
if (currentDragWidget->eDocking == (int)KDockWidget::DockNone ) return 0L;
- QWidget* p = QApplication::widgetAt( pos );
+ TQWidget* p = TQApplication::widgetAt( pos );
if ( !p ) {
dropCancel = false;
return 0L;
@@ -1852,7 +1852,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
#if defined(_OS_WIN32_) || defined(Q_OS_WIN32)
p = p->topLevelWidget();
#endif
- QWidget* w = 0L;
+ TQWidget* w = 0L;
findChildDockWidget( w, p, p->mapFromGlobal(pos) );
if ( !w ){
if ( !p->inherits("KDockWidget") ) {
@@ -1874,7 +1874,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
return 0L;
KDockWidget::DockPosition curPos = KDockWidget::DockDesktop;
- QPoint cpos = www->mapFromGlobal( pos );
+ TQPoint cpos = www->mapFromGlobal( pos );
int ww = www->widget->width() / 3;
int hh = www->widget->height() / 3;
@@ -1901,15 +1901,15 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
return www;
}
-void KDockManager::findChildDockWidget( QWidget*& ww, const QWidget* p, const QPoint& pos )
+void KDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const TQPoint& pos )
{
if ( p->children() ) {
- QWidget *w;
- QObjectListIt it( *p->children() );
+ TQWidget *w;
+ TQObjectListIt it( *p->children() );
it.toLast();
while ( it.current() ) {
if ( it.current()->isWidgetType() ) {
- w = (QWidget*)it.current();
+ w = (TQWidget*)it.current();
if ( w->isVisible() && w->geometry().contains(pos) ) {
if ( w->inherits("KDockWidget") ) ww = w;
findChildDockWidget( ww, w, w->mapFromParent(pos) );
@@ -1922,15 +1922,15 @@ void KDockManager::findChildDockWidget( QWidget*& ww, const QWidget* p, const QP
return;
}
-void KDockManager::findChildDockWidget( const QWidget* p, QWidgetList*& list )
+void KDockManager::findChildDockWidget( const TQWidget* p, TQWidgetList*& list )
{
if ( p->children() ) {
- QWidget *w;
- QObjectListIt it( *p->children() );
+ TQWidget *w;
+ TQObjectListIt it( *p->children() );
it.toLast();
while ( it.current() ) {
if ( it.current()->isWidgetType() ) {
- w = (QWidget*)it.current();
+ w = (TQWidget*)it.current();
if ( w->isVisible() ) {
if ( w->inherits("KDockWidget") ) list->append( w );
findChildDockWidget( w, list );
@@ -1957,15 +1957,15 @@ void KDockManager::startDrag( KDockWidget* w )
curPos = KDockWidget::DockDesktop;
dragging = true;
- QApplication::setOverrideCursor(QCursor(sizeAllCursor));
+ TQApplication::setOverrideCursor(TQCursor(sizeAllCursor));
}
-void KDockManager::dragMove( KDockWidget* dw, QPoint pos )
+void KDockManager::dragMove( KDockWidget* dw, TQPoint pos )
{
- QPoint p = dw->mapToGlobal( dw->widget->pos() );
+ TQPoint p = dw->mapToGlobal( dw->widget->pos() );
KDockWidget::DockPosition oldPos = curPos;
- QSize r = dw->widget->size();
+ TQSize r = dw->widget->size();
if ( dw->parentDockTabGroup() ){
curPos = KDockWidget::DockCenter;
if ( oldPos != curPos ) {
@@ -2010,34 +2010,34 @@ void KDockManager::dragMove( KDockWidget* dw, QPoint pos )
void KDockManager::cancelDrop()
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
delete childDockWidgetList;
childDockWidgetList = 0L;
- d->dragRect = QRect(); // cancel drawing
+ d->dragRect = TQRect(); // cancel drawing
drawDragRectangle(); // only the old rect will be deleted
}
void KDockManager::drop()
{
- d->dragRect = QRect(); // cancel drawing
+ d->dragRect = TQRect(); // cancel drawing
drawDragRectangle(); // only the old rect will be deleted
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
delete childDockWidgetList;
childDockWidgetList = 0L;
if ( dropCancel ) return;
if ( !currentMoveWidget && (!(currentDragWidget->eDocking & (int)KDockWidget::DockDesktop)) ) {
- d->dragRect = QRect(); // cancel drawing
+ d->dragRect = TQRect(); // cancel drawing
drawDragRectangle(); // only the old rect will be deleted
return;
}
if ( !currentMoveWidget && !currentDragWidget->parent() ) {
- currentDragWidget->move( QCursor::pos() - d->dragOffset );
+ currentDragWidget->move( TQCursor::pos() - d->dragOffset );
}
else {
// curPos is the current target DockPosition.
@@ -2088,63 +2088,63 @@ void KDockManager::drop()
}
// set new prevSideDockPosBeforeDrag
currentDragWidget->prevSideDockPosBeforeDrag = curPos;
- currentDragWidget->manualDock( currentMoveWidget, curPos , splitPos, QCursor::pos() - d->dragOffset );
+ currentDragWidget->manualDock( currentMoveWidget, curPos , splitPos, TQCursor::pos() - d->dragOffset );
currentDragWidget->makeDockVisible();
}
}
-static QDomElement createStringEntry(QDomDocument &doc, const QString &tagName, const QString &str)
+static TQDomElement createStringEntry(TQDomDocument &doc, const TQString &tagName, const TQString &str)
{
- QDomElement el = doc.createElement(tagName);
+ TQDomElement el = doc.createElement(tagName);
el.appendChild(doc.createTextNode(str));
return el;
}
-static QDomElement createBoolEntry(QDomDocument &doc, const QString &tagName, bool b)
+static TQDomElement createBoolEntry(TQDomDocument &doc, const TQString &tagName, bool b)
{
- return createStringEntry(doc, tagName, QString::fromLatin1(b? "true" : "false"));
+ return createStringEntry(doc, tagName, TQString::fromLatin1(b? "true" : "false"));
}
-static QDomElement createNumberEntry(QDomDocument &doc, const QString &tagName, int n)
+static TQDomElement createNumberEntry(TQDomDocument &doc, const TQString &tagName, int n)
{
- return createStringEntry(doc, tagName, QString::number(n));
+ return createStringEntry(doc, tagName, TQString::number(n));
}
-static QDomElement createRectEntry(QDomDocument &doc, const QString &tagName, const QRect &rect)
+static TQDomElement createRectEntry(TQDomDocument &doc, const TQString &tagName, const TQRect &rect)
{
- QDomElement el = doc.createElement(tagName);
+ TQDomElement el = doc.createElement(tagName);
- QDomElement xel = doc.createElement("x");
- xel.appendChild(doc.createTextNode(QString::number(rect.x())));
+ TQDomElement xel = doc.createElement("x");
+ xel.appendChild(doc.createTextNode(TQString::number(rect.x())));
el.appendChild(xel);
- QDomElement yel = doc.createElement("y");
- yel.appendChild(doc.createTextNode(QString::number(rect.y())));
+ TQDomElement yel = doc.createElement("y");
+ yel.appendChild(doc.createTextNode(TQString::number(rect.y())));
el.appendChild(yel);
- QDomElement wel = doc.createElement("width");
- wel.appendChild(doc.createTextNode(QString::number(rect.width())));
+ TQDomElement wel = doc.createElement("width");
+ wel.appendChild(doc.createTextNode(TQString::number(rect.width())));
el.appendChild(wel);
- QDomElement hel = doc.createElement("height");
- hel.appendChild(doc.createTextNode(QString::number(rect.height())));
+ TQDomElement hel = doc.createElement("height");
+ hel.appendChild(doc.createTextNode(TQString::number(rect.height())));
el.appendChild(hel);
return el;
}
-static QDomElement createListEntry(QDomDocument &doc, const QString &tagName,
- const QString &subTagName, const QStrList &list)
+static TQDomElement createListEntry(TQDomDocument &doc, const TQString &tagName,
+ const TQString &subTagName, const TQStrList &list)
{
- QDomElement el = doc.createElement(tagName);
+ TQDomElement el = doc.createElement(tagName);
- QStrListIterator it(list);
+ TQStrListIterator it(list);
for (; it.current(); ++it) {
- QDomElement subel = doc.createElement(subTagName);
- subel.appendChild(doc.createTextNode(QString::fromLatin1(it.current())));
+ TQDomElement subel = doc.createElement(subTagName);
+ subel.appendChild(doc.createTextNode(TQString::fromLatin1(it.current())));
el.appendChild(subel);
}
@@ -2152,44 +2152,44 @@ static QDomElement createListEntry(QDomDocument &doc, const QString &tagName,
}
-static QString stringEntry(QDomElement &base, const QString &tagName)
+static TQString stringEntry(TQDomElement &base, const TQString &tagName)
{
return base.namedItem(tagName).firstChild().toText().data();
}
-static bool boolEntry(QDomElement &base, const QString &tagName)
+static bool boolEntry(TQDomElement &base, const TQString &tagName)
{
return base.namedItem(tagName).firstChild().toText().data() == "true";
}
-static int numberEntry(QDomElement &base, const QString &tagName)
+static int numberEntry(TQDomElement &base, const TQString &tagName)
{
return stringEntry(base, tagName).toInt();
}
-static QRect rectEntry(QDomElement &base, const QString &tagName)
+static TQRect rectEntry(TQDomElement &base, const TQString &tagName)
{
- QDomElement el = base.namedItem(tagName).toElement();
+ TQDomElement el = base.namedItem(tagName).toElement();
int x = numberEntry(el, "x");
int y = numberEntry(el, "y");
int width = numberEntry(el, "width");
int height = numberEntry(el, "height");
- return QRect(x, y, width, height);
+ return TQRect(x, y, width, height);
}
-static QStrList listEntry(QDomElement &base, const QString &tagName, const QString &subTagName)
+static TQStrList listEntry(TQDomElement &base, const TQString &tagName, const TQString &subTagName)
{
- QStrList list;
+ TQStrList list;
- for( QDomNode n = base.namedItem(tagName).firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = base.namedItem(tagName).firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement subel = n.toElement();
+ TQDomElement subel = n.toElement();
if (subel.tagName() == subTagName)
list.append(subel.firstChild().toText().data().latin1());
}
@@ -2198,28 +2198,28 @@ static QStrList listEntry(QDomElement &base, const QString &tagName, const QStri
}
-void KDockManager::writeConfig(QDomElement &base)
+void KDockManager::writeConfig(TQDomElement &base)
{
// First of all, clear the tree under base
while (!base.firstChild().isNull())
base.removeChild(base.firstChild());
- QDomDocument doc = base.ownerDocument();
+ TQDomDocument doc = base.ownerDocument();
- QStrList nameList;
- QString mainWidgetStr;
+ TQStrList nameList;
+ TQString mainWidgetStr;
// collect widget names
- QStringList nList;
- QObjectListIt it(*childDock);
+ TQStringList nList;
+ TQObjectListIt it(*childDock);
KDockWidget *obj1;
while ( (obj1=(KDockWidget*)it.current()) ) {
if ( obj1->parent() == main )
- mainWidgetStr = QString::fromLatin1(obj1->name());
+ mainWidgetStr = TQString::fromLatin1(obj1->name());
nList.append(obj1->name());
++it;
}
- for (QObjectListIt it(d->containerDocks);it.current();++it)
+ for (TQObjectListIt it(d->containerDocks);it.current();++it)
{
KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget);
if (dc) {
@@ -2227,7 +2227,7 @@ void KDockManager::writeConfig(QDomElement &base)
}
}
- QStringList::Iterator nListIt=nList.begin();
+ TQStringList::Iterator nListIt=nList.begin();
while ( nListIt!=nList.end() ) {
KDockWidget *obj = getDockWidgetFromName( *nListIt);
if ((obj->isGroup && (!obj->d->isContainer)) && (nameList.find( obj->firstName.latin1() ) == -1
@@ -2239,7 +2239,7 @@ void KDockManager::writeConfig(QDomElement &base)
continue;
}
- QDomElement groupEl;
+ TQDomElement groupEl;
if (obj->d->isContainer) {
KDockContainer* x = dynamic_cast<KDockContainer*>(obj->widget);
if (x) {
@@ -2259,7 +2259,7 @@ void KDockManager::writeConfig(QDomElement &base)
//// Save a tab group
groupEl = doc.createElement("tabGroup");
- QStrList list;
+ TQStrList list;
for ( int i = 0; i < ((KDockTabGroup*)obj->widget)->count(); ++i )
list.append( ((KDockTabGroup*)obj->widget)->page( i )->name() );
groupEl.appendChild(createListEntry(doc, "tabs", "tab", list));
@@ -2279,10 +2279,10 @@ void KDockManager::writeConfig(QDomElement &base)
}
}
- groupEl.appendChild(createStringEntry(doc, "name", QString::fromLatin1(obj->name())));
+ groupEl.appendChild(createStringEntry(doc, "name", TQString::fromLatin1(obj->name())));
groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->parent()));
if ( !obj->parent() ) {
- groupEl.appendChild(createRectEntry(doc, "geometry", QRect(main->frameGeometry().topLeft(), main->size())));
+ groupEl.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size())));
groupEl.appendChild(createBoolEntry(doc, "visible", obj->isVisible()));
}
if (obj->header && obj->header->inherits("KDockWidgetHeader")) {
@@ -2298,19 +2298,19 @@ void KDockManager::writeConfig(QDomElement &base)
if (main->inherits("KDockMainWindow")) {
KDockMainWindow *dmain = (KDockMainWindow*)main;
- QString centralWidgetStr = QString(dmain->centralWidget()? dmain->centralWidget()->name() : "");
+ TQString centralWidgetStr = TQString(dmain->centralWidget()? dmain->centralWidget()->name() : "");
base.appendChild(createStringEntry(doc, "centralWidget", centralWidgetStr));
- QString mainDockWidgetStr = QString(dmain->getMainDockWidget()? dmain->getMainDockWidget()->name() : "");
+ TQString mainDockWidgetStr = TQString(dmain->getMainDockWidget()? dmain->getMainDockWidget()->name() : "");
base.appendChild(createStringEntry(doc, "mainDockWidget", mainDockWidgetStr));
} else {
base.appendChild(createStringEntry(doc, "mainWidget", mainWidgetStr));
}
- base.appendChild(createRectEntry(doc, "geometry", QRect(main->frameGeometry().topLeft(), main->size())));
+ base.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size())));
}
-void KDockManager::readConfig(QDomElement &base)
+void KDockManager::readConfig(TQDomElement &base)
{
if (base.namedItem("group").isNull()
&& base.namedItem("tabgroup").isNull()
@@ -2320,13 +2320,13 @@ void KDockManager::readConfig(QDomElement &base)
return;
}
- autoCreateDock = new QObjectList();
+ autoCreateDock = new TQObjectList();
autoCreateDock->setAutoDelete( true );
bool isMainVisible = main->isVisible();
main->hide();
- QObjectListIt it(*childDock);
+ TQObjectListIt it(*childDock);
KDockWidget *obj1;
while ( (obj1=(KDockWidget*)it.current()) ) {
if ( !obj1->isGroup && !obj1->isTabGroup ) {
@@ -2339,9 +2339,9 @@ void KDockManager::readConfig(QDomElement &base)
}
// firstly, recreate all common dockwidgets
- for( QDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement childEl = n.toElement();
+ TQDomElement childEl = n.toElement();
if (childEl.tagName() != "dock") continue;
// Read an ordinary dock widget
@@ -2350,12 +2350,12 @@ void KDockManager::readConfig(QDomElement &base)
obj->setToolTipString(stringEntry(childEl, "tabToolTip"));
if (!boolEntry(childEl, "hasParent")) {
- QRect r = rectEntry(childEl, "geometry");
+ TQRect r = rectEntry(childEl, "geometry");
obj = getDockWidgetFromName(stringEntry(childEl, "name"));
obj->applyToWidget(0);
obj->setGeometry(r);
if (boolEntry(childEl, "visible"))
- obj->QWidget::show();
+ obj->TQWidget::show();
}
if (obj && obj->header && obj->header->inherits("KDockWidgetHeader")) {
@@ -2365,9 +2365,9 @@ void KDockManager::readConfig(QDomElement &base)
}
// secondly, now iterate again and create the groups and tabwidgets, apply the dockwidgets to them
- for( QDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement childEl = n.toElement();
+ TQDomElement childEl = n.toElement();
if (childEl.isNull()) continue;
KDockWidget *obj = 0;
@@ -2391,9 +2391,9 @@ void KDockManager::readConfig(QDomElement &base)
else
if (childEl.tagName() == "splitGroup") {
// Read a group
- QString name = stringEntry(childEl, "name");
- QString firstName = stringEntry(childEl, "firstName");
- QString secondName = stringEntry(childEl, "secondName");
+ TQString name = stringEntry(childEl, "name");
+ TQString firstName = stringEntry(childEl, "firstName");
+ TQString secondName = stringEntry(childEl, "secondName");
int orientation = numberEntry(childEl, "orientation");
int separatorPos = numberEntry(childEl, "separatorPos");
@@ -2408,8 +2408,8 @@ void KDockManager::readConfig(QDomElement &base)
}
} else if (childEl.tagName() == "tabGroup") {
// Read a tab group
- QString name = stringEntry(childEl, "name");
- QStrList list = listEntry(childEl, "tabs", "tab");
+ TQString name = stringEntry(childEl, "name");
+ TQStrList list = listEntry(childEl, "tabs", "tab");
KDockWidget *d1 = getDockWidgetFromName( list.first() );
list.next();
@@ -2434,12 +2434,12 @@ void KDockManager::readConfig(QDomElement &base)
}
if (!boolEntry(childEl, "hasParent")) {
- QRect r = rectEntry(childEl, "geometry");
+ TQRect r = rectEntry(childEl, "geometry");
obj = getDockWidgetFromName(stringEntry(childEl, "name"));
obj->applyToWidget(0);
obj->setGeometry(r);
if (boolEntry(childEl, "visible"))
- obj->QWidget::show();
+ obj->TQWidget::show();
}
if (obj && obj->header && obj->header->inherits("KDockWidgetHeader")) {
@@ -2450,9 +2450,9 @@ void KDockManager::readConfig(QDomElement &base)
// thirdly, now that all ordinary dockwidgets are created,
// iterate them again and link them with their corresponding dockwidget for the dockback action
- for( QDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement childEl = n.toElement();
+ TQDomElement childEl = n.toElement();
if (childEl.tagName() != "dock" && childEl.tagName() != "tabGroup")
continue;
@@ -2462,7 +2462,7 @@ void KDockManager::readConfig(QDomElement &base)
if (!boolEntry(childEl, "hasParent")) {
// Read a common toplevel dock widget
obj = getDockWidgetFromName(stringEntry(childEl, "name"));
- QString name = stringEntry(childEl, "dockBackTo");
+ TQString name = stringEntry(childEl, "dockBackTo");
if (!name.isEmpty()) {
obj->setFormerBrotherDockWidget(getDockWidgetFromName(name));
}
@@ -2474,20 +2474,20 @@ void KDockManager::readConfig(QDomElement &base)
if (main->inherits("KDockMainWindow")) {
KDockMainWindow *dmain = (KDockMainWindow*)main;
- QString mv = stringEntry(base, "centralWidget");
+ TQString mv = stringEntry(base, "centralWidget");
if (!mv.isEmpty() && getDockWidgetFromName(mv) ) {
KDockWidget *mvd = getDockWidgetFromName(mv);
mvd->applyToWidget(dmain);
mvd->show();
dmain->setCentralWidget(mvd);
}
- QString md = stringEntry(base, "mainDockWidget");
+ TQString md = stringEntry(base, "mainDockWidget");
if (!md.isEmpty() && getDockWidgetFromName(md)) {
KDockWidget *mvd = getDockWidgetFromName(md);
dmain->setMainDockWidget(mvd);
}
} else {
- QString mv = stringEntry(base, "mainWidget");
+ TQString mv = stringEntry(base, "mainWidget");
if (!mv.isEmpty() && getDockWidgetFromName(mv)) {
KDockWidget *mvd = getDockWidgetFromName(mv);
mvd->applyToWidget(main);
@@ -2495,7 +2495,7 @@ void KDockManager::readConfig(QDomElement &base)
}
// only resize + move non-mainwindows
- QRect mr = rectEntry(base, "geometry");
+ TQRect mr = rectEntry(base, "geometry");
main->move(mr.topLeft());
main->resize(mr.size());
}
@@ -2528,7 +2528,7 @@ void KDockManager::setReadDockConfigMode(int mode)
}
#ifndef NO_KDE2
-void KDockManager::writeConfig( KConfig* c, QString group )
+void KDockManager::writeConfig( KConfig* c, TQString group )
{
//debug("BEGIN Write Config");
if ( !c ) c = KGlobal::config();
@@ -2537,13 +2537,13 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->setGroup( group );
c->writeEntry( "Version", DOCK_CONFIG_VERSION );
- QStringList nameList;
- QStringList findList;
- QObjectListIt it( *childDock );
+ TQStringList nameList;
+ TQStringList findList;
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
// collect KDockWidget's name
- QStringList nList;
+ TQStringList nList;
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
//debug(" +Add subdock %s", obj->name());
@@ -2552,21 +2552,21 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( "Main:view", obj->name() );
}
-// kdDebug(282)<<QString("list size: %1").arg(nList.count())<<endl;
- for (QObjectListIt it(d->containerDocks);it.current();++it)
+// kdDebug(282)<<TQString("list size: %1").arg(nList.count())<<endl;
+ for (TQObjectListIt it(d->containerDocks);it.current();++it)
{
KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget);
if (dc) {
dc->prepareSave(nList);
}
}
-// kdDebug(282)<<QString("new list size: %1").arg(nList.count())<<endl;
+// kdDebug(282)<<TQString("new list size: %1").arg(nList.count())<<endl;
- QStringList::Iterator nListIt=nList.begin();
+ TQStringList::Iterator nListIt=nList.begin();
while ( nListIt!=nList.end() ){
//debug(" -Try to save %s", nList.current());
obj = getDockWidgetFromName( *nListIt );
- QString cname = obj->name();
+ TQString cname = obj->name();
if ( obj->header ){
obj->header->saveConfig( c );
}
@@ -2583,7 +2583,7 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( cname+":type", "GROUP");
if ( !obj->parent() ){
c->writeEntry( cname+":parent", "___null___");
- c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
} else {
c->writeEntry( cname+":parent", "yes");
@@ -2615,14 +2615,14 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( cname+":type", "TAB_GROUP");
if ( !obj->parent() ){
c->writeEntry( cname+":parent", "___null___");
- c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
c->writeEntry( cname+":dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : "");
c->writeEntry( cname+":dockBackToPos", obj->formerDockPos);
} else {
c->writeEntry( cname+":parent", "yes");
}
- QStrList list;
+ TQStrList list;
for ( int i = 0; i < ((KDockTabGroup*)obj->widget)->count(); ++i )
list.append( ((KDockTabGroup*)obj->widget)->page( i )->name() );
c->writeEntry( cname+":tabNames", list );
@@ -2639,7 +2639,7 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( cname+":tabToolTip", obj->toolTipString());
if ( !obj->parent() ){
c->writeEntry( cname+":type", "NULL_DOCK");
- c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
c->writeEntry( cname+":dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : "");
c->writeEntry( cname+":dockBackToPos", obj->formerDockPos);
@@ -2656,7 +2656,7 @@ void KDockManager::writeConfig( KConfig* c, QString group )
}
c->writeEntry( "NameList", nameList );
- c->writeEntry( "Main:Geometry", QRect(main->frameGeometry().topLeft(), main->size()) );
+ c->writeEntry( "Main:Geometry", TQRect(main->frameGeometry().topLeft(), main->size()) );
c->writeEntry( "Main:visible", main->isVisible()); // curently nou use
if ( main->inherits("KDockMainWindow") ){
@@ -2669,31 +2669,31 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->sync();
//debug("END Write Config");
}
-#include <qmessagebox.h>
-void KDockManager::readConfig( KConfig* c, QString group )
+#include <tqmessagebox.h>
+void KDockManager::readConfig( KConfig* c, TQString group )
{
if ( !c ) c = KGlobal::config();
if ( group.isEmpty() ) group = "dock_setting_default";
c->setGroup( group );
- QStrList nameList;
+ TQStrList nameList;
c->readListEntry( "NameList", nameList );
- QString ver = c->readEntry( "Version", "0.0.1" );
+ TQString ver = c->readEntry( "Version", "0.0.1" );
nameList.first();
if ( !nameList.current() || ver != DOCK_CONFIG_VERSION ){
activate();
return;
}
- autoCreateDock = new QObjectList();
+ autoCreateDock = new TQObjectList();
autoCreateDock->setAutoDelete( true );
bool isMainVisible = main->isVisible();
// if (isMainVisible) // CCC
- //QMessageBox::information(0,"","hallo");
+ //TQMessageBox::information(0,"","hallo");
//COMMENTED4TESTING main->hide();
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ){
@@ -2708,13 +2708,13 @@ void KDockManager::readConfig( KConfig* c, QString group )
// they must be restored before e.g. tabgroups are restored
nameList.first();
while ( nameList.current() ){
- QString oname = nameList.current();
+ TQString oname = nameList.current();
c->setGroup( group );
- QString type = c->readEntry( oname + ":type" );
+ TQString type = c->readEntry( oname + ":type" );
obj = 0L;
if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
- QRect r = c->readRectEntry( oname + ":geometry" );
+ TQRect r = c->readRectEntry( oname + ":geometry" );
obj = getDockWidgetFromName( oname );
obj->applyToWidget( 0L );
obj->setGeometry(r);
@@ -2723,7 +2723,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
obj->setTabPageLabel(c->readEntry( oname + ":tabCaption" ));
obj->setToolTipString(c->readEntry( oname + ":tabToolTip" ));
if ( c->readBoolEntry( oname + ":visible" ) ){
- obj->QWidget::show();
+ obj->TQWidget::show();
}
}
@@ -2746,9 +2746,9 @@ void KDockManager::readConfig( KConfig* c, QString group )
// secondly, after the common dockwidgets, restore the groups and tabgroups
nameList.first();
while ( nameList.current() ){
- QString oname = nameList.current();
+ TQString oname = nameList.current();
c->setGroup( group );
- QString type = c->readEntry( oname + ":type" );
+ TQString type = c->readEntry( oname + ":type" );
obj = 0L;
if ( type == "GROUP" ){
@@ -2766,7 +2766,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
}
if ( type == "TAB_GROUP" ){
- QStrList list;
+ TQStrList list;
KDockWidget* tabDockGroup = 0L;
c->readListEntry( oname+":tabNames", list );
KDockWidget* d1 = getDockWidgetFromName( list.first() );
@@ -2802,15 +2802,15 @@ void KDockManager::readConfig( KConfig* c, QString group )
// iterate them again and link the toplevel ones of them with their corresponding dockwidget for the dockback action
nameList.first();
while ( nameList.current() ){
- QString oname = nameList.current();
+ TQString oname = nameList.current();
c->setGroup( group );
- QString type = c->readEntry( oname + ":type" );
+ TQString type = c->readEntry( oname + ":type" );
obj = 0L;
if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
obj = getDockWidgetFromName( oname );
c->setGroup( group );
- QString name = c->readEntry( oname + ":dockBackTo" );
+ TQString name = c->readEntry( oname + ":dockBackTo" );
if (!name.isEmpty()) {
obj->setFormerBrotherDockWidget(getDockWidgetFromName( name ));
}
@@ -2824,7 +2824,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
KDockMainWindow* dmain = (KDockMainWindow*)main;
c->setGroup( group );
- QString mv = c->readEntry( "Main:view" );
+ TQString mv = c->readEntry( "Main:view" );
if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){
KDockWidget* mvd = getDockWidgetFromName( mv );
mvd->applyToWidget( dmain );
@@ -2832,14 +2832,14 @@ void KDockManager::readConfig( KConfig* c, QString group )
dmain->setView( mvd );
}
c->setGroup( group );
- QString md = c->readEntry( "Main:dock" );
+ TQString md = c->readEntry( "Main:dock" );
if ( !md.isEmpty() && getDockWidgetFromName( md ) ){
KDockWidget* mvd = getDockWidgetFromName( md );
dmain->setMainDockWidget( mvd );
}
} else {
c->setGroup( group );
- QString mv = c->readEntry( "Main:view" );
+ TQString mv = c->readEntry( "Main:view" );
if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){
KDockWidget* mvd = getDockWidgetFromName( mv );
mvd->applyToWidget( main );
@@ -2855,7 +2855,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
c->setGroup( group );
- QRect mr = c->readRectEntry("Main:Geometry");
+ TQRect mr = c->readRectEntry("Main:Geometry");
if (!main->inherits("KDockMainWindow"))
main->move(mr.topLeft());
@@ -2868,7 +2868,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
void KDockManager::dumpDockWidgets() {
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
@@ -2877,19 +2877,19 @@ void KDockManager::dumpDockWidgets() {
}
-KDockWidget* KDockManager::getDockWidgetFromName( const QString& dockName )
+KDockWidget* KDockManager::getDockWidgetFromName( const TQString& dockName )
{
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
- if ( QString(obj->name()) == dockName ) return obj;
+ if ( TQString(obj->name()) == dockName ) return obj;
}
KDockWidget* autoCreate = 0L;
if ( autoCreateDock ){
kdDebug(282)<<"Autocreating dock: "<<dockName<<endl;
- autoCreate = new KDockWidget( this, dockName.latin1(), QPixmap("") );
+ autoCreate = new KDockWidget( this, dockName.latin1(), TQPixmap("") );
autoCreateDock->append( autoCreate );
}
return autoCreate;
@@ -2929,20 +2929,20 @@ void KDockManager::slotMenuPopup()
menu->clear();
menuData->clear();
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
int numerator = 0;
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
if ( obj->mayBeHide() )
{
- menu->insertItem( obj->icon() ? *(obj->icon()) : QPixmap(), i18n("Hide %1").arg(obj->caption()), numerator++ );
+ menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), i18n("Hide %1").arg(obj->caption()), numerator++ );
menuData->append( new MenuDockData( obj, true ) );
}
if ( obj->mayBeShow() )
{
- menu->insertItem( obj->icon() ? *(obj->icon()) : QPixmap(), i18n("Show %1").arg(obj->caption()), numerator++ );
+ menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), i18n("Show %1").arg(obj->caption()), numerator++ );
menuData->append( new MenuDockData( obj, false ) );
}
}
@@ -2954,9 +2954,9 @@ void KDockManager::slotMenuActivated( int id )
data->dock->changeHideShowState();
}
-KDockWidget* KDockManager::findWidgetParentDock( QWidget* w ) const
+KDockWidget* KDockManager::findWidgetParentDock( TQWidget* w ) const
{
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * dock;
KDockWidget * found = 0L;
@@ -2976,7 +2976,7 @@ void KDockManager::drawDragRectangle()
return;
int i;
- QRect oldAndNewDragRect[2];
+ TQRect oldAndNewDragRect[2];
oldAndNewDragRect[0] = d->oldDragRect;
oldAndNewDragRect[1] = d->dragRect;
@@ -2985,7 +2985,7 @@ void KDockManager::drawDragRectangle()
if (oldAndNewDragRect[i].isEmpty())
continue;
- KDockWidget* pDockWdgAtRect = (KDockWidget*) QApplication::widgetAt( oldAndNewDragRect[i].topLeft(), true );
+ KDockWidget* pDockWdgAtRect = (KDockWidget*) TQApplication::widgetAt( oldAndNewDragRect[i].topLeft(), true );
if (!pDockWdgAtRect)
continue;
@@ -2993,7 +2993,7 @@ void KDockManager::drawDragRectangle()
bool unclipped;
KDockMainWindow* pMain = 0L;
KDockWidget* pTLDockWdg = 0L;
- QWidget* topWdg;
+ TQWidget* topWdg;
if (pDockWdgAtRect->topLevelWidget() == main) {
isOverMainWdg = true;
topWdg = pMain = (KDockMainWindow*) main;
@@ -3007,7 +3007,7 @@ void KDockManager::drawDragRectangle()
}
// draw the rectangle unclipped over the main dock window
- QPainter p;
+ TQPainter p;
p.begin( topWdg );
if ( !unclipped ) {
if (isOverMainWdg)
@@ -3017,8 +3017,8 @@ void KDockManager::drawDragRectangle()
}
// draw the rectangle
p.setRasterOp(Qt::NotXorROP);
- QRect r = oldAndNewDragRect[i];
- r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(QPoint(0,0)) );
+ TQRect r = oldAndNewDragRect[i];
+ r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(TQPoint(0,0)) );
p.drawRect(r.x(), r.y(), r.width(), r.height());
p.end();
}
@@ -3045,10 +3045,10 @@ void KDockManager::setSpecialBottomDockContainer(KDockWidget* container) {
}
-KDockArea::KDockArea( QWidget* parent, const char *name)
-:QWidget( parent, name)
+KDockArea::KDockArea( TQWidget* parent, const char *name)
+:TQWidget( parent, name)
{
- QString new_name = QString(name) + QString("_DockManager");
+ TQString new_name = TQString(name) + TQString("_DockManager");
dockManager = new KDockManager( this, new_name.latin1() );
mainDockWidget = 0L;
}
@@ -3058,7 +3058,7 @@ KDockArea::~KDockArea()
delete dockManager;
}
-KDockWidget* KDockArea::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel)
+KDockWidget* KDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel)
{
return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
}
@@ -3075,44 +3075,44 @@ void KDockArea::makeDockInvisible( KDockWidget* dock )
dock->undock();
}
-void KDockArea::makeWidgetDockVisible( QWidget* widget )
+void KDockArea::makeWidgetDockVisible( TQWidget* widget )
{
makeDockVisible( dockManager->findWidgetParentDock(widget) );
}
-void KDockArea::writeDockConfig(QDomElement &base)
+void KDockArea::writeDockConfig(TQDomElement &base)
{
dockManager->writeConfig(base);
}
-void KDockArea::readDockConfig(QDomElement &base)
+void KDockArea::readDockConfig(TQDomElement &base)
{
dockManager->readConfig(base);
}
void KDockArea::slotDockWidgetUndocked()
{
- QObject* pSender = (QObject*) sender();
+ TQObject* pSender = (TQObject*) sender();
if (!pSender->inherits("KDockWidget")) return;
KDockWidget* pDW = (KDockWidget*) pSender;
emit dockWidgetHasUndocked( pDW);
}
-void KDockArea::resizeEvent(QResizeEvent *rsize)
+void KDockArea::resizeEvent(TQResizeEvent *rsize)
{
- QWidget::resizeEvent(rsize);
+ TQWidget::resizeEvent(rsize);
if (children()){
#ifndef NO_KDE2
// kdDebug(282)<<"KDockArea::resize"<<endl;
#endif
- QObjectList *list=queryList("QWidget",0,false);
+ TQObjectList *list=queryList("TQWidget",0,false);
- QObjectListIt it( *list ); // iterate over the buttons
- QObject *obj;
+ TQObjectListIt it( *list ); // iterate over the buttons
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
// for each found object...
- ((QWidget*)obj)->setGeometry(QRect(QPoint(0,0),size()));
+ ((TQWidget*)obj)->setGeometry(TQRect(TQPoint(0,0),size()));
break;
}
delete list;
@@ -3120,12 +3120,12 @@ void KDockArea::resizeEvent(QResizeEvent *rsize)
KDockSplitter *split;
// for (unsigned int i=0;i<children()->count();i++)
{
-// QPtrList<QObject> list(children());
-// QObject *obj=((QPtrList<QObject*>)children())->at(i);
- QObject *obj=children()->getFirst();
+// TQPtrList<TQObject> list(children());
+// TQObject *obj=((TQPtrList<TQObject*>)children())->at(i);
+ TQObject *obj=children()->getFirst();
if (split = dynamic_cast<KDockSplitter*>(obj))
{
- split->setGeometry( QRect(QPoint(0,0), size() ));
+ split->setGeometry( TQRect(TQPoint(0,0), size() ));
// break;
}
}
@@ -3134,12 +3134,12 @@ void KDockArea::resizeEvent(QResizeEvent *rsize)
}
#ifndef NO_KDE2
-void KDockArea::writeDockConfig( KConfig* c, QString group )
+void KDockArea::writeDockConfig( KConfig* c, TQString group )
{
dockManager->writeConfig( c, group );
}
-void KDockArea::readDockConfig( KConfig* c, QString group )
+void KDockArea::readDockConfig( KConfig* c, TQString group )
{
dockManager->readConfig( c, group );
}
@@ -3203,17 +3203,17 @@ bool KDockContainer::isOverlapMode() {
}
-bool KDockContainer::dockDragEnter(KDockWidget*, QMouseEvent *) { return false;}
-bool KDockContainer::dockDragMove(KDockWidget*, QMouseEvent *) { return false;}
-bool KDockContainer::dockDragLeave(KDockWidget*, QMouseEvent *) { return false;}
+bool KDockContainer::dockDragEnter(KDockWidget*, TQMouseEvent *) { return false;}
+bool KDockContainer::dockDragMove(KDockWidget*, TQMouseEvent *) { return false;}
+bool KDockContainer::dockDragLeave(KDockWidget*, TQMouseEvent *) { return false;}
KDockWidget *KDockContainer::parentDockWidget(){return 0;}
-QStringList KDockContainer::containedWidgets() const {
- QStringList tmp;
+TQStringList KDockContainer::containedWidgets() const {
+ TQStringList tmp;
for (struct ListItem *it=m_childrenListBegin;it;it=it->next) {
- tmp<<QString(it->data);
+ tmp<<TQString(it->data);
}
return tmp;
@@ -3222,7 +3222,7 @@ QStringList KDockContainer::containedWidgets() const {
void KDockContainer::showWidget(KDockWidget *) {
}
-void KDockContainer::insertWidget (KDockWidget *dw, QPixmap, const QString &, int &)
+void KDockContainer::insertWidget (KDockWidget *dw, TQPixmap, const TQString &, int &)
{
struct ListItem *it=new struct ListItem;
it->data=strdup(dw->name());
@@ -3259,13 +3259,13 @@ void KDockContainer::removeWidget (KDockWidget *dw){
//m_children.remove(dw->name());}
void KDockContainer::undockWidget (KDockWidget *){;}
-void KDockContainer::setToolTip(KDockWidget *, QString &){;}
-void KDockContainer::setPixmap(KDockWidget*,const QPixmap&){;}
-void KDockContainer::load (KConfig*, const QString&){;}
-void KDockContainer::save (KConfig*, const QString&){;}
-void KDockContainer::load (QDomElement&){;}
-void KDockContainer::save (QDomElement&){;}
-void KDockContainer::prepareSave(QStringList &names)
+void KDockContainer::setToolTip(KDockWidget *, TQString &){;}
+void KDockContainer::setPixmap(KDockWidget*,const TQPixmap&){;}
+void KDockContainer::load (KConfig*, const TQString&){;}
+void KDockContainer::save (KConfig*, const TQString&){;}
+void KDockContainer::load (TQDomElement&){;}
+void KDockContainer::save (TQDomElement&){;}
+void KDockContainer::prepareSave(TQStringList &names)
{
for (struct ListItem *tmp=m_childrenListBegin;tmp; tmp=tmp->next)
@@ -3277,11 +3277,11 @@ void KDockContainer::prepareSave(QStringList &names)
}
-QWidget *KDockTabGroup::transientTo() {
- QWidget *tT=0;
+TQWidget *KDockTabGroup::transientTo() {
+ TQWidget *tT=0;
for (int i=0;i<count();i++) {
KDockWidget *dw=static_cast<KDockWidget*>(page(i)->qt_cast("KDockWidget"));
- QWidget *tmp;
+ TQWidget *tmp;
if ((tmp=dw->transientTo())) {
if (!tT) tT=tmp;
else {
diff --git a/kdeui/kdockwidget.h b/kdeui/kdockwidget.h
index b43d9b88a..ad0e28a89 100644
--- a/kdeui/kdockwidget.h
+++ b/kdeui/kdockwidget.h
@@ -48,18 +48,18 @@
#define _KDOCKWIDGET_2_2_
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qframe.h>
-#include <qdom.h>
-#include <qtabwidget.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqframe.h>
+#include <tqdom.h>
+#include <tqtabwidget.h>
#ifndef NO_KDE2
#include <kmainwindow.h>
#include <netwm_def.h>
#else
-#include <qmainwindow.h>
+#include <tqmainwindow.h>
#include "exportdockclass.h"
#include "dummykmainwindow.h"
#endif
@@ -219,7 +219,7 @@ protected:
/**
* Draws the drag panel (a double line)
*/
- virtual void paintEvent( QPaintEvent* );
+ virtual void paintEvent( TQPaintEvent* );
protected:
virtual void virtual_hook( int id, void* data );
@@ -324,7 +324,7 @@ protected:
/**
* A layout manager for placing the embedded buttons (close and stay)
*/
- QHBoxLayout* layout;
+ TQHBoxLayout* layout;
/**
* a little button for closing (undocking and hiding) the dockwidget
@@ -355,7 +355,7 @@ private:
/**
* It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget class set).
* An abstraction what it is currently.
- * In general it is like QTabWidget but is more useful for the dockwidget class set.
+ * In general it is like TQTabWidget but is more useful for the dockwidget class set.
* More or less a minor helper class for the dockwidget class set.
*
* @author Max Judin (documentation: Falk Brettschneider).
@@ -367,15 +367,15 @@ public:
/**
* Constructs this. It just calls the method of the base class.
*/
- KDockTabGroup( QWidget *parent = 0, const char *name = 0 )
- :QTabWidget( parent, name ){}
+ KDockTabGroup( TQWidget *parent = 0, const char *name = 0 )
+ :TQTabWidget( parent, name ){}
/**
* Destructs a KDockTabGroup.
*/
virtual ~KDockTabGroup(){}
- QWidget *transientTo();
+ TQWidget *transientTo();
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -409,7 +409,7 @@ private:
* ...
* KDockWidget* dock = 0L;
* dock = mainWidget->createDockWidget( "Any window caption", nicePixmap, 0L, i18n("window caption")); // 0L==no parent
- * QWidget* actualWidget = new QWidget( dock);
+ * TQWidget* actualWidget = new TQWidget( dock);
* dock->setWidget( actualWidget); // embed it
* dock->setToolTipString(i18n("That's me")); // available when appearing as tab page
* ...
@@ -445,8 +445,8 @@ public:
* @param f Qt::WidgetFlags widget flags
*/
KDockWidget( KDockManager* dockManager, const char* name,
- const QPixmap &pixmap, QWidget* parent = 0L, const QString& strCaption = QString::null,
- const QString& strTabPageLabel = QString::fromLatin1( " " ), WFlags f = 0);
+ const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = TQString::null,
+ const TQString& strTabPageLabel = TQString::fromLatin1( " " ), WFlags f = 0);
/**
* Destructs a dockwidget.
@@ -495,7 +495,7 @@ public:
* 0 and 100. Example: If the value was 4000, it will be fixed to 40. In short: The old and
* the new behavior both work, so it is compatible with older KDE-versions.
*/
- KDockWidget* manualDock( KDockWidget* target, DockPosition dockPos, int spliPos = 50, QPoint pos = QPoint(0,0), bool check = false, int tabIndex = -1);
+ KDockWidget* manualDock( KDockWidget* target, DockPosition dockPos, int spliPos = 50, TQPoint pos = TQPoint(0,0), bool check = false, int tabIndex = -1);
/**
* Specify where it is either possible or impossible for this to dock to another dockwidget.
@@ -524,23 +524,23 @@ public:
/**
* Sets the embedded widget.
*
- * A QLayout takes care about proper resizing, automatically.
+ * A TQLayout takes care about proper resizing, automatically.
*
* @param w The pointer to the dockwidget's child widget.
*/
- void setWidget( QWidget* w);
+ void setWidget( TQWidget* w);
/**
* Get the embedded widget.
*
* @return The pointer to the dockwidget's child widget, 0L if there's no such child.
*/
- QWidget* getWidget() const { return widget; }
+ TQWidget* getWidget() const { return widget; }
/**
* Sets the header of this dockwidget.
*
- * A QLayout takes care about proper resizing, automatically.
+ * A TQLayout takes care about proper resizing, automatically.
* The header contains the drag panel, the close button and the stay button.
*
* @param ah A base class pointer to the dockwidget header
@@ -594,12 +594,12 @@ public:
*
* @param ttStr A string for the tooltip on the tab.
*/
- void setToolTipString(const QString& ttStr) { toolTipStr = ttStr; }
+ void setToolTipString(const TQString& ttStr) { toolTipStr = ttStr; }
/**
* @return The tooltip string being shown on the appropriate tab page header when in dock-centered mode.
*/
- const QString& toolTipString() const { return toolTipStr; }
+ const TQString& toolTipString() const { return toolTipStr; }
/**
* @return result @p true, if a dockback is possible, otherwise @p false.
@@ -610,20 +610,20 @@ public:
* Sets a string that is used for the label of the tab page when in tab page mode
* @param label The new tab page label.
*/
- void setTabPageLabel( const QString& label) { tabPageTitle = label; }
+ void setTabPageLabel( const TQString& label) { tabPageTitle = label; }
/**
* @return A string that is used for the label of the tab page when in tab page mode.
*/
- const QString& tabPageLabel() const { return tabPageTitle; }
+ const TQString& tabPageLabel() const { return tabPageTitle; }
/**
- * Catches and processes some QWidget events that are interesting for dockwidgets.
+ * Catches and processes some TQWidget events that are interesting for dockwidgets.
*/
- virtual bool event( QEvent * );
+ virtual bool event( TQEvent * );
/**
- * Add dockwidget management actions to QWidget::show.
+ * Add dockwidget management actions to TQWidget::show.
*/
virtual void show();
/**
@@ -632,7 +632,7 @@ public:
KDockTabGroup* parentDockTabGroup() const;
/// @since 3.1
- QWidget *parentDockContainer() const;
+ TQWidget *parentDockContainer() const;
#ifndef NO_KDE2
@@ -645,13 +645,13 @@ public:
#endif
- void setDockWindowTransient (QWidget *parent, bool transientEnabled);
+ void setDockWindowTransient (TQWidget *parent, bool transientEnabled);
/**
* Returns the widget this dockwidget is set transient to, otherwise 0
* @since 3.2
*/
- QWidget *transientTo();
+ TQWidget *transientTo();
/**
* Lookup the nearest dockwidget docked left/right/top/bottom to this one or return 0
@@ -667,14 +667,14 @@ public:
* @param pixmap is the pixmap to set
* @since 3.2
*/
- void setPixmap(const QPixmap& pixmap=QPixmap());
+ void setPixmap(const TQPixmap& pixmap=TQPixmap());
/**
* Returns the dockwidget's associated caption/dock tab pixmap
*
* @since 3.2
*/
- const QPixmap& pixmap() const;
+ const TQPixmap& pixmap() const;
/**
* @return the current dock position.
@@ -742,9 +742,9 @@ protected:
void updateHeader();
/// @since 3.1
- void setLatestKDockContainer(QWidget *);
+ void setLatestKDockContainer(TQWidget *);
/// @since 3.1
- QWidget *latestKDockContainer();
+ TQWidget *latestKDockContainer();
/// @since 3.2
void setFormerBrotherDockWidget(KDockWidget *);
@@ -754,7 +754,7 @@ signals:
*@since 3.2
*is emitted after the setWidget method has finished
*/
- void widgetSet(QWidget*);
+ void widgetSet(TQWidget*);
/**
* Emitted when another dock widget is docking to this.
@@ -796,12 +796,12 @@ protected slots:
*/
void loseFormerBrotherDockWidget();
- virtual void paintEvent(QPaintEvent*);
+ virtual void paintEvent(TQPaintEvent*);
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void leaveEvent(QEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void leaveEvent(TQEvent*);
protected:
friend class KDockWidgetHeader;
/**
@@ -819,11 +819,11 @@ protected:
/**
* a string used as tooltip for the tab page header when in dock-centered mode.
*/
- QString toolTipStr;
+ TQString toolTipStr;
/**
* a string used as title of the tab page when in tab page mode
*/
- QString tabPageTitle;
+ TQString tabPageTitle;
private:
/**
@@ -840,7 +840,7 @@ private:
* @param s the target widget to reparent to
* @param p the point to move to (if it doesn't reparent)
*/
- void applyToWidget( QWidget* s, const QPoint& p = QPoint(0,0) );
+ void applyToWidget( TQWidget* s, const TQPoint& p = TQPoint(0,0) );
/**
* A base class pointer to the header of this dockwidget
@@ -850,12 +850,12 @@ private:
/**
* the embedded widget
*/
- QWidget* widget;
+ TQWidget* widget;
/**
* the layout manager that takes care about proper resizing and moving the embedded widget and the header
*/
- QVBoxLayout* layout;
+ TQVBoxLayout* layout;
/**
* the responsible dockmanager
@@ -865,7 +865,7 @@ private:
/**
* an icon for the tab widget header
*/
- QPixmap* pix;
+ TQPixmap* pix;
/**
* Information about the ability for docking to another dockwidget.
@@ -883,8 +883,8 @@ private:
KDockWidget::DockPosition prevSideDockPosBeforeDrag;
// GROUP data
- QString firstName;
- QString lastName;
+ TQString firstName;
+ TQString lastName;
Orientation splitterOrientation;
bool isGroup;
bool isTabGroup;
@@ -930,7 +930,7 @@ public:
* @param mainWindow the main window controlled by this
* @param name the internal QOject name
*/
- KDockManager( QWidget* mainWindow, const char* name = 0L );
+ KDockManager( TQWidget* mainWindow, const char* name = 0L );
/**
* Destructs a dockmanager.
@@ -949,14 +949,14 @@ public:
* @param c the KDE configuration saver
* @param group the name of the section in KConfig
*/
- void writeConfig( KConfig* c = 0L, QString group = QString::null );
+ void writeConfig( KConfig* c = 0L, TQString group = TQString::null );
/**
* Like writeConfig but reads the whole stuff in.
*
* In order to restore a window configuration
* from a config file, it looks up widgets by name
- * (QObject::name) in the childDock variable of
+ * (TQObject::name) in the childDock variable of
* KDockManager. This list in turn contains all
* KDockWidgets (according to the KDockWidget constructor).
* So in principle, in order to restore a window layout,
@@ -967,7 +967,7 @@ public:
* @param c the KDE configuration saver
* @param group the name of the section in KConfig
*/
- void readConfig ( KConfig* c = 0L, QString group = QString::null );
+ void readConfig ( KConfig* c = 0L, TQString group = TQString::null );
#endif
/// @since 3.1
@@ -976,11 +976,11 @@ public:
/**
* Saves the current dock window layout into a DOM tree below the given element.
*/
- void writeConfig(QDomElement &base);
+ void writeConfig(TQDomElement &base);
/**
* Reads the current dock window layout from a DOM tree below the given element.
*/
- void readConfig(QDomElement &base);
+ void readConfig(TQDomElement &base);
/**
* Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are
@@ -996,7 +996,7 @@ public:
* @param event the event
* @return the return value of the method call of the base class method
*/
- virtual bool eventFilter( QObject * object, QEvent * event );
+ virtual bool eventFilter( TQObject * object, TQEvent * event );
/**
* This method finds out what a widgets' dockwidget is. That means the dockmanager has a look at all
@@ -1005,25 +1005,25 @@ public:
* @param w any widget that is supposed to be encapsulated by one of the controlled dockwidgets
* @return the dockwidget that encapsulates that widget, otherwise 0
*/
- KDockWidget* findWidgetParentDock( QWidget* w) const;
+ KDockWidget* findWidgetParentDock( TQWidget* w) const;
/**
* Works like makeDockVisible() but can be called for widgets that covered by a dockwidget.
*
* @param w the widget that is encapsulated by a dockwidget that turns to visible.
*/
- void makeWidgetDockVisible( QWidget* w ){ findWidgetParentDock(w)->makeDockVisible(); }
+ void makeWidgetDockVisible( TQWidget* w ){ findWidgetParentDock(w)->makeDockVisible(); }
/**
* @return the popupmenu for showing/hiding dockwidgets
*/
- QPopupMenu* dockHideShowMenu() const { return menu; }
+ TQPopupMenu* dockHideShowMenu() const { return menu; }
/**
- * @param dockName an internal QObject name
- * @return the dockwidget that has got that internal QObject name
+ * @param dockName an internal TQObject name
+ * @return the dockwidget that has got that internal TQObject name
*/
- KDockWidget* getDockWidgetFromName( const QString& dockName );
+ KDockWidget* getDockWidgetFromName( const TQString& dockName );
/**
* Enables opaque resizing. Opaque resizing defaults to KGlobalSettings::opaqueResize().
@@ -1038,7 +1038,7 @@ public:
/**
* Try to preserve the widget's size. Works like KeepSize resize mode
- * of QSplitter. Off by default.
+ * of TQSplitter. Off by default.
* Call this method before you create any dock widgets!
*/
void setSplitterKeepSize(bool b=true);
@@ -1136,16 +1136,16 @@ private:
* @param pos global (desktop) position of the wanted dockwidget
* @return the dockwidget at that position
*/
- KDockWidget* findDockWidgetAt( const QPoint& pos );
+ KDockWidget* findDockWidgetAt( const TQPoint& pos );
/**
- * Finds the QWidget recursively at the position given as parameter
+ * Finds the TQWidget recursively at the position given as parameter
*
- * @param w a variable where the method puts the QWidget at that position (instead of a return value)
+ * @param w a variable where the method puts the TQWidget at that position (instead of a return value)
* @param p the parent widget where the recursive search should start from
* @param pos global (desktop) position of the wanted dockwidget
*/
- void findChildDockWidget( QWidget*& w, const QWidget* p, const QPoint& pos );
+ void findChildDockWidget( TQWidget*& w, const TQWidget* p, const TQPoint& pos );
/**
* Finds all dockwidgets which are child, grandchild and so on of p.
@@ -1153,7 +1153,7 @@ private:
* @param p the parent widget where the recursive search starts from
* @param l the widget list that contains the search result after the return of this method
*/
- void findChildDockWidget( const QWidget* p, QWidgetList*& l);
+ void findChildDockWidget( const TQWidget* p, TQWidgetList*& l);
/**
* Sets a dockwidget in drag mode.
@@ -1166,7 +1166,7 @@ private:
* @param d the dockwidget which is dragged
* @param pos the new position of the dragged dockwidget
*/
- void dragMove( KDockWidget* d, QPoint pos );
+ void dragMove( KDockWidget* d, TQPoint pos );
/**
* Aborts the drag mode. Restores the cursor and hides the drag indicator.
@@ -1184,7 +1184,7 @@ private:
/**
* Usually the KDockMainWindow but not necessarily.
*/
- QWidget* main;
+ TQWidget* main;
/**
* The dockwidget that is being dragged at the moment
@@ -1199,7 +1199,7 @@ private:
/**
* It is of interest during the dock process. Then it contains all child dockwidgets.
*/
- QWidgetList* childDockWidgetList;
+ TQWidgetList* childDockWidgetList;
/**
* The dockposition where the dockwidget would be docked to, if we dropped it here.
@@ -1210,12 +1210,12 @@ private:
* A QList of all objects that are important for docking.
* Some serve as group widgets of dockwidgets, others encapsulate normal widgets.
*/
- QObjectList* childDock;
+ TQObjectList* childDock;
/**
* Contains dockwidgets that are created automatically by the dockmanager. For internal use.
*/
- QObjectList* autoCreateDock;
+ TQObjectList* autoCreateDock;
/**
* For storing the width during the dragging of a dockwidget.
@@ -1247,12 +1247,12 @@ private:
* A popup menu that contains one menuitem for each dockwidget that shows the current visibility state and
* to show or hide the appropriate dockwidget.
*/
- QPopupMenu* menu;
+ TQPopupMenu* menu;
/**
* An internal list containing data for the menuitems for the visibility popup menu.
*/
- QPtrList<MenuDockData> *menuData;
+ TQPtrList<MenuDockData> *menuData;
protected:
virtual void virtual_hook( int id, void* data );
@@ -1324,7 +1324,7 @@ public:
* @param name internal object name
* @param f Qt::WidgetFlags widget flags
*/
- KDockMainWindow( QWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
+ KDockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
/**
* Destructs a dockmainwindow.
@@ -1357,24 +1357,24 @@ public:
* The KDockMainWindow creates a new dockwidget object here that usually should encapsulate the user's widget.
* The new dockwidget is automatically taken under control by the dockmanager of the dockmainwindow.
*
- * @param name QObject name (default dockwidget caption)
+ * @param name TQObject name (default dockwidget caption)
* @param pixmap window icon (for instance shown when docked as tabwidget entry)
* @param parent parent widget for the new dockwidget
* @param strCaption window title (shown when toplevel)
* @param strTabPageLabel title of the tab page (visible when in tab page mode), if it is "", only the icon will be shown; if it is 0L, the label is set to strCaption
* @return a pointer to the new created dockwidget
*/
- KDockWidget* createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent = 0L,
- const QString& strCaption = QString::null, const QString& strTabPageLabel = QString::fromLatin1( " " ) );
+ KDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L,
+ const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::fromLatin1( " " ) );
/**
* Saves the current dock window layout into a DOM tree below the given element.
*/
- void writeDockConfig(QDomElement &base);
+ void writeDockConfig(TQDomElement &base);
/**
* Reads the current dock window layout from a DOM tree below the given element.
*/
- void readDockConfig(QDomElement &base);
+ void readDockConfig(TQDomElement &base);
#ifndef NO_KDE2
/**
@@ -1383,7 +1383,7 @@ public:
* @param c KDE class for saving configurations
* @param group name of section to write to
*/
- void writeDockConfig( KConfig* c = 0L, QString group = QString::null );
+ void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null );
/**
* It reads the current dock state from the given section of KConfig.
@@ -1391,13 +1391,13 @@ public:
* @param c KDE class for saving configurations
* @param group name of section to read from
*/
- void readDockConfig ( KConfig* c = 0L, QString group = QString::null );
+ void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null );
#endif
/**
* It runs through all dockwidgets which are under control of the dockmanager and calls show() for every
* encapsulated widget and show() for the dockwidget itself if it is not in tab mode.
- * Additionally, if the main dockwidget is not a QDialog, it will be shown.
+ * Additionally, if the main dockwidget is not a TQDialog, it will be shown.
*/
void activateDock(){ dockManager->activate(); }
@@ -1407,7 +1407,7 @@ public:
*
* @return the wanted popup menu
*/
- QPopupMenu* dockHideShowMenu() const { return dockManager->dockHideShowMenu(); }
+ TQPopupMenu* dockHideShowMenu() const { return dockManager->dockHideShowMenu(); }
/**
* This method shows the given dockwidget.
@@ -1429,7 +1429,7 @@ public:
* This is an overloaded member function, provided for convenience.
* It differs from the above function only in what argument(s) it accepts.
*/
- void makeWidgetDockVisible( QWidget* widget );
+ void makeWidgetDockVisible( TQWidget* widget );
/**
* This method calls the base class method.
@@ -1437,7 +1437,7 @@ public:
*
* @param widget any widget that should become the main view
*/
- void setView( QWidget * widget );
+ void setView( TQWidget * widget );
signals:
/**
@@ -1479,7 +1479,7 @@ friend class KDockManager;
public:
- KDockArea( QWidget* parent = 0L, const char *name = 0L);
+ KDockArea( TQWidget* parent = 0L, const char *name = 0L);
virtual ~KDockArea();
@@ -1489,25 +1489,25 @@ public:
void setMainDockWidget( KDockWidget* );
KDockWidget* getMainDockWidget(){ return mainDockWidget; }
- KDockWidget* createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent = 0L,
- const QString& strCaption = QString::null, const QString& strTabPageLabel = QString::fromLatin1( " " ) );
+ KDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L,
+ const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::fromLatin1( " " ) );
- void writeDockConfig(QDomElement &base);
- void readDockConfig(QDomElement &base);
+ void writeDockConfig(TQDomElement &base);
+ void readDockConfig(TQDomElement &base);
#ifndef NO_KDE2
- void writeDockConfig( KConfig* c = 0L, QString group = QString::null );
- void readDockConfig ( KConfig* c = 0L, QString group = QString::null );
+ void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null );
+ void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null );
#endif
void activateDock(){ dockManager->activate(); }
- QPopupMenu* dockHideShowMenu(){ return dockManager->dockHideShowMenu(); }
+ TQPopupMenu* dockHideShowMenu(){ return dockManager->dockHideShowMenu(); }
void makeDockVisible( KDockWidget* dock );
void makeDockInvisible( KDockWidget* dock );
- void makeWidgetDockVisible( QWidget* widget );
- //void setView( QWidget* );
+ void makeWidgetDockVisible( TQWidget* widget );
+ //void setView( TQWidget* );
signals:
/**
@@ -1524,7 +1524,7 @@ protected slots:
void slotDockWidgetUndocked();
public:
- virtual void resizeEvent(QResizeEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kdockwidget_p.h b/kdeui/kdockwidget_p.h
index 7c14394eb..98af140ff 100644
--- a/kdeui/kdockwidget_p.h
+++ b/kdeui/kdockwidget_p.h
@@ -37,7 +37,7 @@ COMPATIBLE. THIS HEADER IS ONLY INSTALLED, BECAUSE IT IS NEEDED IN
#define KDOCKWIDGET_P_H
#include <kdockwidget.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
// Add some describing comment !!
class KDEUI_EXPORT KDockContainer
@@ -46,24 +46,24 @@ public:
KDockContainer();
virtual ~KDockContainer();
virtual KDockWidget *parentDockWidget();
- virtual void insertWidget (KDockWidget *, QPixmap, const QString &, int &);
+ virtual void insertWidget (KDockWidget *, TQPixmap, const TQString &, int &);
virtual void showWidget(KDockWidget *);
virtual void removeWidget(KDockWidget*);
virtual void undockWidget(KDockWidget*);
- virtual void save(KConfig *cfg,const QString& group_or_prefix);
- virtual void save(QDomElement& dockElement);
- virtual void load(KConfig *cfg,const QString& group_or_prefix);
- virtual void load(QDomElement& dockElement);
- virtual void setToolTip (KDockWidget *, QString &);
- virtual void setPixmap(KDockWidget*,const QPixmap&);
- QStringList containedWidgets() const;
- virtual bool dockDragEnter(KDockWidget* dockWidget, QMouseEvent *event);
- virtual bool dockDragMove(KDockWidget* dockWidget, QMouseEvent *event);
- virtual bool dockDragLeave(KDockWidget* dockWidget, QMouseEvent *event);
+ virtual void save(KConfig *cfg,const TQString& group_or_prefix);
+ virtual void save(TQDomElement& dockElement);
+ virtual void load(KConfig *cfg,const TQString& group_or_prefix);
+ virtual void load(TQDomElement& dockElement);
+ virtual void setToolTip (KDockWidget *, TQString &);
+ virtual void setPixmap(KDockWidget*,const TQPixmap&);
+ TQStringList containedWidgets() const;
+ virtual bool dockDragEnter(KDockWidget* dockWidget, TQMouseEvent *event);
+ virtual bool dockDragMove(KDockWidget* dockWidget, TQMouseEvent *event);
+ virtual bool dockDragLeave(KDockWidget* dockWidget, TQMouseEvent *event);
protected:
friend class KDockManager;
friend class KDockSplitter;
- void prepareSave(QStringList &names);
+ void prepareSave(TQStringList &names);
void activateOverlapMode(int nonOverlapSize);
void deactivateOverlapMode();
bool isOverlapMode();
diff --git a/kdeui/kdockwidget_private.cpp b/kdeui/kdockwidget_private.cpp
index 58bc954bc..9c98ae69a 100644
--- a/kdeui/kdockwidget_private.cpp
+++ b/kdeui/kdockwidget_private.cpp
@@ -21,16 +21,16 @@
#include "kdockwidget_p.h"
#include "kdockwidget_private.h"
-#include <qpainter.h>
-#include <qcursor.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
#include <kdebug.h>
-#include <qtimer.h>
-#include <qapplication.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
#include <math.h> // need ceil
-KDockSplitter::KDockSplitter(QWidget *parent, const char *name, Orientation orient, int pos)
-: QWidget(parent, name)
+KDockSplitter::KDockSplitter(TQWidget *parent, const char *name, Orientation orient, int pos)
+: TQWidget(parent, name)
{
m_dontRecalc=false;
divider = 0L;
@@ -48,7 +48,7 @@ KDockSplitter::KDockSplitter(QWidget *parent, const char *name, Orientation orie
initialised = false;
}
-void KDockSplitter::activate(QWidget *c0, QWidget *c1)
+void KDockSplitter::activate(TQWidget *c0, TQWidget *c1)
{
if ( c0 ) child0 = c0;
if ( c1 ) child1 = c1;
@@ -56,15 +56,15 @@ void KDockSplitter::activate(QWidget *c0, QWidget *c1)
setupMinMaxSize();
if (divider) delete divider;
- divider = new QFrame(this, "pannerdivider");
- divider->setFrameStyle(QFrame::Panel | QFrame::Raised);
+ divider = new TQFrame(this, "pannerdivider");
+ divider->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
divider->setLineWidth(1);
divider->raise();
if (m_orientation == Horizontal)
- divider->setCursor(QCursor(sizeVerCursor));
+ divider->setCursor(TQCursor(sizeVerCursor));
else
- divider->setCursor(QCursor(sizeHorCursor));
+ divider->setCursor(TQCursor(sizeHorCursor));
divider->installEventFilter(this);
initialised= true;
@@ -236,7 +236,7 @@ int KDockSplitter::separatorPos() const
return xpos;
}
-void KDockSplitter::resizeEvent(QResizeEvent *ev)
+void KDockSplitter::resizeEvent(TQResizeEvent *ev)
{
//
// As already stated in the .h file we always have to differentiate
@@ -439,7 +439,7 @@ void KDockSplitter::resizeEvent(QResizeEvent *ev)
}
}
-int KDockSplitter::checkValueOverlapped(int position, QWidget *overlappingWidget) const
+int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidget) const
{
if (initialised) {
if (m_orientation == Vertical) {
@@ -489,14 +489,14 @@ int KDockSplitter::checkValue( int position ) const
return position;
}
-bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
+bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e)
{
- QMouseEvent *mev;
+ TQMouseEvent *mev;
bool handled = false;
switch (e->type()) {
- case QEvent::MouseMove:
- mev= (QMouseEvent*)e;
+ case TQEvent::MouseMove:
+ mev= (TQMouseEvent*)e;
child0->setUpdatesEnabled(mOpaqueResize);
child1->setUpdatesEnabled(mOpaqueResize);
if (m_orientation == Horizontal) {
@@ -522,7 +522,7 @@ bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
handled=true; break;
}
if (!mOpaqueResize) {
- int position = checkValue( mapFromGlobal(QCursor::pos()).x() );
+ int position = checkValue( mapFromGlobal(TQCursor::pos()).x() );
divider->move( position, 0 );
} else {
int tmp_xpos = factor * checkValue( mapFromGlobal( mev->globalPos()).x() ) / width();
@@ -535,10 +535,10 @@ bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
}
handled= true;
break;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
child0->setUpdatesEnabled(true);
child1->setUpdatesEnabled(true);
- mev= (QMouseEvent*)e;
+ mev= (TQMouseEvent*)e;
if (m_orientation == Horizontal){
if ((fixedHeight0!=-1) || (fixedHeight1!=-1))
{
@@ -561,21 +561,21 @@ bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
default:
break;
}
- return (handled) ? true : QWidget::eventFilter( o, e );
+ return (handled) ? true : TQWidget::eventFilter( o, e );
}
-bool KDockSplitter::event( QEvent* e )
+bool KDockSplitter::event( TQEvent* e )
{
- if ( e->type() == QEvent::LayoutHint ){
+ if ( e->type() == TQEvent::LayoutHint ){
// change children min/max size. This is needed, otherwise
// it is possible the divider get's out of bounds.
setupMinMaxSize();
resizeEvent(0);
}
- return QWidget::event(e);
+ return TQWidget::event(e);
}
-QWidget* KDockSplitter::getAnother( QWidget* w ) const
+TQWidget* KDockSplitter::getAnother( TQWidget* w ) const
{
return ( w == child0 ) ? child1 : child0;
}
@@ -584,7 +584,7 @@ void KDockSplitter::updateName()
{
if ( !initialised ) return;
- QString new_name = QString( child0->name() ) + "," + child1->name();
+ TQString new_name = TQString( child0->name() ) + "," + child1->name();
parentWidget()->setName( new_name.latin1() );
parentWidget()->setCaption( child0->caption() + "," + child1->caption() );
parentWidget()->repaint( false );
@@ -593,7 +593,7 @@ void KDockSplitter::updateName()
((KDockWidget*)parentWidget())->lastName = child1->name();
((KDockWidget*)parentWidget())->splitterOrientation = m_orientation;
- QWidget* p = parentWidget()->parentWidget();
+ TQWidget* p = parentWidget()->parentWidget();
if ( p && p->inherits("KDockSplitter" ) )
((KDockSplitter*)p)->updateName();
}
@@ -621,8 +621,8 @@ bool KDockSplitter::keepSize() const
/*************************************************************************/
-KDockButton_Private::KDockButton_Private( QWidget *parent, const char * name )
-:QPushButton( parent, name )
+KDockButton_Private::KDockButton_Private( TQWidget *parent, const char * name )
+:TQPushButton( parent, name )
{
moveMouse = false;
setFocusPolicy( NoFocus );
@@ -632,9 +632,9 @@ KDockButton_Private::~KDockButton_Private()
{
}
-void KDockButton_Private::drawButton( QPainter* p )
+void KDockButton_Private::drawButton( TQPainter* p )
{
- p->fillRect( 0,0, width(), height(), QBrush(colorGroup().brush(QColorGroup::Background)) );
+ p->fillRect( 0,0, width(), height(), TQBrush(colorGroup().brush(TQColorGroup::Background)) );
p->drawPixmap( (width() - pixmap()->width()) / 2, (height() - pixmap()->height()) / 2, *pixmap() );
if ( moveMouse && !isDown() ){
p->setPen( white );
@@ -658,13 +658,13 @@ void KDockButton_Private::drawButton( QPainter* p )
}
}
-void KDockButton_Private::enterEvent( QEvent * )
+void KDockButton_Private::enterEvent( TQEvent * )
{
moveMouse = true;
repaint();
}
-void KDockButton_Private::leaveEvent( QEvent * )
+void KDockButton_Private::leaveEvent( TQEvent * )
{
moveMouse = false;
repaint();
@@ -672,7 +672,7 @@ void KDockButton_Private::leaveEvent( QEvent * )
/*************************************************************************/
KDockWidgetPrivate::KDockWidgetPrivate()
- : QObject()
+ : TQObject()
,index(-1)
,splitPosInPercent(50)
,pendingFocusInEvent(false)
@@ -697,11 +697,11 @@ KDockWidgetPrivate::~KDockWidgetPrivate()
{
}
-void KDockWidgetPrivate::slotFocusEmbeddedWidget(QWidget* w)
+void KDockWidgetPrivate::slotFocusEmbeddedWidget(TQWidget* w)
{
if (w) {
- QWidget* embeddedWdg = ((KDockWidget*)w)->getWidget();
- if (embeddedWdg && ((embeddedWdg->focusPolicy() == QWidget::ClickFocus) || (embeddedWdg->focusPolicy() == QWidget::StrongFocus))) {
+ TQWidget* embeddedWdg = ((KDockWidget*)w)->getWidget();
+ if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQWidget::ClickFocus) || (embeddedWdg->focusPolicy() == TQWidget::StrongFocus))) {
embeddedWdg->setFocus();
}
}
diff --git a/kdeui/kdockwidget_private.h b/kdeui/kdockwidget_private.h
index 2c6ae8896..312b7b193 100644
--- a/kdeui/kdockwidget_private.h
+++ b/kdeui/kdockwidget_private.h
@@ -24,8 +24,8 @@
#ifndef KDOCKWIDGET_PRIVATE_H
#define KDOCKWIDGET_PRIVATE_H
-#include <qwidget.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
#ifndef NO_KDE2
#include <netwm_def.h>
@@ -36,7 +36,7 @@ class KDockContainer;
/**
- * Like QSplitter but specially designed for dockwidgets stuff.
+ * Like TQSplitter but specially designed for dockwidgets stuff.
* @internal
*
* @author Max Judin.
@@ -56,7 +56,7 @@ public:
* @param orient orientation. Either @p Vertical or @p Horizontal
* @param pos procentual position of the splitter. Must be int [0...100].
*/
- KDockSplitter(QWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50);
+ KDockSplitter(TQWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50);
virtual ~KDockSplitter(){}
/**
@@ -67,7 +67,7 @@ public:
* @param c0 the widget on top/left
* @param c1 the widget on borrom/right
*/
- void activate(QWidget *c0, QWidget *c1 = 0L);
+ void activate(TQWidget *c0, TQWidget *c1 = 0L);
/**
* Disables the splitter.
*/
@@ -115,22 +115,22 @@ public:
* The eventfilter installed on the @p divider processes
* all splitter resizing events.
*/
- virtual bool eventFilter(QObject *, QEvent *);
- virtual bool event( QEvent * );
+ virtual bool eventFilter(TQObject *, TQEvent *);
+ virtual bool event( TQEvent * );
/**
* @return the top/left child widget.
*/
- QWidget* getFirst() const { return child0; }
+ TQWidget* getFirst() const { return child0; }
/**
* @return the bottom/right child widget.
*/
- QWidget* getLast() const { return child1; }
+ TQWidget* getLast() const { return child1; }
/**
* If @p w is child0, return child1, otherwise child0.
* @return the other child widget
*/
- QWidget* getAnother( QWidget* w ) const;
+ TQWidget* getAnother( TQWidget* w ) const;
void updateName();
/**
@@ -173,7 +173,7 @@ protected:
* @param child the overlapping child
* @return the (new) splitter position.
*/
- int checkValueOverlapped(int position, QWidget* child) const;
+ int checkValueOverlapped(int position, TQWidget* child) const;
/**
* The resize event resizes @p child0, @p child1 and the @p divider.
@@ -189,7 +189,7 @@ protected:
* @param ev the resize Event. If @p ev=0L the user changed
* the mode (for example from overlap to nonoverlap mode).
*/
- virtual void resizeEvent(QResizeEvent *ev);
+ virtual void resizeEvent(TQResizeEvent *ev);
/*
protected slots:
@@ -207,7 +207,7 @@ private:
* so no need to make pointer checks.
* child[01]->getWidget() may be KDockContainer.
*/
- QWidget *child0, *child1;
+ TQWidget *child0, *child1;
Orientation m_orientation;
/**
* If initialised is true, the divider!=0L. If false, the divider==0L!
@@ -217,7 +217,7 @@ private:
* The splitter controller which is between child0 and child1.
* Its size is 4 pixel.
*/
- QFrame* divider;
+ TQFrame* divider;
/**
* @p xpos and @p savedXPos represent the current divider position.
* If the orientation is Horizontal @p xpos actually is "ypos". So
@@ -249,13 +249,13 @@ class KDEUI_EXPORT KDockButton_Private : public QPushButton
{
Q_OBJECT
public:
- KDockButton_Private( QWidget *parent=0, const char *name=0 );
+ KDockButton_Private( TQWidget *parent=0, const char *name=0 );
~KDockButton_Private();
protected:
- virtual void drawButton( QPainter * );
- virtual void enterEvent( QEvent * );
- virtual void leaveEvent( QEvent * );
+ virtual void drawButton( TQPainter * );
+ virtual void enterEvent( TQEvent * );
+ virtual void leaveEvent( TQEvent * );
private:
bool moveMouse;
@@ -281,7 +281,7 @@ public slots:
/**
* Especially used for Tab page docking. Switching the pages requires additional setFocus() for the embedded widget.
*/
- void slotFocusEmbeddedWidget(QWidget* w = 0L);
+ void slotFocusEmbeddedWidget(TQWidget* w = 0L);
public:
enum KDockWidgetResize
@@ -300,12 +300,12 @@ public:
NET::WindowType windowType;
#endif
- QWidget *_parent;
+ TQWidget *_parent;
bool transient;
- QGuardedPtr<QWidget> container;
+ TQGuardedPtr<TQWidget> container;
- QPoint resizePos;
+ TQPoint resizePos;
bool resizing;
KDockWidgetResize resizeMode;
};
@@ -314,8 +314,8 @@ class KDockWidgetHeaderPrivate
: public QObject
{
public:
- KDockWidgetHeaderPrivate( QObject* parent )
- : QObject( parent )
+ KDockWidgetHeaderPrivate( TQObject* parent )
+ : TQObject( parent )
{
forceCloseButtonHidden=false;
toDesktopButton = 0;
@@ -327,9 +327,9 @@ public:
bool showToDesktopButton;
bool topLevel;
- QPtrList<KDockButton_Private> btns;
+ TQPtrList<KDockButton_Private> btns;
bool forceCloseButtonHidden;
- QWidget *dummy;
+ TQWidget *dummy;
};
#endif
diff --git a/kdeui/kdockwindow.h b/kdeui/kdockwindow.h
index 93d550a75..4b7a34049 100644
--- a/kdeui/kdockwindow.h
+++ b/kdeui/kdockwindow.h
@@ -18,7 +18,7 @@
#ifndef KDOCKWINDOW_H
#define KDOCKWINDOW_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <ksystemtray.h>
#ifndef KDE_NO_COMPAT
@@ -33,7 +33,7 @@ class KDE_DEPRECATED KDockWindow : public KSystemTray
{
Q_OBJECT
public:
- KDockWindow( QWidget* parent = 0, const char* name = 0 )
+ KDockWindow( TQWidget* parent = 0, const char* name = 0 )
: KSystemTray( parent, name ) {}
~KDockWindow() {}
};
diff --git a/kdeui/kdualcolorbutton.cpp b/kdeui/kdualcolorbutton.cpp
index 24a4e9e0d..2b4c2ecfd 100644
--- a/kdeui/kdualcolorbutton.cpp
+++ b/kdeui/kdualcolorbutton.cpp
@@ -22,18 +22,18 @@
#include "dcolorarrow.xbm"
#include "dcolorreset.xpm"
#include <kglobalsettings.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qdrawutil.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqdrawutil.h>
class KDualColorButton::KDualColorPrivate
{
public:
- QWidget* dialogParent;
+ TQWidget* dialogParent;
};
-KDualColorButton::KDualColorButton(QWidget *parent, const char *name, QWidget* dialogParent)
- : QWidget(parent, name),
+KDualColorButton::KDualColorButton(TQWidget *parent, const char *name, TQWidget* dialogParent)
+ : TQWidget(parent, name),
d (new KDualColorPrivate)
{
if (!dialogParent && parent) {
@@ -42,12 +42,12 @@ KDualColorButton::KDualColorButton(QWidget *parent, const char *name, QWidget* d
d->dialogParent = dialogParent;
}
- arrowBitmap = new QBitmap(dcolorarrow_width, dcolorarrow_height,
+ arrowBitmap = new TQBitmap(dcolorarrow_width, dcolorarrow_height,
(const unsigned char *)dcolorarrow_bits, true);
arrowBitmap->setMask(*arrowBitmap); // heh
- resetPixmap = new QPixmap((const char **)dcolorreset_xpm);
- fg = QBrush(Qt::black, SolidPattern);
- bg = QBrush(Qt::white, SolidPattern);
+ resetPixmap = new TQPixmap((const char **)dcolorreset_xpm);
+ fg = TQBrush(Qt::black, SolidPattern);
+ bg = TQBrush(Qt::white, SolidPattern);
curColor = Foreground;
dragFlag = false;
miniCtlFlag = false;
@@ -56,19 +56,19 @@ KDualColorButton::KDualColorButton(QWidget *parent, const char *name, QWidget* d
setAcceptDrops(true);
}
-KDualColorButton::KDualColorButton(const QColor &fgColor, const QColor &bgColor,
- QWidget *parent, const char *name, QWidget* dialogParent)
- : QWidget(parent, name),
+KDualColorButton::KDualColorButton(const TQColor &fgColor, const TQColor &bgColor,
+ TQWidget *parent, const char *name, TQWidget* dialogParent)
+ : TQWidget(parent, name),
d (new KDualColorPrivate)
{
d->dialogParent = dialogParent;
- arrowBitmap = new QBitmap(dcolorarrow_width, dcolorarrow_height,
+ arrowBitmap = new TQBitmap(dcolorarrow_width, dcolorarrow_height,
(const unsigned char *)dcolorarrow_bits, true);
arrowBitmap->setMask(*arrowBitmap);
- resetPixmap = new QPixmap((const char **)dcolorreset_xpm);
- fg = QBrush(fgColor, SolidPattern);
- bg = QBrush(bgColor, SolidPattern);
+ resetPixmap = new TQPixmap((const char **)dcolorreset_xpm);
+ fg = TQBrush(fgColor, SolidPattern);
+ bg = TQBrush(bgColor, SolidPattern);
curColor = Foreground;
dragFlag = false;
miniCtlFlag = false;
@@ -84,12 +84,12 @@ KDualColorButton::~KDualColorButton()
delete resetPixmap;
}
-QColor KDualColorButton::foreground() const
+TQColor KDualColorButton::foreground() const
{
return fg.color();
}
-QColor KDualColorButton::background() const
+TQColor KDualColorButton::background() const
{
return bg.color();
}
@@ -99,38 +99,38 @@ KDualColorButton::DualColor KDualColorButton::current() const
return curColor;
}
-QColor KDualColorButton::currentColor() const
+TQColor KDualColorButton::currentColor() const
{
return (curColor == Background ? bg.color() : fg.color());
}
-QSize KDualColorButton::sizeHint() const
+TQSize KDualColorButton::sizeHint() const
{
- return QSize(34, 34);
+ return TQSize(34, 34);
}
-void KDualColorButton::setForeground(const QColor &c)
+void KDualColorButton::setForeground(const TQColor &c)
{
- fg = QBrush(c, SolidPattern);
+ fg = TQBrush(c, SolidPattern);
repaint(false);
emit fgChanged(fg.color());
}
-void KDualColorButton::setBackground(const QColor &c)
+void KDualColorButton::setBackground(const TQColor &c)
{
- bg = QBrush(c, SolidPattern);
+ bg = TQBrush(c, SolidPattern);
repaint(false);
emit bgChanged(bg.color());
}
-void KDualColorButton::setCurrentColor(const QColor &c)
+void KDualColorButton::setCurrentColor(const TQColor &c)
{
if(curColor == Background)
- bg = QBrush(c, SolidPattern);
+ bg = TQBrush(c, SolidPattern);
else
- fg = QBrush(c, SolidPattern);
+ fg = TQBrush(c, SolidPattern);
repaint(false);
}
@@ -140,19 +140,19 @@ void KDualColorButton::setCurrent(DualColor s)
repaint(false);
}
-void KDualColorButton::metrics(QRect &fgRect, QRect &bgRect)
+void KDualColorButton::metrics(TQRect &fgRect, TQRect &bgRect)
{
- fgRect = QRect(0, 0, width()-14, height()-14);
- bgRect = QRect(14, 14, width()-14, height()-14);
+ fgRect = TQRect(0, 0, width()-14, height()-14);
+ bgRect = TQRect(14, 14, width()-14, height()-14);
}
-void KDualColorButton::paintEvent(QPaintEvent *)
+void KDualColorButton::paintEvent(TQPaintEvent *)
{
- QRect fgRect, bgRect;
- QPainter p(this);
+ TQRect fgRect, bgRect;
+ TQPainter p(this);
metrics(fgRect, bgRect);
- QBrush defBrush = colorGroup().brush(QColorGroup::Button);
+ TQBrush defBrush = colorGroup().brush(TQColorGroup::Button);
qDrawShadeRect(&p, bgRect, colorGroup(), curColor == Background, 2, 0,
isEnabled() ? &bg : &defBrush);
@@ -164,14 +164,14 @@ void KDualColorButton::paintEvent(QPaintEvent *)
}
-void KDualColorButton::dragEnterEvent(QDragEnterEvent *ev)
+void KDualColorButton::dragEnterEvent(TQDragEnterEvent *ev)
{
ev->accept(isEnabled() && KColorDrag::canDecode(ev));
}
-void KDualColorButton::dropEvent(QDropEvent *ev)
+void KDualColorButton::dropEvent(TQDropEvent *ev)
{
- QColor c;
+ TQColor c;
if(KColorDrag::decode(ev, c)){
if(curColor == Foreground){
fg.setColor(c);
@@ -185,9 +185,9 @@ void KDualColorButton::dropEvent(QDropEvent *ev)
}
}
-void KDualColorButton::mousePressEvent(QMouseEvent *ev)
+void KDualColorButton::mousePressEvent(TQMouseEvent *ev)
{
- QRect fgRect, bgRect;
+ TQRect fgRect, bgRect;
metrics(fgRect, bgRect);
mPos = ev->pos();
tmpColor = curColor;
@@ -203,7 +203,7 @@ void KDualColorButton::mousePressEvent(QMouseEvent *ev)
else if(ev->pos().x() > fgRect.width()){
// We handle the swap and reset controls as soon as the mouse is
// is pressed and ignore further events on this click (mosfet).
- QBrush c = fg;
+ TQBrush c = fg;
fg = bg;
bg = c;
emit fgChanged(fg.color());
@@ -221,7 +221,7 @@ void KDualColorButton::mousePressEvent(QMouseEvent *ev)
}
-void KDualColorButton::mouseMoveEvent(QMouseEvent *ev)
+void KDualColorButton::mouseMoveEvent(TQMouseEvent *ev)
{
if(!miniCtlFlag){
int delay = KGlobalSettings::dndEventDelay();
@@ -236,10 +236,10 @@ void KDualColorButton::mouseMoveEvent(QMouseEvent *ev)
}
}
-void KDualColorButton::mouseReleaseEvent(QMouseEvent *ev)
+void KDualColorButton::mouseReleaseEvent(TQMouseEvent *ev)
{
if(!miniCtlFlag){
- QRect fgRect, bgRect;
+ TQRect fgRect, bgRect;
metrics(fgRect, bgRect);
if(dragFlag)
@@ -250,8 +250,8 @@ void KDualColorButton::mouseReleaseEvent(QMouseEvent *ev)
emit currentChanged(Foreground);
}
else{
- QColor newColor = fg.color();
- if(KColorDialog::getColor(newColor, d->dialogParent) != QDialog::Rejected){
+ TQColor newColor = fg.color();
+ if(KColorDialog::getColor(newColor, d->dialogParent) != TQDialog::Rejected){
fg.setColor(newColor);
emit fgChanged(newColor);
}
@@ -263,8 +263,8 @@ void KDualColorButton::mouseReleaseEvent(QMouseEvent *ev)
emit currentChanged(Background);
}
else{
- QColor newColor = bg.color();
- if(KColorDialog::getColor(newColor, d->dialogParent) != QDialog::Rejected){
+ TQColor newColor = bg.color();
+ if(KColorDialog::getColor(newColor, d->dialogParent) != TQDialog::Rejected){
bg.setColor(newColor);
emit bgChanged(newColor);
}
diff --git a/kdeui/kdualcolorbutton.h b/kdeui/kdualcolorbutton.h
index eb4a71ab2..b2aaf4753 100644
--- a/kdeui/kdualcolorbutton.h
+++ b/kdeui/kdualcolorbutton.h
@@ -19,8 +19,8 @@
#define __KDUALCOLORBTN_H
class QBitmap;
-#include <qbrush.h>
-#include <qwidget.h>
+#include <tqbrush.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -49,9 +49,9 @@ class KDEUI_EXPORT KDualColorButton : public QWidget
{
Q_OBJECT
Q_ENUMS( DualColor )
- Q_PROPERTY( QColor foreground READ foreground WRITE setForeground )
- Q_PROPERTY( QColor background READ background WRITE setBackground )
- Q_PROPERTY( QColor currentColor READ currentColor WRITE setCurrentColor STORED false DESIGNABLE false )
+ Q_PROPERTY( TQColor foreground READ foreground WRITE setForeground )
+ Q_PROPERTY( TQColor background READ background WRITE setBackground )
+ Q_PROPERTY( TQColor currentColor READ currentColor WRITE setCurrentColor STORED false DESIGNABLE false )
Q_PROPERTY( DualColor current READ current WRITE setCurrent )
public:
@@ -64,24 +64,24 @@ public:
* As of KDE 3.5.1, sets the dialog parent to the same as "parent" if that
* argument is non-null and the dialogParent argument is null.
*/
- KDualColorButton(QWidget *parent=0, const char *name=0, QWidget* dialogParent=0);
+ KDualColorButton(TQWidget *parent=0, const char *name=0, TQWidget* dialogParent=0);
/**
* Constructs a new KDualColorButton with the supplied foreground and
* background colors.
*/
- KDualColorButton(const QColor &fgColor, const QColor &bgColor,
- QWidget *parent=0, const char *name=0, QWidget* dialogParent=0);
+ KDualColorButton(const TQColor &fgColor, const TQColor &bgColor,
+ TQWidget *parent=0, const char *name=0, TQWidget* dialogParent=0);
~KDualColorButton();
/**
* Returns the current foreground color.
*/
- QColor foreground() const;
+ TQColor foreground() const;
/**
* Returns the current background color.
*/
- QColor background() const;
+ TQColor background() const;
/**
* Returns the current color item selected by the user.
*/
@@ -89,21 +89,21 @@ public:
/**
* Returns the color of the selected item.
*/
- QColor currentColor() const;
+ TQColor currentColor() const;
/**
* Returns the minimum size needed to display the widget and all its
* controls.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
public slots:
/**
* Sets the foreground color.
*/
- void setForeground(const QColor &c);
+ void setForeground(const TQColor &c);
/**
* Sets the background color.
*/
- void setBackground(const QColor &c);
+ void setBackground(const TQColor &c);
/**
* Sets the current selected color item.
*/
@@ -111,16 +111,16 @@ public slots:
/**
* Sets the color of the selected item.
*/
- void setCurrentColor(const QColor &c);
+ void setCurrentColor(const TQColor &c);
signals:
/**
* Emitted when the foreground color is changed.
*/
- void fgChanged(const QColor &c);
+ void fgChanged(const TQColor &c);
/**
* Emitted when the background color is changed.
*/
- void bgChanged(const QColor &c);
+ void bgChanged(const TQColor &c);
/**
* Emitted when the user changes the current color selection.
*/
@@ -133,19 +133,19 @@ protected:
* be at the top right, the reset control will always be at the bottom
* left, and you must leave at least a 14x14 space in those corners.
*/
- virtual void metrics(QRect &fgRect, QRect &bgRect);
- virtual void paintEvent(QPaintEvent *ev);
- virtual void mousePressEvent(QMouseEvent *ev);
- virtual void mouseMoveEvent(QMouseEvent *ev);
- virtual void mouseReleaseEvent(QMouseEvent *ev);
+ virtual void metrics(TQRect &fgRect, TQRect &bgRect);
+ virtual void paintEvent(TQPaintEvent *ev);
+ virtual void mousePressEvent(TQMouseEvent *ev);
+ virtual void mouseMoveEvent(TQMouseEvent *ev);
+ virtual void mouseReleaseEvent(TQMouseEvent *ev);
// Dnd
- virtual void dragEnterEvent(QDragEnterEvent *ev);
- virtual void dropEvent(QDropEvent *ev);
+ virtual void dragEnterEvent(TQDragEnterEvent *ev);
+ virtual void dropEvent(TQDropEvent *ev);
private:
- QBitmap *arrowBitmap;
- QPixmap *resetPixmap;
- QBrush fg, bg;
- QPoint mPos;
+ TQBitmap *arrowBitmap;
+ TQPixmap *resetPixmap;
+ TQBrush fg, bg;
+ TQPoint mPos;
bool dragFlag, miniCtlFlag;
DualColor curColor, tmpColor;
diff --git a/kdeui/keditcl.h b/kdeui/keditcl.h
index b05148fb0..6867cdf46 100644
--- a/kdeui/keditcl.h
+++ b/kdeui/keditcl.h
@@ -21,8 +21,8 @@
#ifndef __KEDITCL_H__
#define __KEDITCL_H__
-#include <qmultilineedit.h>
-#include <qstring.h>
+#include <tqmultilineedit.h>
+#include <tqstring.h>
#include <kdialogbase.h>
class QDropEvent;
@@ -39,7 +39,7 @@ class KDEUI_EXPORT KEdGotoLine : public KDialogBase
Q_OBJECT
public:
- KEdGotoLine( QWidget *parent=0, const char *name=0, bool modal=true );
+ KEdGotoLine( TQWidget *parent=0, const char *name=0, bool modal=true );
int getLineNumber();
public slots:
@@ -59,16 +59,16 @@ private:
class KDEUI_EXPORT KEdFind : public KDialogBase
{
Q_OBJECT
- Q_PROPERTY( QString text READ getText WRITE setText )
+ Q_PROPERTY( TQString text READ getText WRITE setText )
Q_PROPERTY( bool caseSensitivity READ case_sensitive WRITE setCaseSensitive )
Q_PROPERTY( bool direction READ get_direction WRITE setDirection )
public:
- KEdFind( QWidget *parent = 0, const char *name=0, bool modal=true);
+ KEdFind( TQWidget *parent = 0, const char *name=0, bool modal=true);
~KEdFind();
- QString getText() const;
- void setText(QString string);
+ TQString getText() const;
+ void setText(TQString string);
void setCaseSensitive( bool b );
bool case_sensitive() const;
void setDirection( bool b );
@@ -83,14 +83,14 @@ public:
protected slots:
void slotCancel( void );
void slotUser1( void );
- void textSearchChanged ( const QString & );
+ void textSearchChanged ( const TQString & );
protected:
- QVButtonGroup* group;
+ TQVButtonGroup* group;
private:
- QCheckBox *sensitive;
- QCheckBox *direction;
+ TQCheckBox *sensitive;
+ TQCheckBox *direction;
virtual void done(int i ) { KDialogBase::done(i); }
@@ -112,12 +112,12 @@ class KDEUI_EXPORT KEdReplace : public KDialogBase
public:
- KEdReplace ( QWidget *parent = 0, const char *name=0, bool modal=true );
+ KEdReplace ( TQWidget *parent = 0, const char *name=0, bool modal=true );
~KEdReplace();
- QString getText();
- QString getReplaceText();
- void setText(QString);
+ TQString getText();
+ TQString getReplaceText();
+ void setText(TQString);
/**
* @returns the combobox containing the history of searches. Can be used
@@ -140,11 +140,11 @@ protected slots:
void slotUser1( void );
void slotUser2( void );
void slotUser3( void );
- void textSearchChanged ( const QString & );
+ void textSearchChanged ( const TQString & );
private:
- QCheckBox *sensitive;
- QCheckBox *direction;
+ TQCheckBox *sensitive;
+ TQCheckBox *direction;
virtual void done(int i ) { KDialogBase::done(i); }
@@ -176,7 +176,7 @@ public:
/**
* The usual constructor.
**/
- KEdit (QWidget *_parent=NULL, const char *name=NULL);
+ KEdit (TQWidget *_parent=NULL, const char *name=NULL);
~KEdit();
@@ -190,7 +190,7 @@ public:
/**
* Insert text from the text stream into the edit widget.
**/
- void insertText(QTextStream *);
+ void insertText(TQTextStream *);
/**
* Save text from the edit widget to a text stream.
@@ -198,8 +198,8 @@ public:
* If @p softWrap is true soft line wrappings are ignored.
* @since 3.1
**/
- void saveText(QTextStream *, bool softWrap);
- void saveText(QTextStream *); // KDE 4.0: remove
+ void saveText(TQTextStream *, bool softWrap);
+ void saveText(TQTextStream *); // KDE 4.0: remove
/**
* Let the user select a font and set the font of the textwidget to that
@@ -242,7 +242,7 @@ public:
*
* The Popup Menu will be activated on a right mouse button press event.
*/
- void installRBPopup( QPopupMenu* );
+ void installRBPopup( TQPopupMenu* );
/**
* Retrieve the current line number.
@@ -255,7 +255,7 @@ public:
* Retrieve the actual column number the cursor is on.
*
* This call differs
- * from QMultiLineEdit::getCursorPosition() in that it returns the actual cursor
+ * from TQMultiLineEdit::getCursorPosition() in that it returns the actual cursor
* position and not the character position. Use currentLine() and currentColumn()
* if you want to display the current line or column in the status bar for
* example.
@@ -281,21 +281,21 @@ public:
*/
void setOverwriteEnabled(bool b);
- QString selectWordUnderCursor();
+ TQString selectWordUnderCursor();
/// @since 3.3
- QPopupMenu *createPopupMenu( const QPoint& pos );
+ TQPopupMenu *createPopupMenu( const TQPoint& pos );
void setAutoUpdate(bool b);
signals:
/** This signal is emitted if the user dropped a URL over the text editor
- * QMultiLineEdit widget.
+ * TQMultiLineEdit widget.
*
* Note that the user can drop also Text on it, but
- * this is already handled internally by QMultiLineEdit.
+ * this is already handled internally by TQMultiLineEdit.
*/
- void gotUrlDrop(QDropEvent* e);
+ void gotUrlDrop(TQDropEvent* e);
/** This signal is emitted whenever the cursor position changes.
*
@@ -319,11 +319,11 @@ public slots:
/**
* @internal
**/
- void corrected (const QString &originalword, const QString &newword, unsigned int pos);
+ void corrected (const TQString &originalword, const TQString &newword, unsigned int pos);
/**
* @internal
**/
- void misspelling (const QString &word, const QStringList &, unsigned int pos);
+ void misspelling (const TQString &word, const TQStringList &, unsigned int pos);
private slots:
/**
@@ -364,10 +364,10 @@ private slots:
protected:
void computePosition();
- int doSearch(QString s_pattern, bool case_sensitive,
+ int doSearch(TQString s_pattern, bool case_sensitive,
bool regex, bool forward,int line, int col);
- int doReplace(QString s_pattern, bool case_sensitive,
+ int doReplace(TQString s_pattern, bool case_sensitive,
bool regex, bool forward,int line, int col,bool replace);
/**
@@ -385,31 +385,31 @@ protected:
* Reimplemented for internal reasons, the API is not affected.
*/
virtual void ensureCursorVisible();
- virtual void setCursor( const QCursor & );
- virtual void viewportPaintEvent( QPaintEvent* );
+ virtual void setCursor( const TQCursor & );
+ virtual void viewportPaintEvent( TQPaintEvent* );
protected:
- void keyPressEvent ( QKeyEvent * );
+ void keyPressEvent ( TQKeyEvent * );
// DnD interface
- void dragMoveEvent(QDragMoveEvent* e);
- void dragEnterEvent(QDragEnterEvent* e);
- void dropEvent(QDropEvent* e);
- void contentsDragMoveEvent(QDragMoveEvent* e);
- void contentsDragEnterEvent(QDragEnterEvent* e);
- void contentsDropEvent(QDropEvent* e);
+ void dragMoveEvent(TQDragMoveEvent* e);
+ void dragEnterEvent(TQDragEnterEvent* e);
+ void dropEvent(TQDropEvent* e);
+ void contentsDragMoveEvent(TQDragMoveEvent* e);
+ void contentsDragEnterEvent(TQDragEnterEvent* e);
+ void contentsDropEvent(TQDropEvent* e);
private:
- QTimer* repaintTimer;
+ TQTimer* repaintTimer;
QString killbufferstring;
- QWidget *parent;
+ TQWidget *parent;
KEdFind *srchdialog;
KEdReplace *replace_dialog;
KEdGotoLine *gotodialog;
- QString pattern;
+ TQString pattern;
bool can_replace;
bool killing;
diff --git a/kdeui/keditcl1.cpp b/kdeui/keditcl1.cpp
index 56ab68c60..a77e1c523 100644
--- a/kdeui/keditcl1.cpp
+++ b/kdeui/keditcl1.cpp
@@ -19,10 +19,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdragobject.h>
-#include <qpopupmenu.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqdragobject.h>
+#include <tqpopupmenu.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kcursor.h>
@@ -46,8 +46,8 @@ public:
};
-KEdit::KEdit(QWidget *_parent, const char *name)
- : QMultiLineEdit(_parent, name)
+KEdit::KEdit(TQWidget *_parent, const char *name)
+ : TQMultiLineEdit(_parent, name)
{
d = new KEditPrivate;
d->overwriteEnabled = false;
@@ -67,8 +67,8 @@ KEdit::KEdit(QWidget *_parent, const char *name)
setAcceptDrops(true);
KCursor::setAutoHideCursor( this, true );
- connect(this, SIGNAL(cursorPositionChanged(int,int)),
- this, SLOT(slotCursorPositionChanged()));
+ connect(this, TQT_SIGNAL(cursorPositionChanged(int,int)),
+ this, TQT_SLOT(slotCursorPositionChanged()));
}
@@ -84,17 +84,17 @@ KEdit::setAutoUpdate(bool b)
}
void
-KEdit::insertText(QTextStream *stream)
+KEdit::insertText(TQTextStream *stream)
{
// setAutoUpdate(false);
int line, col;
getCursorPosition(&line, &col);
int saveline = line;
int savecol = col;
- QString textLine;
+ TQString textLine;
// MS: Patch by Martin Schenk <martin@schenk.com>
- // MS: disable UNDO, or QMultiLineEdit remembers every textLine !!!
+ // MS: disable UNDO, or TQMultiLineEdit remembers every textLine !!!
// memory usage is:
// textLine: 2*size rounded up to nearest power of 2 (520Kb -> 1024Kb)
// widget: about (2*size + 60bytes*lines)
@@ -104,13 +104,13 @@ KEdit::insertText(QTextStream *stream)
// MS: read everything at once if file <= 1MB,
// else read in 5000-line chunks to keep memory usage acceptable.
- QIODevice *dev=stream->device();
+ TQIODevice *dev=stream->device();
if (dev && dev->size()>(1024*1024)) {
while(1) {
int i;
textLine="";
for (i=0; i<5000; i++) {
- QString line=stream->readLine();
+ TQString line=stream->readLine();
if (line.isNull()) break; // EOF
textLine+=line+'\n';
}
@@ -138,7 +138,7 @@ KEdit::insertText(QTextStream *stream)
// kedit used to be really really fast using memmap etc .....
// oh well ....
- // QString str = text();
+ // TQString str = text();
// for (int i = 0; i < (int) str.length(); i++)
// printf("KEdit: U+%04X\n", str[i].unicode());
@@ -150,21 +150,21 @@ KEdit::cleanWhiteSpace()
d->autoUpdate = false;
if (!hasMarkedText())
selectAll();
- QString oldText = markedText();
- QString newText;
- QStringList lines = QStringList::split('\n', oldText, true);
+ TQString oldText = markedText();
+ TQString newText;
+ TQStringList lines = TQStringList::split('\n', oldText, true);
bool addSpace = false;
bool firstLine = true;
- QChar lastChar = oldText[oldText.length()-1];
- QChar firstChar = oldText[0];
- for(QStringList::Iterator it = lines.begin();
+ TQChar lastChar = oldText[oldText.length()-1];
+ TQChar firstChar = oldText[0];
+ for(TQStringList::Iterator it = lines.begin();
it != lines.end();)
{
- QString line = (*it).simplifyWhiteSpace();
+ TQString line = (*it).simplifyWhiteSpace();
if (line.isEmpty())
{
if (addSpace)
- newText += QString::fromLatin1("\n\n");
+ newText += TQString::fromLatin1("\n\n");
if (firstLine)
{
if (firstChar.isSpace())
@@ -206,16 +206,16 @@ KEdit::cleanWhiteSpace()
if (wordWrap() == NoWrap)
{
// If wordwrap is off, we have to do some line-wrapping ourselves now
- // We use another QMultiLineEdit for this, so that we get nice undo
+ // We use another TQMultiLineEdit for this, so that we get nice undo
// behavior.
- QMultiLineEdit *we = new QMultiLineEdit();
+ TQMultiLineEdit *we = new TQMultiLineEdit();
we->setWordWrap(FixedColumnWidth);
we->setWrapColumnOrWidth(78);
we->setText(newText);
- newText = QString::null;
+ newText = TQString::null;
for(int i = 0; i < we->numLines(); i++)
{
- QString line = we->textLine(i);
+ TQString line = we->textLine(i);
if (line.right(1) != "\n")
line += '\n';
newText += line;
@@ -233,13 +233,13 @@ KEdit::cleanWhiteSpace()
void
-KEdit::saveText(QTextStream *stream)
+KEdit::saveText(TQTextStream *stream)
{
saveText(stream, false);
}
void
-KEdit::saveText(QTextStream *stream, bool softWrap)
+KEdit::saveText(TQTextStream *stream, bool softWrap)
{
int line_count = numLines()-1;
if (line_count < 0)
@@ -264,7 +264,7 @@ KEdit::saveText(QTextStream *stream, bool softWrap)
}
else
{
- QString parag_text = textLine(i);
+ TQString parag_text = textLine(i);
int pos = 0;
int first_pos = 0;
int current_line = 0;
@@ -331,7 +331,7 @@ void KEdit::computePosition()
line_pos += line_offset;
// We now calculate where the current line starts in the paragraph.
- QString linetext = textLine(line);
+ TQString linetext = textLine(line);
int start_of_line = 0;
if (line_offset > 0)
{
@@ -380,7 +380,7 @@ void KEdit::computePosition()
}
-void KEdit::keyPressEvent ( QKeyEvent *e)
+void KEdit::keyPressEvent ( TQKeyEvent *e)
{
// ignore Ctrl-Return so that KDialogBase can catch them
if ( e->key() == Key_Return && e->state() == ControlButton ) {
@@ -395,7 +395,7 @@ void KEdit::keyPressEvent ( QKeyEvent *e)
int line = 0;
int col = 0;
- QString killstring;
+ TQString killstring;
if(!killing){
killbufferstring = "";
@@ -442,7 +442,7 @@ void KEdit::keyPressEvent ( QKeyEvent *e)
killing = true;
- QMultiLineEdit::keyPressEvent(e);
+ TQMultiLineEdit::keyPressEvent(e);
setModified(true);
return;
}
@@ -453,7 +453,7 @@ void KEdit::keyPressEvent ( QKeyEvent *e)
getCursorPosition(&line,&col);
- QString tmpstring = killbufferstring;
+ TQString tmpstring = killbufferstring;
if(!killtrue)
tmpstring += '\n';
@@ -469,10 +469,10 @@ void KEdit::keyPressEvent ( QKeyEvent *e)
if ( KStdAccel::copy().contains( key ) )
copy();
else if ( isReadOnly() )
- QMultiLineEdit::keyPressEvent( e );
- // If this is an unmodified printable key, send it directly to QMultiLineEdit.
+ TQMultiLineEdit::keyPressEvent( e );
+ // If this is an unmodified printable key, send it directly to TQMultiLineEdit.
else if ( !(key.keyCodeQt() & (CTRL | ALT)) && !e->text().isEmpty() && e->text().unicode()->isPrint() )
- QMultiLineEdit::keyPressEvent( e );
+ TQMultiLineEdit::keyPressEvent( e );
else if ( KStdAccel::paste().contains( key ) ) {
paste();
setModified(true);
@@ -557,16 +557,16 @@ void KEdit::keyPressEvent ( QKeyEvent *e)
}
}
else
- QMultiLineEdit::keyPressEvent(e);
+ TQMultiLineEdit::keyPressEvent(e);
}
-void KEdit::installRBPopup(QPopupMenu *p) {
+void KEdit::installRBPopup(TQPopupMenu *p) {
KContextMenuManager::insert( this, p );
}
void KEdit::selectFont(){
- QFont font = this->font();
+ TQFont font = this->font();
KFontDialog::getFont(font);
this->setFont(font);
@@ -616,55 +616,55 @@ void KEdit::doGotoLine() {
}
-void KEdit::dragMoveEvent(QDragMoveEvent* e) {
+void KEdit::dragMoveEvent(TQDragMoveEvent* e) {
if(KURLDrag::canDecode(e))
e->accept();
- else if(QTextDrag::canDecode(e))
- QMultiLineEdit::dragMoveEvent(e);
+ else if(TQTextDrag::canDecode(e))
+ TQMultiLineEdit::dragMoveEvent(e);
}
-void KEdit::contentsDragMoveEvent(QDragMoveEvent* e) {
+void KEdit::contentsDragMoveEvent(TQDragMoveEvent* e) {
if(KURLDrag::canDecode(e))
e->accept();
- else if(QTextDrag::canDecode(e))
- QMultiLineEdit::contentsDragMoveEvent(e);
+ else if(TQTextDrag::canDecode(e))
+ TQMultiLineEdit::contentsDragMoveEvent(e);
}
-void KEdit::dragEnterEvent(QDragEnterEvent* e) {
+void KEdit::dragEnterEvent(TQDragEnterEvent* e) {
kdDebug() << "KEdit::dragEnterEvent()" << endl;
- e->accept(KURLDrag::canDecode(e) || QTextDrag::canDecode(e));
+ e->accept(KURLDrag::canDecode(e) || TQTextDrag::canDecode(e));
}
-void KEdit::contentsDragEnterEvent(QDragEnterEvent* e) {
+void KEdit::contentsDragEnterEvent(TQDragEnterEvent* e) {
kdDebug() << "KEdit::contentsDragEnterEvent()" << endl;
- e->accept(KURLDrag::canDecode(e) || QTextDrag::canDecode(e));
+ e->accept(KURLDrag::canDecode(e) || TQTextDrag::canDecode(e));
}
-void KEdit::dropEvent(QDropEvent* e) {
+void KEdit::dropEvent(TQDropEvent* e) {
kdDebug() << "KEdit::dropEvent()" << endl;
if(KURLDrag::canDecode(e)) {
emit gotUrlDrop(e);
}
- else if(QTextDrag::canDecode(e))
- QMultiLineEdit::dropEvent(e);
+ else if(TQTextDrag::canDecode(e))
+ TQMultiLineEdit::dropEvent(e);
}
-void KEdit::contentsDropEvent(QDropEvent* e) {
+void KEdit::contentsDropEvent(TQDropEvent* e) {
kdDebug() << "KEdit::contentsDropEvent()" << endl;
if(KURLDrag::canDecode(e)) {
emit gotUrlDrop(e);
}
- else if(QTextDrag::canDecode(e))
- QMultiLineEdit::contentsDropEvent(e);
+ else if(TQTextDrag::canDecode(e))
+ TQMultiLineEdit::contentsDropEvent(e);
}
void KEdit::setOverwriteEnabled(bool b)
@@ -672,10 +672,10 @@ void KEdit::setOverwriteEnabled(bool b)
d->overwriteEnabled = b;
}
-// QWidget::create() turns off mouse-Tracking which would break auto-hiding
+// TQWidget::create() turns off mouse-Tracking which would break auto-hiding
void KEdit::create( WId id, bool initializeWindow, bool destroyOldWindow )
{
- QMultiLineEdit::create( id, initializeWindow, destroyOldWindow );
+ TQMultiLineEdit::create( id, initializeWindow, destroyOldWindow );
KCursor::setAutoHideCursor( this, true );
}
@@ -684,23 +684,23 @@ void KEdit::ensureCursorVisible()
if (!d->autoUpdate)
return;
- QMultiLineEdit::ensureCursorVisible();
+ TQMultiLineEdit::ensureCursorVisible();
}
-void KEdit::setCursor( const QCursor &c )
+void KEdit::setCursor( const TQCursor &c )
{
if (!d->autoUpdate)
return;
- QMultiLineEdit::setCursor(c);
+ TQMultiLineEdit::setCursor(c);
}
-void KEdit::viewportPaintEvent( QPaintEvent*pe )
+void KEdit::viewportPaintEvent( TQPaintEvent*pe )
{
if (!d->autoUpdate)
return;
- QMultiLineEdit::viewportPaintEvent(pe);
+ TQMultiLineEdit::viewportPaintEvent(pe);
}
diff --git a/kdeui/keditcl2.cpp b/kdeui/keditcl2.cpp
index 8a20eaad6..36d1b8f3b 100644
--- a/kdeui/keditcl2.cpp
+++ b/kdeui/keditcl2.cpp
@@ -21,15 +21,15 @@
#include <limits.h> // INT_MAX
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qvbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qpopupmenu.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqvbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqpopupmenu.h>
#include <kapplication.h>
#include <kcombobox.h>
@@ -58,14 +58,14 @@ void KEdit::search(){
if( !srchdialog )
{
srchdialog = new KEdFind( this, "searchdialog", false);
- connect(srchdialog,SIGNAL(search()),this,SLOT(search_slot()));
- connect(srchdialog,SIGNAL(done()),this,SLOT(searchdone_slot()));
+ connect(srchdialog,TQT_SIGNAL(search()),this,TQT_SLOT(search_slot()));
+ connect(srchdialog,TQT_SIGNAL(done()),this,TQT_SLOT(searchdone_slot()));
}
// If we already searched / replaced something before make sure it shows
// up in the find dialog line-edit.
- QString string;
+ TQString string;
string = srchdialog->getText();
srchdialog->setText(string.isEmpty() ? pattern : string);
@@ -84,7 +84,7 @@ void KEdit::search_slot(){
if (!srchdialog)
return;
- QString to_find_string = srchdialog->getText();
+ TQString to_find_string = srchdialog->getText();
getCursorPosition(&line,&col);
// srchdialog->get_direction() is true if searching backward
@@ -119,7 +119,7 @@ again:
"Continue from the end?"),
i18n("Find"),KStdGuiItem::cont(),i18n("Stop"));
if (query == KMessageBox::Yes){
- QString string = textLine( numLines() - 1 );
+ TQString string = textLine( numLines() - 1 );
line = numLines() - 1;
col = string.length();
last_search = BACKWARD;
@@ -144,8 +144,8 @@ void KEdit::searchdone_slot(){
last_search = NONE;
}
-/* antlarr: KDE 4: make it const QString & */
-int KEdit::doSearch(QString s_pattern, bool case_sensitive,
+/* antlarr: KDE 4: make it const TQString & */
+int KEdit::doSearch(TQString s_pattern, bool case_sensitive,
bool wildcard, bool forward, int line, int col){
(void) wildcard; // reserved for possible extension to regex
@@ -156,7 +156,7 @@ int KEdit::doSearch(QString s_pattern, bool case_sensitive,
if(forward){
- QString string;
+ TQString string;
for(i = line; i < numLines(); i++) {
@@ -184,7 +184,7 @@ int KEdit::doSearch(QString s_pattern, bool case_sensitive,
}
else{ // searching backwards
- QString string;
+ TQString string;
for(i = line; i >= 0; i--) {
@@ -254,13 +254,13 @@ void KEdit::replace()
if( !replace_dialog )
{
replace_dialog = new KEdReplace( this, "replace_dialog", false );
- connect(replace_dialog,SIGNAL(find()),this,SLOT(replace_search_slot()));
- connect(replace_dialog,SIGNAL(replace()),this,SLOT(replace_slot()));
- connect(replace_dialog,SIGNAL(replaceAll()),this,SLOT(replace_all_slot()));
- connect(replace_dialog,SIGNAL(done()),this,SLOT(replacedone_slot()));
+ connect(replace_dialog,TQT_SIGNAL(find()),this,TQT_SLOT(replace_search_slot()));
+ connect(replace_dialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replace_slot()));
+ connect(replace_dialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replace_all_slot()));
+ connect(replace_dialog,TQT_SIGNAL(done()),this,TQT_SLOT(replacedone_slot()));
}
- QString string = replace_dialog->getText();
+ TQString string = replace_dialog->getText();
replace_dialog->setText(string.isEmpty() ? pattern : string);
@@ -284,7 +284,7 @@ void KEdit::replace_slot(){
int line,col, length;
- QString string = replace_dialog->getReplaceText();
+ TQString string = replace_dialog->getReplaceText();
length = string.length();
this->cut();
@@ -318,7 +318,7 @@ void KEdit::replace_all_slot(){
if (!replace_dialog)
return;
- QString to_find_string = replace_dialog->getText();
+ TQString to_find_string = replace_dialog->getText();
int lineFrom, lineTo, colFrom, colTo;
getSelection(&lineFrom, &colFrom, &lineTo, &colTo);
@@ -389,7 +389,7 @@ again:
"Continue from the end?"),
i18n("Find"),KStdGuiItem::cont(),i18n("Stop"));
if (query == KMessageBox::Yes){
- QString string = textLine( numLines() - 1 );
+ TQString string = textLine( numLines() - 1 );
replace_all_line = numLines() - 1;
replace_all_col = string.length();
last_replace = BACKWARD;
@@ -409,7 +409,7 @@ void KEdit::replace_search_slot(){
if (!replace_dialog)
return;
- QString to_find_string = replace_dialog->getText();
+ TQString to_find_string = replace_dialog->getText();
int lineFrom, lineTo, colFrom, colTo;
getSelection(&lineFrom, &colFrom, &lineTo, &colTo);
@@ -468,7 +468,7 @@ again:
"Continue from the end?"),
i18n("Replace"),KStdGuiItem::cont(),i18n("Stop"));
if (query == KMessageBox::Yes){
- QString string = textLine( numLines() - 1 );
+ TQString string = textLine( numLines() - 1 );
line = numLines() - 1;
col = string.length();
last_replace = BACKWARD;
@@ -501,8 +501,8 @@ void KEdit::replacedone_slot(){
-/* antlarr: KDE 4: make it const QString & */
-int KEdit::doReplace(QString s_pattern, bool case_sensitive,
+/* antlarr: KDE 4: make it const TQString & */
+int KEdit::doReplace(TQString s_pattern, bool case_sensitive,
bool wildcard, bool forward, int line, int col, bool replace_all){
@@ -511,9 +511,9 @@ int KEdit::doReplace(QString s_pattern, bool case_sensitive,
int line_counter, length;
int pos = -1;
- QString string;
- QString stringnew;
- QString replacement;
+ TQString string;
+ TQString stringnew;
+ TQString replacement;
replacement = replace_dialog->getReplaceText();
line_counter = line;
@@ -684,7 +684,7 @@ int KEdit::doReplace(QString s_pattern, bool case_sensitive,
class KEdFind::KEdFindPrivate
{
public:
- KEdFindPrivate( QWidget *parent ) {
+ KEdFindPrivate( TQWidget *parent ) {
combo = new KHistoryCombo( parent, "value" );
combo->setMaxCount( 20 ); // just some default
}
@@ -696,45 +696,45 @@ public:
};
-KEdFind::KEdFind( QWidget *parent, const char *name, bool modal )
+KEdFind::KEdFind( TQWidget *parent, const char *name, bool modal )
:KDialogBase( parent, name, modal, i18n("Find"),
modal ? User1|Cancel : User1|Close, User1, false, KGuiItem( i18n("&Find"), "find") )
{
setWFlags( WType_TopLevel );
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
d = new KEdFindPrivate( page );
- QString text = i18n("Find:");
- QLabel *label = new QLabel( text, page , "find" );
+ TQString text = i18n("Find:");
+ TQLabel *label = new TQLabel( text, page , "find" );
topLayout->addWidget( label );
d->combo->setMinimumWidth(fontMetrics().maxWidth()*20);
d->combo->setFocus();
- connect(d->combo, SIGNAL(textChanged ( const QString & )),
- this,SLOT(textSearchChanged ( const QString & )));
+ connect(d->combo, TQT_SIGNAL(textChanged ( const TQString & )),
+ this,TQT_SLOT(textSearchChanged ( const TQString & )));
topLayout->addWidget(d->combo);
- group = new QVButtonGroup( i18n("Options"), page );
+ group = new TQVButtonGroup( i18n("Options"), page );
topLayout->addWidget( group );
- QHBox* row1 = new QHBox( group );
+ TQHBox* row1 = new TQHBox( group );
text = i18n("Case &sensitive");
- sensitive = new QCheckBox( text, row1, "case");
+ sensitive = new TQCheckBox( text, row1, "case");
text = i18n("Find &backwards");
- direction = new QCheckBox( text, row1, "direction" );
+ direction = new TQCheckBox( text, row1, "direction" );
enableButton( KDialogBase::User1, !d->combo->currentText().isEmpty() );
if ( !modal )
- connect( this, SIGNAL( closeClicked() ), this, SLOT( slotCancel() ) );
+ connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SLOT( slotCancel() ) );
}
KEdFind::~KEdFind()
@@ -742,7 +742,7 @@ KEdFind::~KEdFind()
delete d;
}
-void KEdFind::textSearchChanged ( const QString &text )
+void KEdFind::textSearchChanged ( const TQString &text )
{
enableButton( KDialogBase::User1, !text.isEmpty() );
}
@@ -763,14 +763,14 @@ void KEdFind::slotUser1( void )
}
-QString KEdFind::getText() const
+TQString KEdFind::getText() const
{
return d->combo->currentText();
}
-/* antlarr: KDE 4: make it const QString & */
-void KEdFind::setText(QString string)
+/* antlarr: KDE 4: make it const TQString & */
+void KEdFind::setText(TQString string)
{
d->combo->setEditText(string);
d->combo->lineEdit()->selectAll();
@@ -811,7 +811,7 @@ KHistoryCombo * KEdFind::searchCombo() const
class KEdReplace::KEdReplacePrivate
{
public:
- KEdReplacePrivate( QWidget *parent ) {
+ KEdReplacePrivate( TQWidget *parent ) {
searchCombo = new KHistoryCombo( parent, "value" );
replaceCombo = new KHistoryCombo( parent, "replace_value" );
@@ -826,7 +826,7 @@ public:
KHistoryCombo *searchCombo, *replaceCombo;
};
-KEdReplace::KEdReplace( QWidget *parent, const char *name, bool modal )
+KEdReplace::KEdReplace( TQWidget *parent, const char *name, bool modal )
:KDialogBase( parent, name, modal, i18n("Replace"),
modal ? User3|User2|User1|Cancel : User3|User2|User1|Close,
User3, false,
@@ -836,13 +836,13 @@ KEdReplace::KEdReplace( QWidget *parent, const char *name, bool modal )
setButtonBoxOrientation( Vertical );
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
d = new KEdReplacePrivate( page );
- QString text = i18n("Find:");
- QLabel *label = new QLabel( text, page, "find" );
+ TQString text = i18n("Find:");
+ TQLabel *label = new TQLabel( text, page, "find" );
topLayout->addWidget( label );
d->searchCombo->setMinimumWidth(fontMetrics().maxWidth()*20);
@@ -850,25 +850,25 @@ KEdReplace::KEdReplace( QWidget *parent, const char *name, bool modal )
topLayout->addWidget(d->searchCombo);
text = i18n("Replace with:");
- label = new QLabel( text, page, "replace" );
+ label = new TQLabel( text, page, "replace" );
topLayout->addWidget( label );
d->replaceCombo->setMinimumWidth(fontMetrics().maxWidth()*20);
topLayout->addWidget(d->replaceCombo);
- connect(d->searchCombo, SIGNAL(textChanged ( const QString & )),
- this,SLOT(textSearchChanged ( const QString & )));
+ connect(d->searchCombo, TQT_SIGNAL(textChanged ( const TQString & )),
+ this,TQT_SLOT(textSearchChanged ( const TQString & )));
- QButtonGroup *group = new QButtonGroup( i18n("Options"), page );
+ TQButtonGroup *group = new TQButtonGroup( i18n("Options"), page );
topLayout->addWidget( group );
- QGridLayout *gbox = new QGridLayout( group, 3, 2, spacingHint() );
+ TQGridLayout *gbox = new TQGridLayout( group, 3, 2, spacingHint() );
gbox->addRowSpacing( 0, fontMetrics().lineSpacing() );
text = i18n("Case &sensitive");
- sensitive = new QCheckBox( text, group, "case");
+ sensitive = new TQCheckBox( text, group, "case");
text = i18n("Find &backwards");
- direction = new QCheckBox( text, group, "direction" );
+ direction = new TQCheckBox( text, group, "direction" );
gbox->addWidget( sensitive, 1, 0 );
gbox->addWidget( direction, 1, 1 );
gbox->setRowStretch( 2, 10 );
@@ -880,7 +880,7 @@ KEdReplace::~KEdReplace()
delete d;
}
-void KEdReplace::textSearchChanged ( const QString &text )
+void KEdReplace::textSearchChanged ( const TQString &text )
{
bool state=text.isEmpty();
enableButton( KDialogBase::User1, !state );
@@ -930,20 +930,20 @@ void KEdReplace::slotUser3( void )
}
-QString KEdReplace::getText()
+TQString KEdReplace::getText()
{
return d->searchCombo->currentText();
}
-QString KEdReplace::getReplaceText()
+TQString KEdReplace::getReplaceText()
{
return d->replaceCombo->currentText();
}
-/* antlarr: KDE 4: make it const QString & */
-void KEdReplace::setText(QString string)
+/* antlarr: KDE 4: make it const TQString & */
+void KEdReplace::setText(TQString string)
{
d->searchCombo->setEditText(string);
d->searchCombo->lineEdit()->selectAll();
@@ -972,12 +972,12 @@ KHistoryCombo * KEdReplace::replaceCombo() const
}
-KEdGotoLine::KEdGotoLine( QWidget *parent, const char *name, bool modal )
+KEdGotoLine::KEdGotoLine( TQWidget *parent, const char *name, bool modal )
:KDialogBase( parent, name, modal, i18n("Go to Line"), modal ? Ok|Cancel : Ok|Close, Ok, false )
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
lineNum = new KIntNumInput( 1, page);
lineNum->setRange(1, 1000000, 1, false);
@@ -1013,7 +1013,7 @@ void KEdit::spellcheck_start()
setReadOnly(true);
}
-void KEdit::misspelling (const QString &word, const QStringList &, unsigned int pos)
+void KEdit::misspelling (const TQString &word, const TQStringList &, unsigned int pos)
{
unsigned int l = 0;
@@ -1031,7 +1031,7 @@ void KEdit::misspelling (const QString &word, const QStringList &, unsigned int
}
//need to use pos for insert, not cur, so forget cur altogether
-void KEdit::corrected (const QString &originalword, const QString &newword, unsigned int pos)
+void KEdit::corrected (const TQString &originalword, const TQString &newword, unsigned int pos)
{
//we'll reselect the original word in case the user has played with
//the selection in eframe or the word was auto-replaced
@@ -1072,20 +1072,20 @@ void KEdit::spellcheck_stop()
setReadOnly ( saved_readonlystate);
}
-QString KEdit::selectWordUnderCursor( )
+TQString KEdit::selectWordUnderCursor( )
{
int parag;
int pos;
getCursorPosition(&parag, &pos);
- QString txt = text(parag);
+ TQString txt = text(parag);
// Find start
int start = pos;
while( start > 0 )
{
- const QChar &ch = txt[start-1];
+ const TQChar &ch = txt[start-1];
if (ch.isSpace() || ch.isPunct())
break;
start--;
@@ -1096,7 +1096,7 @@ QString KEdit::selectWordUnderCursor( )
int len = txt.length();
while( end < len )
{
- const QChar &ch = txt[end];
+ const TQChar &ch = txt[end];
if (ch.isSpace() || ch.isPunct())
break;
end++;
@@ -1105,11 +1105,11 @@ QString KEdit::selectWordUnderCursor( )
return txt.mid(start, end-start);
}
-QPopupMenu *KEdit::createPopupMenu( const QPoint& pos )
+TQPopupMenu *KEdit::createPopupMenu( const TQPoint& pos )
{
enum { IdUndo, IdRedo, IdSep1, IdCut, IdCopy, IdPaste, IdClear, IdSep2, IdSelectAll };
- QPopupMenu *menu = QMultiLineEdit::createPopupMenu( pos );
+ TQPopupMenu *menu = TQMultiLineEdit::createPopupMenu( pos );
if ( isReadOnly() )
menu->changeItem( menu->idAt(0), SmallIconSet("editcopy"), menu->text( menu->idAt(0) ) );
diff --git a/kdeui/keditlistbox.cpp b/kdeui/keditlistbox.cpp
index 88942ebc7..b58244e93 100644
--- a/kdeui/keditlistbox.cpp
+++ b/kdeui/keditlistbox.cpp
@@ -18,13 +18,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstringlist.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qwhatsthis.h>
-#include <qlabel.h>
+#include <tqstringlist.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
#include <kcombobox.h>
#include <kdebug.h>
@@ -45,24 +45,24 @@ public:
uint buttons;
};
-KEditListBox::KEditListBox(QWidget *parent, const char *name,
+KEditListBox::KEditListBox(TQWidget *parent, const char *name,
bool checkAtEntering, int buttons )
- :QGroupBox(parent, name ), d(new KEditListBoxPrivate)
+ :TQGroupBox(parent, name ), d(new KEditListBoxPrivate)
{
init( checkAtEntering, buttons );
}
-KEditListBox::KEditListBox(const QString& title, QWidget *parent,
+KEditListBox::KEditListBox(const TQString& title, TQWidget *parent,
const char *name, bool checkAtEntering, int buttons)
- :QGroupBox(title, parent, name ), d(new KEditListBoxPrivate)
+ :TQGroupBox(title, parent, name ), d(new KEditListBoxPrivate)
{
init( checkAtEntering, buttons );
}
-KEditListBox::KEditListBox(const QString& title, const CustomEditor& custom,
- QWidget *parent, const char *name,
+KEditListBox::KEditListBox(const TQString& title, const CustomEditor& custom,
+ TQWidget *parent, const char *name,
bool checkAtEntering, int buttons)
- :QGroupBox(title, parent, name ), d(new KEditListBoxPrivate)
+ :TQGroupBox(title, parent, name ), d(new KEditListBoxPrivate)
{
m_lineEdit = custom.lineEdit();
init( checkAtEntering, buttons, custom.representationWidget() );
@@ -74,15 +74,15 @@ KEditListBox::~KEditListBox()
}
void KEditListBox::init( bool checkAtEntering, int buttons,
- QWidget *representationWidget )
+ TQWidget *representationWidget )
{
d->m_checkAtEntering = checkAtEntering;
servNewButton = servRemoveButton = servUpButton = servDownButton = 0L;
- setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,
- QSizePolicy::MinimumExpanding));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::MinimumExpanding));
- QGridLayout * grid = new QGridLayout(this, 7, 2,
+ TQGridLayout * grid = new TQGridLayout(this, 7, 2,
KDialog::marginHint(),
KDialog::spacingHint());
grid->addRowSpacing(0, fontMetrics().lineSpacing());
@@ -91,13 +91,13 @@ void KEditListBox::init( bool checkAtEntering, int buttons,
grid->setMargin(15);
if ( representationWidget )
- representationWidget->reparent( this, QPoint(0,0) );
+ representationWidget->reparent( this, TQPoint(0,0) );
else
m_lineEdit=new KLineEdit(this);
- m_listBox = new QListBox(this);
+ m_listBox = new TQListBox(this);
- QWidget *editingWidget = representationWidget ?
+ TQWidget *editingWidget = representationWidget ?
representationWidget : m_lineEdit;
grid->addMultiCellWidget(editingWidget,1,1,0,1);
grid->addMultiCellWidget(m_listBox, 2, 6, 0, 0);
@@ -105,10 +105,10 @@ void KEditListBox::init( bool checkAtEntering, int buttons,
d->buttons = 0;
setButtons( buttons );
- connect(m_lineEdit,SIGNAL(textChanged(const QString&)),this,SLOT(typedSomething(const QString&)));
+ connect(m_lineEdit,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(typedSomething(const TQString&)));
m_lineEdit->setTrapReturnKey(true);
- connect(m_lineEdit,SIGNAL(returnPressed()),this,SLOT(addItem()));
- connect(m_listBox, SIGNAL(highlighted(int)), SLOT(enableMoveButtons(int)));
+ connect(m_lineEdit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(addItem()));
+ connect(m_listBox, TQT_SIGNAL(highlighted(int)), TQT_SLOT(enableMoveButtons(int)));
// maybe supplied lineedit has some text already
typedSomething( m_lineEdit->text() );
@@ -119,12 +119,12 @@ void KEditListBox::setButtons( uint buttons )
if ( d->buttons == buttons )
return;
- QGridLayout* grid = static_cast<QGridLayout *>( layout() );
+ TQGridLayout* grid = static_cast<TQGridLayout *>( layout() );
if ( ( buttons & Add ) && !servNewButton ) {
- servNewButton = new QPushButton(i18n("&Add"), this);
+ servNewButton = new TQPushButton(i18n("&Add"), this);
servNewButton->setEnabled(false);
servNewButton->show();
- connect(servNewButton, SIGNAL(clicked()), SLOT(addItem()));
+ connect(servNewButton, TQT_SIGNAL(clicked()), TQT_SLOT(addItem()));
grid->addWidget(servNewButton, 2, 1);
} else if ( ( buttons & Add ) == 0 && servNewButton ) {
@@ -133,10 +133,10 @@ void KEditListBox::setButtons( uint buttons )
}
if ( ( buttons & Remove ) && !servRemoveButton ) {
- servRemoveButton = new QPushButton(i18n("&Remove"), this);
+ servRemoveButton = new TQPushButton(i18n("&Remove"), this);
servRemoveButton->setEnabled(false);
servRemoveButton->show();
- connect(servRemoveButton, SIGNAL(clicked()), SLOT(removeItem()));
+ connect(servRemoveButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeItem()));
grid->addWidget(servRemoveButton, 3, 1);
} else if ( ( buttons & Remove ) == 0 && servRemoveButton ) {
@@ -145,15 +145,15 @@ void KEditListBox::setButtons( uint buttons )
}
if ( ( buttons & UpDown ) && !servUpButton ) {
- servUpButton = new QPushButton(i18n("Move &Up"), this);
+ servUpButton = new TQPushButton(i18n("Move &Up"), this);
servUpButton->setEnabled(false);
servUpButton->show();
- connect(servUpButton, SIGNAL(clicked()), SLOT(moveItemUp()));
+ connect(servUpButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemUp()));
- servDownButton = new QPushButton(i18n("Move &Down"), this);
+ servDownButton = new TQPushButton(i18n("Move &Down"), this);
servDownButton->setEnabled(false);
servDownButton->show();
- connect(servDownButton, SIGNAL(clicked()), SLOT(moveItemDown()));
+ connect(servDownButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemDown()));
grid->addWidget(servUpButton, 4, 1);
grid->addWidget(servDownButton, 5, 1);
@@ -165,7 +165,7 @@ void KEditListBox::setButtons( uint buttons )
d->buttons = buttons;
}
-void KEditListBox::typedSomething(const QString& text)
+void KEditListBox::typedSomething(const TQString& text)
{
if(currentItem() >= 0) {
if(currentText() != m_lineEdit->text())
@@ -216,7 +216,7 @@ void KEditListBox::moveItemUp()
return;
}
- QListBoxItem *selItem = m_listBox->item(selIndex);
+ TQListBoxItem *selItem = m_listBox->item(selIndex);
m_listBox->takeItem(selItem);
m_listBox->insertItem(selItem, selIndex-1);
m_listBox->setCurrentItem(selIndex - 1);
@@ -239,7 +239,7 @@ void KEditListBox::moveItemDown()
return;
}
- QListBoxItem *selItem = m_listBox->item(selIndex);
+ TQListBoxItem *selItem = m_listBox->item(selIndex);
m_listBox->takeItem(selItem);
m_listBox->insertItem(selItem, selIndex+1);
m_listBox->setCurrentItem(selIndex + 1);
@@ -255,7 +255,7 @@ void KEditListBox::addItem()
if ( !servNewButton || !servNewButton->isEnabled() )
return;
- const QString& currentTextLE=m_lineEdit->text();
+ const TQString& currentTextLE=m_lineEdit->text();
bool alreadyInList(false);
//if we didn't check for dupes at the inserting we have to do it now
if (!d->m_checkAtEntering)
@@ -304,7 +304,7 @@ void KEditListBox::removeItem()
if ( selected >= 0 )
{
- QString removedText = m_listBox->currentText();
+ TQString removedText = m_listBox->currentText();
m_listBox->removeItem( selected );
if ( count() > 0 )
@@ -361,17 +361,17 @@ void KEditListBox::clear()
emit changed();
}
-void KEditListBox::insertStringList(const QStringList& list, int index)
+void KEditListBox::insertStringList(const TQStringList& list, int index)
{
m_listBox->insertStringList(list,index);
}
-void KEditListBox::insertStrList(const QStrList* list, int index)
+void KEditListBox::insertStrList(const TQStrList* list, int index)
{
m_listBox->insertStrList(list,index);
}
-void KEditListBox::insertStrList(const QStrList& list, int index)
+void KEditListBox::insertStrList(const TQStrList& list, int index)
{
m_listBox->insertStrList(list,index);
}
@@ -381,16 +381,16 @@ void KEditListBox::insertStrList(const char ** list, int numStrings, int index)
m_listBox->insertStrList(list,numStrings,index);
}
-QStringList KEditListBox::items() const
+TQStringList KEditListBox::items() const
{
- QStringList list;
- for (QListBoxItem const * i = m_listBox->firstItem(); i != 0; i = i->next() )
+ TQStringList list;
+ for (TQListBoxItem const * i = m_listBox->firstItem(); i != 0; i = i->next() )
list.append( i->text());
return list;
}
-void KEditListBox::setItems(const QStringList& items)
+void KEditListBox::setItems(const TQStringList& items)
{
m_listBox->clear();
m_listBox->insertStringList(items, 0);
diff --git a/kdeui/keditlistbox.h b/kdeui/keditlistbox.h
index bb27d89f7..e5b828caf 100644
--- a/kdeui/keditlistbox.h
+++ b/kdeui/keditlistbox.h
@@ -20,8 +20,8 @@
#ifndef KEDITLISTBOX_H
#define KEDITLISTBOX_H
-#include <qgroupbox.h>
-#include <qlistbox.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
#include <kdelibs_export.h>
@@ -47,7 +47,7 @@ class KDEUI_EXPORT KEditListBox : public QGroupBox
Q_SETS( Button )
Q_PROPERTY( Button buttons READ buttons WRITE setButtons )
- Q_PROPERTY( QStringList items READ items WRITE setItems )
+ Q_PROPERTY( TQStringList items READ items WRITE setItems )
public:
/**
@@ -62,19 +62,19 @@ public:
KDEUI_EXPORT CustomEditor()
: m_representationWidget( 0L ),
m_lineEdit( 0L ) {}
- KDEUI_EXPORT CustomEditor( QWidget *repWidget, KLineEdit *edit )
+ KDEUI_EXPORT CustomEditor( TQWidget *repWidget, KLineEdit *edit )
: m_representationWidget( repWidget ),
m_lineEdit( edit ) {}
KDEUI_EXPORT CustomEditor( KComboBox *combo );
- KDEUI_EXPORT void setRepresentationWidget( QWidget *repWidget ) {
+ KDEUI_EXPORT void setRepresentationWidget( TQWidget *repWidget ) {
m_representationWidget = repWidget;
}
KDEUI_EXPORT void setLineEdit( KLineEdit *edit ) {
m_lineEdit = edit;
}
- KDEUI_EXPORT virtual QWidget *representationWidget() const {
+ KDEUI_EXPORT virtual TQWidget *representationWidget() const {
return m_representationWidget;
}
KDEUI_EXPORT virtual KLineEdit *lineEdit() const {
@@ -82,7 +82,7 @@ public:
}
protected:
- QWidget *m_representationWidget;
+ TQWidget *m_representationWidget;
KLineEdit *m_lineEdit;
};
@@ -107,7 +107,7 @@ public:
* it will be checked if you press the Add-button. It is not
* possible to enter items twice into the listbox.
*/
- KEditListBox(QWidget *parent = 0, const char *name = 0,
+ KEditListBox(TQWidget *parent = 0, const char *name = 0,
bool checkAtEntering=false, int buttons = All );
/**
* Create an editable listbox.
@@ -115,7 +115,7 @@ public:
* The same as the other constructor, additionally it takes
* @p title, which will be the title of the frame around the listbox.
*/
- KEditListBox(const QString& title, QWidget *parent = 0,
+ KEditListBox(const TQString& title, TQWidget *parent = 0,
const char *name = 0, bool checkAtEntering=false,
int buttons = All );
@@ -131,90 +131,90 @@ public:
* @see KURLRequester::customEditor()
* @since 3.1
*/
- KEditListBox( const QString& title,
+ KEditListBox( const TQString& title,
const CustomEditor &customEditor,
- QWidget *parent = 0, const char *name = 0,
+ TQWidget *parent = 0, const char *name = 0,
bool checkAtEntering = false, int buttons = All );
virtual ~KEditListBox();
/**
- * Return a pointer to the embedded QListBox.
+ * Return a pointer to the embedded TQListBox.
*/
- QListBox* listBox() const { return m_listBox; }
+ TQListBox* listBox() const { return m_listBox; }
/**
- * Return a pointer to the embedded QLineEdit.
+ * Return a pointer to the embedded TQLineEdit.
*/
KLineEdit* lineEdit() const { return m_lineEdit; }
/**
* Return a pointer to the Add button
*/
- QPushButton* addButton() const { return servNewButton; }
+ TQPushButton* addButton() const { return servNewButton; }
/**
* Return a pointer to the Remove button
*/
- QPushButton* removeButton() const { return servRemoveButton; }
+ TQPushButton* removeButton() const { return servRemoveButton; }
/**
* Return a pointer to the Up button
*/
- QPushButton* upButton() const { return servUpButton; }
+ TQPushButton* upButton() const { return servUpButton; }
/**
* Return a pointer to the Down button
*/
- QPushButton* downButton() const { return servDownButton; }
+ TQPushButton* downButton() const { return servDownButton; }
/**
- * See QListBox::count()
+ * See TQListBox::count()
*/
int count() const { return int(m_listBox->count()); }
/**
- * See QListBox::insertStringList()
+ * See TQListBox::insertStringList()
*/
- void insertStringList(const QStringList& list, int index=-1);
+ void insertStringList(const TQStringList& list, int index=-1);
/**
- * See QListBox::insertStringList()
+ * See TQListBox::insertStringList()
*/
- void insertStrList(const QStrList* list, int index=-1);
+ void insertStrList(const TQStrList* list, int index=-1);
/**
- * See QListBox::insertStrList()
+ * See TQListBox::insertStrList()
*/
- void insertStrList(const QStrList& list, int index=-1);
+ void insertStrList(const TQStrList& list, int index=-1);
/**
- * See QListBox::insertStrList()
+ * See TQListBox::insertStrList()
*/
void insertStrList(const char ** list, int numStrings=-1, int index=-1);
/**
- * See QListBox::insertItem()
+ * See TQListBox::insertItem()
*/
- void insertItem(const QString& text, int index=-1) {m_listBox->insertItem(text,index);}
+ void insertItem(const TQString& text, int index=-1) {m_listBox->insertItem(text,index);}
/**
* Clears both the listbox and the line edit.
*/
void clear();
/**
- * See QListBox::text()
+ * See TQListBox::text()
*/
- QString text(int index) const { return m_listBox->text(index); }
+ TQString text(int index) const { return m_listBox->text(index); }
/**
- * See QListBox::currentItem()
+ * See TQListBox::currentItem()
*/
int currentItem() const;
/**
- * See QListBox::currentText()
+ * See TQListBox::currentText()
*/
- QString currentText() const { return m_listBox->currentText(); }
+ TQString currentText() const { return m_listBox->currentText(); }
/**
* @returns a stringlist of all items in the listbox
*/
- QStringList items() const;
+ TQStringList items() const;
/**
* Clears the listbox and sets the contents to @p items
*
* @since 3.4
*/
- void setItems(const QStringList& items);
+ void setItems(const TQStringList& items);
/**
* Returns which buttons are visible
@@ -234,14 +234,14 @@ public:
* the parameter is the added string.
* @since 3.2
*/
- void added( const QString & text );
+ void added( const TQString & text );
/**
* This signal is emitted when the user removes a string from the list,
* the parameter is the removed string.
* @since 3.2
*/
- void removed( const QString & text );
+ void removed( const TQString & text );
protected slots:
//the names should be self-explaining
@@ -250,17 +250,17 @@ public:
void addItem();
void removeItem();
void enableMoveButtons(int index);
- void typedSomething(const QString& text);
+ void typedSomething(const TQString& text);
private:
- QListBox *m_listBox;
- QPushButton *servUpButton, *servDownButton;
- QPushButton *servNewButton, *servRemoveButton;
+ TQListBox *m_listBox;
+ TQPushButton *servUpButton, *servDownButton;
+ TQPushButton *servNewButton, *servRemoveButton;
KLineEdit *m_lineEdit;
//this is called in both ctors, to avoid code duplication
void init( bool checkAtEntering, int buttons,
- QWidget *representationWidget = 0L );
+ TQWidget *representationWidget = 0L );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kedittoolbar.cpp b/kdeui/kedittoolbar.cpp
index 09fa3dee0..2d01dc469 100644
--- a/kdeui/kedittoolbar.cpp
+++ b/kdeui/kedittoolbar.cpp
@@ -18,18 +18,18 @@
*/
#include <kedittoolbar.h>
-#include <qdom.h>
-#include <qlayout.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qheader.h>
-#include <qcombobox.h>
-#include <qdragobject.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qvaluelist.h>
-#include <qapplication.h>
-#include <qtextstream.h>
+#include <tqdom.h>
+#include <tqlayout.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqheader.h>
+#include <tqcombobox.h>
+#include <tqdragobject.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqvaluelist.h>
+#include <tqapplication.h>
+#include <tqtextstream.h>
#include <kaction.h>
#include <kstandarddirs.h>
@@ -52,15 +52,15 @@ static const char * const separatorstring = I18N_NOOP("--- separator ---");
#define LINESEPARATORSTRING i18n(lineseparatorstring)
#define SEPARATORSTRING i18n(separatorstring)
-static void dump_xml(const QDomDocument& doc)
+static void dump_xml(const TQDomDocument& doc)
{
- QString str;
- QTextStream ts(&str, IO_WriteOnly);
+ TQString str;
+ TQTextStream ts(&str, IO_WriteOnly);
ts << doc;
kdDebug() << str << endl;
}
-typedef QValueList<QDomElement> ToolbarList;
+typedef TQValueList<TQDomElement> ToolbarList;
namespace
{
@@ -74,8 +74,8 @@ public:
m_actionCollection = 0;
}
- QString m_xmlFile;
- QDomDocument m_document;
+ TQString m_xmlFile;
+ TQDomDocument m_document;
XmlType m_type;
bool m_isModified;
KActionCollection* m_actionCollection;
@@ -83,30 +83,30 @@ public:
ToolbarList m_barList;
};
-typedef QValueList<XmlData> XmlDataList;
+typedef TQValueList<XmlData> XmlDataList;
class ToolbarItem : public QListViewItem
{
public:
- ToolbarItem(KListView *parent, const QString& tag = QString::null, const QString& name = QString::null, const QString& statusText = QString::null)
- : QListViewItem(parent),
+ ToolbarItem(KListView *parent, const TQString& tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null)
+ : TQListViewItem(parent),
m_tag(tag),
m_name(name),
m_statusText(statusText)
{
}
- ToolbarItem(KListView *parent, QListViewItem *item, const QString &tag = QString::null, const QString& name = QString::null, const QString& statusText = QString::null)
- : QListViewItem(parent, item),
+ ToolbarItem(KListView *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),
m_statusText(statusText)
{
}
- virtual QString key(int column, bool) const
+ virtual TQString key(int column, bool) const
{
- QString s = text( column );
+ TQString s = text( column );
if ( s == LINESEPARATORSTRING )
return "0";
if ( s == SEPARATORSTRING )
@@ -114,16 +114,16 @@ public:
return "2" + s;
}
- void setInternalTag(const QString &tag) { m_tag = tag; }
- void setInternalName(const QString &name) { m_name = name; }
- void setStatusText(const QString &text) { m_statusText = text; }
- QString internalTag() const { return m_tag; }
- QString internalName() const { return m_name; }
- QString statusText() const { return m_statusText; }
+ void setInternalTag(const TQString &tag) { m_tag = tag; }
+ void setInternalName(const TQString &name) { m_name = name; }
+ void setStatusText(const TQString &text) { m_statusText = text; }
+ TQString internalTag() const { return m_tag; }
+ TQString internalName() const { return m_name; }
+ TQString statusText() const { return m_statusText; }
private:
- QString m_tag;
- QString m_name;
- QString m_statusText;
+ TQString m_tag;
+ TQString m_name;
+ TQString m_statusText;
};
#define TOOLBARITEMMIMETYPE "data/x-kde.toolbar.item"
@@ -131,12 +131,12 @@ class ToolbarItemDrag : public QStoredDrag
{
public:
ToolbarItemDrag(ToolbarItem *toolbarItem,
- QWidget *dragSource = 0, const char *name = 0)
- : QStoredDrag( TOOLBARITEMMIMETYPE, dragSource, name )
+ TQWidget *dragSource = 0, const char *name = 0)
+ : TQStoredDrag( TOOLBARITEMMIMETYPE, dragSource, name )
{
if (toolbarItem) {
- QByteArray data;
- QDataStream out(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream out(data, IO_WriteOnly);
out << toolbarItem->internalTag();
out << toolbarItem->internalName();
out << toolbarItem->statusText();
@@ -145,22 +145,22 @@ public:
}
}
- static bool canDecode(QMimeSource* e)
+ static bool canDecode(TQMimeSource* e)
{
return e->provides(TOOLBARITEMMIMETYPE);
}
- static bool decode( const QMimeSource* e, ToolbarItem& item )
+ static bool decode( const TQMimeSource* e, ToolbarItem& item )
{
if (!e)
return false;
- QByteArray data = e->encodedData(TOOLBARITEMMIMETYPE);
+ TQByteArray data = e->encodedData(TOOLBARITEMMIMETYPE);
if ( data.isEmpty() )
return false;
- QString internalTag, internalName, statusText, text;
- QDataStream in(data, IO_ReadOnly);
+ TQString internalTag, internalName, statusText, text;
+ TQDataStream in(data, IO_ReadOnly);
in >> internalTag;
in >> internalName;
in >> statusText;
@@ -178,18 +178,18 @@ public:
class ToolbarListView : public KListView
{
public:
- ToolbarListView(QWidget *parent=0, const char *name=0)
+ ToolbarListView(TQWidget *parent=0, const char *name=0)
: KListView(parent, name)
{
}
protected:
- virtual QDragObject *dragObject()
+ virtual TQDragObject *dragObject()
{
ToolbarItem *item = dynamic_cast<ToolbarItem*>(selectedItem());
if ( item ) {
ToolbarItemDrag *obj = new ToolbarItemDrag(item,
this, "ToolbarAction drag item");
- const QPixmap *pm = item->pixmap(0);
+ const TQPixmap *pm = item->pixmap(0);
if( pm )
obj->setPixmap( *pm );
return obj;
@@ -197,7 +197,7 @@ protected:
return 0;
}
- virtual bool acceptDrag(QDropEvent *event) const
+ virtual bool acceptDrag(TQDropEvent *event) const
{
return ToolbarItemDrag::canDecode( event );
}
@@ -226,22 +226,22 @@ public:
{
}
- QString xmlFile(const QString& xml_file)
+ TQString xmlFile(const TQString& xml_file)
{
- return xml_file.isNull() ? QString(m_instance->instanceName()) + "ui.rc" :
+ return xml_file.isNull() ? TQString(m_instance->instanceName()) + "ui.rc" :
xml_file;
}
/**
* Load in the specified XML file and dump the raw xml
*/
- QString loadXMLFile(const QString& _xml_file)
+ TQString loadXMLFile(const TQString& _xml_file)
{
- QString raw_xml;
- QString xml_file = xmlFile(_xml_file);
+ TQString raw_xml;
+ TQString xml_file = xmlFile(_xml_file);
//kdDebug() << "loadXMLFile xml_file=" << xml_file << endl;
- if ( !QDir::isRelativePath(xml_file) )
+ if ( !TQDir::isRelativePath(xml_file) )
raw_xml = KXMLGUIFactory::readConfigFile(xml_file);
else
raw_xml = KXMLGUIFactory::readConfigFile(xml_file, m_instance);
@@ -252,15 +252,15 @@ public:
/**
* Return a list of toolbar elements given a toplevel element
*/
- ToolbarList findToolbars(QDomNode n)
+ ToolbarList findToolbars(TQDomNode n)
{
- static const QString &tagToolbar = KGlobal::staticQString( "ToolBar" );
- static const QString &attrNoEdit = KGlobal::staticQString( "noEdit" );
+ static const TQString &tagToolbar = KGlobal::staticQString( "ToolBar" );
+ static const TQString &attrNoEdit = KGlobal::staticQString( "noEdit" );
ToolbarList list;
for( ; !n.isNull(); n = n.nextSibling() )
{
- QDomElement elem = n.toElement();
+ TQDomElement elem = n.toElement();
if (elem.isNull())
continue;
@@ -276,14 +276,14 @@ public:
/**
* Return the name of a given toolbar
*/
- QString toolbarName( const XmlData& xmlData, const QDomElement& it ) const
+ TQString toolbarName( const XmlData& xmlData, const TQDomElement& it ) const
{
- static const QString &tagText = KGlobal::staticQString( "text" );
- static const QString &tagText2 = KGlobal::staticQString( "Text" );
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &tagText = KGlobal::staticQString( "text" );
+ static const TQString &tagText2 = KGlobal::staticQString( "Text" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
- QString name;
- QCString txt( it.namedItem( tagText ).toElement().text().utf8() );
+ TQString name;
+ TQCString txt( it.namedItem( tagText ).toElement().text().utf8() );
if ( txt.isEmpty() )
txt = it.namedItem( tagText2 ).toElement().text().utf8();
if ( txt.isEmpty() )
@@ -296,7 +296,7 @@ public:
if ( ( xmlData.m_type == XmlData::Shell ) ||
( xmlData.m_type == XmlData::Part ) )
{
- QString doc_name(xmlData.m_document.documentElement().attribute( attrName ));
+ TQString doc_name(xmlData.m_document.documentElement().attribute( attrName ));
name += " <" + doc_name + ">";
}
return name;
@@ -304,17 +304,17 @@ public:
/**
* Look for a given item in the current toolbar
*/
- QDomElement findElementForToolbarItem( const ToolbarItem* item ) const
+ TQDomElement findElementForToolbarItem( const ToolbarItem* item ) const
{
- static const QString &attrName = KGlobal::staticQString( "name" );
- for(QDomNode n = m_currentToolbarElem.firstChild(); !n.isNull(); n = n.nextSibling())
+ static const TQString &attrName = KGlobal::staticQString( "name" );
+ for(TQDomNode n = m_currentToolbarElem.firstChild(); !n.isNull(); n = n.nextSibling())
{
- QDomElement elem = n.toElement();
+ TQDomElement elem = n.toElement();
if ((elem.attribute(attrName) == item->internalName()) &&
(elem.tagName() == item->internalTag()))
return elem;
}
- return QDomElement();
+ return TQDomElement();
}
#ifndef NDEBUG
@@ -325,7 +325,7 @@ public:
for ( ; xit != m_xmlFiles.end(); ++xit )
{
kdDebug(240) << "XmlData type " << s_XmlTypeToString[(*xit).m_type] << " xmlFile: " << (*xit).m_xmlFile << endl;
- for( QValueList<QDomElement>::Iterator it = (*xit).m_barList.begin();
+ for( TQValueList<TQDomElement>::Iterator it = (*xit).m_barList.begin();
it != (*xit).m_barList.end(); ++it ) {
kdDebug(240) << " Toolbar: " << toolbarName( *xit, *it ) << endl;
}
@@ -337,26 +337,26 @@ public:
}
#endif
- //QValueList<KAction*> m_actionList;
+ //TQValueList<KAction*> m_actionList;
KActionCollection* m_collection;
KInstance *m_instance;
XmlData* m_currentXmlData;
- QDomElement m_currentToolbarElem;
+ TQDomElement m_currentToolbarElem;
- QString m_xmlFile;
- QString m_globalFile;
- QString m_rcFile;
- QDomDocument m_localDoc;
+ TQString m_xmlFile;
+ TQString m_globalFile;
+ TQString m_rcFile;
+ TQDomDocument m_localDoc;
bool m_isPart;
ToolbarList m_barList;
XmlDataList m_xmlFiles;
- QLabel *m_comboLabel;
+ TQLabel *m_comboLabel;
KSeparator *m_comboSeparator;
- QLabel * m_helpArea;
+ TQLabel * m_helpArea;
KPushButton* m_changeIcon;
KProcIO* m_kdialogProcess;
bool m_hasKDialog;
@@ -369,16 +369,16 @@ public:
// Save parameters for recreating widget after resetting toolbar
bool m_global;
KActionCollection* m_collection;
- QString m_file;
+ TQString m_file;
KXMLGUIFactory* m_factory;
};
const char *KEditToolbar::s_defaultToolbar = 0L;
-KEditToolbar::KEditToolbar(KActionCollection *collection, const QString& file,
- bool global, QWidget* parent, const char* name)
+KEditToolbar::KEditToolbar(KActionCollection *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(QString::fromLatin1(s_defaultToolbar), collection, file, global, this))
+ m_widget(new KEditToolbarWidget(TQString::fromLatin1(s_defaultToolbar), collection, file, global, this))
{
init();
d->m_global = global;
@@ -386,9 +386,9 @@ KEditToolbar::KEditToolbar(KActionCollection *collection, const QString& file,
d->m_file = file;
}
-KEditToolbar::KEditToolbar(const QString& defaultToolbar, KActionCollection *collection,
- const QString& file, bool global,
- QWidget* parent, const char* name)
+KEditToolbar::KEditToolbar(const TQString& defaultToolbar, KActionCollection *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(defaultToolbar, collection, file, global, this))
{
@@ -398,16 +398,16 @@ KEditToolbar::KEditToolbar(const QString& defaultToolbar, KActionCollection *col
d->m_file = file;
}
-KEditToolbar::KEditToolbar(KXMLGUIFactory* factory, QWidget* parent, const char* name)
+KEditToolbar::KEditToolbar(KXMLGUIFactory* factory, TQWidget* parent, const char* name)
: KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name),
- m_widget(new KEditToolbarWidget(QString::fromLatin1(s_defaultToolbar), factory, this))
+ m_widget(new KEditToolbarWidget(TQString::fromLatin1(s_defaultToolbar), factory, this))
{
init();
d->m_factory = factory;
}
-KEditToolbar::KEditToolbar(const QString& defaultToolbar,KXMLGUIFactory* factory,
- QWidget* parent, const char* name)
+KEditToolbar::KEditToolbar(const TQString& defaultToolbar,KXMLGUIFactory* factory,
+ TQWidget* parent, const char* name)
: KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name),
m_widget(new KEditToolbarWidget(defaultToolbar, factory, this))
{
@@ -423,8 +423,8 @@ void KEditToolbar::init()
setMainWidget(m_widget);
- connect(m_widget, SIGNAL(enableOk(bool)), SLOT(acceptOK(bool)));
- connect(m_widget, SIGNAL(enableOk(bool)), SLOT(enableButtonApply(bool)));
+ connect(m_widget, TQT_SIGNAL(enableOk(bool)), TQT_SLOT(acceptOK(bool)));
+ connect(m_widget, TQT_SIGNAL(enableOk(bool)), TQT_SLOT(enableButtonApply(bool)));
enableButtonApply(false);
setMinimumSize(sizeHint());
@@ -452,22 +452,22 @@ void KEditToolbar::slotDefault()
if ( d->m_factory )
{
- const QString localPrefix = locateLocal("data", "");
- QPtrList<KXMLGUIClient> clients(d->m_factory->clients());
- QPtrListIterator<KXMLGUIClient> it( clients );
+ const TQString localPrefix = locateLocal("data", "");
+ TQPtrList<KXMLGUIClient> clients(d->m_factory->clients());
+ TQPtrListIterator<KXMLGUIClient> it( clients );
for( ; it.current(); ++it)
{
KXMLGUIClient *client = it.current();
- QString file = client->xmlFile();
+ TQString file = client->xmlFile();
if (file.isNull())
continue;
- if (QDir::isRelativePath(file))
+ if (TQDir::isRelativePath(file))
{
const KInstance *instance = client->instance() ? client->instance() : KGlobal::instance();
- file = locateLocal("data", QString::fromLatin1( instance->instanceName() + '/' ) + file);
+ file = locateLocal("data", TQString::fromLatin1( instance->instanceName() + '/' ) + file);
}
else
{
@@ -475,12 +475,12 @@ void KEditToolbar::slotDefault()
continue;
}
- if ( QFile::exists( file ) )
- if ( !QFile::remove( file ) )
+ if ( TQFile::exists( file ) )
+ if ( !TQFile::remove( file ) )
kdWarning() << "Could not delete " << file << endl;
}
- m_widget = new KEditToolbarWidget(QString::null, d->m_factory, this);
+ m_widget = new KEditToolbarWidget(TQString::null, d->m_factory, this);
m_widget->rebuildKXMLGUIClients();
}
else
@@ -488,20 +488,20 @@ void KEditToolbar::slotDefault()
int slash = d->m_file.findRev('/')+1;
if (slash)
d->m_file = d->m_file.mid(slash);
- QString xml_file = locateLocal("data", QString::fromLatin1( KGlobal::instance()->instanceName() + '/' ) + d->m_file);
+ TQString xml_file = locateLocal("data", TQString::fromLatin1( KGlobal::instance()->instanceName() + '/' ) + d->m_file);
- if ( QFile::exists( xml_file ) )
- if ( !QFile::remove( xml_file ) )
+ if ( TQFile::exists( xml_file ) )
+ if ( !TQFile::remove( xml_file ) )
kdWarning() << "Could not delete " << xml_file << endl;
- m_widget = new KEditToolbarWidget(QString::null, d->m_collection, d->m_file, d->m_global, this);
+ m_widget = new KEditToolbarWidget(TQString::null, d->m_collection, d->m_file, d->m_global, this);
}
setMainWidget(m_widget);
m_widget->show();
- connect(m_widget, SIGNAL(enableOk(bool)), SLOT(acceptOK(bool)));
- connect(m_widget, SIGNAL(enableOk(bool)), SLOT(enableButtonApply(bool)));
+ connect(m_widget, TQT_SIGNAL(enableOk(bool)), TQT_SLOT(acceptOK(bool)));
+ connect(m_widget, TQT_SIGNAL(enableOk(bool)), TQT_SLOT(enableButtonApply(bool)));
enableButtonApply(false);
emit newToolbarConfig();
@@ -538,9 +538,9 @@ void KEditToolbar::setDefaultToolbar(const char *toolbarName)
}
KEditToolbarWidget::KEditToolbarWidget(KActionCollection *collection,
- const QString& file,
- bool global, QWidget *parent)
- : QWidget(parent),
+ const TQString& file,
+ bool global, TQWidget *parent)
+ : TQWidget(parent),
d(new KEditToolbarWidgetPrivate(instance(), collection))
{
initNonKPart(collection, file, global);
@@ -550,11 +550,11 @@ KEditToolbarWidget::KEditToolbarWidget(KActionCollection *collection,
setMinimumSize(sizeHint());
}
-KEditToolbarWidget::KEditToolbarWidget(const QString& defaultToolbar,
+KEditToolbarWidget::KEditToolbarWidget(const TQString& defaultToolbar,
KActionCollection *collection,
- const QString& file, bool global,
- QWidget *parent)
- : QWidget(parent),
+ const TQString& file, bool global,
+ TQWidget *parent)
+ : TQWidget(parent),
d(new KEditToolbarWidgetPrivate(instance(), collection))
{
initNonKPart(collection, file, global);
@@ -565,8 +565,8 @@ KEditToolbarWidget::KEditToolbarWidget(const QString& defaultToolbar,
}
KEditToolbarWidget::KEditToolbarWidget( KXMLGUIFactory* factory,
- QWidget *parent)
- : QWidget(parent),
+ TQWidget *parent)
+ : TQWidget(parent),
d(new KEditToolbarWidgetPrivate(instance(), KXMLGUIClient::actionCollection() /*create new one*/))
{
initKPart(factory);
@@ -576,10 +576,10 @@ KEditToolbarWidget::KEditToolbarWidget( KXMLGUIFactory* factory,
setMinimumSize(sizeHint());
}
-KEditToolbarWidget::KEditToolbarWidget( const QString& defaultToolbar,
+KEditToolbarWidget::KEditToolbarWidget( const TQString& defaultToolbar,
KXMLGUIFactory* factory,
- QWidget *parent)
- : QWidget(parent),
+ TQWidget *parent)
+ : TQWidget(parent),
d(new KEditToolbarWidgetPrivate(instance(), KXMLGUIClient::actionCollection() /*create new one*/))
{
initKPart(factory);
@@ -595,18 +595,18 @@ KEditToolbarWidget::~KEditToolbarWidget()
}
void KEditToolbarWidget::initNonKPart(KActionCollection *collection,
- const QString& file, bool global)
+ const TQString& file, bool global)
{
//d->m_actionList = collection->actions();
// handle the merging
if (global)
setXMLFile(locate("config", "ui/ui_standards.rc"));
- QString localXML = d->loadXMLFile(file);
+ TQString localXML = d->loadXMLFile(file);
setXML(localXML, true);
// reusable vars
- QDomElement elem;
+ TQDomElement elem;
// first, get all of the necessary info for our local xml
XmlData local;
@@ -620,7 +620,7 @@ void KEditToolbarWidget::initNonKPart(KActionCollection *collection,
// then, the merged one (ui_standards + local xml)
XmlData merge;
- merge.m_xmlFile = QString::null;
+ merge.m_xmlFile = TQString::null;
merge.m_type = XmlData::Merged;
merge.m_document = domDocument();
elem = merge.m_document.documentElement().toElement();
@@ -639,14 +639,14 @@ void KEditToolbarWidget::initNonKPart(KActionCollection *collection,
void KEditToolbarWidget::initKPart(KXMLGUIFactory* factory)
{
// reusable vars
- QDomElement elem;
+ TQDomElement elem;
setFactory( factory );
actionCollection()->setWidget( this );
// add all of the client data
- QPtrList<KXMLGUIClient> clients(factory->clients());
- QPtrListIterator<KXMLGUIClient> it( clients );
+ TQPtrList<KXMLGUIClient> clients(factory->clients());
+ TQPtrListIterator<KXMLGUIClient> it( clients );
for( ; it.current(); ++it)
{
KXMLGUIClient *client = it.current();
@@ -711,7 +711,7 @@ void KEditToolbarWidget::rebuildKXMLGUIClients()
if ( !factory() )
return;
- QPtrList<KXMLGUIClient> clients(factory()->clients());
+ TQPtrList<KXMLGUIClient> clients(factory()->clients());
//kdDebug(240) << "factory: " << clients.count() << " clients" << endl;
// remove the elements starting from the last going to the first
@@ -727,16 +727,16 @@ void KEditToolbarWidget::rebuildKXMLGUIClients()
// now, rebuild the gui from the first to the last
//kdDebug(240) << "rebuilding the gui" << endl;
- QPtrListIterator<KXMLGUIClient> cit( clients );
+ TQPtrListIterator<KXMLGUIClient> cit( clients );
for( ; cit.current(); ++cit)
{
KXMLGUIClient* client = cit.current();
//kdDebug(240) << "updating client " << client << " " << client->instance()->instanceName() << " xmlFile=" << client->xmlFile() << endl;
- QString file( client->xmlFile() ); // before setting ui_standards!
+ TQString file( client->xmlFile() ); // before setting ui_standards!
if ( !file.isEmpty() )
{
// passing an empty stream forces the clients to reread the XML
- client->setXMLGUIBuildDocument( QDomDocument() );
+ client->setXMLGUIBuildDocument( TQDomDocument() );
// for the shell, merge in ui_standards.rc
if ( client == firstClient ) // same assumption as in the ctor: first==shell
@@ -758,23 +758,23 @@ void KEditToolbarWidget::rebuildKXMLGUIClients()
void KEditToolbarWidget::setupLayout()
{
// the toolbar name combo
- d->m_comboLabel = new QLabel(i18n("&Toolbar:"), this);
- m_toolbarCombo = new QComboBox(this);
+ d->m_comboLabel = new TQLabel(i18n("&Toolbar:"), this);
+ m_toolbarCombo = new TQComboBox(this);
m_toolbarCombo->setEnabled(false);
d->m_comboLabel->setBuddy(m_toolbarCombo);
d->m_comboSeparator = new KSeparator(this);
- connect(m_toolbarCombo, SIGNAL(activated(const QString&)),
- this, SLOT(slotToolbarSelected(const QString&)));
+ connect(m_toolbarCombo, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(slotToolbarSelected(const TQString&)));
-// QPushButton *new_toolbar = new QPushButton(i18n("&New"), this);
+// TQPushButton *new_toolbar = new TQPushButton(i18n("&New"), this);
// new_toolbar->setPixmap(BarIcon("filenew", KIcon::SizeSmall));
// new_toolbar->setEnabled(false); // disabled until implemented
-// QPushButton *del_toolbar = new QPushButton(i18n("&Delete"), this);
+// TQPushButton *del_toolbar = new TQPushButton(i18n("&Delete"), this);
// del_toolbar->setPixmap(BarIcon("editdelete", KIcon::SizeSmall));
// del_toolbar->setEnabled(false); // disabled until implemented
// our list of inactive actions
- QLabel *inactive_label = new QLabel(i18n("A&vailable actions:"), this);
+ TQLabel *inactive_label = new TQLabel(i18n("A&vailable actions:"), this);
m_inactiveList = new ToolbarListView(this);
m_inactiveList->setDragEnabled(true);
m_inactiveList->setAcceptDrops(true);
@@ -786,13 +786,13 @@ void KEditToolbarWidget::setupLayout()
int column2 = m_inactiveList->addColumn(""); // text
m_inactiveList->setSorting( column2 );
inactive_label->setBuddy(m_inactiveList);
- connect(m_inactiveList, SIGNAL(selectionChanged(QListViewItem *)),
- this, SLOT(slotInactiveSelected(QListViewItem *)));
- connect(m_inactiveList, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int )),
- this, SLOT(slotInsertButton()));
+ connect(m_inactiveList, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ this, TQT_SLOT(slotInactiveSelected(TQListViewItem *)));
+ connect(m_inactiveList, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int )),
+ this, TQT_SLOT(slotInsertButton()));
// our list of active actions
- QLabel *active_label = new QLabel(i18n("Curr&ent actions:"), this);
+ TQLabel *active_label = new TQLabel(i18n("Curr&ent actions:"), this);
m_activeList = new ToolbarListView(this);
m_activeList->setDragEnabled(true);
m_activeList->setAcceptDrops(true);
@@ -805,67 +805,67 @@ void KEditToolbarWidget::setupLayout()
m_activeList->setSorting(-1);
active_label->setBuddy(m_activeList);
- connect(m_inactiveList, SIGNAL(dropped(KListView*,QDropEvent*,QListViewItem*)),
- this, SLOT(slotDropped(KListView*,QDropEvent*,QListViewItem*)));
- connect(m_activeList, SIGNAL(dropped(KListView*,QDropEvent*,QListViewItem*)),
- this, SLOT(slotDropped(KListView*,QDropEvent*,QListViewItem*)));
- connect(m_activeList, SIGNAL(selectionChanged(QListViewItem *)),
- this, SLOT(slotActiveSelected(QListViewItem *)));
- connect(m_activeList, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int )),
- this, SLOT(slotRemoveButton()));
+ 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_activeList, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ this, TQT_SLOT(slotActiveSelected(TQListViewItem *)));
+ connect(m_activeList, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int )),
+ this, TQT_SLOT(slotRemoveButton()));
// "change icon" button
d->m_changeIcon = new KPushButton( i18n( "Change &Icon..." ), this );
- QString kdialogExe = KStandardDirs::findExe(QString::fromLatin1("kdialog"));
+ TQString kdialogExe = KStandardDirs::findExe(TQString::fromLatin1("kdialog"));
d->m_hasKDialog = !kdialogExe.isEmpty();
d->m_changeIcon->setEnabled( d->m_hasKDialog );
- connect( d->m_changeIcon, SIGNAL( clicked() ),
- this, SLOT( slotChangeIcon() ) );
+ connect( d->m_changeIcon, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotChangeIcon() ) );
// The buttons in the middle
- QIconSet iconSet;
+ TQIconSet iconSet;
- m_upAction = new QToolButton(this);
+ m_upAction = new TQToolButton(this);
iconSet = SmallIconSet( "up" );
m_upAction->setIconSet( iconSet );
m_upAction->setEnabled(false);
m_upAction->setAutoRepeat(true);
- connect(m_upAction, SIGNAL(clicked()), SLOT(slotUpButton()));
+ connect(m_upAction, TQT_SIGNAL(clicked()), TQT_SLOT(slotUpButton()));
- m_insertAction = new QToolButton(this);
- iconSet = QApplication::reverseLayout() ? SmallIconSet( "back" ) : SmallIconSet( "forward" );
+ m_insertAction = new TQToolButton(this);
+ iconSet = TQApplication::reverseLayout() ? SmallIconSet( "back" ) : SmallIconSet( "forward" );
m_insertAction->setIconSet( iconSet );
m_insertAction->setEnabled(false);
- connect(m_insertAction, SIGNAL(clicked()), SLOT(slotInsertButton()));
+ connect(m_insertAction, TQT_SIGNAL(clicked()), TQT_SLOT(slotInsertButton()));
- m_removeAction = new QToolButton(this);
- iconSet = QApplication::reverseLayout() ? SmallIconSet( "forward" ) : SmallIconSet( "back" );
+ m_removeAction = new TQToolButton(this);
+ iconSet = TQApplication::reverseLayout() ? SmallIconSet( "forward" ) : SmallIconSet( "back" );
m_removeAction->setIconSet( iconSet );
m_removeAction->setEnabled(false);
- connect(m_removeAction, SIGNAL(clicked()), SLOT(slotRemoveButton()));
+ connect(m_removeAction, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveButton()));
- m_downAction = new QToolButton(this);
+ m_downAction = new TQToolButton(this);
iconSet = SmallIconSet( "down" );
m_downAction->setIconSet( iconSet );
m_downAction->setEnabled(false);
m_downAction->setAutoRepeat(true);
- connect(m_downAction, SIGNAL(clicked()), SLOT(slotDownButton()));
+ connect(m_downAction, TQT_SIGNAL(clicked()), TQT_SLOT(slotDownButton()));
- d->m_helpArea = new QLabel(this);
+ d->m_helpArea = new TQLabel(this);
d->m_helpArea->setAlignment( Qt::WordBreak );
// now start with our layouts
- QVBoxLayout *top_layout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout *top_layout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
- QVBoxLayout *name_layout = new QVBoxLayout(KDialog::spacingHint());
- QHBoxLayout *list_layout = new QHBoxLayout(KDialog::spacingHint());
+ TQVBoxLayout *name_layout = new TQVBoxLayout(KDialog::spacingHint());
+ TQHBoxLayout *list_layout = new TQHBoxLayout(KDialog::spacingHint());
- QVBoxLayout *inactive_layout = new QVBoxLayout(KDialog::spacingHint());
- QVBoxLayout *active_layout = new QVBoxLayout(KDialog::spacingHint());
- QHBoxLayout *changeIcon_layout = new QHBoxLayout(KDialog::spacingHint());
+ TQVBoxLayout *inactive_layout = new TQVBoxLayout(KDialog::spacingHint());
+ TQVBoxLayout *active_layout = new TQVBoxLayout(KDialog::spacingHint());
+ TQHBoxLayout *changeIcon_layout = new TQHBoxLayout(KDialog::spacingHint());
- QGridLayout *button_layout = new QGridLayout(5, 3, 0);
+ TQGridLayout *button_layout = new TQGridLayout(5, 3, 0);
name_layout->addWidget(d->m_comboLabel);
name_layout->addWidget(m_toolbarCombo);
@@ -901,9 +901,9 @@ void KEditToolbarWidget::setupLayout()
top_layout->addWidget(new KSeparator(this));
}
-void KEditToolbarWidget::loadToolbarCombo(const QString& defaultToolbar)
+void KEditToolbarWidget::loadToolbarCombo(const TQString& defaultToolbar)
{
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
// just in case, we clear our combo
m_toolbarCombo->clear();
@@ -921,7 +921,7 @@ void KEditToolbarWidget::loadToolbarCombo(const QString& defaultToolbar)
ToolbarList::Iterator it = (*xit).m_barList.begin();
for ( ; it != (*xit).m_barList.end(); ++it)
{
- QString name = d->toolbarName( *xit, *it );
+ TQString name = d->toolbarName( *xit, *it );
m_toolbarCombo->setEnabled( true );
m_toolbarCombo->insertItem( name );
if (defaultToolbarId == -1 && (name == defaultToolbar || defaultToolbar == (*it).attribute( attrName )))
@@ -940,16 +940,16 @@ void KEditToolbarWidget::loadToolbarCombo(const QString& defaultToolbar)
slotToolbarSelected(m_toolbarCombo->currentText());
}
-void KEditToolbarWidget::loadActionList(QDomElement& elem)
+void KEditToolbarWidget::loadActionList(TQDomElement& elem)
{
- static const QString &tagSeparator = KGlobal::staticQString( "Separator" );
- static const QString &tagMerge = KGlobal::staticQString( "Merge" );
- static const QString &tagActionList= KGlobal::staticQString( "ActionList" );
- static const QString &attrName = KGlobal::staticQString( "name" );
- static const QString &attrLineSeparator = KGlobal::staticQString( "lineSeparator" );
+ static const TQString &tagSeparator = KGlobal::staticQString( "Separator" );
+ static const TQString &tagMerge = KGlobal::staticQString( "Merge" );
+ static const TQString &tagActionList= KGlobal::staticQString( "ActionList" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrLineSeparator = KGlobal::staticQString( "lineSeparator" );
int sep_num = 0;
- QString sep_name("separator_%1");
+ TQString sep_name("separator_%1");
// clear our lists
m_inactiveList->clear();
@@ -963,19 +963,19 @@ void KEditToolbarWidget::loadActionList(QDomElement& elem)
KActionCollection* actionCollection = d->m_currentXmlData->m_actionCollection;
// store the names of our active actions
- QMap<QString, bool> active_list;
+ TQMap<TQString, bool> active_list;
// see if our current action is in this toolbar
KIconLoader *loader = KGlobal::instance()->iconLoader();
- QDomNode n = elem.lastChild();
+ TQDomNode n = elem.lastChild();
for( ; !n.isNull(); n = n.previousSibling() )
{
- QDomElement it = n.toElement();
+ TQDomElement it = n.toElement();
if (it.isNull()) continue;
if (it.tagName() == tagSeparator)
{
- ToolbarItem *act = new ToolbarItem(m_activeList, tagSeparator, sep_name.arg(sep_num++), QString::null);
- bool isLineSep = ( it.attribute(attrLineSeparator, "true").lower() == QString::fromLatin1("true") );
+ ToolbarItem *act = new ToolbarItem(m_activeList, tagSeparator, sep_name.arg(sep_num++), TQString::null);
+ bool isLineSep = ( it.attribute(attrLineSeparator, "true").lower() == TQString::fromLatin1("true") );
if(isLineSep)
act->setText(1, LINESEPARATORSTRING);
else
@@ -987,7 +987,7 @@ void KEditToolbarWidget::loadActionList(QDomElement& elem)
if (it.tagName() == tagMerge)
{
// Merge can be named or not - use the name if there is one
- QString name = it.attribute( attrName );
+ TQString name = it.attribute( attrName );
ToolbarItem *act = new ToolbarItem(m_activeList, tagMerge, name, i18n("This element will be replaced with all the elements of an embedded component."));
if ( name.isEmpty() )
act->setText(1, i18n("<Merge>"));
@@ -1047,9 +1047,9 @@ void KEditToolbarWidget::loadActionList(QDomElement& elem)
}
// finally, add default separators to the inactive list
- ToolbarItem *act = new ToolbarItem(m_inactiveList, tagSeparator, sep_name.arg(sep_num++), QString::null);
+ ToolbarItem *act = new ToolbarItem(m_inactiveList, tagSeparator, sep_name.arg(sep_num++), TQString::null);
act->setText(1, LINESEPARATORSTRING);
- act = new ToolbarItem(m_inactiveList, tagSeparator, sep_name.arg(sep_num++), QString::null);
+ act = new ToolbarItem(m_inactiveList, tagSeparator, sep_name.arg(sep_num++), TQString::null);
act->setText(1, SEPARATORSTRING);
}
@@ -1058,7 +1058,7 @@ KActionCollection *KEditToolbarWidget::actionCollection() const
return d->m_collection;
}
-void KEditToolbarWidget::slotToolbarSelected(const QString& _text)
+void KEditToolbarWidget::slotToolbarSelected(const TQString& _text)
{
// iterate through everything
XmlDataList::Iterator xit = d->m_xmlFiles.begin();
@@ -1068,7 +1068,7 @@ void KEditToolbarWidget::slotToolbarSelected(const QString& _text)
ToolbarList::Iterator it = (*xit).m_barList.begin();
for ( ; it != (*xit).m_barList.end(); ++it)
{
- QString name = d->toolbarName( *xit, *it );
+ TQString name = d->toolbarName( *xit, *it );
// is this our toolbar?
if ( name == _text )
{
@@ -1087,28 +1087,28 @@ void KEditToolbarWidget::slotToolbarSelected(const QString& _text)
}
}
-void KEditToolbarWidget::slotInactiveSelected(QListViewItem *item)
+void KEditToolbarWidget::slotInactiveSelected(TQListViewItem *item)
{
ToolbarItem* toolitem = static_cast<ToolbarItem *>(item);
if (item)
{
m_insertAction->setEnabled(true);
- QString statusText = toolitem->statusText();
+ TQString statusText = toolitem->statusText();
d->m_helpArea->setText( statusText );
}
else
{
m_insertAction->setEnabled(false);
- d->m_helpArea->setText( QString::null );
+ d->m_helpArea->setText( TQString::null );
}
}
-void KEditToolbarWidget::slotActiveSelected(QListViewItem *item)
+void KEditToolbarWidget::slotActiveSelected(TQListViewItem *item)
{
ToolbarItem* toolitem = static_cast<ToolbarItem *>(item);
m_removeAction->setEnabled( item );
- static const QString &tagAction = KGlobal::staticQString( "Action" );
+ static const TQString &tagAction = KGlobal::staticQString( "Action" );
d->m_changeIcon->setEnabled( item &&
d->m_hasKDialog &&
toolitem->internalTag() == tagAction );
@@ -1124,18 +1124,18 @@ void KEditToolbarWidget::slotActiveSelected(QListViewItem *item)
m_downAction->setEnabled(true);
else
m_downAction->setEnabled(false);
- QString statusText = toolitem->statusText();
+ TQString statusText = toolitem->statusText();
d->m_helpArea->setText( statusText );
}
else
{
m_upAction->setEnabled(false);
m_downAction->setEnabled(false);
- d->m_helpArea->setText( QString::null );
+ d->m_helpArea->setText( TQString::null );
}
}
-void KEditToolbarWidget::slotDropped(KListView *list, QDropEvent *e, QListViewItem *after)
+void KEditToolbarWidget::slotDropped(KListView *list, TQDropEvent *e, TQListViewItem *after)
{
ToolbarItem *item = new ToolbarItem(m_inactiveList); // needs parent, use inactiveList temporarily
if(!ToolbarItemDrag::decode(e, *item)) {
@@ -1186,18 +1186,18 @@ void KEditToolbarWidget::slotRemoveButton()
slotToolbarSelected( m_toolbarCombo->currentText() );
}
-void KEditToolbarWidget::insertActive(ToolbarItem *item, QListViewItem *before, bool prepend)
+void KEditToolbarWidget::insertActive(ToolbarItem *item, TQListViewItem *before, bool prepend)
{
if (!item)
return;
- static const QString &tagAction = KGlobal::staticQString( "Action" );
- static const QString &tagSeparator = KGlobal::staticQString( "Separator" );
- static const QString &attrName = KGlobal::staticQString( "name" );
- static const QString &attrLineSeparator = KGlobal::staticQString( "lineSeparator" );
- static const QString &attrNoMerge = KGlobal::staticQString( "noMerge" );
+ static const TQString &tagAction = KGlobal::staticQString( "Action" );
+ static const TQString &tagSeparator = KGlobal::staticQString( "Separator" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrLineSeparator = KGlobal::staticQString( "lineSeparator" );
+ static const TQString &attrNoMerge = KGlobal::staticQString( "noMerge" );
- QDomElement new_item;
+ TQDomElement new_item;
// let's handle the separator specially
if (item->text(1) == LINESEPARATORSTRING) {
new_item = domDocument().createElement(tagSeparator);
@@ -1213,7 +1213,7 @@ void KEditToolbarWidget::insertActive(ToolbarItem *item, QListViewItem *before,
// we have the item in the active list which is before the new
// item.. so let's try our best to add our new item right after it
ToolbarItem *act_item = (ToolbarItem*)before;
- QDomElement elem = d->findElementForToolbarItem( act_item );
+ TQDomElement elem = d->findElementForToolbarItem( act_item );
Q_ASSERT( !elem.isNull() );
d->m_currentToolbarElem.insertAfter(new_item, elem);
}
@@ -1238,13 +1238,13 @@ void KEditToolbarWidget::removeActive(ToolbarItem *item)
if (!item)
return;
- static const QString &attrNoMerge = KGlobal::staticQString( "noMerge" );
+ static const TQString &attrNoMerge = KGlobal::staticQString( "noMerge" );
// we're modified, so let this change
emit enableOk(true);
// now iterate through to find the child to nuke
- QDomElement elem = d->findElementForToolbarItem( item );
+ TQDomElement elem = d->findElementForToolbarItem( item );
if ( !elem.isNull() )
{
// nuke myself!
@@ -1273,9 +1273,9 @@ void KEditToolbarWidget::slotUpButton()
delete item;
}
-void KEditToolbarWidget::moveActive( ToolbarItem* item, QListViewItem* before )
+void KEditToolbarWidget::moveActive( ToolbarItem* item, TQListViewItem* before )
{
- QDomElement e = d->findElementForToolbarItem( item );
+ TQDomElement e = d->findElementForToolbarItem( item );
if ( e.isNull() )
return;
@@ -1306,7 +1306,7 @@ void KEditToolbarWidget::moveActive( ToolbarItem* item, QListViewItem* before )
d->m_currentToolbarElem.insertAfter(e, d->findElementForToolbarItem( (ToolbarItem*)before ));
// and set this container as a noMerge
- static const QString &attrNoMerge = KGlobal::staticQString( "noMerge" );
+ static const TQString &attrNoMerge = KGlobal::staticQString( "noMerge" );
d->m_currentToolbarElem.setAttribute( attrNoMerge, "1");
// update the local doc
@@ -1328,9 +1328,9 @@ void KEditToolbarWidget::slotDownButton()
delete item;
}
-void KEditToolbarWidget::updateLocal(QDomElement& elem)
+void KEditToolbarWidget::updateLocal(TQDomElement& elem)
{
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
XmlDataList::Iterator xit = d->m_xmlFiles.begin();
for ( ; xit != d->m_xmlFiles.end(); ++xit)
@@ -1355,18 +1355,18 @@ void KEditToolbarWidget::updateLocal(QDomElement& elem)
ToolbarList::Iterator it = (*xit).m_barList.begin();
for ( ; it != (*xit).m_barList.end(); ++it)
{
- QString name( (*it).attribute( attrName ) );
- QString tag( (*it).tagName() );
+ TQString name( (*it).attribute( attrName ) );
+ TQString tag( (*it).tagName() );
if ( (tag != elem.tagName()) || (name != elem.attribute(attrName)) )
continue;
- QDomElement toolbar = (*xit).m_document.documentElement().toElement();
+ TQDomElement toolbar = (*xit).m_document.documentElement().toElement();
toolbar.replaceChild(elem, (*it));
return;
}
// just append it
- QDomElement toolbar = (*xit).m_document.documentElement().toElement();
+ TQDomElement toolbar = (*xit).m_document.documentElement().toElement();
toolbar.appendChild(elem);
}
}
@@ -1382,10 +1382,10 @@ void KEditToolbarWidget::slotChangeIcon()
return;
d->m_kdialogProcess = new KProcIO;
- QString kdialogExe = KStandardDirs::findExe(QString::fromLatin1("kdialog"));
+ TQString kdialogExe = KStandardDirs::findExe(TQString::fromLatin1("kdialog"));
(*d->m_kdialogProcess) << kdialogExe;
(*d->m_kdialogProcess) << "--embed";
- (*d->m_kdialogProcess) << QString::number( (ulong)topLevelWidget()->winId() );
+ (*d->m_kdialogProcess) << TQString::number( (ulong)topLevelWidget()->winId() );
(*d->m_kdialogProcess) << "--geticon";
(*d->m_kdialogProcess) << "Toolbar";
(*d->m_kdialogProcess) << "Actions";
@@ -1399,8 +1399,8 @@ void KEditToolbarWidget::slotChangeIcon()
m_activeList->setEnabled( false ); // don't change the current item
m_toolbarCombo->setEnabled( false ); // don't change the current toolbar
- connect( d->m_kdialogProcess, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( slotProcessExited( KProcess* ) ) );
+ connect( d->m_kdialogProcess, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( slotProcessExited( KProcess* ) ) );
}
void KEditToolbarWidget::slotProcessExited( KProcess* )
@@ -1408,7 +1408,7 @@ void KEditToolbarWidget::slotProcessExited( KProcess* )
m_activeList->setEnabled( true );
m_toolbarCombo->setEnabled( true );
- QString icon;
+ TQString icon;
if (!d->m_kdialogProcess) {
kdError(240) << "Something is wrong here! m_kdialogProcess is zero!" << endl;
@@ -1432,9 +1432,9 @@ void KEditToolbarWidget::slotProcessExited( KProcess* )
d->m_currentXmlData->m_isModified = true;
// Get hold of ActionProperties tag
- QDomElement elem = KXMLGUIFactory::actionPropertiesElement( d->m_currentXmlData->m_document );
+ TQDomElement elem = KXMLGUIFactory::actionPropertiesElement( d->m_currentXmlData->m_document );
// Find or create an element for this action
- QDomElement act_elem = KXMLGUIFactory::findActionByName( elem, item->internalName(), true /*create*/ );
+ TQDomElement act_elem = KXMLGUIFactory::findActionByName( elem, item->internalName(), true /*create*/ );
Q_ASSERT( !act_elem.isNull() );
act_elem.setAttribute( "icon", icon );
diff --git a/kdeui/kedittoolbar.h b/kdeui/kedittoolbar.h
index fe41775f0..56f3c11d5 100644
--- a/kdeui/kedittoolbar.h
+++ b/kdeui/kedittoolbar.h
@@ -19,7 +19,7 @@
#ifndef _KEDITTOOLBAR_H
#define _KEDITTOOLBAR_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kxmlguiclient.h>
#include <kdialogbase.h>
@@ -68,7 +68,7 @@ namespace
* {
* saveMainWindowSettings( KGlobal::config(), "MainWindow" );
* KEditToolbar dlg(actionCollection());
- * connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
+ * connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
* dlg.exec();
* }
*
@@ -93,7 +93,7 @@ namespace
* \code
* saveMainWindowSettings( KGlobal::config(), "MainWindow" );
* KEditToolbar dlg(factory());
- * connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
+ * connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
* dlg.exec();
*
* void MyClass::slotNewToolbarConfig() // This is called when OK, Apply or Defaults is clicked
@@ -142,8 +142,8 @@ public:
* @param name An internal name.
*/
KEditToolbar(KActionCollection *collection,
- const QString& xmlfile = QString::null, bool global = true,
- QWidget* parent = 0, const char* name = 0);
+ const TQString& xmlfile = TQString::null, bool global = true,
+ TQWidget* parent = 0, const char* name = 0);
//KDE 4.0: merge the two constructors
/* Constructor for apps that do not use components, which has an extra argument
@@ -157,9 +157,9 @@ public:
* @param name An internal name.
* @since 3.2
*/
- KEditToolbar(const QString& defaultToolbar, KActionCollection *collection,
- const QString& xmlfile = QString::null, bool global = true,
- QWidget* parent = 0, const char* name = 0);
+ KEditToolbar(const TQString& defaultToolbar, KActionCollection *collection,
+ const TQString& xmlfile = TQString::null, bool global = true,
+ TQWidget* parent = 0, const char* name = 0);
/**
* Constructor for KParts based apps.
*
@@ -183,7 +183,7 @@ public:
* This works, but only _if_ setting conserveMemory to false when calling
* KMainWindow::createGUI()! If not, use the other KEditToolbar constructor.
*/
- KEditToolbar(KXMLGUIFactory* factory, QWidget* parent = 0, const char* name = 0);
+ KEditToolbar(KXMLGUIFactory* factory, TQWidget* parent = 0, const char* name = 0);
//KDE 4.0: merge the two constructors
/** Constructor for KParts based apps, which has an extra argument
@@ -195,8 +195,8 @@ public:
* @param name An internal name.
* @since 3.2
*/
- KEditToolbar(const QString& defaultToolbar, KXMLGUIFactory* factory,
- QWidget* parent = 0, const char* name = 0);
+ KEditToolbar(const TQString& defaultToolbar, KXMLGUIFactory* factory,
+ TQWidget* parent = 0, const char* name = 0);
/// destructor
~KEditToolbar();
@@ -267,7 +267,7 @@ private:
* @author Kurt Granroth <granroth@kde.org>
* @version $Id$
*/
-class KDEUI_EXPORT KEditToolbarWidget : public QWidget, virtual public KXMLGUIClient
+class KDEUI_EXPORT KEditToolbarWidget : public TQWidget, virtual public KXMLGUIClient
{
Q_OBJECT
public:
@@ -301,8 +301,8 @@ public:
* @param parent This widget's parent
*/
KEditToolbarWidget(KActionCollection *collection,
- const QString& xmlfile = QString::null,
- bool global = true, QWidget *parent = 0L);
+ const TQString& xmlfile = TQString::null,
+ bool global = true, TQWidget *parent = 0L);
//KDE 4.0: merge the two constructors
/* Same as above, with an extra agrument specifying the toolbar to be shown.
@@ -315,11 +315,11 @@ public:
* @param parent This widget's parent
* @since 3.2
*/
- KEditToolbarWidget(const QString& defaultToolbar,
+ KEditToolbarWidget(const TQString& defaultToolbar,
KActionCollection *collection,
- const QString& file = QString::null,
+ const TQString& file = TQString::null,
bool global = true,
- QWidget *parent = 0L);
+ TQWidget *parent = 0L);
/**
* Constructor for KParts based apps.
@@ -341,7 +341,7 @@ public:
* @param factory Your application's factory object
* @param parent This widget's parent
*/
- KEditToolbarWidget(KXMLGUIFactory* factory, QWidget *parent = 0L);
+ KEditToolbarWidget(KXMLGUIFactory* factory, TQWidget *parent = 0L);
//KDE 4.0: merge the two constructors
/* Same as above, with an extra agrument specifying the toolbar to be shown.
@@ -352,9 +352,9 @@ public:
* @param parent This widget's parent
* @since 3.2
*/
- KEditToolbarWidget(const QString& defaultToolbar,
+ KEditToolbarWidget(const TQString& defaultToolbar,
KXMLGUIFactory* factory,
- QWidget *parent = 0L);
+ TQWidget *parent = 0L);
/**
* Destructor. Note that any changes done in this widget will
@@ -391,12 +391,12 @@ signals:
void enableOk(bool);
protected slots:
- void slotToolbarSelected(const QString& text);
+ void slotToolbarSelected(const TQString& text);
- void slotInactiveSelected(QListViewItem *item);
- void slotActiveSelected(QListViewItem *item);
+ void slotInactiveSelected(TQListViewItem *item);
+ void slotActiveSelected(TQListViewItem *item);
- void slotDropped(KListView *list, QDropEvent *e, QListViewItem *after);
+ void slotDropped(KListView *list, TQDropEvent *e, TQListViewItem *after);
void slotInsertButton();
void slotRemoveButton();
@@ -411,24 +411,24 @@ private slots:
protected: // KDE4: make private
void setupLayout();
- void insertActive(ToolbarItem *item, QListViewItem *before, bool prepend = false);
+ void insertActive(ToolbarItem *item, TQListViewItem *before, bool prepend = false);
void removeActive(ToolbarItem *item);
- void moveActive(ToolbarItem *item, QListViewItem *before);
- void initNonKPart(KActionCollection *collection, const QString& file, bool global);
+ void moveActive(ToolbarItem *item, TQListViewItem *before);
+ void initNonKPart(KActionCollection *collection, const TQString& file, bool global);
void initKPart(KXMLGUIFactory* factory);
- void loadToolbarCombo(const QString& defaultToolbar = QString::null);
- void loadActionList(QDomElement& elem);
- void updateLocal(QDomElement& elem);
+ void loadToolbarCombo(const TQString& defaultToolbar = TQString::null);
+ void loadActionList(TQDomElement& elem);
+ void updateLocal(TQDomElement& elem);
private:
ToolbarListView *m_inactiveList;
ToolbarListView *m_activeList;
- QComboBox *m_toolbarCombo;
+ TQComboBox *m_toolbarCombo;
- QToolButton *m_upAction;
- QToolButton *m_removeAction;
- QToolButton *m_insertAction;
- QToolButton *m_downAction;
+ TQToolButton *m_upAction;
+ TQToolButton *m_removeAction;
+ TQToolButton *m_insertAction;
+ TQToolButton *m_downAction;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kfontcombo.cpp b/kdeui/kfontcombo.cpp
index d4f04812f..4752a0bd1 100644
--- a/kdeui/kfontcombo.cpp
+++ b/kdeui/kfontcombo.cpp
@@ -17,9 +17,9 @@
*/
-#include <qfontdatabase.h>
-#include <qlistbox.h>
-#include <qpainter.h>
+#include <tqfontdatabase.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
#include <kcharsets.h>
#include <kconfig.h>
@@ -50,35 +50,35 @@ struct KFontComboPrivate
bool modified : 1;
int size;
int lineSpacing;
- QString defaultFamily;
+ TQString defaultFamily;
};
class KFontListItem : public QListBoxItem
{
public:
- KFontListItem(const QString &fontName, KFontCombo *combo);
+ KFontListItem(const TQString &fontName, KFontCombo *combo);
virtual ~KFontListItem();
- virtual int width(const QListBox *) const;
- virtual int height(const QListBox *) const;
+ virtual int width(const TQListBox *) const;
+ virtual int height(const TQListBox *) const;
void updateFont();
protected:
- virtual void paint(QPainter *p);
+ virtual void paint(TQPainter *p);
private:
void createFont();
private:
KFontCombo *m_combo;
- QString m_fontName;
- QFont *m_font;
+ TQString m_fontName;
+ TQFont *m_font;
bool m_canPaintName;
};
-KFontListItem::KFontListItem(const QString &fontName, KFontCombo *combo)
- : QListBoxItem(combo->listBox()),
+KFontListItem::KFontListItem(const TQString &fontName, KFontCombo *combo)
+ : TQListBoxItem(combo->listBox()),
m_combo(combo),
m_fontName(fontName),
m_font(0),
@@ -92,42 +92,42 @@ KFontListItem::~KFontListItem()
delete m_font;
}
-int KFontListItem::width(const QListBox *lb) const
+int KFontListItem::width(const TQListBox *lb) const
{
if (m_font)
- return QFontMetrics(*m_font).width(text()) + 6;
+ return TQFontMetrics(*m_font).width(text()) + 6;
return lb->fontMetrics().width(text()) + 6;
}
-int KFontListItem::height(const QListBox *lb) const
+int KFontListItem::height(const TQListBox *lb) const
{
if (m_combo->d->displayFonts)
return m_combo->d->lineSpacing + 2;
- QFontMetrics fm(lb->fontMetrics());
+ TQFontMetrics fm(lb->fontMetrics());
return fm.lineSpacing() + 2;
}
-void KFontListItem::paint(QPainter *p)
+void KFontListItem::paint(TQPainter *p)
{
if (m_combo->d->displayFonts)
{
if (!m_font)
createFont();
- QString t = m_fontName;
+ TQString t = m_fontName;
if (p->device() != m_combo)
{
if (m_canPaintName)
p->setFont(*m_font);
else
- t = QString::fromLatin1("(%1)").arg(m_fontName);
+ t = TQString::fromLatin1("(%1)").arg(m_fontName);
}
- QFontMetrics fm(p->fontMetrics());
+ TQFontMetrics fm(p->fontMetrics());
p->drawText(3, (m_combo->d->lineSpacing + fm.ascent() + fm.leading() / 2) / 2, t);
}
else
{
- QFontMetrics fm(p->fontMetrics());
+ TQFontMetrics fm(p->fontMetrics());
p->drawText(3, fm.ascent() + fm.leading() / 2, m_fontName);
}
}
@@ -149,8 +149,8 @@ void KFontListItem::createFont()
if (m_font)
return;
- m_font = new QFont(m_fontName);
- QFontMetrics fm(*m_font);
+ m_font = new TQFont(m_fontName);
+ TQFontMetrics fm(*m_font);
for (unsigned int i = 0; i < m_fontName.length(); ++i)
if (!fm.inFont(m_fontName[i]))
{
@@ -160,35 +160,35 @@ void KFontListItem::createFont()
updateFont();
}
-KFontCombo::KFontCombo(QWidget *parent, const char *name)
+KFontCombo::KFontCombo(TQWidget *parent, const char *name)
: KComboBox(true, parent, name)
{
init();
- QStringList families;
+ TQStringList families;
KFontChooser::getFontList(families, 0);
setFonts(families);
}
-KFontCombo::KFontCombo(const QStringList &fonts, QWidget *parent, const char *name)
+KFontCombo::KFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name)
: KComboBox(true, parent, name)
{
init();
setFonts(fonts);
}
-void KFontCombo::setFonts(const QStringList &fonts)
+void KFontCombo::setFonts(const TQStringList &fonts)
{
clear();
- for (QStringList::ConstIterator it = fonts.begin(); it != fonts.end(); ++it)
+ for (TQStringList::ConstIterator it = fonts.begin(); it != fonts.end(); ++it)
new KFontListItem(*it, this);
}
/*
* Maintenance note: Keep in sync with KFontAction::setFont()
*/
-void KFontCombo::setCurrentFont(const QString &family)
+void KFontCombo::setCurrentFont(const TQString &family)
{
- QString lowerName = family.lower();
+ TQString lowerName = family.lower();
int c = count();
for(int i = 0; i < c; i++)
{
@@ -234,7 +234,7 @@ void KFontCombo::slotModified( int )
d->modified = 1;
}
-QString KFontCombo::currentFont() const
+TQString KFontCombo::currentFont() const
{
if (d->modified)
return currentText();
@@ -244,7 +244,7 @@ QString KFontCombo::currentFont() const
void KFontCombo::setCurrentItem(int i)
{
d->modified = true;
- QComboBox::setCurrentItem(i);
+ TQComboBox::setCurrentItem(i);
}
void KFontCombo::init()
@@ -254,7 +254,7 @@ void KFontCombo::init()
setInsertionPolicy(NoInsertion);
setAutoCompletion(true);
setSize(12);
- connect( this, SIGNAL(highlighted(int)), SLOT(slotModified(int)));
+ connect( this, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotModified(int)));
}
KFontCombo::~KFontCombo()
@@ -319,9 +319,9 @@ void KFontCombo::setSize(int size)
if (d->size == size)
return;
d->size = size;
- QFont f;
+ TQFont f;
f.setPointSize(size);
- QFontMetrics fm(f);
+ TQFontMetrics fm(f);
d->lineSpacing = fm.lineSpacing();
updateFonts();
}
diff --git a/kdeui/kfontcombo.h b/kdeui/kfontcombo.h
index f3c5d1169..8a2a5f07c 100644
--- a/kdeui/kfontcombo.h
+++ b/kdeui/kfontcombo.h
@@ -35,7 +35,7 @@
class KDEUI_EXPORT KFontCombo : public KComboBox
{
Q_OBJECT
- Q_PROPERTY(QString family READ currentFont WRITE setCurrentFont)
+ Q_PROPERTY(TQString family READ currentFont WRITE setCurrentFont)
Q_PROPERTY(bool bold READ bold WRITE setBold DESIGNABLE true)
Q_PROPERTY(bool italic READ italic WRITE setItalic DESIGNABLE true)
Q_PROPERTY(bool underline READ underline WRITE setUnderline DESIGNABLE true)
@@ -48,7 +48,7 @@ public:
* @param parent The parent widget
* @param name The object name for the widget
*/
- KFontCombo(QWidget *parent, const char *name = 0);
+ KFontCombo(TQWidget *parent, const char *name = 0);
/**
* Constructor that takes an already initialzed font list
*
@@ -56,7 +56,7 @@ public:
* @param parent The parent widget
* @param name The object name for the widget
*/
- KFontCombo(const QStringList &fonts, QWidget *parent, const char *name = 0);
+ KFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name = 0);
/**
* Destructor
*/
@@ -67,17 +67,17 @@ public:
*
* @param fonts Font list to show
*/
- void setFonts(const QStringList &fonts);
+ void setFonts(const TQStringList &fonts);
/**
* Sets the currently selected font.
*
* @param family Font to select.
*/
- void setCurrentFont(const QString &family);
+ void setCurrentFont(const TQString &family);
/**
* @return the currently selected font.
*/
- QString currentFont() const;
+ TQString currentFont() const;
/**
* Sets the listed fonts to bold or normal.
diff --git a/kdeui/kfontdialog.cpp b/kdeui/kfontdialog.cpp
index 64de6e4c6..4044c7b68 100644
--- a/kdeui/kfontdialog.cpp
+++ b/kdeui/kfontdialog.cpp
@@ -28,18 +28,18 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qfont.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qscrollbar.h>
-#include <qstringlist.h>
-#include <qfontdatabase.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqfont.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqscrollbar.h>
+#include <tqstringlist.h>
+#include <tqfontdatabase.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <kcharsets.h>
@@ -47,7 +47,7 @@
#include <kdialog.h>
#include <kglobal.h>
#include <kglobalsettings.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <klistbox.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -56,7 +56,7 @@
#include "kfontdialog.moc"
-static int minimumListWidth( const QListBox *list )
+static int minimumListWidth( const TQListBox *list )
{
int w=0;
for( uint i=0; i<list->count(); i++ )
@@ -70,7 +70,7 @@ static int minimumListWidth( const QListBox *list )
return w;
}
-static int minimumListHeight( const QListBox *list, int numVisibleEntry )
+static int minimumListHeight( const TQListBox *list, int numVisibleEntry )
{
int w = list->count() > 0 ? list->item(0)->height(list) :
list->fontMetrics().lineSpacing();
@@ -84,103 +84,103 @@ class KFontChooser::KFontChooserPrivate
{
public:
KFontChooserPrivate()
- { m_palette.setColor(QPalette::Active, QColorGroup::Text, Qt::black);
- m_palette.setColor(QPalette::Active, QColorGroup::Base, Qt::white); }
- QPalette m_palette;
+ { m_palette.setColor(TQPalette::Active, TQColorGroup::Text, Qt::black);
+ m_palette.setColor(TQPalette::Active, TQColorGroup::Base, Qt::white); }
+ TQPalette m_palette;
};
-KFontChooser::KFontChooser(QWidget *parent, const char *name,
- bool onlyFixed, const QStringList &fontList,
+KFontChooser::KFontChooser(TQWidget *parent, const char *name,
+ bool onlyFixed, const TQStringList &fontList,
bool makeFrame, int visibleListSize, bool diff,
- QButton::ToggleState *sizeIsRelativeState )
- : QWidget(parent, name), usingFixed(onlyFixed)
+ TQButton::ToggleState *sizeIsRelativeState )
+ : TQWidget(parent, name), usingFixed(onlyFixed)
{
charsetsCombo = 0;
- QString mainWhatsThisText =
+ TQString mainWhatsThisText =
i18n( "Here you can choose the font to be used." );
- QWhatsThis::add( this, mainWhatsThisText );
+ TQWhatsThis::add( this, mainWhatsThisText );
d = new KFontChooserPrivate;
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
int checkBoxGap = KDialog::spacingHint() / 2;
- QWidget *page;
- QGridLayout *gridLayout;
+ TQWidget *page;
+ TQGridLayout *gridLayout;
int row = 0;
if( makeFrame )
{
- page = new QGroupBox( i18n("Requested Font"), this );
+ page = new TQGroupBox( i18n("Requested Font"), this );
topLayout->addWidget(page);
- gridLayout = new QGridLayout( page, 5, 3, KDialog::marginHint(), KDialog::spacingHint() );
+ gridLayout = new TQGridLayout( page, 5, 3, KDialog::marginHint(), KDialog::spacingHint() );
gridLayout->addRowSpacing( 0, fontMetrics().lineSpacing() );
row = 1;
}
else
{
- page = new QWidget( this );
+ page = new TQWidget( this );
topLayout->addWidget(page);
- gridLayout = new QGridLayout( page, 4, 3, 0, KDialog::spacingHint() );
+ gridLayout = new TQGridLayout( page, 4, 3, 0, KDialog::spacingHint() );
}
//
// first, create the labels across the top
//
- QHBoxLayout *familyLayout = new QHBoxLayout();
+ TQHBoxLayout *familyLayout = new TQHBoxLayout();
familyLayout->addSpacing( checkBoxGap );
if (diff) {
- familyCheckbox = new QCheckBox(i18n("Font"), page);
- connect(familyCheckbox, SIGNAL(toggled(bool)), SLOT(toggled_checkbox()));
+ familyCheckbox = new TQCheckBox(i18n("Font"), page);
+ connect(familyCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggled_checkbox()));
familyLayout->addWidget(familyCheckbox, 0, Qt::AlignLeft);
- QString familyCBToolTipText =
+ TQString familyCBToolTipText =
i18n("Change font family?");
- QString familyCBWhatsThisText =
+ TQString familyCBWhatsThisText =
i18n("Enable this checkbox to change the font family settings.");
- QWhatsThis::add( familyCheckbox, familyCBWhatsThisText );
- QToolTip::add( familyCheckbox, familyCBToolTipText );
+ TQWhatsThis::add( familyCheckbox, familyCBWhatsThisText );
+ TQToolTip::add( familyCheckbox, familyCBToolTipText );
familyLabel = 0;
} else {
familyCheckbox = 0;
- familyLabel = new QLabel( i18n("Font:"), page, "familyLabel" );
+ familyLabel = new TQLabel( i18n("Font:"), page, "familyLabel" );
familyLayout->addWidget(familyLabel, 1, Qt::AlignLeft);
}
gridLayout->addLayout(familyLayout, row, 0 );
- QHBoxLayout *styleLayout = new QHBoxLayout();
+ TQHBoxLayout *styleLayout = new TQHBoxLayout();
if (diff) {
- styleCheckbox = new QCheckBox(i18n("Font style"), page);
- connect(styleCheckbox, SIGNAL(toggled(bool)), SLOT(toggled_checkbox()));
+ styleCheckbox = new TQCheckBox(i18n("Font style"), page);
+ connect(styleCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggled_checkbox()));
styleLayout->addWidget(styleCheckbox, 0, Qt::AlignLeft);
- QString styleCBToolTipText =
+ TQString styleCBToolTipText =
i18n("Change font style?");
- QString styleCBWhatsThisText =
+ TQString styleCBWhatsThisText =
i18n("Enable this checkbox to change the font style settings.");
- QWhatsThis::add( styleCheckbox, styleCBWhatsThisText );
- QToolTip::add( styleCheckbox, styleCBToolTipText );
+ TQWhatsThis::add( styleCheckbox, styleCBWhatsThisText );
+ TQToolTip::add( styleCheckbox, styleCBToolTipText );
styleLabel = 0;
} else {
styleCheckbox = 0;
- styleLabel = new QLabel( i18n("Font style:"), page, "styleLabel");
+ styleLabel = new TQLabel( i18n("Font style:"), page, "styleLabel");
styleLayout->addWidget(styleLabel, 1, Qt::AlignLeft);
}
styleLayout->addSpacing( checkBoxGap );
gridLayout->addLayout(styleLayout, row, 1 );
- QHBoxLayout *sizeLayout = new QHBoxLayout();
+ TQHBoxLayout *sizeLayout = new TQHBoxLayout();
if (diff) {
- sizeCheckbox = new QCheckBox(i18n("Size"),page);
- connect(sizeCheckbox, SIGNAL(toggled(bool)), SLOT(toggled_checkbox()));
+ sizeCheckbox = new TQCheckBox(i18n("Size"),page);
+ connect(sizeCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggled_checkbox()));
sizeLayout->addWidget(sizeCheckbox, 0, Qt::AlignLeft);
- QString sizeCBToolTipText =
+ TQString sizeCBToolTipText =
i18n("Change font size?");
- QString sizeCBWhatsThisText =
+ TQString sizeCBWhatsThisText =
i18n("Enable this checkbox to change the font size settings.");
- QWhatsThis::add( sizeCheckbox, sizeCBWhatsThisText );
- QToolTip::add( sizeCheckbox, sizeCBToolTipText );
+ TQWhatsThis::add( sizeCheckbox, sizeCBWhatsThisText );
+ TQToolTip::add( sizeCheckbox, sizeCBToolTipText );
sizeLabel = 0;
} else {
sizeCheckbox = 0;
- sizeLabel = new QLabel( i18n("Size:"), page, "sizeLabel");
+ sizeLabel = new TQLabel( i18n("Size:"), page, "sizeLabel");
sizeLayout->addWidget(sizeLabel, 1, Qt::AlignLeft);
}
sizeLayout->addSpacing( checkBoxGap );
@@ -195,12 +195,12 @@ KFontChooser::KFontChooser(QWidget *parent, const char *name,
familyListBox = new KListBox( page, "familyListBox");
familyListBox->setEnabled( !diff );
gridLayout->addWidget( familyListBox, row, 0 );
- QString fontFamilyWhatsThisText =
+ TQString fontFamilyWhatsThisText =
i18n("Here you can choose the font family to be used." );
- QWhatsThis::add( familyListBox, fontFamilyWhatsThisText );
- QWhatsThis::add(diff?(QWidget *) familyCheckbox:(QWidget *) familyLabel, fontFamilyWhatsThisText );
- connect(familyListBox, SIGNAL(highlighted(const QString &)),
- SLOT(family_chosen_slot(const QString &)));
+ TQWhatsThis::add( familyListBox, fontFamilyWhatsThisText );
+ TQWhatsThis::add(diff?(TQWidget *) familyCheckbox:(TQWidget *) familyLabel, fontFamilyWhatsThisText );
+ connect(familyListBox, TQT_SIGNAL(highlighted(const TQString &)),
+ TQT_SLOT(family_chosen_slot(const TQString &)));
if(!fontList.isEmpty())
{
familyListBox->insertStringList(fontList);
@@ -217,10 +217,10 @@ KFontChooser::KFontChooser(QWidget *parent, const char *name,
styleListBox = new KListBox( page, "styleListBox");
styleListBox->setEnabled( !diff );
gridLayout->addWidget(styleListBox, row, 1);
- QString fontStyleWhatsThisText =
+ TQString fontStyleWhatsThisText =
i18n("Here you can choose the font style to be used." );
- QWhatsThis::add( styleListBox, fontStyleWhatsThisText );
- QWhatsThis::add(diff?(QWidget *)styleCheckbox:(QWidget *)styleLabel, fontFamilyWhatsThisText );
+ TQWhatsThis::add( styleListBox, fontStyleWhatsThisText );
+ TQWhatsThis::add(diff?(TQWidget *)styleCheckbox:(TQWidget *)styleLabel, fontFamilyWhatsThisText );
styleListBox->insertItem(i18n("Regular"));
styleListBox->insertItem(i18n("Italic"));
styleListBox->insertItem(i18n("Bold"));
@@ -229,8 +229,8 @@ KFontChooser::KFontChooser(QWidget *parent, const char *name,
styleListBox->setMinimumHeight(
minimumListHeight( styleListBox, visibleListSize ) );
- connect(styleListBox, SIGNAL(highlighted(const QString &)),
- SLOT(style_chosen_slot(const QString &)));
+ connect(styleListBox, TQT_SIGNAL(highlighted(const TQString &)),
+ TQT_SLOT(style_chosen_slot(const TQString &)));
sizeListBox = new KListBox( page, "sizeListBox");
@@ -240,38 +240,38 @@ KFontChooser::KFontChooser(QWidget *parent, const char *name,
sizeListBox->setEnabled( !diff );
sizeOfFont->setEnabled( !diff );
if( sizeIsRelativeState ) {
- QString sizeIsRelativeCBText =
+ TQString sizeIsRelativeCBText =
i18n("Relative");
- QString sizeIsRelativeCBToolTipText =
+ TQString sizeIsRelativeCBToolTipText =
i18n("Font size<br><i>fixed</i> or <i>relative</i><br>to environment");
- QString sizeIsRelativeCBWhatsThisText =
+ TQString sizeIsRelativeCBWhatsThisText =
i18n("Here you can switch between fixed font size and font size "
"to be calculated dynamically and adjusted to changing "
"environment (e.g. widget dimensions, paper size)." );
- sizeIsRelativeCheckBox = new QCheckBox( sizeIsRelativeCBText,
+ sizeIsRelativeCheckBox = new TQCheckBox( sizeIsRelativeCBText,
page,
"sizeIsRelativeCheckBox" );
sizeIsRelativeCheckBox->setTristate( diff );
- QGridLayout *sizeLayout2 = new QGridLayout( 3,2, KDialog::spacingHint()/2, "sizeLayout2" );
+ TQGridLayout *sizeLayout2 = new TQGridLayout( 3,2, KDialog::spacingHint()/2, "sizeLayout2" );
gridLayout->addLayout(sizeLayout2, row, 2);
sizeLayout2->setColStretch( 1, 1 ); // to prevent text from eating the right border
sizeLayout2->addMultiCellWidget( sizeOfFont, 0, 0, 0, 1);
sizeLayout2->addMultiCellWidget(sizeListBox, 1,1, 0,1);
sizeLayout2->addWidget(sizeIsRelativeCheckBox, 2, 0, Qt::AlignLeft);
- QWhatsThis::add( sizeIsRelativeCheckBox, sizeIsRelativeCBWhatsThisText );
- QToolTip::add( sizeIsRelativeCheckBox, sizeIsRelativeCBToolTipText );
+ TQWhatsThis::add( sizeIsRelativeCheckBox, sizeIsRelativeCBWhatsThisText );
+ TQToolTip::add( sizeIsRelativeCheckBox, sizeIsRelativeCBToolTipText );
}
else {
sizeIsRelativeCheckBox = 0L;
- QGridLayout *sizeLayout2 = new QGridLayout( 2,1, KDialog::spacingHint()/2, "sizeLayout2" );
+ TQGridLayout *sizeLayout2 = new TQGridLayout( 2,1, KDialog::spacingHint()/2, "sizeLayout2" );
gridLayout->addLayout(sizeLayout2, row, 2);
sizeLayout2->addWidget( sizeOfFont, 0, 0);
sizeLayout2->addMultiCellWidget(sizeListBox, 1,1, 0,0);
}
- QString fontSizeWhatsThisText =
+ TQString fontSizeWhatsThisText =
i18n("Here you can choose the font size to be used." );
- QWhatsThis::add( sizeListBox, fontSizeWhatsThisText );
- QWhatsThis::add( diff?(QWidget *)sizeCheckbox:(QWidget *)sizeLabel, fontSizeWhatsThisText );
+ TQWhatsThis::add( sizeListBox, fontSizeWhatsThisText );
+ TQWhatsThis::add( diff?(TQWidget *)sizeCheckbox:(TQWidget *)sizeLabel, fontSizeWhatsThisText );
fillSizeList();
sizeListBox->setMinimumWidth( minimumListWidth(sizeListBox) +
@@ -279,49 +279,49 @@ KFontChooser::KFontChooser(QWidget *parent, const char *name,
sizeListBox->setMinimumHeight(
minimumListHeight( sizeListBox, visibleListSize ) );
- connect( sizeOfFont, SIGNAL( valueChanged(int) ),
- SLOT(size_value_slot(int)));
+ connect( sizeOfFont, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT(size_value_slot(int)));
- connect( sizeListBox, SIGNAL(highlighted(const QString&)),
- SLOT(size_chosen_slot(const QString&)) );
- sizeListBox->setSelected(sizeListBox->findItem(QString::number(10)), true); // default to 10pt.
+ connect( sizeListBox, TQT_SIGNAL(highlighted(const TQString&)),
+ TQT_SLOT(size_chosen_slot(const TQString&)) );
+ sizeListBox->setSelected(sizeListBox->findItem(TQString::number(10)), true); // default to 10pt.
row ++;
row ++;
- sampleEdit = new QLineEdit( page, "sampleEdit");
- QFont tmpFont( KGlobalSettings::generalFont().family(), 64, QFont::Black );
+ sampleEdit = new TQLineEdit( page, "sampleEdit");
+ TQFont tmpFont( KGlobalSettings::generalFont().family(), 64, TQFont::Black );
sampleEdit->setFont(tmpFont);
//i18n: This is a classical test phrase. (It contains all letters from A to Z.)
sampleEdit->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog"));
sampleEdit->setMinimumHeight( sampleEdit->fontMetrics().lineSpacing() );
sampleEdit->setAlignment(Qt::AlignCenter);
gridLayout->addMultiCellWidget(sampleEdit, 4, 4, 0, 2);
- QString sampleEditWhatsThisText =
+ TQString sampleEditWhatsThisText =
i18n("This sample text illustrates the current settings. "
"You may edit it to test special characters." );
- QWhatsThis::add( sampleEdit, sampleEditWhatsThisText );
- connect(this, SIGNAL(fontSelected(const QFont &)),
- SLOT(displaySample(const QFont &)));
+ TQWhatsThis::add( sampleEdit, sampleEditWhatsThisText );
+ connect(this, TQT_SIGNAL(fontSelected(const TQFont &)),
+ TQT_SLOT(displaySample(const TQFont &)));
- QVBoxLayout *vbox;
+ TQVBoxLayout *vbox;
if( makeFrame )
{
- page = new QGroupBox( i18n("Actual Font"), this );
+ page = new TQGroupBox( i18n("Actual Font"), this );
topLayout->addWidget(page);
- vbox = new QVBoxLayout( page, KDialog::spacingHint() );
+ vbox = new TQVBoxLayout( page, KDialog::spacingHint() );
vbox->addSpacing( fontMetrics().lineSpacing() );
}
else
{
- page = new QWidget( this );
+ page = new TQWidget( this );
topLayout->addWidget(page);
- vbox = new QVBoxLayout( page, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n("Actual Font"), page );
+ vbox = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
+ TQLabel *label = new TQLabel( i18n("Actual Font"), page );
vbox->addWidget( label );
}
- xlfdEdit = new QLineEdit( page, "xlfdEdit" );
+ xlfdEdit = new TQLineEdit( page, "xlfdEdit" );
vbox->addWidget( xlfdEdit );
// lets initialize the display if possible
@@ -331,8 +331,8 @@ KFontChooser::KFontChooser(QWidget *parent, const char *name,
setSizeIsRelative( *sizeIsRelativeState );
KConfig *config = KGlobal::config();
- KConfigGroupSaver saver(config, QString::fromLatin1("General"));
- showXLFDArea(config->readBoolEntry(QString::fromLatin1("fontSelectorShowXLFD"), false));
+ KConfigGroupSaver saver(config, TQString::fromLatin1("General"));
+ showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false));
}
KFontChooser::~KFontChooser()
@@ -355,55 +355,55 @@ void KFontChooser::fillSizeList() {
};
for(int i = 0; c[i]; ++i)
{
- sizeListBox->insertItem(QString::number(c[i]));
+ sizeListBox->insertItem(TQString::number(c[i]));
}
}
-void KFontChooser::setColor( const QColor & col )
+void KFontChooser::setColor( const TQColor & col )
{
- d->m_palette.setColor( QPalette::Active, QColorGroup::Text, col );
- QPalette pal = sampleEdit->palette();
- pal.setColor( QPalette::Active, QColorGroup::Text, col );
+ d->m_palette.setColor( TQPalette::Active, TQColorGroup::Text, col );
+ TQPalette pal = sampleEdit->palette();
+ pal.setColor( TQPalette::Active, TQColorGroup::Text, col );
sampleEdit->setPalette( pal );
}
-QColor KFontChooser::color() const
+TQColor KFontChooser::color() const
{
- return d->m_palette.color( QPalette::Active, QColorGroup::Text );
+ return d->m_palette.color( TQPalette::Active, TQColorGroup::Text );
}
-void KFontChooser::setBackgroundColor( const QColor & col )
+void KFontChooser::setBackgroundColor( const TQColor & col )
{
- d->m_palette.setColor( QPalette::Active, QColorGroup::Base, col );
- QPalette pal = sampleEdit->palette();
- pal.setColor( QPalette::Active, QColorGroup::Base, col );
+ d->m_palette.setColor( TQPalette::Active, TQColorGroup::Base, col );
+ TQPalette pal = sampleEdit->palette();
+ pal.setColor( TQPalette::Active, TQColorGroup::Base, col );
sampleEdit->setPalette( pal );
}
-QColor KFontChooser::backgroundColor() const
+TQColor KFontChooser::backgroundColor() const
{
- return d->m_palette.color( QPalette::Active, QColorGroup::Base );
+ return d->m_palette.color( TQPalette::Active, TQColorGroup::Base );
}
-void KFontChooser::setSizeIsRelative( QButton::ToggleState relative )
+void KFontChooser::setSizeIsRelative( TQButton::ToggleState relative )
{
// check or uncheck or gray out the "relative" checkbox
if( sizeIsRelativeCheckBox ) {
- if( QButton::NoChange == relative )
+ if( TQButton::NoChange == relative )
sizeIsRelativeCheckBox->setNoChange();
else
- sizeIsRelativeCheckBox->setChecked( QButton::On == relative );
+ sizeIsRelativeCheckBox->setChecked( TQButton::On == relative );
}
}
-QButton::ToggleState KFontChooser::sizeIsRelative() const
+TQButton::ToggleState KFontChooser::sizeIsRelative() const
{
return sizeIsRelativeCheckBox
? sizeIsRelativeCheckBox->state()
- : QButton::NoChange;
+ : TQButton::NoChange;
}
-QSize KFontChooser::sizeHint( void ) const
+TQSize KFontChooser::sizeHint( void ) const
{
return minimumSizeHint();
}
@@ -426,12 +426,12 @@ void KFontChooser::enableColumn( int column, bool state )
}
-void KFontChooser::setFont( const QFont& aFont, bool onlyFixed )
+void KFontChooser::setFont( const TQFont& aFont, bool onlyFixed )
{
selFont = aFont;
selectedSize=aFont.pointSize();
if (selectedSize == -1)
- selectedSize = QFontInfo(aFont).pointSize();
+ selectedSize = TQFontInfo(aFont).pointSize();
if( onlyFixed != usingFixed)
{
@@ -461,14 +461,14 @@ void KFontChooser::toggled_checkbox()
sizeOfFont->setEnabled( sizeCheckbox->isChecked() );
}
-void KFontChooser::family_chosen_slot(const QString& family)
+void KFontChooser::family_chosen_slot(const TQString& family)
{
- QFontDatabase dbase;
- QStringList styles = QStringList(dbase.styles(family));
+ TQFontDatabase dbase;
+ TQStringList styles = TQStringList(dbase.styles(family));
styleListBox->clear();
currentStyles.clear();
- for ( QStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {
- QString style = *it;
+ for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {
+ TQString style = *it;
int pos = style.find("Plain");
if(pos >=0) style = style.replace(pos,5,i18n("Regular"));
pos = style.find("Normal");
@@ -486,17 +486,17 @@ void KFontChooser::family_chosen_slot(const QString& family)
}
styleListBox->blockSignals(true);
- QListBoxItem *item = styleListBox->findItem(selectedStyle);
+ TQListBoxItem *item = styleListBox->findItem(selectedStyle);
if (item)
styleListBox->setSelected(styleListBox->findItem(selectedStyle), true);
else
styleListBox->setSelected(0, true);
styleListBox->blockSignals(false);
- style_chosen_slot(QString::null);
+ style_chosen_slot(TQString::null);
}
-void KFontChooser::size_chosen_slot(const QString& size){
+void KFontChooser::size_chosen_slot(const TQString& size){
selectedSize=size.toInt();
sizeOfFont->setValue(selectedSize);
@@ -509,9 +509,9 @@ void KFontChooser::size_value_slot(int val) {
emit fontSelected(selFont);
}
-void KFontChooser::style_chosen_slot(const QString& style)
+void KFontChooser::style_chosen_slot(const TQString& style)
{
- QString currentStyle;
+ TQString currentStyle;
if (style.isEmpty())
currentStyle = styleListBox->currentText();
else
@@ -520,25 +520,25 @@ void KFontChooser::style_chosen_slot(const QString& style)
int diff=0; // the difference between the font size requested and what we can show.
sizeListBox->clear();
- QFontDatabase dbase;
+ TQFontDatabase dbase;
if(dbase.isSmoothlyScalable(familyListBox->currentText(), currentStyles[currentStyle])) { // is vector font
//sampleEdit->setPaletteBackgroundPixmap( VectorPixmap ); // TODO
fillSizeList();
} else { // is bitmap font.
//sampleEdit->setPaletteBackgroundPixmap( BitmapPixmap ); // TODO
- QValueList<int> sizes = dbase.smoothSizes(familyListBox->currentText(), currentStyles[currentStyle]);
+ TQValueList<int> sizes = dbase.smoothSizes(familyListBox->currentText(), currentStyles[currentStyle]);
if(sizes.count() > 0) {
- QValueList<int>::iterator it;
+ TQValueList<int>::iterator it;
diff=1000;
for ( it = sizes.begin(); it != sizes.end(); ++it ) {
if(*it <= selectedSize || diff > *it - selectedSize) diff = selectedSize - *it;
- sizeListBox->insertItem(QString::number(*it));
+ sizeListBox->insertItem(TQString::number(*it));
}
} else // there are times QT does not provide the list..
fillSizeList();
}
sizeListBox->blockSignals(true);
- sizeListBox->setSelected(sizeListBox->findItem(QString::number(selectedSize)), true);
+ sizeListBox->setSelected(sizeListBox->findItem(TQString::number(selectedSize)), true);
sizeListBox->blockSignals(false);
sizeListBox->ensureCurrentVisible();
@@ -549,14 +549,14 @@ void KFontChooser::style_chosen_slot(const QString& style)
selectedStyle = style;
}
-void KFontChooser::displaySample(const QFont& font)
+void KFontChooser::displaySample(const TQFont& font)
{
sampleEdit->setFont(font);
sampleEdit->setCursorPosition(0);
xlfdEdit->setText(font.rawName());
xlfdEdit->setCursorPosition(0);
- //QFontInfo a = QFontInfo(font);
+ //TQFontInfo a = TQFontInfo(font);
//kdDebug() << "font: " << a.family () << ", " << a.pointSize () << endl;
//kdDebug() << " (" << font.toString() << ")\n";
}
@@ -565,12 +565,12 @@ void KFontChooser::setupDisplay()
{
// Calling familyListBox->setCurrentItem() causes the value of selFont
// to change, so we save the family, style and size beforehand.
- QString family = selFont.family().lower();
+ TQString family = selFont.family().lower();
int style = (selFont.bold() ? 2 : 0) + (selFont.italic() ? 1 : 0);
int size = selFont.pointSize();
if (size == -1)
- size = QFontInfo(selFont).pointSize();
- QString sizeStr = QString::number(size);
+ size = TQFontInfo(selFont).pointSize();
+ TQString sizeStr = TQString::number(size);
int numEntries, i;
@@ -600,7 +600,7 @@ void KFontChooser::setupDisplay()
// 2nd Fallback
if ( (i == numEntries) )
{
- QString fallback = family+" [";
+ TQString fallback = family+" [";
for (i = 0; i < numEntries; i++) {
if (familyListBox->text(i).lower().startsWith(fallback)) {
familyListBox->setCurrentItem(i);
@@ -638,16 +638,16 @@ void KFontChooser::setupDisplay()
}
-void KFontChooser::getFontList( QStringList &list, uint fontListCriteria)
+void KFontChooser::getFontList( TQStringList &list, uint fontListCriteria)
{
- QFontDatabase dbase;
- QStringList lstSys(dbase.families());
+ TQFontDatabase dbase;
+ TQStringList lstSys(dbase.families());
// if we have criteria; then check fonts before adding
if (fontListCriteria)
{
- QStringList lstFonts;
- for (QStringList::Iterator it = lstSys.begin(); it != lstSys.end(); ++it)
+ TQStringList lstFonts;
+ for (TQStringList::Iterator it = lstSys.begin(); it != lstSys.end(); ++it)
{
if ((fontListCriteria & FixedWidthFonts) > 0 && !dbase.isFixedPitch(*it)) continue;
if (((fontListCriteria & (SmoothScalableFonts | ScalableFonts)) == ScalableFonts) &&
@@ -671,7 +671,7 @@ void KFontChooser::getFontList( QStringList &list, uint fontListCriteria)
list = lstSys;
}
-void KFontChooser::addFont( QStringList &list, const char *xfont )
+void KFontChooser::addFont( TQStringList &list, const char *xfont )
{
const char *ptr = strchr( xfont, '-' );
if ( !ptr )
@@ -681,16 +681,16 @@ void KFontChooser::addFont( QStringList &list, const char *xfont )
if ( !ptr )
return;
- QString font = QString::fromLatin1(ptr + 1);
+ TQString font = TQString::fromLatin1(ptr + 1);
int pos;
if ( ( pos = font.find( '-' ) ) > 0 ) {
font.truncate( pos );
- if ( font.find( QString::fromLatin1("open look"), 0, false ) >= 0 )
+ if ( font.find( TQString::fromLatin1("open look"), 0, false ) >= 0 )
return;
- QStringList::Iterator it = list.begin();
+ TQStringList::Iterator it = list.begin();
for ( ; it != list.end(); ++it )
if ( *it == font )
@@ -701,7 +701,7 @@ void KFontChooser::addFont( QStringList &list, const char *xfont )
void KFontChooser::fillFamilyListBox(bool onlyFixedFonts)
{
- QStringList fontList;
+ TQStringList fontList;
getFontList(fontList, onlyFixedFonts?FixedWidthFonts:0);
familyListBox->clear();
familyListBox->insertStringList(fontList);
@@ -721,10 +721,10 @@ void KFontChooser::showXLFDArea(bool show)
///////////////////////////////////////////////////////////////////////////////
-KFontDialog::KFontDialog( QWidget *parent, const char* name,
+KFontDialog::KFontDialog( TQWidget *parent, const char* name,
bool onlyFixed, bool modal,
- const QStringList &fontList, bool makeFrame, bool diff,
- QButton::ToggleState *sizeIsRelativeState )
+ 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",
@@ -734,11 +734,11 @@ KFontDialog::KFontDialog( QWidget *parent, const char* name,
}
-int KFontDialog::getFontDiff( QFont &theFont, int &diffFlags, bool onlyFixed,
- QWidget *parent, bool makeFrame,
- QButton::ToggleState *sizeIsRelativeState )
+int KFontDialog::getFontDiff( TQFont &theFont, int &diffFlags, bool onlyFixed,
+ TQWidget *parent, bool makeFrame,
+ TQButton::ToggleState *sizeIsRelativeState )
{
- KFontDialog dlg( parent, "Font Selector", onlyFixed, true, QStringList(),
+ KFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(),
makeFrame, true, sizeIsRelativeState );
dlg.setFont( theFont, onlyFixed );
@@ -753,11 +753,11 @@ int KFontDialog::getFontDiff( QFont &theFont, int &diffFlags, bool onlyFixed,
return result;
}
-int KFontDialog::getFont( QFont &theFont, bool onlyFixed,
- QWidget *parent, bool makeFrame,
- QButton::ToggleState *sizeIsRelativeState )
+int KFontDialog::getFont( TQFont &theFont, bool onlyFixed,
+ TQWidget *parent, bool makeFrame,
+ TQButton::ToggleState *sizeIsRelativeState )
{
- KFontDialog dlg( parent, "Font Selector", onlyFixed, true, QStringList(),
+ KFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(),
makeFrame, false, sizeIsRelativeState );
dlg.setFont( theFont, onlyFixed );
@@ -772,13 +772,13 @@ int KFontDialog::getFont( QFont &theFont, bool onlyFixed,
}
-int KFontDialog::getFontAndText( QFont &theFont, QString &theString,
- bool onlyFixed, QWidget *parent,
+int KFontDialog::getFontAndText( TQFont &theFont, TQString &theString,
+ bool onlyFixed, TQWidget *parent,
bool makeFrame,
- QButton::ToggleState *sizeIsRelativeState )
+ TQButton::ToggleState *sizeIsRelativeState )
{
KFontDialog dlg( parent, "Font and Text Selector", onlyFixed, true,
- QStringList(), makeFrame, false, sizeIsRelativeState );
+ TQStringList(), makeFrame, false, sizeIsRelativeState );
dlg.setFont( theFont, onlyFixed );
int result = dlg.exec();
diff --git a/kdeui/kfontdialog.h b/kdeui/kfontdialog.h
index 3452d4869..25c7f32bf 100644
--- a/kdeui/kfontdialog.h
+++ b/kdeui/kfontdialog.h
@@ -26,8 +26,8 @@
#ifndef _K_FONT_DIALOG_H_
#define _K_FONT_DIALOG_H_
-#include <qlineedit.h>
-#include <qbutton.h>
+#include <tqlineedit.h>
+#include <tqbutton.h>
#include <kdialogbase.h>
class QComboBox;
@@ -54,7 +54,7 @@ class KIntNumInput;
class KDEUI_EXPORT KFontChooser : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QFont font READ font WRITE setFont )
+ Q_PROPERTY( TQFont font READ font WRITE setFont )
public:
/**
@@ -78,7 +78,7 @@ public:
* that will be displayed in the dialog.
* <p>Consider the following code snippet;
* \code
- * QStringList list;
+ * TQStringList list;
* KFontChooser::getFontList(list,SmoothScalableFonts);
* KFontChooser chooseFont = new KFontChooser(0, "FontList", false, list);
* \endcode
@@ -105,11 +105,11 @@ public:
* *sizeIsRelativeState, user choice may be retrieved by
* calling sizeIsRelative().
*/
- KFontChooser(QWidget *parent = 0L, const char *name = 0L,
+ KFontChooser(TQWidget *parent = 0L, const char *name = 0L,
bool onlyFixed = false,
- const QStringList &fontList = QStringList(),
+ const TQStringList &fontList = TQStringList(),
bool makeFrame = true, int visibleListSize=8,
- bool diff = false, QButton::ToggleState *sizeIsRelativeState = 0L );
+ bool diff = false, TQButton::ToggleState *sizeIsRelativeState = 0L );
/**
* Destructs the font chooser.
@@ -136,7 +136,7 @@ public:
* @param onlyFixed Readjust the font list to display only fixed
* width fonts if @p true, or vice-versa.
*/
- void setFont( const QFont &font, bool onlyFixed = false );
+ void setFont( const TQFont &font, bool onlyFixed = false );
/**
* @return The bitmask corresponding to the attributes the user
@@ -147,29 +147,29 @@ public:
/**
* @return The currently selected font in the chooser.
*/
- QFont font() const { return selFont; }
+ TQFont font() const { return selFont; }
/**
* Sets the color to use in the preview.
*/
- void setColor( const QColor & col );
+ void setColor( const TQColor & col );
/**
* @return The color currently used in the preview (default: the text
* color of the active color group)
*/
- QColor color() const;
+ TQColor color() const;
/**
* Sets the background color to use in the preview.
*/
- void setBackgroundColor( const QColor & col );
+ void setBackgroundColor( const TQColor & col );
/**
* @return The background color currently used in the preview (default:
* the base color of the active colorgroup)
*/
- QColor backgroundColor() const;
+ TQColor backgroundColor() const;
/**
* Sets the state of the checkbox indicating whether the font size
@@ -177,19 +177,19 @@ public:
* NOTE: If parameter sizeIsRelative was not set in the constructor
* of the widget this setting will be ignored.
*/
- void setSizeIsRelative( QButton::ToggleState relative );
+ void setSizeIsRelative( TQButton::ToggleState relative );
/**
* @return Whether the font size is to be interpreted as relative size
- * (default: QButton:Off)
+ * (default: TQButton:Off)
*/
- QButton::ToggleState sizeIsRelative() const;
+ TQButton::ToggleState sizeIsRelative() const;
/**
* @return The current text in the sample text input area.
*/
- QString sampleText() const { return sampleEdit->text(); }
+ TQString sampleText() const { return sampleEdit->text(); }
/**
* Sets the sample text.
@@ -201,7 +201,7 @@ public:
*
* @param text The new sample text. The current will be removed.
*/
- void setSampleText( const QString &text )
+ void setSampleText( const TQString &text )
{
sampleEdit->setText( text );
}
@@ -218,13 +218,13 @@ public:
}
/**
- * Converts a QFont into the corresponding X Logical Font
+ * Converts a TQFont into the corresponding X Logical Font
* Description (XLFD).
*
* @param theFont The font to convert.
* @return A string representing the given font in XLFD format.
*/
- static QString getXLFD( const QFont &theFont )
+ static TQString getXLFD( const TQFont &theFont )
{ return theFont.rawName(); }
/**
@@ -247,61 +247,61 @@ public:
* @param fontListCriteria should contain all the restrictions for font selection as OR-ed values
* @see KFontChooser::FontListCriteria for the individual values
*/
- static void getFontList( QStringList &list, uint fontListCriteria);
+ static void getFontList( TQStringList &list, uint fontListCriteria);
/**
* Reimplemented for internal reasons.
*/
- virtual QSize sizeHint( void ) const;
+ virtual TQSize sizeHint( void ) const;
signals:
/**
* Emitted whenever the selected font changes.
*/
- void fontSelected( const QFont &font );
+ void fontSelected( const TQFont &font );
private slots:
void toggled_checkbox();
- void family_chosen_slot(const QString&);
- void size_chosen_slot(const QString&);
- void style_chosen_slot(const QString&);
- void displaySample(const QFont &font);
+ void family_chosen_slot(const TQString&);
+ void size_chosen_slot(const TQString&);
+ void style_chosen_slot(const TQString&);
+ void displaySample(const TQFont &font);
void showXLFDArea(bool);
void size_value_slot(int);
private:
void fillFamilyListBox(bool onlyFixedFonts = false);
void fillSizeList();
- // This one must be static since getFontList( QStringList, char*) is so
- static void addFont( QStringList &list, const char *xfont );
+ // This one must be static since getFontList( TQStringList, char*) is so
+ static void addFont( TQStringList &list, const char *xfont );
void setupDisplay();
// pointer to an optinally supplied list of fonts to
// inserted into the fontdialog font-family combo-box
- QStringList fontList;
+ TQStringList fontList;
KIntNumInput *sizeOfFont;
- QLineEdit *sampleEdit;
- QLineEdit *xlfdEdit;
+ TQLineEdit *sampleEdit;
+ TQLineEdit *xlfdEdit;
- QLabel *familyLabel;
- QLabel *styleLabel;
- QCheckBox *familyCheckbox;
- QCheckBox *styleCheckbox;
- QCheckBox *sizeCheckbox;
- QLabel *sizeLabel;
+ TQLabel *familyLabel;
+ TQLabel *styleLabel;
+ TQCheckBox *familyCheckbox;
+ TQCheckBox *styleCheckbox;
+ TQCheckBox *sizeCheckbox;
+ TQLabel *sizeLabel;
KListBox *familyListBox;
KListBox *styleListBox;
KListBox *sizeListBox;
- QComboBox *charsetsCombo; // BIC: remove in KDE4
- QCheckBox *sizeIsRelativeCheckBox;
+ TQComboBox *charsetsCombo; // BIC: remove in KDE4
+ TQCheckBox *sizeIsRelativeCheckBox;
- QFont selFont;
+ TQFont selFont;
- QString selectedStyle;
+ TQString selectedStyle;
int selectedSize;
- QMap<QString, QString> currentStyles;
+ TQMap<TQString, TQString> currentStyles;
bool usingFixed;
@@ -325,7 +325,7 @@ private:
* Example:
*
* \code
- * QFont myFont;
+ * TQFont myFont;
* int result = KFontDialog::getFont( myFont );
* if ( result == KFontDialog::Accepted )
* ...
@@ -362,11 +362,11 @@ public:
* calling sizeIsRelative().
*
*/
- KFontDialog( QWidget *parent = 0L, const char *name = 0,
+ KFontDialog( TQWidget *parent = 0L, const char *name = 0,
bool onlyFixed = false, bool modal = false,
- const QStringList &fontlist = QStringList(),
+ const TQStringList &fontlist = TQStringList(),
bool makeFrame = true, bool diff = false,
- QButton::ToggleState *sizeIsRelativeState = 0L );
+ TQButton::ToggleState *sizeIsRelativeState = 0L );
/**
* Sets the currently selected font in the dialog.
@@ -375,13 +375,13 @@ public:
* @param onlyFixed readjust the font list to display only fixed
* width fonts if true, or vice-versa
*/
- void setFont( const QFont &font, bool onlyFixed = false )
+ void setFont( const TQFont &font, bool onlyFixed = false )
{ chooser->setFont(font, onlyFixed); }
/**
* @return The currently selected font in the dialog.
*/
- QFont font() const { return chooser->font(); }
+ TQFont font() const { return chooser->font(); }
/**
* Sets the state of the checkbox indicating whether the font size
@@ -389,14 +389,14 @@ public:
* NOTE: If parameter sizeIsRelative was not set in the constructor
* of the dialog this setting will be ignored.
*/
- void setSizeIsRelative( QButton::ToggleState relative )
+ void setSizeIsRelative( TQButton::ToggleState relative )
{ chooser->setSizeIsRelative( relative ); }
/**
* @return Whether the font size is to be interpreted as relative size
* (default: false)
*/
- QButton::ToggleState sizeIsRelative() const
+ TQButton::ToggleState sizeIsRelative() const
{ return chooser->sizeIsRelative(); }
/**
@@ -416,11 +416,11 @@ public:
* *sizeIsRelativeState and user choice will be returned
* therein.
*
- * @return QDialog::result().
+ * @return TQDialog::result().
*/
- static int getFont( QFont &theFont, bool onlyFixed = false,
- QWidget *parent = 0L, bool makeFrame = true,
- QButton::ToggleState *sizeIsRelativeState = 0L );
+ static int getFont( TQFont &theFont, bool onlyFixed = false,
+ TQWidget *parent = 0L, bool makeFrame = true,
+ TQButton::ToggleState *sizeIsRelativeState = 0L );
/**
* Creates a modal font difference dialog, lets the user choose a selection
@@ -452,11 +452,11 @@ public:
* *sizeIsRelativeState and user choice will be returned
* therein.
*
- * @returns QDialog::result().
+ * @returns TQDialog::result().
*/
- static int getFontDiff( QFont &theFont, int &diffFlags, bool onlyFixed = false,
- QWidget *parent = 0L, bool makeFrame = true,
- QButton::ToggleState *sizeIsRelativeState = 0L );
+ static int getFontDiff( TQFont &theFont, int &diffFlags, bool onlyFixed = false,
+ TQWidget *parent = 0L, bool makeFrame = true,
+ TQButton::ToggleState *sizeIsRelativeState = 0L );
/**
* When you are not only interested in the font selected, but also
@@ -477,10 +477,10 @@ public:
* therein.
* @return The result of the dialog.
*/
- static int getFontAndText( QFont &theFont, QString &theString,
- bool onlyFixed = false, QWidget *parent = 0L,
+ static int getFontAndText( TQFont &theFont, TQString &theString,
+ bool onlyFixed = false, TQWidget *parent = 0L,
bool makeFrame = true,
- QButton::ToggleState *sizeIsRelativeState = 0L );
+ TQButton::ToggleState *sizeIsRelativeState = 0L );
signals:
/**
@@ -488,7 +488,7 @@ signals:
* Connect to this to monitor the font as it is selected if you are
* not running modal.
*/
- void fontSelected( const QFont &font );
+ void fontSelected( const TQFont &font );
protected:
KFontChooser *chooser;
diff --git a/kdeui/kfontrequester.cpp b/kdeui/kfontrequester.cpp
index d32b9d9d7..293f9d546 100644
--- a/kdeui/kfontrequester.cpp
+++ b/kdeui/kfontrequester.cpp
@@ -19,37 +19,37 @@
#include "kfontrequester.h"
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kfontdialog.h>
#include <klocale.h>
-KFontRequester::KFontRequester( QWidget *parent, const char *name,
- bool onlyFixed ) : QWidget( parent, name ),
+KFontRequester::KFontRequester( TQWidget *parent, const char *name,
+ bool onlyFixed ) : TQWidget( parent, name ),
m_onlyFixed( onlyFixed )
{
- QHBoxLayout *layout = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout *layout = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
- m_sampleLabel = new QLabel( this, "m_sampleLabel" );
- m_button = new QPushButton( i18n( "Choose..." ), this, "m_button" );
+ m_sampleLabel = new TQLabel( this, "m_sampleLabel" );
+ m_button = new TQPushButton( i18n( "Choose..." ), this, "m_button" );
- m_sampleLabel->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ m_sampleLabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
setFocusProxy( m_button );
layout->addWidget( m_sampleLabel, 1 );
layout->addWidget( m_button );
- connect( m_button, SIGNAL( clicked() ), SLOT( buttonClicked() ) );
+ connect( m_button, TQT_SIGNAL( clicked() ), TQT_SLOT( buttonClicked() ) );
displaySampleText();
setToolTip();
}
-void KFontRequester::setFont( const QFont &font, bool onlyFixed )
+void KFontRequester::setFont( const TQFont &font, bool onlyFixed )
{
m_selFont = font;
m_onlyFixed = onlyFixed;
@@ -58,13 +58,13 @@ void KFontRequester::setFont( const QFont &font, bool onlyFixed )
emit fontSelected( m_selFont );
}
-void KFontRequester::setSampleText( const QString &text )
+void KFontRequester::setSampleText( const TQString &text )
{
m_sampleText = text;
displaySampleText();
}
-void KFontRequester::setTitle( const QString &title )
+void KFontRequester::setTitle( const TQString &title )
{
m_title = title;
setToolTip();
@@ -90,7 +90,7 @@ void KFontRequester::displaySampleText()
size = m_selFont.pixelSize();
if ( m_sampleText.isEmpty() )
- m_sampleLabel->setText( QString( "%1 %2" ).arg( m_selFont.family() )
+ m_sampleLabel->setText( TQString( "%1 %2" ).arg( m_selFont.family() )
.arg( size ) );
else
m_sampleLabel->setText( m_sampleText );
@@ -98,24 +98,24 @@ void KFontRequester::displaySampleText()
void KFontRequester::setToolTip()
{
- QToolTip::remove( m_button );
- QToolTip::add( m_button, i18n( "Click to select a font" ) );
+ TQToolTip::remove( m_button );
+ TQToolTip::add( m_button, i18n( "Click to select a font" ) );
- QToolTip::remove( m_sampleLabel );
- QWhatsThis::remove( m_sampleLabel );
+ TQToolTip::remove( m_sampleLabel );
+ TQWhatsThis::remove( m_sampleLabel );
if ( m_title.isNull() )
{
- QToolTip::add( m_sampleLabel, i18n( "Preview of the selected font" ) );
- QWhatsThis::add( m_sampleLabel,
+ TQToolTip::add( m_sampleLabel, i18n( "Preview of the selected font" ) );
+ TQWhatsThis::add( m_sampleLabel,
i18n( "This is a preview of the selected font. You can change it"
" by clicking the \"Choose...\" button." ) );
}
else
{
- QToolTip::add( m_sampleLabel,
+ TQToolTip::add( m_sampleLabel,
i18n( "Preview of the \"%1\" font" ).arg( m_title ) );
- QWhatsThis::add( m_sampleLabel,
+ TQWhatsThis::add( m_sampleLabel,
i18n( "This is a preview of the \"%1\" font. You can change it"
" by clicking the \"Choose...\" button." ).arg( m_title ) );
}
diff --git a/kdeui/kfontrequester.h b/kdeui/kfontrequester.h
index 8435355c5..3773a9bc1 100644
--- a/kdeui/kfontrequester.h
+++ b/kdeui/kfontrequester.h
@@ -20,9 +20,9 @@
#ifndef KFONTREQUESTER_H
#define KFONTREQUESTER_H
-#include <qwidget.h>
-#include <qfont.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqfont.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -45,9 +45,9 @@ class KDEUI_EXPORT KFontRequester : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QString title READ title WRITE setTitle )
- Q_PROPERTY( QString sampleText READ sampleText WRITE setSampleText )
- Q_PROPERTY( QFont font READ font WRITE setFont )
+ Q_PROPERTY( TQString title READ title WRITE setTitle )
+ Q_PROPERTY( TQString sampleText READ sampleText WRITE setSampleText )
+ Q_PROPERTY( TQFont font READ font WRITE setFont )
public:
@@ -59,13 +59,13 @@ class KDEUI_EXPORT KFontRequester : public QWidget
* @param onlyFixed Only display fonts which have fixed-width character
* sizes.
*/
- KFontRequester( QWidget *parent=0L, const char *name=0L,
+ KFontRequester( TQWidget *parent=0L, const char *name=0L,
bool onlyFixed=false );
/**
* @return The currently selected font in the requester.
*/
- QFont font() const { return m_selFont; }
+ TQFont font() const { return m_selFont; }
/**
* @return Returns true if only fixed fonts are displayed.
@@ -75,22 +75,22 @@ class KDEUI_EXPORT KFontRequester : public QWidget
/**
* @return The current text in the sample text input area.
*/
- QString sampleText() const { return m_sampleText; }
+ TQString sampleText() const { return m_sampleText; }
/**
* @return The current title of the widget.
*/
- QString title() const { return m_title; }
+ TQString title() const { return m_title; }
/**
* @return Pointer to the label used for preview.
*/
- QLabel *label() const { return m_sampleLabel; }
+ TQLabel *label() const { return m_sampleLabel; }
/**
* @return Pointer to the pushbutton in the widget.
*/
- QPushButton *button() const { return m_button; }
+ TQPushButton *button() const { return m_button; }
/**
* Sets the currently selected font in the requester.
@@ -99,7 +99,7 @@ class KDEUI_EXPORT KFontRequester : public QWidget
* @param onlyFixed Display only fixed-width fonts in the font dialog
* if @p true, or vice-versa.
*/
- virtual void setFont( const QFont &font, bool onlyFixed=false );
+ virtual void setFont( const TQFont &font, bool onlyFixed=false );
/**
* Sets the sample text.
@@ -108,11 +108,11 @@ class KDEUI_EXPORT KFontRequester : public QWidget
* text, but it can be better to do this if the default text is
* too large for the edit area when using the default font of your
* application. Default text is current font name and size. Setting
- * the text to QString::null will restore the default.
+ * the text to TQString::null will restore the default.
*
* @param text The new sample text. The current will be removed.
*/
- virtual void setSampleText( const QString &text );
+ virtual void setSampleText( const TQString &text );
/**
* Set the title for the widget that will be used in the tooltip and
@@ -120,13 +120,13 @@ class KDEUI_EXPORT KFontRequester : public QWidget
*
* @param title The title to be set.
*/
- virtual void setTitle( const QString & title );
+ virtual void setTitle( const TQString & title );
signals:
/**
* Emitted when a new @p font has been selected in the underlying dialog
*/
- void fontSelected( const QFont &font );
+ void fontSelected( const TQFont &font );
protected:
@@ -140,10 +140,10 @@ class KDEUI_EXPORT KFontRequester : public QWidget
protected:
bool m_onlyFixed;
- QString m_sampleText, m_title;
- QLabel *m_sampleLabel;
- QPushButton *m_button;
- QFont m_selFont;
+ TQString m_sampleText, m_title;
+ TQLabel *m_sampleLabel;
+ TQPushButton *m_button;
+ TQFont m_selFont;
private:
diff --git a/kdeui/kguiitem.cpp b/kdeui/kguiitem.cpp
index 35093019e..7b73c7401 100644
--- a/kdeui/kguiitem.cpp
+++ b/kdeui/kguiitem.cpp
@@ -18,10 +18,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qregexp.h>
-#include <qstring.h>
-#include <qiconset.h>
-#include <qpixmap.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqiconset.h>
+#include <tqpixmap.h>
#include <assert.h>
#include <kiconloader.h>
@@ -57,12 +57,12 @@ public:
return *this;
}
- QString m_text;
- QString m_toolTip;
- QString m_whatsThis;
- QString m_statusText;
- QString m_iconName;
- QIconSet m_iconSet;
+ TQString m_text;
+ TQString m_toolTip;
+ TQString m_whatsThis;
+ TQString m_statusText;
+ TQString m_iconName;
+ TQIconSet m_iconSet;
bool m_hasIcon : 1;
bool m_enabled : 1;
};
@@ -72,8 +72,8 @@ KGuiItem::KGuiItem() {
d = new KGuiItemPrivate;
}
-KGuiItem::KGuiItem( const QString &text, const QString &iconName,
- const QString &toolTip, const QString &whatsThis )
+KGuiItem::KGuiItem( const TQString &text, const TQString &iconName,
+ const TQString &toolTip, const TQString &whatsThis )
{
d = new KGuiItemPrivate;
d->m_text = text;
@@ -82,8 +82,8 @@ KGuiItem::KGuiItem( const QString &text, const QString &iconName,
setIconName( iconName );
}
-KGuiItem::KGuiItem( const QString &text, const QIconSet &iconSet,
- const QString &toolTip, const QString &whatsThis )
+KGuiItem::KGuiItem( const TQString &text, const TQIconSet &iconSet,
+ const TQString &toolTip, const TQString &whatsThis )
{
d = new KGuiItemPrivate;
d->m_text = text;
@@ -116,13 +116,13 @@ KGuiItem::~KGuiItem()
delete d;
}
-QString KGuiItem::text() const
+TQString KGuiItem::text() const
{
return d->m_text;
}
-QString KGuiItem::plainText() const
+TQString KGuiItem::plainText() const
{
const int len = d->m_text.length();
@@ -130,12 +130,12 @@ QString KGuiItem::plainText() const
return d->m_text;
//Can assume len >= 1 from now on.
- QString stripped;
+ TQString stripped;
int resultLength = 0;
stripped.setLength(len);
- const QChar* data = d->m_text.unicode();
+ const TQChar* data = d->m_text.unicode();
for ( int pos = 0; pos < len; ++pos )
{
if ( data[ pos ] != '&' )
@@ -149,7 +149,7 @@ QString KGuiItem::plainText() const
return stripped;
}
-QIconSet KGuiItem::iconSet( KIcon::Group group, int size, KInstance* instance ) const
+TQIconSet KGuiItem::iconSet( KIcon::Group group, int size, KInstance* instance ) const
{
if( d->m_hasIcon )
{
@@ -164,20 +164,20 @@ QIconSet KGuiItem::iconSet( KIcon::Group group, int size, KInstance* instance )
}
}
else
- return QIconSet();
+ return TQIconSet();
}
-QString KGuiItem::iconName() const
+TQString KGuiItem::iconName() const
{
return d->m_iconName;
}
-QString KGuiItem::toolTip() const
+TQString KGuiItem::toolTip() const
{
return d->m_toolTip;
}
-QString KGuiItem::whatsThis() const
+TQString KGuiItem::whatsThis() const
{
return d->m_whatsThis;
}
@@ -192,30 +192,30 @@ bool KGuiItem::hasIcon() const
return d->m_hasIcon;
}
-void KGuiItem::setText( const QString &text ) {
+void KGuiItem::setText( const TQString &text ) {
d->m_text=text;
}
-void KGuiItem::setIconSet( const QIconSet &iconset )
+void KGuiItem::setIconSet( const TQIconSet &iconset )
{
d->m_iconSet = iconset;
- d->m_iconName = QString::null;
+ d->m_iconName = TQString::null;
d->m_hasIcon = !iconset.isNull();
}
-void KGuiItem::setIconName( const QString &iconName )
+void KGuiItem::setIconName( const TQString &iconName )
{
d->m_iconName = iconName;
- d->m_iconSet = QIconSet();
+ d->m_iconSet = TQIconSet();
d->m_hasIcon = !iconName.isEmpty();
}
-void KGuiItem::setToolTip( const QString &toolTip )
+void KGuiItem::setToolTip( const TQString &toolTip )
{
d->m_toolTip = toolTip;
}
-void KGuiItem::setWhatsThis( const QString &whatsThis )
+void KGuiItem::setWhatsThis( const TQString &whatsThis )
{
d->m_whatsThis = whatsThis;
}
diff --git a/kdeui/kguiitem.h b/kdeui/kguiitem.h
index b1c9c1674..d5946b0d3 100644
--- a/kdeui/kguiitem.h
+++ b/kdeui/kguiitem.h
@@ -22,10 +22,10 @@
#ifndef __kguiitem_h__
#define __kguiitem_h__
-#include <qstring.h>
-#include <qiconset.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqiconset.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
#include <kicontheme.h>
#include <kglobal.h>
@@ -44,32 +44,32 @@ public:
// subtle bugs otherwise - the icon name, tooltip and whatsthis text
// get changed behind your back if you do 'setButtonFoo( "Bar" );'
// It gives the wrong impression that you just change the text.
- KGuiItem( const QString &text,
- const QString &iconName = QString::null,
- const QString &toolTip = QString::null,
- const QString &whatsThis = QString::null );
+ KGuiItem( const TQString &text,
+ const TQString &iconName = TQString::null,
+ const TQString &toolTip = TQString::null,
+ const TQString &whatsThis = TQString::null );
- KGuiItem( const QString &text, const QIconSet &iconSet,
- const QString &toolTip = QString::null,
- const QString &whatsThis = QString::null );
+ KGuiItem( const TQString &text, const TQIconSet &iconSet,
+ const TQString &toolTip = TQString::null,
+ const TQString &whatsThis = TQString::null );
KGuiItem( const KGuiItem &rhs );
KGuiItem &operator=( const KGuiItem &rhs );
~KGuiItem();
- QString text() const;
- QString plainText() const;
+ TQString text() const;
+ TQString plainText() const;
#ifndef KDE_NO_COMPAT
- QIconSet iconSet( KIcon::Group, int size = 0, KInstance* instance = KGlobal::instance()) const;
- QIconSet iconSet() const { return iconSet( KIcon::Small ); }
+ TQIconSet iconSet( KIcon::Group, int size = 0, KInstance* instance = KGlobal::instance()) const;
+ TQIconSet iconSet() const { return iconSet( KIcon::Small ); }
#else
- QIconSet iconSet( KIcon::Group=KIcon::Small, int size = 0, KInstance* instance = KGlobal::instance()) const;
+ TQIconSet iconSet( KIcon::Group=KIcon::Small, int size = 0, KInstance* instance = KGlobal::instance()) const;
#endif
- QString iconName() const;
- QString toolTip() const;
- QString whatsThis() const;
+ TQString iconName() const;
+ TQString toolTip() const;
+ TQString whatsThis() const;
bool isEnabled() const;
/**
* returns whether an icon is defined, doesn't tell if it really exists
@@ -79,11 +79,11 @@ public:
bool hasIconSet() const { return hasIcon(); }
#endif
- void setText( const QString &text );
- void setIconSet( const QIconSet &iconset );
- void setIconName( const QString &iconName );
- void setToolTip( const QString &tooltip );
- void setWhatsThis( const QString &whatsThis );
+ void setText( const TQString &text );
+ void setIconSet( const TQIconSet &iconset );
+ void setIconName( const TQString &iconName );
+ void setToolTip( const TQString &tooltip );
+ void setWhatsThis( const TQString &whatsThis );
void setEnabled( bool enable );
private:
diff --git a/kdeui/khelpmenu.cpp b/kdeui/khelpmenu.cpp
index 15ee9f58e..c6557f044 100644
--- a/kdeui/khelpmenu.cpp
+++ b/kdeui/khelpmenu.cpp
@@ -20,12 +20,12 @@
*/
// I (espen) prefer that header files are included alphabetically
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
-#include <qwidget.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
+#include <tqwidget.h>
#include <kaboutapplication.h>
#include <kaboutdata.h>
@@ -62,9 +62,9 @@ public:
KSwitchLanguageDialog *mSwitchApplicationLanguage;
};
-KHelpMenu::KHelpMenu( QWidget *parent, const QString &aboutAppText,
+KHelpMenu::KHelpMenu( TQWidget *parent, const TQString &aboutAppText,
bool showWhatsThis )
- : QObject(parent), mMenu(0), mAboutApp(0), mAboutKDE(0), mBugReport(0),
+ : TQObject(parent), mMenu(0), mAboutApp(0), mAboutKDE(0), mBugReport(0),
d(new KHelpMenuPrivate)
{
mParent = parent;
@@ -73,9 +73,9 @@ KHelpMenu::KHelpMenu( QWidget *parent, const QString &aboutAppText,
d->mAboutData = 0;
}
-KHelpMenu::KHelpMenu( QWidget *parent, const KAboutData *aboutData,
+KHelpMenu::KHelpMenu( TQWidget *parent, const KAboutData *aboutData,
bool showWhatsThis, KActionCollection *actions )
- : QObject(parent), mMenu(0), mAboutApp(0), mAboutKDE(0), mBugReport(0),
+ : TQObject(parent), mMenu(0), mAboutApp(0), mAboutKDE(0), mBugReport(0),
d(new KHelpMenuPrivate)
{
mParent = parent;
@@ -84,17 +84,17 @@ KHelpMenu::KHelpMenu( QWidget *parent, const KAboutData *aboutData,
d->mAboutData = aboutData;
if (!aboutData)
- mAboutAppText = QString::null;
+ mAboutAppText = TQString::null;
if (actions)
{
- KStdAction::helpContents(this, SLOT(appHelpActivated()), actions);
+ KStdAction::helpContents(this, TQT_SLOT(appHelpActivated()), actions);
if (showWhatsThis)
- KStdAction::whatsThis(this, SLOT(contextHelpActivated()), actions);
- KStdAction::reportBug(this, SLOT(reportBug()), actions);
- KStdAction::aboutApp(this, SLOT(aboutApplication()), actions);
- KStdAction::aboutKDE(this, SLOT(aboutKDE()), actions);
- KStdAction::switchApplicationLanguage(this, SLOT(switchApplicationLanguage()), actions);
+ KStdAction::whatsThis(this, TQT_SLOT(contextHelpActivated()), actions);
+ KStdAction::reportBug(this, TQT_SLOT(reportBug()), actions);
+ KStdAction::aboutApp(this, TQT_SLOT(aboutApplication()), actions);
+ KStdAction::aboutKDE(this, TQT_SLOT(aboutKDE()), actions);
+ KStdAction::switchApplicationLanguage(this, TQT_SLOT(switchApplicationLanguage()), actions);
}
}
@@ -118,26 +118,26 @@ KPopupMenu* KHelpMenu::menu()
// compatible.
//
const KAboutData *aboutData = d->mAboutData ? d->mAboutData : KGlobal::instance()->aboutData();
- QString appName = (aboutData)? aboutData->programName() : QString::fromLatin1(qApp->name());
+ TQString appName = (aboutData)? aboutData->programName() : TQString::fromLatin1(qApp->name());
mMenu = new KPopupMenu();
- connect( mMenu, SIGNAL(destroyed()), this, SLOT(menuDestroyed()));
+ connect( mMenu, TQT_SIGNAL(destroyed()), this, TQT_SLOT(menuDestroyed()));
bool need_separator = false;
if (kapp->authorizeKAction("help_contents"))
{
mMenu->insertItem( BarIcon( "contents", KIcon::SizeSmall),
i18n( "%1 &Handbook" ).arg( appName) ,menuHelpContents );
- mMenu->connectItem( menuHelpContents, this, SLOT(appHelpActivated()) );
+ mMenu->connectItem( menuHelpContents, this, TQT_SLOT(appHelpActivated()) );
mMenu->setAccel( KStdAccel::shortcut(KStdAccel::Help), menuHelpContents );
need_separator = true;
}
if( mShowWhatsThis && kapp->authorizeKAction("help_whats_this") )
{
- QToolButton* wtb = QWhatsThis::whatsThisButton(0);
+ TQToolButton* wtb = TQWhatsThis::whatsThisButton(0);
mMenu->insertItem( wtb->iconSet(),i18n( "What's &This" ), menuWhatsThis);
- mMenu->connectItem( menuWhatsThis, this, SLOT(contextHelpActivated()) );
+ mMenu->connectItem( menuWhatsThis, this, TQT_SLOT(contextHelpActivated()) );
delete wtb;
mMenu->setAccel( SHIFT + Key_F1, menuWhatsThis );
need_separator = true;
@@ -148,7 +148,7 @@ KPopupMenu* KHelpMenu::menu()
if (need_separator)
mMenu->insertSeparator();
mMenu->insertItem( i18n( "&Report Bug..." ), menuReportBug );
- mMenu->connectItem( menuReportBug, this, SLOT(reportBug()) );
+ mMenu->connectItem( menuReportBug, this, TQT_SLOT(reportBug()) );
need_separator = true;
}
@@ -157,7 +157,7 @@ KPopupMenu* KHelpMenu::menu()
if (need_separator)
mMenu->insertSeparator();
mMenu->insertItem( i18n( "Switch application &language..." ), menuSwitchLanguage );
- mMenu->connectItem( menuSwitchLanguage, this, SLOT(switchApplicationLanguage()) );
+ mMenu->connectItem( menuSwitchLanguage, this, TQT_SLOT(switchApplicationLanguage()) );
need_separator = true;
}
@@ -168,13 +168,13 @@ KPopupMenu* KHelpMenu::menu()
{
mMenu->insertItem( kapp->miniIcon(),
i18n( "&About %1" ).arg(appName), menuAboutApp );
- mMenu->connectItem( menuAboutApp, this, SLOT( aboutApplication() ) );
+ mMenu->connectItem( menuAboutApp, this, TQT_SLOT( aboutApplication() ) );
}
if (kapp->authorizeKAction("help_about_kde"))
{
mMenu->insertItem( SmallIcon("about_kde"), i18n( "About &Trinity" ), menuAboutKDE );
- mMenu->connectItem( menuAboutKDE, this, SLOT( aboutKDE() ) );
+ mMenu->connectItem( menuAboutKDE, this, TQT_SLOT( aboutKDE() ) );
}
}
@@ -196,7 +196,7 @@ void KHelpMenu::aboutApplication()
if( !mAboutApp )
{
mAboutApp = new KAboutApplication( d->mAboutData, mParent, "about", false );
- connect( mAboutApp, SIGNAL(finished()), this, SLOT( dialogFinished()) );
+ connect( mAboutApp, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) );
}
mAboutApp->show();
}
@@ -208,20 +208,20 @@ void KHelpMenu::aboutApplication()
{
if( !mAboutApp )
{
- mAboutApp = new KDialogBase( QString::null, // Caption is defined below
+ mAboutApp = new KDialogBase( TQString::null, // Caption is defined below
KDialogBase::Yes, KDialogBase::Yes,
KDialogBase::Yes, mParent, "about",
false, true, KStdGuiItem::ok() );
- connect( mAboutApp, SIGNAL(finished()), this, SLOT( dialogFinished()) );
+ connect( mAboutApp, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) );
- QHBox *hbox = new QHBox( mAboutApp );
+ TQHBox *hbox = new TQHBox( mAboutApp );
mAboutApp->setMainWidget( hbox );
hbox->setSpacing(KDialog::spacingHint()*3);
hbox->setMargin(KDialog::marginHint()*1);
- QLabel *label1 = new QLabel(hbox);
+ TQLabel *label1 = new TQLabel(hbox);
label1->setPixmap( kapp->icon() );
- QLabel *label2 = new QLabel(hbox);
+ TQLabel *label2 = new TQLabel(hbox);
label2->setText( mAboutAppText );
mAboutApp->setPlainCaption( i18n("About %1").arg(kapp->caption()) );
@@ -238,7 +238,7 @@ void KHelpMenu::aboutKDE()
if( !mAboutKDE )
{
mAboutKDE = new KAboutKDE( mParent, "aboutkde", false );
- connect( mAboutKDE, SIGNAL(finished()), this, SLOT( dialogFinished()) );
+ connect( mAboutKDE, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) );
}
mAboutKDE->show();
}
@@ -249,7 +249,7 @@ void KHelpMenu::reportBug()
if( !mBugReport )
{
mBugReport = new KBugReport( mParent, false, d->mAboutData );
- connect( mBugReport, SIGNAL(finished()),this,SLOT( dialogFinished()) );
+ connect( mBugReport, TQT_SIGNAL(finished()),this,TQT_SLOT( dialogFinished()) );
}
mBugReport->show();
}
@@ -259,7 +259,7 @@ void KHelpMenu::switchApplicationLanguage()
if ( !d->mSwitchApplicationLanguage )
{
d->mSwitchApplicationLanguage = new KSwitchLanguageDialog( mParent, "switchlanguagedialog", false );
- connect( d->mSwitchApplicationLanguage, SIGNAL(finished()), this, SLOT( dialogFinished()) );
+ connect( d->mSwitchApplicationLanguage, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) );
}
d->mSwitchApplicationLanguage->show();
}
@@ -267,7 +267,7 @@ void KHelpMenu::switchApplicationLanguage()
void KHelpMenu::dialogFinished()
{
- QTimer::singleShot( 0, this, SLOT(timerExpired()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(timerExpired()) );
}
@@ -303,8 +303,8 @@ void KHelpMenu::menuDestroyed()
void KHelpMenu::contextHelpActivated()
{
- QWhatsThis::enterWhatsThisMode();
- QWidget* w = QApplication::widgetAt( QCursor::pos(), true );
+ TQWhatsThis::enterWhatsThisMode();
+ TQWidget* w = TQApplication::widgetAt( TQCursor::pos(), true );
while ( w && !w->isTopLevel() && !w->inherits("QXEmbed") )
w = w->parentWidget();
#ifdef Q_WS_X11
diff --git a/kdeui/khelpmenu.h b/kdeui/khelpmenu.h
index 052f7e394..397ac129c 100644
--- a/kdeui/khelpmenu.h
+++ b/kdeui/khelpmenu.h
@@ -22,8 +22,8 @@
#ifndef _KHELPMENU_H_
#define _KHELPMENU_H_
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -60,7 +60,7 @@ class KHelpMenuPrivate;
*
* \code
* mHelpMenu = new KHelpMenu( this, <someText> );
- * connect( this, SIGNAL(someSignal()), mHelpMenu,SLOT(mHelpMenu->aboutKDE()));
+ * connect( this, TQT_SIGNAL(someSignal()), mHelpMenu,TQT_SLOT(mHelpMenu->aboutKDE()));
* \endcode
*
* IMPORTANT:
@@ -97,8 +97,8 @@ class KHelpMenuPrivate;
* {
* ..
* KHelpMenu *helpMenu = new KHelpMenu( this );
- * connect( helpMenu, SIGNAL(showAboutApplication()),
- * this, SLOT(myDialogSlot()));
+ * connect( helpMenu, TQT_SIGNAL(showAboutApplication()),
+ * this, TQT_SLOT(myDialogSlot()));
* ..
* }
*
@@ -116,7 +116,7 @@ class KHelpMenuPrivate;
* {
* KHelpMenu *helpMenu = new KHelpMenu( this );
* KPopupMenu *help = mHelpMenu->menu();
- * help->connectItem( KHelpMenu::menuAboutApp, this, SLOT(myDialogSlot()) );
+ * help->connectItem( KHelpMenu::menuAboutApp, this, TQT_SLOT(myDialogSlot()) );
* }
*
* void MyClass::myDialogSlot()
@@ -156,7 +156,7 @@ class KDEUI_EXPORT KHelpMenu : public QObject
* added to the dialog.
*
*/
- KHelpMenu( QWidget *parent=0, const QString &aboutAppText=QString::null,
+ KHelpMenu( TQWidget *parent=0, const TQString &aboutAppText=TQString::null,
bool showWhatsThis=true );
/**
@@ -175,7 +175,7 @@ class KDEUI_EXPORT KHelpMenu : public QObject
* standard actions.
*
*/
- KHelpMenu( QWidget *parent, const KAboutData *aboutData,
+ KHelpMenu( TQWidget *parent, const KAboutData *aboutData,
bool showWhatsThis=true, KActionCollection *actions = 0 );
/**
@@ -266,8 +266,8 @@ class KDEUI_EXPORT KHelpMenu : public QObject
KAboutKDE *mAboutKDE;
KBugReport *mBugReport;
- QString mAboutAppText;
- QWidget *mParent;
+ TQString mAboutAppText;
+ TQWidget *mParent;
bool mShowWhatsThis;
diff --git a/kdeui/kiconview.cpp b/kdeui/kiconview.cpp
index 77756030b..98d608fba 100644
--- a/kdeui/kiconview.cpp
+++ b/kdeui/kiconview.cpp
@@ -18,10 +18,10 @@
#include "config.h"
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qpixmapcache.h>
-#include <qcleanuphandler.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqpixmapcache.h>
+#include <tqcleanuphandler.h>
#include "kiconview.h"
#include "kwordwrap.h"
@@ -48,36 +48,36 @@ public:
}
KIconView::Mode mode;
bool doAutoSelect;
- QFontMetrics *fm;
- QPixmapCache maskCache;
+ TQFontMetrics *fm;
+ TQPixmapCache maskCache;
int textHeight;
- QIconViewItem *dragHoldItem;
- QTimer dragHoldTimer;
- QTimer doubleClickIgnoreTimer;
+ TQIconViewItem *dragHoldItem;
+ TQTimer dragHoldTimer;
+ TQTimer doubleClickIgnoreTimer;
};
-KIconView::KIconView( QWidget *parent, const char *name, WFlags f )
- : QIconView( parent, name, f )
+KIconView::KIconView( TQWidget *parent, const char *name, WFlags f )
+ : TQIconView( parent, name, f )
{
d = new KIconViewPrivate;
- connect( this, SIGNAL( onViewport() ),
- this, SLOT( slotOnViewport() ) );
- connect( this, SIGNAL( onItem( QIconViewItem * ) ),
- this, SLOT( slotOnItem( QIconViewItem * ) ) );
+ connect( this, TQT_SIGNAL( onViewport() ),
+ this, TQT_SLOT( slotOnViewport() ) );
+ connect( this, TQT_SIGNAL( onItem( TQIconViewItem * ) ),
+ this, TQT_SLOT( slotOnItem( TQIconViewItem * ) ) );
slotSettingsChanged( KApplication::SETTINGS_MOUSE );
if ( kapp ) { // maybe null when used inside designer
- connect( kapp, SIGNAL( settingsChanged(int) ), SLOT( slotSettingsChanged(int) ) );
+ connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) );
kapp->addKipcEventMask( KIPC::SettingsChanged );
}
m_pCurrentItem = 0L;
- m_pAutoSelect = new QTimer( this );
- connect( m_pAutoSelect, SIGNAL( timeout() ),
- this, SLOT( slotAutoSelect() ) );
+ m_pAutoSelect = new TQTimer( this );
+ connect( m_pAutoSelect, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAutoSelect() ) );
- connect( &d->dragHoldTimer, SIGNAL(timeout()), this, SLOT(slotDragHoldTimeout()) );
+ connect( &d->dragHoldTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDragHoldTimeout()) );
}
KIconView::~KIconView()
@@ -97,7 +97,7 @@ KIconView::Mode KIconView::mode() const
return d->mode;
}
-void KIconView::slotOnItem( QIconViewItem *item )
+void KIconView::slotOnItem( TQIconViewItem *item )
{
if ( item ) {
if ( m_bUseSingle ) {
@@ -128,26 +128,26 @@ void KIconView::slotSettingsChanged(int category)
m_bUseSingle = KGlobalSettings::singleClick();
//kdDebug() << "KIconView::slotSettingsChanged for mouse, usesingle=" << m_bUseSingle << endl;
- disconnect( this, SIGNAL( mouseButtonClicked( int, QIconViewItem *,
- const QPoint & ) ),
- this, SLOT( slotMouseButtonClicked( int, QIconViewItem *,
- const QPoint & ) ) );
-// disconnect( this, SIGNAL( doubleClicked( QIconViewItem *,
-// const QPoint & ) ),
-// this, SLOT( slotExecute( QIconViewItem *,
-// const QPoint & ) ) );
+ disconnect( this, TQT_SIGNAL( mouseButtonClicked( int, TQIconViewItem *,
+ const TQPoint & ) ),
+ this, TQT_SLOT( slotMouseButtonClicked( int, TQIconViewItem *,
+ const TQPoint & ) ) );
+// disconnect( this, TQT_SIGNAL( doubleClicked( TQIconViewItem *,
+// const TQPoint & ) ),
+// this, TQT_SLOT( slotExecute( TQIconViewItem *,
+// const TQPoint & ) ) );
if( m_bUseSingle ) {
- connect( this, SIGNAL( mouseButtonClicked( int, QIconViewItem *,
- const QPoint & ) ),
- this, SLOT( slotMouseButtonClicked( int, QIconViewItem *,
- const QPoint & ) ) );
+ connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQIconViewItem *,
+ const TQPoint & ) ),
+ this, TQT_SLOT( slotMouseButtonClicked( int, TQIconViewItem *,
+ const TQPoint & ) ) );
}
else {
-// connect( this, SIGNAL( doubleClicked( QIconViewItem *,
-// const QPoint & ) ),
-// this, SLOT( slotExecute( QIconViewItem *,
-// const QPoint & ) ) );
+// connect( this, TQT_SIGNAL( doubleClicked( TQIconViewItem *,
+// const TQPoint & ) ),
+// this, TQT_SLOT( slotExecute( TQIconViewItem *,
+// const TQPoint & ) ) );
}
m_bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon();
@@ -168,13 +168,13 @@ void KIconView::slotAutoSelect()
setFocus();
ButtonState keybstate = KApplication::keyboardMouseState();
- QIconViewItem* previousItem = currentItem();
+ TQIconViewItem* previousItem = currentItem();
setCurrentItem( m_pCurrentItem );
if( m_pCurrentItem ) {
//Shift pressed?
if( (keybstate & ShiftButton) ) {
- //Temporary implementation of the selection until QIconView supports it
+ //Temporary implementation of the selection until TQIconView supports it
bool block = signalsBlocked();
blockSignals( true );
@@ -188,14 +188,14 @@ void KIconView::slotAutoSelect()
//Calculate the smallest rectangle that contains the current Item
//and the one that got the autoselect event
- QRect r;
- QRect redraw;
+ TQRect r;
+ TQRect redraw;
if ( previousItem )
- r = QRect( QMIN( previousItem->x(), m_pCurrentItem->x() ),
+ r = TQRect( QMIN( previousItem->x(), m_pCurrentItem->x() ),
QMIN( previousItem->y(), m_pCurrentItem->y() ),
0, 0 );
else
- r = QRect( 0, 0, 0, 0 );
+ r = TQRect( 0, 0, 0, 0 );
if ( previousItem->x() < m_pCurrentItem->x() )
r.setWidth( m_pCurrentItem->x() - previousItem->x() + m_pCurrentItem->width() );
else
@@ -208,7 +208,7 @@ void KIconView::slotAutoSelect()
//Check for each item whether it is within the rectangle.
//If yes, select it
- for( QIconViewItem* i = firstItem(); i; i = i->nextItem() ) {
+ for( TQIconViewItem* i = firstItem(); i; i = i->nextItem() ) {
if( i->intersects( r ) ) {
redraw = redraw.unite( i->rect() );
setSelected( i, select, true );
@@ -221,7 +221,7 @@ void KIconView::slotAutoSelect()
emit selectionChanged();
- if( selectionMode() == QIconView::Single )
+ if( selectionMode() == TQIconView::Single )
emit selectionChanged( m_pCurrentItem );
//setSelected( m_pCurrentItem, true, (keybstate & ControlButton), (keybstate & ShiftButton) );
@@ -235,7 +235,7 @@ void KIconView::slotAutoSelect()
kdDebug() << "KIconView: That's not supposed to happen!!!!" << endl;
}
-void KIconView::emitExecute( QIconViewItem *item, const QPoint &pos )
+void KIconView::emitExecute( TQIconViewItem *item, const TQPoint &pos )
{
if ( d->mode != Execute )
{
@@ -256,9 +256,9 @@ void KIconView::emitExecute( QIconViewItem *item, const QPoint &pos )
}
}
-void KIconView::updateDragHoldItem( QDropEvent *e )
+void KIconView::updateDragHoldItem( TQDropEvent *e )
{
- QIconViewItem *item = findItem( e->pos() );
+ TQIconViewItem *item = findItem( e->pos() );
if ( d->dragHoldItem != item)
{
@@ -274,21 +274,21 @@ void KIconView::updateDragHoldItem( QDropEvent *e )
}
}
-void KIconView::focusOutEvent( QFocusEvent *fe )
+void KIconView::focusOutEvent( TQFocusEvent *fe )
{
m_pAutoSelect->stop();
- QIconView::focusOutEvent( fe );
+ TQIconView::focusOutEvent( fe );
}
-void KIconView::leaveEvent( QEvent *e )
+void KIconView::leaveEvent( TQEvent *e )
{
m_pAutoSelect->stop();
- QIconView::leaveEvent( e );
+ TQIconView::leaveEvent( e );
}
-void KIconView::contentsMousePressEvent( QMouseEvent *e )
+void KIconView::contentsMousePressEvent( TQMouseEvent *e )
{
if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) {
bool block = signalsBlocked();
@@ -299,15 +299,15 @@ void KIconView::contentsMousePressEvent( QMouseEvent *e )
blockSignals( block );
}
- QIconView::contentsMousePressEvent( e );
+ TQIconView::contentsMousePressEvent( e );
d->doAutoSelect = false;
}
-void KIconView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void KIconView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
- QIconView::contentsMouseDoubleClickEvent( e );
+ TQIconView::contentsMouseDoubleClickEvent( e );
- QIconViewItem* item = findItem( e->pos() );
+ TQIconViewItem* item = findItem( e->pos() );
if( item ) {
if( (e->button() == LeftButton) && !m_bUseSingle )
@@ -318,7 +318,7 @@ void KIconView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
d->doubleClickIgnoreTimer.start(0, true);
}
-void KIconView::slotMouseButtonClicked( int btn, QIconViewItem *item, const QPoint &pos )
+void KIconView::slotMouseButtonClicked( int btn, TQIconViewItem *item, const TQPoint &pos )
{
//kdDebug() << " KIconView::slotMouseButtonClicked() item=" << item << endl;
if( d->doubleClickIgnoreTimer.isActive() )
@@ -328,47 +328,47 @@ void KIconView::slotMouseButtonClicked( int btn, QIconViewItem *item, const QPoi
emitExecute( item, pos );
}
-void KIconView::contentsMouseReleaseEvent( QMouseEvent *e )
+void KIconView::contentsMouseReleaseEvent( TQMouseEvent *e )
{
d->doAutoSelect = true;
- QIconView::contentsMouseReleaseEvent( e );
+ TQIconView::contentsMouseReleaseEvent( e );
}
-void KIconView::contentsDragEnterEvent( QDragEnterEvent *e )
+void KIconView::contentsDragEnterEvent( TQDragEnterEvent *e )
{
updateDragHoldItem( e );
- QIconView::contentsDragEnterEvent( e );
+ TQIconView::contentsDragEnterEvent( e );
}
-void KIconView::contentsDragLeaveEvent( QDragLeaveEvent *e )
+void KIconView::contentsDragLeaveEvent( TQDragLeaveEvent *e )
{
d->dragHoldTimer.stop();
d->dragHoldItem = 0L;
- QIconView::contentsDragLeaveEvent( e );
+ TQIconView::contentsDragLeaveEvent( e );
}
-void KIconView::contentsDragMoveEvent( QDragMoveEvent *e )
+void KIconView::contentsDragMoveEvent( TQDragMoveEvent *e )
{
updateDragHoldItem( e );
- QIconView::contentsDragMoveEvent( e );
+ TQIconView::contentsDragMoveEvent( e );
}
-void KIconView::contentsDropEvent( QDropEvent* e )
+void KIconView::contentsDropEvent( TQDropEvent* e )
{
d->dragHoldTimer.stop();
- QIconView::contentsDropEvent( e );
+ TQIconView::contentsDropEvent( e );
}
void KIconView::slotDragHoldTimeout()
{
- QIconViewItem *tmp = d->dragHoldItem;
+ TQIconViewItem *tmp = d->dragHoldItem;
d->dragHoldItem = 0L;
emit held( tmp );
}
-void KIconView::takeItem( QIconViewItem * item )
+void KIconView::takeItem( TQIconViewItem * item )
{
if ( item == d->dragHoldItem )
{
@@ -376,7 +376,7 @@ void KIconView::takeItem( QIconViewItem * item )
d->dragHoldItem = 0L;
}
- QIconView::takeItem( item );
+ TQIconView::takeItem( item );
}
void KIconView::cancelPendingHeldSignal()
@@ -385,42 +385,42 @@ void KIconView::cancelPendingHeldSignal()
d->dragHoldItem = 0L;
}
-void KIconView::wheelEvent( QWheelEvent *e )
+void KIconView::wheelEvent( TQWheelEvent *e )
{
- if (horizontalScrollBar() && (arrangement() == QIconView::TopToBottom)) {
- QWheelEvent ce(e->pos(), e->delta(), e->state(), Qt::Horizontal);
- QApplication::sendEvent( horizontalScrollBar(), &ce);
+ if (horizontalScrollBar() && (arrangement() == TQIconView::TopToBottom)) {
+ TQWheelEvent ce(e->pos(), e->delta(), e->state(), Qt::Horizontal);
+ TQApplication::sendEvent( horizontalScrollBar(), &ce);
if (ce.isAccepted()) {
e->accept();
return;
}
}
- QIconView::wheelEvent(e);
+ TQIconView::wheelEvent(e);
}
-void KIconView::setFont( const QFont &font )
+void KIconView::setFont( const TQFont &font )
{
delete d->fm;
d->fm = 0L;
- QIconView::setFont( font );
+ TQIconView::setFont( font );
}
-QFontMetrics *KIconView::itemFontMetrics() const
+TQFontMetrics *KIconView::itemFontMetrics() const
{
if (!d->fm) {
- // QIconView creates one too, but we can't access it
- d->fm = new QFontMetrics( font() );
+ // TQIconView creates one too, but we can't access it
+ d->fm = new TQFontMetrics( font() );
}
return d->fm;
}
-QPixmap KIconView::selectedIconPixmap( QPixmap *pix, const QColor &col ) const
+TQPixmap KIconView::selectedIconPixmap( TQPixmap *pix, const TQColor &col ) const
{
- QPixmap m;
- if ( d->maskCache.find( QString::number( pix->serialNumber() ), m ) )
+ TQPixmap m;
+ if ( d->maskCache.find( TQString::number( pix->serialNumber() ), m ) )
return m;
m = KPixmapEffect::selectedPixmap( KPixmap(*pix), col );
- d->maskCache.insert( QString::number( pix->serialNumber() ), m );
+ d->maskCache.insert( TQString::number( pix->serialNumber() ), m );
return m;
}
@@ -449,7 +449,7 @@ void KIconView::setIconTextHeight( int n )
struct KIconViewItem::KIconViewItemPrivate
{
- QSize m_pixmapSize;
+ TQSize m_pixmapSize;
};
void KIconViewItem::init()
@@ -465,7 +465,7 @@ KIconViewItem::~KIconViewItem()
delete d;
}
-void KIconViewItem::calcRect( const QString& text_ )
+void KIconViewItem::calcRect( const TQString& text_ )
{
Q_ASSERT( iconView() );
if ( !iconView() )
@@ -481,16 +481,16 @@ void KIconViewItem::calcRect( const QString& text_ )
#endif
//kdDebug() << "KIconViewItem::calcRect - " << text() << endl;
KIconView *view = static_cast<KIconView *>(iconView());
- QRect itemIconRect = pixmapRect();
- QRect itemTextRect = textRect();
- QRect itemRect = rect();
+ TQRect itemIconRect = pixmapRect();
+ TQRect itemTextRect = textRect();
+ TQRect itemRect = rect();
int pw = 0;
int ph = 0;
#ifndef QT_NO_PICTURE
if ( picture() ) {
- QRect br = picture()->boundingRect();
+ TQRect br = picture()->boundingRect();
pw = br.width() + 2;
ph = br.height() + 2;
} else
@@ -516,15 +516,15 @@ void KIconViewItem::calcRect( const QString& text_ )
int tw = 0;
if ( d && !d->m_pixmapSize.isNull() )
- tw = view->maxItemWidth() - ( view->itemTextPos() == QIconView::Bottom ? 0 :
+ tw = view->maxItemWidth() - ( view->itemTextPos() == TQIconView::Bottom ? 0 :
d->m_pixmapSize.width() + 2 );
else
- tw = view->maxItemWidth() - ( view->itemTextPos() == QIconView::Bottom ? 0 :
+ tw = view->maxItemWidth() - ( view->itemTextPos() == TQIconView::Bottom ? 0 :
itemIconRect.width() );
- QFontMetrics *fm = view->itemFontMetrics();
- QString t;
- QRect r;
+ TQFontMetrics *fm = view->itemFontMetrics();
+ TQString t;
+ TQRect r;
// When is text_ set ? Doesn't look like it's ever set.
t = text_.isEmpty() ? text() : text_;
@@ -534,7 +534,7 @@ void KIconViewItem::calcRect( const QString& text_ )
int height = nbLines > 0 ? fm->height() * nbLines : 0xFFFFFFFF;
// Should not be higher than pixmap if text is alongside icons
- if ( view->itemTextPos() != QIconView::Bottom ) {
+ if ( view->itemTextPos() != TQIconView::Bottom ) {
if ( d && !d->m_pixmapSize.isNull() )
height = QMIN( d->m_pixmapSize.height() + 2, height );
else
@@ -543,7 +543,7 @@ void KIconViewItem::calcRect( const QString& text_ )
}
// Calculate the word-wrap
- QRect outerRect( 0, 0, tw - 6, height );
+ TQRect outerRect( 0, 0, tw - 6, height );
m_wordWrap = KWordWrap::formatText( *fm, outerRect, 0, t );
r = m_wordWrap->boundingRect();
@@ -552,7 +552,7 @@ void KIconViewItem::calcRect( const QString& text_ )
itemTextRect.setHeight( r.height() );
int w = 0; int h = 0; int y = 0;
- if ( view->itemTextPos() == QIconView::Bottom ) {
+ if ( view->itemTextPos() == TQIconView::Bottom ) {
// If the pixmap size has been specified, use it
if ( d && !d->m_pixmapSize.isNull() )
{
@@ -571,11 +571,11 @@ void KIconViewItem::calcRect( const QString& text_ )
itemRect.setWidth( w );
itemRect.setHeight( h );
- int width = QMAX( w, QApplication::globalStrut().width() ); // see QIconViewItem::width()
- int height = QMAX( h, QApplication::globalStrut().height() ); // see QIconViewItem::height()
- itemTextRect = QRect( ( width - itemTextRect.width() ) / 2, height - itemTextRect.height(),
+ int width = QMAX( w, TQApplication::globalStrut().width() ); // see TQIconViewItem::width()
+ int height = QMAX( h, TQApplication::globalStrut().height() ); // see TQIconViewItem::height()
+ itemTextRect = TQRect( ( width - itemTextRect.width() ) / 2, height - itemTextRect.height(),
itemTextRect.width(), itemTextRect.height() );
- itemIconRect = QRect( ( width - itemIconRect.width() ) / 2, y,
+ itemIconRect = TQRect( ( width - itemIconRect.width() ) / 2, y,
itemIconRect.width(), itemIconRect.height() );
} else {
// If the pixmap size has been specified, use it
@@ -594,16 +594,16 @@ void KIconViewItem::calcRect( const QString& text_ )
itemRect.setWidth( w );
itemRect.setHeight( h );
- int width = QMAX( w, QApplication::globalStrut().width() ); // see QIconViewItem::width()
- int height = QMAX( h, QApplication::globalStrut().height() ); // see QIconViewItem::height()
+ int width = QMAX( w, TQApplication::globalStrut().width() ); // see TQIconViewItem::width()
+ int height = QMAX( h, TQApplication::globalStrut().height() ); // see TQIconViewItem::height()
- itemTextRect = QRect( width - itemTextRect.width(), ( height - itemTextRect.height() ) / 2,
+ itemTextRect = TQRect( width - itemTextRect.width(), ( height - itemTextRect.height() ) / 2,
itemTextRect.width(), itemTextRect.height() );
if ( itemIconRect.height() > itemTextRect.height() ) // icon bigger than text -> center vertically
- itemIconRect = QRect( 0, ( height - itemIconRect.height() ) / 2,
+ itemIconRect = TQRect( 0, ( height - itemIconRect.height() ) / 2,
itemIconRect.width(), itemIconRect.height() );
else // icon smaller than text -> place in top or center with first line
- itemIconRect = QRect( 0, QMAX(( fm->height() - itemIconRect.height() ) / 2 + y, 0),
+ itemIconRect = TQRect( 0, QMAX(( fm->height() - itemIconRect.height() ) / 2 + y, 0),
itemIconRect.width(), itemIconRect.height() );
if ( ( itemIconRect.height() <= 20 ) && ( itemTextRect.height() < itemIconRect.height() ) )
{
@@ -624,9 +624,9 @@ void KIconViewItem::calcRect( const QString& text_ )
}
-void KIconViewItem::paintItem( QPainter *p, const QColorGroup &cg )
+void KIconViewItem::paintItem( TQPainter *p, const TQColorGroup &cg )
{
- QIconView* view = iconView();
+ TQIconView* view = iconView();
Q_ASSERT( view );
if ( !view )
return;
@@ -651,16 +651,16 @@ KWordWrap * KIconViewItem::wordWrap()
return m_wordWrap;
}
-void KIconViewItem::paintPixmap( QPainter *p, const QColorGroup &cg )
+void KIconViewItem::paintPixmap( TQPainter *p, const TQColorGroup &cg )
{
KIconView *kview = static_cast<KIconView *>(iconView());
#ifndef QT_NO_PICTURE
if ( picture() ) {
- QPicture *pic = picture();
+ TQPicture *pic = picture();
if ( isSelected() ) {
// TODO something as nice as selectedIconPixmap if possible ;)
- p->fillRect( pixmapRect( false ), QBrush( cg.highlight(), QBrush::Dense4Pattern) );
+ p->fillRect( pixmapRect( false ), TQBrush( cg.highlight(), TQBrush::Dense4Pattern) );
}
p->drawPicture( x()-pic->boundingRect().x(), y()-pic->boundingRect().y(), *pic );
} else
@@ -669,7 +669,7 @@ void KIconViewItem::paintPixmap( QPainter *p, const QColorGroup &cg )
int iconX = pixmapRect( false ).x();
int iconY = pixmapRect( false ).y();
- QPixmap *pix = pixmap();
+ TQPixmap *pix = pixmap();
if ( !pix || pix->isNull() )
return;
@@ -680,7 +680,7 @@ void KIconViewItem::paintPixmap( QPainter *p, const QColorGroup &cg )
if ( d && !d->m_pixmapSize.isNull() )
{
int offset = 0;
- if ( kview->itemTextPos() == QIconView::Bottom )
+ if ( kview->itemTextPos() == TQIconView::Bottom )
offset = d->m_pixmapSize.height() - pix->height();
else
offset = ( d->m_pixmapSize.height() - pix->height() ) / 2;
@@ -689,7 +689,7 @@ void KIconViewItem::paintPixmap( QPainter *p, const QColorGroup &cg )
}
#endif
if ( isSelected() ) {
- QPixmap selectedPix = kview->selectedIconPixmap( pix, cg.highlight() );
+ TQPixmap selectedPix = kview->selectedIconPixmap( pix, cg.highlight() );
p->drawPixmap( iconX, iconY, selectedPix );
} else {
p->drawPixmap( iconX, iconY, *pix );
@@ -697,32 +697,32 @@ void KIconViewItem::paintPixmap( QPainter *p, const QColorGroup &cg )
}
}
-void KIconViewItem::paintText( QPainter *p, const QColorGroup &cg )
+void KIconViewItem::paintText( TQPainter *p, const TQColorGroup &cg )
{
int textX = textRect( false ).x() + 4;
int textY = textRect( false ).y();
if ( isSelected() ) {
- p->setBrush(QBrush(cg.highlight()));
- p->setPen(QPen(cg.highlight()));
+ p->setBrush(TQBrush(cg.highlight()));
+ p->setPen(TQPen(cg.highlight()));
p->drawRoundRect( textRect( false ) ,1000/textRect(false).width(),1000/textRect(false).height() );
- p->setPen( QPen( cg.highlightedText() ) );
+ p->setPen( TQPen( cg.highlightedText() ) );
} else {
if ( iconView()->itemTextBackground() != NoBrush )
p->fillRect( textRect( false ), iconView()->itemTextBackground() );
p->setPen( cg.text() );
}
- int align = iconView()->itemTextPos() == QIconView::Bottom ? AlignHCenter : AlignAuto;
+ int align = iconView()->itemTextPos() == TQIconView::Bottom ? AlignHCenter : AlignAuto;
m_wordWrap->drawText( p, textX, textY, align | KWordWrap::Truncate );
}
-QSize KIconViewItem::pixmapSize() const
+TQSize KIconViewItem::pixmapSize() const
{
- return d ? d->m_pixmapSize : QSize( 0, 0 );
+ return d ? d->m_pixmapSize : TQSize( 0, 0 );
}
-void KIconViewItem::setPixmapSize( const QSize& size )
+void KIconViewItem::setPixmapSize( const TQSize& size )
{
if ( !d )
d = new KIconViewItemPrivate;
diff --git a/kdeui/kiconview.h b/kdeui/kiconview.h
index 9228b89d7..0b0c49515 100644
--- a/kdeui/kiconview.h
+++ b/kdeui/kiconview.h
@@ -18,25 +18,25 @@
#ifndef KICONVIEW_H
#define KICONVIEW_H
-#include <qcursor.h>
-#include <qiconview.h>
+#include <tqcursor.h>
+#include <tqiconview.h>
#include <kdelibs_export.h>
/**
- * @short A variant of QIconView that honors KDE's system-wide settings.
+ * @short A variant of TQIconView that honors KDE's system-wide settings.
*
- * This Widget extends the functionality of QIconView to honor the system
+ * This Widget extends the functionality of TQIconView to honor the system
* wide settings for Single Click/Double Click mode, Auto Selection and
* Change Cursor over Link.
*
* There is a new signal executed(). It gets connected to either
- * QIconView::clicked() or QIconView::doubleClicked() depending on the KDE
+ * TQIconView::clicked() or TQIconView::doubleClicked() depending on the KDE
* wide Single Click/Double Click settings. It is strongly recommended that
* you use this signal instead of the above mentioned. This way you don´t
* need to care about the current settings.
* If you want to get informed when the user selects something connect to the
- * QIconView::selectionChanged() signal.
+ * TQIconView::selectionChanged() signal.
*
**/
class KDEUI_EXPORT KIconView : public QIconView
@@ -47,7 +47,7 @@ class KDEUI_EXPORT KIconView : public QIconView
Q_PROPERTY( Mode mode READ mode WRITE setMode )
public:
- KIconView( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KIconView( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
~KIconView();
@@ -66,7 +66,7 @@ public:
* @li In Execute mode, the signal executed()
* will be emitted when the user clicks/double-clicks an item.
* @li Select mode is
- * the normal QIconView mode.
+ * the normal TQIconView mode.
*
* Default is Execute.
*/
@@ -80,7 +80,7 @@ public:
/**
* Reimplemented for internal purposes
*/
- virtual void setFont( const QFont & );
+ virtual void setFont( const TQFont & );
/**
* Set the maximum number of lines that will be used to display icon text.
@@ -100,7 +100,7 @@ public:
/**
* Reimplemented for held() signal behavior internal purposes
*/
- virtual void takeItem( QIconViewItem * item );
+ virtual void takeItem( TQIconViewItem * item );
signals:
@@ -110,10 +110,10 @@ signals:
* setting the user clicked or double clicked on that item.
* @param item is the pointer to the executed iconview item.
*
- * Note that you may not delete any QIconViewItem objects in slots
+ * Note that you may not delete any TQIconViewItem objects in slots
* connected to this signal.
*/
- void executed( QIconViewItem *item );
+ void executed( TQIconViewItem *item );
/**
* This signal is emitted whenever the user executes an iconview item.
@@ -122,20 +122,20 @@ signals:
* @param item is the pointer to the executed iconview item.
* @param pos is the position where the user has clicked
*
- * Note that you may not delete any QIconViewItem objects in slots
+ * Note that you may not delete any TQIconViewItem objects in slots
* connected to this signal.
*/
- void executed( QIconViewItem *item, const QPoint &pos );
+ void executed( TQIconViewItem *item, const TQPoint &pos );
/**
* This signal is emitted whenever the user hold something on an iconview
* during a drag'n'drop.
* @param item is the pointer to the iconview item the hold event occur.
*
- * Note that you may not delete any QIconViewItem objects in slots
+ * Note that you may not delete any TQIconViewItem objects in slots
* connected to this signal.
*/
- void held( QIconViewItem *item );
+ void held( TQIconViewItem *item );
/**
* This signal gets emitted whenever the user double clicks into the
@@ -143,17 +143,17 @@ signals:
* @param item is the pointer to the clicked iconview item.
* @param pos is the position where the user has clicked, and
*
- * Note that you may not delete any QIconViewItem objects in slots
+ * Note that you may not delete any TQIconViewItem objects in slots
* connected to this signal.
*
* This signal is more or less here for the sake of completeness.
* You should normally not need to use this. In most cases it's better
* to use executed() instead.
*/
- void doubleClicked( QIconViewItem *item, const QPoint &pos );
+ void doubleClicked( TQIconViewItem *item, const TQPoint &pos );
protected slots:
- void slotOnItem( QIconViewItem *item );
+ void slotOnItem( TQIconViewItem *item );
void slotOnViewport();
void slotSettingsChanged(int);
@@ -163,48 +163,48 @@ protected slots:
void slotAutoSelect();
protected:
- void emitExecute( QIconViewItem *item, const QPoint &pos );
- void updateDragHoldItem( QDropEvent *e );
-
- virtual void focusOutEvent( QFocusEvent *fe );
- virtual void leaveEvent( QEvent *e );
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void contentsMouseDoubleClickEvent ( QMouseEvent * e );
- virtual void contentsMouseReleaseEvent( QMouseEvent *e );
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDropEvent( QDropEvent* e );
- virtual void wheelEvent( QWheelEvent *e );
+ void emitExecute( TQIconViewItem *item, const TQPoint &pos );
+ void updateDragHoldItem( TQDropEvent *e );
+
+ virtual void focusOutEvent( TQFocusEvent *fe );
+ virtual void leaveEvent( TQEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void contentsMouseDoubleClickEvent ( TQMouseEvent * e );
+ virtual void contentsMouseReleaseEvent( TQMouseEvent *e );
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDropEvent( TQDropEvent* e );
+ virtual void wheelEvent( TQWheelEvent *e );
/**
* This method allows to handle correctly cases where a subclass
* needs the held() signal to not be triggered without calling
* a KIconView::contentsDrag*Event() method (which have side effects
- * because they forward to QIconView).
+ * because they forward to TQIconView).
*/
void cancelPendingHeldSignal();
private slots:
- void slotMouseButtonClicked( int btn, QIconViewItem *item, const QPoint &pos );
+ void slotMouseButtonClicked( int btn, TQIconViewItem *item, const TQPoint &pos );
void slotDragHoldTimeout();
private:
/**
* @internal. For use by KIconViewItem.
*/
- QFontMetrics *itemFontMetrics() const;
+ TQFontMetrics *itemFontMetrics() const;
/**
* @internal. For use by KIconViewItem.
*/
- QPixmap selectedIconPixmap( QPixmap *pix, const QColor &col ) const;
+ TQPixmap selectedIconPixmap( TQPixmap *pix, const TQColor &col ) const;
bool m_bUseSingle;
bool m_bChangeCursorOverItem;
- QIconViewItem* m_pCurrentItem;
+ TQIconViewItem* m_pCurrentItem;
- QTimer* m_pAutoSelect;
+ TQTimer* m_pAutoSelect;
int m_autoSelectDelay;
protected:
@@ -216,10 +216,10 @@ private:
class KWordWrap;
/**
- * @short A variant of QIconViewItem that wraps words better.
+ * @short A variant of TQIconViewItem that wraps words better.
*
* KIconViewItem exists to improve the word-wrap functionality of QIconViewItem
- * Use KIconViewItem instead of QIconViewItem for any iconview item you might have :)
+ * Use KIconViewItem instead of TQIconViewItem for any iconview item you might have :)
*
* @author David Faure <david@mandrakesoft.com>
*/
@@ -227,22 +227,22 @@ class KDEUI_EXPORT KIconViewItem : public QIconViewItem
{
public:
// Need to redefine all the constructors - I want Java !
- KIconViewItem( QIconView *parent )
- : QIconViewItem( parent ) { init(); } // We need to call it because the parent ctor won't call our reimplementation :(((
- KIconViewItem( QIconView *parent, QIconViewItem *after )
- : QIconViewItem( parent, after ) { init(); }
- KIconViewItem( QIconView *parent, const QString &text )
- : QIconViewItem( parent, text ) { init(); }
- KIconViewItem( QIconView *parent, QIconViewItem *after, const QString &text )
- : QIconViewItem( parent, after, text ) { init(); }
- KIconViewItem( QIconView *parent, const QString &text, const QPixmap &icon )
- : QIconViewItem( parent, text, icon ) { init(); }
- KIconViewItem( QIconView *parent, QIconViewItem *after, const QString &text, const QPixmap &icon )
- : QIconViewItem( parent, after, text, icon ) { init(); }
- KIconViewItem( QIconView *parent, const QString &text, const QPicture &picture )
- : QIconViewItem( parent, text, picture ) { init(); }
- KIconViewItem( QIconView *parent, QIconViewItem *after, const QString &text, const QPicture &picture )
- : QIconViewItem( parent, after, text, picture ) { init(); }
+ KIconViewItem( TQIconView *parent )
+ : TQIconViewItem( parent ) { init(); } // We need to call it because the parent ctor won't call our reimplementation :(((
+ KIconViewItem( TQIconView *parent, TQIconViewItem *after )
+ : TQIconViewItem( parent, after ) { init(); }
+ KIconViewItem( TQIconView *parent, const TQString &text )
+ : TQIconViewItem( parent, text ) { init(); }
+ KIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text )
+ : TQIconViewItem( parent, after, text ) { init(); }
+ KIconViewItem( TQIconView *parent, const TQString &text, const TQPixmap &icon )
+ : TQIconViewItem( parent, text, icon ) { init(); }
+ KIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text, const TQPixmap &icon )
+ : TQIconViewItem( parent, after, text, icon ) { init(); }
+ KIconViewItem( TQIconView *parent, const TQString &text, const TQPicture &picture )
+ : TQIconViewItem( parent, text, picture ) { init(); }
+ KIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text, const TQPicture &picture )
+ : TQIconViewItem( parent, after, text, picture ) { init(); }
virtual ~KIconViewItem();
/**
@@ -256,21 +256,21 @@ public:
*
* @param size The size to use
*/
- void setPixmapSize( const QSize& size );
+ void setPixmapSize( const TQSize& size );
/**
- * @return The size set by setPixmapSize() or QSize( 0, 0 )
+ * @return The size set by setPixmapSize() or TQSize( 0, 0 )
* @since 3.3
*/
- QSize pixmapSize() const;
+ TQSize pixmapSize() const;
protected:
void init();
- virtual void calcRect( const QString& text_ = QString::null );
- virtual void paintItem( QPainter *p, const QColorGroup &c );
+ virtual void calcRect( const TQString& text_ = TQString::null );
+ virtual void paintItem( TQPainter *p, const TQColorGroup &c );
KWordWrap *wordWrap();
- void paintPixmap( QPainter *p, const QColorGroup &c );
- void paintText( QPainter *p, const QColorGroup &c );
+ void paintPixmap( TQPainter *p, const TQColorGroup &c );
+ void paintText( TQPainter *p, const TQColorGroup &c );
private:
KWordWrap* m_wordWrap;
diff --git a/kdeui/kiconviewsearchline.cpp b/kdeui/kiconviewsearchline.cpp
index 3ab31a4d5..701e15428 100644
--- a/kdeui/kiconviewsearchline.cpp
+++ b/kdeui/kiconviewsearchline.cpp
@@ -26,14 +26,14 @@
#include "kiconviewsearchline.h"
-#include <qiconview.h>
+#include <tqiconview.h>
#include <klocale.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#define DEFAULT_CASESENSITIVE false
-typedef QValueList <QIconViewItem *> QIconViewItemList;
+typedef TQValueList <TQIconViewItem *> QIconViewItemList;
class KIconViewSearchLine::KIconViewSearchLinePrivate
{
@@ -45,10 +45,10 @@ public:
hiddenListChanged( 0 ),
queuedSearches( 0 ) {}
- QIconView *iconView;
+ TQIconView *iconView;
bool caseSensitive;
bool activeSearch;
- QString search;
+ TQString search;
int queuedSearches;
int hiddenListChanged;
QIconViewItemList hiddenItems;
@@ -57,8 +57,8 @@ public:
/******************************************************************************
* Public Methods *
*****************************************************************************/
-KIconViewSearchLine::KIconViewSearchLine( QWidget *parent,
- QIconView *iconView,
+KIconViewSearchLine::KIconViewSearchLine( TQWidget *parent,
+ TQIconView *iconView,
const char *name ) :
KLineEdit( parent, name )
{
@@ -66,7 +66,7 @@ KIconViewSearchLine::KIconViewSearchLine( QWidget *parent,
init( iconView );
}
-KIconViewSearchLine::KIconViewSearchLine( QWidget *parent, const char *name ) :
+KIconViewSearchLine::KIconViewSearchLine( TQWidget *parent, const char *name ) :
KLineEdit( parent, name )
{
d = NULL;
@@ -84,7 +84,7 @@ bool KIconViewSearchLine::caseSensitive() const
return d->caseSensitive;
}
-QIconView *KIconViewSearchLine::iconView() const
+TQIconView *KIconViewSearchLine::iconView() const
{
return d->iconView;
}
@@ -92,7 +92,7 @@ QIconView *KIconViewSearchLine::iconView() const
/******************************************************************************
* Public Slots *
*****************************************************************************/
-void KIconViewSearchLine::updateSearch( const QString &s )
+void KIconViewSearchLine::updateSearch( const TQString &s )
{
long original_count;
int original_hiddenListChanged;
@@ -100,13 +100,13 @@ void KIconViewSearchLine::updateSearch( const QString &s )
if( ! d->iconView )
return; // disabled
- QString search = d->search = s.isNull() ? text() : s;
- QIconViewItem *currentItem = d->iconView->currentItem();
+ TQString search = d->search = s.isNull() ? text() : s;
+ TQIconViewItem *currentItem = d->iconView->currentItem();
- QIconViewItem *item = NULL;
+ TQIconViewItem *item = NULL;
// Remove Non-Matching items, add them them to hidden list
- QIconViewItem *i = d->iconView->firstItem();
+ TQIconViewItem *i = d->iconView->firstItem();
while ( i != NULL ) {
item = i;
i = i->nextItem(); // Point to next, otherwise will loose it.
@@ -143,8 +143,8 @@ void KIconViewSearchLine::updateSearch( const QString &s )
void KIconViewSearchLine::clear()
{
- // Clear hidden list, give items back to QIconView, if it still exists
- QIconViewItem *item = NULL;
+ // Clear hidden list, give items back to TQIconView, if it still exists
+ TQIconViewItem *item = NULL;
QIconViewItemList::iterator it = d->hiddenItems.begin();
while ( it != d->hiddenItems.end() )
{
@@ -168,9 +168,9 @@ void KIconViewSearchLine::clear()
KLineEdit::clear();
}
-void KIconViewSearchLine::iconDeleted(const QString &filename) {
- // Clear hidden list, give items back to QIconView, if it still exists
- QIconViewItem *item = NULL;
+void KIconViewSearchLine::iconDeleted(const TQString &filename) {
+ // Clear hidden list, give items back to TQIconView, if it still exists
+ TQIconViewItem *item = NULL;
QIconViewItemList::iterator it = d->hiddenItems.begin();
while ( it != d->hiddenItems.end() )
{
@@ -193,18 +193,18 @@ void KIconViewSearchLine::setCaseSensitive( bool cs )
d->caseSensitive = cs;
}
-void KIconViewSearchLine::setIconView( QIconView *iv )
+void KIconViewSearchLine::setIconView( TQIconView *iv )
{
if ( d->iconView != NULL )
- disconnect( d->iconView, SIGNAL( destroyed() ),
- this, SLOT( iconViewDeleted() ) );
+ disconnect( d->iconView, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( iconViewDeleted() ) );
d->iconView = iv;
if ( iv != NULL )
{
- connect( d->iconView, SIGNAL( destroyed() ),
- this, SLOT( iconViewDeleted() ) );
+ connect( d->iconView, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( iconViewDeleted() ) );
setEnabled( true );
}
else
@@ -214,8 +214,8 @@ void KIconViewSearchLine::setIconView( QIconView *iv )
/******************************************************************************
* Protected Methods *
*****************************************************************************/
-bool KIconViewSearchLine::itemMatches( const QIconViewItem *item,
- const QString &s ) const
+bool KIconViewSearchLine::itemMatches( const TQIconViewItem *item,
+ const TQString &s ) const
{
if ( s.isEmpty() )
return true;
@@ -223,31 +223,31 @@ bool KIconViewSearchLine::itemMatches( const QIconViewItem *item,
if ( item == NULL )
return false;
- QString itemtext = item->text();
+ TQString itemtext = item->text();
return ( itemtext.find( s, 0, caseSensitive() ) >= 0 );
}
-void KIconViewSearchLine::init( QIconView *iconView )
+void KIconViewSearchLine::init( TQIconView *iconView )
{
delete d;
d = new KIconViewSearchLinePrivate;
d->iconView = iconView;
- connect( this, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( queueSearch( const QString & ) ) );
+ connect( this, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( queueSearch( const TQString & ) ) );
if ( iconView != NULL )
{
- connect( iconView, SIGNAL( destroyed() ),
- this, SLOT( iconViewDeleted() ) );
+ connect( iconView, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( iconViewDeleted() ) );
setEnabled( true );
}
else
setEnabled( false );
}
-void KIconViewSearchLine::hideItem( QIconViewItem *item )
+void KIconViewSearchLine::hideItem( TQIconViewItem *item )
{
if ( ( item == NULL ) || ( d->iconView == NULL ) )
return;
@@ -257,7 +257,7 @@ void KIconViewSearchLine::hideItem( QIconViewItem *item )
d->iconView->takeItem( item );
}
-void KIconViewSearchLine::showItem( QIconViewItem *item )
+void KIconViewSearchLine::showItem( TQIconViewItem *item )
{
if ( d->iconView == NULL )
{
@@ -275,11 +275,11 @@ void KIconViewSearchLine::showItem( QIconViewItem *item )
/******************************************************************************
* Protected Slots *
*****************************************************************************/
-void KIconViewSearchLine::queueSearch( const QString &s )
+void KIconViewSearchLine::queueSearch( const TQString &s )
{
d->queuedSearches++;
d->search = s;
- QTimer::singleShot( 200, this, SLOT( activateSearch() ) );
+ TQTimer::singleShot( 200, this, TQT_SLOT( activateSearch() ) );
}
void KIconViewSearchLine::activateSearch()
@@ -292,7 +292,7 @@ void KIconViewSearchLine::activateSearch()
d->queuedSearches = 0;
}
else {
- QTimer::singleShot( 200, this, SLOT( activateSearch() ) );
+ TQTimer::singleShot( 200, this, TQT_SLOT( activateSearch() ) );
}
}
diff --git a/kdeui/kiconviewsearchline.h b/kdeui/kiconviewsearchline.h
index 06517f4d4..76df56ee2 100644
--- a/kdeui/kiconviewsearchline.h
+++ b/kdeui/kiconviewsearchline.h
@@ -21,7 +21,7 @@
#define KICONVIEWSEARCHLINE_H
#include <klineedit.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class QIconView;
class QIconViewItem;
@@ -31,7 +31,7 @@ class QIconViewItem;
* iconview based on a simple text search.
*
* No changes to the application other than instantiating this class with an
- * appropriate QIconView should be needed.
+ * appropriate TQIconView should be needed.
*
* @since 3.3
*/
@@ -42,21 +42,21 @@ class KDEUI_EXPORT KIconViewSearchLine : public KLineEdit
public:
/**
- * Constructs a KIconViewSearchLine with \a iconView being the QIconView to
+ * Constructs a KIconViewSearchLine with \a iconView being the TQIconView to
* be filtered.
*
* If \a iconView is null then the widget will be disabled until a iconview
* is set with setIconView().
*/
- KIconViewSearchLine( QWidget *parent = 0,
- QIconView *iconView = 0,
+ KIconViewSearchLine( TQWidget *parent = 0,
+ TQIconView *iconView = 0,
const char *name = 0 );
/**
- * Constructs a KIconViewSearchLine without any QIconView to filter. The
- * QIconView object has to be set later with setIconView().
+ * Constructs a KIconViewSearchLine without any TQIconView to filter. The
+ * TQIconView object has to be set later with setIconView().
*/
- KIconViewSearchLine( QWidget *parent, const char *name );
+ KIconViewSearchLine( TQWidget *parent, const char *name );
/**
* Destroys the KIconViewSearchLine.
@@ -75,7 +75,7 @@ public:
*
* @see setIconView()
*/
- QIconView *iconView() const;
+ TQIconView *iconView() const;
public slots:
@@ -83,7 +83,7 @@ public slots:
* Updates search to only make visible the items that match \a s. If
* \a s is null then the line edit's text will be used.
*/
- virtual void updateSearch( const QString &s = QString::null );
+ virtual void updateSearch( const TQString &s = TQString::null );
/**
* Make the search case sensitive or case insensitive.
@@ -93,12 +93,12 @@ public slots:
void setCaseSensitive( bool cs );
/**
- * Sets the QIconView that is filtered by this search line. If \a lv is null
+ * Sets the TQIconView that is filtered by this search line. If \a lv is null
* then the widget will be disabled.
*
* @see iconView()
*/
- void setIconView( QIconView *iv );
+ void setIconView( TQIconView *iv );
/**
@@ -109,7 +109,7 @@ public slots:
/**
* Must be called before updateSearch() whenever an icon is deleted.
*/
- void iconDeleted(const QString &filename);
+ void iconDeleted(const TQString &filename);
protected:
@@ -118,19 +118,19 @@ protected:
* based on the value of caseSensitive(). This can be overridden in
* subclasses to implement more complicated matching schemes.
*/
- virtual bool itemMatches( const QIconViewItem *item,
- const QString &s ) const;
+ virtual bool itemMatches( const TQIconViewItem *item,
+ const TQString &s ) const;
/**
* Do initialization common to both constructors.
*/
- void init( QIconView *iconView = 0 );
+ void init( TQIconView *iconView = 0 );
/**
* Hide item.
*/
- void hideItem( QIconViewItem *item );
+ void hideItem( TQIconViewItem *item );
/**
* Show item.
@@ -138,7 +138,7 @@ protected:
* Just unhide it, doesn't necessary show it on screen, for that use
* iconView->ensureItemVisible()
*/
- void showItem( QIconViewItem *item );
+ void showItem( TQIconViewItem *item );
protected slots:
@@ -155,7 +155,7 @@ protected slots:
*
* @see activateSearch()
*/
- void queueSearch( const QString &s );
+ void queueSearch( const TQString &s );
/**
* When the timer started with queueSearch() expires this slot is called.
diff --git a/kdeui/kinputdialog.cpp b/kdeui/kinputdialog.cpp
index d2d5e56a3..37f94e89e 100644
--- a/kdeui/kinputdialog.cpp
+++ b/kdeui/kinputdialog.cpp
@@ -17,10 +17,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qvalidator.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqvalidator.h>
+#include <tqwhatsthis.h>
#include <klineedit.h>
#include <knuminput.h>
@@ -35,7 +35,7 @@ class KInputDialogPrivate
public:
KInputDialogPrivate();
- QLabel *m_label;
+ TQLabel *m_label;
KLineEdit *m_lineEdit;
KIntSpinBox *m_intSpinBox;
KDoubleSpinBox *m_doubleSpinBox;
@@ -50,17 +50,17 @@ KInputDialogPrivate::KInputDialogPrivate()
{
}
-KInputDialog::KInputDialog( const QString &caption, const QString &label,
- const QString &value, QWidget *parent, const char *name,
- QValidator *validator, const QString &mask )
+KInputDialog::KInputDialog( const TQString &caption, const TQString &label,
+ const TQString &value, TQWidget *parent, const char *name,
+ TQValidator *validator, const TQString &mask )
: KDialogBase( parent, name, true, caption, Ok|Cancel|User1, Ok, true,
KStdGuiItem::clear() ),
d( new KInputDialogPrivate() )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- d->m_label = new QLabel( label, frame );
+ d->m_label = new TQLabel( label, frame );
layout->addWidget( d->m_label );
d->m_lineEdit = new KLineEdit( value, frame );
@@ -77,24 +77,24 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
if ( !mask.isEmpty() )
d->m_lineEdit->setInputMask( mask );
- connect( d->m_lineEdit, SIGNAL( textChanged( const QString & ) ),
- SLOT( slotEditTextChanged( const QString & ) ) );
- connect( this, SIGNAL( user1Clicked() ), d->m_lineEdit, SLOT( clear() ) );
+ connect( d->m_lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( slotEditTextChanged( const TQString & ) ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), d->m_lineEdit, TQT_SLOT( clear() ) );
slotEditTextChanged( value );
setMinimumWidth( 350 );
}
-KInputDialog::KInputDialog( const QString &caption, const QString &label,
- const QString &value, QWidget *parent, const char *name )
+KInputDialog::KInputDialog( const TQString &caption, const TQString &label,
+ const TQString &value, TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel|User1, Ok, false,
KStdGuiItem::clear() ),
d( new KInputDialogPrivate() )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- d->m_label = new QLabel( label, frame );
+ d->m_label = new TQLabel( label, frame );
layout->addWidget( d->m_label );
d->m_textEdit = new KTextEdit( frame );
@@ -105,21 +105,21 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
d->m_textEdit->setFocus();
d->m_label->setBuddy( d->m_textEdit );
- connect( this, SIGNAL( user1Clicked() ), d->m_textEdit, SLOT( clear() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), d->m_textEdit, TQT_SLOT( clear() ) );
setMinimumWidth( 400 );
}
-KInputDialog::KInputDialog( const QString &caption, const QString &label,
+KInputDialog::KInputDialog( const TQString &caption, const TQString &label,
int value, int minValue, int maxValue, int step, int base,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel, Ok, true ),
d( new KInputDialogPrivate() )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- d->m_label = new QLabel( label, frame );
+ d->m_label = new TQLabel( label, frame );
layout->addWidget( d->m_label );
d->m_intSpinBox = new KIntSpinBox( minValue, maxValue, step, value,
@@ -132,16 +132,16 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
setMinimumWidth( 300 );
}
-KInputDialog::KInputDialog( const QString &caption, const QString &label,
+KInputDialog::KInputDialog( const TQString &caption, const TQString &label,
double value, double minValue, double maxValue, double step, int decimals,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel, Ok, true ),
d( new KInputDialogPrivate() )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- d->m_label = new QLabel( label, frame );
+ d->m_label = new TQLabel( label, frame );
layout->addWidget( d->m_label );
d->m_doubleSpinBox = new KDoubleSpinBox( minValue, maxValue, step, value,
@@ -154,8 +154,8 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
setMinimumWidth( 300 );
}
-KInputDialog::KInputDialog( const QString &caption, const QString &label,
- const QStringList &list, int current, bool editable, QWidget *parent,
+KInputDialog::KInputDialog( const TQString &caption, const TQString &label,
+ const TQStringList &list, int current, bool editable, TQWidget *parent,
const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel|User1, Ok, true,
KStdGuiItem::clear() ),
@@ -163,10 +163,10 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
{
showButton( User1, editable );
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- d->m_label = new QLabel( label, frame );
+ d->m_label = new TQLabel( label, frame );
layout->addWidget( d->m_label );
if ( editable )
@@ -176,10 +176,10 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
d->m_comboBox->setCurrentItem( current );
layout->addWidget( d->m_comboBox );
- connect( d->m_comboBox, SIGNAL( textChanged( const QString & ) ),
- SLOT( slotUpdateButtons( const QString & ) ) );
- connect( this, SIGNAL( user1Clicked() ),
- d->m_comboBox, SLOT( clearEdit() ) );
+ connect( d->m_comboBox, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( slotUpdateButtons( const TQString & ) ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ),
+ d->m_comboBox, TQT_SLOT( clearEdit() ) );
slotUpdateButtons( d->m_comboBox->currentText() );
d->m_comboBox->setFocus();
} else {
@@ -188,10 +188,10 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
d->m_listBox->setSelected( current, true );
d->m_listBox->ensureCurrentVisible();
layout->addWidget( d->m_listBox, 10 );
- connect( d->m_listBox, SIGNAL( doubleClicked( QListBoxItem * ) ),
- SLOT( slotOk() ) );
- connect( d->m_listBox, SIGNAL( returnPressed( QListBoxItem * ) ),
- SLOT( slotOk() ) );
+ connect( d->m_listBox, TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ),
+ TQT_SLOT( slotOk() ) );
+ connect( d->m_listBox, TQT_SIGNAL( returnPressed( TQListBoxItem * ) ),
+ TQT_SLOT( slotOk() ) );
d->m_listBox->setFocus();
}
@@ -201,29 +201,29 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
setMinimumWidth( 320 );
}
-KInputDialog::KInputDialog( const QString &caption, const QString &label,
- const QStringList &list, const QStringList &select, bool multiple,
- QWidget *parent, const char *name )
+KInputDialog::KInputDialog( const TQString &caption, const TQString &label,
+ const TQStringList &list, const TQStringList &select, bool multiple,
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel, Ok, true ),
d( new KInputDialogPrivate() )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- d->m_label = new QLabel( label, frame );
+ d->m_label = new TQLabel( label, frame );
layout->addWidget( d->m_label );
d->m_listBox = new KListBox( frame );
d->m_listBox->insertStringList( list );
layout->addWidget( d->m_listBox );
- QListBoxItem *item;
+ TQListBoxItem *item;
if ( multiple )
{
- d->m_listBox->setSelectionMode( QListBox::Extended );
+ d->m_listBox->setSelectionMode( TQListBox::Extended );
- for ( QStringList::ConstIterator it=select.begin(); it!=select.end(); ++it )
+ for ( TQStringList::ConstIterator it=select.begin(); it!=select.end(); ++it )
{
item = d->m_listBox->findItem( *it, CaseSensitive|ExactMatch );
if ( item )
@@ -232,12 +232,12 @@ KInputDialog::KInputDialog( const QString &caption, const QString &label,
}
else
{
- connect( d->m_listBox, SIGNAL( doubleClicked( QListBoxItem * ) ),
- SLOT( slotOk() ) );
- connect( d->m_listBox, SIGNAL( returnPressed( QListBoxItem * ) ),
- SLOT( slotOk() ) );
+ connect( d->m_listBox, TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ),
+ TQT_SLOT( slotOk() ) );
+ connect( d->m_listBox, TQT_SIGNAL( returnPressed( TQListBoxItem * ) ),
+ TQT_SLOT( slotOk() ) );
- QString text = select.first();
+ TQString text = select.first();
item = d->m_listBox->findItem( text, CaseSensitive|ExactMatch );
if ( item )
d->m_listBox->setSelected( item, true );
@@ -256,30 +256,30 @@ KInputDialog::~KInputDialog()
delete d;
}
-QString KInputDialog::getText( const QString &caption, const QString &label,
- const QString &value, bool *ok, QWidget *parent, const char *name,
- QValidator *validator, const QString &mask )
+TQString KInputDialog::getText( const TQString &caption, const TQString &label,
+ const TQString &value, bool *ok, TQWidget *parent, const char *name,
+ TQValidator *validator, const TQString &mask )
{
return text( caption, label, value, ok, parent, name, validator, mask,
- QString::null );
+ TQString::null );
}
-QString KInputDialog::text( const QString &caption,
- const QString &label, const QString &value, bool *ok, QWidget *parent,
- const char *name, QValidator *validator, const QString &mask,
- const QString &whatsThis )
+TQString KInputDialog::text( const TQString &caption,
+ const TQString &label, const TQString &value, bool *ok, TQWidget *parent,
+ const char *name, TQValidator *validator, const TQString &mask,
+ const TQString &whatsThis )
{
KInputDialog dlg( caption, label, value, parent, name, validator, mask );
if( !whatsThis.isEmpty() )
- QWhatsThis::add( dlg.lineEdit(), whatsThis );
+ TQWhatsThis::add( dlg.lineEdit(), whatsThis );
bool _ok = ( dlg.exec() == Accepted );
if ( ok )
*ok = _ok;
- QString result;
+ TQString result;
if ( _ok )
result = dlg.lineEdit()->text();
@@ -290,9 +290,9 @@ QString KInputDialog::text( const QString &caption,
return result;
}
-QString KInputDialog::getMultiLineText( const QString &caption,
- const QString &label, const QString &value, bool *ok,
- QWidget *parent, const char *name )
+TQString KInputDialog::getMultiLineText( const TQString &caption,
+ const TQString &label, const TQString &value, bool *ok,
+ TQWidget *parent, const char *name )
{
KInputDialog dlg( caption, label, value, parent, name );
@@ -301,16 +301,16 @@ QString KInputDialog::getMultiLineText( const QString &caption,
if ( ok )
*ok = _ok;
- QString result;
+ TQString result;
if ( _ok )
result = dlg.textEdit()->text();
return result;
}
-int KInputDialog::getInteger( const QString &caption, const QString &label,
+int KInputDialog::getInteger( const TQString &caption, const TQString &label,
int value, int minValue, int maxValue, int step, int base, bool *ok,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
{
KInputDialog dlg( caption, label, value, minValue,
maxValue, step, base, parent, name );
@@ -327,17 +327,17 @@ int KInputDialog::getInteger( const QString &caption, const QString &label,
return result;
}
-int KInputDialog::getInteger( const QString &caption, const QString &label,
+int KInputDialog::getInteger( const TQString &caption, const TQString &label,
int value, int minValue, int maxValue, int step, bool *ok,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
{
return getInteger( caption, label, value, minValue, maxValue, step,
10, ok, parent, name );
}
-double KInputDialog::getDouble( const QString &caption, const QString &label,
+double KInputDialog::getDouble( const TQString &caption, const TQString &label,
double value, double minValue, double maxValue, double step, int decimals,
- bool *ok, QWidget *parent, const char *name )
+ bool *ok, TQWidget *parent, const char *name )
{
KInputDialog dlg( caption, label, value, minValue,
maxValue, step, decimals, parent, name );
@@ -354,30 +354,30 @@ double KInputDialog::getDouble( const QString &caption, const QString &label,
return result;
}
-double KInputDialog::getDouble( const QString &caption, const QString &label,
+double KInputDialog::getDouble( const TQString &caption, const TQString &label,
double value, double minValue, double maxValue, int decimals,
- bool *ok, QWidget *parent, const char *name )
+ bool *ok, TQWidget *parent, const char *name )
{
return getDouble( caption, label, value, minValue, maxValue, 0.1, decimals,
ok, parent, name );
}
-QString KInputDialog::getItem( const QString &caption, const QString &label,
- const QStringList &list, int current, bool editable, bool *ok,
- QWidget *parent, const char *name )
+TQString KInputDialog::getItem( const TQString &caption, const TQString &label,
+ const TQStringList &list, int current, bool editable, bool *ok,
+ TQWidget *parent, const char *name )
{
KInputDialog dlg( caption, label, list, current,
editable, parent, name );
if ( !editable)
{
- connect( dlg.listBox(), SIGNAL(doubleClicked ( QListBoxItem *)), &dlg, SLOT( slotOk()));
+ connect( dlg.listBox(), TQT_SIGNAL(doubleClicked ( TQListBoxItem *)), &dlg, TQT_SLOT( slotOk()));
}
bool _ok = ( dlg.exec() == Accepted );
if ( ok )
*ok = _ok;
- QString result;
+ TQString result;
if ( _ok )
if ( editable )
result = dlg.comboBox()->currentText();
@@ -387,9 +387,9 @@ QString KInputDialog::getItem( const QString &caption, const QString &label,
return result;
}
-QStringList KInputDialog::getItemList( const QString &caption,
- const QString &label, const QStringList &list, const QStringList &select,
- bool multiple, bool *ok, QWidget *parent, const char *name )
+TQStringList KInputDialog::getItemList( const TQString &caption,
+ const TQString &label, const TQStringList &list, const TQStringList &select,
+ bool multiple, bool *ok, TQWidget *parent, const char *name )
{
KInputDialog dlg( caption, label, list, select,
multiple, parent, name );
@@ -399,10 +399,10 @@ QStringList KInputDialog::getItemList( const QString &caption,
if ( ok )
*ok = _ok;
- QStringList result;
+ TQStringList result;
if ( _ok )
{
- for (const QListBoxItem* i = dlg.listBox()->firstItem(); i != 0; i = i->next() )
+ for (const TQListBoxItem* i = dlg.listBox()->firstItem(); i != 0; i = i->next() )
if ( i->isSelected() )
result.append( i->text() );
}
@@ -410,14 +410,14 @@ QStringList KInputDialog::getItemList( const QString &caption,
return result;
}
-void KInputDialog::slotEditTextChanged( const QString &text )
+void KInputDialog::slotEditTextChanged( const TQString &text )
{
bool on;
if ( lineEdit()->validator() ) {
- QString str = lineEdit()->text();
+ TQString str = lineEdit()->text();
int index = lineEdit()->cursorPosition();
on = ( lineEdit()->validator()->validate( str, index )
- == QValidator::Acceptable );
+ == TQValidator::Acceptable );
} else {
on = !text.stripWhiteSpace().isEmpty();
}
@@ -426,7 +426,7 @@ void KInputDialog::slotEditTextChanged( const QString &text )
enableButton( User1, !text.isEmpty() );
}
-void KInputDialog::slotUpdateButtons( const QString &text )
+void KInputDialog::slotUpdateButtons( const TQString &text )
{
enableButton( Ok, !text.isEmpty() );
enableButton( User1, !text.isEmpty() );
diff --git a/kdeui/kinputdialog.h b/kdeui/kinputdialog.h
index c6cd22d87..c59100ef0 100644
--- a/kdeui/kinputdialog.h
+++ b/kdeui/kinputdialog.h
@@ -53,23 +53,23 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* Constructor. This class is not designed to be instantiated except
* from the static member functions.
*/
- KInputDialog( const QString &caption, const QString &label,
- const QString &value, QWidget *parent, const char *name,
- QValidator *validator, const QString &mask );
- KInputDialog( const QString &caption, const QString &label,
- const QString &value, QWidget *parent, const char *name );
- KInputDialog( const QString &caption, const QString &label, int value,
- int minValue, int maxValue, int step, int base, QWidget *parent,
+ KInputDialog( const TQString &caption, const TQString &label,
+ const TQString &value, TQWidget *parent, const char *name,
+ TQValidator *validator, const TQString &mask );
+ KInputDialog( const TQString &caption, const TQString &label,
+ const TQString &value, TQWidget *parent, const char *name );
+ KInputDialog( const TQString &caption, const TQString &label, int value,
+ int minValue, int maxValue, int step, int base, TQWidget *parent,
const char *name );
- KInputDialog( const QString &caption, const QString &label, double value,
+ KInputDialog( const TQString &caption, const TQString &label, double value,
double minValue, double maxValue, double step, int decimals,
- QWidget *parent, const char *name );
- KInputDialog( const QString &caption, const QString &label,
- const QStringList &list, int current, bool editable, QWidget *parent,
+ TQWidget *parent, const char *name );
+ KInputDialog( const TQString &caption, const TQString &label,
+ const TQStringList &list, int current, bool editable, TQWidget *parent,
const char *name );
- KInputDialog( const QString &caption, const QString &label,
- const QStringList &list, const QStringList &select, bool editable,
- QWidget *parent, const char *name );
+ KInputDialog( const TQString &caption, const TQString &label,
+ const TQStringList &list, const TQStringList &select, bool editable,
+ TQWidget *parent, const char *name );
~KInputDialog();
@@ -82,8 +82,8 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
private slots:
- void slotEditTextChanged( const QString& );
- void slotUpdateButtons( const QString& );
+ void slotEditTextChanged( const TQString& );
+ void slotUpdateButtons( const TQString& );
public:
@@ -98,8 +98,8 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* If you provide a validator, the Ok button is disabled as long as
* the validator doesn't return Acceptable. If there is no validator,
* the Ok button is enabled whenever the line edit isn't empty. If you
- * want to accept empty input, create a trivial QValidator that
- * always returns acceptable, e.g. QRegExpValidator with a regexp
+ * want to accept empty input, create a trivial TQValidator that
+ * always returns acceptable, e.g. TQRegExpValidator with a regexp
* of ".*".
*
* @param caption Caption of the dialog
@@ -108,30 +108,30 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* @param ok This bool would be set to true if user pressed Ok
* @param parent Parent of the dialog widget
* @param name Name of the dialog widget
- * @param validator A @ref QValidator to be associated with the line edit
+ * @param validator A @ref TQValidator to be associated with the line edit
* @param mask Mask associated with the line edit. See the
- * documentation for @ref QLineEdit about masks.
+ * documentation for @ref TQLineEdit about masks.
*
* @return String user entered if Ok was pressed, else a null string
*/
- static QString getText( const QString &caption, const QString &label,
- const QString &value=QString::null, bool *ok=0, QWidget *parent=0,
- const char *name=0, QValidator *validator=0,
- const QString &mask=QString::null );
+ static TQString getText( const TQString &caption, const TQString &label,
+ const TQString &value=TQString::null, bool *ok=0, TQWidget *parent=0,
+ const char *name=0, TQValidator *validator=0,
+ const TQString &mask=TQString::null );
/**
* Same as @ref getText except it provides an extra parameter to specify
- * a QWhatsThis text for the input widget.
+ * a TQWhatsThis text for the input widget.
*
* ### KDE4: Merge with getText.
*
* @since KDE 3.3
**/
- static QString text( const QString &caption, const QString &label,
- const QString &value=QString::null, bool *ok=0, QWidget *parent=0,
- const char *name=0, QValidator *validator=0,
- const QString &mask=QString::null,
- const QString& whatsThis=QString::null );
+ static TQString text( const TQString &caption, const TQString &label,
+ const TQString &value=TQString::null, bool *ok=0, TQWidget *parent=0,
+ const char *name=0, TQValidator *validator=0,
+ const TQString &mask=TQString::null,
+ const TQString& whatsThis=TQString::null );
/**
* Static convenience function to get a multiline string from the user.
@@ -151,9 +151,9 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* @return String user entered if Ok was pressed, else a null string
* @since 3.3
*/
- static QString getMultiLineText( const QString &caption,
- const QString &label, const QString &value=QString::null,
- bool *ok=0, QWidget *parent=0, const char *name=0 );
+ static TQString getMultiLineText( const TQString &caption,
+ const TQString &label, const TQString &value=TQString::null,
+ bool *ok=0, TQWidget *parent=0, const char *name=0 );
/**
* Static convenience function to get an integer from the user.
@@ -179,18 +179,18 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* @return Number user entered if Ok was pressed, else 0
*/
- static int getInteger( const QString &caption, const QString &label,
+ static int getInteger( const TQString &caption, const TQString &label,
int value=0, int minValue=-2147483647, int maxValue=2147483647,
- int step=1, int base=10, bool *ok=0, QWidget *parent=0,
+ int step=1, int base=10, bool *ok=0, TQWidget *parent=0,
const char *name=0 );
/**
* This is an overloaded convenience function. It behaves exactly same as
* above except it assumes base to be 10, i.e. accepts decimal numbers.
*/
- static int getInteger( const QString &caption, const QString &label,
+ static int getInteger( const TQString &caption, const TQString &label,
int value=0, int minValue=-2147483647, int maxValue=2147483647,
- int step=1, bool *ok=0, QWidget *parent=0, const char *name=0 );
+ int step=1, bool *ok=0, TQWidget *parent=0, const char *name=0 );
/**
* Static convenience function to get a floating point number from the user.
@@ -215,19 +215,19 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
*
* @return Number user entered if Ok was pressed, else 0
*/
- static double getDouble( const QString &caption, const QString &label,
+ static double getDouble( const TQString &caption, const TQString &label,
double value=0, double minValue=-2147483647,
double maxValue=2147483647, double step=0.1, int decimals=1,
- bool *ok=0, QWidget *parent=0, const char *name=0 );
+ bool *ok=0, TQWidget *parent=0, const char *name=0 );
/**
* This is an overloaded convenience function. It behaves exctly like
* the above function.
*/
- static double getDouble( const QString &caption, const QString &label,
+ static double getDouble( const TQString &caption, const TQString &label,
double value=0, double minValue=-2147483647,
double maxValue=2147483647, int decimals=1, bool *ok=0,
- QWidget *parent=0, const char *name=0 );
+ TQWidget *parent=0, const char *name=0 );
/**
* Static convenience function to let the user select an item from a
@@ -249,9 +249,9 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* @return Text of the selected item. If @p editable is true this can be
* a text entered by the user.
*/
- static QString getItem( const QString &caption, const QString &label,
- const QStringList &list, int current=0, bool editable=false,
- bool *ok=0, QWidget *parent=0, const char *name=0 );
+ static TQString getItem( const TQString &caption, const TQString &label,
+ const TQStringList &list, int current=0, bool editable=false,
+ bool *ok=0, TQWidget *parent=0, const char *name=0 );
/**
* Static convenience function to let the user select one or more
@@ -273,10 +273,10 @@ class KDEUI_EXPORT KInputDialog : public KDialogBase
* @return List of selected items if multiple is true, else currently
* selected item as a QStringList
*/
- static QStringList getItemList( const QString &caption,
- const QString &label, const QStringList &list=QStringList(),
- const QStringList &select=QStringList(), bool multiple=false,
- bool *ok=0, QWidget *parent=0, const char *name=0 );
+ static TQStringList getItemList( const TQString &caption,
+ const TQString &label, const TQStringList &list=TQStringList(),
+ const TQStringList &select=TQStringList(), bool multiple=false,
+ bool *ok=0, TQWidget *parent=0, const char *name=0 );
private:
diff --git a/kdeui/kjanuswidget.cpp b/kdeui/kjanuswidget.cpp
index 4a38a7b28..f8647fb26 100644
--- a/kdeui/kjanuswidget.cpp
+++ b/kdeui/kjanuswidget.cpp
@@ -18,20 +18,20 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qbitmap.h>
-#include <qgrid.h>
-#include <qhbox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qpixmap.h>
-#include <qsplitter.h>
-#include <qtabwidget.h>
-#include <qvbox.h>
-#include <qwidgetstack.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqbitmap.h>
+#include <tqgrid.h>
+#include <tqhbox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqpixmap.h>
+#include <tqsplitter.h>
+#include <tqtabwidget.h>
+#include <tqvbox.h>
+#include <tqwidgetstack.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
#include <kapplication.h>
#include <kdialog.h> // Access to some static members
@@ -48,18 +48,18 @@
class KJanusWidget::IconListItem : public QListBoxItem
{
public:
- IconListItem( QListBox *listbox, const QPixmap &pixmap,
- const QString &text );
- virtual int height( const QListBox *lb ) const;
- virtual int width( const QListBox *lb ) const;
+ IconListItem( TQListBox *listbox, const TQPixmap &pixmap,
+ const TQString &text );
+ virtual int height( const TQListBox *lb ) const;
+ virtual int width( const TQListBox *lb ) const;
int expandMinimumWidth( int width );
protected:
- const QPixmap &defaultPixmap();
- void paint( QPainter *painter );
+ const TQPixmap &defaultPixmap();
+ void paint( TQPainter *painter );
private:
- QPixmap mPixmap;
+ TQPixmap mPixmap;
int mMinimumWidth;
};
@@ -71,78 +71,78 @@ public:
int mNextPageIndex; // The next page index.
// Dictionary for multipage modes.
- QMap<int,QWidget*> mIntToPage;
+ TQMap<int,TQWidget*> mIntToPage;
// Reverse dictionary. Used because showPage() may be performance critical.
- QMap<QWidget*,int> mPageToInt;
+ TQMap<TQWidget*,int> mPageToInt;
// Dictionary of title string associated with page.
- QMap<int, QString> mIntToTitle;
+ TQMap<int, TQString> mIntToTitle;
- QWidget * mListFrame;
- QSplitter * mSplitter;
+ TQWidget * mListFrame;
+ TQSplitter * mSplitter;
};
-template class QPtrList<QListViewItem>;
+template class TQPtrList<TQListViewItem>;
-KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
- : QWidget( parent, name, 0 ),
+KJanusWidget::KJanusWidget( TQWidget *parent, const char *name, int face )
+ : TQWidget( parent, name, 0 ),
mValid(false), mPageList(0),
mTitleList(0), mFace(face), mTitleLabel(0), mActivePageWidget(0),
mShowIconsInTreeList(false), d(0)
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this );
if( mFace == TreeList || mFace == IconList )
{
d = new KJanusWidgetPrivate;
d->mSplitter = 0;
- QFrame *page;
+ TQFrame *page;
if( mFace == TreeList )
{
- d->mSplitter = new QSplitter( this );
+ d->mSplitter = new TQSplitter( this );
topLayout->addWidget( d->mSplitter, 10 );
- mTreeListResizeMode = QSplitter::KeepSize;
+ mTreeListResizeMode = TQSplitter::KeepSize;
- d->mListFrame = new QWidget( d->mSplitter );
- QVBoxLayout *dummy = new QVBoxLayout( d->mListFrame, 0, KDialog::spacingHint() );
+ d->mListFrame = new TQWidget( d->mSplitter );
+ TQVBoxLayout *dummy = new TQVBoxLayout( d->mListFrame, 0, KDialog::spacingHint() );
dummy->setAutoAdd( true );
mTreeList = new KListView( d->mListFrame );
- mTreeList->addColumn( QString::null );
+ mTreeList->addColumn( TQString::null );
mTreeList->header()->hide();
mTreeList->setRootIsDecorated(true);
mTreeList->setSorting( -1 );
- connect( mTreeList, SIGNAL(selectionChanged()), SLOT(slotShowPage()) );
- connect( mTreeList, SIGNAL(clicked(QListViewItem *)), SLOT(slotItemClicked(QListViewItem *)));
+ connect( mTreeList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotShowPage()) );
+ connect( mTreeList, TQT_SIGNAL(clicked(TQListViewItem *)), TQT_SLOT(slotItemClicked(TQListViewItem *)));
//
// Page area. Title at top with a separator below and a pagestack using
// all available space at bottom.
//
- QFrame *p = new QFrame( d->mSplitter );
+ TQFrame *p = new TQFrame( d->mSplitter );
- QHBoxLayout *hbox = new QHBoxLayout( p, 0, 0 );
+ TQHBoxLayout *hbox = new TQHBoxLayout( p, 0, 0 );
- page = new QFrame( p );
+ page = new TQFrame( p );
hbox->addWidget( page, 10 );
}
else
{
- QHBoxLayout *hbox = new QHBoxLayout( topLayout );
- d->mListFrame = new QWidget( this );
+ TQHBoxLayout *hbox = new TQHBoxLayout( topLayout );
+ d->mListFrame = new TQWidget( this );
hbox->addWidget( d->mListFrame );
- ( new QVBoxLayout( d->mListFrame, 0, 0 ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( d->mListFrame, 0, 0 ) )->setAutoAdd( true );
mIconList = new IconListBox( d->mListFrame );
- QFont listFont( mIconList->font() );
+ TQFont listFont( mIconList->font() );
listFont.setBold( true );
mIconList->setFont( listFont );
mIconList->verticalScrollBar()->installEventFilter( this );
- connect( mIconList, SIGNAL(selectionChanged()), SLOT(slotShowPage()));
+ connect( mIconList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotShowPage()));
hbox->addSpacing( KDialog::marginHint() );
- page = new QFrame( this );
+ page = new TQFrame( this );
hbox->addWidget( page, 10 );
}
@@ -151,48 +151,48 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
// pagestack using all available space at bottom.
//
- QVBoxLayout *vbox = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ TQVBoxLayout *vbox = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
- mTitleLabel = new QLabel( i18n("Empty Page"), page, "KJanusWidgetTitleLabel" );
- vbox->addWidget( mTitleLabel, 0, QApplication::reverseLayout() ? AlignRight : AlignLeft );
+ mTitleLabel = new TQLabel( i18n("Empty Page"), page, "KJanusWidgetTitleLabel" );
+ vbox->addWidget( mTitleLabel, 0, TQApplication::reverseLayout() ? AlignRight : AlignLeft );
- QFont titleFont( mTitleLabel->font() );
+ TQFont titleFont( mTitleLabel->font() );
titleFont.setBold( true );
mTitleLabel->setFont( titleFont );
mTitleSep = new KSeparator( page );
- mTitleSep->setFrameStyle( QFrame::HLine|QFrame::Plain );
+ mTitleSep->setFrameStyle( TQFrame::HLine|TQFrame::Plain );
vbox->addWidget( mTitleSep );
- mPageStack = new QWidgetStack( page );
- connect(mPageStack, SIGNAL(aboutToShow(QWidget *)),
- SIGNAL(aboutToShowPage(QWidget *)));
+ mPageStack = new TQWidgetStack( page );
+ connect(mPageStack, TQT_SIGNAL(aboutToShow(TQWidget *)),
+ TQT_SIGNAL(aboutToShowPage(TQWidget *)));
vbox->addWidget( mPageStack, 10 );
}
else if( mFace == Tabbed )
{
d = new KJanusWidgetPrivate;
- mTabControl = new QTabWidget( this );
+ mTabControl = new TQTabWidget( this );
mTabControl->setMargin (KDialog::marginHint());
- connect(mTabControl, SIGNAL(currentChanged(QWidget *)),
- SIGNAL(aboutToShowPage(QWidget *)));
+ connect(mTabControl, TQT_SIGNAL(currentChanged(TQWidget *)),
+ TQT_SIGNAL(aboutToShowPage(TQWidget *)));
topLayout->addWidget( mTabControl, 10 );
}
else if( mFace == Swallow )
{
- mSwallowPage = new QWidget( this );
+ mSwallowPage = new TQWidget( this );
topLayout->addWidget( mSwallowPage, 10 );
}
else
{
mFace = Plain;
- mPlainPage = new QFrame( this );
+ mPlainPage = new TQFrame( this );
topLayout->addWidget( mPlainPage, 10 );
}
if ( kapp )
- connect(kapp,SIGNAL(kdisplayFontChanged()),SLOT(slotFontChanged()));
+ connect(kapp,TQT_SIGNAL(kdisplayFontChanged()),TQT_SLOT(slotFontChanged()));
mValid = true;
setSwallowedWidget(0); // Set default size if 'mFace' is Swallow.
@@ -211,7 +211,7 @@ bool KJanusWidget::isValid() const
}
-QFrame *KJanusWidget::plainPage()
+TQFrame *KJanusWidget::plainPage()
{
return mPlainPage;
}
@@ -222,7 +222,7 @@ int KJanusWidget::face() const
return mFace;
}
-QWidget *KJanusWidget::FindParent()
+TQWidget *KJanusWidget::FindParent()
{
if( mFace == Tabbed ) {
return mTabControl;
@@ -232,8 +232,8 @@ QWidget *KJanusWidget::FindParent()
}
}
-QFrame *KJanusWidget::addPage( const QStringList &items, const QString &header,
- const QPixmap &pixmap )
+TQFrame *KJanusWidget::addPage( const TQStringList &items, const TQString &header,
+ const TQPixmap &pixmap )
{
if( !mValid )
{
@@ -241,36 +241,36 @@ QFrame *KJanusWidget::addPage( const QStringList &items, const QString &header,
return 0;
}
- QFrame *page = new QFrame( FindParent(), "page" );
+ TQFrame *page = new TQFrame( FindParent(), "page" );
addPageWidget( page, items, header, pixmap );
return page;
}
-void KJanusWidget::pageGone( QObject *obj )
+void KJanusWidget::pageGone( TQObject *obj )
{
- removePage( static_cast<QWidget*>( obj ) );
+ removePage( static_cast<TQWidget*>( obj ) );
}
-void KJanusWidget::slotReopen( QListViewItem * item )
+void KJanusWidget::slotReopen( TQListViewItem * item )
{
if( item )
item->setOpen( true );
}
-QFrame *KJanusWidget::addPage( const QString &itemName, const QString &header,
- const QPixmap &pixmap )
+TQFrame *KJanusWidget::addPage( const TQString &itemName, const TQString &header,
+ const TQPixmap &pixmap )
{
- QStringList items;
+ TQStringList items;
items << itemName;
return addPage(items, header, pixmap);
}
-QVBox *KJanusWidget::addVBoxPage( const QStringList &items,
- const QString &header,
- const QPixmap &pixmap )
+TQVBox *KJanusWidget::addVBoxPage( const TQStringList &items,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
if( !mValid )
{
@@ -278,51 +278,51 @@ QVBox *KJanusWidget::addVBoxPage( const QStringList &items,
return 0;
}
- QVBox *page = new QVBox(FindParent() , "page" );
+ TQVBox *page = new TQVBox(FindParent() , "page" );
page->setSpacing( KDialog::spacingHint() );
addPageWidget( page, items, header, pixmap );
return page;
}
-QVBox *KJanusWidget::addVBoxPage( const QString &itemName,
- const QString &header,
- const QPixmap &pixmap )
+TQVBox *KJanusWidget::addVBoxPage( const TQString &itemName,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
- QStringList items;
+ TQStringList items;
items << itemName;
return addVBoxPage(items, header, pixmap);
}
-QHBox *KJanusWidget::addHBoxPage( const QStringList &items,
- const QString &header,
- const QPixmap &pixmap )
+TQHBox *KJanusWidget::addHBoxPage( const TQStringList &items,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
if( !mValid ) {
kdDebug() << "addPage: Invalid object" << endl;
return 0;
}
- QHBox *page = new QHBox(FindParent(), "page");
+ TQHBox *page = new TQHBox(FindParent(), "page");
page->setSpacing( KDialog::spacingHint() );
addPageWidget( page, items, header, pixmap );
return page;
}
-QHBox *KJanusWidget::addHBoxPage( const QString &itemName,
- const QString &header,
- const QPixmap &pixmap )
+TQHBox *KJanusWidget::addHBoxPage( const TQString &itemName,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
- QStringList items;
+ TQStringList items;
items << itemName;
return addHBoxPage(items, header, pixmap);
}
-QGrid *KJanusWidget::addGridPage( int n, Orientation dir,
- const QStringList &items,
- const QString &header,
- const QPixmap &pixmap )
+TQGrid *KJanusWidget::addGridPage( int n, Orientation dir,
+ const TQStringList &items,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
if( !mValid )
{
@@ -330,7 +330,7 @@ QGrid *KJanusWidget::addGridPage( int n, Orientation dir,
return 0;
}
- QGrid *page = new QGrid( n, dir, FindParent(), "page" );
+ TQGrid *page = new TQGrid( n, dir, FindParent(), "page" );
page->setSpacing( KDialog::spacingHint() );
addPageWidget( page, items, header, pixmap );
@@ -338,25 +338,25 @@ QGrid *KJanusWidget::addGridPage( int n, Orientation dir,
}
-QGrid *KJanusWidget::addGridPage( int n, Orientation dir,
- const QString &itemName,
- const QString &header,
- const QPixmap &pixmap )
+TQGrid *KJanusWidget::addGridPage( int n, Orientation dir,
+ const TQString &itemName,
+ const TQString &header,
+ const TQPixmap &pixmap )
{
- QStringList items;
+ TQStringList items;
items << itemName;
return addGridPage(n, dir, items, header, pixmap);
}
-void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, QFrame *page)
+void KJanusWidget::InsertTreeListItem(const TQStringList &items, const TQPixmap &pixmap, TQFrame *page)
{
bool isTop = true;
- QListViewItem *curTop = 0, *child, *last, *newChild;
+ TQListViewItem *curTop = 0, *child, *last, *newChild;
unsigned int index = 1;
- QStringList curPath;
+ TQStringList curPath;
- for ( QStringList::ConstIterator it = items.begin(); it != items.end(); ++it, index++ ) {
- QString name = (*it);
+ for ( TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it, index++ ) {
+ TQString name = (*it);
bool isPath = ( index != items.count() );
// Find the first child.
@@ -375,9 +375,9 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
// This node didn't have any children at all, lets just insert the
// new child.
if (isTop)
- newChild = new QListViewItem(mTreeList, name);
+ newChild = new TQListViewItem(mTreeList, name);
else
- newChild = new QListViewItem(curTop, name);
+ newChild = new TQListViewItem(curTop, name);
}
else if (child) {
@@ -394,9 +394,9 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
else {
// the node had some children, but we didn't find the given name
if (isTop)
- newChild = new QListViewItem(mTreeList, last, name);
+ newChild = new TQListViewItem(mTreeList, last, name);
else
- newChild = new QListViewItem(curTop, last, name);
+ newChild = new TQListViewItem(curTop, last, name);
}
// Now make the element expandable if it is a path component, and make
@@ -407,9 +407,9 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
isTop = false;
curPath << name;
- QString key = curPath.join("_/_");
+ TQString key = curPath.join("_/_");
if (mFolderIconMap.contains(key)) {
- QPixmap p = mFolderIconMap[key];
+ TQPixmap p = mFolderIconMap[key];
newChild->setPixmap(0,p);
}
}
@@ -422,26 +422,26 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
}
}
-void KJanusWidget::addPageWidget( QFrame *page, const QStringList &items,
- const QString &header,const QPixmap &pixmap )
+void KJanusWidget::addPageWidget( TQFrame *page, const TQStringList &items,
+ const TQString &header,const TQPixmap &pixmap )
{
- connect(page, SIGNAL(destroyed(QObject*)), SLOT(pageGone(QObject*)));
+ connect(page, TQT_SIGNAL(destroyed(TQObject*)), TQT_SLOT(pageGone(TQObject*)));
if( mFace == Tabbed )
{
mTabControl->addTab (page, items.last());
- d->mIntToPage[d->mNextPageIndex] = static_cast<QWidget*>(page);
- d->mPageToInt[static_cast<QWidget*>(page)] = d->mNextPageIndex;
+ d->mIntToPage[d->mNextPageIndex] = static_cast<TQWidget*>(page);
+ d->mPageToInt[static_cast<TQWidget*>(page)] = d->mNextPageIndex;
d->mNextPageIndex++;
}
else if( mFace == TreeList || mFace == IconList )
{
- d->mIntToPage[d->mNextPageIndex] = static_cast<QWidget*>(page);
- d->mPageToInt[static_cast<QWidget*>(page)] = d->mNextPageIndex;
+ d->mIntToPage[d->mNextPageIndex] = static_cast<TQWidget*>(page);
+ d->mPageToInt[static_cast<TQWidget*>(page)] = d->mNextPageIndex;
mPageStack->addWidget( page, 0 );
if (items.isEmpty()) {
- kdDebug() << "Invalid QStringList, with zero items" << endl;
+ kdDebug() << "Invalid TQStringList, with zero items" << endl;
return;
}
@@ -451,7 +451,7 @@ void KJanusWidget::addPageWidget( QFrame *page, const QStringList &items,
}
else // mFace == IconList
{
- QString itemName = items.last();
+ TQString itemName = items.last();
IconListItem *item = new IconListItem( mIconList, pixmap, itemName );
mIconListToPageStack.insert(item, page);
mIconList->invalidateHeight();
@@ -464,9 +464,9 @@ void KJanusWidget::addPageWidget( QFrame *page, const QStringList &items,
//
// Make sure the title label is sufficiently wide
//
- QString lastName = items.last();
- const QString &title = (!header.isNull() ? header : lastName);
- QRect r = mTitleLabel->fontMetrics().boundingRect( title );
+ TQString lastName = items.last();
+ const TQString &title = (!header.isNull() ? header : lastName);
+ TQRect r = mTitleLabel->fontMetrics().boundingRect( title );
if( mTitleLabel->minimumWidth() < r.width() )
{
mTitleLabel->setMinimumWidth( r.width() );
@@ -485,15 +485,15 @@ void KJanusWidget::addPageWidget( QFrame *page, const QStringList &items,
}
-void KJanusWidget::setFolderIcon(const QStringList &path, const QPixmap &pixmap)
+void KJanusWidget::setFolderIcon(const TQStringList &path, const TQPixmap &pixmap)
{
- QString key = path.join("_/_");
+ TQString key = path.join("_/_");
mFolderIconMap.insert(key,pixmap);
}
-bool KJanusWidget::setSwallowedWidget( QWidget *widget )
+bool KJanusWidget::setSwallowedWidget( TQWidget *widget )
{
if( mFace != Swallow || !mValid )
{
@@ -505,18 +505,18 @@ bool KJanusWidget::setSwallowedWidget( QWidget *widget )
//
delete mSwallowPage->layout();
- QGridLayout *gbox = new QGridLayout( mSwallowPage, 1, 1, 0 );
+ TQGridLayout *gbox = new TQGridLayout( mSwallowPage, 1, 1, 0 );
//
// Hide old children
//
- QObjectList *l = (QObjectList*)mSwallowPage->children(); // silence please
+ TQObjectList *l = (TQObjectList*)mSwallowPage->children(); // silence please
for( uint i=0; i < l->count(); i++ )
{
- QObject *o = l->at(i);
+ TQObject *o = l->at(i);
if( o->isWidgetType() )
{
- ((QWidget*)o)->hide();
+ ((TQWidget*)o)->hide();
}
}
@@ -533,7 +533,7 @@ bool KJanusWidget::setSwallowedWidget( QWidget *widget )
{
if( widget->parent() != mSwallowPage )
{
- widget->reparent( mSwallowPage, 0, QPoint(0,0) );
+ widget->reparent( mSwallowPage, 0, TQPoint(0,0) );
}
gbox->addWidget(widget, 0, 0 );
gbox->activate();
@@ -552,18 +552,18 @@ bool KJanusWidget::slotShowPage()
if( mFace == TreeList )
{
- QListViewItem *node = mTreeList->selectedItem();
+ TQListViewItem *node = mTreeList->selectedItem();
if( !node ) { return false; }
- QWidget *stackItem = mTreeListToPageStack[node];
+ TQWidget *stackItem = mTreeListToPageStack[node];
// Make sure to call through the virtual function showPage(int)
return showPage(d->mPageToInt[stackItem]);
}
else if( mFace == IconList )
{
- QListBoxItem *node = mIconList->item( mIconList->currentItem() );
+ TQListBoxItem *node = mIconList->item( mIconList->currentItem() );
if( !node ) { return false; }
- QWidget *stackItem = mIconListToPageStack[node];
+ TQWidget *stackItem = mIconListToPageStack[node];
// Make sure to call through the virtual function showPage(int)
return showPage(d->mPageToInt[stackItem]);
}
@@ -585,7 +585,7 @@ bool KJanusWidget::showPage( int index )
}
-bool KJanusWidget::showPage( QWidget *w )
+bool KJanusWidget::showPage( TQWidget *w )
{
if( !w || !mValid )
{
@@ -601,10 +601,10 @@ bool KJanusWidget::showPage( QWidget *w )
mTitleLabel->setText( d->mIntToTitle[index] );
if( mFace == TreeList )
{
- QMap<QListViewItem *, QWidget *>::Iterator it;
+ TQMap<TQListViewItem *, TQWidget *>::Iterator it;
for (it = mTreeListToPageStack.begin(); it != mTreeListToPageStack.end(); ++it){
- QListViewItem *key = it.key();
- QWidget *val = it.data();
+ TQListViewItem *key = it.key();
+ TQWidget *val = it.data();
if (val == w) {
mTreeList->setSelected(key, true );
break;
@@ -613,10 +613,10 @@ bool KJanusWidget::showPage( QWidget *w )
}
else
{
- QMap<QListBoxItem *, QWidget *>::Iterator it;
+ TQMap<TQListBoxItem *, TQWidget *>::Iterator it;
for (it = mIconListToPageStack.begin(); it != mIconListToPageStack.end(); ++it){
- QListBoxItem *key = it.key();
- QWidget *val = it.data();
+ TQListBoxItem *key = it.key();
+ TQWidget *val = it.data();
if (val == w) {
mIconList->setSelected( key, true );
break;
@@ -641,19 +641,19 @@ bool KJanusWidget::showPage( QWidget *w )
int KJanusWidget::activePageIndex() const
{
if( mFace == TreeList) {
- QListViewItem *node = mTreeList->selectedItem();
+ TQListViewItem *node = mTreeList->selectedItem();
if( !node ) { return -1; }
- QWidget *stackItem = mTreeListToPageStack[node];
+ TQWidget *stackItem = mTreeListToPageStack[node];
return d->mPageToInt[stackItem];
}
else if (mFace == IconList) {
- QListBoxItem *node = mIconList->item( mIconList->currentItem() );
+ TQListBoxItem *node = mIconList->item( mIconList->currentItem() );
if( !node ) { return false; }
- QWidget *stackItem = mIconListToPageStack[node];
+ TQWidget *stackItem = mIconListToPageStack[node];
return d->mPageToInt[stackItem];
}
else if( mFace == Tabbed ) {
- QWidget *widget = mTabControl->currentPage();
+ TQWidget *widget = mTabControl->currentPage();
return ( !widget ? -1 : d->mPageToInt[widget] );
}
else {
@@ -662,7 +662,7 @@ int KJanusWidget::activePageIndex() const
}
-int KJanusWidget::pageIndex( QWidget *widget ) const
+int KJanusWidget::pageIndex( TQWidget *widget ) const
{
if( !widget )
{
@@ -677,9 +677,9 @@ int KJanusWidget::pageIndex( QWidget *widget ) const
//
// The user gets the real page widget with addVBoxPage(), addHBoxPage()
// and addGridPage() but not with addPage() which returns a child of
- // the toplevel page. addPage() returns a QFrame so I check for that.
+ // the toplevel page. addPage() returns a TQFrame so I check for that.
//
- if( widget->isA("QFrame") )
+ if( widget->isA("TQFrame") )
{
return d->mPageToInt[widget->parentWidget()];
}
@@ -699,14 +699,14 @@ void KJanusWidget::slotFontChanged()
if( mTitleLabel )
{
mTitleLabel->setFont( KGlobalSettings::generalFont() );
- QFont titleFont( mTitleLabel->font() );
+ TQFont titleFont( mTitleLabel->font() );
titleFont.setBold( true );
mTitleLabel->setFont( titleFont );
}
if( mFace == IconList )
{
- QFont listFont( mIconList->font() );
+ TQFont listFont( mIconList->font() );
listFont.setBold( true );
mIconList->setFont( listFont );
mIconList->invalidateHeight();
@@ -715,7 +715,7 @@ void KJanusWidget::slotFontChanged()
}
// makes the treelist behave like the list of kcontrol
-void KJanusWidget::slotItemClicked(QListViewItem *it)
+void KJanusWidget::slotItemClicked(TQListViewItem *it)
{
if(it && (it->childCount()>0))
it->setOpen(!it->isOpen());
@@ -747,18 +747,18 @@ void KJanusWidget::setFocus()
}
-QSize KJanusWidget::minimumSizeHint() const
+TQSize KJanusWidget::minimumSizeHint() const
{
if( mFace == TreeList || mFace == IconList )
{
- QSize s1( KDialog::spacingHint(), KDialog::spacingHint()*2 );
- QSize s2(0,0);
- QSize s3(0,0);
- QSize s4( mPageStack->sizeHint() );
+ TQSize s1( KDialog::spacingHint(), KDialog::spacingHint()*2 );
+ TQSize s2(0,0);
+ TQSize s3(0,0);
+ TQSize s4( mPageStack->sizeHint() );
if( mFace == TreeList )
{
- s1.rwidth() += style().pixelMetric( QStyle::PM_SplitterWidth );
+ s1.rwidth() += style().pixelMetric( TQStyle::PM_SplitterWidth );
s2 = mTreeList->minimumSize();
}
else
@@ -780,7 +780,7 @@ QSize KJanusWidget::minimumSizeHint() const
int h1 = s1.rheight() + s3.rheight() + s4.height();
int h2 = QMAX( h1, s2.rheight() );
- return QSize( s1.width()+s2.width()+QMAX(s3.width(),s4.width()), h2 );
+ return TQSize( s1.width()+s2.width()+QMAX(s3.width(),s4.width()), h2 );
}
else if( mFace == Tabbed )
{
@@ -796,13 +796,13 @@ QSize KJanusWidget::minimumSizeHint() const
}
else
{
- return QSize( 100, 100 ); // Should never happen though.
+ return TQSize( 100, 100 ); // Should never happen though.
}
}
-QSize KJanusWidget::sizeHint() const
+TQSize KJanusWidget::sizeHint() const
{
return minimumSizeHint();
}
@@ -813,7 +813,7 @@ void KJanusWidget::setTreeListAutoResize( bool state )
if( mFace == TreeList )
{
mTreeListResizeMode = !state ?
- QSplitter::KeepSize : QSplitter::Stretch;
+ TQSplitter::KeepSize : TQSplitter::Stretch;
if( d->mSplitter )
d->mSplitter->setResizeMode( d->mListFrame, mTreeListResizeMode );
}
@@ -845,42 +845,42 @@ void KJanusWidget::unfoldTreeList( bool persist )
if( mFace == TreeList )
{
if( persist )
- connect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) );
+ connect( mTreeList, TQT_SIGNAL( collapsed( TQListViewItem * ) ), this, TQT_SLOT( slotReopen( TQListViewItem * ) ) );
else
- disconnect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) );
+ disconnect( mTreeList, TQT_SIGNAL( collapsed( TQListViewItem * ) ), this, TQT_SLOT( slotReopen( TQListViewItem * ) ) );
- for( QListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() )
+ for( TQListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() )
item->setOpen( true );
}
}
-void KJanusWidget::addWidgetBelowList( QWidget * widget )
+void KJanusWidget::addWidgetBelowList( TQWidget * widget )
{
if( ( mFace == TreeList || mFace == IconList ) && d->mListFrame )
{
- widget->reparent( d->mListFrame, QPoint() );
+ widget->reparent( d->mListFrame, TQPoint() );
}
}
-void KJanusWidget::addButtonBelowList( const QString & text, QObject * recv, const char * slot )
+void KJanusWidget::addButtonBelowList( const TQString & text, TQObject * recv, const char * slot )
{
if( ( mFace == TreeList || mFace == IconList ) && d->mListFrame )
{
- QPushButton * button = new QPushButton( text, d->mListFrame, "KJanusWidget::buttonBelowList" );
- connect( button, SIGNAL( clicked() ), recv, slot );
+ TQPushButton * button = new TQPushButton( text, d->mListFrame, "KJanusWidget::buttonBelowList" );
+ connect( button, TQT_SIGNAL( clicked() ), recv, slot );
}
}
-void KJanusWidget::addButtonBelowList( const KGuiItem & item, QObject * recv, const char * slot )
+void KJanusWidget::addButtonBelowList( const KGuiItem & item, TQObject * recv, const char * slot )
{
if( ( mFace == TreeList || mFace == IconList ) && d->mListFrame )
{
KPushButton * button = new KPushButton( item, d->mListFrame, "KJanusWidget::buttonBelowList" );
- connect( button, SIGNAL( clicked() ), recv, slot );
+ connect( button, TQT_SIGNAL( clicked() ), recv, slot );
}
}
-void KJanusWidget::showEvent( QShowEvent * )
+void KJanusWidget::showEvent( TQShowEvent * )
{
if( mFace == TreeList )
{
@@ -895,9 +895,9 @@ void KJanusWidget::showEvent( QShowEvent * )
// It should be obvious that this eventfilter must only be
// be installed on the vertical scrollbar of the mIconList.
//
-bool KJanusWidget::eventFilter( QObject *o, QEvent *e )
+bool KJanusWidget::eventFilter( TQObject *o, TQEvent *e )
{
- if( e->type() == QEvent::Show )
+ if( e->type() == TQEvent::Show )
{
IconListItem *item = (IconListItem*)mIconList->item(0);
if( item )
@@ -907,7 +907,7 @@ bool KJanusWidget::eventFilter( QObject *o, QEvent *e )
mIconList->setFixedWidth( lw+sw+mIconList->frameWidth()*2 );
}
}
- else if( e->type() == QEvent::Hide )
+ else if( e->type() == TQEvent::Hide )
{
IconListItem *item = (IconListItem*)mIconList->item(0);
if( item )
@@ -916,7 +916,7 @@ bool KJanusWidget::eventFilter( QObject *o, QEvent *e )
mIconList->setFixedWidth( lw+mIconList->frameWidth()*2 );
}
}
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
@@ -926,7 +926,7 @@ bool KJanusWidget::eventFilter( QObject *o, QEvent *e )
//
-KJanusWidget::IconListBox::IconListBox( QWidget *parent, const char *name,
+KJanusWidget::IconListBox::IconListBox( TQWidget *parent, const char *name,
WFlags f )
:KListBox( parent, name, f ), mShowAll(false), mHeightValid(false),
mWidthValid(false)
@@ -939,7 +939,7 @@ void KJanusWidget::IconListBox::updateMinimumHeight()
if( mShowAll && !mHeightValid )
{
int h = frameWidth()*2;
- for( QListBoxItem *i = item(0); i; i = i->next() )
+ for( TQListBoxItem *i = item(0); i; i = i->next() )
{
h += i->height( this );
}
@@ -954,13 +954,13 @@ void KJanusWidget::IconListBox::updateWidth()
if( !mWidthValid )
{
int maxWidth = 10;
- for( QListBoxItem *i = item(0); i; i = i->next() )
+ for( TQListBoxItem *i = item(0); i; i = i->next() )
{
int w = ((IconListItem *)i)->width(this);
maxWidth = QMAX( w, maxWidth );
}
- for( QListBoxItem *i = item(0); i; i = i->next() )
+ for( TQListBoxItem *i = item(0); i; i = i->next() )
{
((IconListItem *)i)->expandMinimumWidth( maxWidth );
}
@@ -996,9 +996,9 @@ void KJanusWidget::IconListBox::setShowAll( bool showAll )
-KJanusWidget::IconListItem::IconListItem( QListBox *listbox, const QPixmap &pixmap,
- const QString &text )
- : QListBoxItem( listbox )
+KJanusWidget::IconListItem::IconListItem( TQListBox *listbox, const TQPixmap &pixmap,
+ const TQString &text )
+ : TQListBoxItem( listbox )
{
mPixmap = pixmap;
if( mPixmap.isNull() )
@@ -1017,19 +1017,19 @@ int KJanusWidget::IconListItem::expandMinimumWidth( int width )
}
-const QPixmap &KJanusWidget::IconListItem::defaultPixmap()
+const TQPixmap &KJanusWidget::IconListItem::defaultPixmap()
{
- static QPixmap *pix=0;
+ static TQPixmap *pix=0;
if( !pix )
{
- pix = new QPixmap( 32, 32 );
- QPainter p( pix );
+ pix = new TQPixmap( 32, 32 );
+ TQPainter p( pix );
p.eraseRect( 0, 0, pix->width(), pix->height() );
p.setPen( Qt::red );
p.drawRect ( 0, 0, pix->width(), pix->height() );
p.end();
- QBitmap mask( pix->width(), pix->height(), true );
+ TQBitmap mask( pix->width(), pix->height(), true );
mask.fill( Qt::black );
p.begin( &mask );
p.setPen( Qt::white );
@@ -1042,9 +1042,9 @@ const QPixmap &KJanusWidget::IconListItem::defaultPixmap()
}
-void KJanusWidget::IconListItem::paint( QPainter *painter )
+void KJanusWidget::IconListItem::paint( TQPainter *painter )
{
- QFontMetrics fm = painter->fontMetrics();
+ TQFontMetrics fm = painter->fontMetrics();
int ht = fm.boundingRect( 0, 0, 0, 0, Qt::AlignCenter, text() ).height();
int wp = mPixmap.width();
int hp = mPixmap.height();
@@ -1056,7 +1056,7 @@ void KJanusWidget::IconListItem::paint( QPainter *painter )
}
}
-int KJanusWidget::IconListItem::height( const QListBox *lb ) const
+int KJanusWidget::IconListItem::height( const TQListBox *lb ) const
{
if( text().isEmpty() )
{
@@ -1070,7 +1070,7 @@ int KJanusWidget::IconListItem::height( const QListBox *lb ) const
}
-int KJanusWidget::IconListItem::width( const QListBox *lb ) const
+int KJanusWidget::IconListItem::width( const TQListBox *lb ) const
{
int wt = lb->fontMetrics().boundingRect( 0, 0, 0, 0, Qt::AlignCenter, text() ).width() + 10;
int wp = mPixmap.width() + 10;
@@ -1084,7 +1084,7 @@ void KJanusWidget::virtual_hook( int, void* )
// TODO: In TreeList, if the last child of a node is removed, and there is no corrsponding widget for that node, allow the caller to
// delete the node.
-void KJanusWidget::removePage( QWidget *page )
+void KJanusWidget::removePage( TQWidget *page )
{
if (!d || !d->mPageToInt.contains(page))
return;
@@ -1093,7 +1093,7 @@ void KJanusWidget::removePage( QWidget *page )
if ( mFace == TreeList )
{
- QMap<QListViewItem*, QWidget *>::Iterator i;
+ TQMap<TQListViewItem*, TQWidget *>::Iterator i;
for( i = mTreeListToPageStack.begin(); i != mTreeListToPageStack.end(); ++i )
if (i.data()==page)
{
@@ -1108,7 +1108,7 @@ void KJanusWidget::removePage( QWidget *page )
}
else if ( mFace == IconList )
{
- QMap<QListBoxItem*, QWidget *>::Iterator i;
+ TQMap<TQListBoxItem*, TQWidget *>::Iterator i;
for( i = mIconListToPageStack.begin(); i != mIconListToPageStack.end(); ++i )
if (i.data()==page)
{
@@ -1129,15 +1129,15 @@ void KJanusWidget::removePage( QWidget *page )
}
}
-QString KJanusWidget::pageTitle(int index) const
+TQString KJanusWidget::pageTitle(int index) const
{
if (!d || !d->mIntToTitle.contains(index))
- return QString::null;
+ return TQString::null;
else
return d->mIntToTitle[index];
}
-QWidget *KJanusWidget::pageWidget(int index) const
+TQWidget *KJanusWidget::pageWidget(int index) const
{
if (!d || !d->mIntToPage.contains(index))
return 0;
diff --git a/kdeui/kjanuswidget.h b/kdeui/kjanuswidget.h
index 6fbd294fe..0eb578a4b 100644
--- a/kdeui/kjanuswidget.h
+++ b/kdeui/kjanuswidget.h
@@ -20,13 +20,13 @@
#ifndef _KJANUS_WIDGET_H_
#define _KJANUS_WIDGET_H_
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qsplitter.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqsplitter.h>
#include <klistbox.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
class KListView;
@@ -50,7 +50,7 @@ class KGuiItem;
* This class provides KJanusWidget::TreeList, KJanusWidget::IconList,
* KJanusWidget::Tabbed, KJanusWidget::Plain and KJanusWidget::Swallow layouts.
*
- * For all modes it is important that you specify the QWidget::minimumSize()
+ * For all modes it is important that you specify the TQWidget::minimumSize()
* on the page, plain widget or the swallowed widget. If you use a QLayout
* on the page, plain widget or the swallowed widget this will be taken care
* of automatically. The size is used when the KJanusWidget determines its
@@ -59,7 +59,7 @@ class KGuiItem;
*
* Pages that have been added in TreeList, IconList or Tabbed mode can be
* removed by simply deleting the page. However, it would be preferable to use
- * the QObject::deleteLater() function on the page as the main event loop
+ * the TQObject::deleteLater() function on the page as the main event loop
* may have optimized UI update events of the page by scheduling them for later.
*
* @author Espen Sand (espen@kde.org)
@@ -72,7 +72,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
class IconListBox : public KListBox
{
public:
- IconListBox( QWidget *parent=0, const char *name=0, WFlags f=0 );
+ IconListBox( TQWidget *parent=0, const char *name=0, WFlags f=0 );
void updateMinimumHeight();
void updateWidth();
void invalidateHeight();
@@ -103,7 +103,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
*/
Tabbed,
/**
- * The Plain face provides an empty widget (QFrame) where you can place your
+ * The Plain face provides an empty widget (TQFrame) where you can place your
* widgets. The KJanusWidget makes no assumptions regarding the contents so
* you are free to add whatever you want.
*/
@@ -136,7 +136,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @param face The kind of dialog, Use TreeList, Tabbed, Plain or
* Swallow.
*/
- KJanusWidget( QWidget *parent=0, const char *name=0, int face=Plain );
+ KJanusWidget( TQWidget *parent=0, const char *name=0, int face=Plain );
/**
* Destructor.
@@ -179,7 +179,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
*
* @return The minimum size.
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
/**
* Returns the recommended size for the widget in order to be displayed
@@ -187,14 +187,14 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
*
* @return The recommended size.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* Returns the empty widget that is available in Plain mode.
*
* @return The widget or 0 if the face in not Plain.
*/
- virtual QFrame *plainPage();
+ virtual TQFrame *plainPage();
/**
* Add a new page when the class is used in TreeList, IconList or Tabbed
@@ -215,8 +215,8 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @return The empty page or 0 if the face is not TreeList, IconList or
* Tabbed.
*/
- virtual QFrame *addPage(const QString &item,const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQFrame *addPage(const TQString &item,const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addPage just above, with the difference that the first
@@ -232,14 +232,14 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* Deleting the returned frame will cause the listitem or tab to be
* removed (you can re-add a page with the same name later.
**/
- virtual QFrame *addPage(const QStringList &items, const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQFrame *addPage(const TQStringList &items, const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* Add a new page when the class is used in TreeList, IconList or Tabbed
* mode. The returned widget is empty and you must add your widgets
* as children to this widget. The returned widget is a QVBox
- * so it contains a QVBoxLayout layout that lines up the child widgets
+ * so it contains a TQVBoxLayout layout that lines up the child widgets
* are vertically.
*
* Deleting the returned frame will cause the listitem or tab to be
@@ -254,9 +254,9 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
*
* @return The empty page or 0 if the face is not TreeList, IconList or
* Tabbed. */
- virtual QVBox *addVBoxPage( const QString &item,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQVBox *addVBoxPage( const TQString &item,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addVBoxPage just above, with the difference that the first
@@ -270,15 +270,15 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* Deleting the returned frame will cause the listitem or tab to be
* removed (you can re-add a page with the same name later.
**/
- virtual QVBox *addVBoxPage( const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQVBox *addVBoxPage( const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* Add a new page when the class is used in TreeList, IconList or Tabbed
* mode. The returned widget is empty and you must add your widgets
* as children to this widget. The returned widget is a QHBox
- * so it contains a QHBoxLayout layout that lines up the child widgets
+ * so it contains a TQHBoxLayout layout that lines up the child widgets
* are horizontally.
*
* Deleting the returned frame will cause the listitem or tab to be
@@ -294,9 +294,9 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @return The empty page or 0 if the face is not TreeList, IconList or
* Tabbed.
*/
- virtual QHBox *addHBoxPage( const QString &itemName,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQHBox *addHBoxPage( const TQString &itemName,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addHBoxPage just above, with the difference that the first
@@ -310,23 +310,23 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* Deleting the returned frame will cause the listitem or tab to be
* removed (you can re-add a page with the same name later.
**/
- virtual QHBox *addHBoxPage( const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQHBox *addHBoxPage( const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* Add a new page when the class is used in either TreeList or Tabbed
* mode. The returned widget is empty and you must add your widgets
* as children to this widget. The returned widget is a QGrid
- * so it contains a QGridLayout layout that places up the child widgets
+ * so it contains a TQGridLayout layout that places up the child widgets
* in a grid.
*
* Deleting the returned frame will cause the listitem or tab to be
* removed (you can re-add a page with the same name later.
*
- * @param n Specifies the number of columns if 'dir' is QGrid::Horizontal
- * or the number of rows if 'dir' is QGrid::Vertical.
- * @param dir Can be QGrid::Horizontal or QGrid::Vertical.
+ * @param n Specifies the number of columns if 'dir' is TQGrid::Horizontal
+ * or the number of rows if 'dir' is TQGrid::Vertical.
+ * @param dir Can be TQGrid::Horizontal or TQGrid::Vertical.
* @param itemName String used in the list or Tab item.
* @param header A longer string used in TreeList and IconList mode to
* describe the contents of a page. If empty, the item string
@@ -337,10 +337,10 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @return The empty page or 0 if the face is not TreeList, IconList or
* Tabbed.
*/
- virtual QGrid *addGridPage( int n, Orientation dir,
- const QString &itemName,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQGrid *addGridPage( int n, Orientation dir,
+ const TQString &itemName,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* This is like addGridPage just above, with the difference that the first
@@ -354,10 +354,10 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* Deleting the returned frame will cause the listitem or tab to be
* removed (you can re-add a page with the same name later.
**/
- virtual QGrid *addGridPage( int n, Orientation dir,
- const QStringList &items,
- const QString &header=QString::null,
- const QPixmap &pixmap=QPixmap() );
+ virtual TQGrid *addGridPage( int n, Orientation dir,
+ const TQStringList &items,
+ const TQString &header=TQString::null,
+ const TQPixmap &pixmap=TQPixmap() );
/**
* @short Removes a page created with addPage, addVBoxPage,
@@ -368,7 +368,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @param page The widget returned by addPage , addVBoxPage ,
* addHBoxPage or addGridPage .
*/
- void removePage( QWidget *page );
+ void removePage( TQWidget *page );
/**
@@ -387,7 +387,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @return The index or -1 if the face is not Tabbed, TreeList or
* IconList
*/
- virtual int pageIndex( QWidget *widget ) const;
+ virtual int pageIndex( TQWidget *widget ) const;
/**
* Defines the widget to be swallowed.
@@ -398,7 +398,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @param widget The widget to be swallowed. If 0, then an empty rectangle
* is displayed.
*/
- virtual bool setSwallowedWidget( QWidget *widget );
+ virtual bool setSwallowedWidget( TQWidget *widget );
/**
* This function has only effect in TreeList mode.
@@ -430,7 +430,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* This function has only effect in TreeList mode.
*
* This tells the widgets whether the root should be decorated.
- * For details see QListView::setRootIsDecorated
+ * For details see TQListView::setRootIsDecorated
*
* @param state Root will be decorated if true.
**/
@@ -459,7 +459,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* KJanusWidget, too. To be on the save side just don't keep
* the pointer to this widget.
*/
- /*virtual*/ void addWidgetBelowList( QWidget * widget ); // ### KDE4
+ /*virtual*/ void addWidgetBelowList( TQWidget * widget ); // ### KDE4
/**
* Add a button at the bottom of the TreeList/IconList.
@@ -471,7 +471,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
*
* @since 3.2
*/
- /*virtual*/ void addButtonBelowList( const QString & text, QObject * recv,
+ /*virtual*/ void addButtonBelowList( const TQString & text, TQObject * recv,
const char * slot ); //### KDE4
/**
@@ -485,7 +485,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
*
* @since 3.2
*/
- /*virtual*/ void addButtonBelowList( const KGuiItem & guiitem, QObject *
+ /*virtual*/ void addButtonBelowList( const KGuiItem & guiitem, TQObject *
recv, const char * slot ); //### KDE4
/**
@@ -507,14 +507,14 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @param path The path for which this icon should be shown.
* @param pixmap The icon used.
**/
- virtual void setFolderIcon(const QStringList &path, const QPixmap &pixmap);
+ virtual void setFolderIcon(const TQStringList &path, const TQPixmap &pixmap);
/**
* Returns the title string associated with a page index in TreeList or IconList mode.
* @param index The index of the page or null if there is no such page.
* @see pageIndex()
* @since 3.2
*/
- /*virtual*/ QString pageTitle(int index) const;
+ /*virtual*/ TQString pageTitle(int index) const;
/**
* Returns the page widget associated with a page index or null if there is
* no such page.
@@ -522,7 +522,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @see pageIndex()
* @since 3.2
*/
- /*virtual*/ QWidget *pageWidget(int index) const;
+ /*virtual*/ TQWidget *pageWidget(int index) const;
signals:
/**
@@ -530,7 +530,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @param page the new page.
* @since 3.4
*/
- void aboutToShowPage(QWidget *page);
+ void aboutToShowPage(TQWidget *page);
public slots:
/**
@@ -543,7 +543,7 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* Reimplemented to handle the splitter width when the the face
* is TreeList
*/
- virtual void showEvent( QShowEvent * );
+ virtual void showEvent( TQShowEvent * );
/**
* This function is used internally when in IconList mode. If you
@@ -553,46 +553,46 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
* @param o Object that has received an event.
* @param e The event.
*/
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
private slots:
bool slotShowPage();
void slotFontChanged();
- void slotItemClicked(QListViewItem *it);
- void pageGone(QObject *obj); // signal from the added page's "destroyed" signal
- void slotReopen(QListViewItem *item);
+ void slotItemClicked(TQListViewItem *it);
+ void pageGone(TQObject *obj); // signal from the added page's "destroyed" signal
+ void slotReopen(TQListViewItem *item);
protected:
- bool showPage( QWidget *w );
- void addPageWidget( QFrame *page, const QStringList &items,
- const QString &header, const QPixmap &pixmap );
- void InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, QFrame *page);
- QWidget *FindParent();
+ bool showPage( TQWidget *w );
+ void addPageWidget( TQFrame *page, const TQStringList &items,
+ const TQString &header, const TQPixmap &pixmap );
+ void InsertTreeListItem(const TQStringList &items, const TQPixmap &pixmap, TQFrame *page);
+ TQWidget *FindParent();
private:
bool mValid;
// Obsolete members. Remove in KDE 4.
- QPtrList<QWidget> *mPageList;
- QStringList *mTitleList;
+ TQPtrList<TQWidget> *mPageList;
+ TQStringList *mTitleList;
int mFace;
KListView *mTreeList;
IconListBox *mIconList;
- QWidgetStack *mPageStack;
- QLabel *mTitleLabel;
- QTabWidget *mTabControl;
- QFrame *mPlainPage;
- QWidget *mSwallowPage;
- QWidget *mActivePageWidget;
+ TQWidgetStack *mPageStack;
+ TQLabel *mTitleLabel;
+ TQTabWidget *mTabControl;
+ TQFrame *mPlainPage;
+ TQWidget *mSwallowPage;
+ TQWidget *mActivePageWidget;
KSeparator *mTitleSep;
- QSplitter::ResizeMode mTreeListResizeMode;
+ TQSplitter::ResizeMode mTreeListResizeMode;
bool mShowIconsInTreeList;
- QMap<QListViewItem *, QWidget *> mTreeListToPageStack;
- QMap<QListBoxItem *, QWidget *> mIconListToPageStack;
- QMap<QString, QPixmap> mFolderIconMap;
- QMap<QString, QStringList> mChildrenNames;
- QMap<QString, QWidget *> mChildPages;
+ TQMap<TQListViewItem *, TQWidget *> mTreeListToPageStack;
+ TQMap<TQListBoxItem *, TQWidget *> mIconListToPageStack;
+ TQMap<TQString, TQPixmap> mFolderIconMap;
+ TQMap<TQString, TQStringList> mChildrenNames;
+ TQMap<TQString, TQWidget *> mChildPages;
public:
class IconListItem;
diff --git a/kdeui/kkeybutton.cpp b/kdeui/kkeybutton.cpp
index 0472ab495..581d7bf40 100644
--- a/kdeui/kkeybutton.cpp
+++ b/kdeui/kkeybutton.cpp
@@ -21,9 +21,9 @@
#include "kkeybutton.h"
#include "kshortcutdialog.h"
-#include <qcursor.h>
-#include <qdrawutil.h>
-#include <qpainter.h>
+#include <tqcursor.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kglobalaccel.h>
@@ -65,13 +65,13 @@ class KKeyButtonPrivate
/* */
/***********************************************************************/
-KKeyButton::KKeyButton(QWidget *parent, const char *name)
-: QPushButton( parent, name )
+KKeyButton::KKeyButton(TQWidget *parent, const char *name)
+: TQPushButton( parent, name )
{
d = new KKeyButtonPrivate;
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
m_bEditing = false;
- connect( this, SIGNAL(clicked()), this, SLOT(captureShortcut()) );
+ connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(captureShortcut()) );
setShortcut( KShortcut(), true );
}
@@ -84,8 +84,8 @@ void KKeyButton::setShortcut( const KShortcut& cut, bool bQtShortcut )
{
d->bQtShortcut = bQtShortcut;
m_cut = cut;
- QString keyStr = m_cut.toString();
- keyStr.replace('&', QString::fromLatin1("&&"));
+ TQString keyStr = m_cut.toString();
+ keyStr.replace('&', TQString::fromLatin1("&&"));
setText( keyStr.isEmpty() ? i18n("None") : keyStr );
}
@@ -95,9 +95,9 @@ void KKeyButton::setShortcut( const KShortcut& cut )
setShortcut( cut, false );
}
-void KKeyButton::setText( const QString& text )
+void KKeyButton::setText( const TQString& text )
{
- QPushButton::setText( text );
+ TQPushButton::setText( text );
setFixedSize( sizeHint().width()+12, sizeHint().height()+8 );
}
@@ -120,15 +120,15 @@ void KKeyButton::captureShortcut()
repaint();
}
-void KKeyButton::drawButton( QPainter *painter )
+void KKeyButton::drawButton( TQPainter *painter )
{
- QPointArray a( 4 );
+ TQPointArray a( 4 );
a.setPoint( 0, 0, 0) ;
a.setPoint( 1, width(), 0 );
a.setPoint( 2, 0, height() );
a.setPoint( 3, 0, 0 );
- QRegion r1( a );
+ TQRegion r1( a );
painter->setClipRegion( r1 );
painter->setBrush( backgroundColor().light() );
painter->drawRoundRect( 0, 0, width(), height(), 20, 20);
@@ -138,7 +138,7 @@ void KKeyButton::drawButton( QPainter *painter )
a.setPoint( 2, 0, height() );
a.setPoint( 3, width(), height() );
- QRegion r2( a );
+ TQRegion r2( a );
painter->setClipRegion( r2 );
painter->setBrush( backgroundColor().dark() );
painter->drawRoundRect( 0, 0, width(), height(), 20, 20 );
diff --git a/kdeui/kkeybutton.h b/kdeui/kkeybutton.h
index ebebfdb90..9e9b6265c 100644
--- a/kdeui/kkeybutton.h
+++ b/kdeui/kkeybutton.h
@@ -20,7 +20,7 @@
#ifndef _KKEYBUTTON_H_
#define _KKEYBUTTON_H_
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kshortcut.h>
/**
@@ -45,7 +45,7 @@ class KDEUI_EXPORT KKeyButton: public QPushButton
/**
* Constructs key button widget.
*/
- KKeyButton( QWidget *parent = 0, const char *name = 0 );
+ KKeyButton( TQWidget *parent = 0, const char *name = 0 );
/**
* Destructs the key button widget.
*/
@@ -61,7 +61,7 @@ class KDEUI_EXPORT KKeyButton: public QPushButton
/**
* Reimplemented for internal purposes.
*/
- void setText( const QString& text );
+ void setText( const TQString& text );
signals:
void capturedShortcut( const KShortcut& );
@@ -80,7 +80,7 @@ class KDEUI_EXPORT KKeyButton: public QPushButton
/**
* Reimplemented for internal reasons.
*/
- void drawButton( QPainter* _painter );
+ void drawButton( TQPainter* _painter );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kkeydialog.cpp b/kdeui/kkeydialog.cpp
index 5f831767a..13835b650 100644
--- a/kdeui/kkeydialog.cpp
+++ b/kdeui/kkeydialog.cpp
@@ -25,15 +25,15 @@
#include <string.h>
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qradiobutton.h>
-#include <qregexp.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqradiobutton.h>
+#include <tqregexp.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
#include <kaccel.h>
#include <kaction.h>
@@ -59,7 +59,7 @@
#define XK_MISCELLANY
#include <X11/Xlib.h> // For x11Event()
#include <X11/keysymdef.h> // For XK_...
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#ifdef KeyPress
const int XFocusOut = FocusOut;
@@ -80,23 +80,23 @@ const int XKeyRelease = KeyRelease;
class KKeyChooserItem : public KListViewItem
{
public:
- KKeyChooserItem( KListView* parent, QListViewItem* after, KShortcutList* pList, uint iAction );
- KKeyChooserItem( QListViewItem* parent, QListViewItem* after, KShortcutList* pList, uint iAction );
+ KKeyChooserItem( KListView* parent, TQListViewItem* after, KShortcutList* pList, uint iAction );
+ KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, KShortcutList* pList, uint iAction );
- QString actionName() const;
+ TQString actionName() const;
const KShortcut& shortcut() const;
bool isConfigurable() const
{ return m_pList->isConfigurable( m_iAction ); }
const KShortcut& shortcutDefault() const
{ return m_pList->shortcutDefault( m_iAction ); }
- QString whatsThis() const
+ TQString whatsThis() const
{ return m_pList->whatsThis( m_iAction ); }
void setShortcut( const KShortcut& cut );
void commitChanges();
- virtual QString text( int iCol ) const;
- virtual int compare( QListViewItem*, int iCol, bool bAscending ) const;
+ virtual TQString text( int iCol ) const;
+ virtual int compare( TQListViewItem*, int iCol, bool bAscending ) const;
protected:
KShortcutList* m_pList;
@@ -109,14 +109,14 @@ class KKeyChooserItem : public KListViewItem
class KKeyChooserWhatsThis : public QWhatsThis
{
public:
- KKeyChooserWhatsThis( QListView* listview )
- : QWhatsThis( listview->viewport() ), m_listView( listview ) {}
+ KKeyChooserWhatsThis( TQListView* listview )
+ : TQWhatsThis( listview->viewport() ), m_listView( listview ) {}
protected:
- virtual QString text( const QPoint& p );
+ virtual TQString text( const TQPoint& p );
private:
- QListView* m_listView;
+ TQListView* m_listView;
};
//---------------------------------------------------------------------
@@ -126,16 +126,16 @@ private:
class KKeyChooserPrivate
{
public:
- QValueList<KShortcutList*> rgpLists;
- QValueList<KShortcutList*> rgpListsAllocated;
+ TQValueList<KShortcutList*> rgpLists;
+ TQValueList<KShortcutList*> rgpListsAllocated;
KListView *pList;
- QLabel *lInfo;
+ TQLabel *lInfo;
KKeyButton *pbtnShortcut;
- QGroupBox *fCArea;
- QButtonGroup *kbGroup;
+ TQGroupBox *fCArea;
+ TQButtonGroup *kbGroup;
- QMap<QString, KShortcut> mapGlobals;
+ TQMap<TQString, KShortcut> mapGlobals;
// If this is set, then shortcuts require a modifier:
// so 'A' would not be valid, whereas 'Ctrl+A' would be.
@@ -151,45 +151,45 @@ class KKeyChooserPrivate
// KKeyChooser
//---------------------------------------------------------------------
-KKeyChooser::KKeyChooser( QWidget* parent, ActionType type, bool bAllowLetterShortcuts )
-: QWidget( parent )
+KKeyChooser::KKeyChooser( TQWidget* parent, ActionType type, bool bAllowLetterShortcuts )
+: TQWidget( parent )
{
initGUI( type, bAllowLetterShortcuts );
}
-KKeyChooser::KKeyChooser( KActionCollection* coll, QWidget* parent, bool bAllowLetterShortcuts )
-: QWidget( parent )
+KKeyChooser::KKeyChooser( KActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts )
+: TQWidget( parent )
{
initGUI( Application, bAllowLetterShortcuts );
insert( coll );
}
-KKeyChooser::KKeyChooser( KAccel* pAccel, QWidget* parent, bool bAllowLetterShortcuts )
-: QWidget( parent )
+KKeyChooser::KKeyChooser( KAccel* pAccel, TQWidget* parent, bool bAllowLetterShortcuts )
+: TQWidget( parent )
{
initGUI( Application, bAllowLetterShortcuts );
insert( pAccel );
}
-KKeyChooser::KKeyChooser( KGlobalAccel* pAccel, QWidget* parent )
-: QWidget( parent )
+KKeyChooser::KKeyChooser( KGlobalAccel* pAccel, TQWidget* parent )
+: TQWidget( parent )
{
initGUI( ApplicationGlobal, false );
insert( pAccel );
}
-KKeyChooser::KKeyChooser( KShortcutList* pList, QWidget* parent, ActionType type, bool bAllowLetterShortcuts )
-: QWidget( parent )
+KKeyChooser::KKeyChooser( KShortcutList* pList, TQWidget* parent, ActionType type, bool bAllowLetterShortcuts )
+: TQWidget( parent )
{
initGUI( type, bAllowLetterShortcuts );
insert( pList );
}
-KKeyChooser::KKeyChooser( KAccel* actions, QWidget* parent,
+KKeyChooser::KKeyChooser( KAccel* actions, TQWidget* parent,
bool bCheckAgainstStdKeys,
bool bAllowLetterShortcuts,
bool bAllowWinKey )
-: QWidget( parent )
+: TQWidget( parent )
{
ActionType type;
if( bAllowWinKey )
@@ -201,11 +201,11 @@ KKeyChooser::KKeyChooser( KAccel* actions, QWidget* parent,
insert( actions );
}
-KKeyChooser::KKeyChooser( KGlobalAccel* actions, QWidget* parent,
+KKeyChooser::KKeyChooser( KGlobalAccel* actions, TQWidget* parent,
bool bCheckAgainstStdKeys,
bool bAllowLetterShortcuts,
bool /*bAllowWinKey*/ )
-: QWidget( parent )
+: TQWidget( parent )
{
ActionType type = (bCheckAgainstStdKeys) ? ApplicationGlobal : Global;
@@ -218,8 +218,8 @@ KKeyChooser::KKeyChooser( KGlobalAccel* actions, QWidget* parent,
// (just checking against kdeglobals isn't enough, the shortcuts
// might have changed in KKeyChooser and not being saved yet).
// Also used when reassigning a shortcut from one chooser to another.
-static QValueList< KKeyChooser* >* allChoosers = NULL;
-static KStaticDeleter< QValueList< KKeyChooser* > > allChoosersDeleter;
+static TQValueList< KKeyChooser* >* allChoosers = NULL;
+static KStaticDeleter< TQValueList< KKeyChooser* > > allChoosersDeleter;
KKeyChooser::~KKeyChooser()
{
@@ -232,12 +232,12 @@ KKeyChooser::~KKeyChooser()
bool KKeyChooser::insert( KActionCollection *pColl)
{
- return insert(pColl, QString::null);
+ return insert(pColl, TQString::null);
}
-bool KKeyChooser::insert( KActionCollection* pColl, const QString &title )
+bool KKeyChooser::insert( KActionCollection* pColl, const TQString &title )
{
- QString str = title;
+ TQString str = title;
if ( title.isEmpty() && pColl->instance()
&& pColl->instance()->aboutData() )
str = pColl->instance()->aboutData()->programName();
@@ -266,7 +266,7 @@ bool KKeyChooser::insert( KGlobalAccel* pAccel )
bool KKeyChooser::insert( KShortcutList* pList )
{
d->rgpLists.append( pList );
- buildListView( d->rgpLists.count() - 1, QString::null );
+ buildListView( d->rgpLists.count() - 1, TQString::null );
return true;
}
@@ -274,7 +274,7 @@ void KKeyChooser::commitChanges()
{
kdDebug(125) << "KKeyChooser::commitChanges()" << endl;
- QListViewItemIterator it( d->pList );
+ TQListViewItemIterator it( d->pList );
for( ; it.current(); ++it ) {
KKeyChooserItem* pItem = dynamic_cast<KKeyChooserItem*>(it.current());
if( pItem )
@@ -309,43 +309,43 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts )
// Items are added to topLayout as they are created.
//
- QBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
//
// ADD SEARCHLINE
//
- QHBoxLayout* searchLayout = new QHBoxLayout(0, 0, KDialog::spacingHint());
+ TQHBoxLayout* searchLayout = new TQHBoxLayout(0, 0, KDialog::spacingHint());
topLayout->addLayout(searchLayout, 10);
- QToolButton *clearSearch = new QToolButton(this);
+ TQToolButton *clearSearch = new TQToolButton(this);
clearSearch->setTextLabel(i18n("Clear Search"), true);
- clearSearch->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase"));
+ clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase"));
searchLayout->addWidget(clearSearch);
- QLabel* slbl = new QLabel(i18n("&Search:"), this);
+ TQLabel* slbl = new TQLabel(i18n("&Search:"), this);
searchLayout->addWidget(slbl);
KListViewSearchLine* listViewSearch = new KListViewSearchLine(this);
searchLayout->addWidget(listViewSearch);
slbl->setBuddy(listViewSearch);
- connect(clearSearch, SIGNAL(pressed()), listViewSearch, SLOT(clear()));
+ connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear()));
- QString wtstr = i18n("Search interactively for shortcut names (e.g. Copy) "
+ TQString wtstr = i18n("Search interactively for shortcut names (e.g. Copy) "
"or combination of keys (e.g. Ctrl+C) by typing them here.");
- QWhatsThis::add(slbl, wtstr);
- QWhatsThis::add(listViewSearch, wtstr);
+ TQWhatsThis::add(slbl, wtstr);
+ TQWhatsThis::add(listViewSearch, wtstr);
//
// CREATE SPLIT LIST BOX
//
// fill up the split list box with the action/key pairs.
//
- QGridLayout *stackLayout = new QGridLayout(2, 2, 2);
+ TQGridLayout *stackLayout = new TQGridLayout(2, 2, 2);
topLayout->addLayout( stackLayout, 10 );
stackLayout->setRowStretch( 1, 10 ); // Only list will stretch
d->pList = new KListView( this );
listViewSearch->setListView(d->pList); // Plug into search line
- QValueList<int> columns;
+ TQValueList<int> columns;
columns.append(0);
listViewSearch->setSearchColumns(columns);
@@ -356,7 +356,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts )
"shown in the left column and keys or combination "
"of keys (e.g. Ctrl+V) shown in the right column.");
- QWhatsThis::add( d->pList, wtstr );
+ TQWhatsThis::add( d->pList, wtstr );
new KKeyChooserWhatsThis( d->pList );
d->pList->setAllColumnsShowFocus( true );
@@ -364,71 +364,71 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts )
d->pList->addColumn(i18n("Shortcut"));
d->pList->addColumn(i18n("Alternate"));
- connect( d->pList, SIGNAL(currentChanged(QListViewItem*)),
- SLOT(slotListItemSelected(QListViewItem*)) );
+ connect( d->pList, TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ TQT_SLOT(slotListItemSelected(TQListViewItem*)) );
// handle double clicking an item
- connect ( d->pList, SIGNAL ( doubleClicked ( QListViewItem *, const QPoint &, int ) ),
- SLOT ( captureCurrentItem()) );
- connect ( d->pList, SIGNAL ( spacePressed( QListViewItem* )), SLOT( captureCurrentItem()));
+ connect ( d->pList, TQT_SIGNAL ( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ),
+ TQT_SLOT ( captureCurrentItem()) );
+ connect ( d->pList, TQT_SIGNAL ( spacePressed( TQListViewItem* )), TQT_SLOT( captureCurrentItem()));
//
// CREATE CHOOSE KEY GROUP
//
- d->fCArea = new QGroupBox( this );
+ d->fCArea = new TQGroupBox( this );
topLayout->addWidget( d->fCArea, 1 );
d->fCArea->setTitle( i18n("Shortcut for Selected Action") );
- d->fCArea->setFrameStyle( QFrame::GroupBoxPanel | QFrame::Plain );
+ d->fCArea->setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Plain );
//
// CHOOSE KEY GROUP LAYOUT MANAGER
//
- QGridLayout *grid = new QGridLayout( d->fCArea, 3, 4, KDialog::spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( d->fCArea, 3, 4, KDialog::spacingHint() );
grid->addRowSpacing( 0, fontMetrics().lineSpacing() );
- d->kbGroup = new QButtonGroup( d->fCArea );
+ d->kbGroup = new TQButtonGroup( d->fCArea );
d->kbGroup->hide();
d->kbGroup->setExclusive( true );
- m_prbNone = new QRadioButton( i18n("no key", "&None"), d->fCArea );
+ m_prbNone = new TQRadioButton( i18n("no key", "&None"), d->fCArea );
d->kbGroup->insert( m_prbNone, NoKey );
m_prbNone->setEnabled( false );
//grid->addMultiCellWidget( rb, 1, 1, 1, 2 );
grid->addWidget( m_prbNone, 1, 0 );
- QWhatsThis::add( m_prbNone, i18n("The selected action will not be associated with any key.") );
- connect( m_prbNone, SIGNAL(clicked()), SLOT(slotNoKey()) );
+ TQWhatsThis::add( m_prbNone, i18n("The selected action will not be associated with any key.") );
+ connect( m_prbNone, TQT_SIGNAL(clicked()), TQT_SLOT(slotNoKey()) );
- m_prbDef = new QRadioButton( i18n("default key", "De&fault"), d->fCArea );
+ m_prbDef = new TQRadioButton( i18n("default key", "De&fault"), d->fCArea );
d->kbGroup->insert( m_prbDef, DefaultKey );
m_prbDef->setEnabled( false );
//grid->addMultiCellWidget( rb, 2, 2, 1, 2 );
grid->addWidget( m_prbDef, 1, 1 );
- QWhatsThis::add( m_prbDef, i18n("This will bind the default key to the selected action. Usually a reasonable choice.") );
- connect( m_prbDef, SIGNAL(clicked()), SLOT(slotDefaultKey()) );
+ TQWhatsThis::add( m_prbDef, i18n("This will bind the default key to the selected action. Usually a reasonable choice.") );
+ connect( m_prbDef, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefaultKey()) );
- m_prbCustom = new QRadioButton( i18n("C&ustom"), d->fCArea );
+ m_prbCustom = new TQRadioButton( i18n("C&ustom"), d->fCArea );
d->kbGroup->insert( m_prbCustom, CustomKey );
m_prbCustom->setEnabled( false );
//grid->addMultiCellWidget( rb, 3, 3, 1, 2 );
grid->addWidget( m_prbCustom, 1, 2 );
- QWhatsThis::add( m_prbCustom, i18n("If this option is selected you can create a customized key binding for the"
+ TQWhatsThis::add( m_prbCustom, i18n("If this option is selected you can create a customized key binding for the"
" selected action using the buttons below.") );
- connect( m_prbCustom, SIGNAL(clicked()), SLOT(slotCustomKey()) );
+ connect( m_prbCustom, TQT_SIGNAL(clicked()), TQT_SLOT(slotCustomKey()) );
- //connect( d->kbGroup, SIGNAL( clicked( int ) ), SLOT( keyMode( int ) ) );
+ //connect( d->kbGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( keyMode( int ) ) );
- QBoxLayout *pushLayout = new QHBoxLayout( KDialog::spacingHint() );
+ TQBoxLayout *pushLayout = new TQHBoxLayout( KDialog::spacingHint() );
grid->addLayout( pushLayout, 1, 3 );
d->pbtnShortcut = new KKeyButton(d->fCArea, "key");
d->pbtnShortcut->setEnabled( false );
- connect( d->pbtnShortcut, SIGNAL(capturedShortcut(const KShortcut&)), SLOT(capturedShortcut(const KShortcut&)) );
+ connect( d->pbtnShortcut, TQT_SIGNAL(capturedShortcut(const KShortcut&)), TQT_SLOT(capturedShortcut(const KShortcut&)) );
grid->addRowSpacing( 1, d->pbtnShortcut->sizeHint().height() + 5 );
wtstr = i18n("Use this button to choose a new shortcut key. Once you click it, "
"you can press the key-combination which you would like to be assigned "
"to the currently selected action.");
- QWhatsThis::add( d->pbtnShortcut, wtstr );
+ TQWhatsThis::add( d->pbtnShortcut, wtstr );
//
// Add widgets to the geometry manager
@@ -437,28 +437,28 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts )
pushLayout->addWidget( d->pbtnShortcut );
pushLayout->addStretch( 10 );
- d->lInfo = new QLabel(d->fCArea);
+ d->lInfo = new TQLabel(d->fCArea);
//resize(0,0);
//d->lInfo->setAlignment( AlignCenter );
//d->lInfo->setEnabled( false );
//d->lInfo->hide();
grid->addMultiCellWidget( d->lInfo, 2, 2, 0, 3 );
- //d->globalDict = new QDict<int> ( 100, false );
+ //d->globalDict = new TQDict<int> ( 100, false );
//d->globalDict->setAutoDelete( true );
readGlobalKeys();
- //d->stdDict = new QDict<int> ( 100, false );
+ //d->stdDict = new TQDict<int> ( 100, false );
//d->stdDict->setAutoDelete( true );
//if (type == Application || type == ApplicationGlobal)
// readStdKeys();
- connect( kapp, SIGNAL( settingsChanged( int )), SLOT( slotSettingsChanged( int )));
+ connect( kapp, TQT_SIGNAL( settingsChanged( int )), TQT_SLOT( slotSettingsChanged( int )));
if( allChoosers == NULL )
- allChoosers = allChoosersDeleter.setObject( allChoosers, new QValueList< KKeyChooser* > );
+ allChoosers = allChoosersDeleter.setObject( allChoosers, new TQValueList< KKeyChooser* > );
allChoosers->append( this );
}
// Add all shortcuts to the list
-void KKeyChooser::buildListView( uint iList, const QString &title )
+void KKeyChooser::buildListView( uint iList, const TQString &title )
{
KShortcutList* pList = d->rgpLists[iList];
KActionShortcutList *pAList = dynamic_cast<KActionShortcutList*>(pList);
@@ -467,14 +467,14 @@ void KKeyChooser::buildListView( uint iList, const QString &title )
d->pList->setSorting( -1 );
KListViewItem *pProgramItem, *pGroupItem = 0, *pParentItem, *pItem;
- QString str = (title.isEmpty() ? i18n("Shortcuts") : title);
+ TQString str = (title.isEmpty() ? i18n("Shortcuts") : title);
pParentItem = pProgramItem = pItem = new KListViewItem( d->pList, str );
pParentItem->setExpandable( true );
pParentItem->setOpen( true );
pParentItem->setSelectable( false );
uint nSize = pList->count();
for( uint iAction = 0; iAction < nSize; iAction++ ) {
- QString sName = pList->name(iAction);
+ TQString sName = pList->name(iAction);
kdDebug(125) << "Key: " << sName << endl;
if( sName.startsWith( "Program:" ) ) {
pItem = new KListViewItem( d->pList, pProgramItem, pList->label(iAction) );
@@ -495,7 +495,7 @@ void KKeyChooser::buildListView( uint iList, const QString &title )
} else if( !sName.isEmpty() && sName != "unnamed" && pList->isConfigurable(iAction) ) {
pItem = new KKeyChooserItem( pParentItem, pItem, pList, iAction );
if(pAList)
- pItem->setPixmap(0,pAList->action(iAction)->iconSet().pixmap(QIconSet::Small,QIconSet::Normal));
+ pItem->setPixmap(0,pAList->action(iAction)->iconSet().pixmap(TQIconSet::Small,TQIconSet::Normal));
}
}
if( !pProgramItem->firstChild() )
@@ -527,13 +527,13 @@ void KKeyChooser::updateButtons()
const KShortcut& cutDef = pItem->shortcutDefault();
// Set key strings
- QString keyStrCfg = pItem->shortcut().toString();
- QString keyStrDef = cutDef.toString();
+ TQString keyStrCfg = pItem->shortcut().toString();
+ TQString keyStrDef = cutDef.toString();
d->pbtnShortcut->setShortcut( pItem->shortcut(), bQtShortcut );
//item->setText( 1, keyStrCfg );
pItem->repaint();
- d->lInfo->setText( i18n("Default key:") + QString(" %1").arg(keyStrDef.isEmpty() ? i18n("None") : keyStrDef) );
+ d->lInfo->setText( i18n("Default key:") + TQString(" %1").arg(keyStrDef.isEmpty() ? i18n("None") : keyStrDef) );
// Select the appropriate radio button.
int index = (pItem->shortcut().isNull()) ? NoKey
@@ -585,10 +585,10 @@ void KKeyChooser::readGlobalKeys()
readGlobalKeys( d->mapGlobals );
}
-void KKeyChooser::readGlobalKeys( QMap< QString, KShortcut >& map )
+void KKeyChooser::readGlobalKeys( TQMap< TQString, KShortcut >& map )
{
- QMap<QString, QString> mapEntry = KGlobal::config()->entryMap( "Global Shortcuts" );
- QMap<QString, QString>::Iterator it( mapEntry.begin() );
+ TQMap<TQString, TQString> mapEntry = KGlobal::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);
}
@@ -599,7 +599,7 @@ void KKeyChooser::slotSettingsChanged( int category )
readGlobalKeys(); // reread
}
-void KKeyChooser::fontChange( const QFont & )
+void KKeyChooser::fontChange( const TQFont & )
{
d->fCArea->setMinimumHeight( 4*d->pbtnShortcut->sizeHint().height() );
@@ -616,7 +616,7 @@ void KKeyChooser::allDefault()
{
kdDebug(125) << "KKeyChooser::allDefault()" << endl;
- QListViewItemIterator it( d->pList );
+ TQListViewItemIterator it( d->pList );
for( ; it.current(); ++it ) {
KKeyChooserItem* pItem = dynamic_cast<KKeyChooserItem*>(it.current());
if( pItem )
@@ -627,12 +627,12 @@ void KKeyChooser::allDefault()
emit keyChange();
}
-void KKeyChooser::slotListItemSelected( QListViewItem* )
+void KKeyChooser::slotListItemSelected( TQListViewItem* )
{
updateButtons();
}
-void KKeyChooser::slotListItemDoubleClicked ( QListViewItem *, const QPoint & , int )
+void KKeyChooser::slotListItemDoubleClicked ( TQListViewItem *, const TQPoint & , int )
{ // KDE4 dump this
captureCurrentItem();
}
@@ -675,21 +675,21 @@ void KKeyChooser::listSync()
}*/
}
-void KKeyChooser::syncToConfig( const QString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset )
+void KKeyChooser::syncToConfig( const TQString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset )
{
kdDebug(125) << "KKeyChooser::syncToConfig( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl;
if( !pConfig )
pConfig = KGlobal::config();
KConfigGroupSaver cgs( pConfig, sConfigGroup );
- QListViewItemIterator it( d->pList );
+ TQListViewItemIterator it( d->pList );
for( ; it.current(); ++it ) {
KKeyChooserItem* pItem = dynamic_cast<KKeyChooserItem*>(it.current());
if( pItem ) {
- QString sEntry = pConfig->readEntry( pItem->actionName() );
+ TQString sEntry = pConfig->readEntry( pItem->actionName() );
if( !sEntry.isNull() || bClearUnset ) {
if( sEntry == "none" )
- sEntry = QString::null;
+ sEntry = TQString::null;
pItem->setShortcut( sEntry );
}
kdDebug(125) << pItem->actionName() << " = " << pItem->shortcut().toStringInternal() << endl;
@@ -711,10 +711,10 @@ void KKeyChooser::setShortcut( const KShortcut& cut )
const KKey& key = seq.key(0);
if( !d->bAllowLetterShortcuts && key.modFlags() == 0
- && key.sym() < 0x3000 && QChar(key.sym()).isLetterOrNumber() ) {
- QString s = i18n( "In order to use the '%1' key as a shortcut, "
+ && key.sym() < 0x3000 && TQChar(key.sym()).isLetterOrNumber() ) {
+ TQString s = i18n( "In order to use the '%1' key as a shortcut, "
"it must be combined with the "
- "Win, Alt, Ctrl, and/or Shift keys." ).arg(QChar(key.sym()));
+ "Win, Alt, Ctrl, and/or Shift keys." ).arg(TQChar(key.sym()));
KMessageBox::sorry( this, s, i18n("Invalid Shortcut Key") );
return;
}
@@ -760,7 +760,7 @@ bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser )
bool has_global_chooser = false;
bool has_standard_chooser = false;
- for( QValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
+ for( TQValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
it != allChoosers->end();
++it ) {
has_global_chooser |= ((*it)->m_type == Global);
@@ -778,7 +778,7 @@ bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser )
// only check the global keys if one of the keychoosers isn't global
if( !has_global_chooser ) {
if( checkGlobalShortcutsConflict( cut, bWarnUser, this, d->mapGlobals,
- m_type == Global ? pItem->actionName() : QString::null ))
+ m_type == Global ? pItem->actionName() : TQString::null ))
return true;
}
@@ -786,7 +786,7 @@ bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser )
return true;
// check also other KKeyChooser's
- for( QValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
+ for( TQValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
it != allChoosers->end();
++it ) {
if( (*it) != this && (*it)->isKeyPresentLocally( cut, NULL, bWarnUser ))
@@ -796,7 +796,7 @@ bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser )
}
// KDE4 remove
-bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, const QString& warnText )
+bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText )
{
return isKeyPresentLocally( cut, ignoreItem, !warnText.isNull());
}
@@ -807,7 +807,7 @@ bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ig
return false;
// Search for shortcut conflicts with other actions in the
// lists we're configuring.
- for( QListViewItemIterator it( d->pList ); it.current(); ++it ) {
+ for( TQListViewItemIterator it( d->pList ); it.current(); ++it ) {
KKeyChooserItem* pItem2 = dynamic_cast<KKeyChooserItem*>(it.current());
if( pItem2 && pItem2 != ignoreItem ) {
int iSeq = keyConflict( cut, pItem2->shortcut() );
@@ -828,7 +828,7 @@ bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ig
return false;
}
-bool KKeyChooser::checkStandardShortcutsConflict( const KShortcut& cut, bool bWarnUser, QWidget* parent )
+bool KKeyChooser::checkStandardShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent )
{
// For each key sequence in the shortcut,
for( uint i = 0; i < cut.count(); i++ ) {
@@ -846,17 +846,17 @@ bool KKeyChooser::checkStandardShortcutsConflict( const KShortcut& cut, bool bWa
return false;
}
-bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, QWidget* parent )
+bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent )
{
- QMap< QString, KShortcut > map;
+ TQMap< TQString, KShortcut > map;
readGlobalKeys( map );
- return checkGlobalShortcutsConflict( cut, bWarnUser, parent, map, QString::null );
+ return checkGlobalShortcutsConflict( cut, bWarnUser, parent, map, TQString::null );
}
-bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, QWidget* parent,
- const QMap< QString, KShortcut >& map, const QString& ignoreAction )
+bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent,
+ const TQMap< TQString, KShortcut >& map, const TQString& ignoreAction )
{
- QMap<QString, KShortcut>::ConstIterator it;
+ TQMap<TQString, KShortcut>::ConstIterator it;
for( it = map.begin(); it != map.end(); ++it ) {
int iSeq = keyConflict( cut, (*it) );
if( iSeq > -1 ) {
@@ -872,11 +872,11 @@ bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarn
return false;
}
-void KKeyChooser::removeStandardShortcut( const QString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut )
+void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut )
{
bool was_in_choosers = false;
if( allChoosers != NULL ) {
- for( QValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
+ for( TQValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
it != allChoosers->end();
++it ) {
if( (*it) != chooser && (*it)->m_type == Standard ) {
@@ -896,11 +896,11 @@ void KKeyChooser::removeStandardShortcut( const QString& name, KKeyChooser* choo
}
}
-void KKeyChooser::removeGlobalShortcut( const QString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut )
+void KKeyChooser::removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut )
{
bool was_in_choosers = false;
if( allChoosers != NULL ) {
- for( QValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
+ for( TQValueList< KKeyChooser* >::ConstIterator it = allChoosers->begin();
it != allChoosers->end();
++it ) {
if( (*it) != chooser && (*it)->m_type == Global ) {
@@ -917,9 +917,9 @@ void KKeyChooser::removeGlobalShortcut( const QString& name, KKeyChooser* choose
}
}
-bool KKeyChooser::removeShortcut( const QString& name, const KShortcut &cut )
+bool KKeyChooser::removeShortcut( const TQString& name, const KShortcut &cut )
{
- for( QListViewItemIterator it( d->pList ); it.current(); ++it ) {
+ 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
@@ -935,11 +935,11 @@ bool KKeyChooser::removeShortcut( const QString& name, const KShortcut &cut )
}
// KDE4 remove this
-void KKeyChooser::_warning( const KKeySequence& cut, QString sAction, QString sTitle )
+void KKeyChooser::_warning( const KKeySequence& cut, TQString sAction, TQString sTitle )
{
sAction = sAction.stripWhiteSpace();
- QString s =
+ TQString s =
i18n("The '%1' key combination has already been allocated "
"to the \"%2\" action.\n"
"Please choose a unique key combination.").
@@ -948,12 +948,12 @@ void KKeyChooser::_warning( const KKeySequence& cut, QString sAction, QString sT
KMessageBox::sorry( this, s, sTitle );
}
-bool KKeyChooser::promptForReassign( const KKeySequence& cut, const QString& sAction, ActionType type, QWidget* parent )
+bool KKeyChooser::promptForReassign( const KKeySequence& cut, const TQString& sAction, ActionType type, TQWidget* parent )
{
if(cut.isNull())
return true;
- QString sTitle;
- QString s;
+ TQString sTitle;
+ TQString s;
if( type == Standard ) {
sTitle = i18n("Conflict with Standard Application Shortcut");
s = i18n("The '%1' key combination has already been allocated "
@@ -978,7 +978,7 @@ bool KKeyChooser::promptForReassign( const KKeySequence& cut, const QString& sAc
}
//---------------------------------------------------
-KKeyChooserItem::KKeyChooserItem( KListView* parent, QListViewItem* after, KShortcutList* pList, uint iAction )
+KKeyChooserItem::KKeyChooserItem( KListView* parent, TQListViewItem* after, KShortcutList* pList, uint iAction )
: KListViewItem( parent, after )
{
m_pList = pList;
@@ -987,7 +987,7 @@ KKeyChooserItem::KKeyChooserItem( KListView* parent, QListViewItem* after, KShor
m_cut = m_pList->shortcut(m_iAction);
}
-KKeyChooserItem::KKeyChooserItem( QListViewItem* parent, QListViewItem* after, KShortcutList* pList, uint iAction )
+KKeyChooserItem::KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, KShortcutList* pList, uint iAction )
: KListViewItem( parent, after )
{
m_pList = pList;
@@ -996,7 +996,7 @@ KKeyChooserItem::KKeyChooserItem( QListViewItem* parent, QListViewItem* after, K
m_cut = m_pList->shortcut(m_iAction);
}
-QString KKeyChooserItem::actionName() const
+TQString KKeyChooserItem::actionName() const
{
return m_pList->name(m_iAction);
}
@@ -1019,12 +1019,12 @@ void KKeyChooserItem::commitChanges()
m_pList->setShortcut( m_iAction, m_cut );
}
-QString KKeyChooserItem::text( int iCol ) const
+TQString KKeyChooserItem::text( int iCol ) const
{
if( iCol == 0 ) {
// Quick HACK to get rid of '&'s.
- QString s = m_pList->label(m_iAction);
- QString s2;
+ TQString s = m_pList->label(m_iAction);
+ TQString s2;
for( uint i = 0; i < s.length(); i++ )
if( s[i] != '&' || ( i+1<s.length() && s[i+1] == '&' ) )
s2 += s[i];
@@ -1033,17 +1033,17 @@ QString KKeyChooserItem::text( int iCol ) const
else if( iCol <= (int) m_cut.count() )
return m_cut.seq(iCol-1).toString();
else
- return QString::null;
+ return TQString::null;
}
-int KKeyChooserItem::compare( QListViewItem* item, int iCol, bool bAscending ) const
+int KKeyChooserItem::compare( TQListViewItem* item, int iCol, bool bAscending ) const
{
KKeyChooserItem* pItem = dynamic_cast<KKeyChooserItem*>( item );
if( iCol == 0 && pItem ) {
- QString psName1 = m_pList->name(m_iAction);
- QString psName2 = pItem->m_pList->name(pItem->m_iAction);
- QRegExp rxNumber1( " (\\d+)$" );
- QRegExp rxNumber2( " (\\d+)$" );
+ TQString psName1 = m_pList->name(m_iAction);
+ TQString psName2 = pItem->m_pList->name(pItem->m_iAction);
+ TQRegExp rxNumber1( " (\\d+)$" );
+ TQRegExp rxNumber2( " (\\d+)$" );
int iNumber1 = rxNumber1.search( psName1 );
int iNumber2 = rxNumber2.search( psName2 );
@@ -1055,23 +1055,23 @@ int KKeyChooserItem::compare( QListViewItem* item, int iCol, bool bAscending ) c
}
}
- return QListViewItem::compare( item, iCol, bAscending );
+ return TQListViewItem::compare( item, iCol, bAscending );
}
////
-QString KKeyChooserWhatsThis::text( const QPoint& p ) {
+TQString KKeyChooserWhatsThis::text( const TQPoint& p ) {
if ( !m_listView )
- return QString::null;
+ return TQString::null;
- const QListViewItem* item = m_listView->itemAt( p );
+ const TQListViewItem* item = m_listView->itemAt( p );
const KKeyChooserItem* pItem = dynamic_cast<const KKeyChooserItem*>(item);
if ( !pItem )
- return QWhatsThis::textFor( m_listView );
+ return TQWhatsThis::textFor( m_listView );
- const QString itemWhatsThis = pItem->whatsThis();
+ const TQString itemWhatsThis = pItem->whatsThis();
if ( itemWhatsThis.isEmpty() )
- return QWhatsThis::textFor( m_listView );
+ return TQWhatsThis::textFor( m_listView );
return itemWhatsThis;
}
@@ -1087,27 +1087,27 @@ QString KKeyChooserWhatsThis::text( const QPoint& p ) {
/* (by using KDialogBase there is almost no code left ;) */
/* */
/************************************************************************/
-KKeyDialog::KKeyDialog( KKeyChooser::ActionType type, bool bAllowLetterShortcuts, QWidget *parent, const char* name )
+KKeyDialog::KKeyDialog( KKeyChooser::ActionType type, bool bAllowLetterShortcuts, TQWidget *parent, const char* name )
: KDialogBase( parent, name ? name : "kkeydialog", true, i18n("Configure Shortcuts"), Default|Ok|Cancel, Ok )
{
m_pKeyChooser = new KKeyChooser( this, type, bAllowLetterShortcuts );
setMainWidget( m_pKeyChooser );
- connect( this, SIGNAL(defaultClicked()), m_pKeyChooser, SLOT(allDefault()) );
+ connect( this, TQT_SIGNAL(defaultClicked()), m_pKeyChooser, TQT_SLOT(allDefault()) );
KConfigGroup group( KGlobal::config(), "KKeyDialog Settings" );
- QSize sz = size();
+ TQSize sz = size();
resize( group.readSizeEntry( "Dialog Size", &sz ) );
}
-KKeyDialog::KKeyDialog( bool bAllowLetterShortcuts, QWidget *parent, const char* name )
+KKeyDialog::KKeyDialog( bool bAllowLetterShortcuts, TQWidget *parent, const char* name )
: KDialogBase( parent, name ? name : "kkeydialog", true, i18n("Configure Shortcuts"), Default|Ok|Cancel, Ok )
{
m_pKeyChooser = new KKeyChooser( this, KKeyChooser::Application, bAllowLetterShortcuts );
setMainWidget( m_pKeyChooser );
- connect( this, SIGNAL(defaultClicked()), m_pKeyChooser, SLOT(allDefault()) );
+ connect( this, TQT_SIGNAL(defaultClicked()), m_pKeyChooser, TQT_SLOT(allDefault()) );
KConfigGroup group( KGlobal::config(), "KKeyDialog Settings" );
- QSize sz = size();
+ TQSize sz = size();
resize( group.readSizeEntry( "Dialog Size", &sz ) );
}
@@ -1122,7 +1122,7 @@ bool KKeyDialog::insert( KActionCollection* pColl )
return m_pKeyChooser->insert( pColl );
}
-bool KKeyDialog::insert(KActionCollection *pColl, const QString &title)
+bool KKeyDialog::insert(KActionCollection *pColl, const TQString &title)
{
return m_pKeyChooser->insert(pColl, title);
}
@@ -1144,22 +1144,22 @@ void KKeyDialog::commitChanges()
m_pKeyChooser->commitChanges();
}
-int KKeyDialog::configure( KActionCollection* coll, QWidget* parent, bool bSaveSettings )
+int KKeyDialog::configure( KActionCollection* coll, TQWidget* parent, bool bSaveSettings )
{
return configure( coll, true, parent, bSaveSettings);
}
-int KKeyDialog::configure( KAccel* keys, QWidget* parent, bool bSaveSettings )
+int KKeyDialog::configure( KAccel* keys, TQWidget* parent, bool bSaveSettings )
{
return configure( keys, true, parent, bSaveSettings);
}
-int KKeyDialog::configure( KGlobalAccel* keys, QWidget* parent, bool bSaveSettings )
+int KKeyDialog::configure( KGlobalAccel* keys, TQWidget* parent, bool bSaveSettings )
{
return configure( keys, true, parent, bSaveSettings);
}
-int KKeyDialog::configure( KAccel* keys, bool bAllowLetterShortcuts, QWidget *parent, bool bSaveSettings )
+int KKeyDialog::configure( KAccel* keys, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings )
{
KKeyDialog dlg( bAllowLetterShortcuts, parent );
dlg.m_pKeyChooser->insert( keys );
@@ -1169,7 +1169,7 @@ int KKeyDialog::configure( KAccel* keys, bool bAllowLetterShortcuts, QWidget *pa
return b;
}
-int KKeyDialog::configure( KGlobalAccel* keys, bool bAllowLetterShortcuts, QWidget *parent, bool bSaveSettings )
+int KKeyDialog::configure( KGlobalAccel* keys, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings )
{
KKeyDialog dlg( KKeyChooser::ApplicationGlobal, bAllowLetterShortcuts, parent );
dlg.m_pKeyChooser->insert( keys );
@@ -1179,7 +1179,7 @@ int KKeyDialog::configure( KGlobalAccel* keys, bool bAllowLetterShortcuts, QWidg
return b;
}
-int KKeyDialog::configure( KActionCollection* coll, bool bAllowLetterShortcuts, QWidget *parent, bool bSaveSettings )
+int KKeyDialog::configure( KActionCollection* coll, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings )
{
kdDebug(125) << "KKeyDialog::configureKeys( KActionCollection*, " << bSaveSettings << " )" << endl;
KKeyDialog dlg( bAllowLetterShortcuts, parent );
@@ -1187,7 +1187,7 @@ int KKeyDialog::configure( KActionCollection* coll, bool bAllowLetterShortcuts,
return dlg.configure( bSaveSettings );
}
-/*int KKeyDialog::configure( KActionPtrList* coll, const QString& file, QWidget *parent, bool bSaveSettings )
+/*int KKeyDialog::configure( KActionPtrList* coll, const TQString& file, TQWidget *parent, bool bSaveSettings )
{
kdDebug(125) << "KKeyDialog::configureKeys( KActionCollection*, " << file << ", " << bSaveSettings << " )" << endl;
KAccelActions actions;
diff --git a/kdeui/kkeydialog.h b/kdeui/kkeydialog.h
index c7bfc36dc..a67676e50 100644
--- a/kdeui/kkeydialog.h
+++ b/kdeui/kkeydialog.h
@@ -21,7 +21,7 @@
#ifndef __KKEYDIALOG_H__
#define __KKEYDIALOG_H__
-#include <qdict.h>
+#include <tqdict.h>
#include <kdialogbase.h>
#include <klistview.h>
@@ -69,7 +69,7 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
* @param bAllowLetterShortcuts Set to false if unmodified alphanumeric
* keys ('A', '1', etc.) are not permissible shortcuts.
**/
- KKeyChooser( QWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true );
+ KKeyChooser( TQWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true );
/**
* \overload
* @param parent parent widget
@@ -77,11 +77,11 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
* @param bAllowLetterShortcuts Set to false if unmodified alphanumeric
* keys ('A', '1', etc.) are not permissible shortcuts.
*/
- KKeyChooser( KActionCollection* coll, QWidget* parent, bool bAllowLetterShortcuts = true );
+ KKeyChooser( KActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts = true );
- KKeyChooser( KAccel* actions, QWidget* parent, bool bAllowLetterShortcuts = true );
- KKeyChooser( KGlobalAccel* actions, QWidget* parent );
- KKeyChooser( KShortcutList*, QWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true );
+ KKeyChooser( KAccel* actions, TQWidget* parent, bool bAllowLetterShortcuts = true );
+ KKeyChooser( KGlobalAccel* actions, TQWidget* parent );
+ KKeyChooser( KShortcutList*, TQWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true );
virtual ~KKeyChooser();
@@ -96,9 +96,9 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
* @param title subtree title of this collection of shortcut.
* @since 3.1
*/
- bool insert( KActionCollection *, const QString &title);
+ bool insert( KActionCollection *, const TQString &title);
- void syncToConfig( const QString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset );
+ void syncToConfig( const TQString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset );
/**
* This function writes any shortcut changes back to the original
@@ -127,7 +127,7 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
*
* @since 3.2
*/
- static bool checkGlobalShortcutsConflict( const KShortcut& cut, bool warnUser, QWidget* parent );
+ static bool checkGlobalShortcutsConflict( const KShortcut& cut, bool warnUser, TQWidget* parent );
/**
* Checks whether the given shortcut conflicts with standard keyboard shortcuts.
@@ -142,7 +142,7 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
*
* @since 3.2
*/
- static bool checkStandardShortcutsConflict( const KShortcut& cut, bool warnUser, QWidget* parent );
+ static bool checkStandardShortcutsConflict( const KShortcut& cut, bool warnUser, TQWidget* parent );
signals:
/**
@@ -172,25 +172,25 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
bool insert( KGlobalAccel* );
bool insert( KShortcutList* );
/// @since 3.1
- void buildListView( uint iList, const QString &title = QString::null );
+ void buildListView( uint iList, const TQString &title = TQString::null );
void readGlobalKeys();
void updateButtons();
- void fontChange( const QFont& _font );
+ 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 QString& warnText );
- void _warning( const KKeySequence& seq, QString sAction, QString sTitle );
+ bool isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText );
+ void _warning( const KKeySequence& seq, TQString sAction, TQString sTitle );
protected slots:
void slotNoKey();
void slotDefaultKey();
void slotCustomKey();
- void slotListItemSelected( QListViewItem *item );
+ void slotListItemSelected( TQListViewItem *item );
void capturedShortcut( const KShortcut& cut );
void slotSettingsChanged( int );
- void slotListItemDoubleClicked ( QListViewItem * ipoQListViewItem, const QPoint & ipoQPoint, int c );
+ void slotListItemDoubleClicked ( TQListViewItem * ipoQListViewItem, const TQPoint & ipoQPoint, int c );
protected:
ActionType m_type;
@@ -200,24 +200,24 @@ class KDEUI_EXPORT KKeyChooser : public QWidget
// otherwise aDefaultKeycode.
bool m_bPreferFourModifierKeys;
- QRadioButton* m_prbNone;
- QRadioButton* m_prbDef;
- QRadioButton* m_prbCustom;
+ TQRadioButton* m_prbNone;
+ TQRadioButton* m_prbDef;
+ TQRadioButton* m_prbCustom;
private:
bool isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser );
- static bool promptForReassign( const KKeySequence& cut, const QString& sAction, ActionType action, QWidget* parent );
+ 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 QString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut );
+ static void removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &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 QString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut );
- static void readGlobalKeys( QMap< QString, KShortcut >& map );
- static bool checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, QWidget* parent,
- const QMap< QString, KShortcut >& map, const QString& ignoreAction );
+ 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 );
// Remove the key sequences contained in cut from this item
- bool removeShortcut( const QString& name, const KShortcut &cut );
+ bool removeShortcut( const TQString& name, const KShortcut &cut );
private slots:
void captureCurrentItem();
@@ -227,14 +227,14 @@ private slots:
/**
* @obsolete
*/
- KKeyChooser( KAccel* actions, QWidget* parent,
+ KKeyChooser( KAccel* actions, TQWidget* parent,
bool bCheckAgainstStdKeys,
bool bAllowLetterShortcuts,
bool bAllowWinKey = false );
/**
* @obsolete
*/
- KKeyChooser( KGlobalAccel* actions, QWidget* parent,
+ KKeyChooser( KGlobalAccel* actions, TQWidget* parent,
bool bCheckAgainstStdKeys,
bool bAllowLetterShortcuts,
bool bAllowWinKey = false );
@@ -281,7 +281,7 @@ public:
* Set @p bAllowLetterShortcuts to false if unmodified alphanumeric
* keys ('A', '1', etc.) are not permissible shortcuts.
*/
- KKeyDialog( bool bAllowLetterShortcuts = true, QWidget* parent = 0, const char* name = 0 );
+ KKeyDialog( bool bAllowLetterShortcuts = true, TQWidget* parent = 0, const char* name = 0 );
/**
* Destructor. Deletes all resources used by a KKeyDialog object.
@@ -310,7 +310,7 @@ public:
* @return true :)
* @since 3.1
*/
- bool insert(KActionCollection *, const QString &title);
+ bool insert(KActionCollection *, const TQString &title);
/**
* Run the dialog and call commitChanges() if @p bSaveSettings
@@ -332,20 +332,20 @@ 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, QWidget* parent = 0, bool bSaveSettings = true );
+ static int configure( KActionCollection* 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 KConfig.
*/
- static int configure( KAccel* keys, QWidget* parent = 0, bool bSaveSettings = true );
+ static int configure( KAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true );
/**
* This is an overloaded member function, provided for convenience.
* It behaves essentially like the above function.
*/
- static int configure( KGlobalAccel* keys, QWidget* parent = 0, bool bSaveSettings = true );
+ static int configure( KGlobalAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true );
/**
@@ -359,42 +359,42 @@ public:
* @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, QWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true
+ static int configure( KActionCollection* 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, QWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true
+ static int configure( KAccel* keys, 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( KGlobalAccel* keys, bool bAllowLetterShortcuts, QWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true
+ static int configure( KGlobalAccel* keys, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true
/**
* @deprecated Obsolete.
* Please use KKeyDialog::configure instead
*/
- static KDE_DEPRECATED int configureKeys( KAccel* keys, bool save_settings = true, QWidget* parent = 0 )
+ static KDE_DEPRECATED int configureKeys( KAccel* keys, bool save_settings = true, TQWidget* parent = 0 )
{ return configure( keys, parent, save_settings ); }
/**
* @deprecated Obsolete.
* Please use KKeyDialog::configure instead
*/
- static KDE_DEPRECATED int configureKeys( KGlobalAccel* keys, bool save_settings = true, QWidget* parent = 0 )
+ static KDE_DEPRECATED int configureKeys( KGlobalAccel* keys, bool save_settings = true, TQWidget* parent = 0 )
{ return configure( keys, parent, save_settings ); }
/**
* @deprecated Obsolete.
* Please use KKeyDialog::configure instead
*/
- static KDE_DEPRECATED int configureKeys( KActionCollection* coll, const QString& /*xmlfile*/,
- bool save_settings = true, QWidget* parent = 0 )
+ static KDE_DEPRECATED int configureKeys( KActionCollection* coll, const TQString& /*xmlfile*/,
+ bool save_settings = true, TQWidget* parent = 0 )
{ return configure( coll, parent, save_settings ); }
private:
- KKeyDialog( KKeyChooser::ActionType, bool bAllowLetterShortcuts = true, QWidget* parent = 0, const char* name = 0 );
+ KKeyDialog( KKeyChooser::ActionType, bool bAllowLetterShortcuts = true, TQWidget* parent = 0, const char* name = 0 );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/klanguagebutton.cpp b/kdeui/klanguagebutton.cpp
index ed70b5ea0..7bb7a87ba 100644
--- a/kdeui/klanguagebutton.cpp
+++ b/kdeui/klanguagebutton.cpp
@@ -22,16 +22,16 @@
*/
#define INCLUDE_MENUITEM_DEF
-#include <qpopupmenu.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include "klanguagebutton.h"
#include "klanguagebutton.moc"
#include <kdebug.h>
-static void checkInsertPos( QPopupMenu *popup, const QString & str,
+static void checkInsertPos( TQPopupMenu *popup, const TQString & str,
int &index )
{
if ( index == -1 )
@@ -57,15 +57,15 @@ static void checkInsertPos( QPopupMenu *popup, const QString & str,
Q_ASSERT( a == b );
}
-static QPopupMenu * checkInsertIndex( QPopupMenu *popup,
- const QStringList *tags, const QString &submenu )
+static TQPopupMenu * checkInsertIndex( TQPopupMenu *popup,
+ const TQStringList *tags, const TQString &submenu )
{
int pos = tags->findIndex( submenu );
- QPopupMenu *pi = 0;
+ TQPopupMenu *pi = 0;
if ( pos != -1 )
{
- QMenuItem *p = popup->findItem( pos );
+ TQMenuItem *p = popup->findItem( pos );
pi = p ? p->popup() : 0;
}
if ( !pi )
@@ -77,29 +77,29 @@ static QPopupMenu * checkInsertIndex( QPopupMenu *popup,
class KLanguageButtonPrivate
{
public:
- QPushButton * button;
+ TQPushButton * button;
bool staticText;
};
-KLanguageButton::KLanguageButton( QWidget * parent, const char *name )
- : QWidget( parent, name )
+KLanguageButton::KLanguageButton( TQWidget * parent, const char *name )
+ : TQWidget( parent, name )
{
init(name);
}
-KLanguageButton::KLanguageButton( const QString & text, QWidget * parent, const char *name )
- : QWidget( parent, name )
+KLanguageButton::KLanguageButton( const TQString & text, TQWidget * parent, const char *name )
+ : TQWidget( parent, name )
{
init(name);
setText(text);
}
-void KLanguageButton::setText(const QString & text)
+void KLanguageButton::setText(const TQString & text)
{
d->staticText = true;
d->button->setText(text);
- d->button->setIconSet(QIconSet()); // remove the icon
+ d->button->setIconSet(TQIconSet()); // remove the icon
}
void KLanguageButton::init(const char * name)
@@ -112,9 +112,9 @@ void KLanguageButton::init(const char * name)
d->staticText = false;
- QHBoxLayout *layout = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout *layout = new TQHBoxLayout(this, 0, 0);
layout->setAutoAdd(true);
- d->button = new QPushButton( this, name ); // HPB don't touch this!!
+ d->button = new TQPushButton( this, name ); // HPB don't touch this!!
clear();
}
@@ -128,60 +128,60 @@ KLanguageButton::~KLanguageButton()
}
-void KLanguageButton::insertLanguage( const QString& path, const QString& name,
- const QString&, const QString &submenu, int index )
+void KLanguageButton::insertLanguage( const TQString& path, const TQString& name,
+ const TQString&, const TQString &submenu, int index )
{
- QString output = name + QString::fromLatin1( " (" ) + path +
- QString::fromLatin1( ")" );
+ TQString output = name + TQString::fromLatin1( " (" ) + path +
+ TQString::fromLatin1( ")" );
#if 0
// Nooooo ! Country != language
- QPixmap flag( locate( "locale", sub + path +
- QString::fromLatin1( "/flag.png" ) ) );
+ TQPixmap flag( locate( "locale", sub + path +
+ TQString::fromLatin1( "/flag.png" ) ) );
#endif
insertItem( output, path, submenu, index );
}
-void KLanguageButton::insertItem( const QIconSet& icon, const QString &text,
- const QString & id, const QString &submenu, int index )
+void KLanguageButton::insertItem( const TQIconSet& icon, const TQString &text,
+ const TQString & id, const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex( m_popup, m_ids, submenu );
+ TQPopupMenu *pi = checkInsertIndex( m_popup, m_ids, submenu );
checkInsertPos( pi, text, index );
pi->insertItem( icon, text, count(), index );
m_ids->append( id );
}
-void KLanguageButton::insertItem( const QString &text, const QString & id,
- const QString &submenu, int index )
+void KLanguageButton::insertItem( const TQString &text, const TQString & id,
+ const TQString &submenu, int index )
{
- insertItem( QIconSet(), text, id, submenu, index );
+ insertItem( TQIconSet(), text, id, submenu, index );
}
-void KLanguageButton::insertSeparator( const QString &submenu, int index )
+void KLanguageButton::insertSeparator( const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex( m_popup, m_ids, submenu );
+ TQPopupMenu *pi = checkInsertIndex( m_popup, m_ids, submenu );
pi->insertSeparator( index );
- m_ids->append( QString::null );
+ m_ids->append( TQString::null );
}
-void KLanguageButton::insertSubmenu( const QIconSet & icon,
- const QString &text, const QString &id,
- const QString &submenu, int index )
+void KLanguageButton::insertSubmenu( const TQIconSet & icon,
+ const TQString &text, const TQString &id,
+ const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex( m_popup, m_ids, submenu );
- QPopupMenu *p = new QPopupMenu( pi );
+ TQPopupMenu *pi = checkInsertIndex( m_popup, m_ids, submenu );
+ TQPopupMenu *p = new TQPopupMenu( pi );
checkInsertPos( pi, text, index );
pi->insertItem( icon, text, p, count(), index );
m_ids->append( id );
- connect( p, SIGNAL( activated( int ) ),
- SLOT( slotActivated( int ) ) );
- connect( p, SIGNAL( highlighted( int ) ), this,
- SLOT( slotHighlighted( int ) ) );
+ connect( p, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotActivated( int ) ) );
+ connect( p, TQT_SIGNAL( highlighted( int ) ), this,
+ TQT_SLOT( slotHighlighted( int ) ) );
}
-void KLanguageButton::insertSubmenu( const QString &text, const QString &id,
- const QString &submenu, int index )
+void KLanguageButton::insertSubmenu( const TQString &text, const TQString &id,
+ const TQString &submenu, int index )
{
- insertSubmenu(QIconSet(), text, id, submenu, index);
+ insertSubmenu(TQIconSet(), text, id, submenu, index);
}
void KLanguageButton::slotActivated( int index )
@@ -191,7 +191,7 @@ void KLanguageButton::slotActivated( int index )
setCurrentItem( index );
// Forward event from popup menu as if it was emitted from this widget:
- QString id = *m_ids->at( index );
+ TQString id = *m_ids->at( index );
emit activated( id );
}
@@ -199,7 +199,7 @@ void KLanguageButton::slotHighlighted( int index )
{
//kdDebug() << "slotHighlighted" << index << endl;
- QString id = *m_ids->at( index );
+ TQString id = *m_ids->at( index );
emit ( highlighted(id) );
}
@@ -214,39 +214,39 @@ void KLanguageButton::clear()
delete m_oldPopup;
m_oldPopup = m_popup;
- m_popup = new QPopupMenu( this );
+ m_popup = new TQPopupMenu( this );
d->button->setPopup( m_popup );
- connect( m_popup, SIGNAL( activated( int ) ),
- SLOT( slotActivated( int ) ) );
- connect( m_popup, SIGNAL( highlighted( int ) ),
- SLOT( slotHighlighted( int ) ) );
+ connect( m_popup, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotActivated( int ) ) );
+ connect( m_popup, TQT_SIGNAL( highlighted( int ) ),
+ TQT_SLOT( slotHighlighted( int ) ) );
if ( !d->staticText )
{
- d->button->setText( QString::null );
- d->button->setIconSet( QIconSet() );
+ d->button->setText( TQString::null );
+ d->button->setIconSet( TQIconSet() );
}
}
-bool KLanguageButton::contains( const QString & id ) const
+bool KLanguageButton::contains( const TQString & id ) const
{
return m_ids->contains( id ) > 0;
}
-QString KLanguageButton::current() const
+TQString KLanguageButton::current() const
{
return *m_ids->at( currentItem() );
}
-QString KLanguageButton::id( int i ) const
+TQString KLanguageButton::id( int i ) const
{
if ( i < 0 || i >= count() )
{
kdDebug() << "KLanguageButton::tag(), unknown tag " << i << endl;
- return QString::null;
+ return TQString::null;
}
return *m_ids->at( i );
}
@@ -266,15 +266,15 @@ void KLanguageButton::setCurrentItem( int i )
if ( !d->staticText )
{
d->button->setText( m_popup->text( m_current ) );
- QIconSet *icon = m_popup->iconSet( m_current );
+ TQIconSet *icon = m_popup->iconSet( m_current );
if ( icon )
d->button->setIconSet( *icon );
else
- d->button->setIconSet( QIconSet() );
+ d->button->setIconSet( TQIconSet() );
}
}
-void KLanguageButton::setCurrentItem( const QString & id )
+void KLanguageButton::setCurrentItem( const TQString & id )
{
int i = m_ids->findIndex( id );
if ( id.isNull() )
diff --git a/kdeui/klanguagebutton.h b/kdeui/klanguagebutton.h
index d354b4b77..b7f0c9a8f 100644
--- a/kdeui/klanguagebutton.h
+++ b/kdeui/klanguagebutton.h
@@ -27,7 +27,7 @@
#ifndef __KLANGBUTTON_H__
#define __KLANGBUTTON_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -55,7 +55,7 @@ public:
* @param parent The parent of the combo box
* @param name The name of the combo box
*/
- KLanguageButton(QWidget * parent = 0, const char * name = 0);
+ KLanguageButton(TQWidget * parent = 0, const char * name = 0);
/**
* Constructs a version with static text. The parent parent is called name.
@@ -64,7 +64,7 @@ public:
* @param parent The parent of the button
* @param name The name of the button
*/
- KLanguageButton(const QString & text, QWidget * parent = 0, const char * name = 0);
+ KLanguageButton(const TQString & text, TQWidget * parent = 0, const char * name = 0);
/**
* Deconstructor
@@ -80,8 +80,8 @@ public:
* @param submenu The place where the item should be placed.
* @param index The visual position in the submenu.
*/
- void insertItem( const QIconSet& icon, const QString &text,
- const QString & id, const QString &submenu = QString::null,
+ void insertItem( const TQIconSet& icon, const TQString &text,
+ const TQString & id, const TQString &submenu = TQString::null,
int index = -1 );
/**
* Inserts an item into the combo box. A negative index will append the item.
@@ -91,15 +91,15 @@ public:
* @param submenu The place where the item should be placed.
* @param index The visual position in the submenu.
*/
- void insertItem( const QString &text, const QString & id,
- const QString &submenu = QString::null, int index = -1 );
+ void insertItem( const TQString &text, const TQString & id,
+ const TQString &submenu = TQString::null, int index = -1 );
/**
* Inserts a seperator item into the combo box. A negative index will append the item.
*
* @param submenu The place where the item should be placed.
* @param index The visual position in the submenu.
*/
- void insertSeparator( const QString &submenu = QString::null,
+ void insertSeparator( const TQString &submenu = TQString::null,
int index = -1 );
/**
* Inserts a submenu into the combo box. A negative index will append the item.
@@ -110,8 +110,8 @@ public:
* @param submenu The place where the item should be placed.
* @param index The visual position in the submenu.
*/
- void insertSubmenu( const QIconSet & icon, const QString &text,
- const QString & id, const QString &submenu = QString::null,
+ void insertSubmenu( const TQIconSet & icon, const TQString &text,
+ const TQString & id, const TQString &submenu = TQString::null,
int index = -1);
/**
* Inserts a submenu into the combo box. A negative index will append the item.
@@ -121,13 +121,13 @@ public:
* @param submenu The place where the item should be placed.
* @param index The visual position in the submenu.
*/
- void insertSubmenu( const QString &text, const QString & id,
- const QString &submenu = QString::null, int index = -1);
+ void insertSubmenu( const TQString &text, const TQString & id,
+ const TQString &submenu = TQString::null, int index = -1);
- void insertLanguage( const QString& path, const QString& name,
- const QString& sub = QString::null,
- const QString &submenu = QString::null, int index = -1);
+ void insertLanguage( const TQString& path, const TQString& name,
+ const TQString& sub = TQString::null,
+ const TQString &submenu = TQString::null, int index = -1);
int count() const;
@@ -138,29 +138,29 @@ public:
/**
* Changes the current text item of the combobox, and makes the text static.
*/
- void setText(const QString & text);
+ void setText(const TQString & text);
/**
* Returns the id of the combobox's current item.
*/
- QString current() const;
+ TQString current() const;
/**
* Returns TRUE if the combobox contains id.
*/
- bool contains( const QString & id ) const;
+ bool contains( const TQString & id ) const;
/**
* Sets id as current item.
*/
- void setCurrentItem( const QString & id );
+ void setCurrentItem( const TQString & id );
- QString id( int i ) const;
+ TQString id( int i ) const;
signals:
/**
* This signal is emitted when a new item is activated. The id is
* the identificator of the selected item.
*/
- void activated( const QString & id );
- void highlighted( const QString & id );
+ void activated( const TQString & id );
+ void highlighted( const TQString & id );
private slots:
void slotActivated( int );
@@ -172,8 +172,8 @@ private:
void init(const char * name);
// work space for the new class
- QStringList *m_ids;
- QPopupMenu *m_popup, *m_oldPopup;
+ TQStringList *m_ids;
+ TQPopupMenu *m_popup, *m_oldPopup;
int m_current;
KLanguageButtonPrivate * d;
diff --git a/kdeui/kled.cpp b/kdeui/kled.cpp
index 6a8d7c5e0..b7980203b 100644
--- a/kdeui/kled.cpp
+++ b/kdeui/kled.cpp
@@ -22,14 +22,14 @@
#undef PAINT_BENCH
#ifdef PAINT_BENCH
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <stdio.h>
#endif
-#include <qpainter.h>
-#include <qimage.h>
-#include <qcolor.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqcolor.h>
#include <kapplication.h>
#include <kpixmapeffect.h>
#include "kled.h"
@@ -40,20 +40,20 @@ class KLed::KLedPrivate
friend class KLed;
int dark_factor;
- QColor offcolor;
- QPixmap *off_map;
- QPixmap *on_map;
+ TQColor offcolor;
+ TQPixmap *off_map;
+ TQPixmap *on_map;
};
-KLed::KLed(QWidget *parent, const char *name)
- : QWidget( parent, name),
+KLed::KLed(TQWidget *parent, const char *name)
+ : TQWidget( parent, name),
led_state(On),
led_look(Raised),
led_shape(Circular)
{
- QColor col(green);
+ TQColor col(green);
d = new KLed::KLedPrivate;
d->dark_factor = 300;
d->offcolor = col.dark(300);
@@ -64,8 +64,8 @@ KLed::KLed(QWidget *parent, const char *name)
}
-KLed::KLed(const QColor& col, QWidget *parent, const char *name)
- : QWidget( parent, name),
+KLed::KLed(const TQColor& col, TQWidget *parent, const char *name)
+ : TQWidget( parent, name),
led_state(On),
led_look(Raised),
led_shape(Circular)
@@ -80,9 +80,9 @@ KLed::KLed(const QColor& col, QWidget *parent, const char *name)
//setShape(Circular);
}
-KLed::KLed(const QColor& col, KLed::State state,
- KLed::Look look, KLed::Shape shape, QWidget *parent, const char *name )
- : QWidget(parent, name),
+KLed::KLed(const TQColor& col, KLed::State state,
+ KLed::Look look, KLed::Shape shape, TQWidget *parent, const char *name )
+ : TQWidget(parent, name),
led_state(state),
led_look(look),
led_shape(shape)
@@ -106,11 +106,11 @@ KLed::~KLed()
}
void
-KLed::paintEvent(QPaintEvent *)
+KLed::paintEvent(TQPaintEvent *)
{
#ifdef PAINT_BENCH
const int rounds = 1000;
- QTime t;
+ TQTime t;
t.start();
for (int i=0; i<rounds; i++) {
#endif
@@ -180,13 +180,13 @@ KLed::paintCachedPixmap()
{
if (led_state) {
if (d->on_map) {
- QPainter paint(this);
+ TQPainter paint(this);
paint.drawPixmap(0, 0, *d->on_map);
return true;
}
} else {
if (d->off_map) {
- QPainter paint(this);
+ TQPainter paint(this);
paint.drawPixmap(0, 0, *d->off_map);
return true;
}
@@ -200,20 +200,20 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp
{
if (paintCachedPixmap()) return;
- QPainter paint;
- QColor color;
- QBrush brush;
- QPen pen;
+ TQPainter paint;
+ TQColor color;
+ TQBrush brush;
+ TQPen pen;
int width = ensureRoundLed();
int scale = 3;
- QPixmap *tmpMap = 0;
+ TQPixmap *tmpMap = 0;
width *= scale;
- tmpMap = new QPixmap(width + 6, width + 6);
+ tmpMap = new TQPixmap(width + 6, width + 6);
tmpMap->fill(paletteBackgroundColor());
// start painting widget
@@ -225,7 +225,7 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp
// Set the brush to SolidPattern, this fills the entire area
// of the ellipse which is drawn with a thin gray "border" (pen)
- brush.setStyle( QBrush::SolidPattern );
+ brush.setStyle( TQBrush::SolidPattern );
brush.setColor( color );
pen.setWidth( scale );
@@ -241,12 +241,12 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp
paint.end();
//
// painting done
- QPixmap *&dest = led_state ? d->on_map : d->off_map;
- QImage i = tmpMap->convertToImage();
+ TQPixmap *&dest = led_state ? d->on_map : d->off_map;
+ TQImage i = tmpMap->convertToImage();
width /= 3;
i = i.smoothScale(width, width);
delete tmpMap;
- dest = new QPixmap(i);
+ dest = new TQPixmap(i);
paint.begin(this);
paint.drawPixmap(0, 0, *dest);
paint.end();
@@ -258,20 +258,20 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
{
if (paintCachedPixmap()) return;
- QPainter paint;
- QColor color;
- QBrush brush;
- QPen pen;
+ TQPainter paint;
+ TQColor color;
+ TQBrush brush;
+ TQPen pen;
// Initialize coordinates, width, and height of the LED
int width = ensureRoundLed();
int scale = 3;
- QPixmap *tmpMap = 0;
+ TQPixmap *tmpMap = 0;
width *= scale;
- tmpMap = new QPixmap(width + 6, width + 6);
+ tmpMap = new TQPixmap(width + 6, width + 6);
tmpMap->fill(paletteBackgroundColor());
paint.begin(tmpMap);
@@ -280,7 +280,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
// Set the brush to SolidPattern, this fills the entire area
// of the ellipse which is drawn first
- brush.setStyle( QBrush::SolidPattern );
+ brush.setStyle( TQBrush::SolidPattern );
brush.setColor( color );
paint.setBrush( brush ); // Assign the brush to the painter
@@ -328,7 +328,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
color = colorGroup().dark();
pen.setColor( color ); // Set the pen accordingly
paint.setPen( pen ); // Select pen for drawing
- brush.setStyle( QBrush::NoBrush ); // Switch off the brush
+ brush.setStyle( TQBrush::NoBrush ); // Switch off the brush
paint.setBrush( brush ); // This avoids filling of the ellipse
paint.drawEllipse( 2, 2, width, width );
@@ -336,12 +336,12 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
paint.end();
//
// painting done
- QPixmap *&dest = led_state ? d->on_map : d->off_map;
- QImage i = tmpMap->convertToImage();
+ TQPixmap *&dest = led_state ? d->on_map : d->off_map;
+ TQImage i = tmpMap->convertToImage();
width /= 3;
i = i.smoothScale(width, width);
delete tmpMap;
- dest = new QPixmap(i);
+ dest = new TQPixmap(i);
paint.begin(this);
paint.drawPixmap(0, 0, *dest);
paint.end();
@@ -353,21 +353,21 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
{
if (paintCachedPixmap()) return;
- QPainter paint;
- QColor color;
- QBrush brush;
- QPen pen;
+ TQPainter paint;
+ TQColor color;
+ TQBrush brush;
+ TQPen pen;
// First of all we want to know what area should be updated
// Initialize coordinates, width, and height of the LED
int width = ensureRoundLed();
int scale = 3;
- QPixmap *tmpMap = 0;
+ TQPixmap *tmpMap = 0;
width *= scale;
- tmpMap = new QPixmap(width, width);
+ tmpMap = new TQPixmap(width, width);
tmpMap->fill(paletteBackgroundColor());
paint.begin(tmpMap);
@@ -376,7 +376,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
// Set the brush to SolidPattern, this fills the entire area
// of the ellipse which is drawn first
- brush.setStyle( QBrush::SolidPattern );
+ brush.setStyle( TQBrush::SolidPattern );
brush.setColor( color );
paint.setBrush( brush ); // Assign the brush to the painter
@@ -421,7 +421,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
// from the upper left.
pen.setWidth( 2 * scale + 1 ); // ### shouldn't this value be smaller for smaller LEDs?
- brush.setStyle( QBrush::NoBrush ); // Switch off the brush
+ brush.setStyle( TQBrush::NoBrush ); // Switch off the brush
paint.setBrush( brush ); // This avoids filling of the ellipse
// Set the initial color value to colorGroup().light() (bright) and start
@@ -443,12 +443,12 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
//
// painting done
- QPixmap *&dest = led_state ? d->on_map : d->off_map;
- QImage i = tmpMap->convertToImage();
+ TQPixmap *&dest = led_state ? d->on_map : d->off_map;
+ TQImage i = tmpMap->convertToImage();
width /= 3;
i = i.smoothScale(width, width);
delete tmpMap;
- dest = new QPixmap(i);
+ dest = new TQPixmap(i);
paint.begin(this);
paint.drawPixmap(0, 0, *dest);
paint.end();
@@ -458,10 +458,10 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
void
KLed::paintRect()
{
- QPainter painter(this);
- QBrush lightBrush(led_color);
- QBrush darkBrush(d->offcolor);
- QPen pen(led_color.dark(300));
+ TQPainter painter(this);
+ TQBrush lightBrush(led_color);
+ TQBrush darkBrush(d->offcolor);
+ TQPen pen(led_color.dark(300));
int w=width();
int h=height();
// -----
@@ -489,13 +489,13 @@ KLed::paintRect()
void
KLed::paintRectFrame(bool raised)
{
- QPainter painter(this);
- QBrush lightBrush(led_color);
- QBrush darkBrush(d->offcolor);
+ TQPainter painter(this);
+ TQBrush lightBrush(led_color);
+ TQBrush darkBrush(d->offcolor);
int w=width();
int h=height();
- QColor black=Qt::black;
- QColor white=Qt::white;
+ TQColor black=Qt::black;
+ TQColor white=Qt::white;
// -----
if(raised)
{
@@ -569,7 +569,7 @@ KLed::setShape(KLed::Shape s)
}
void
-KLed::setColor(const QColor& col)
+KLed::setColor(const TQColor& col)
{
if(led_color!=col) {
if(d->on_map) { delete d->on_map; d->on_map = 0; }
@@ -629,13 +629,13 @@ KLed::off()
QSize
KLed::sizeHint() const
{
- return QSize(16, 16);
+ return TQSize(16, 16);
}
QSize
KLed::minimumSizeHint() const
{
- return QSize(16, 16 );
+ return TQSize(16, 16 );
}
void KLed::virtual_hook( int, void* )
diff --git a/kdeui/kled.h b/kdeui/kled.h
index 3e417feb9..723c4b6da 100644
--- a/kdeui/kled.h
+++ b/kdeui/kled.h
@@ -23,7 +23,7 @@
#ifndef _KLED_H_
#define _KLED_H_
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
class QColor;
@@ -49,7 +49,7 @@ class KDEUI_EXPORT KLed : public QWidget
Q_PROPERTY( State state READ state WRITE setState )
Q_PROPERTY( Shape shape READ shape WRITE setShape )
Q_PROPERTY( Look look READ look WRITE setLook )
- Q_PROPERTY( QColor color READ color WRITE setColor )
+ Q_PROPERTY( TQColor color READ color WRITE setColor )
Q_PROPERTY( int darkFactor READ darkFactor WRITE setDarkFactor )
public:
@@ -92,18 +92,18 @@ public:
* Constructs a green, round LED widget which will initially
* be turned on.
*/
- KLed(QWidget *parent=0, const char *name=0);
+ KLed(TQWidget *parent=0, const char *name=0);
/**
* Constructor with the ledcolor, the parent widget, and the name.
*
* The State will be defaulted On and the Look round.
*
* @param col Initial color of the LED.
- * @param parent Will be handed over to QWidget.
- * @param name Will be handed over to QWidget.
+ * @param parent Will be handed over to TQWidget.
+ * @param name Will be handed over to TQWidget.
* @short Constructor
*/
- KLed(const QColor &col, QWidget *parent=0, const char *name=0);
+ KLed(const TQColor &col, TQWidget *parent=0, const char *name=0);
/**
* Constructor with the ledcolor, ledstate, ledlook,
@@ -115,12 +115,12 @@ public:
* @param state Sets the State.
* @param look Sets the Look.
* @param shape Sets the Shape (rectangular or circular)
- * @param parent Will be handed over to QWidget.
- * @param name Will be handed over to QWidget.
+ * @param parent Will be handed over to TQWidget.
+ * @param name Will be handed over to TQWidget.
* @short Constructor
*/
- KLed(const QColor& col, KLed::State state, KLed::Look look, KLed::Shape shape,
- QWidget *parent=0, const char *name=0);
+ KLed(const TQColor& col, KLed::State state, KLed::Look look, KLed::Shape shape,
+ TQWidget *parent=0, const char *name=0);
/**
@@ -145,7 +145,7 @@ public:
* @see Color
* @short Returns LED color.
*/
- QColor color() const;
+ TQColor color() const;
/**
* Returns the look of the widget.
@@ -191,7 +191,7 @@ public:
/**
* Set the color of the widget.
* The Color is shown with the KLed::On state.
- * The KLed::Off state is shown with QColor.dark() method
+ * The KLed::Off state is shown with TQColor.dark() method
*
* The widget calls the update() method, so it will
* be updated when entering the main event loop.
@@ -201,11 +201,11 @@ public:
* @param color New color of the LED.
* @short Sets the LED color.
*/
- void setColor(const QColor& color);
+ void setColor(const TQColor& color);
/**
* Sets the factor to darken the LED in OFF state.
- * Same as QColor::dark().
+ * Same as TQColor::dark().
* "darkfactor should be greater than 100, else the LED gets lighter
* in OFF state.
* Defaults to 300.
@@ -221,7 +221,7 @@ public:
* Sets the color of the widget.
* The Color is shown with the KLed::On state.
* darkcolor is explicidly used for the off state of the LED.
- * Normally you don't have to use this method, the setColor(const QColor& color) is sufficient for the task.
+ * Normally you don't have to use this method, the setColor(const TQColor& color) is sufficient for the task.
*
* The widget calls the update() method, so it will
* be updated when entering the main event loop.
@@ -232,7 +232,7 @@ public:
* @param darkcolor Dark color of the LED used for off state.
* @short Sets the light and dark LED color.
*
- void setColor(const QColor& color, const QColor& darkcolor);
+ void setColor(const TQColor& color, const TQColor& darkcolor);
*/
/**
@@ -249,8 +249,8 @@ public:
*/
void setLook( Look look );
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
public slots:
@@ -300,7 +300,7 @@ protected:
*/
virtual void paintRectFrame(bool raised);
- void paintEvent( QPaintEvent * );
+ void paintEvent( TQPaintEvent * );
/**
* Compute LED width
@@ -315,7 +315,7 @@ protected:
private:
State led_state;
- QColor led_color;
+ TQColor led_color;
Look led_look;
Shape led_shape;
diff --git a/kdeui/klineedit.cpp b/kdeui/klineedit.cpp
index 309bd4283..f89f4cf25 100644
--- a/kdeui/klineedit.cpp
+++ b/kdeui/klineedit.cpp
@@ -25,12 +25,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qclipboard.h>
-#include <qpainter.h>
-#include <qtimer.h>
+#include <tqclipboard.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
#include <kconfig.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kcursor.h>
#include <klocale.h>
#include <kstdaccel.h>
@@ -79,8 +79,8 @@ public:
static bool initialized;
static bool backspacePerformsCompletion; // Configuration option
- QColor previousHighlightColor;
- QColor previousHighlightedTextColor;
+ TQColor previousHighlightColor;
+ TQColor previousHighlightedTextColor;
bool userSelection: 1;
bool autoSuggest : 1;
@@ -92,10 +92,10 @@ public:
int squeezedEnd;
int squeezedStart;
BackgroundMode bgMode;
- QString squeezedText;
+ TQString squeezedText;
KCompletionBox *completionBox;
- QString clickMessage;
+ TQString clickMessage;
bool drawClickMsg:1;
};
@@ -103,14 +103,14 @@ bool KLineEdit::KLineEditPrivate::backspacePerformsCompletion = false;
bool KLineEdit::KLineEditPrivate::initialized = false;
-KLineEdit::KLineEdit( const QString &string, QWidget *parent, const char *name )
- :QLineEdit( string, parent, name )
+KLineEdit::KLineEdit( const TQString &string, TQWidget *parent, const char *name )
+ :TQLineEdit( string, parent, name )
{
init();
}
-KLineEdit::KLineEdit( QWidget *parent, const char *name )
- :QLineEdit( parent, name )
+KLineEdit::KLineEdit( TQWidget *parent, const char *name )
+ :TQLineEdit( parent, name )
{
init();
}
@@ -136,13 +136,13 @@ void KLineEdit::init()
d->autoSuggest = (mode == KGlobalSettings::CompletionMan ||
mode == KGlobalSettings::CompletionPopupAuto ||
mode == KGlobalSettings::CompletionAuto);
- connect( this, SIGNAL(selectionChanged()), this, SLOT(slotRestoreSelectionColors()));
+ connect( this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotRestoreSelectionColors()));
- QPalette p = palette();
+ TQPalette p = palette();
if ( !d->previousHighlightedTextColor.isValid() )
- d->previousHighlightedTextColor=p.color(QPalette::Normal,QColorGroup::HighlightedText);
+ d->previousHighlightedTextColor=p.color(TQPalette::Normal,TQColorGroup::HighlightedText);
if ( !d->previousHighlightColor.isValid() )
- d->previousHighlightColor=p.color(QPalette::Normal,QColorGroup::Highlight);
+ d->previousHighlightColor=p.color(TQPalette::Normal,TQColorGroup::Highlight);
d->drawClickMsg = false;
}
@@ -158,7 +158,7 @@ void KLineEdit::setCompletionMode( KGlobalSettings::Completion mode )
// If the widgets echo mode is not Normal, no completion
// feature will be enabled even if one is requested.
- if ( echoMode() != QLineEdit::Normal )
+ if ( echoMode() != TQLineEdit::Normal )
mode = KGlobalSettings::CompletionNone; // Override the request.
if ( kapp && !kapp->authorize("lineedit_text_completion") )
@@ -174,12 +174,12 @@ void KLineEdit::setCompletionMode( KGlobalSettings::Completion mode )
KCompletionBase::setCompletionMode( mode );
}
-void KLineEdit::setCompletedText( const QString& t, bool marked )
+void KLineEdit::setCompletedText( const TQString& t, bool marked )
{
if ( !d->autoSuggest )
return;
- QString txt = text();
+ TQString txt = text();
if ( t != txt )
{
@@ -192,7 +192,7 @@ void KLineEdit::setCompletedText( const QString& t, bool marked )
}
-void KLineEdit::setCompletedText( const QString& text )
+void KLineEdit::setCompletedText( const TQString& text )
{
KGlobalSettings::Completion mode = completionMode();
bool marked = ( mode == KGlobalSettings::CompletionAuto ||
@@ -209,7 +209,7 @@ void KLineEdit::rotateText( KCompletionBase::KeyBindingType type )
(type == KCompletionBase::PrevCompletionMatch ||
type == KCompletionBase::NextCompletionMatch ) )
{
- QString input;
+ TQString input;
if (type == KCompletionBase::PrevCompletionMatch)
comp->previousMatch();
@@ -223,7 +223,7 @@ void KLineEdit::rotateText( KCompletionBase::KeyBindingType type )
}
}
-void KLineEdit::makeCompletion( const QString& text )
+void KLineEdit::makeCompletion( const TQString& text )
{
KCompletion *comp = compObj();
KGlobalSettings::Completion mode = completionMode();
@@ -231,7 +231,7 @@ void KLineEdit::makeCompletion( const QString& text )
if ( !comp || mode == KGlobalSettings::CompletionNone )
return; // No completion object...
- QString match = comp->makeCompletion( text );
+ TQString match = comp->makeCompletion( text );
if ( mode == KGlobalSettings::CompletionPopup ||
mode == KGlobalSettings::CompletionPopupAuto )
@@ -268,7 +268,7 @@ void KLineEdit::setReadOnly(bool readOnly)
if (readOnly == isReadOnly ())
return;
- QLineEdit::setReadOnly (readOnly);
+ TQLineEdit::setReadOnly (readOnly);
if (readOnly)
{
@@ -285,13 +285,13 @@ void KLineEdit::setReadOnly(bool readOnly)
if (!d->squeezedText.isEmpty())
{
setText(d->squeezedText);
- d->squeezedText = QString::null;
+ d->squeezedText = TQString::null;
}
setBackgroundMode (d->bgMode);
}
}
-void KLineEdit::setSqueezedText( const QString &text)
+void KLineEdit::setSqueezedText( const TQString &text)
{
setEnableSqueezedText(true);
setText(text);
@@ -307,7 +307,7 @@ bool KLineEdit::isSqueezedTextEnabled() const
return d->enableSqueezedText;
}
-void KLineEdit::setText( const QString& text )
+void KLineEdit::setText( const TQString& text )
{
d->drawClickMsg = text.isEmpty() && !d->clickMessage.isEmpty();
update();
@@ -319,22 +319,22 @@ void KLineEdit::setText( const QString& text )
return;
}
- QLineEdit::setText( text );
+ TQLineEdit::setText( text );
}
void KLineEdit::setSqueezedText()
{
d->squeezedStart = 0;
d->squeezedEnd = 0;
- QString fullText = d->squeezedText;
- QFontMetrics fm(fontMetrics());
+ TQString fullText = d->squeezedText;
+ TQFontMetrics fm(fontMetrics());
int labelWidth = size().width() - 2*frameWidth() - 2;
int textWidth = fm.width(fullText);
if (textWidth > labelWidth)
{
// start with the dots only
- QString squeezedText = "...";
+ TQString squeezedText = "...";
int squeezedWidth = fm.width(squeezedText);
// estimate how many letters we can add to the dots on both sides
@@ -370,25 +370,25 @@ void KLineEdit::setSqueezedText()
if (letters < 5)
{
// too few letters added -> we give up squeezing
- QLineEdit::setText(fullText);
+ TQLineEdit::setText(fullText);
}
else
{
- QLineEdit::setText(squeezedText);
+ TQLineEdit::setText(squeezedText);
d->squeezedStart = letters;
d->squeezedEnd = fullText.length() - letters;
}
- QToolTip::remove( this );
- QToolTip::add( this, fullText );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, fullText );
}
else
{
- QLineEdit::setText(fullText);
+ TQLineEdit::setText(fullText);
- QToolTip::remove( this );
- QToolTip::hide();
+ TQToolTip::remove( this );
+ TQToolTip::hide();
}
setCursorPosition(0);
@@ -397,7 +397,7 @@ void KLineEdit::setSqueezedText()
void KLineEdit::copy() const
{
if( !copySqueezedText(true))
- QLineEdit::copy();
+ TQLineEdit::copy();
}
bool KLineEdit::copySqueezedText(bool clipboard) const
@@ -418,26 +418,26 @@ bool KLineEdit::copySqueezedText(bool clipboard) const
end = d->squeezedEnd;
if (start == end)
return false;
- QString t = d->squeezedText;
+ TQString t = d->squeezedText;
t = t.mid(start, end - start);
- disconnect( QApplication::clipboard(), SIGNAL(selectionChanged()), this, 0);
- QApplication::clipboard()->setText( t, clipboard ? QClipboard::Clipboard : QClipboard::Selection );
- connect( QApplication::clipboard(), SIGNAL(selectionChanged()), this,
- SLOT(clipboardChanged()) );
+ disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0);
+ TQApplication::clipboard()->setText( t, clipboard ? QClipboard::Clipboard : QClipboard::Selection );
+ connect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this,
+ TQT_SLOT(clipboardChanged()) );
return true;
}
return false;
}
-void KLineEdit::resizeEvent( QResizeEvent * ev )
+void KLineEdit::resizeEvent( TQResizeEvent * ev )
{
if (!d->squeezedText.isEmpty())
setSqueezedText();
- QLineEdit::resizeEvent(ev);
+ TQLineEdit::resizeEvent(ev);
}
-void KLineEdit::keyPressEvent( QKeyEvent *e )
+void KLineEdit::keyPressEvent( TQKeyEvent *e )
{
KKey key( e );
@@ -453,7 +453,7 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
}
else if ( KStdAccel::pasteSelection().contains( key ) )
{
- QString text = QApplication::clipboard()->text( QClipboard::Selection);
+ TQString text = TQApplication::clipboard()->text( QClipboard::Selection);
insert( text );
deselect();
return;
@@ -521,7 +521,7 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
// Filter key-events if EchoMode is normal and
// completion mode is not set to CompletionNone
- if ( echoMode() == QLineEdit::Normal &&
+ if ( echoMode() == TQLineEdit::Normal &&
completionMode() != KGlobalSettings::CompletionNone )
{
KeyBindingMap keys = getKeyBindings();
@@ -538,13 +538,13 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
( e->key() == Key_Right || e->key() == Key_Left ) &&
e->state()==NoButton )
{
- QString old_txt = text();
+ TQString old_txt = text();
d->disableRestoreSelection = true;
int start,end;
getSelection(&start, &end);
deselect();
- QLineEdit::keyPressEvent ( e );
+ TQLineEdit::keyPressEvent ( e );
int cPosition=cursorPosition();
if (e->key() ==Key_Right && cPosition > start )
validateAndSet(old_txt, cPosition, cPosition, old_txt.length());
@@ -574,7 +574,7 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
if ( (mode == KGlobalSettings::CompletionAuto ||
mode == KGlobalSettings::CompletionMan) && noModifier )
{
- QString keycode = e->text();
+ TQString keycode = e->text();
if ( !keycode.isEmpty() && (keycode.unicode()->isPrint() ||
e->key() == Key_Backspace || e->key() == Key_Delete ) )
{
@@ -599,10 +599,10 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
}
d->disableRestoreSelection = true;
- QLineEdit::keyPressEvent ( e );
+ TQLineEdit::keyPressEvent ( e );
d->disableRestoreSelection = false;
- QString txt = text();
+ TQString txt = text();
int len = txt.length();
if ( !hasSelectedText() && len /*&& cursorPosition() == len */)
{
@@ -643,7 +643,7 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
mode == KGlobalSettings::CompletionPopupAuto ) &&
noModifier && !e->text().isEmpty() )
{
- QString old_txt = text();
+ TQString old_txt = text();
bool hasUserSelection=d->userSelection;
bool hadSelection=hasSelectedText();
bool cursorNotAtEnd=false;
@@ -651,7 +651,7 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
int start,end;
getSelection(&start, &end);
int cPos = cursorPosition();
- QString keycode = e->text();
+ TQString keycode = e->text();
// When moving the cursor, we want to keep the autocompletion as an
// autocompletion, so we want to process events at the cursor position
@@ -669,13 +669,13 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
uint selectedLength=selectedText().length();
d->disableRestoreSelection = true;
- QLineEdit::keyPressEvent ( e );
+ TQLineEdit::keyPressEvent ( e );
d->disableRestoreSelection = false;
if (( selectedLength != selectedText().length() ) && !hasUserSelection )
slotRestoreSelectionColors(); // and set userSelection to true
- QString txt = text();
+ TQString txt = text();
int len = txt.length();
if ( txt != old_txt && len/* && ( cursorPosition() == len || force )*/ &&
@@ -733,7 +733,7 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
{
// Emit completion if the completion mode is CompletionShell
// and the cursor is at the end of the string.
- QString txt = text();
+ TQString txt = text();
int len = txt.length();
if ( cursorPosition() == len && len != 0 )
{
@@ -808,25 +808,25 @@ void KLineEdit::keyPressEvent( QKeyEvent *e )
uint selectedLength = selectedText().length();
- // Let QLineEdit handle any other keys events.
- QLineEdit::keyPressEvent ( e );
+ // Let TQLineEdit handle any other keys events.
+ TQLineEdit::keyPressEvent ( e );
if ( selectedLength != selectedText().length() )
slotRestoreSelectionColors(); // and set userSelection to true
}
-void KLineEdit::mouseDoubleClickEvent( QMouseEvent* e )
+void KLineEdit::mouseDoubleClickEvent( TQMouseEvent* e )
{
if ( e->button() == Qt::LeftButton )
{
possibleTripleClick=true;
- QTimer::singleShot( QApplication::doubleClickInterval(),this,
- SLOT(tripleClickTimeout()) );
+ TQTimer::singleShot( TQApplication::doubleClickInterval(),this,
+ TQT_SLOT(tripleClickTimeout()) );
}
- QLineEdit::mouseDoubleClickEvent( e );
+ TQLineEdit::mouseDoubleClickEvent( e );
}
-void KLineEdit::mousePressEvent( QMouseEvent* e )
+void KLineEdit::mousePressEvent( TQMouseEvent* e )
{
if ( possibleTripleClick && e->button() == Qt::LeftButton )
{
@@ -834,13 +834,13 @@ void KLineEdit::mousePressEvent( QMouseEvent* e )
e->accept();
return;
}
- QLineEdit::mousePressEvent( e );
+ TQLineEdit::mousePressEvent( e );
}
-void KLineEdit::mouseReleaseEvent( QMouseEvent* e )
+void KLineEdit::mouseReleaseEvent( TQMouseEvent* e )
{
- QLineEdit::mouseReleaseEvent( e );
- if (QApplication::clipboard()->supportsSelection() ) {
+ TQLineEdit::mouseReleaseEvent( e );
+ if (TQApplication::clipboard()->supportsSelection() ) {
if ( e->button() == LeftButton ) {
// Fix copying of squeezed text if needed
copySqueezedText( false );
@@ -853,17 +853,17 @@ void KLineEdit::tripleClickTimeout()
possibleTripleClick=false;
}
-void KLineEdit::contextMenuEvent( QContextMenuEvent * e )
+void KLineEdit::contextMenuEvent( TQContextMenuEvent * e )
{
if ( m_bEnableMenu )
- QLineEdit::contextMenuEvent( e );
+ TQLineEdit::contextMenuEvent( e );
}
-QPopupMenu *KLineEdit::createPopupMenu()
+TQPopupMenu *KLineEdit::createPopupMenu()
{
enum { IdUndo, IdRedo, IdSep1, IdCut, IdCopy, IdPaste, IdClear, IdSep2, IdSelectAll };
- QPopupMenu *popup = QLineEdit::createPopupMenu();
+ TQPopupMenu *popup = TQLineEdit::createPopupMenu();
int id = popup->idAt(0);
popup->changeItem( id - IdUndo, SmallIconSet("undo"), popup->text( id - IdUndo) );
@@ -878,9 +878,9 @@ QPopupMenu *KLineEdit::createPopupMenu()
// menu item.
if ( compObj() && !isReadOnly() && kapp->authorize("lineedit_text_completion") )
{
- QPopupMenu *subMenu = new QPopupMenu( popup );
- connect( subMenu, SIGNAL( activated( int ) ),
- this, SLOT( completionMenuActivated( int ) ) );
+ TQPopupMenu *subMenu = new TQPopupMenu( popup );
+ connect( subMenu, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( completionMenuActivated( int ) ) );
popup->insertSeparator();
popup->insertItem( SmallIconSet("completion"), i18n("Text Completion"),
@@ -964,14 +964,14 @@ void KLineEdit::completionMenuActivated( int id )
}
}
-void KLineEdit::drawContents( QPainter *p )
+void KLineEdit::drawContents( TQPainter *p )
{
- QLineEdit::drawContents( p );
+ TQLineEdit::drawContents( p );
if ( d->drawClickMsg && !hasFocus() ) {
- QPen tmp = p->pen();
- p->setPen( palette().color( QPalette::Disabled, QColorGroup::Text ) );
- QRect cr = contentsRect();
+ TQPen tmp = p->pen();
+ p->setPen( palette().color( TQPalette::Disabled, TQColorGroup::Text ) );
+ TQRect cr = contentsRect();
// Add two pixel margin on the left side
cr.rLeft() += 3;
@@ -980,13 +980,13 @@ void KLineEdit::drawContents( QPainter *p )
}
}
-void KLineEdit::dropEvent(QDropEvent *e)
+void KLineEdit::dropEvent(TQDropEvent *e)
{
d->drawClickMsg = false;
KURL::List urlList;
if( d->handleURLDrops && KURLDrag::decode( e, urlList ) )
{
- QString dropText = text();
+ TQString dropText = text();
KURL::List::ConstIterator it;
for( it = urlList.begin() ; it != urlList.end() ; ++it )
{
@@ -1001,26 +1001,26 @@ void KLineEdit::dropEvent(QDropEvent *e)
e->accept();
}
else
- QLineEdit::dropEvent(e);
+ TQLineEdit::dropEvent(e);
}
-bool KLineEdit::eventFilter( QObject* o, QEvent* ev )
+bool KLineEdit::eventFilter( TQObject* o, TQEvent* ev )
{
if( o == this )
{
KCursor::autoHideEventFilter( this, ev );
- if ( ev->type() == QEvent::AccelOverride )
+ if ( ev->type() == TQEvent::AccelOverride )
{
- QKeyEvent *e = static_cast<QKeyEvent *>( ev );
+ TQKeyEvent *e = static_cast<TQKeyEvent *>( ev );
if (overrideAccel (e))
{
e->accept();
return true;
}
}
- else if( ev->type() == QEvent::KeyPress )
+ else if( ev->type() == TQEvent::KeyPress )
{
- QKeyEvent *e = static_cast<QKeyEvent *>( ev );
+ TQKeyEvent *e = static_cast<TQKeyEvent *>( ev );
if( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter )
{
@@ -1033,7 +1033,7 @@ bool KLineEdit::eventFilter( QObject* o, QEvent* ev )
// Qt will emit returnPressed() itself if we return false
if ( stopEvent )
{
- emit QLineEdit::returnPressed();
+ emit TQLineEdit::returnPressed();
e->accept ();
}
@@ -1051,7 +1051,7 @@ bool KLineEdit::eventFilter( QObject* o, QEvent* ev )
}
}
}
- return QLineEdit::eventFilter( o, ev );
+ return TQLineEdit::eventFilter( o, ev );
}
@@ -1088,18 +1088,18 @@ void KLineEdit::setCompletionBox( KCompletionBox *box )
d->completionBox = box;
if ( handleSignals() )
{
- connect( d->completionBox, SIGNAL(highlighted( const QString& )),
- SLOT(setTextWorkaround( const QString& )) );
- connect( d->completionBox, SIGNAL(userCancelled( const QString& )),
- SLOT(userCancelled( const QString& )) );
+ connect( d->completionBox, TQT_SIGNAL(highlighted( const TQString& )),
+ TQT_SLOT(setTextWorkaround( const TQString& )) );
+ connect( d->completionBox, TQT_SIGNAL(userCancelled( const TQString& )),
+ TQT_SLOT(userCancelled( const TQString& )) );
// TODO: we need our own slot, and to call setModified(true) if Qt4 has that.
- connect( d->completionBox, SIGNAL( activated( const QString& )),
- SIGNAL(completionBoxActivated( const QString& )) );
+ connect( d->completionBox, TQT_SIGNAL( activated( const TQString& )),
+ TQT_SIGNAL(completionBoxActivated( const TQString& )) );
}
}
-void KLineEdit::userCancelled(const QString & cancelText)
+void KLineEdit::userCancelled(const TQString & cancelText)
{
if ( completionMode() != KGlobalSettings::CompletionPopupAuto )
{
@@ -1115,14 +1115,14 @@ void KLineEdit::userCancelled(const QString & cancelText)
d->autoSuggest=false;
int start,end;
getSelection(&start, &end);
- QString s=text().remove(start, end-start+1);
+ TQString s=text().remove(start, end-start+1);
validateAndSet(s,start,s.length(),s.length());
d->autoSuggest=true;
}
}
}
-bool KLineEdit::overrideAccel (const QKeyEvent* e)
+bool KLineEdit::overrideAccel (const TQKeyEvent* e)
{
KShortcut scKey;
@@ -1192,14 +1192,14 @@ bool KLineEdit::overrideAccel (const QKeyEvent* e)
return false;
}
-void KLineEdit::setCompletedItems( const QStringList& items )
+void KLineEdit::setCompletedItems( const TQStringList& items )
{
setCompletedItems( items, true );
}
-void KLineEdit::setCompletedItems( const QStringList& items, bool autoSuggest )
+void KLineEdit::setCompletedItems( const TQStringList& items, bool autoSuggest )
{
- QString txt;
+ TQString txt;
if ( d->completionBox && d->completionBox->isVisible() ) {
// The popup is visible already - do the matching on the initial string,
// not on the currently selected one.
@@ -1217,9 +1217,9 @@ void KLineEdit::setCompletedItems( const QStringList& items, bool autoSuggest )
if ( d->completionBox->isVisible() )
{
bool wasSelected = d->completionBox->isSelected( d->completionBox->currentItem() );
- const QString currentSelection = d->completionBox->currentText();
+ const TQString currentSelection = d->completionBox->currentText();
d->completionBox->setItems( items );
- QListBoxItem* item = d->completionBox->findItem( currentSelection, Qt::ExactMatch );
+ TQListBoxItem* item = d->completionBox->findItem( currentSelection, Qt::ExactMatch );
// If no item is selected, that means the listbox hasn't been manipulated by the user yet,
// because it's not possible otherwise to have no selected item. In such case make
// always the first item current and unselected, so that the current item doesn't jump.
@@ -1247,7 +1247,7 @@ void KLineEdit::setCompletedItems( const QStringList& items, bool autoSuggest )
if ( d->autoSuggest && autoSuggest )
{
int index = items.first().find( txt );
- QString newText = items.first().mid( index );
+ TQString newText = items.first().mid( index );
setUserSelection(false);
setCompletedText(newText,true);
}
@@ -1273,38 +1273,38 @@ void KLineEdit::setCompletionObject( KCompletion* comp, bool hsig )
{
KCompletion *oldComp = compObj();
if ( oldComp && handleSignals() )
- disconnect( oldComp, SIGNAL( matches( const QStringList& )),
- this, SLOT( setCompletedItems( const QStringList& )));
+ disconnect( oldComp, TQT_SIGNAL( matches( const TQStringList& )),
+ this, TQT_SLOT( setCompletedItems( const TQStringList& )));
if ( comp && hsig )
- connect( comp, SIGNAL( matches( const QStringList& )),
- this, SLOT( setCompletedItems( const QStringList& )));
+ connect( comp, TQT_SIGNAL( matches( const TQStringList& )),
+ this, TQT_SLOT( setCompletedItems( const TQStringList& )));
KCompletionBase::setCompletionObject( comp, hsig );
}
-// QWidget::create() turns off mouse-Tracking which would break auto-hiding
+// TQWidget::create() turns off mouse-Tracking which would break auto-hiding
void KLineEdit::create( WId id, bool initializeWindow, bool destroyOldWindow )
{
- QLineEdit::create( id, initializeWindow, destroyOldWindow );
+ TQLineEdit::create( id, initializeWindow, destroyOldWindow );
KCursor::setAutoHideCursor( this, true, true );
}
void KLineEdit::setUserSelection(bool userSelection)
{
- QPalette p = palette();
+ TQPalette p = palette();
if (userSelection)
{
- p.setColor(QColorGroup::Highlight, d->previousHighlightColor);
- p.setColor(QColorGroup::HighlightedText, d->previousHighlightedTextColor);
+ p.setColor(TQColorGroup::Highlight, d->previousHighlightColor);
+ p.setColor(TQColorGroup::HighlightedText, d->previousHighlightedTextColor);
}
else
{
- QColor color=p.color(QPalette::Disabled, QColorGroup::Text);
- p.setColor(QColorGroup::HighlightedText, color);
- color=p.color(QPalette::Active, QColorGroup::Base);
- p.setColor(QColorGroup::Highlight, color);
+ TQColor color=p.color(TQPalette::Disabled, TQColorGroup::Text);
+ p.setColor(TQColorGroup::HighlightedText, color);
+ color=p.color(TQPalette::Active, TQColorGroup::Base);
+ p.setColor(TQColorGroup::Highlight, color);
}
d->userSelection=userSelection;
@@ -1321,16 +1321,16 @@ void KLineEdit::slotRestoreSelectionColors()
void KLineEdit::clear()
{
- setText( QString::null );
+ setText( TQString::null );
}
-void KLineEdit::setTextWorkaround( const QString& text )
+void KLineEdit::setTextWorkaround( const TQString& text )
{
setText( text );
end( false ); // force cursor at end
}
-QString KLineEdit::originalText() const
+TQString KLineEdit::originalText() const
{
if ( d->enableSqueezedText && isReadOnly() )
return d->squeezedText;
@@ -1338,27 +1338,27 @@ QString KLineEdit::originalText() const
return text();
}
-void KLineEdit::focusInEvent( QFocusEvent* ev)
+void KLineEdit::focusInEvent( TQFocusEvent* ev)
{
if ( d->drawClickMsg ) {
d->drawClickMsg = false;
update();
}
- // Don't selectAll() in QLineEdit::focusInEvent if selection exists
- if ( ev->reason() == QFocusEvent::Tab && inputMask().isNull() && hasSelectedText() )
+ // Don't selectAll() in TQLineEdit::focusInEvent if selection exists
+ if ( ev->reason() == TQFocusEvent::Tab && inputMask().isNull() && hasSelectedText() )
return;
- QLineEdit::focusInEvent(ev);
+ TQLineEdit::focusInEvent(ev);
}
-void KLineEdit::focusOutEvent( QFocusEvent* ev)
+void KLineEdit::focusOutEvent( TQFocusEvent* ev)
{
if ( text().isEmpty() && !d->clickMessage.isEmpty() ) {
d->drawClickMsg = true;
update();
}
- QLineEdit::focusOutEvent( ev );
+ TQLineEdit::focusOutEvent( ev );
}
bool KLineEdit::autoSuggest() const
@@ -1366,13 +1366,13 @@ bool KLineEdit::autoSuggest() const
return d->autoSuggest;
}
-void KLineEdit::setClickMessage( const QString &msg )
+void KLineEdit::setClickMessage( const TQString &msg )
{
d->clickMessage = msg;
update();
}
-QString KLineEdit::clickMessage() const
+TQString KLineEdit::clickMessage() const
{
return d->clickMessage;
}
diff --git a/kdeui/klineedit.h b/kdeui/klineedit.h
index bd3cb6faf..2be05aa57 100644
--- a/kdeui/klineedit.h
+++ b/kdeui/klineedit.h
@@ -30,7 +30,7 @@
#ifndef _KLINEEDIT_H
#define _KLINEEDIT_H
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kcompletion.h>
class QPopupMenu;
@@ -39,11 +39,11 @@ class KCompletionBox;
class KURL;
/**
- * An enhanced QLineEdit widget for inputting text.
+ * An enhanced TQLineEdit widget for inputting text.
*
* \b Detail \n
*
- * This widget inherits from QLineEdit and implements the following
+ * This widget inherits from TQLineEdit and implements the following
* additional functionalities: a completion object that provides both
* automatic and manual text completion as well as multiple match iteration
* features, configurable key-bindings to activate these features and a
@@ -51,13 +51,13 @@ class KURL;
* modes on the fly based on their preference.
*
* To support these new features KLineEdit also emits a few more
- * additional signals. These are: completion( const QString& ),
- * textRotation( KeyBindingType ), and returnPressed( const QString& ).
+ * additional signals. These are: completion( const TQString& ),
+ * textRotation( KeyBindingType ), and returnPressed( const TQString& ).
* The completion signal can be connected to a slot that will assist the
* user in filling out the remaining text. The text rotation signal is
* intended to be used to iterate through the list of all possible matches
* whenever there is more than one match for the entered text. The
- * @p returnPressed( const QString& ) signals are the same as QLineEdit's
+ * @p returnPressed( const TQString& ) signals are the same as QLineEdit's
* except it provides the current text in the widget as its argument whenever
* appropriate.
*
@@ -79,10 +79,10 @@ class KURL;
* individual key-bindings by using setKeyBinding() with the default
* second argument.
*
- * If @p EchoMode for this widget is set to something other than @p QLineEdit::Normal,
+ * If @p EchoMode for this widget is set to something other than @p TQLineEdit::Normal,
* the completion mode will always be defaulted to KGlobalSettings::CompletionNone.
* This is done purposefully to guard against protected entries such as passwords being
- * cached in KCompletion's list. Hence, if the @p EchoMode is not QLineEdit::Normal, the
+ * cached in KCompletion's list. Hence, if the @p EchoMode is not TQLineEdit::Normal, the
* completion mode is automatically disabled.
*
* A read-only KLineEdit will have the same background color as a
@@ -99,7 +99,7 @@ class KURL;
* KLineEdit *edit = new KLineEdit( this, "mywidget" );
* KCompletion *comp = edit->completionObject();
* // Connect to the return pressed signal - optional
- * connect(edit,SIGNAL(returnPressed(const QString&)),comp,SLOT(addItem(const QString&)));
+ * connect(edit,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&)));
* \endcode
*
* To use a customized completion objects or your
@@ -110,7 +110,7 @@ class KURL;
* KURLCompletion *comp = new KURLCompletion();
* edit->setCompletionObject( comp );
* // Connect to the return pressed signal - optional
- * connect(edit,SIGNAL(returnPressed(const QString&)),comp,SLOT(addItem(const QString&)));
+ * connect(edit,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&)));
* \endcode
*
* Note if you specify your own completion object you have to either delete
@@ -142,7 +142,7 @@ class KURL;
* @author Dawit Alemayehu <adawit@kde.org>
*/
-class KDEUI_EXPORT KLineEdit : public QLineEdit, public KCompletionBase
+class KDEUI_EXPORT KLineEdit : public TQLineEdit, public KCompletionBase
{
friend class KComboBox;
@@ -152,7 +152,7 @@ class KDEUI_EXPORT KLineEdit : public QLineEdit, public KCompletionBase
Q_PROPERTY( bool trapEnterKeyEvent READ trapReturnKey WRITE setTrapReturnKey )
Q_PROPERTY( bool enableSqueezedText READ isSqueezedTextEnabled WRITE setEnableSqueezedText )
// @since 3.5.4
- Q_PROPERTY( QString clickMessage READ clickMessage WRITE setClickMessage )
+ Q_PROPERTY( TQString clickMessage READ clickMessage WRITE setClickMessage )
public:
@@ -164,7 +164,7 @@ public:
* @param parent The parent object of this widget.
* @param name the name of this widget
*/
- KLineEdit( const QString &string, QWidget *parent, const char *name = 0 );
+ KLineEdit( const TQString &string, TQWidget *parent, const char *name = 0 );
/**
* Constructs a KLineEdit object with a parent and a name.
@@ -172,7 +172,7 @@ public:
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- KLineEdit ( QWidget *parent=0, const char *name=0 );
+ KLineEdit ( TQWidget *parent=0, const char *name=0 );
/**
* Destructor.
@@ -188,11 +188,11 @@ public:
/**
* Puts the text cursor at the end of the string.
*
- * This method is deprecated. Use QLineEdit::end()
+ * This method is deprecated. Use TQLineEdit::end()
* instead.
*
* @deprecated
- * QLineEdit::end()
+ * TQLineEdit::end()
*/
void cursorAtEnd() { end( false ); }
@@ -230,7 +230,7 @@ public:
/**
* Enables/Disables handling of URL drops. If enabled and the user
* drops an URL, the decoded URL will be inserted. Otherwise the default
- * behavior of QLineEdit is used, which inserts the encoded URL.
+ * behavior of TQLineEdit is used, which inserts the encoded URL.
*
* @param enable If @p true, insert decoded URLs
*/
@@ -265,7 +265,7 @@ public:
* Re-implemented for internal reasons. API not affected.
*
*/
- virtual bool eventFilter( QObject *, QEvent * );
+ virtual bool eventFilter( TQObject *, TQEvent * );
/**
* @returns the completion-box, that is used in completion mode
@@ -291,8 +291,8 @@ public:
* Enable text squeezing whenever the supplied text is too long.
* Only works for "read-only" mode.
*
- * Note that once text squeezing is enabled, QLineEdit::text()
- * and QLineEdit::displayText() return the squeezed text. If
+ * Note that once text squeezing is enabled, TQLineEdit::text()
+ * and TQLineEdit::displayText() return the squeezed text. If
* you want the original text, use @ref originalText.
*
* @see QLineEdit
@@ -311,12 +311,12 @@ public:
/**
* Returns the original text if text squeezing is enabled.
* If the widget is not in "read-only" mode, this function
- * returns the same thing as QLineEdit::text().
+ * returns the same thing as TQLineEdit::text().
*
* @see QLineEdit
* @since 3.2
*/
- QString originalText() const;
+ TQString originalText() const;
/**
* Set the completion-box to be used in completion mode
@@ -334,13 +334,13 @@ public:
* the purpose of the line edit.
* @since 3.5.4
*/
- void setClickMessage( const QString &msg );
+ void setClickMessage( const TQString &msg );
/**
* @return the message set with setClickMessage
* @since 3.5.4
*/
- QString clickMessage() const;
+ TQString clickMessage() const;
signals:
@@ -348,16 +348,16 @@ signals:
* Emitted whenever the completion box is activated.
* @since 3.1
*/
- void completionBoxActivated (const QString &);
+ void completionBoxActivated (const TQString &);
/**
* Emitted when the user presses the return key.
*
* The argument is the current text. Note that this
* signal is @em not emitted if the widget's @p EchoMode is set to
- * QLineEdit::EchoMode.
+ * TQLineEdit::EchoMode.
*/
- void returnPressed( const QString& );
+ void returnPressed( const TQString& );
/**
* Emitted when the completion key is pressed.
@@ -366,12 +366,12 @@ signals:
* completion mode is set to @p CompletionNone or @p EchoMode is
* @em normal.
*/
- void completion( const QString& );
+ void completion( const TQString& );
/**
* Emitted when the shortcut for substring completion is pressed.
*/
- void substringCompletion( const QString& );
+ void substringCompletion( const TQString& );
/**
* Emitted when the text rotation key-bindings are pressed.
@@ -405,7 +405,7 @@ signals:
*
* @param p the context menu about to be displayed
*/
- void aboutToShowContextMenu( QPopupMenu * p );
+ void aboutToShowContextMenu( TQPopupMenu * p );
public slots:
@@ -429,7 +429,7 @@ public slots:
/**
* See KCompletionBase::setCompletedText.
*/
- virtual void setCompletedText( const QString& );
+ virtual void setCompletedText( const TQString& );
/**
* Sets @p items into the completion-box if completionMode() is
@@ -437,7 +437,7 @@ public slots:
*
* @param items list of completion matches to be shown in the completion box.
*/
- void setCompletedItems( const QStringList& items );
+ void setCompletedItems( const TQStringList& items );
/**
* Same as the above function except it allows you to temporarily
@@ -449,10 +449,10 @@ public slots:
* @param items list of completion matches to be shown in the completion box.
* @param autoSuggest true if you want automatic text completion (suggestion) enabled.
*/
- void setCompletedItems( const QStringList& items, bool autoSuggest );
+ void setCompletedItems( const TQStringList& items, bool autoSuggest );
/**
- * Reimplemented to workaround a buggy QLineEdit::clear()
+ * Reimplemented to workaround a buggy TQLineEdit::clear()
* (changing the clipboard to the text we just had in the lineedit)
*/
virtual void clear();
@@ -462,12 +462,12 @@ public slots:
* This can only be used with read-only line-edits.
* @since 3.1
*/
- void setSqueezedText( const QString &text);
+ void setSqueezedText( const TQString &text);
/**
* Re-implemented to enable text squeezing. API is not affected.
*/
- virtual void setText ( const QString& );
+ virtual void setText ( const TQString& );
protected slots:
@@ -476,7 +476,7 @@ protected slots:
* Completes the remaining text with a matching one from
* a given list.
*/
- virtual void makeCompletion( const QString& );
+ virtual void makeCompletion( const TQString& );
/**
* @deprecated. Will be removed in the next major release!
@@ -493,72 +493,72 @@ protected slots:
* Call this function to revert a text completion if the user
* cancels the request. Mostly applies to popup completions.
*/
- void userCancelled(const QString & cancelText);
+ void userCancelled(const TQString & cancelText);
protected:
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::resizeEvent().
+ * See TQLineEdit::resizeEvent().
*/
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::keyPressEvent().
+ * See TQLineEdit::keyPressEvent().
*/
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::mousePressEvent().
+ * See TQLineEdit::mousePressEvent().
*/
- virtual void mousePressEvent( QMouseEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QWidget::mouseDoubleClickEvent().
+ * See TQWidget::mouseDoubleClickEvent().
*/
- virtual void mouseDoubleClickEvent( QMouseEvent * );
+ virtual void mouseDoubleClickEvent( TQMouseEvent * );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::mouseReleaseEvent().
+ * See TQLineEdit::mouseReleaseEvent().
*/
- virtual void mouseReleaseEvent( QMouseEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::contextMenuEvent().
+ * See TQLineEdit::contextMenuEvent().
*/
- virtual void contextMenuEvent( QContextMenuEvent * );
+ virtual void contextMenuEvent( TQContextMenuEvent * );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::createPopupMenu().
+ * See TQLineEdit::createPopupMenu().
*/
- virtual QPopupMenu *createPopupMenu();
+ virtual TQPopupMenu *createPopupMenu();
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QFrame::drawContents().
+ * See TQFrame::drawContents().
*/
- virtual void drawContents( QPainter *p );
+ virtual void drawContents( TQPainter *p );
/**
* Re-implemented to handle URI drops.
*
- * See QLineEdit::dropEvent().
+ * See TQLineEdit::dropEvent().
*/
- virtual void dropEvent( QDropEvent * );
+ virtual void dropEvent( TQDropEvent * );
/*
* This function simply sets the lineedit text and
@@ -568,7 +568,7 @@ protected:
* @param text
* @param marked
*/
- virtual void setCompletedText( const QString& /*text*/, bool /*marked*/ );
+ virtual void setCompletedText( const TQString& /*text*/, bool /*marked*/ );
/**
@@ -586,16 +586,16 @@ protected:
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::focusInEvent().
+ * See TQLineEdit::focusInEvent().
*/
- virtual void focusInEvent( QFocusEvent* );
+ virtual void focusInEvent( TQFocusEvent* );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::focusOutEvent().
+ * See TQLineEdit::focusOutEvent().
*/
- virtual void focusOutEvent( QFocusEvent* );
+ virtual void focusOutEvent( TQFocusEvent* );
/**
* Whether in current state text should be auto-suggested
@@ -607,7 +607,7 @@ private slots:
void completionMenuActivated( int id );
void tripleClickTimeout(); // resets possibleTripleClick
void slotRestoreSelectionColors();
- void setTextWorkaround( const QString& text );
+ void setTextWorkaround( const TQString& text );
private:
@@ -634,7 +634,7 @@ private:
* Checks whether we should/should not consume a key used as
* an accelerator.
*/
- bool overrideAccel (const QKeyEvent* e);
+ bool overrideAccel (const TQKeyEvent* e);
/**
* Properly sets the squeezed text whenever the widget is
diff --git a/kdeui/klineeditdlg.cpp b/kdeui/klineeditdlg.cpp
index 3d299dad2..9551fc1f6 100644
--- a/kdeui/klineeditdlg.cpp
+++ b/kdeui/klineeditdlg.cpp
@@ -18,13 +18,13 @@
*/
#include <config.h>
-#include <qvalidator.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#undef Unsorted // Required for --enable-final (qdir.h)
-#include <qfiledialog.h>
+#include <tqvalidator.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#undef Unsorted // Required for --enable-final (tqdir.h)
+#include <tqfiledialog.h>
#include <kbuttonbox.h>
#include <klocale.h>
@@ -34,24 +34,24 @@
#include "klineeditdlg.h"
-KLineEditDlg::KLineEditDlg( const QString&_text, const QString& _value,
- QWidget *parent )
- : KDialogBase( Plain, QString::null, Ok|Cancel|User1, Ok, parent, 0L, true,
+KLineEditDlg::KLineEditDlg( const TQString&_text, const TQString& _value,
+ TQWidget *parent )
+ : KDialogBase( Plain, TQString::null, Ok|Cancel|User1, Ok, parent, 0L, true,
true, KStdGuiItem::clear() )
{
- QVBoxLayout *topLayout = new QVBoxLayout( plainPage(), 0, spacingHint() );
- QLabel *label = new QLabel(_text, plainPage() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
+ TQLabel *label = new TQLabel(_text, plainPage() );
topLayout->addWidget( label, 1 );
edit = new KLineEdit( plainPage(), 0L );
edit->setMinimumWidth(edit->sizeHint().width() * 3);
label->setBuddy(edit); // please "scheck" style
- // connect( edit, SIGNAL(returnPressed()), SLOT(accept()) );
- connect( edit, SIGNAL(textChanged(const QString&)),
- SLOT(slotTextChanged(const QString&)) );
+ // connect( edit, TQT_SIGNAL(returnPressed()), TQT_SLOT(accept()) );
+ connect( edit, TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotTextChanged(const TQString&)) );
topLayout->addWidget( edit, 1 );
- connect( this, SIGNAL(user1Clicked()), this, SLOT(slotClear()) );
+ connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotClear()) );
edit->setText( _value );
if ( _value.isEmpty() )
{
@@ -65,18 +65,18 @@ KLineEditDlg::KLineEditDlg( const QString&_text, const QString& _value,
#if 0
-KLineEditDlg::KLineEditDlg( const QString&_text, const QString& _value,
- QWidget *parent, bool _file_mode )
- : QDialog( parent, 0L, true )
+KLineEditDlg::KLineEditDlg( const TQString&_text, const TQString& _value,
+ TQWidget *parent, bool _file_mode )
+ : TQDialog( parent, 0L, true )
{
- QGridLayout *layout = new QGridLayout(this, 4, 3, 10);
+ TQGridLayout *layout = new TQGridLayout(this, 4, 3, 10);
- QLabel *label = new QLabel(_text, this);
+ TQLabel *label = new TQLabel(_text, this);
layout->addWidget(label, 0, 0, AlignLeft);
edit = new KLineEdit( this, 0L );
edit->setMinimumWidth(edit->sizeHint().width() * 3);
- connect( edit, SIGNAL(returnPressed()), SLOT(accept()) );
+ connect( edit, TQT_SIGNAL(returnPressed()), TQT_SLOT(accept()) );
if ( _file_mode ) {
completion = new KURLCompletion();
@@ -89,32 +89,32 @@ KLineEditDlg::KLineEditDlg( const QString&_text, const QString& _value,
layout->setColStretch(1, 1);
if (_file_mode) {
- QPushButton *browse = new QPushButton(i18n("&Browse..."), this);
+ TQPushButton *browse = new TQPushButton(i18n("&Browse..."), this);
layout->addWidget(browse, 1, 2, AlignCenter);
- connect(browse, SIGNAL(clicked()),
- SLOT(slotBrowse()));
+ connect(browse, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotBrowse()));
}
- QFrame *hLine = new QFrame(this);
- hLine->setFrameStyle(QFrame::Sunken|QFrame::HLine);
+ TQFrame *hLine = new TQFrame(this);
+ hLine->setFrameStyle(TQFrame::Sunken|TQFrame::HLine);
layout->addMultiCellWidget(hLine, 2, 2, 0, 2);
KButtonBox *bBox = new KButtonBox(this);
layout->addMultiCellWidget(bBox, 3, 3, 0, 2);
- QPushButton *ok = bBox->addButton(KStdGuiItem::ok());
+ TQPushButton *ok = bBox->addButton(KStdGuiItem::ok());
ok->setDefault(true);
- connect( ok, SIGNAL(clicked()), SLOT(accept()));
+ connect( ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept()));
bBox->addStretch(1);
- QPushButton *clear = bBox->addButton(KStdGuiItem::clear());
- connect( clear, SIGNAL(clicked()), SLOT(slotClear()));
+ TQPushButton *clear = bBox->addButton(KStdGuiItem::clear());
+ connect( clear, TQT_SIGNAL(clicked()), TQT_SLOT(slotClear()));
bBox->addStretch(1);
- QPushButton *cancel = bBox->addButton(KStdGuiItem::cancel());
- connect( cancel, SIGNAL(clicked()), SLOT(reject()));
+ TQPushButton *cancel = bBox->addButton(KStdGuiItem::cancel());
+ connect( cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
bBox->layout();
@@ -133,17 +133,17 @@ KLineEditDlg::~KLineEditDlg()
void KLineEditDlg::slotClear()
{
- edit->setText(QString::null);
+ edit->setText(TQString::null);
}
-void KLineEditDlg::slotTextChanged(const QString &text)
+void KLineEditDlg::slotTextChanged(const TQString &text)
{
bool on;
if ( edit->validator() ) {
- QString str = edit->text();
+ TQString str = edit->text();
int index = edit->cursorPosition();
on = ( edit->validator()->validate( str, index )
- == QValidator::Acceptable );
+ == TQValidator::Acceptable );
} else {
on = !text.isEmpty();
}
@@ -151,41 +151,41 @@ void KLineEditDlg::slotTextChanged(const QString &text)
enableButton(KDialogBase::User1, text.length());
}
-QString KLineEditDlg::text() const
+TQString KLineEditDlg::text() const
{
return edit->text();
}
-QString KLineEditDlg::getText(const QString &_text, const QString& _value,
- bool *ok, QWidget *parent, QValidator *_validator )
+TQString KLineEditDlg::getText(const TQString &_text, const TQString& _value,
+ bool *ok, TQWidget *parent, TQValidator *_validator )
{
KLineEditDlg dlg(_text, _value, parent );
dlg.lineEdit()->setValidator( _validator );
dlg.slotTextChanged( _value ); // trigger validation
- bool ok_ = dlg.exec() == QDialog::Accepted;
+ bool ok_ = dlg.exec() == TQDialog::Accepted;
if ( ok )
*ok = ok_;
if ( ok_ )
return dlg.text();
- return QString::null;
+ return TQString::null;
}
-QString KLineEditDlg::getText(const QString &_caption, const QString &_text,
- const QString& _value,
- bool *ok, QWidget *parent, QValidator *_validator )
+TQString KLineEditDlg::getText(const TQString &_caption, const TQString &_text,
+ const TQString& _value,
+ bool *ok, TQWidget *parent, TQValidator *_validator )
{
KLineEditDlg dlg( _text, _value, parent );
dlg.setCaption( _caption );
dlg.lineEdit()->setValidator( _validator );
dlg.slotTextChanged( _value ); // trigger validation
- bool ok_ = dlg.exec() == QDialog::Accepted;
+ bool ok_ = dlg.exec() == TQDialog::Accepted;
if ( ok )
*ok = ok_;
if ( ok_ )
return dlg.text();
- return QString::null;
+ return TQString::null;
}
void KLineEditDlg::virtual_hook( int id, void* data )
diff --git a/kdeui/klineeditdlg.h b/kdeui/klineeditdlg.h
index e5d0d3302..1c0ab6b31 100644
--- a/kdeui/klineeditdlg.h
+++ b/kdeui/klineeditdlg.h
@@ -43,25 +43,25 @@ public:
* Create a dialog that asks for a single line of text. _value is
* the initial value of the line. _text appears as label on top of
* the entry box. If the internal line edit has an associated
- * QValidator set, the OK button is disabled as long as the
+ * TQValidator set, the OK button is disabled as long as the
* validator doesn't return Acceptable. If there's no validator, the
* OK button is enabled whenever the line edit isn't empty.
*
- * If you want to accept empty input, make a trivial QValidator that
- * always returns Acceptable, e.g. QRegExpValidator with a
+ * If you want to accept empty input, make a trivial TQValidator that
+ * always returns Acceptable, e.g. TQRegExpValidator with a
* regexp of ".*".
*
* @param _text Text of the label
* @param _value Initial value of the inputline
* @param parent Parent widget for the line edit dialog
*/
- KLineEditDlg( const QString& _text, const QString& _value, QWidget *parent ) KDE_DEPRECATED;
+ KLineEditDlg( const TQString& _text, const TQString& _value, TQWidget *parent ) KDE_DEPRECATED;
virtual ~KLineEditDlg();
/**
* @return the value the user entered
*/
- QString text() const;
+ TQString text() const;
/**
* @return the line edit widget
@@ -77,8 +77,8 @@ public:
* @param validator Validator to be stuffed into the line edit.
* @param parent The parent widget
*/
- static QString getText(const QString &text, const QString& value,
- bool *ok, QWidget *parent, QValidator *validator=0 ) KDE_DEPRECATED;
+ static TQString getText(const TQString &text, const TQString& value,
+ bool *ok, TQWidget *parent, TQValidator *validator=0 ) KDE_DEPRECATED;
/**
* Static convenience function to get a textual input from the user.
@@ -92,10 +92,10 @@ public:
* @param parent The parent widget for this text input dialog
* @param validator Validator to be stuffed into the line edit.
*/
- static QString getText(const QString &caption, const QString &text,
- const QString& value=QString::null,
- bool *ok=0, QWidget *parent=0,
- QValidator *validator=0) KDE_DEPRECATED;
+ static TQString getText(const TQString &caption, const TQString &text,
+ const TQString& value=TQString::null,
+ bool *ok=0, TQWidget *parent=0,
+ TQValidator *validator=0) KDE_DEPRECATED;
public slots:
/**
@@ -106,9 +106,9 @@ public slots:
protected slots:
/**
* Enables and disables the OK button depending on the state
- * returned by the lineedit's QValidator.
+ * returned by the lineedit's TQValidator.
*/
- void slotTextChanged( const QString& );
+ void slotTextChanged( const TQString& );
protected:
/**
diff --git a/kdeui/klistbox.cpp b/kdeui/klistbox.cpp
index e32418149..73a08b89a 100644
--- a/kdeui/klistbox.cpp
+++ b/kdeui/klistbox.cpp
@@ -17,7 +17,7 @@
*/
#include "config.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kglobalsettings.h>
#include <kcursor.h>
@@ -27,28 +27,28 @@
#include "klistbox.h"
-KListBox::KListBox( QWidget *parent, const char *name, WFlags f )
- : QListBox( parent, name, f ), d(0)
+KListBox::KListBox( TQWidget *parent, const char *name, WFlags f )
+ : TQListBox( parent, name, f ), d(0)
{
- connect( this, SIGNAL( onViewport() ),
- this, SLOT( slotOnViewport() ) );
- connect( this, SIGNAL( onItem( QListBoxItem * ) ),
- this, SLOT( slotOnItem( QListBoxItem * ) ) );
+ connect( this, TQT_SIGNAL( onViewport() ),
+ this, TQT_SLOT( slotOnViewport() ) );
+ connect( this, TQT_SIGNAL( onItem( TQListBoxItem * ) ),
+ this, TQT_SLOT( slotOnItem( TQListBoxItem * ) ) );
slotSettingsChanged(KApplication::SETTINGS_MOUSE);
if (kapp)
{
- connect( kapp, SIGNAL( settingsChanged(int) ), SLOT( slotSettingsChanged(int) ) );
+ connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) );
kapp->addKipcEventMask( KIPC::SettingsChanged );
}
m_pCurrentItem = 0L;
- m_pAutoSelect = new QTimer( this );
- connect( m_pAutoSelect, SIGNAL( timeout() ),
- this, SLOT( slotAutoSelect() ) );
+ m_pAutoSelect = new TQTimer( this );
+ connect( m_pAutoSelect, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAutoSelect() ) );
}
-void KListBox::slotOnItem( QListBoxItem *item )
+void KListBox::slotOnItem( TQListBoxItem *item )
{
if ( item && m_bChangeCursorOverItem && m_bUseSingle )
viewport()->setCursor( KCursor().handCursor() );
@@ -75,28 +75,28 @@ void KListBox::slotSettingsChanged(int category)
return;
m_bUseSingle = KGlobalSettings::singleClick();
- disconnect( this, SIGNAL( mouseButtonClicked( int, QListBoxItem *,
- const QPoint & ) ),
- this, SLOT( slotMouseButtonClicked( int, QListBoxItem *,
- const QPoint & ) ) );
-// disconnect( this, SIGNAL( doubleClicked( QListBoxItem *,
-// const QPoint & ) ),
-// this, SLOT( slotExecute( QListBoxItem *,
-// const QPoint & ) ) );
+ disconnect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *,
+ const TQPoint & ) ),
+ this, TQT_SLOT( slotMouseButtonClicked( int, TQListBoxItem *,
+ const TQPoint & ) ) );
+// disconnect( this, TQT_SIGNAL( doubleClicked( TQListBoxItem *,
+// const TQPoint & ) ),
+// this, TQT_SLOT( slotExecute( TQListBoxItem *,
+// const TQPoint & ) ) );
if( m_bUseSingle )
{
- connect( this, SIGNAL( mouseButtonClicked( int, QListBoxItem *,
- const QPoint & ) ),
- this, SLOT( slotMouseButtonClicked( int, QListBoxItem *,
- const QPoint & ) ) );
+ connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *,
+ const TQPoint & ) ),
+ this, TQT_SLOT( slotMouseButtonClicked( int, TQListBoxItem *,
+ const TQPoint & ) ) );
}
else
{
-// connect( this, SIGNAL( doubleClicked( QListBoxItem *,
-// const QPoint & ) ),
-// this, SLOT( slotExecute( QListBoxItem *,
-// const QPoint & ) ) );
+// connect( this, TQT_SIGNAL( doubleClicked( TQListBoxItem *,
+// const TQPoint & ) ),
+// this, TQT_SLOT( slotExecute( TQListBoxItem *,
+// const TQPoint & ) ) );
}
m_bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon();
@@ -118,7 +118,7 @@ void KListBox::slotAutoSelect()
ButtonState keybstate = KApplication::keyboardMouseState();
- QListBoxItem* previousItem = item( currentItem() );
+ TQListBoxItem* previousItem = item( currentItem() );
setCurrentItem( m_pCurrentItem );
if( m_pCurrentItem ) {
@@ -136,7 +136,7 @@ void KListBox::slotAutoSelect()
viewport()->setUpdatesEnabled( false );
bool down = index( previousItem ) < index( m_pCurrentItem );
- QListBoxItem* it = down ? previousItem : m_pCurrentItem;
+ TQListBoxItem* it = down ? previousItem : m_pCurrentItem;
for (;it ; it = it->next() ) {
if ( down && it == m_pCurrentItem ) {
setSelected( m_pCurrentItem, select );
@@ -155,7 +155,7 @@ void KListBox::slotAutoSelect()
emit selectionChanged();
- if( selectionMode() == QListBox::Single )
+ if( selectionMode() == TQListBox::Single )
emit selectionChanged( m_pCurrentItem );
}
else if( (keybstate & ControlButton) )
@@ -176,7 +176,7 @@ void KListBox::slotAutoSelect()
kdDebug() << "That´s not supposed to happen!!!!" << endl;
}
-void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos )
+void KListBox::emitExecute( TQListBoxItem *item, const TQPoint &pos )
{
ButtonState keybstate = KApplication::keyboardMouseState();
@@ -194,9 +194,9 @@ void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos )
// This widget is used in dialogs. It should ignore
// F1 (and combinations) and Escape since these are used
// to start help or close the dialog. This functionality
-// should be done in QListView but it is not (at least now)
+// should be done in TQListView but it is not (at least now)
//
-void KListBox::keyPressEvent(QKeyEvent *e)
+void KListBox::keyPressEvent(TQKeyEvent *e)
{
if( e->key() == Key_Escape )
{
@@ -208,25 +208,25 @@ void KListBox::keyPressEvent(QKeyEvent *e)
}
else
{
- QListBox::keyPressEvent(e);
+ TQListBox::keyPressEvent(e);
}
}
-void KListBox::focusOutEvent( QFocusEvent *fe )
+void KListBox::focusOutEvent( TQFocusEvent *fe )
{
m_pAutoSelect->stop();
- QListBox::focusOutEvent( fe );
+ TQListBox::focusOutEvent( fe );
}
-void KListBox::leaveEvent( QEvent *e )
+void KListBox::leaveEvent( TQEvent *e )
{
m_pAutoSelect->stop();
- QListBox::leaveEvent( e );
+ TQListBox::leaveEvent( e );
}
-void KListBox::contentsMousePressEvent( QMouseEvent *e )
+void KListBox::contentsMousePressEvent( TQMouseEvent *e )
{
if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) {
bool block = signalsBlocked();
@@ -237,14 +237,14 @@ void KListBox::contentsMousePressEvent( QMouseEvent *e )
blockSignals( block );
}
- QListBox::contentsMousePressEvent( e );
+ TQListBox::contentsMousePressEvent( e );
}
-void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void KListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
- QListBox::contentsMouseDoubleClickEvent( e );
+ TQListBox::contentsMouseDoubleClickEvent( e );
- QListBoxItem* item = itemAt( contentsToViewport( e->pos() ) );
+ TQListBoxItem* item = itemAt( contentsToViewport( e->pos() ) );
if( item ) {
emit doubleClicked( item, e->globalPos() );
@@ -254,7 +254,7 @@ void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
}
}
-void KListBox::slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos )
+void KListBox::slotMouseButtonClicked( int btn, TQListBoxItem *item, const TQPoint &pos )
{
if( (btn == LeftButton) && item )
emitExecute( item, pos );
diff --git a/kdeui/klistbox.h b/kdeui/klistbox.h
index ec1afc29f..b19819c79 100644
--- a/kdeui/klistbox.h
+++ b/kdeui/klistbox.h
@@ -18,31 +18,31 @@
#ifndef KLISTBOX_H
#define KLISTBOX_H
-#include <qlistbox.h>
+#include <tqlistbox.h>
#include <kdelibs_export.h>
/**
- * @short A variant of QListBox that honors KDE's system-wide settings.
+ * @short A variant of TQListBox that honors KDE's system-wide settings.
*
- * Extends the functionality of QListBox to honor the system
+ * Extends the functionality of TQListBox to honor the system
* wide settings for Single Click/Double Click mode, Auto Selection and
* Change Cursor over Link.
*
* There is a new signal executed(). It gets connected to either
- * QListBox::clicked() or QListBox::doubleClicked()
+ * TQListBox::clicked() or TQListBox::doubleClicked()
* depending on the KDE wide Single Click/Double Click settings. It is
* strongly recommended that you use this signal instead of the above
* mentioned. This way you don't need to care about the current
* settings. If you want to get informed when the user selects
- * something connect to the QListBox::selectionChanged() signal.
+ * something connect to the TQListBox::selectionChanged() signal.
**/
class KDEUI_EXPORT KListBox : public QListBox
{
Q_OBJECT
public:
- KListBox( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KListBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
signals:
@@ -53,10 +53,10 @@ signals:
* setting the user clicked or double clicked on that item.
* @param item is the pointer to the executed listbox item.
*
- * Note that you may not delete any QListBoxItem objects in slots
+ * Note that you may not delete any TQListBoxItem objects in slots
* connected to this signal.
*/
- void executed( QListBoxItem *item );
+ void executed( TQListBoxItem *item );
/**
* Emitted whenever the user executes an listbox item.
@@ -66,10 +66,10 @@ signals:
* @param item is the pointer to the executed listbox item.
* @param pos is the position where the user has clicked
*
- * Note that you may not delete any QListBoxItem objects in slots
+ * Note that you may not delete any TQListBoxItem objects in slots
* connected to this signal.
*/
- void executed( QListBoxItem *item, const QPoint &pos );
+ void executed( TQListBoxItem *item, const TQPoint &pos );
/**
* This signal gets emitted whenever the user double clicks into the
@@ -78,17 +78,17 @@ signals:
* @param item The pointer to the clicked listbox item.
* @param pos The position where the user has clicked.
*
- * Note that you may not delete any QListBoxItem objects in slots
+ * Note that you may not delete any TQListBoxItem objects in slots
* connected to this signal.
*
* This signal is more or less here for the sake of completeness.
* You should normally not need to use this. In most cases it's better
* to use executed() instead.
*/
- void doubleClicked( QListBoxItem *item, const QPoint &pos );
+ void doubleClicked( TQListBoxItem *item, const TQPoint &pos );
protected slots:
- void slotOnItem( QListBoxItem *item );
+ void slotOnItem( TQListBoxItem *item );
void slotOnViewport();
void slotSettingsChanged(int);
@@ -99,24 +99,24 @@ protected slots:
void slotAutoSelect();
protected:
- void emitExecute( QListBoxItem *item, const QPoint &pos );
+ void emitExecute( TQListBoxItem *item, const TQPoint &pos );
- virtual void keyPressEvent(QKeyEvent *e);
- virtual void focusOutEvent( QFocusEvent *fe );
- virtual void leaveEvent( QEvent *e );
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void contentsMouseDoubleClickEvent ( QMouseEvent *e );
+ virtual void keyPressEvent(TQKeyEvent *e);
+ virtual void focusOutEvent( TQFocusEvent *fe );
+ virtual void leaveEvent( TQEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void contentsMouseDoubleClickEvent ( TQMouseEvent *e );
bool m_bUseSingle;
bool m_bChangeCursorOverItem;
- QListBoxItem* m_pCurrentItem;
+ TQListBoxItem* m_pCurrentItem;
- QTimer* m_pAutoSelect;
+ TQTimer* m_pAutoSelect;
int m_autoSelectDelay;
private slots:
- void slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos );
+ void slotMouseButtonClicked( int btn, TQListBoxItem *item, const TQPoint &pos );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/klistview.cpp b/kdeui/klistview.cpp
index 9aeedfb2c..332bc4e8c 100644
--- a/kdeui/klistview.cpp
+++ b/kdeui/klistview.cpp
@@ -19,13 +19,13 @@
*/
#include "config.h"
-#include <qdragobject.h>
-#include <qtimer.h>
-#include <qheader.h>
-#include <qcursor.h>
-#include <qtooltip.h>
-#include <qstyle.h>
-#include <qpainter.h>
+#include <tqdragobject.h>
+#include <tqtimer.h>
+#include <tqheader.h>
+#include <tqcursor.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
#include <kglobalsettings.h>
#include <kconfig.h>
@@ -40,26 +40,26 @@
class KListView::Tooltip : public QToolTip
{
public:
- Tooltip (KListView* parent, QToolTipGroup* group = 0L);
+ Tooltip (KListView* parent, TQToolTipGroup* group = 0L);
virtual ~Tooltip () {}
protected:
/**
- * Reimplemented from QToolTip for internal reasons.
+ * Reimplemented from TQToolTip for internal reasons.
*/
- virtual void maybeTip (const QPoint&);
+ virtual void maybeTip (const TQPoint&);
private:
KListView* mParent;
};
-KListView::Tooltip::Tooltip (KListView* parent, QToolTipGroup* group)
- : QToolTip (parent, group),
+KListView::Tooltip::Tooltip (KListView* parent, TQToolTipGroup* group)
+ : TQToolTip (parent, group),
mParent (parent)
{
}
-void KListView::Tooltip::maybeTip (const QPoint&)
+void KListView::Tooltip::maybeTip (const TQPoint&)
{
// FIXME
}
@@ -104,7 +104,7 @@ public:
shadeSortColumn(KGlobalSettings::shadeSortColumn())
{
renameable.append(0);
- connect(editor, SIGNAL(done(QListViewItem*,int)), listview, SLOT(doneEditing(QListViewItem*,int)));
+ connect(editor, TQT_SIGNAL(done(TQListViewItem*,int)), listview, TQT_SLOT(doneEditing(TQListViewItem*,int)));
}
~KListViewPrivate ()
@@ -112,20 +112,20 @@ public:
delete editor;
}
- QListViewItem* pCurrentItem;
+ TQListViewItem* pCurrentItem;
- QTimer autoSelect;
+ TQTimer autoSelect;
int autoSelectDelay;
- QTimer dragExpand;
- QListViewItem* dragOverItem;
- QPoint dragOverPoint;
+ TQTimer dragExpand;
+ TQListViewItem* dragOverItem;
+ TQPoint dragOverPoint;
- QPoint startDragPos;
+ TQPoint startDragPos;
int dragDelay;
KListViewLineEdit *editor;
- QValueList<int> renameable;
+ TQValueList<int> renameable;
bool cursorInExecuteArea:1;
bool bUseSingle:1;
@@ -157,19 +157,19 @@ public:
int contextMenuKey;
bool showContextMenusOnPress;
- QRect mOldDropVisualizer;
+ TQRect mOldDropVisualizer;
int mDropVisualizerWidth;
- QRect mOldDropHighlighter;
- QListViewItem *afterItemDrop;
- QListViewItem *parentItemDrop;
+ TQRect mOldDropHighlighter;
+ TQListViewItem *afterItemDrop;
+ TQListViewItem *parentItemDrop;
- QListViewItem *paintAbove;
- QListViewItem *paintCurrent;
- QListViewItem *paintBelow;
+ TQListViewItem *paintAbove;
+ TQListViewItem *paintCurrent;
+ TQListViewItem *paintBelow;
bool painting:1;
bool shadeSortColumn:1;
- QColor alternateBackground;
+ TQColor alternateBackground;
};
@@ -178,33 +178,33 @@ KListViewLineEdit::KListViewLineEdit(KListView *parent)
{
setFrame( false );
hide();
- connect( parent, SIGNAL( selectionChanged() ), SLOT( slotSelectionChanged() ));
- connect( parent, SIGNAL( itemRemoved( QListViewItem * ) ),
- SLOT( slotItemRemoved( QListViewItem * ) ));
+ connect( parent, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotSelectionChanged() ));
+ connect( parent, TQT_SIGNAL( itemRemoved( TQListViewItem * ) ),
+ TQT_SLOT( slotItemRemoved( TQListViewItem * ) ));
}
KListViewLineEdit::~KListViewLineEdit()
{
}
-QListViewItem *KListViewLineEdit::currentItem() const
+TQListViewItem *KListViewLineEdit::currentItem() const
{
return item;
}
-void KListViewLineEdit::load(QListViewItem *i, int c)
+void KListViewLineEdit::load(TQListViewItem *i, int c)
{
item=i;
col=c;
- QRect rect(p->itemRect(i));
+ TQRect rect(p->itemRect(i));
setText(item->text(c));
home( true );
int fieldX = rect.x() - 1;
int fieldW = p->columnWidth(col) + 2;
- QHeader* const pHeader = p->header();
+ TQHeader* const pHeader = p->header();
const int pos = pHeader->mapToIndex(col);
for ( int index = 0; index < pos; ++index )
@@ -232,7 +232,7 @@ void KListViewLineEdit::load(QListViewItem *i, int c)
* tabOrderedRename functionality.
*/
-static int nextCol (KListView *pl, QListViewItem *pi, int start, int dir)
+static int nextCol (KListView *pl, TQListViewItem *pi, int start, int dir)
{
if (pi)
{
@@ -245,11 +245,11 @@ static int nextCol (KListView *pl, QListViewItem *pi, int start, int dir)
return -1;
}
-static QListViewItem *prevItem (QListViewItem *pi)
+static TQListViewItem *prevItem (TQListViewItem *pi)
{
- QListViewItem *pa = pi->itemAbove();
+ TQListViewItem *pa = pi->itemAbove();
- /* Does what the QListViewItem::previousSibling()
+ /* Does what the TQListViewItem::previousSibling()
* of my dreams would do.
*/
if (pa && pa->parent() == pi->parent())
@@ -258,30 +258,30 @@ static QListViewItem *prevItem (QListViewItem *pi)
return 0;
}
-static QListViewItem *lastQChild (QListViewItem *pi)
+static TQListViewItem *lastQChild (TQListViewItem *pi)
{
if (pi)
{
- /* Since there's no QListViewItem::lastChild().
+ /* Since there's no TQListViewItem::lastChild().
* This finds the last sibling for the given
* item.
*/
- for (QListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling())
+ for (TQListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling())
pi = pt;
}
return pi;
}
-void KListViewLineEdit::selectNextCell (QListViewItem *pitem, int column, bool forward)
+void KListViewLineEdit::selectNextCell (TQListViewItem *pitem, int column, bool forward)
{
const int ncols = p->columns();
const int dir = forward ? +1 : -1;
const int restart = forward ? 0 : (ncols - 1);
- QListViewItem *top = (pitem && pitem->parent())
+ TQListViewItem *top = (pitem && pitem->parent())
? pitem->parent()->firstChild()
: p->firstChild();
- QListViewItem *pi = pitem;
+ TQListViewItem *pi = pitem;
terminate(); // Save current changes
@@ -321,11 +321,11 @@ void KListViewLineEdit::selectNextCell (QListViewItem *pitem, int column, bool f
#undef KeyPress
#endif
-bool KListViewLineEdit::event (QEvent *pe)
+bool KListViewLineEdit::event (TQEvent *pe)
{
- if (pe->type() == QEvent::KeyPress)
+ if (pe->type() == TQEvent::KeyPress)
{
- QKeyEvent *k = (QKeyEvent *) pe;
+ TQKeyEvent *k = (TQKeyEvent *) pe;
if ((k->key() == Qt::Key_Backtab || k->key() == Qt::Key_Tab) &&
p->tabOrderedRenaming() && p->itemsRenameable() &&
@@ -340,7 +340,7 @@ bool KListViewLineEdit::event (QEvent *pe)
return KLineEdit::event(pe);
}
-void KListViewLineEdit::keyPressEvent(QKeyEvent *e)
+void KListViewLineEdit::keyPressEvent(TQKeyEvent *e)
{
if(e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter )
terminate(true);
@@ -368,7 +368,7 @@ void KListViewLineEdit::terminate(bool commit)
if (commit)
item->setText(col, text());
int c=col;
- QListViewItem *i=item;
+ TQListViewItem *i=item;
col=0;
item=0;
p->setFocus();// will call focusOutEvent, that's why we set item=0 before
@@ -378,22 +378,22 @@ void KListViewLineEdit::terminate(bool commit)
}
}
-void KListViewLineEdit::focusOutEvent(QFocusEvent *ev)
+void KListViewLineEdit::focusOutEvent(TQFocusEvent *ev)
{
- QFocusEvent * focusEv = static_cast<QFocusEvent*>(ev);
+ TQFocusEvent * focusEv = static_cast<TQFocusEvent*>(ev);
// Don't let a RMB close the editor
- if (focusEv->reason() != QFocusEvent::Popup && focusEv->reason() != QFocusEvent::ActiveWindow)
+ if (focusEv->reason() != TQFocusEvent::Popup && focusEv->reason() != TQFocusEvent::ActiveWindow)
terminate(true);
else
KLineEdit::focusOutEvent(ev);
}
-void KListViewLineEdit::paintEvent( QPaintEvent *e )
+void KListViewLineEdit::paintEvent( TQPaintEvent *e )
{
KLineEdit::paintEvent( e );
if ( !frame() ) {
- QPainter p( this );
+ TQPainter p( this );
p.setClipRegion( e->region() );
p.drawRect( rect() );
}
@@ -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(QListViewItem *i)
+void KListViewLineEdit::slotItemRemoved(TQListViewItem *i)
{
if (currentItem() != i)
return;
@@ -422,48 +422,48 @@ void KListViewLineEdit::slotItemRemoved(QListViewItem *i)
}
-KListView::KListView( QWidget *parent, const char *name )
- : QListView( parent, name ),
+KListView::KListView( TQWidget *parent, const char *name )
+ : TQListView( parent, name ),
d (new KListViewPrivate (this))
{
setDragAutoScroll(true);
- connect( this, SIGNAL( onViewport() ),
- this, SLOT( slotOnViewport() ) );
- connect( this, SIGNAL( onItem( QListViewItem * ) ),
- this, SLOT( slotOnItem( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( onViewport() ),
+ this, TQT_SLOT( slotOnViewport() ) );
+ connect( this, TQT_SIGNAL( onItem( TQListViewItem * ) ),
+ this, TQT_SLOT( slotOnItem( TQListViewItem * ) ) );
- connect (this, SIGNAL(contentsMoving(int,int)),
- this, SLOT(cleanDropVisualizer()));
- connect (this, SIGNAL(contentsMoving(int,int)),
- this, SLOT(cleanItemHighlighter()));
+ connect (this, TQT_SIGNAL(contentsMoving(int,int)),
+ this, TQT_SLOT(cleanDropVisualizer()));
+ connect (this, TQT_SIGNAL(contentsMoving(int,int)),
+ this, TQT_SLOT(cleanItemHighlighter()));
slotSettingsChanged(KApplication::SETTINGS_MOUSE);
if (kapp)
{
- connect( kapp, SIGNAL( settingsChanged(int) ), SLOT( slotSettingsChanged(int) ) );
+ connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) );
kapp->addKipcEventMask( KIPC::SettingsChanged );
}
- connect(&d->autoSelect, SIGNAL( timeout() ),
- this, SLOT( slotAutoSelect() ) );
- connect(&d->dragExpand, SIGNAL( timeout() ),
- this, SLOT( slotDragExpand() ) );
+ connect(&d->autoSelect, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAutoSelect() ) );
+ connect(&d->dragExpand, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotDragExpand() ) );
// context menu handling
if (d->showContextMenusOnPress)
{
- connect (this, SIGNAL (rightButtonPressed (QListViewItem*, const QPoint&, int)),
- this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ connect (this, TQT_SIGNAL (rightButtonPressed (TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int)));
}
else
{
- connect (this, SIGNAL (rightButtonClicked (QListViewItem*, const QPoint&, int)),
- this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ connect (this, TQT_SIGNAL (rightButtonClicked (TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int)));
}
- connect (this, SIGNAL (menuShortCutPressed (KListView*, QListViewItem*)),
- this, SLOT (emitContextMenu (KListView*, QListViewItem*)));
+ connect (this, TQT_SIGNAL (menuShortCutPressed (KListView*, TQListViewItem*)),
+ this, TQT_SLOT (emitContextMenu (KListView*, TQListViewItem*)));
d->alternateBackground = KGlobalSettings::alternateBackgroundColor();
}
@@ -472,9 +472,9 @@ KListView::~KListView()
delete d;
}
-bool KListView::isExecuteArea( const QPoint& point )
+bool KListView::isExecuteArea( const TQPoint& point )
{
- QListViewItem* item = itemAt( point );
+ TQListViewItem* item = itemAt( point );
if ( item ) {
return isExecuteArea( point.x(), item );
}
@@ -487,7 +487,7 @@ bool KListView::isExecuteArea( int x )
return isExecuteArea( x, 0 );
}
-bool KListView::isExecuteArea( int x, QListViewItem* item )
+bool KListView::isExecuteArea( int x, TQListViewItem* item )
{
if( allColumnsShowFocus() )
return true;
@@ -497,7 +497,7 @@ bool KListView::isExecuteArea( int x, QListViewItem* item )
int width = columnWidth( 0 );
- QHeader* const thisHeader = header();
+ TQHeader* const thisHeader = header();
const int pos = thisHeader->mapToIndex( 0 );
for ( int index = 0; index < pos; ++index )
@@ -521,9 +521,9 @@ bool KListView::isExecuteArea( int x, QListViewItem* item )
}
}
-void KListView::slotOnItem( QListViewItem *item )
+void KListView::slotOnItem( TQListViewItem *item )
{
- QPoint vp = viewport()->mapFromGlobal( QCursor::pos() );
+ TQPoint vp = viewport()->mapFromGlobal( TQCursor::pos() );
if ( item && isExecuteArea( vp.x() ) && (d->autoSelectDelay > -1) && d->bUseSingle ) {
d->autoSelect.start( d->autoSelectDelay, true );
d->pCurrentItem = item;
@@ -547,12 +547,12 @@ void KListView::slotSettingsChanged(int category)
d->dragDelay = KGlobalSettings::dndEventDelay();
d->bUseSingle = KGlobalSettings::singleClick();
- disconnect(this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)),
- this, SLOT (slotMouseButtonClicked (int, QListViewItem*, const QPoint &, int)));
+ disconnect(this, TQT_SIGNAL (mouseButtonClicked (int, TQListViewItem*, const TQPoint &, int)),
+ this, TQT_SLOT (slotMouseButtonClicked (int, TQListViewItem*, const TQPoint &, int)));
if( d->bUseSingle )
- connect (this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)),
- this, SLOT (slotMouseButtonClicked( int, QListViewItem*, const QPoint &, int)));
+ connect (this, TQT_SIGNAL (mouseButtonClicked (int, TQListViewItem*, const TQPoint &, int)),
+ this, TQT_SLOT (slotMouseButtonClicked( int, TQListViewItem*, const TQPoint &, int)));
d->bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon();
if ( !d->disableAutoSelection )
@@ -569,17 +569,17 @@ void KListView::slotSettingsChanged(int category)
if (d->showContextMenusOnPress)
{
- disconnect (0L, 0L, this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ disconnect (0L, 0L, this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int)));
- connect(this, SIGNAL (rightButtonPressed (QListViewItem*, const QPoint&, int)),
- this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ connect(this, TQT_SIGNAL (rightButtonPressed (TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int)));
}
else
{
- disconnect (0L, 0L, this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ disconnect (0L, 0L, this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int)));
- connect(this, SIGNAL (rightButtonClicked (QListViewItem*, const QPoint&, int)),
- this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ connect(this, TQT_SIGNAL (rightButtonClicked (TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int)));
}
break;
@@ -606,7 +606,7 @@ void KListView::slotAutoSelect()
ButtonState keybstate = KApplication::keyboardMouseState();
- QListViewItem* previousItem = currentItem();
+ TQListViewItem* previousItem = currentItem();
setCurrentItem( d->pCurrentItem );
if( d->pCurrentItem ) {
@@ -624,7 +624,7 @@ void KListView::slotAutoSelect()
viewport()->setUpdatesEnabled( false );
bool down = previousItem->itemPos() < d->pCurrentItem->itemPos();
- QListViewItemIterator lit( down ? previousItem : d->pCurrentItem );
+ TQListViewItemIterator lit( down ? previousItem : d->pCurrentItem );
for ( ; lit.current(); ++lit ) {
if ( down && lit.current() == d->pCurrentItem ) {
d->pCurrentItem->setSelected( select );
@@ -643,7 +643,7 @@ void KListView::slotAutoSelect()
emit selectionChanged();
- if( selectionMode() == QListView::Single )
+ if( selectionMode() == TQListView::Single )
emit selectionChanged( d->pCurrentItem );
}
else if( (keybstate & KApplication::ControlModifier) )
@@ -677,7 +677,7 @@ void KListView::slotHeaderChanged()
}
}
-void KListView::emitExecute( QListViewItem *item, const QPoint &pos, int c )
+void KListView::emitExecute( TQListViewItem *item, const TQPoint &pos, int c )
{
if( isExecuteArea( viewport()->mapFromGlobal(pos) ) ) {
d->validDrag=false;
@@ -705,14 +705,14 @@ void KListView::emitExecute( QListViewItem *item, const QPoint &pos, int c )
}
}
-void KListView::focusInEvent( QFocusEvent *fe )
+void KListView::focusInEvent( TQFocusEvent *fe )
{
// kdDebug()<<"KListView::focusInEvent()"<<endl;
- QListView::focusInEvent( fe );
+ TQListView::focusInEvent( fe );
if ((d->selectedBySimpleMove)
&& (d->selectionMode == FileManager)
- && (fe->reason()!=QFocusEvent::Popup)
- && (fe->reason()!=QFocusEvent::ActiveWindow)
+ && (fe->reason()!=TQFocusEvent::Popup)
+ && (fe->reason()!=TQFocusEvent::ActiveWindow)
&& (currentItem()))
{
currentItem()->setSelected(true);
@@ -721,7 +721,7 @@ void KListView::focusInEvent( QFocusEvent *fe )
};
}
-void KListView::focusOutEvent( QFocusEvent *fe )
+void KListView::focusOutEvent( TQFocusEvent *fe )
{
cleanDropVisualizer();
cleanItemHighlighter();
@@ -730,8 +730,8 @@ void KListView::focusOutEvent( QFocusEvent *fe )
if ((d->selectedBySimpleMove)
&& (d->selectionMode == FileManager)
- && (fe->reason()!=QFocusEvent::Popup)
- && (fe->reason()!=QFocusEvent::ActiveWindow)
+ && (fe->reason()!=TQFocusEvent::Popup)
+ && (fe->reason()!=TQFocusEvent::ActiveWindow)
&& (currentItem())
&& (!d->editor->isVisible()))
{
@@ -740,25 +740,25 @@ void KListView::focusOutEvent( QFocusEvent *fe )
emit selectionChanged();
};
- QListView::focusOutEvent( fe );
+ TQListView::focusOutEvent( fe );
}
-void KListView::leaveEvent( QEvent *e )
+void KListView::leaveEvent( TQEvent *e )
{
d->autoSelect.stop();
- QListView::leaveEvent( e );
+ TQListView::leaveEvent( e );
}
-bool KListView::event( QEvent *e )
+bool KListView::event( TQEvent *e )
{
- if (e->type() == QEvent::ApplicationPaletteChange)
+ if (e->type() == TQEvent::ApplicationPaletteChange)
d->alternateBackground=KGlobalSettings::alternateBackgroundColor();
- return QListView::event(e);
+ return TQListView::event(e);
}
-void KListView::contentsMousePressEvent( QMouseEvent *e )
+void KListView::contentsMousePressEvent( TQMouseEvent *e )
{
if( (selectionModeExt() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) )
{
@@ -781,8 +781,8 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
}
}
- QPoint p( contentsToViewport( e->pos() ) );
- QListViewItem *at = itemAt (p);
+ TQPoint p( contentsToViewport( e->pos() ) );
+ TQListViewItem *at = itemAt (p);
// true if the root decoration of the item "at" was clicked (i.e. the +/- sign)
bool rootDecoClicked = at
@@ -802,16 +802,16 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
}
}
- QListView::contentsMousePressEvent( e );
+ TQListView::contentsMousePressEvent( e );
}
-void KListView::contentsMouseMoveEvent( QMouseEvent *e )
+void KListView::contentsMouseMoveEvent( TQMouseEvent *e )
{
if (!dragEnabled() || d->startDragPos.isNull() || !d->validDrag)
- QListView::contentsMouseMoveEvent (e);
+ TQListView::contentsMouseMoveEvent (e);
- QPoint vp = contentsToViewport(e->pos());
- QListViewItem *item = itemAt( vp );
+ TQPoint vp = contentsToViewport(e->pos());
+ TQListViewItem *item = itemAt( vp );
//do we process cursor changes at all?
if ( item && d->bChangeCursorOverItem && d->bUseSingle )
@@ -830,30 +830,30 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e )
}
bool dragOn = dragEnabled();
- QPoint newPos = e->pos();
+ TQPoint newPos = e->pos();
if (dragOn && d->validDrag &&
(newPos.x() > d->startDragPos.x()+d->dragDelay ||
newPos.x() < d->startDragPos.x()-d->dragDelay ||
newPos.y() > d->startDragPos.y()+d->dragDelay ||
newPos.y() < d->startDragPos.y()-d->dragDelay))
- //(d->startDragPos - e->pos()).manhattanLength() > QApplication::startDragDistance())
+ //(d->startDragPos - e->pos()).manhattanLength() > TQApplication::startDragDistance())
{
- QListView::contentsMouseReleaseEvent( 0 );
+ TQListView::contentsMouseReleaseEvent( 0 );
startDrag();
- d->startDragPos = QPoint();
+ d->startDragPos = TQPoint();
d->validDrag = false;
}
}
-void KListView::contentsMouseReleaseEvent( QMouseEvent *e )
+void KListView::contentsMouseReleaseEvent( TQMouseEvent *e )
{
if (e->button() == LeftButton)
{
// If the row was already selected, maybe we want to start an in-place editing
if ( d->pressedOnSelected && itemsRenameable() )
{
- QPoint p( contentsToViewport( e->pos() ) );
- QListViewItem *at = itemAt (p);
+ TQPoint p( contentsToViewport( e->pos() ) );
+ TQListViewItem *at = itemAt (p);
if ( at )
{
// true if the root decoration of the item "at" was clicked (i.e. the +/- sign)
@@ -873,22 +873,22 @@ void KListView::contentsMouseReleaseEvent( QMouseEvent *e )
d->pressedOnSelected = false;
d->validDrag = false;
- d->startDragPos = QPoint();
+ d->startDragPos = TQPoint();
}
- QListView::contentsMouseReleaseEvent( e );
+ TQListView::contentsMouseReleaseEvent( e );
}
-void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
+void KListView::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)
- //QListView::contentsMouseDoubleClickEvent( e );
+ //TQListView::contentsMouseDoubleClickEvent( e );
if ( !e || e->button() != LeftButton )
return;
- QPoint vp = contentsToViewport(e->pos());
- QListViewItem *item = itemAt( vp );
- emit QListView::doubleClicked( item ); // we do it now
+ TQPoint vp = contentsToViewport(e->pos());
+ TQListViewItem *item = itemAt( vp );
+ emit TQListView::doubleClicked( item ); // we do it now
int col = item ? header()->mapToLogical( header()->cellAt( vp.x() ) ) : -1;
@@ -900,13 +900,13 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
}
}
-void KListView::slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c )
+void KListView::slotMouseButtonClicked( int btn, TQListViewItem *item, const TQPoint &pos, int c )
{
if( (btn == LeftButton) && item )
emitExecute(item, pos, c);
}
-void KListView::contentsDropEvent(QDropEvent* e)
+void KListView::contentsDropEvent(TQDropEvent* e)
{
cleanDropVisualizer();
cleanItemHighlighter();
@@ -915,8 +915,8 @@ void KListView::contentsDropEvent(QDropEvent* e)
if (acceptDrag (e))
{
e->acceptAction();
- QListViewItem *afterme;
- QListViewItem *parent;
+ TQListViewItem *afterme;
+ TQListViewItem *parent;
findDrop(e->pos(), parent, afterme);
@@ -932,12 +932,12 @@ void KListView::contentsDropEvent(QDropEvent* e)
}
}
-void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
+void KListView::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme)
{
- QPtrList<QListViewItem> items, afterFirsts, afterNows;
- QListViewItem *current=currentItem();
+ TQPtrList<TQListViewItem> items, afterFirsts, afterNows;
+ TQListViewItem *current=currentItem();
bool hasMoved=false;
- for (QListViewItem *i = firstChild(), *iNext=0; i; i = iNext)
+ for (TQListViewItem *i = firstChild(), *iNext=0; i; i = iNext)
{
iNext=i->itemBelow();
if (!i->isSelected())
@@ -950,7 +950,7 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
i->setSelected(false);
- QListViewItem *afterFirst = i->itemAbove();
+ TQListViewItem *afterFirst = i->itemAbove();
if (!hasMoved)
{
@@ -971,7 +971,7 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
afterme = i;
}
clearSelection();
- for (QListViewItem *i=items.first(); i; i=items.next() )
+ for (TQListViewItem *i=items.first(); i; i=items.next() )
i->setSelected(true);
if (current)
setCurrentItem(current);
@@ -982,7 +982,7 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
emit moved();
}
-void KListView::contentsDragMoveEvent(QDragMoveEvent *event)
+void KListView::contentsDragMoveEvent(TQDragMoveEvent *event)
{
if (acceptDrag(event))
{
@@ -990,8 +990,8 @@ void KListView::contentsDragMoveEvent(QDragMoveEvent *event)
//Clean up the view
findDrop(event->pos(), d->parentItemDrop, d->afterItemDrop);
- QPoint vp = contentsToViewport( event->pos() );
- QListViewItem *item = isExecuteArea( vp ) ? itemAt( vp ) : 0L;
+ TQPoint vp = contentsToViewport( event->pos() );
+ TQListViewItem *item = isExecuteArea( vp ) ? itemAt( vp ) : 0L;
if ( item != d->dragOverItem )
{
@@ -999,11 +999,11 @@ void KListView::contentsDragMoveEvent(QDragMoveEvent *event)
d->dragOverItem = item;
d->dragOverPoint = vp;
if ( d->dragOverItem && d->dragOverItem->isExpandable() && !d->dragOverItem->isOpen() )
- d->dragExpand.start( QApplication::startDragTime(), true );
+ d->dragExpand.start( TQApplication::startDragTime(), true );
}
if (dropVisualizer())
{
- QRect tmpRect = drawDropVisualizer(0, d->parentItemDrop, d->afterItemDrop);
+ TQRect tmpRect = drawDropVisualizer(0, d->parentItemDrop, d->afterItemDrop);
if (tmpRect != d->mOldDropVisualizer)
{
cleanDropVisualizer();
@@ -1013,7 +1013,7 @@ void KListView::contentsDragMoveEvent(QDragMoveEvent *event)
}
if (dropHighlighter())
{
- QRect tmpRect = drawItemHighlighter(0, itemAt( vp ));
+ TQRect tmpRect = drawItemHighlighter(0, itemAt( vp ));
if (tmpRect != d->mOldDropHighlighter)
{
cleanItemHighlighter();
@@ -1032,7 +1032,7 @@ void KListView::slotDragExpand()
d->dragOverItem->setOpen( true );
}
-void KListView::contentsDragLeaveEvent (QDragLeaveEvent*)
+void KListView::contentsDragLeaveEvent (TQDragLeaveEvent*)
{
d->dragExpand.stop();
cleanDropVisualizer();
@@ -1043,8 +1043,8 @@ void KListView::cleanDropVisualizer()
{
if (d->mOldDropVisualizer.isValid())
{
- QRect rect=d->mOldDropVisualizer;
- d->mOldDropVisualizer = QRect();
+ TQRect rect=d->mOldDropVisualizer;
+ d->mOldDropVisualizer = TQRect();
viewport()->repaint(rect, true);
}
}
@@ -1054,14 +1054,14 @@ int KListView::depthToPixels( int depth )
return treeStepSize() * ( depth + (rootIsDecorated() ? 1 : 0) ) + itemMargin();
}
-void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after)
+void KListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after)
{
- QPoint p (contentsToViewport(pos));
+ TQPoint p (contentsToViewport(pos));
// Get the position to put it in
- QListViewItem *atpos = itemAt(p);
+ TQListViewItem *atpos = itemAt(p);
- QListViewItem *above;
+ TQListViewItem *above;
if (!atpos) // put it at the end
above = lastItem();
else
@@ -1100,8 +1100,8 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte
// Ok, there's one more level of complexity. We may want to become a new
// sibling, but of an upper-level group, rather than the "above" item
- QListViewItem * betterAbove = above->parent();
- QListViewItem * last = above;
+ TQListViewItem * betterAbove = above->parent();
+ TQListViewItem * last = above;
while ( betterAbove )
{
// We are allowed to become a sibling of "betterAbove" only if we are
@@ -1123,9 +1123,9 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte
parent = after ? after->parent() : 0L ;
}
-QListViewItem* KListView::lastChild () const
+TQListViewItem* KListView::lastChild () const
{
- QListViewItem* lastchild = firstChild();
+ TQListViewItem* lastchild = firstChild();
if (lastchild)
for (; lastchild->nextSibling(); lastchild = lastchild->nextSibling());
@@ -1133,11 +1133,11 @@ QListViewItem* KListView::lastChild () const
return lastchild;
}
-QListViewItem *KListView::lastItem() const
+TQListViewItem *KListView::lastItem() const
{
- QListViewItem* last = lastChild();
+ TQListViewItem* last = lastChild();
- for (QListViewItemIterator it (last); it.current(); ++it)
+ for (TQListViewItemIterator it (last); it.current(); ++it)
last = it.current();
return last;
@@ -1150,7 +1150,7 @@ KLineEdit *KListView::renameLineEdit() const
void KListView::startDrag()
{
- QDragObject *drag = dragObject();
+ TQDragObject *drag = dragObject();
if (!drag)
return;
@@ -1159,13 +1159,13 @@ void KListView::startDrag()
emit moved();
}
-QDragObject *KListView::dragObject()
+TQDragObject *KListView::dragObject()
{
if (!currentItem())
return 0;
- return new QStoredDrag("application/x-qlistviewitem", viewport());
+ return new TQStoredDrag("application/x-qlistviewitem", viewport());
}
void KListView::setItemsMovable(bool b)
@@ -1219,14 +1219,14 @@ void KListView::setDropVisualizer(bool b)
d->dropVisualizer=b;
}
-QPtrList<QListViewItem> KListView::selectedItems() const
+TQPtrList<TQListViewItem> KListView::selectedItems() const
{
return selectedItems(true);
}
-QPtrList<QListViewItem> KListView::selectedItems(bool includeHiddenItems) const
+TQPtrList<TQListViewItem> KListView::selectedItems(bool includeHiddenItems) const
{
- QPtrList<QListViewItem> list;
+ TQPtrList<TQListViewItem> list;
// Using selectionMode() instead of selectionModeExt() since for the cases that
// we're interested in selectionMode() should work for either variety of the
@@ -1242,13 +1242,13 @@ QPtrList<QListViewItem> KListView::selectedItems(bool includeHiddenItems) const
break;
default:
{
- int flags = QListViewItemIterator::Selected;
+ int flags = TQListViewItemIterator::Selected;
if (!includeHiddenItems)
{
- flags |= QListViewItemIterator::Visible;
+ flags |= TQListViewItemIterator::Visible;
}
- QListViewItemIterator it(const_cast<KListView *>(this), flags);
+ TQListViewItemIterator it(const_cast<KListView *>(this), flags);
for(; it.current(); ++it)
list.append(it.current());
@@ -1261,10 +1261,10 @@ QPtrList<QListViewItem> KListView::selectedItems(bool includeHiddenItems) const
}
-void KListView::moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after)
+void KListView::moveItem(TQListViewItem *item, TQListViewItem *parent, TQListViewItem *after)
{
// sanity check - don't move a item into its own child structure
- QListViewItem *i = parent;
+ TQListViewItem *i = parent;
while(i)
{
if(i == item)
@@ -1278,7 +1278,7 @@ void KListView::moveItem(QListViewItem *item, QListViewItem *parent, QListViewIt
return;
}
- // Basically reimplementing the QListViewItem(QListViewItem*, QListViewItem*) constructor
+ // Basically reimplementing the TQListViewItem(TQListViewItem*, TQListViewItem*) constructor
// in here, without ever deleting the item.
if (item->parent())
item->parent()->takeItem(item);
@@ -1291,7 +1291,7 @@ void KListView::moveItem(QListViewItem *item, QListViewItem *parent, QListViewIt
insertItem(item);
}
-void KListView::contentsDragEnterEvent(QDragEnterEvent *event)
+void KListView::contentsDragEnterEvent(TQDragEnterEvent *event)
{
if (acceptDrag (event))
event->accept();
@@ -1302,19 +1302,19 @@ void KListView::setDropVisualizerWidth (int w)
d->mDropVisualizerWidth = w > 0 ? w : 1;
}
-QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent,
- QListViewItem *after)
+TQRect KListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent,
+ TQListViewItem *after)
{
- QRect insertmarker;
+ TQRect insertmarker;
if (!after && !parent)
- insertmarker = QRect (0, 0, viewport()->width(), d->mDropVisualizerWidth/2);
+ insertmarker = TQRect (0, 0, viewport()->width(), d->mDropVisualizerWidth/2);
else
{
int level = 0;
if (after)
{
- QListViewItem* it = 0L;
+ TQListViewItem* it = 0L;
if (after->isOpen())
{
// Look for the last child (recursively)
@@ -1349,17 +1349,17 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent,
return insertmarker;
}
-QRect KListView::drawItemHighlighter(QPainter *painter, QListViewItem *item)
+TQRect KListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item)
{
- QRect r;
+ TQRect r;
if (item)
{
r = itemRect(item);
r.setLeft(r.left()+(item->depth()+(rootIsDecorated() ? 1 : 0))*treeStepSize());
if (painter)
- style().drawPrimitive(QStyle::PE_FocusRect, painter, r, colorGroup(),
- QStyle::Style_FocusAtBorder, colorGroup().highlight());
+ style().drawPrimitive(TQStyle::PE_FocusRect, painter, r, colorGroup(),
+ TQStyle::Style_FocusAtBorder, colorGroup().highlight());
}
return r;
@@ -1369,13 +1369,13 @@ void KListView::cleanItemHighlighter ()
{
if (d->mOldDropHighlighter.isValid())
{
- QRect rect=d->mOldDropHighlighter;
- d->mOldDropHighlighter = QRect();
+ TQRect rect=d->mOldDropHighlighter;
+ d->mOldDropHighlighter = TQRect();
viewport()->repaint(rect, true);
}
}
-void KListView::rename(QListViewItem *item, int c)
+void KListView::rename(TQListViewItem *item, int c)
{
if (d->renameable.contains(c))
{
@@ -1398,13 +1398,13 @@ void KListView::setRenameable (int col, bool renameable)
d->renameable+=col;
}
-void KListView::doneEditing(QListViewItem *item, int row)
+void KListView::doneEditing(TQListViewItem *item, int row)
{
emit itemRenamed(item, item->text(row), row);
emit itemRenamed(item);
}
-bool KListView::acceptDrag(QDropEvent* e) const
+bool KListView::acceptDrag(TQDropEvent* e) const
{
return acceptDrops() && itemsMovable() && (e->source()==viewport());
}
@@ -1440,12 +1440,12 @@ bool KListView::dropHighlighter() const
return d->dropHighlighter;
}
-bool KListView::showTooltip(QListViewItem *item, const QPoint &, int column) const
+bool KListView::showTooltip(TQListViewItem *item, const TQPoint &, int column) const
{
return ((column==tooltipColumn()) && !tooltip(item, column).isEmpty());
}
-QString KListView::tooltip(QListViewItem *item, int column) const
+TQString KListView::tooltip(TQListViewItem *item, int column) const
{
return item->text(column);
}
@@ -1460,7 +1460,7 @@ bool KListView::tabOrderedRenaming() const
return d->tabRename;
}
-void KListView::keyPressEvent (QKeyEvent* e)
+void KListView::keyPressEvent (TQKeyEvent* e)
{
//don't we need a contextMenuModifier too ? (aleXXX)
if (e->key() == d->contextMenuKey)
@@ -1470,7 +1470,7 @@ void KListView::keyPressEvent (QKeyEvent* e)
}
if (d->selectionMode != FileManager)
- QListView::keyPressEvent (e);
+ TQListView::keyPressEvent (e);
else
fileManagerKeyPressEvent (e);
}
@@ -1497,7 +1497,7 @@ bool KListView::automaticSelection() const
return d->selectedBySimpleMove;
}
-void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
+void KListView::fileManagerKeyPressEvent (TQKeyEvent* e)
{
//don't care whether it's on the keypad or not
int e_state=(e->state() & ~Keypad);
@@ -1516,19 +1516,19 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
//d->wasShiftEvent = (e_state == ShiftButton);
- QListViewItem* item = currentItem();
+ TQListViewItem* item = currentItem();
if (!item) return;
- QListViewItem* repaintItem1 = item;
- QListViewItem* repaintItem2 = 0L;
- QListViewItem* visItem = 0L;
+ TQListViewItem* repaintItem1 = item;
+ TQListViewItem* repaintItem2 = 0L;
+ TQListViewItem* visItem = 0L;
- QListViewItem* nextItem = 0L;
+ TQListViewItem* nextItem = 0L;
int items = 0;
bool shiftOrCtrl((e_state==ControlButton) || (e_state==ShiftButton));
int selectedItems(0);
- for (QListViewItem *tmpItem=firstChild(); tmpItem; tmpItem=tmpItem->nextSibling())
+ for (TQListViewItem *tmpItem=firstChild(); tmpItem; tmpItem=tmpItem->nextSibling())
if (tmpItem->isSelected()) selectedItems++;
if (((!selectedItems) || ((selectedItems==1) && (d->selectedUsingMouse)))
@@ -1788,9 +1788,9 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
if (realKey && selectCurrentItem)
item->setSelected(false);
//this is mainly for the "goto filename beginning with pressed char" feature (aleXXX)
- QListView::SelectionMode oldSelectionMode = selectionMode();
- setSelectionMode (QListView::Multi);
- QListView::keyPressEvent (e);
+ TQListView::SelectionMode oldSelectionMode = selectionMode();
+ setSelectionMode (TQListView::Multi);
+ TQListView::keyPressEvent (e);
setSelectionMode (oldSelectionMode);
if (realKey && selectCurrentItem)
{
@@ -1806,7 +1806,7 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
if (visItem)
ensureItemVisible(visItem);
- QRect ir;
+ TQRect ir;
if (repaintItem1)
ir = ir.unite( itemRect(repaintItem1) );
if (repaintItem2)
@@ -1837,11 +1837,11 @@ void KListView::setSelectionModeExt (SelectionModeExt mode)
case Multi:
case Extended:
case NoSelection:
- setSelectionMode (static_cast<QListView::SelectionMode>(static_cast<int>(mode)));
+ setSelectionMode (static_cast<TQListView::SelectionMode>(static_cast<int>(mode)));
break;
case FileManager:
- setSelectionMode (QListView::Extended);
+ setSelectionMode (TQListView::Extended);
break;
default:
@@ -1855,7 +1855,7 @@ KListView::SelectionModeExt KListView::selectionModeExt () const
return d->selectionMode;
}
-int KListView::itemIndex( const QListViewItem *item ) const
+int KListView::itemIndex( const TQListViewItem *item ) const
{
if ( !item )
return -1;
@@ -1863,7 +1863,7 @@ int KListView::itemIndex( const QListViewItem *item ) const
if ( item == firstChild() )
return 0;
else {
- QListViewItemIterator it(firstChild());
+ TQListViewItemIterator it(firstChild());
uint j = 0;
for (; it.current() && it.current() != item; ++it, ++j );
@@ -1874,13 +1874,13 @@ int KListView::itemIndex( const QListViewItem *item ) const
}
}
-QListViewItem* KListView::itemAtIndex(int index)
+TQListViewItem* KListView::itemAtIndex(int index)
{
if (index<0)
return 0;
int j(0);
- for (QListViewItemIterator it=firstChild(); it.current(); ++it)
+ for (TQListViewItemIterator it=firstChild(); it.current(); ++it)
{
if (j==index)
return it.current();
@@ -1890,9 +1890,9 @@ QListViewItem* KListView::itemAtIndex(int index)
}
-void KListView::emitContextMenu (KListView*, QListViewItem* i)
+void KListView::emitContextMenu (KListView*, TQListViewItem* i)
{
- QPoint p;
+ TQPoint p;
if (i)
p = viewport()->mapToGlobal(itemRect(i).center());
@@ -1902,14 +1902,14 @@ void KListView::emitContextMenu (KListView*, QListViewItem* i)
emit contextMenu (this, i, p);
}
-void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int)
+void KListView::emitContextMenu (TQListViewItem* i, const TQPoint& p, int)
{
emit contextMenu (this, i, p);
}
void KListView::setAcceptDrops (bool val)
{
- QListView::setAcceptDrops (val);
+ TQListView::setAcceptDrops (val);
viewport()->setAcceptDrops (val);
}
@@ -1919,29 +1919,29 @@ int KListView::dropVisualizerWidth () const
}
-void KListView::viewportPaintEvent(QPaintEvent *e)
+void KListView::viewportPaintEvent(TQPaintEvent *e)
{
d->paintAbove = 0;
d->paintCurrent = 0;
d->paintBelow = 0;
d->painting = true;
- QListView::viewportPaintEvent(e);
+ TQListView::viewportPaintEvent(e);
if (d->mOldDropVisualizer.isValid() && e->rect().intersects(d->mOldDropVisualizer))
{
- QPainter painter(viewport());
+ TQPainter painter(viewport());
// This is where we actually draw the drop-visualizer
painter.fillRect(d->mOldDropVisualizer, Dense4Pattern);
}
if (d->mOldDropHighlighter.isValid() && e->rect().intersects(d->mOldDropHighlighter))
{
- QPainter painter(viewport());
+ TQPainter painter(viewport());
// This is where we actually draw the drop-highlighter
- style().drawPrimitive(QStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, colorGroup(),
- QStyle::Style_FocusAtBorder);
+ style().drawPrimitive(TQStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, colorGroup(),
+ TQStyle::Style_FocusAtBorder);
}
d->painting = false;
}
@@ -1962,9 +1962,9 @@ bool KListView::fullWidth() const
return d->fullWidth;
}
-int KListView::addColumn(const QString& label, int width)
+int KListView::addColumn(const TQString& label, int width)
{
- int result = QListView::addColumn(label, width);
+ int result = TQListView::addColumn(label, width);
if (d->fullWidth) {
header()->setStretchEnabled(false, columns()-2);
header()->setStretchEnabled(true, columns()-1);
@@ -1972,9 +1972,9 @@ int KListView::addColumn(const QString& label, int width)
return result;
}
-int KListView::addColumn(const QIconSet& iconset, const QString& label, int width)
+int KListView::addColumn(const TQIconSet& iconset, const TQString& label, int width)
{
- int result = QListView::addColumn(iconset, label, width);
+ int result = TQListView::addColumn(iconset, label, width);
if (d->fullWidth) {
header()->setStretchEnabled(false, columns()-2);
header()->setStretchEnabled(true, columns()-1);
@@ -1984,21 +1984,21 @@ int KListView::addColumn(const QIconSet& iconset, const QString& label, int widt
void KListView::removeColumn(int index)
{
- QListView::removeColumn(index);
+ TQListView::removeColumn(index);
if (d->fullWidth && index == columns()) header()->setStretchEnabled(true, columns()-1);
}
-void KListView::viewportResizeEvent(QResizeEvent* e)
+void KListView::viewportResizeEvent(TQResizeEvent* e)
{
- QListView::viewportResizeEvent(e);
+ TQListView::viewportResizeEvent(e);
}
-const QColor &KListView::alternateBackground() const
+const TQColor &KListView::alternateBackground() const
{
return d->alternateBackground;
}
-void KListView::setAlternateBackground(const QColor &c)
+void KListView::setAlternateBackground(const TQColor &c)
{
d->alternateBackground = c;
repaint();
@@ -2015,17 +2015,17 @@ bool KListView::shadeSortColumn() const
return d->shadeSortColumn;
}
-void KListView::saveLayout(KConfig *config, const QString &group) const
+void KListView::saveLayout(KConfig *config, const TQString &group) const
{
KConfigGroupSaver saver(config, group);
- QStringList widths, order;
+ TQStringList widths, order;
const int colCount = columns();
- QHeader* const thisHeader = header();
+ TQHeader* const thisHeader = header();
for (int i = 0; i < colCount; ++i)
{
- widths << QString::number(columnWidth(i));
- order << QString::number(thisHeader->mapToIndex(i));
+ widths << TQString::number(columnWidth(i));
+ order << TQString::number(thisHeader->mapToIndex(i));
}
config->writeEntry("ColumnWidths", widths);
config->writeEntry("ColumnOrder", order);
@@ -2033,14 +2033,14 @@ void KListView::saveLayout(KConfig *config, const QString &group) const
config->writeEntry("SortAscending", d->sortAscending);
}
-void KListView::restoreLayout(KConfig *config, const QString &group)
+void KListView::restoreLayout(KConfig *config, const TQString &group)
{
KConfigGroupSaver saver(config, group);
- QStringList cols = config->readListEntry("ColumnWidths");
+ TQStringList cols = config->readListEntry("ColumnWidths");
int i = 0;
{ // scope the iterators
- QStringList::ConstIterator it = cols.constBegin();
- const QStringList::ConstIterator itEnd = cols.constEnd();
+ TQStringList::ConstIterator it = cols.constBegin();
+ const TQStringList::ConstIterator itEnd = cols.constEnd();
for (; it != itEnd; ++it)
setColumnWidth(i++, (*it).toInt());
}
@@ -2052,8 +2052,8 @@ void KListView::restoreLayout(KConfig *config, const QString &group)
const int colCount = columns();
for (i = 0; i < colCount; ++i) // final index positions from lowest to highest
{
- QStringList::ConstIterator it = cols.constBegin();
- const QStringList::ConstIterator itEnd = cols.constEnd();
+ TQStringList::ConstIterator it = cols.constBegin();
+ const TQStringList::ConstIterator itEnd = cols.constEnd();
int section = 0;
for (; (it != itEnd) && ((*it).toInt() != i); ++it, ++section) ;
@@ -2070,15 +2070,15 @@ void KListView::restoreLayout(KConfig *config, const QString &group)
void KListView::setSorting(int column, bool ascending)
{
- QListViewItem *selected = 0;
+ TQListViewItem *selected = 0;
- if (selectionMode() == QListView::Single) {
+ if (selectionMode() == TQListView::Single) {
selected = selectedItem();
if (selected && !selected->isVisible())
selected = 0;
}
- else if (selectionMode() != QListView::NoSelection) {
- QListViewItem *item = firstChild();
+ else if (selectionMode() != TQListView::NoSelection) {
+ TQListViewItem *item = firstChild();
while (item && !selected) {
if (item->isSelected() && item->isVisible())
selected = item;
@@ -2088,12 +2088,12 @@ void KListView::setSorting(int column, bool ascending)
d->sortColumn = column;
d->sortAscending = ascending;
- QListView::setSorting(column, ascending);
+ TQListView::setSorting(column, ascending);
if (selected)
ensureItemVisible(selected);
- QListViewItem* item = firstChild();
+ TQListViewItem* item = firstChild();
while ( item ) {
KListViewItem *kItem = dynamic_cast<KListViewItem*>(item);
if (kItem) kItem->m_known = false;
@@ -2111,12 +2111,12 @@ bool KListView::ascendingSort(void) const
return d->sortAscending;
}
-void KListView::takeItem(QListViewItem *item)
+void KListView::takeItem(TQListViewItem *item)
{
if(item && item == d->editor->currentItem())
d->editor->terminate();
- QListView::takeItem(item);
+ TQListView::takeItem(item);
}
void KListView::disableAutoSelection()
@@ -2138,63 +2138,63 @@ void KListView::resetAutoSelection()
d->autoSelectDelay = KGlobalSettings::autoSelectDelay();
}
-void KListView::doubleClicked( QListViewItem *item, const QPoint &pos, int c )
+void KListView::doubleClicked( TQListViewItem *item, const TQPoint &pos, int c )
{
- emit QListView::doubleClicked( item, pos, c );
+ emit TQListView::doubleClicked( item, pos, c );
}
-KListViewItem::KListViewItem(QListView *parent)
- : QListViewItem(parent)
+KListViewItem::KListViewItem(TQListView *parent)
+ : TQListViewItem(parent)
{
init();
}
-KListViewItem::KListViewItem(QListViewItem *parent)
- : QListViewItem(parent)
+KListViewItem::KListViewItem(TQListViewItem *parent)
+ : TQListViewItem(parent)
{
init();
}
-KListViewItem::KListViewItem(QListView *parent, QListViewItem *after)
- : QListViewItem(parent, after)
+KListViewItem::KListViewItem(TQListView *parent, TQListViewItem *after)
+ : TQListViewItem(parent, after)
{
init();
}
-KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after)
- : QListViewItem(parent, after)
+KListViewItem::KListViewItem(TQListViewItem *parent, TQListViewItem *after)
+ : TQListViewItem(parent, after)
{
init();
}
-KListViewItem::KListViewItem(QListView *parent,
- QString label1, QString label2, QString label3, QString label4,
- QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
+KListViewItem::KListViewItem(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)
{
init();
}
-KListViewItem::KListViewItem(QListViewItem *parent,
- QString label1, QString label2, QString label3, QString label4,
- QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
+KListViewItem::KListViewItem(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)
{
init();
}
-KListViewItem::KListViewItem(QListView *parent, QListViewItem *after,
- QString label1, QString label2, QString label3, QString label4,
- QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
+KListViewItem::KListViewItem(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)
{
init();
}
-KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after,
- QString label1, QString label2, QString label3, QString label4,
- QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
+KListViewItem::KListViewItem(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)
{
init();
}
@@ -2213,31 +2213,31 @@ void KListViewItem::init()
emit lv->itemAdded(this);
}
-void KListViewItem::insertItem(QListViewItem *item)
+void KListViewItem::insertItem(TQListViewItem *item)
{
- QListViewItem::insertItem(item);
+ TQListViewItem::insertItem(item);
if(listView())
emit static_cast<KListView *>(listView())->itemAdded(item);
}
-void KListViewItem::takeItem(QListViewItem *item)
+void KListViewItem::takeItem(TQListViewItem *item)
{
- QListViewItem::takeItem(item);
+ TQListViewItem::takeItem(item);
if(listView())
emit static_cast<KListView *>(listView())->itemRemoved(item);
}
-const QColor &KListViewItem::backgroundColor()
+const TQColor &KListViewItem::backgroundColor()
{
if (isAlternate())
return static_cast< KListView* >(listView())->alternateBackground();
return listView()->viewport()->colorGroup().base();
}
-QColor KListViewItem::backgroundColor(int column)
+TQColor KListViewItem::backgroundColor(int column)
{
KListView* view = static_cast< KListView* >(listView());
- QColor color = isAlternate() ?
+ TQColor color = isAlternate() ?
view->alternateBackground() :
view->viewport()->colorGroup().base();
@@ -2245,7 +2245,7 @@ QColor KListViewItem::backgroundColor(int column)
if ( (view->columns() > 1) && view->shadeSortColumn() && (column == view->columnSorted()) )
{
if ( color == Qt::black )
- color = QColor(55, 55, 55); // dark gray
+ color = TQColor(55, 55, 55); // dark gray
else
{
int h,s,v;
@@ -2335,25 +2335,25 @@ bool KListViewItem::isAlternate()
return false;
}
-void KListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+void KListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment)
{
- QColorGroup _cg = cg;
- QListView* lv = listView();
- const QPixmap *pm = lv->viewport()->backgroundPixmap();
+ TQColorGroup _cg = cg;
+ TQListView* lv = listView();
+ const TQPixmap *pm = lv->viewport()->backgroundPixmap();
if (pm && !pm->isNull())
{
- _cg.setBrush(QColorGroup::Base, QBrush(backgroundColor(column), *pm));
- QPoint o = p->brushOrigin();
+ _cg.setBrush(TQColorGroup::Base, TQBrush(backgroundColor(column), *pm));
+ TQPoint o = p->brushOrigin();
p->setBrushOrigin( o.x()-lv->contentsX(), o.y()-lv->contentsY() );
}
else
{
_cg.setColor((lv->viewport()->backgroundMode() == Qt::FixedColor) ?
- QColorGroup::Background : QColorGroup::Base,
+ TQColorGroup::Background : TQColorGroup::Base,
backgroundColor(column));
}
- QListViewItem::paintCell(p, _cg, column, width, alignment);
+ TQListViewItem::paintCell(p, _cg, column, width, alignment);
}
void KListView::virtual_hook( int, void* )
diff --git a/kdeui/klistview.h b/kdeui/klistview.h
index a2300f02e..fa785dbc8 100644
--- a/kdeui/klistview.h
+++ b/kdeui/klistview.h
@@ -20,31 +20,31 @@
#ifndef KLISTVIEW_H
#define KLISTVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdelibs_export.h>
class QDragObject;
class KConfig;
class KLineEdit;
/**
- * This Widget extends the functionality of QListView to honor the system
+ * This Widget extends the functionality of TQListView to honor the system
* wide settings for Single Click/Double Click mode, AutoSelection and
* ChangeCursorOverLink (TM).
*
* There is a new signal executed(). It gets connected to either
- * QListView::clicked() or QListView::doubleClicked() depending on the KDE
+ * TQListView::clicked() or TQListView::doubleClicked() depending on the KDE
* wide Single Click/Double Click settings. It is strongly recommended that
* you use this signal instead of the above mentioned. This way you don´t
* need to care about the current settings.
* If you want to get informed when the user selects something connect to the
- * QListView::selectionChanged() signal.
+ * TQListView::selectionChanged() signal.
*
* Drag-and-Drop is supported with the signal dropped(), just setAcceptDrops(true)
* and connect it to a suitable slot.
* To see where you are dropping, setDropVisualizer(true).
- * And also you'll need acceptDrag(QDropEvent*)
+ * And also you'll need acceptDrag(TQDropEvent*)
*
* KListView is drag-enabled, too: to benefit from that you have to derive from it.
* Reimplement dragObject() and (possibly) startDrag(),
@@ -64,7 +64,7 @@ class KDEUI_EXPORT KListView : public QListView
Q_PROPERTY( bool dropVisualizer READ dropVisualizer WRITE setDropVisualizer )
Q_PROPERTY( int tooltipColumn READ tooltipColumn WRITE setTooltipColumn )
Q_PROPERTY( int dropVisualizerWidth READ dropVisualizerWidth WRITE setDropVisualizerWidth )
- Q_PROPERTY( QColor alternateBackground READ alternateBackground WRITE setAlternateBackground )
+ Q_PROPERTY( TQColor alternateBackground READ alternateBackground WRITE setAlternateBackground )
Q_PROPERTY( bool shadeSortColumn READ shadeSortColumn WRITE setShadeSortColumn )
Q_OVERRIDE( SelectionModeExt selectionMode READ selectionModeExt WRITE setSelectionModeExt )
@@ -73,7 +73,7 @@ public:
/**
* Possible selection modes.
*
- * The first four correspond directly to QListView::SelectionMode, while
+ * The first four correspond directly to TQListView::SelectionMode, while
* the FileManager selection mode is defined as follows:
* @li home: move to the first
* @li end: move to the last
@@ -102,10 +102,10 @@ public:
* This way e.g. SHIFT+up/PgUp then SHIFT+down/PgDn leaves no item selected
*/
enum SelectionModeExt {
- Single = QListView::Single,
- Multi = QListView::Multi,
- Extended = QListView::Extended,
- NoSelection = QListView::NoSelection,
+ Single = TQListView::Single,
+ Multi = TQListView::Multi,
+ Extended = TQListView::Extended,
+ NoSelection = TQListView::NoSelection,
FileManager
};
@@ -113,9 +113,9 @@ public:
* Constructor.
*
* The parameters @p parent and @p name are handled by
- * QListView, as usual.
+ * TQListView, as usual.
*/
- KListView (QWidget *parent = 0, const char *name = 0);
+ KListView (TQWidget *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -133,14 +133,14 @@ public:
/**
* This function determines whether the given coordinates are within the
- * execute area. The execute area is the part of a QListViewItem where mouse
+ * execute area. The execute area is the part of a TQListViewItem where mouse
* clicks or double clicks respectively generate a executed() signal.
- * Depending on QListView::allColumnsShowFocus() this is either the
+ * Depending on TQListView::allColumnsShowFocus() this is either the
* whole item or only the first column.
* @return true if point is inside execute area of an item, false in all
* other cases including the case that it is over the viewport.
*/
- virtual bool isExecuteArea( const QPoint& point );
+ virtual bool isExecuteArea( const TQPoint& point );
/**
* Same thing, but from an x coordinate only. This only checks if x is in
@@ -154,7 +154,7 @@ public:
*
* @deprecated
*/
- QPtrList<QListViewItem> selectedItems() const;
+ TQPtrList<TQListViewItem> selectedItems() const;
/**
* @return a list containing the currently selected items.
@@ -166,7 +166,7 @@ public:
*
* @since 3.4
*/
- QPtrList<QListViewItem> selectedItems(bool includeHiddenItems) const; // ### BIC: KDE 4: use an implicitly shared class! (QValutList?) and merge with above, default to true
+ TQPtrList<TQListViewItem> selectedItems(bool includeHiddenItems) const; // ### BIC: KDE 4: use an implicitly shared class! (QValutList?) and merge with above, default to true
/**
* Arbitrarily move @p item to @p parent, positioned immediately after item @p after.
@@ -174,25 +174,25 @@ public:
*
* (Un-deprecated in kde-3.4)
*/
- void moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after);
+ void moveItem(TQListViewItem *item, TQListViewItem *parent, TQListViewItem *after);
/**
* @return the last item (not child!) of this listview.
*
* @see lastChild()
*/
- QListViewItem *lastItem() const;
+ TQListViewItem *lastItem() const;
/**
* @return the last child of this listview.
*
* @see lastItem()
*/
- QListViewItem* lastChild () const;
+ TQListViewItem* lastChild () const;
/**
* @return the lineedit used for inline renaming.
- * Use that to setup a KCompletion or QValidator for the lineedit
+ * Use that to setup a KCompletion or TQValidator for the lineedit
*
* @since 3.2
*/
@@ -284,14 +284,14 @@ public:
* @p item doesn't exist in this list view. This function takes
* all items into account not only the visible ones.
*/
- int itemIndex( const QListViewItem *item ) const;
+ int itemIndex( const TQListViewItem *item ) const;
/**
* Returns the item of @p index within the item tree or 0 if
* @p index doesn't exist in this list view. This function takes
* all items into account not only the visible ones.
*/
- QListViewItem* itemAtIndex(int index);
+ TQListViewItem* itemAtIndex(int index);
/**
* @deprecated
@@ -318,11 +318,11 @@ public:
*
* @see removeColumn()
*/
- virtual int addColumn(const QString& label, int width = -1);
+ virtual int addColumn(const TQString& label, int width = -1);
/**
* Reimplemented for full width support
*/
- virtual int addColumn(const QIconSet& iconset, const QString& label, int width = -1);
+ virtual int addColumn(const TQIconSet& iconset, const TQString& label, int width = -1);
/**
* Reimplemented for full width support
*
@@ -339,13 +339,13 @@ public:
*
* @see alternateBackground()
**/
- void setAlternateBackground(const QColor &c);
+ void setAlternateBackground(const TQColor &c);
/**
* @return the alternate background color
*
* @see setAlternateBackground()
*/
- const QColor &alternateBackground() const;
+ const TQColor &alternateBackground() const;
/**
* Saves the list view's layout (column widtsh, column order, sort column)
@@ -354,7 +354,7 @@ public:
* @param config the KConfig object to write to
* @param group the config group to use
*/
- void saveLayout(KConfig *config, const QString &group) const;
+ void saveLayout(KConfig *config, const TQString &group) const;
/**
* Reads the list view's layout from a KConfig group as stored with
* saveLayout
@@ -362,7 +362,7 @@ public:
* @param config the KConfig object to read from
* @param group the config group to use
*/
- void restoreLayout(KConfig *config, const QString &group);
+ void restoreLayout(KConfig *config, const TQString &group);
/**
* Reimplemented to remember the current sort column and order.
* @param column is the column to be sorted, or -1 to sort in order of
@@ -384,7 +384,7 @@ public:
/**
* Reimplemented for internal reasons.
*/
- virtual void takeItem(QListViewItem *i);
+ virtual void takeItem(TQListViewItem *i);
/**
* Set to true if the currently sorted column should be drawn shaded. Defaults to true
@@ -409,10 +409,10 @@ signals:
* setting the user clicked or double clicked on that item.
* @param item is the pointer to the executed listview item.
*
- * Note that you may not delete any QListViewItem objects in slots
+ * Note that you may not delete any TQListViewItem objects in slots
* connected to this signal.
*/
- void executed( QListViewItem *item );
+ void executed( TQListViewItem *item );
/**
* This signal is emitted whenever the user executes an listview item.
@@ -422,10 +422,10 @@ signals:
* @param pos is the position where the user has clicked
* @param c is the column into which the user clicked.
*
- * Note that you may not delete any QListViewItem objects in slots
+ * Note that you may not delete any TQListViewItem objects in slots
* connected to this signal.
*/
- void executed( QListViewItem *item, const QPoint &pos, int c );
+ void executed( TQListViewItem *item, const TQPoint &pos, int c );
/**
* This signal gets emitted whenever something acceptable is
@@ -437,7 +437,7 @@ signals:
*
* @see acceptDrop()
*/
- void dropped (QDropEvent * e, QListViewItem *after);
+ void dropped (TQDropEvent * e, TQListViewItem *after);
/**
* This signal gets emitted whenever something acceptable is
@@ -451,7 +451,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, QDropEvent* e, QListViewItem* after);
+ void dropped (KListView* list, TQDropEvent* e, TQListViewItem* after);
/**
* This signal gets emitted whenever something acceptable is
@@ -465,7 +465,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, QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+ void dropped (KListView* list, TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after);
/**
* This signal gets emitted whenever something acceptable is
@@ -478,7 +478,7 @@ signals:
* @param after is the item after which the drop occurred (or 0L, if
* the drop was above all items
*/
- void dropped (QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+ void dropped (TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after);
/**
* This signal is emitted when ever the user moves an item in the list via
@@ -509,7 +509,7 @@ signals:
* @param afterFirst the item that parameter item was in before the move, in the list
* @param afterNow the item it's currently after.
*/
- void moved (QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow);
+ void moved (TQListViewItem *item, TQListViewItem *afterFirst, TQListViewItem *afterNow);
/**
@@ -517,7 +517,7 @@ signals:
* each and every item moved, in order. The first element in @p items associates
* with the first of afterFirst and afterNow.
*/
- void moved(QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &afterFirst, QPtrList<QListViewItem> &afterNow);
+ void moved(TQPtrList<TQListViewItem> &items, TQPtrList<TQListViewItem> &afterFirst, TQPtrList<TQListViewItem> &afterNow);
/**
* This signal gets emitted when an item is renamed via in-place renaming.
@@ -526,24 +526,24 @@ signals:
* @param str is the new value of column @p col.
* @param col is the renamed column.
*/
- void itemRenamed(QListViewItem* item, const QString &str, int col);
+ void itemRenamed(TQListViewItem* item, const TQString &str, int col);
/**
* Same as above, but without the extra information.
*/
- void itemRenamed(QListViewItem* item);
+ void itemRenamed(TQListViewItem* item);
/**
* 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*, QListViewItem*, const QPoint&) to correctly
+ * contextMenu (KListView*, 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, QListViewItem* item);
+ void menuShortCutPressed (KListView* list, TQListViewItem* item);
/**
* This signal is emitted whenever a context-menu should be shown for item @p i.
@@ -553,16 +553,16 @@ 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, QListViewItem* i, const QPoint& p);
+ void contextMenu (KListView* l, TQListViewItem* i, const TQPoint& p);
- void itemAdded(QListViewItem *item);
- void itemRemoved(QListViewItem *item);
+ void itemAdded(TQListViewItem *item);
+ void itemRemoved(TQListViewItem *item);
public slots:
/**
* Rename column @p c of @p item.
*/
- virtual void rename(QListViewItem *item, int c);
+ virtual void rename(TQListViewItem *item, int c);
/**
* By default, if you called setItemsRenameable(true),
@@ -643,7 +643,7 @@ public slots:
/**
* Set the selection mode.
*
- * A different name was chosen to avoid API-clashes with QListView::setSelectionMode().
+ * A different name was chosen to avoid API-clashes with TQListView::setSelectionMode().
*/
void setSelectionModeExt (SelectionModeExt mode);
@@ -662,19 +662,19 @@ public slots:
protected:
/**
* Determine whether a drop on position @p p would count as
- * being above or below the QRect @p rect.
+ * being above or below the TQRect @p rect.
*
* @param rect is the rectangle we examine.
* @param p is the point located in the rectangle, p is assumed to be in
* viewport coordinates.
*/
- inline bool below (const QRect& rect, const QPoint& p)
+ inline bool below (const TQRect& rect, const TQPoint& p)
{
return (p.y() > (rect.top() + (rect.bottom() - rect.top())/2));
}
/**
- * An overloaded version of below(const QRect&, const QPoint&).
+ * An overloaded version of below(const TQRect&, const TQPoint&).
*
* It differs from the above only in what arguments it takes.
*
@@ -682,7 +682,7 @@ protected:
* @param p is translated from contents coordinates to viewport coordinates
* before being passed to the above function.
*/
- inline bool below (QListViewItem* i, const QPoint& p)
+ inline bool below (TQListViewItem* i, const TQPoint& p)
{
return below (itemRect(i), contentsToViewport(p));
}
@@ -691,13 +691,13 @@ protected:
* Reimplemented to reload the alternate background in palette changes.
* @internal
*/
- virtual bool event( QEvent * );
+ virtual bool event( TQEvent * );
/**
* Emit signal executed.
* @internal
*/
- void emitExecute( QListViewItem *item, const QPoint &pos, int c );
+ void emitExecute( TQListViewItem *item, const TQPoint &pos, int c );
/**
* Reimplemented for internal reasons.
@@ -706,7 +706,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void focusInEvent(QFocusEvent* fe);
+ virtual void focusInEvent(TQFocusEvent* fe);
/**
* Reimplemented for internal reasons.
@@ -715,7 +715,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void focusOutEvent( QFocusEvent *fe );
+ virtual void focusOutEvent( TQFocusEvent *fe );
/**
* Reimplemented for internal reasons.
@@ -724,17 +724,17 @@ protected:
*
* The API is unaffected.
*/
- virtual void leaveEvent( QEvent *e );
+ virtual void leaveEvent( TQEvent *e );
/**
* @return the tooltip for @p column of @p item.
*/
- virtual QString tooltip(QListViewItem* item, int column) const;
+ virtual TQString tooltip(TQListViewItem* item, int column) const;
/**
* @return whether the tooltip for @p column of @p item shall be shown at point @p pos.
*/
- virtual bool showTooltip(QListViewItem *item, const QPoint &pos, int column) const;
+ virtual bool showTooltip(TQListViewItem *item, const TQPoint &pos, int column) const;
/**
* Reimplemented for internal reasons.
@@ -743,7 +743,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsDragMoveEvent (QDragMoveEvent *event);
+ virtual void contentsDragMoveEvent (TQDragMoveEvent *event);
/**
* Reimplemented for internal reasons.
@@ -752,7 +752,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsMousePressEvent( QMouseEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
/**
* Reimplemented for internal reasons.
@@ -761,7 +761,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsMouseMoveEvent( QMouseEvent *e );
+ virtual void contentsMouseMoveEvent( TQMouseEvent *e );
/**
* Reimplemented for internal reasons.
@@ -770,7 +770,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsMouseDoubleClickEvent ( QMouseEvent *e );
+ virtual void contentsMouseDoubleClickEvent ( TQMouseEvent *e );
/**
* Reimplemented for internal reasons.
@@ -779,7 +779,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsDragLeaveEvent (QDragLeaveEvent *event);
+ virtual void contentsDragLeaveEvent (TQDragLeaveEvent *event);
/**
* Reimplemented for internal reasons.
@@ -788,7 +788,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsMouseReleaseEvent (QMouseEvent*);
+ virtual void contentsMouseReleaseEvent (TQMouseEvent*);
/**
* Reimplemented for internal reasons.
@@ -797,7 +797,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsDropEvent (QDropEvent*);
+ virtual void contentsDropEvent (TQDropEvent*);
/**
* Reimplemented for internal reasons.
@@ -806,21 +806,21 @@ protected:
*
* The API is unaffected.
*/
- virtual void contentsDragEnterEvent (QDragEnterEvent *);
+ virtual void contentsDragEnterEvent (TQDragEnterEvent *);
/**
* @return a dragobject encoding the current selection.
*
* @see setDragEnabled()
*/
- virtual QDragObject *dragObject();
+ virtual TQDragObject *dragObject();
/**
* @return true if the @p event provides some acceptable
* format.
* A common mistake is to forget the "const" in your reimplementation
*/
- virtual bool acceptDrag (QDropEvent* event) const;
+ virtual bool acceptDrag (TQDropEvent* event) const;
/**
* Paint the drag line. If painter is null, don't try to :)
@@ -829,7 +829,7 @@ protected:
*
* @return the rectangle that you painted to.
*/
- virtual QRect drawDropVisualizer (QPainter *p, QListViewItem *parent, QListViewItem *after);
+ virtual TQRect drawDropVisualizer (TQPainter *p, TQListViewItem *parent, TQListViewItem *after);
/**
* Paint the drag rectangle. If painter is null, don't try to :)
@@ -837,7 +837,7 @@ protected:
*
* @return the rectangle that you painted to.
*/
- virtual QRect drawItemHighlighter(QPainter *painter, QListViewItem *item);
+ virtual TQRect drawItemHighlighter(TQPainter *painter, TQListViewItem *item);
/**
* This method calls dragObject() and starts the drag.
@@ -854,7 +854,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void keyPressEvent (QKeyEvent*);
+ virtual void keyPressEvent (TQKeyEvent*);
/**
* Reimplemented for internal reasons.
@@ -863,7 +863,7 @@ protected:
*
* The API is unaffected.
*/
- virtual void viewportPaintEvent(QPaintEvent*);
+ virtual void viewportPaintEvent(TQPaintEvent*);
/**
* In FileManager selection mode: explicitly activate the mode
@@ -885,7 +885,7 @@ protected:
/**
* Reimplemented for setFullWidth()
*/
- virtual void viewportResizeEvent(QResizeEvent* e);
+ virtual void viewportResizeEvent(TQResizeEvent* e);
/**
* Disable AutoSelection. This overrides the system wide setting for
@@ -905,10 +905,10 @@ protected:
/**
* @deprecated This is just here for binary compatibility. Use the signal
- * in QListView instead.
+ * in TQListView instead.
*/
// KDE 4: remove
- void doubleClicked( QListViewItem *item, const QPoint &pos, int c );
+ void doubleClicked( TQListViewItem *item, const TQPoint &pos, int c );
protected slots:
/**
@@ -917,8 +917,8 @@ protected slots:
*/
void slotSettingsChanged(int);
- void slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c );
- void doneEditing(QListViewItem *item, int row);
+ void slotMouseButtonClicked( int btn, TQListViewItem *item, const TQPoint &pos, int c );
+ void doneEditing(TQListViewItem *item, int row);
/**
* Repaint the rect where I was drawing the drop line.
@@ -933,18 +933,18 @@ protected slots:
/**
* Emit the contextMenu signal. This slot is for mouse actions.
*/
- void emitContextMenu (QListViewItem*, const QPoint&, int);
+ void emitContextMenu (TQListViewItem*, const TQPoint&, int);
/**
* Emit the contextMenu signal. This slot is for key presses.
*/
- void emitContextMenu (KListView*, QListViewItem*);
+ void emitContextMenu (KListView*, TQListViewItem*);
/**
* Accessory slot for AutoSelect
* @internal
*/
- void slotOnItem( QListViewItem *item );
+ void slotOnItem( TQListViewItem *item );
/**
* Accessory slot for AutoSelect/ChangeCursorOverItem
@@ -970,20 +970,20 @@ protected:
/**
* Handle dropEvent when itemsMovable() is set to true.
*/
- virtual void movableDropEvent (QListViewItem* parent, QListViewItem* afterme);
+ virtual void movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme);
/**
- * Where is the nearest QListViewItem that I'm going to drop?
+ * Where is the nearest TQListViewItem that I'm going to drop?
*
* FIXME KDE 4.0: Make this method const so it can be called from an
* acceptDrag method without ugly casts
*/
- virtual void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after);
+ virtual void findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after);
/**
* A special keyPressEvent (for FileManager selection mode).
*/
- void fileManagerKeyPressEvent (QKeyEvent*);
+ void fileManagerKeyPressEvent (TQKeyEvent*);
/**
* Convert the depth of an item into its indentation in pixels
@@ -997,7 +997,7 @@ protected:
private:
class KListViewPrivate;
KListViewPrivate* const d;
- bool isExecuteArea( int x, QListViewItem* item );
+ bool isExecuteArea( int x, TQListViewItem* item );
};
/**
@@ -1011,44 +1011,44 @@ class KDEUI_EXPORT KListViewItem : public QListViewItem
friend class KListView;
public:
/**
- * constructors. The semantics remain as in QListViewItem.
- * Although they accept a QListViewItem as parent, please
+ * constructors. The semantics remain as in TQListViewItem.
+ * Although they accept a TQListViewItem as parent, please
* don't mix KListViewItem (or subclasses) with QListViewItem
* (or subclasses).
*/
- KListViewItem(QListView *parent);
- KListViewItem(QListViewItem *parent);
- KListViewItem(QListView *parent, QListViewItem *after);
- KListViewItem(QListViewItem *parent, QListViewItem *after);
-
- KListViewItem(QListView *parent,
- QString, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null);
-
- KListViewItem(QListViewItem *parent,
- QString, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null);
-
- KListViewItem(QListView *parent, QListViewItem *after,
- QString, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null);
-
- KListViewItem(QListViewItem *parent, QListViewItem *after,
- QString, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null,
- QString = QString::null, QString = QString::null);
+ KListViewItem(TQListView *parent);
+ KListViewItem(TQListViewItem *parent);
+ KListViewItem(TQListView *parent, TQListViewItem *after);
+ KListViewItem(TQListViewItem *parent, TQListViewItem *after);
+
+ KListViewItem(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,
+ 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,
+ 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,
+ 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 void insertItem(QListViewItem *item);
- virtual void takeItem(QListViewItem *item);
+ virtual void insertItem(TQListViewItem *item);
+ virtual void takeItem(TQListViewItem *item);
/**
* returns true if this item is to be drawn with the alternate background
*/
@@ -1056,7 +1056,7 @@ public:
/**
* returns the background color for this item
*/
- const QColor &backgroundColor() KDE_DEPRECATED; // #### should be removed in 4.0; use below instead
+ const TQColor &backgroundColor() KDE_DEPRECATED; // #### should be removed in 4.0; use below instead
/**
* returns the background color for this item at given column
@@ -1066,9 +1066,9 @@ public:
* ### only 1 column
* @since 3.4
*/
- QColor backgroundColor(int column);
+ TQColor backgroundColor(int column);
- virtual void paintCell(QPainter *p, const QColorGroup &cg,
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment);
private:
diff --git a/kdeui/klistviewlineedit.h b/kdeui/klistviewlineedit.h
index 1fe56e202..72f2555ed 100644
--- a/kdeui/klistviewlineedit.h
+++ b/kdeui/klistviewlineedit.h
@@ -32,25 +32,25 @@ public:
KListViewLineEdit(KListView *parent);
~KListViewLineEdit();
- QListViewItem *currentItem() const;
+ TQListViewItem *currentItem() const;
signals:
- void done(QListViewItem*, int);
+ void done(TQListViewItem*, int);
public slots:
void terminate();
- void load(QListViewItem *i, int c);
+ void load(TQListViewItem *i, int c);
protected:
- virtual void focusOutEvent(QFocusEvent *);
- virtual void keyPressEvent(QKeyEvent *e);
- virtual void paintEvent(QPaintEvent *e);
- virtual bool event (QEvent *pe);
+ virtual void focusOutEvent(TQFocusEvent *);
+ virtual void keyPressEvent(TQKeyEvent *e);
+ virtual void paintEvent(TQPaintEvent *e);
+ virtual bool event (TQEvent *pe);
/// @since 3.1
- void selectNextCell (QListViewItem *pi, int column, bool forward);
+ void selectNextCell (TQListViewItem *pi, int column, bool forward);
void terminate(bool commit);
- QListViewItem *item;
+ TQListViewItem *item;
int col;
KListView* const p;
@@ -58,7 +58,7 @@ protected slots:
void slotSelectionChanged();
/// @since 3.5.4
- void slotItemRemoved(QListViewItem *i);
+ void slotItemRemoved(TQListViewItem *i);
};
diff --git a/kdeui/klistviewsearchline.cpp b/kdeui/klistviewsearchline.cpp
index e3f9271eb..7bd26afc1 100644
--- a/kdeui/klistviewsearchline.cpp
+++ b/kdeui/klistviewsearchline.cpp
@@ -25,11 +25,11 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qapplication.h>
-#include <qtimer.h>
-#include <qpopupmenu.h>
-#include <qlabel.h>
-#include <qheader.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
+#include <tqpopupmenu.h>
+#include <tqlabel.h>
+#include <tqheader.h>
#define KLISTVIEWSEARCHLINE_ALLVISIBLECOLUMNS_ID 2004
@@ -47,45 +47,45 @@ public:
bool caseSensitive;
bool activeSearch;
bool keepParentsVisible;
- QString search;
+ TQString search;
int queuedSearches;
- QValueList<int> searchColumns;
+ TQValueList<int> searchColumns;
};
////////////////////////////////////////////////////////////////////////////////
// public methods
////////////////////////////////////////////////////////////////////////////////
-KListViewSearchLine::KListViewSearchLine(QWidget *parent, KListView *listView, const char *name) :
+KListViewSearchLine::KListViewSearchLine(TQWidget *parent, KListView *listView, const char *name) :
KLineEdit(parent, name)
{
d = new KListViewSearchLinePrivate;
d->listView = listView;
- connect(this, SIGNAL(textChanged(const QString &)),
- this, SLOT(queueSearch(const QString &)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(queueSearch(const TQString &)));
if(listView) {
- connect(listView, SIGNAL(destroyed()),
- this, SLOT(listViewDeleted()));
+ connect(listView, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(listViewDeleted()));
- connect(listView, SIGNAL(itemAdded(QListViewItem *)),
- this, SLOT(itemAdded(QListViewItem *)));
+ connect(listView, TQT_SIGNAL(itemAdded(TQListViewItem *)),
+ this, TQT_SLOT(itemAdded(TQListViewItem *)));
}
else
setEnabled(false);
}
-KListViewSearchLine::KListViewSearchLine(QWidget *parent, const char *name) :
+KListViewSearchLine::KListViewSearchLine(TQWidget *parent, const char *name) :
KLineEdit(parent, name)
{
d = new KListViewSearchLinePrivate;
d->listView = 0;
- connect(this, SIGNAL(textChanged(const QString &)),
- this, SLOT(queueSearch(const QString &)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(queueSearch(const TQString &)));
setEnabled(false);
}
@@ -100,7 +100,7 @@ bool KListViewSearchLine::caseSensitive() const
return d->caseSensitive;
}
-QValueList<int> KListViewSearchLine::searchColumns() const
+TQValueList<int> KListViewSearchLine::searchColumns() const
{
return d->searchColumns;
}
@@ -119,7 +119,7 @@ KListView *KListViewSearchLine::listView() const
// public slots
////////////////////////////////////////////////////////////////////////////////
-void KListViewSearchLine::updateSearch(const QString &s)
+void KListViewSearchLine::updateSearch(const TQString &s)
{
if(!d->listView)
return;
@@ -129,7 +129,7 @@ void KListViewSearchLine::updateSearch(const QString &s)
// If there's a selected item that is visible, make sure that it's visible
// when the search changes too (assuming that it still matches).
- QListViewItem *currentItem = 0;
+ TQListViewItem *currentItem = 0;
switch(d->listView->selectionMode())
{
@@ -140,8 +140,8 @@ void KListViewSearchLine::updateSearch(const QString &s)
break;
default:
{
- int flags = QListViewItemIterator::Selected | QListViewItemIterator::Visible;
- for(QListViewItemIterator it(d->listView, flags);
+ int flags = TQListViewItemIterator::Selected | TQListViewItemIterator::Visible;
+ for(TQListViewItemIterator it(d->listView, flags);
it.current() && !currentItem;
++it)
{
@@ -170,7 +170,7 @@ void KListViewSearchLine::setKeepParentsVisible(bool v)
d->keepParentsVisible = v;
}
-void KListViewSearchLine::setSearchColumns(const QValueList<int> &columns)
+void KListViewSearchLine::setSearchColumns(const TQValueList<int> &columns)
{
d->searchColumns = columns;
}
@@ -178,21 +178,21 @@ void KListViewSearchLine::setSearchColumns(const QValueList<int> &columns)
void KListViewSearchLine::setListView(KListView *lv)
{
if(d->listView) {
- disconnect(d->listView, SIGNAL(destroyed()),
- this, SLOT(listViewDeleted()));
+ disconnect(d->listView, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(listViewDeleted()));
- disconnect(d->listView, SIGNAL(itemAdded(QListViewItem *)),
- this, SLOT(itemAdded(QListViewItem *)));
+ disconnect(d->listView, TQT_SIGNAL(itemAdded(TQListViewItem *)),
+ this, TQT_SLOT(itemAdded(TQListViewItem *)));
}
d->listView = lv;
if(lv) {
- connect(d->listView, SIGNAL(destroyed()),
- this, SLOT(listViewDeleted()));
+ connect(d->listView, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(listViewDeleted()));
- connect(d->listView, SIGNAL(itemAdded(QListViewItem *)),
- this, SLOT(itemAdded(QListViewItem *)));
+ connect(d->listView, TQT_SIGNAL(itemAdded(TQListViewItem *)),
+ this, TQT_SLOT(itemAdded(TQListViewItem *)));
}
setEnabled(bool(lv));
@@ -202,7 +202,7 @@ void KListViewSearchLine::setListView(KListView *lv)
// protected members
////////////////////////////////////////////////////////////////////////////////
-bool KListViewSearchLine::itemMatches(const QListViewItem *item, const QString &s) const
+bool KListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString &s) const
{
if(s.isEmpty())
return true;
@@ -211,7 +211,7 @@ bool KListViewSearchLine::itemMatches(const QListViewItem *item, const QString &
// specifified. If it is empty default to searching all of the columns.
if(!d->searchColumns.isEmpty()) {
- QValueList<int>::ConstIterator it = d->searchColumns.begin();
+ TQValueList<int>::ConstIterator it = d->searchColumns.begin();
for(; it != d->searchColumns.end(); ++it) {
if(*it < item->listView()->columns() &&
item->text(*it).find(s, 0, d->caseSensitive) >= 0)
@@ -231,13 +231,13 @@ bool KListViewSearchLine::itemMatches(const QListViewItem *item, const QString &
return false;
}
-QPopupMenu *KListViewSearchLine::createPopupMenu()
+TQPopupMenu *KListViewSearchLine::createPopupMenu()
{
- QPopupMenu *popup = KLineEdit::createPopupMenu();
+ TQPopupMenu *popup = KLineEdit::createPopupMenu();
if (d->listView->columns()>1) {
- QPopupMenu *subMenu = new QPopupMenu(popup);
- connect(subMenu, SIGNAL(activated(int)), this, SLOT(searchColumnsMenuActivated(int)));
+ TQPopupMenu *subMenu = new TQPopupMenu(popup);
+ connect(subMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(searchColumnsMenuActivated(int)));
popup->insertSeparator();
popup->insertItem(i18n("Search Columns"), subMenu);
@@ -247,11 +247,11 @@ QPopupMenu *KListViewSearchLine::createPopupMenu()
bool allColumnsAreSearchColumns = true;
// TODO Make the entry order match the actual column order
- QHeader* const header = d->listView->header();
+ TQHeader* const header = d->listView->header();
int visibleColumns = 0;
for(int i = 0; i < d->listView->columns(); i++) {
if(d->listView->columnWidth(i)>0) {
- QString columnText = d->listView->columnText(i);
+ TQString columnText = d->listView->columnText(i);
if(columnText.isEmpty()) {
int visiblePosition=1;
for(int j = 0; j < header->mapToIndex(i); j++)
@@ -281,11 +281,11 @@ QPopupMenu *KListViewSearchLine::createPopupMenu()
// protected slots
////////////////////////////////////////////////////////////////////////////////
-void KListViewSearchLine::queueSearch(const QString &search)
+void KListViewSearchLine::queueSearch(const TQString &search)
{
d->queuedSearches++;
d->search = search;
- QTimer::singleShot(200, this, SLOT(activateSearch()));
+ TQTimer::singleShot(200, this, TQT_SLOT(activateSearch()));
}
void KListViewSearchLine::activateSearch()
@@ -300,7 +300,7 @@ void KListViewSearchLine::activateSearch()
// private slots
////////////////////////////////////////////////////////////////////////////////
-void KListViewSearchLine::itemAdded(QListViewItem *item) const
+void KListViewSearchLine::itemAdded(TQListViewItem *item) const
{
item->setVisible(itemMatches(item, text()));
}
@@ -342,10 +342,10 @@ void KListViewSearchLine::searchColumnsMenuActivated(int id)
void KListViewSearchLine::checkItemParentsNotVisible()
{
- QListViewItemIterator it(d->listView);
+ TQListViewItemIterator it(d->listView);
for(; it.current(); ++it)
{
- QListViewItem *item = it.current();
+ TQListViewItem *item = it.current();
if(itemMatches(item, d->search))
item->setVisible(true);
else
@@ -364,14 +364,14 @@ 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(QListViewItem *item, QListViewItem *highestHiddenParent)
+bool KListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent)
{
bool visible = false;
- QListViewItem * first = item;
+ TQListViewItem * first = item;
for(; item; item = item->nextSibling())
{
//What we pass to our children as highestHiddenParent:
- QListViewItem * hhp = highestHiddenParent ? highestHiddenParent : item->isVisible() ? 0L : item;
+ TQListViewItem * hhp = highestHiddenParent ? highestHiddenParent : item->isVisible() ? 0L : item;
bool childMatch = false;
if(item->firstChild() && checkItemParentsVisible(item->firstChild(), hhp))
childMatch = true;
@@ -384,13 +384,13 @@ bool KListViewSearchLine::checkItemParentsVisible(QListViewItem *item, QListView
highestHiddenParent->setVisible(true);
// Calling setVisible on our ancestor will unhide all its descendents. Hide the ones
// before us that should not be shown.
- for(QListViewItem *hide = first; hide != item; hide = hide->nextSibling())
+ for(TQListViewItem *hide = first; hide != item; hide = hide->nextSibling())
hide->setVisible(false);
highestHiddenParent = 0;
// If we matched, than none of our children matched, yet the setVisible() call on our
// ancestor unhid them, undo the damage:
if(!childMatch)
- for(QListViewItem *hide = item->firstChild(); hide; hide = hide->nextSibling())
+ for(TQListViewItem *hide = item->firstChild(); hide; hide = hide->nextSibling())
hide->setVisible(false);
}
else
@@ -412,20 +412,20 @@ public:
KListViewSearchLineWidgetPrivate() : listView(0), searchLine(0), clearButton(0) {}
KListView *listView;
KListViewSearchLine *searchLine;
- QToolButton *clearButton;
+ TQToolButton *clearButton;
};
KListViewSearchLineWidget::KListViewSearchLineWidget(KListView *listView,
- QWidget *parent,
+ TQWidget *parent,
const char *name) :
- QHBox(parent, name)
+ TQHBox(parent, name)
{
d = new KListViewSearchLineWidgetPrivate;
d->listView = listView;
setSpacing(5);
- QTimer::singleShot(0, this, SLOT(createWidgets()));
+ TQTimer::singleShot(0, this, TQT_SLOT(createWidgets()));
}
KListViewSearchLineWidget::~KListViewSearchLineWidget()
@@ -445,14 +445,14 @@ void KListViewSearchLineWidget::createWidgets()
positionInToolBar();
if(!d->clearButton) {
- d->clearButton = new QToolButton(this);
- QIconSet icon = SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase");
+ d->clearButton = new TQToolButton(this);
+ TQIconSet icon = SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase");
d->clearButton->setIconSet(icon);
}
d->clearButton->show();
- QLabel *label = new QLabel(i18n("S&earch:"), this, "kde toolbar widget");
+ TQLabel *label = new TQLabel(i18n("S&earch:"), this, "kde toolbar widget");
d->searchLine = createSearchLine(d->listView);
d->searchLine->show();
@@ -460,7 +460,7 @@ void KListViewSearchLineWidget::createWidgets()
label->setBuddy(d->searchLine);
label->show();
- connect(d->clearButton, SIGNAL(clicked()), d->searchLine, SLOT(clear()));
+ connect(d->clearButton, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(clear()));
}
KListViewSearchLine *KListViewSearchLineWidget::searchLine() const
@@ -485,7 +485,7 @@ void KListViewSearchLineWidget::positionInToolBar()
if(toolBar->getWidget(id) == this) {
toolBar->setItemAutoSized(id);
if(!d->clearButton) {
- QString icon = QApplication::reverseLayout() ? "clear_left" : "locationbar_erase";
+ TQString icon = TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase";
d->clearButton = new KToolBarButton(icon, 2005, toolBar);
}
toolBar->insertWidget(2005, d->clearButton->width(), d->clearButton, index);
diff --git a/kdeui/klistviewsearchline.h b/kdeui/klistviewsearchline.h
index e8f5e9e2a..d05cca406 100644
--- a/kdeui/klistviewsearchline.h
+++ b/kdeui/klistviewsearchline.h
@@ -20,7 +20,7 @@
#define KLISTVIEWSEARCHLINE_H
#include <klineedit.h>
-#include <qhbox.h>
+#include <tqhbox.h>
class KListView;
class QListViewItem;
@@ -38,7 +38,7 @@ class QToolButton;
*
* @note { When iterating over items in the KListView, make sure that
* the iterator only includes visible items (for example, by adding
- * QListViewItemIterator::Visible to the iterator flags). Otherwise,
+ * TQListViewItemIterator::Visible to the iterator flags). Otherwise,
* actions (such as deletion) may be taken on items that have been
* hidden by the search function. }
* @since 3.3
@@ -57,13 +57,13 @@ public:
* If \a listView is null then the widget will be disabled until a listview
* is set with setListView().
*/
- KListViewSearchLine(QWidget *parent = 0, KListView *listView = 0, const char *name = 0);
+ KListViewSearchLine(TQWidget *parent = 0, KListView *listView = 0, const char *name = 0);
/**
* Constructs a KListViewSearchLine without any KListView to filter. The
* KListView object has to be set later with setListView().
*/
- KListViewSearchLine(QWidget *parent, const char *name);
+ KListViewSearchLine(TQWidget *parent, const char *name);
/**
* Destroys the KListViewSearchLine.
@@ -83,7 +83,7 @@ public:
*
* @see setSearchColumns
*/
- QValueList<int> searchColumns() const;
+ TQValueList<int> searchColumns() const;
/**
* If this is true (the default) then the parents of matched items will also
@@ -105,7 +105,7 @@ public slots:
* Updates search to only make visible the items that match \a s. If
* \a s is null then the line edit's text will be used.
*/
- virtual void updateSearch(const QString &s = QString::null);
+ virtual void updateSearch(const TQString &s = TQString::null);
/**
* Make the search case sensitive or case insensitive.
@@ -133,7 +133,7 @@ public slots:
*
* @see searchColumns
*/
- void setSearchColumns(const QValueList<int> &columns);
+ void setSearchColumns(const TQValueList<int> &columns);
/**
* Sets the KListView that is filtered by this search line. If \a lv is null
@@ -150,14 +150,14 @@ protected:
* based on the value of caseSensitive(). This can be overridden in
* subclasses to implement more complicated matching schemes.
*/
- virtual bool itemMatches(const QListViewItem *item, const QString &s) const;
+ virtual bool itemMatches(const TQListViewItem *item, const TQString &s) const;
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::mousePressEvent().
+ * See TQLineEdit::mousePressEvent().
*/
- virtual QPopupMenu *createPopupMenu();
+ virtual TQPopupMenu *createPopupMenu();
protected slots:
/**
@@ -173,7 +173,7 @@ protected slots:
*
* @see activateSearch()
*/
- void queueSearch(const QString &search);
+ void queueSearch(const TQString &search);
/**
* When the timer started with queueSearch() expires this slot is called.
@@ -198,10 +198,10 @@ private:
* It makes a recursive call to all children. It returns true if at least
* one item in the subtree with the given root item is visible.
*/
- bool checkItemParentsVisible(QListViewItem *item, QListViewItem *highestHiddenParent = 0);
+ bool checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent = 0);
private slots:
- void itemAdded(QListViewItem *item) const;
+ void itemAdded(TQListViewItem *item) const;
void listViewDeleted();
void searchColumnsMenuActivated(int);
@@ -225,7 +225,7 @@ public:
* Creates a KListViewSearchLineWidget for \a listView with \a parent as the
* parent with and \a name.
*/
- KListViewSearchLineWidget(KListView *listView = 0, QWidget *parent = 0,
+ KListViewSearchLineWidget(KListView *listView = 0, TQWidget *parent = 0,
const char *name = 0);
/**
diff --git a/kdeui/kmainwindow.cpp b/kdeui/kmainwindow.cpp
index 119ff4a7e..94baa34e7 100644
--- a/kdeui/kmainwindow.cpp
+++ b/kdeui/kmainwindow.cpp
@@ -27,12 +27,12 @@
#include "kmainwindowiface.h"
#include "ktoolbarhandler.h"
#include "kwhatsthismanager_p.h"
-#include <qsessionmanager.h>
-#include <qobjectlist.h>
-#include <qstyle.h>
-#include <qlayout.h>
-#include <qwidgetlist.h>
-#include <qtimer.h>
+#include <tqsessionmanager.h>
+#include <tqobjectlist.h>
+#include <tqstyle.h>
+#include <tqlayout.h>
+#include <tqwidgetlist.h>
+#include <tqtimer.h>
#include <kaccel.h>
#include <kaction.h>
@@ -66,17 +66,17 @@ public:
bool autoSaveWindowSize:1;
bool care_about_geometry:1;
bool shuttingDown:1;
- QString autoSaveGroup;
+ TQString autoSaveGroup;
KAccel * kaccel;
KMainWindowInterface *m_interface;
KDEPrivate::ToolBarHandler *toolBarHandler;
- QTimer* settingsTimer;
+ TQTimer* settingsTimer;
KToggleAction *showStatusBarAction;
- QRect defaultWindowSize;
- QPtrList<QDockWindow> hiddenDockWindows;
+ TQRect defaultWindowSize;
+ TQPtrList<TQDockWindow> hiddenDockWindows;
};
-QPtrList<KMainWindow>* KMainWindow::memberList = 0L;
+TQPtrList<KMainWindow>* KMainWindow::memberList = 0L;
static bool no_query_exit = false;
static KMWSessionManaged* ksm = 0;
static KStaticDeleter<KMWSessionManaged> ksmd;
@@ -99,14 +99,14 @@ public:
KMainWindow::memberList->first()->saveGlobalProperties(config);
}
- QPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
+ TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
int n = 0;
for (it.toFirst(); it.current(); ++it){
n++;
it.current()->savePropertiesInternal(config, n);
}
- config->setGroup(QString::fromLatin1("Number"));
- config->writeEntry(QString::fromLatin1("NumberOfWindows"), n );
+ config->setGroup(TQString::fromLatin1("Number"));
+ config->writeEntry(TQString::fromLatin1("NumberOfWindows"), n );
return true;
}
@@ -115,14 +115,14 @@ public:
// not really a fast method but the only compatible one
if ( sm.allowsInteraction() ) {
bool canceled = false;
- QPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
+ TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
::no_query_exit = true;
for (it.toFirst(); it.current() && !canceled;){
KMainWindow *window = *it;
++it; // Update now, the current window might get deleted
if ( !window->testWState( Qt::WState_ForceHide ) ) {
- QCloseEvent e;
- QApplication::sendEvent( window, &e );
+ TQCloseEvent e;
+ TQApplication::sendEvent( window, &e );
canceled = !e.isAccepted();
/* Don't even think_about deleting widgets with
Qt::WDestructiveClose flag set at this point. We
@@ -133,7 +133,7 @@ public:
(possibly showing a message box "do you want to
save this or that?"). It is possible that the
session manager quits the application later
- (emitting QApplication::aboutToQuit() when this
+ (emitting TQApplication::aboutToQuit() when this
happens), but it is also possible that the user
cancels the shutdown, so the application will
continue to run.
@@ -164,14 +164,14 @@ public:
static bool being_first = true;
-KMainWindow::KMainWindow( QWidget* parent, const char *name, WFlags f )
- : QMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )
+KMainWindow::KMainWindow( TQWidget* parent, const char *name, WFlags f )
+ : TQMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )
{
initKMainWindow(name, 0);
}
-KMainWindow::KMainWindow( int cflags, QWidget* parent, const char *name, WFlags f )
- : QMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )
+KMainWindow::KMainWindow( int cflags, TQWidget* parent, const char *name, WFlags f )
+ : TQMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )
{
initKMainWindow(name, cflags);
}
@@ -183,15 +183,15 @@ void KMainWindow::initKMainWindow(const char *name, int cflags)
mHelpMenu = 0;
kapp->setTopWidget( this );
actionCollection()->setWidget( this );
- connect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown()));
+ connect(kapp, TQT_SIGNAL(shutDown()), this, TQT_SLOT(shuttingDown()));
if( !memberList )
- memberList = new QPtrList<KMainWindow>;
+ memberList = new TQPtrList<KMainWindow>;
if ( !ksm )
ksm = ksmd.setObject(ksm, new KMWSessionManaged());
// set a unique object name. Required by session management.
- QCString objname;
- QCString s;
+ TQCString objname;
+ TQCString s;
int unusedNumber;
if ( !name )
{ // no name given
@@ -212,10 +212,10 @@ void KMainWindow::initKMainWindow(const char *name, int cflags)
unusedNumber = 0; // add numbers only when needed
}
for(;;) {
- QWidgetList* list = kapp->topLevelWidgets();
- QWidgetListIt it( *list );
+ TQWidgetList* list = kapp->topLevelWidgets();
+ TQWidgetListIt it( *list );
bool found = false;
- for( QWidget* w = it.current();
+ for( TQWidget* w = it.current();
w != NULL;
++it, w = it.current())
if( w != this && w->name() == s )
@@ -286,8 +286,8 @@ void KMainWindow::parseGeometry(bool parsewidth)
int w, h;
int m = XParseGeometry( kapp->geometryArgument().latin1(), &x, &y, (unsigned int*)&w, (unsigned int*)&h);
if (parsewidth) {
- QSize minSize = minimumSize();
- QSize maxSize = maximumSize();
+ TQSize minSize = minimumSize();
+ TQSize maxSize = maximumSize();
if ( !(m & WidthValue) )
w = width();
if ( !(m & HeightValue) )
@@ -314,14 +314,14 @@ void KMainWindow::parseGeometry(bool parsewidth)
KMainWindow::~KMainWindow()
{
delete d->settingsTimer;
- QMenuBar* mb = internalMenuBar();
+ TQMenuBar* mb = internalMenuBar();
delete mb;
delete d->m_interface;
delete d;
memberList->remove( this );
}
-KPopupMenu* KMainWindow::helpMenu( const QString &aboutAppText, bool showWhatsThis )
+KPopupMenu* KMainWindow::helpMenu( const TQString &aboutAppText, bool showWhatsThis )
{
if( !mHelpMenu ) {
if ( aboutAppText.isEmpty() )
@@ -331,8 +331,8 @@ KPopupMenu* KMainWindow::helpMenu( const QString &aboutAppText, bool showWhatsTh
if ( !mHelpMenu )
return 0;
- connect( mHelpMenu, SIGNAL( showAboutApplication() ),
- this, SLOT( showAboutApplication() ) );
+ connect( mHelpMenu, TQT_SIGNAL( showAboutApplication() ),
+ this, TQT_SLOT( showAboutApplication() ) );
}
return mHelpMenu->menu();
@@ -341,9 +341,9 @@ KPopupMenu* KMainWindow::helpMenu( const QString &aboutAppText, bool showWhatsTh
KPopupMenu* KMainWindow::customHelpMenu( bool showWhatsThis )
{
if( !mHelpMenu ) {
- mHelpMenu = new KHelpMenu( this, QString::null, showWhatsThis );
- connect( mHelpMenu, SIGNAL( showAboutApplication() ),
- this, SLOT( showAboutApplication() ) );
+ mHelpMenu = new KHelpMenu( this, TQString::null, showWhatsThis );
+ connect( mHelpMenu, TQT_SIGNAL( showAboutApplication() ),
+ this, TQT_SLOT( showAboutApplication() ) );
}
return mHelpMenu->menu();
@@ -356,33 +356,33 @@ bool KMainWindow::canBeRestored( int number )
KConfig *config = kapp->sessionConfig();
if ( !config )
return false;
- config->setGroup( QString::fromLatin1("Number") );
- int n = config->readNumEntry( QString::fromLatin1("NumberOfWindows") , 1 );
+ config->setGroup( TQString::fromLatin1("Number") );
+ int n = config->readNumEntry( TQString::fromLatin1("NumberOfWindows") , 1 );
return number >= 1 && number <= n;
}
-const QString KMainWindow::classNameOfToplevel( int number )
+const TQString KMainWindow::classNameOfToplevel( int number )
{
if ( !kapp->isRestored() )
- return QString::null;
+ return TQString::null;
KConfig *config = kapp->sessionConfig();
if ( !config )
- return QString::null;
- QString s;
+ return TQString::null;
+ TQString s;
s.setNum( number );
- s.prepend( QString::fromLatin1("WindowProperties") );
+ s.prepend( TQString::fromLatin1("WindowProperties") );
config->setGroup( s );
- if ( !config->hasKey( QString::fromLatin1("ClassName") ) )
- return QString::null;
+ if ( !config->hasKey( TQString::fromLatin1("ClassName") ) )
+ return TQString::null;
else
- return config->readEntry( QString::fromLatin1("ClassName") );
+ return config->readEntry( TQString::fromLatin1("ClassName") );
}
void KMainWindow::show()
{
- QMainWindow::show();
+ TQMainWindow::show();
- for ( QPtrListIterator<QDockWindow> it( d->hiddenDockWindows ); it.current(); ++it )
+ for ( TQPtrListIterator<TQDockWindow> it( d->hiddenDockWindows ); it.current(); ++it )
it.current()->show();
d->hiddenDockWindows.clear();
@@ -394,9 +394,9 @@ void KMainWindow::hide()
d->hiddenDockWindows.clear();
- QObjectList *list = queryList( "QDockWindow" );
- for( QObjectListIt it( *list ); it.current(); ++it ) {
- QDockWindow *dw = (QDockWindow*)it.current();
+ TQObjectList *list = queryList( "TQDockWindow" );
+ for( TQObjectListIt it( *list ); it.current(); ++it ) {
+ TQDockWindow *dw = (TQDockWindow*)it.current();
if ( dw->isTopLevel() && dw->isVisible() ) {
d->hiddenDockWindows.append( dw );
dw->hide();
@@ -405,7 +405,7 @@ void KMainWindow::hide()
delete list;
}
- QWidget::hide();
+ TQWidget::hide();
}
bool KMainWindow::restore( int number, bool show )
@@ -432,7 +432,7 @@ int KMainWindow::configureToolbars()
{
saveMainWindowSettings(KGlobal::config());
KEditToolbar dlg(actionCollection(), xmlFile(), true, this);
- connect(&dlg, SIGNAL(newToolbarConfig()), SLOT(saveNewToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(saveNewToolbarConfig()));
return dlg.exec();
}
@@ -442,14 +442,14 @@ void KMainWindow::saveNewToolbarConfig()
applyMainWindowSettings( KGlobal::config() );
}
-void KMainWindow::setupGUI( int options, const QString & xmlfile ) {
- setupGUI(QSize(), options, xmlfile);
+void KMainWindow::setupGUI( int options, const TQString & xmlfile ) {
+ setupGUI(TQSize(), options, xmlfile);
}
-void KMainWindow::setupGUI( QSize defaultSize, int options, const QString & xmlfile ) {
+void KMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xmlfile ) {
if( options & Keys ){
KStdAction::keyBindings(guiFactory(),
- SLOT(configureShortcuts()), actionCollection());
+ TQT_SLOT(configureShortcuts()), actionCollection());
}
if( (options & StatusBar) && internalStatusBar() ){
@@ -459,7 +459,7 @@ void KMainWindow::setupGUI( QSize defaultSize, int options, const QString & xmlf
if( options & ToolBar ){
setStandardToolBarMenuEnabled( true );
KStdAction::configureToolbars(this,
- SLOT(configureToolbars() ), actionCollection());
+ TQT_SLOT(configureToolbars() ), actionCollection());
}
if( options & Create ){
@@ -488,7 +488,7 @@ void KMainWindow::setupGUI( QSize defaultSize, int options, const QString & xmlf
}
-void KMainWindow::createGUI( const QString &xmlfile, bool _conserveMemory )
+void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory )
{
// disabling the updates prevents unnecessary redraws
setUpdatesEnabled( false );
@@ -497,7 +497,7 @@ void KMainWindow::createGUI( const QString &xmlfile, bool _conserveMemory )
guiFactory()->removeClient( this );
// make sure to have an empty GUI
- QMenuBar* mb = internalMenuBar();
+ TQMenuBar* mb = internalMenuBar();
if ( mb )
mb->clear();
@@ -522,12 +522,12 @@ void KMainWindow::createGUI( const QString &xmlfile, bool _conserveMemory )
if ( !xmlfile.isNull() ) {
setXMLFile( xmlfile, true );
} else {
- QString auto_file(instance()->instanceName() + "ui.rc");
+ TQString auto_file(instance()->instanceName() + "ui.rc");
setXMLFile( auto_file, true );
}
// make sure we don't have any state saved already
- setXMLGUIBuildDocument( QDomDocument() );
+ setXMLGUIBuildDocument( TQDomDocument() );
// do the actual GUI building
guiFactory()->addClient( this );
@@ -548,12 +548,12 @@ void KMainWindow::createGUI( const QString &xmlfile, bool _conserveMemory )
// there's just one problem: I'm bad in finding names ;-) , so
// I skipped this ;-)
- QDomDocument doc = domDocument();
+ TQDomDocument doc = domDocument();
- for( QDomNode n = doc.documentElement().firstChild();
+ for( TQDomNode n = doc.documentElement().firstChild();
!n.isNull(); n = n.nextSibling())
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName().lower() == "toolbar" )
factory_->resetContainer( e.attribute( "name" ) );
@@ -578,19 +578,19 @@ bool KMainWindow::isHelpMenuEnabled()
return d->showHelpMenu;
}
-void KMainWindow::setCaption( const QString &caption )
+void KMainWindow::setCaption( const TQString &caption )
{
setPlainCaption( kapp->makeStdCaption(caption) );
}
-void KMainWindow::setCaption( const QString &caption, bool modified )
+void KMainWindow::setCaption( const TQString &caption, bool modified )
{
setPlainCaption( kapp->makeStdCaption(caption, true, modified) );
}
-void KMainWindow::setPlainCaption( const QString &caption )
+void KMainWindow::setPlainCaption( const TQString &caption )
{
- QMainWindow::setCaption( caption );
+ TQMainWindow::setCaption( caption );
#if defined Q_WS_X11
NETWinInfo info( qt_xdisplay(), winId(), qt_xrootwin(), 0 );
info.setName( caption.utf8().data() );
@@ -607,7 +607,7 @@ void KMainWindow::appHelpActivated( void )
mHelpMenu->appHelpActivated();
}
-void KMainWindow::slotStateChanged(const QString &newstate)
+void KMainWindow::slotStateChanged(const TQString &newstate)
{
stateChanged(newstate, KXMLGUIClient::StateNoReverse);
}
@@ -615,7 +615,7 @@ void KMainWindow::slotStateChanged(const QString &newstate)
/*
* Get rid of this for KDE 4.0
*/
-void KMainWindow::slotStateChanged(const QString &newstate,
+void KMainWindow::slotStateChanged(const TQString &newstate,
KXMLGUIClient::ReverseStateChange reverse)
{
stateChanged(newstate, reverse);
@@ -624,14 +624,14 @@ void KMainWindow::slotStateChanged(const QString &newstate,
/*
* Enable this for KDE 4.0
*/
-// void KMainWindow::slotStateChanged(const QString &newstate,
+// void KMainWindow::slotStateChanged(const TQString &newstate,
// bool reverse)
// {
// stateChanged(newstate,
// reverse ? KXMLGUIClient::StateReverse : KXMLGUIClient::StateNoReverse);
// }
-void KMainWindow::closeEvent ( QCloseEvent *e )
+void KMainWindow::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 ( QCloseEvent *e )
e->accept();
int not_withdrawn = 0;
- QPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
+ TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
for (it.toFirst(); it.current(); ++it){
if ( !it.current()->isHidden() && it.current()->isTopLevel() && it.current() != this )
not_withdrawn++;
@@ -650,7 +650,7 @@ void KMainWindow::closeEvent ( QCloseEvent *e )
if ( !no_query_exit && not_withdrawn <= 0 ) { // last window close accepted?
if ( queryExit() && !kapp->sessionSaving() && !d->shuttingDown ) { // Yes, Quit app?
// don't call queryExit() twice
- disconnect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown()));
+ disconnect(kapp, TQT_SIGNAL(shutDown()), this, TQT_SLOT(shuttingDown()));
d->shuttingDown = true;
kapp->deref(); // ...and quit application.
} else {
@@ -694,15 +694,15 @@ void KMainWindow::savePropertiesInternal( KConfig *config, int number )
bool oldASWS = d->autoSaveWindowSize;
d->autoSaveWindowSize = true; // make saveMainWindowSettings save the window size
- QString s;
+ TQString s;
s.setNum(number);
- s.prepend(QString::fromLatin1("WindowProperties"));
+ s.prepend(TQString::fromLatin1("WindowProperties"));
config->setGroup(s);
// store objectName, className, Width and Height for later restoring
// (Only useful for session management)
- config->writeEntry(QString::fromLatin1("ObjectName"), name());
- config->writeEntry(QString::fromLatin1("ClassName"), className());
+ config->writeEntry(TQString::fromLatin1("ObjectName"), name());
+ config->writeEntry(TQString::fromLatin1("ClassName"), className());
saveMainWindowSettings(config); // Menubar, statusbar and Toolbar settings.
@@ -713,10 +713,10 @@ void KMainWindow::savePropertiesInternal( KConfig *config, int number )
d->autoSaveWindowSize = oldASWS;
}
-void KMainWindow::saveMainWindowSettings(KConfig *config, const QString &configGroup)
+void KMainWindow::saveMainWindowSettings(KConfig *config, const TQString &configGroup)
{
kdDebug(200) << "KMainWindow::saveMainWindowSettings " << configGroup << endl;
- QString oldGroup;
+ TQString oldGroup;
if (!configGroup.isEmpty())
{
@@ -728,7 +728,7 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const QString &configG
if ( d->autoSaveWindowSize )
saveWindowSize( config );
- QStatusBar* sb = internalStatusBar();
+ TQStatusBar* sb = internalStatusBar();
if (sb) {
if(!config->hasDefault("StatusBar") && !sb->isHidden() )
config->revertToDefault("StatusBar");
@@ -736,9 +736,9 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const QString &configG
config->writeEntry("StatusBar", sb->isHidden() ? "Disabled" : "Enabled");
}
- QMenuBar* mb = internalMenuBar();
+ TQMenuBar* mb = internalMenuBar();
if (mb) {
- QString MenuBar = QString::fromLatin1("MenuBar");
+ TQString MenuBar = TQString::fromLatin1("MenuBar");
if(!config->hasDefault("MenuBar") && !mb->isHidden() )
config->revertToDefault("MenuBar");
else
@@ -747,15 +747,15 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const QString &configG
int n = 1; // Toolbar counter. toolbars are counted from 1,
KToolBar *toolbar = 0;
- QPtrListIterator<KToolBar> it( toolBarIterator() );
+ TQPtrListIterator<KToolBar> it( toolBarIterator() );
while ( ( toolbar = it.current() ) ) {
++it;
- QString group;
+ TQString group;
if (!configGroup.isEmpty())
{
// Give a number to the toolbar, but prefer a name if there is one,
// because there's no real guarantee on the ordering of toolbars
- group = (!::qstrcmp(toolbar->name(), "unnamed") ? QString::number(n) : QString(" ")+toolbar->name());
+ group = (!::qstrcmp(toolbar->name(), "unnamed") ? TQString::number(n) : TQString(" ")+toolbar->name());
group.prepend(" Toolbar");
group.prepend(configGroup);
}
@@ -795,9 +795,9 @@ bool KMainWindow::isStandardToolBarMenuEnabled() const
void KMainWindow::createStandardStatusBarAction(){
if(!d->showStatusBarAction){
- d->showStatusBarAction = KStdAction::showStatusbar(this, SLOT(setSettingsDirty()), actionCollection());
+ d->showStatusBarAction = KStdAction::showStatusbar(this, TQT_SLOT(setSettingsDirty()), actionCollection());
KStatusBar *sb = statusBar(); // Creates statusbar if it doesn't exist already.
- connect(d->showStatusBarAction, SIGNAL(toggled(bool)), sb, SLOT(setShown(bool)));
+ connect(d->showStatusBarAction, TQT_SIGNAL(toggled(bool)), sb, TQT_SLOT(setShown(bool)));
d->showStatusBarAction->setChecked(sb->isHidden());
}
}
@@ -808,15 +808,15 @@ bool KMainWindow::readPropertiesInternal( KConfig *config, int number )
readGlobalProperties( config );
// in order they are in toolbar list
- QString s;
+ TQString s;
s.setNum(number);
- s.prepend(QString::fromLatin1("WindowProperties"));
+ s.prepend(TQString::fromLatin1("WindowProperties"));
config->setGroup(s);
// restore the object name (window role)
- if ( config->hasKey(QString::fromLatin1("ObjectName" )) )
- setName( config->readEntry(QString::fromLatin1("ObjectName")).latin1()); // latin1 is right here
+ if ( config->hasKey(TQString::fromLatin1("ObjectName" )) )
+ setName( config->readEntry(TQString::fromLatin1("ObjectName")).latin1()); // latin1 is right here
applyMainWindowSettings(config); // Menubar, statusbar and toolbar settings.
@@ -826,12 +826,12 @@ bool KMainWindow::readPropertiesInternal( KConfig *config, int number )
return true;
}
-void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &configGroup)
+void KMainWindow::applyMainWindowSettings(KConfig *config, const TQString &configGroup)
{
return applyMainWindowSettings(config,configGroup,false);
}
-void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &configGroup,bool force)
+void KMainWindow::applyMainWindowSettings(KConfig *config, const TQString &configGroup,bool force)
{
kdDebug(200) << "KMainWindow::applyMainWindowSettings" << endl;
@@ -839,9 +839,9 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &config
restoreWindowSize(config);
- QStatusBar* sb = internalStatusBar();
+ TQStatusBar* sb = internalStatusBar();
if (sb) {
- QString entry = config->readEntry("StatusBar", "Enabled");
+ TQString entry = config->readEntry("StatusBar", "Enabled");
if ( entry == "Disabled" )
sb->hide();
else
@@ -850,9 +850,9 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &config
d->showStatusBarAction->setChecked(!sb->isHidden());
}
- QMenuBar* mb = internalMenuBar();
+ TQMenuBar* mb = internalMenuBar();
if (mb) {
- QString entry = config->readEntry ("MenuBar", "Enabled");
+ TQString entry = config->readEntry ("MenuBar", "Enabled");
if ( entry == "Disabled" )
mb->hide();
else
@@ -861,16 +861,16 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &config
int n = 1; // Toolbar counter. toolbars are counted from 1,
KToolBar *toolbar;
- QPtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator
+ TQPtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator
for ( ; it.current(); ++it) {
toolbar= it.current();
- QString group;
+ TQString group;
if (!configGroup.isEmpty())
{
// Give a number to the toolbar, but prefer a name if there is one,
// because there's no real guarantee on the ordering of toolbars
- group = (!::qstrcmp(toolbar->name(), "unnamed") ? QString::number(n) : QString(" ")+toolbar->name());
+ group = (!::qstrcmp(toolbar->name(), "unnamed") ? TQString::number(n) : TQString(" ")+toolbar->name());
group.prepend(" Toolbar");
group.prepend(configGroup);
}
@@ -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.
- QPtrListIterator<KToolBar> it( toolBarIterator() );
+ TQPtrListIterator<KToolBar> it( toolBarIterator() );
for ( ; it.current() ; ++it ) {
it.current()->positionYourself( force );
}
@@ -901,8 +901,8 @@ void KMainWindow::finalizeGUI( bool force )
void KMainWindow::saveWindowSize( KConfig * config ) const
{
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ int scnum = TQApplication::desktop()->screenNumber(parentWidget());
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
int w, h;
#if defined Q_WS_X11
// save maximalization as desktop size + 1 in that direction
@@ -916,10 +916,10 @@ void KMainWindow::saveWindowSize( KConfig * config ) const
}
//TODO: add "Maximized" property instead "+1" hack
#endif
- QRect size( desk.width(), w, desk.height(), h );
+ TQRect size( desk.width(), w, desk.height(), h );
bool defaultSize = (size == d->defaultWindowSize);
- QString widthString = QString::fromLatin1("Width %1").arg(desk.width());
- QString heightString = QString::fromLatin1("Height %1").arg(desk.height());
+ TQString widthString = TQString::fromLatin1("Width %1").arg(desk.width());
+ TQString heightString = TQString::fromLatin1("Height %1").arg(desk.height());
if (!config->hasDefault(widthString) && defaultSize)
config->revertToDefault(widthString);
else
@@ -937,20 +937,20 @@ void KMainWindow::restoreWindowSize( KConfig * config )
parseGeometry(true);
} else {
// restore the size
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ int scnum = TQApplication::desktop()->screenNumber(parentWidget());
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
if ( d->defaultWindowSize.isNull() ) // only once
- d->defaultWindowSize = QRect(desk.width(), width(), desk.height(), height()); // store default values
- QSize size( config->readNumEntry( QString::fromLatin1("Width %1").arg(desk.width()), 0 ),
- config->readNumEntry( QString::fromLatin1("Height %1").arg(desk.height()), 0 ) );
+ d->defaultWindowSize = TQRect(desk.width(), width(), desk.height(), height()); // store default values
+ TQSize size( config->readNumEntry( TQString::fromLatin1("Width %1").arg(desk.width()), 0 ),
+ config->readNumEntry( TQString::fromLatin1("Height %1").arg(desk.height()), 0 ) );
if (size.isEmpty()) {
// try the KDE 2.0 way
- size = QSize( config->readNumEntry( QString::fromLatin1("Width"), 0 ),
- config->readNumEntry( QString::fromLatin1("Height"), 0 ) );
+ size = TQSize( config->readNumEntry( TQString::fromLatin1("Width"), 0 ),
+ config->readNumEntry( TQString::fromLatin1("Height"), 0 ) );
if (!size.isEmpty()) {
// make sure the other resolutions don't get old settings
- config->writeEntry( QString::fromLatin1("Width"), 0 );
- config->writeEntry( QString::fromLatin1("Height"), 0 );
+ config->writeEntry( TQString::fromLatin1("Width"), 0 );
+ config->writeEntry( TQString::fromLatin1("Height"), 0 );
}
}
if ( !size.isEmpty() ) {
@@ -965,7 +965,7 @@ void KMainWindow::restoreWindowSize( KConfig * config )
resize( size.width(), height());
else
resize( size );
- // QWidget::showMaximized() is both insufficient and broken
+ // TQWidget::showMaximized() is both insufficient and broken
KWin::setState( winId(), state );
#else
if (size.width() > desk.width() || size.height() > desk.height())
@@ -997,8 +997,8 @@ void KMainWindow::setSettingsDirty()
// (to compress calls and save only once, in case of multiple changes)
if ( !d->settingsTimer )
{
- d->settingsTimer = new QTimer( this );
- connect( d->settingsTimer, SIGNAL( timeout() ), SLOT( saveAutoSaveSettings() ) );
+ d->settingsTimer = new TQTimer( this );
+ connect( d->settingsTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( saveAutoSaveSettings() ) );
}
d->settingsTimer->start( 500, true );
}
@@ -1009,21 +1009,21 @@ bool KMainWindow::settingsDirty() const
return d->settingsDirty;
}
-QString KMainWindow::settingsGroup() const
+TQString KMainWindow::settingsGroup() const
{
return d->autoSaveGroup;
}
-void KMainWindow::setAutoSaveSettings( const QString & groupName, bool saveWindowSize )
+void KMainWindow::setAutoSaveSettings( const TQString & groupName, bool saveWindowSize )
{
d->autoSaveSettings = true;
d->autoSaveGroup = groupName;
d->autoSaveWindowSize = saveWindowSize;
// Get notified when the user moves a toolbar around
- disconnect( this, SIGNAL( dockWindowPositionChanged( QDockWindow * ) ),
- this, SLOT( setSettingsDirty() ) );
- connect( this, SIGNAL( dockWindowPositionChanged( QDockWindow * ) ),
- this, SLOT( setSettingsDirty() ) );
+ disconnect( this, TQT_SIGNAL( dockWindowPositionChanged( TQDockWindow * ) ),
+ this, TQT_SLOT( setSettingsDirty() ) );
+ connect( this, TQT_SIGNAL( dockWindowPositionChanged( TQDockWindow * ) ),
+ this, TQT_SLOT( setSettingsDirty() ) );
// Now read the previously saved settings
applyMainWindowSettings( KGlobal::config(), groupName );
@@ -1041,7 +1041,7 @@ bool KMainWindow::autoSaveSettings() const
return d->autoSaveSettings;
}
-QString KMainWindow::autoSaveGroup() const
+TQString KMainWindow::autoSaveGroup() const
{
return d->autoSaveGroup;
}
@@ -1057,7 +1057,7 @@ void KMainWindow::saveAutoSaveSettings()
d->settingsTimer->stop();
}
-void KMainWindow::resizeEvent( QResizeEvent * )
+void KMainWindow::resizeEvent( TQResizeEvent * )
{
if ( d->autoSaveWindowSize )
setSettingsDirty();
@@ -1075,7 +1075,7 @@ KMenuBar *KMainWindow::menuBar()
mb = new KMenuBar( this );
// trigger a re-layout and trigger a call to the private
// setMenuBar method.
- QMainWindow::menuBar();
+ TQMainWindow::menuBar();
}
return mb;
}
@@ -1087,7 +1087,7 @@ KStatusBar *KMainWindow::statusBar()
sb = new KStatusBar( this );
// trigger a re-layout and trigger a call to the private
// setStatusBar method.
- QMainWindow::statusBar();
+ TQMainWindow::statusBar();
}
return sb;
}
@@ -1109,7 +1109,7 @@ void KMainWindow::shuttingDown()
KMenuBar *KMainWindow::internalMenuBar()
{
- QObjectList *l = queryList( "KMenuBar", 0, false, false );
+ TQObjectList *l = queryList( "KMenuBar", 0, false, false );
if ( !l || !l->first() ) {
delete l;
return 0;
@@ -1122,7 +1122,7 @@ KMenuBar *KMainWindow::internalMenuBar()
KStatusBar *KMainWindow::internalStatusBar()
{
- QObjectList *l = queryList( "KStatusBar", 0, false, false );
+ TQObjectList *l = queryList( "KStatusBar", 0, false, false );
if ( !l || !l->first() ) {
delete l;
return 0;
@@ -1133,9 +1133,9 @@ KStatusBar *KMainWindow::internalStatusBar()
return s;
}
-void KMainWindow::childEvent( QChildEvent* e)
+void KMainWindow::childEvent( TQChildEvent* e)
{
- QMainWindow::childEvent( e );
+ TQMainWindow::childEvent( e );
}
KToolBar *KMainWindow::toolBar( const char * name )
@@ -1153,19 +1153,19 @@ KToolBar *KMainWindow::toolBar( const char * name )
return new KToolBar(this, DockTop, false, name, honor_mode ); // non-XMLGUI
}
-QPtrListIterator<KToolBar> KMainWindow::toolBarIterator()
+TQPtrListIterator<KToolBar> KMainWindow::toolBarIterator()
{
toolbarList.clear();
- QPtrList<QToolBar> lst;
- for ( int i = (int)QMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) {
+ TQPtrList<TQToolBar> lst;
+ for ( int i = (int)TQMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) {
lst = toolBars( (ToolBarDock)i );
- for ( QToolBar *tb = lst.first(); tb; tb = lst.next() ) {
+ for ( TQToolBar *tb = lst.first(); tb; tb = lst.next() ) {
if ( !tb->inherits( "KToolBar" ) )
continue;
toolbarList.append( (KToolBar*)tb );
}
}
- return QPtrListIterator<KToolBar>( toolbarList );
+ return TQPtrListIterator<KToolBar>( toolbarList );
}
KAccel * KMainWindow::accel()
@@ -1175,12 +1175,12 @@ KAccel * KMainWindow::accel()
return d->kaccel;
}
-void KMainWindow::paintEvent( QPaintEvent * pe )
+void KMainWindow::paintEvent( TQPaintEvent * pe )
{
- QMainWindow::paintEvent(pe); //Upcall to handle SH_MainWindow_SpaceBelowMenuBar rendering
+ TQMainWindow::paintEvent(pe); //Upcall to handle SH_MainWindow_SpaceBelowMenuBar rendering
}
-QSize KMainWindow::sizeForCentralWidgetSize(QSize size)
+TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size)
{
KToolBar *tb = (KToolBar*)child( "mainToolBar", "KToolBar" );
if (tb && !tb->isHidden()) {
@@ -1188,16 +1188,16 @@ QSize KMainWindow::sizeForCentralWidgetSize(QSize size)
{
case KToolBar::Top:
case KToolBar::Bottom:
- size += QSize(0, tb->sizeHint().height());
+ size += TQSize(0, tb->sizeHint().height());
break;
case KToolBar::Left:
case KToolBar::Right:
- size += QSize(toolBar()->sizeHint().width(), 0);
+ size += TQSize(toolBar()->sizeHint().width(), 0);
break;
case KToolBar::Flat:
- size += QSize(0, 3+kapp->style().pixelMetric( QStyle::PM_DockWindowHandleExtent ));
+ size += TQSize(0, 3+kapp->style().pixelMetric( TQStyle::PM_DockWindowHandleExtent ));
break;
default:
@@ -1206,13 +1206,13 @@ QSize KMainWindow::sizeForCentralWidgetSize(QSize size)
}
KMenuBar *mb = internalMenuBar();
if (mb && !mb->isHidden()) {
- size += QSize(0,mb->heightForWidth(size.width()));
- if (style().styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar, this))
- size += QSize( 0, dockWindowsMovable() ? 1 : 2);
+ size += TQSize(0,mb->heightForWidth(size.width()));
+ if (style().styleHint(TQStyle::SH_MainWindow_SpaceBelowMenuBar, this))
+ size += TQSize( 0, dockWindowsMovable() ? 1 : 2);
}
- QStatusBar *sb = internalStatusBar();
+ TQStatusBar *sb = internalStatusBar();
if( sb && !sb->isHidden() )
- size += QSize(0, sb->sizeHint().height());
+ size += TQSize(0, sb->sizeHint().height());
return size;
}
@@ -1222,17 +1222,17 @@ QSize KMainWindow::sizeForCentralWidgetSize(QSize size)
#warning Remove, should be in Qt
#endif
#endif
-void KMainWindow::setIcon( const QPixmap& p )
+void KMainWindow::setIcon( const TQPixmap& p )
{
- QMainWindow::setIcon( p );
+ TQMainWindow::setIcon( p );
#ifdef Q_WS_X11
// Qt3 doesn't support _NET_WM_ICON, but KApplication::setTopWidget(), which
// is used by KMainWindow, sets it
- KWin::setIcons( winId(), p, QPixmap());
+ KWin::setIcons( winId(), p, TQPixmap());
#endif
}
-QPtrList<KMainWindow>* KMainWindow::getMemberList() { return memberList; }
+TQPtrList<KMainWindow>* KMainWindow::getMemberList() { return memberList; }
// why do we support old gcc versions? using KXMLGUIBuilder::finalizeGUI;
// DF: because they compile KDE much faster :)
diff --git a/kdeui/kmainwindow.h b/kdeui/kmainwindow.h
index 00d3aaee6..6c22d84eb 100644
--- a/kdeui/kmainwindow.h
+++ b/kdeui/kmainwindow.h
@@ -24,8 +24,8 @@
#include "kxmlguifactory.h"
#include "kxmlguiclient.h"
#include "kxmlguibuilder.h"
-#include <qmainwindow.h>
-#include <qmetaobject.h>
+#include <tqmainwindow.h>
+#include <tqmetaobject.h>
#include <ktoolbar.h>
class KPopupMenu;
@@ -95,7 +95,7 @@ class DCOPObject;
*/
-class KDEUI_EXPORT KMainWindow : public QMainWindow, public KXMLGUIBuilder, virtual public KXMLGUIClient
+class KDEUI_EXPORT KMainWindow : public TQMainWindow, public KXMLGUIBuilder, virtual public KXMLGUIClient
{
friend class KMWSessionManaged;
Q_OBJECT
@@ -126,14 +126,14 @@ public:
* automatically destroyed when its window is closed. Pass 0 if
* you do not want this behavior.
*
- * @see http://doc.trolltech.com/3.2/qt.html#WidgetFlags-enum
+ * @see http://doc.trolltech.com/3.2/tqt.html#WidgetFlags-enum
*
* KMainWindows must be created on the heap with 'new', like:
* \code
* KMainWindow *kmw = new KMainWindow (...);
* \endcode
**/
- KMainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
+ KMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
/**
* Flags that can be passed in an argument to the constructor to
@@ -155,7 +155,7 @@ public:
*
* @since 3.2
*/
- KMainWindow( int cflags, QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
+ KMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
/**
* \brief Destructor.
@@ -189,7 +189,7 @@ public:
*
* @return A standard help menu.
*/
- KPopupMenu* helpMenu( const QString &aboutAppText = QString::null,
+ KPopupMenu* helpMenu( const TQString &aboutAppText = TQString::null,
bool showWhatsThis = true );
/**
@@ -236,7 +236,7 @@ public:
* // create default application as usual
* }
* \endcode
- * Note that QWidget::show() is called implicitly in restore.
+ * Note that TQWidget::show() is called implicitly in restore.
*
* With this you can easily restore all toplevel windows of your
* application.
@@ -291,17 +291,17 @@ public:
* This is only useful if your application uses
* different kinds of toplevel windows.
*/
- // KDE 4 return QCString - QObject::className() returns const char*
- static const QString classNameOfToplevel( int number );
+ // KDE 4 return TQCString - TQObject::className() returns const char*
+ static const TQString classNameOfToplevel( int number );
/**
- * Reimplementation of QMainWindow::show()
+ * Reimplementation of TQMainWindow::show()
*/
// KDE4 remove this method if this has been fixed in Qt
virtual void show();
/**
- * Reimplementation of QMainWindow::hide()
+ * Reimplementation of TQMainWindow::hide()
*/
// KDE4 remove this method if this has been fixed in Qt
virtual void hide();
@@ -335,9 +335,9 @@ public:
* @param xmlfile The local xmlfile (relative or absolute)
* @param _conserveMemory Specify whether createGUI() should call
* KXMLGUIClient::conserveMemory() to free all memory
- * allocated by the QDomDocument and by the KXMLGUIFactory.
+ * allocated by the TQDomDocument and by the KXMLGUIFactory.
*/
- void createGUI( const QString &xmlfile = QString::null, bool _conserveMemory = true );
+ void createGUI( const TQString &xmlfile = TQString::null, bool _conserveMemory = true );
/**
* Enables the build of a standard help menu when calling createGUI().
@@ -382,14 +382,14 @@ public:
/**
* List of members of KMainWindow class.
*/
- static QPtrList<KMainWindow>* memberList;
+ static TQPtrList<KMainWindow>* memberList;
//KDE4: replace with memberList() and make memberList member private
/**
* List of members of KMainWindow class.
* @since 3.4
*/
- static QPtrList<KMainWindow>* getMemberList();
+ static TQPtrList<KMainWindow>* getMemberList();
/**
* Returns a pointer to the toolbar with the specified name.
@@ -406,7 +406,7 @@ public:
/**
* @return An iterator over the list of all toolbars for this window.
*/
- QPtrListIterator<KToolBar> toolBarIterator();
+ TQPtrListIterator<KToolBar> toolBarIterator();
/**
* @return A KAccel instance bound to this mainwindow. Used automatically
@@ -443,11 +443,11 @@ public:
* - Put the setAutoSaveSettings ( or setupGUI() ) call after all widgets
* have been created and placed inside the main window (i.e. for 99% of
* apps setCentralWidget())
- * - Widgets that inherit from QWidget (like game boards) should overload
- * "virtual QSize sizeHint() const;" to specify a default size rather
- * than letting QWidget::adjust use the default size of 0x0.
+ * - Widgets that inherit from TQWidget (like game boards) should overload
+ * "virtual TQSize sizeHint() const;" to specify a default size rather
+ * than letting TQWidget::adjust use the default size of 0x0.
*/
- void setAutoSaveSettings( const QString & groupName = QString::fromLatin1("MainWindow"),
+ void setAutoSaveSettings( const TQString & groupName = TQString::fromLatin1("MainWindow"),
bool saveWindowSize = true );
/**
@@ -470,7 +470,7 @@ public:
* using KEditToolbar.
* @since 3.1
*/
- QString autoSaveGroup() const;
+ TQString autoSaveGroup() const;
/**
* Read settings for statusbar, menubar and toolbar from their respective
@@ -481,9 +481,9 @@ public:
* group name is used.
* @param force if set, even default settings are re-applied
*/
- void applyMainWindowSettings(KConfig *config, const QString &groupName, bool force);
+ void applyMainWindowSettings(KConfig *config, const TQString &groupName, bool force);
// KDE4 merge with force=false
- void applyMainWindowSettings(KConfig *config, const QString &groupName = QString::null);
+ void applyMainWindowSettings(KConfig *config, const TQString &groupName = TQString::null);
/**
* Save settings for statusbar, menubar and toolbar to their respective
@@ -493,7 +493,7 @@ public:
* @param groupName Group name to use. If not specified, the last used
* group name is used
*/
- void saveMainWindowSettings(KConfig *config, const QString &groupName = QString::null);
+ void saveMainWindowSettings(KConfig *config, const TQString &groupName = TQString::null);
/**
* Sets whether KMainWindow should provide a menu that allows showing/hiding
@@ -532,8 +532,8 @@ public:
* this function) a connection needs to be made to let KMainWindow
* know when that status (hidden/shown) of the statusbar has changed.
* For example:
- * connect(action, SIGNAL(activated()),
- * kmainwindow, SLOT(setSettingsDirty()));
+ * connect(action, TQT_SIGNAL(activated()),
+ * kmainwindow, TQT_SLOT(setSettingsDirty()));
* Otherwise the status (hidden/show) of the statusbar might not be saved
* by KMainWindow.
* @since 3.2
@@ -593,7 +593,7 @@ public:
*
* @since 3.3
*/
- void setupGUI( int options = ToolBar | Keys | StatusBar | Save | Create, const QString& xmlfile = QString::null );
+ void setupGUI( int options = ToolBar | Keys | StatusBar | Save | Create, const TQString& xmlfile = TQString::null );
/**
* Configures the current windows and its actions in the typical KDE
@@ -608,7 +608,7 @@ public:
*
* @since 3.5
*/
- void setupGUI( QSize defaultSize, int options = ToolBar | Keys | StatusBar | Save | Create, const QString& xmlfile = QString::null );
+ void setupGUI( TQSize defaultSize, int options = ToolBar | Keys | StatusBar | Save | Create, const TQString& xmlfile = TQString::null );
/**
* Returns a pointer to the mainwindows action responsible for the toolbars menu
@@ -659,13 +659,13 @@ public:
*
*/
// KDE4 to be removed
- QSize sizeForCentralWidgetSize(QSize size) KDE_DEPRECATED;
+ TQSize sizeForCentralWidgetSize(TQSize size) KDE_DEPRECATED;
/**
* @internal
*/
// KDE4 remove
- virtual void setIcon( const QPixmap & );
+ virtual void setIcon( const TQPixmap & );
public slots:
/**
@@ -674,7 +674,7 @@ public slots:
* This slot can be connected dirrectly to the action to configure shortcuts.
* This is very simple to do that by adding a single line
* \code
- * KStdAction::configureToolbars( guiFactory(), SLOT( configureToolbars() ),
+ * KStdAction::configureToolbars( guiFactory(), TQT_SLOT( configureToolbars() ),
* actionCollection() );
* \endcode
*
@@ -689,7 +689,7 @@ public slots:
* in this string. It will be added automatically according to the KDE
* standard.
*/
- virtual void setCaption( const QString &caption );
+ virtual void setCaption( const TQString &caption );
/**
* Makes a KDE compliant caption.
*
@@ -699,7 +699,7 @@ public slots:
* @param modified Specify whether the document is modified. This displays
* an additional sign in the title bar, usually "**".
*/
- virtual void setCaption( const QString &caption, bool modified );
+ virtual void setCaption( const TQString &caption, bool modified );
/**
* Make a plain caption without any modifications.
@@ -707,7 +707,7 @@ public slots:
* @param caption Your caption. This is the string that will be
* displayed in the window title.
*/
- virtual void setPlainCaption( const QString &caption );
+ virtual void setPlainCaption( const TQString &caption );
/**
* Open the help page for the application.
@@ -724,9 +724,9 @@ public slots:
*
* \code
* KIconLoader &loader = *KGlobal::iconLoader();
- * QPixmap pixmap = loader.loadIcon( "help" );
- * toolBar(0)->insertButton( pixmap, 0, SIGNAL(clicked()),
- * this, SLOT(appHelpActivated()), true, i18n("Help") );
+ * TQPixmap pixmap = loader.loadIcon( "help" );
+ * toolBar(0)->insertButton( pixmap, 0, TQT_SIGNAL(clicked()),
+ * this, TQT_SLOT(appHelpActivated()), true, i18n("Help") );
* \endcode
*
*/
@@ -738,7 +738,7 @@ public slots:
* Enable and disable actions as defined in the XML rc file
* @since 3.1
*/
- virtual void slotStateChanged(const QString &newstate);
+ virtual void slotStateChanged(const TQString &newstate);
/**
* Apply a state change
@@ -748,7 +748,7 @@ public slots:
* enabled, and vice-versa) if specified.
* @since 3.1
*/
- void slotStateChanged(const QString &newstate,
+ void slotStateChanged(const TQString &newstate,
KXMLGUIClient::ReverseStateChange); // KDE 4.0: remove this
@@ -759,7 +759,7 @@ public slots:
* can "reverse" the state (disable the actions which should be
* enabled, and vice-versa) if specified.
*/
-// void slotStateChanged(const QString &newstate,
+// void slotStateChanged(const TQString &newstate,
// bool reverse); // KDE 4.0: enable this
/**
@@ -772,9 +772,9 @@ public slots:
void setSettingsDirty();
protected:
- void paintEvent( QPaintEvent* e );
- void childEvent( QChildEvent* e);
- void resizeEvent( QResizeEvent* e);
+ void paintEvent( TQPaintEvent* e );
+ void childEvent( TQChildEvent* e);
+ void resizeEvent( TQResizeEvent* e);
/**
* Reimplemented to call the queryClose() and queryExit() handlers.
*
@@ -782,7 +782,7 @@ protected:
* If you do it anyway, ensure to call the base implementation to keep
* queryExit() running.
*/
- virtual void closeEvent ( QCloseEvent *);
+ virtual void closeEvent ( TQCloseEvent *);
// KDE4 This seems to be flawed to me. Either the app has only one
// mainwindow, so queryClose() is enough, or if it can have more of them,
@@ -914,7 +914,7 @@ protected:
/**
* For inherited classes
*/
- QString settingsGroup() const;
+ TQString settingsGroup() const;
/**
* For inherited classes
* Note that the group must be set before calling
@@ -977,7 +977,7 @@ protected slots:
* Example:
* \code
*
- * void MyMainWindow::closeEvent( QCloseEvent *e )
+ * void MyMainWindow::closeEvent( TQCloseEvent *e )
* {
* // Save settings if auto-save is enabled, and settings have changed
* if ( settingsDirty() && autoSaveSettings() )
@@ -999,7 +999,7 @@ private:
KStatusBar *internalStatusBar();
KHelpMenu *mHelpMenu, *helpMenu2;
KXMLGUIFactory *factory_;
- QPtrList<KToolBar> toolbarList;
+ TQPtrList<KToolBar> toolbarList;
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -1027,8 +1027,8 @@ private:
template <typename T>
inline void kRestoreMainWindows() {
for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) {
- const QString className = KMainWindow::classNameOfToplevel( n );
- if ( className == QString::fromLatin1( T::staticMetaObject()->className() ) )
+ const TQString className = KMainWindow::classNameOfToplevel( n );
+ if ( className == TQString::fromLatin1( T::staticMetaObject()->className() ) )
(new T)->restore( n );
}
}
@@ -1039,10 +1039,10 @@ inline void kRestoreMainWindows() {
classNames[0] = T0::staticMetaObject()->className();
classNames[1] = T1::staticMetaObject()->className();
for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) {
- const QString className = KMainWindow::classNameOfToplevel( n );
- if ( className == QString::fromLatin1( classNames[0] ) )
+ const TQString className = KMainWindow::classNameOfToplevel( n );
+ if ( className == TQString::fromLatin1( classNames[0] ) )
(new T0)->restore( n );
- else if ( className == QString::fromLatin1( classNames[1] ) )
+ else if ( className == TQString::fromLatin1( classNames[1] ) )
(new T1)->restore( n );
}
}
@@ -1054,12 +1054,12 @@ inline void kRestoreMainWindows() {
classNames[1] = T1::staticMetaObject()->className();
classNames[2] = T2::staticMetaObject()->className();
for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) {
- const QString className = KMainWindow::classNameOfToplevel( n );
- if ( className == QString::fromLatin1( classNames[0] ) )
+ const TQString className = KMainWindow::classNameOfToplevel( n );
+ if ( className == TQString::fromLatin1( classNames[0] ) )
(new T0)->restore( n );
- else if ( className == QString::fromLatin1( classNames[1] ) )
+ else if ( className == TQString::fromLatin1( classNames[1] ) )
(new T1)->restore( n );
- else if ( className == QString::fromLatin1( classNames[2] ) )
+ else if ( className == TQString::fromLatin1( classNames[2] ) )
(new T2)->restore( n );
}
}
diff --git a/kdeui/kmainwindowiface.cpp b/kdeui/kmainwindowiface.cpp
index ce653bb6d..d3117f0ec 100644
--- a/kdeui/kmainwindowiface.cpp
+++ b/kdeui/kmainwindowiface.cpp
@@ -25,7 +25,7 @@
#include <kdcoppropertyproxy.h>
#include <kmainwindow.h>
#include <kaction.h>
-#include <qclipboard.h>
+#include <tqclipboard.h>
KMainWindowInterface::KMainWindowInterface(KMainWindow * mainWindow)
@@ -47,15 +47,15 @@ QCStringList KMainWindowInterface::actions()
delete m_dcopActionProxy;
m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this );
QCStringList tmp_actions;
- QValueList<KAction *> lst = m_dcopActionProxy->actions();
- QValueList<KAction *>::ConstIterator it = lst.begin();
- QValueList<KAction *>::ConstIterator end = lst.end();
+ TQValueList<KAction *> lst = m_dcopActionProxy->actions();
+ TQValueList<KAction *>::ConstIterator it = lst.begin();
+ TQValueList<KAction *>::ConstIterator end = lst.end();
for (; it != end; ++it )
if ((*it)->isPlugged())
- tmp_actions.append( (QCString)(*it)->name() );
+ tmp_actions.append( (TQCString)(*it)->name() );
return tmp_actions;
}
-bool KMainWindowInterface::activateAction( QCString action)
+bool KMainWindowInterface::activateAction( TQCString action)
{
delete m_dcopActionProxy;
m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this );
@@ -68,7 +68,7 @@ bool KMainWindowInterface::activateAction( QCString action)
else
return false;
}
-bool KMainWindowInterface::disableAction( QCString action)
+bool KMainWindowInterface::disableAction( TQCString action)
{
delete m_dcopActionProxy;
m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this );
@@ -81,7 +81,7 @@ bool KMainWindowInterface::disableAction( QCString action)
else
return false;
}
-bool KMainWindowInterface::enableAction( QCString action)
+bool KMainWindowInterface::enableAction( TQCString action)
{
delete m_dcopActionProxy;
m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this );
@@ -94,7 +94,7 @@ bool KMainWindowInterface::enableAction( QCString action)
else
return false;
}
-bool KMainWindowInterface::actionIsEnabled( QCString action)
+bool KMainWindowInterface::actionIsEnabled( TQCString action)
{
delete m_dcopActionProxy;
m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this );
@@ -106,7 +106,7 @@ bool KMainWindowInterface::actionIsEnabled( QCString action)
else
return false;
}
-QCString KMainWindowInterface::actionToolTip( QCString action)
+TQCString KMainWindowInterface::actionToolTip( TQCString action)
{
delete m_dcopActionProxy;
m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this );
@@ -119,12 +119,12 @@ QCString KMainWindowInterface::actionToolTip( QCString action)
return "Error no such object!";
}
-DCOPRef KMainWindowInterface::action( const QCString &name )
+DCOPRef KMainWindowInterface::action( const TQCString &name )
{
return DCOPRef( kapp->dcopClient()->appId(), m_dcopActionProxy->actionObjectId( name ) );
}
-QMap<QCString,DCOPRef> KMainWindowInterface::actionMap()
+TQMap<TQCString,DCOPRef> KMainWindowInterface::actionMap()
{
return m_dcopActionProxy->actionMap();
}
@@ -135,8 +135,8 @@ int KMainWindowInterface::getWinID()
}
void KMainWindowInterface::grabWindowToClipBoard()
{
- QClipboard *clipboard = QApplication::clipboard();
- clipboard->setPixmap(QPixmap::grabWidget(m_MainWindow));
+ QClipboard *clipboard = TQApplication::clipboard();
+ clipboard->setPixmap(TQPixmap::grabWidget(m_MainWindow));
}
void KMainWindowInterface::hide()
{
@@ -186,7 +186,7 @@ QCStringList KMainWindowInterface::functionsDynamic()
{
return m_dcopPropertyProxy->functions();
}
-bool KMainWindowInterface::processDynamic(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
+bool KMainWindowInterface::processDynamic(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
return m_dcopPropertyProxy->processPropertyRequest( fun, data, replyType, replyData);
diff --git a/kdeui/kmainwindowiface.h b/kdeui/kmainwindowiface.h
index eaee8d1d9..f7f7a0bb8 100644
--- a/kdeui/kmainwindowiface.h
+++ b/kdeui/kmainwindowiface.h
@@ -21,8 +21,8 @@
#define KWINDOW_INTERFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
#include <dcopref.h>
class KDCOPActionProxy;
@@ -55,7 +55,7 @@ public:
~KMainWindowInterface();
QCStringList functionsDynamic();
- bool processDynamic(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData);
+ bool processDynamic(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData);
k_dcop:
@@ -71,7 +71,7 @@ k_dcop:
actions can be found by calling actions().
@return The success of the operation.
*/
- bool activateAction( QCString action);
+ bool activateAction( TQCString action);
/**
Disables the requested action.
@@ -79,7 +79,7 @@ k_dcop:
actions can be found by calling actions().
@return The success of the operation.
*/
- bool disableAction( QCString action);
+ bool disableAction( TQCString action);
/**
Enables the requested action.
@@ -87,7 +87,7 @@ k_dcop:
actions can be found by calling actions().
@return The success of the operation.
*/
- bool enableAction( QCString action);
+ bool enableAction( TQCString action);
/**
Returns the status of the requested action.
@@ -95,15 +95,15 @@ k_dcop:
actions can be found by calling actions().
@returns The state of the action, true - enabled, false - disabled.
*/
- bool actionIsEnabled( QCString action);
+ bool actionIsEnabled( TQCString action);
/**
Returns the tool tip text of the requested action.
@param action The name of the action to activate. The names of valid
actions can be found by calling actions().
- @return A QCString containing the text of the action's tool tip.
+ @return A TQCString containing the text of the action's tool tip.
*/
- QCString actionToolTip( QCString action);
+ TQCString actionToolTip( TQCString action);
/**
Returns a dcop reference to the selected KAction
@@ -111,12 +111,12 @@ k_dcop:
actions can be found by calling actions().
@return A DCOPRef for the kaction.
**/
- DCOPRef action( const QCString &name );
+ DCOPRef action( const TQCString &name );
/**
Returns and action map
**/
- QMap<QCString,DCOPRef> actionMap();
+ TQMap<TQCString,DCOPRef> actionMap();
/**
Returns the ID of the current main window.
This is useful for automated screen captures or other evil
diff --git a/kdeui/kmenubar.cpp b/kdeui/kmenubar.cpp
index 3de441a17..d2accb61d 100644
--- a/kdeui/kmenubar.cpp
+++ b/kdeui/kmenubar.cpp
@@ -25,12 +25,12 @@
#endif
#include "config.h"
-#include <qevent.h>
-#include <qobjectlist.h>
-#include <qaccel.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqevent.h>
+#include <tqobjectlist.h>
+#include <tqaccel.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kglobalsettings.h>
@@ -92,8 +92,8 @@ public:
#ifdef Q_WS_X11
KSelectionWatcher* selection;
#endif
- QTimer selection_timer;
- QSize min_size;
+ TQTimer selection_timer;
+ TQSize min_size;
static Atom makeSelectionAtom();
};
@@ -126,22 +126,22 @@ Atom KMenuBar::KMenuBarPrivate::makeSelectionAtom()
#endif
}
-KMenuBar::KMenuBar(QWidget *parent, const char *name)
- : QMenuBar(parent, name)
+KMenuBar::KMenuBar(TQWidget *parent, const char *name)
+ : TQMenuBar(parent, name)
{
#ifdef Q_WS_X11
QXEmbed::initialize();
#endif
d = new KMenuBarPrivate;
- connect( &d->selection_timer, SIGNAL( timeout()),
- this, SLOT( selectionTimeout()));
+ connect( &d->selection_timer, TQT_SIGNAL( timeout()),
+ this, TQT_SLOT( selectionTimeout()));
- connect( qApp->desktop(), SIGNAL( resized( int )), SLOT( updateFallbackSize()));
+ connect( qApp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( updateFallbackSize()));
if ( kapp )
// toolbarAppearanceChanged(int) is sent when changing macstyle
- connect( kapp, SIGNAL(toolbarAppearanceChanged(int)),
- this, SLOT(slotReadConfig()));
+ connect( kapp, TQT_SIGNAL(toolbarAppearanceChanged(int)),
+ this, TQT_SLOT(slotReadConfig()));
slotReadConfig();
}
@@ -175,27 +175,27 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level)
#ifdef Q_WS_X11
d->selection = new KSelectionWatcher( KMenuBarPrivate::makeSelectionAtom(),
DefaultScreen( qt_xdisplay()));
- connect( d->selection, SIGNAL( newOwner( Window )),
- this, SLOT( updateFallbackSize()));
- connect( d->selection, SIGNAL( lostOwner()),
- this, SLOT( updateFallbackSize()));
+ connect( d->selection, TQT_SIGNAL( newOwner( Window )),
+ this, TQT_SLOT( updateFallbackSize()));
+ connect( d->selection, TQT_SIGNAL( lostOwner()),
+ this, TQT_SLOT( updateFallbackSize()));
#endif
d->frameStyle = frameStyle();
d->lineWidth = lineWidth();
d->margin = margin();
d->fallback_mode = false;
bool wasShown = !isHidden();
- reparent( parentWidget(), WType_TopLevel | WStyle_Tool | WStyle_Customize | WStyle_NoBorder, QPoint(0,0), false );
+ reparent( parentWidget(), WType_TopLevel | WStyle_Tool | WStyle_Customize | WStyle_NoBorder, TQPoint(0,0), false );
#ifdef Q_WS_X11
KWin::setType( winId(), NET::TopMenu );
if( parentWidget())
XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
#endif
- QMenuBar::setFrameStyle( NoFrame );
- QMenuBar::setLineWidth( 0 );
- QMenuBar::setMargin( 0 );
+ TQMenuBar::setFrameStyle( NoFrame );
+ TQMenuBar::setLineWidth( 0 );
+ TQMenuBar::setMargin( 0 );
updateFallbackSize();
- d->min_size = QSize( 0, 0 );
+ d->min_size = TQSize( 0, 0 );
if( parentWidget() && !parentWidget()->isTopLevel())
setShown( parentWidget()->isVisible());
else if ( wasShown )
@@ -214,7 +214,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level)
setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
updateMenuBarSize();
if ( parentWidget() )
- reparent( parentWidget(), QPoint(0,0), !isHidden());
+ reparent( parentWidget(), TQPoint(0,0), !isHidden());
}
}
@@ -226,7 +226,7 @@ bool KMenuBar::isTopLevelMenu() const
// KDE4 remove
void KMenuBar::show()
{
- QMenuBar::show();
+ TQMenuBar::show();
}
void KMenuBar::slotReadConfig()
@@ -236,24 +236,24 @@ void KMenuBar::slotReadConfig()
setTopLevelMenuInternal( config->readBoolEntry( "macStyle", false ) );
}
-bool KMenuBar::eventFilter(QObject *obj, QEvent *ev)
+bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev)
{
if ( d->topLevel )
{
if ( parentWidget() && obj == parentWidget()->topLevelWidget() )
{
- if( ev->type() == QEvent::Resize )
- return false; // ignore resizing of parent, QMenuBar would try to adjust size
- if ( ev->type() == QEvent::Accel || ev->type() == QEvent::AccelAvailable )
+ if( ev->type() == TQEvent::Resize )
+ return false; // ignore resizing of parent, TQMenuBar would try to adjust size
+ if ( ev->type() == TQEvent::Accel || ev->type() == TQEvent::AccelAvailable )
{
- if ( QApplication::sendEvent( topLevelWidget(), ev ) )
+ if ( TQApplication::sendEvent( topLevelWidget(), ev ) )
return true;
}
- if(ev->type() == QEvent::ShowFullScreen )
+ if(ev->type() == TQEvent::ShowFullScreen )
// will update the state properly
setTopLevelMenuInternal( d->topLevel );
}
- if( parentWidget() && obj == parentWidget() && ev->type() == QEvent::Reparent )
+ if( parentWidget() && obj == parentWidget() && ev->type() == TQEvent::Reparent )
{
#ifdef Q_WS_X11
XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
@@ -264,7 +264,7 @@ bool KMenuBar::eventFilter(QObject *obj, QEvent *ev)
}
if( parentWidget() && !parentWidget()->isTopLevel() && obj == parentWidget())
{ // if the parent is not toplevel, KMenuBar needs to match its visibility status
- if( ev->type() == QEvent::Show )
+ if( ev->type() == TQEvent::Show )
{
#ifdef Q_WS_X11
XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
@@ -273,7 +273,7 @@ bool KMenuBar::eventFilter(QObject *obj, QEvent *ev)
#endif
show();
}
- if( ev->type() == QEvent::Hide )
+ if( ev->type() == TQEvent::Hide )
hide();
}
}
@@ -281,18 +281,18 @@ bool KMenuBar::eventFilter(QObject *obj, QEvent *ev)
{
if( parentWidget() && obj == parentWidget()->topLevelWidget())
{
- if( ev->type() == QEvent::WindowStateChange
+ if( ev->type() == TQEvent::WindowStateChange
&& !parentWidget()->topLevelWidget()->isFullScreen() )
setTopLevelMenuInternal( d->wasTopLevel );
}
}
- return QMenuBar::eventFilter( obj, ev );
+ return TQMenuBar::eventFilter( obj, ev );
}
// KDE4 remove
-void KMenuBar::showEvent( QShowEvent *e )
+void KMenuBar::showEvent( TQShowEvent *e )
{
- QMenuBar::showEvent(e);
+ TQMenuBar::showEvent(e);
}
void KMenuBar::updateFallbackSize()
@@ -327,8 +327,8 @@ void KMenuBar::selectionTimeout()
d->fallback_mode = true; // KMenuBar is handling its position itself
KConfigGroup xineramaConfig(KGlobal::config(),"Xinerama");
int screen = xineramaConfig.readNumEntry("MenubarScreen",
- QApplication::desktop()->screenNumber(QPoint(0,0)) );
- QRect area;
+ TQApplication::desktop()->screenNumber(TQPoint(0,0)) );
+ TQRect area;
if (kapp->desktop()->numScreens() < 2)
area = kapp->desktop()->geometry();
else
@@ -347,19 +347,19 @@ void KMenuBar::selectionTimeout()
int KMenuBar::block_resize = 0;
-void KMenuBar::resizeEvent( QResizeEvent *e )
+void KMenuBar::resizeEvent( TQResizeEvent *e )
{
if( e->spontaneous() && d->topLevel && !d->fallback_mode )
{
++block_resize; // do not respond with configure request to ConfigureNotify event
- QMenuBar::resizeEvent(e); // to avoid possible infinite loop
+ TQMenuBar::resizeEvent(e); // to avoid possible infinite loop
--block_resize;
}
else
- QMenuBar::resizeEvent(e);
+ TQMenuBar::resizeEvent(e);
}
-void KMenuBar::setGeometry( const QRect& r )
+void KMenuBar::setGeometry( const TQRect& r )
{
setGeometry( r.x(), r.y(), r.width(), r.height() );
}
@@ -372,8 +372,8 @@ void KMenuBar::setGeometry( int x, int y, int w, int h )
return;
}
checkSize( w, h );
- if( geometry() != QRect( x, y, w, h ))
- QMenuBar::setGeometry( x, y, w, h );
+ if( geometry() != TQRect( x, y, w, h ))
+ TQMenuBar::setGeometry( x, y, w, h );
}
void KMenuBar::resize( int w, int h )
@@ -381,8 +381,8 @@ void KMenuBar::resize( int w, int h )
if( block_resize > 0 )
return;
checkSize( w, h );
- if( size() != QSize( w, h ))
- QMenuBar::resize( w, h );
+ if( size() != TQSize( w, h ))
+ TQMenuBar::resize( w, h );
// kdDebug() << "RS:" << w << ":" << h << ":" << width() << ":" << height() << ":" << minimumWidth() << ":" << minimumHeight() << endl;
}
@@ -390,7 +390,7 @@ void KMenuBar::checkSize( int& w, int& h )
{
if( !d->topLevel || d->fallback_mode )
return;
- QSize s = sizeHint();
+ TQSize s = sizeHint();
w = s.width();
h = s.height();
// This is not done as setMinimumSize(), because that would set the minimum
@@ -401,16 +401,16 @@ void KMenuBar::checkSize( int& w, int& h )
}
// QMenuBar's sizeHint() gives wrong size (insufficient width), which causes wrapping in the kicker applet
-QSize KMenuBar::sizeHint() const
+TQSize KMenuBar::sizeHint() const
{
if( !d->topLevel || block_resize > 0 )
- return QMenuBar::sizeHint();
- // Since QMenuBar::sizeHint() may indirectly call resize(),
+ return TQMenuBar::sizeHint();
+ // Since TQMenuBar::sizeHint() may indirectly call resize(),
// avoid infinite recursion.
++block_resize;
// find the minimum useful height, and enlarge the width until the menu fits in that height (one row)
int h = heightForWidth( 1000000 );
- int w = QMenuBar::sizeHint().width();
+ int w = TQMenuBar::sizeHint().width();
// optimization - don't call heightForWidth() too many times
while( heightForWidth( w + 12 ) > h )
w += 12;
@@ -419,7 +419,7 @@ QSize KMenuBar::sizeHint() const
while( heightForWidth( w ) > h )
++w;
--block_resize;
- return QSize( w, h );
+ return TQSize( w, h );
}
#ifdef Q_WS_X11
@@ -428,16 +428,16 @@ bool KMenuBar::x11Event( XEvent* ev )
if( ev->type == ClientMessage && ev->xclient.message_type == msg_type_atom
&& ev->xclient.window == winId())
{
- // QMenuBar is trying really hard to keep the size it deems right.
+ // TQMenuBar is trying really hard to keep the size it deems right.
// Forcing minimum size and blocking resizing to match parent size
// in checkResizingToParent() seem to be the only way to make
// KMenuBar keep the size it wants
- d->min_size = QSize( ev->xclient.data.l[ 1 ], ev->xclient.data.l[ 2 ] );
+ d->min_size = TQSize( ev->xclient.data.l[ 1 ], ev->xclient.data.l[ 2 ] );
// kdDebug() << "MINSIZE:" << d->min_size << endl;
updateMenuBarSize();
return true;
}
- return QMenuBar::x11Event( ev );
+ return TQMenuBar::x11Event( ev );
}
#endif
@@ -452,7 +452,7 @@ void KMenuBar::setFrameStyle( int style )
if( d->topLevel )
d->frameStyle = style;
else
- QMenuBar::setFrameStyle( style );
+ TQMenuBar::setFrameStyle( style );
}
void KMenuBar::setLineWidth( int width )
@@ -460,7 +460,7 @@ void KMenuBar::setLineWidth( int width )
if( d->topLevel )
d->lineWidth = width;
else
- QMenuBar::setLineWidth( width );
+ TQMenuBar::setLineWidth( width );
}
void KMenuBar::setMargin( int margin )
@@ -468,18 +468,18 @@ void KMenuBar::setMargin( int margin )
if( d->topLevel )
d->margin = margin;
else
- QMenuBar::setMargin( margin );
+ TQMenuBar::setMargin( margin );
}
-void KMenuBar::closeEvent( QCloseEvent* e )
+void KMenuBar::closeEvent( TQCloseEvent* e )
{
if( d->topLevel )
e->ignore(); // mainly for the fallback mode
else
- QMenuBar::closeEvent( e );
+ TQMenuBar::closeEvent( e );
}
-void KMenuBar::drawContents( QPainter* p )
+void KMenuBar::drawContents( TQPainter* p )
{
// Closes the BR77113
// We need to overload this method to paint only the menu items
@@ -494,7 +494,7 @@ void KMenuBar::drawContents( QPainter* p )
if( !d->topLevel )
{
- QMenuBar::drawContents(p);
+ TQMenuBar::drawContents(p);
}
else
{
@@ -509,16 +509,16 @@ void KMenuBar::drawContents( QPainter* p )
p->eraseRect( rect() );
erase();
- QColorGroup g = colorGroup();
+ TQColorGroup g = colorGroup();
bool e;
for ( int i=0; i<(int)count(); i++ )
{
- QMenuItem *mi = findItem( idAt( i ) );
+ TQMenuItem *mi = findItem( idAt( i ) );
if ( !mi->text().isNull() || mi->pixmap() )
{
- QRect r = itemRect(i);
+ TQRect r = itemRect(i);
if(r.isEmpty() || !mi->isVisible())
continue;
@@ -535,17 +535,17 @@ void KMenuBar::drawContents( QPainter* p )
if( item_active )
{
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if (isEnabled() && e)
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if ( item_active )
- flags |= QStyle::Style_Active;
+ flags |= TQStyle::Style_Active;
if ( item_active && actItemDown )
- flags |= QStyle::Style_Down;
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_Down;
+ flags |= TQStyle::Style_HasFocus;
- style().drawControl(QStyle::CE_MenuBarItem, p, this,
- r, g, flags, QStyleOption(mi));
+ style().drawControl(TQStyle::CE_MenuBarItem, p, this,
+ r, g, flags, TQStyleOption(mi));
}
else
{
diff --git a/kdeui/kmenubar.h b/kdeui/kmenubar.h
index 91309a2a8..548a0c12f 100644
--- a/kdeui/kmenubar.h
+++ b/kdeui/kmenubar.h
@@ -25,15 +25,15 @@
#ifndef _KMENUBAR_H
#define _KMENUBAR_H
-#include <qmenubar.h>
+#include <tqmenubar.h>
#include <kdelibs_export.h>
/**
* %KDE Style-able menubar.
*
- * This is required since QMenuBar is currently not handled by
- * QStyle.
+ * This is required since TQMenuBar is currently not handled by
+ * TQStyle.
*
* @author Daniel "Mosfet" Duley.
* @version $Id$
@@ -45,7 +45,7 @@ class KDEUI_EXPORT KMenuBar : public QMenuBar
public:
- KMenuBar (QWidget *parent=0, const char *name=0);
+ KMenuBar (TQWidget *parent=0, const char *name=0);
~KMenuBar ();
/**
@@ -75,27 +75,27 @@ public:
bool isTopLevelMenu() const;
// TT are overloading virtuals :(
- virtual void setGeometry( const QRect &r );
+ virtual void setGeometry( const TQRect &r );
virtual void setGeometry( int x, int y, int w, int h );
virtual void resize( int w, int h );
- void resize( const QSize& s ) { QMenuBar::resize( s ); }
+ void resize( const TQSize& s ) { TQMenuBar::resize( s ); }
virtual void show();
virtual void setFrameStyle( int );
virtual void setLineWidth( int );
virtual void setMargin( int );
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
protected slots:
void slotReadConfig();
protected:
- virtual void showEvent( QShowEvent* );
- virtual void resizeEvent( QResizeEvent* );
- virtual bool eventFilter(QObject *, QEvent *);
+ virtual void showEvent( TQShowEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
+ virtual bool eventFilter(TQObject *, TQEvent *);
#ifdef Q_WS_X11
virtual bool x11Event( XEvent* );
#endif
- virtual void closeEvent( QCloseEvent* );
- virtual void drawContents( QPainter* );
+ virtual void closeEvent( TQCloseEvent* );
+ virtual void drawContents( TQPainter* );
private slots:
void updateFallbackSize();
void selectionTimeout();
diff --git a/kdeui/kmessagebox.cpp b/kdeui/kmessagebox.cpp
index 46336e9c6..8e9256677 100644
--- a/kdeui/kmessagebox.cpp
+++ b/kdeui/kmessagebox.cpp
@@ -17,19 +17,19 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qguardedptr.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qmessagebox.h>
-#include <qstringlist.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qstylesheet.h>
-#include <qsimplerichtext.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqguardedptr.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqmessagebox.h>
+#include <tqstringlist.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqstylesheet.h>
+#include <tqsimplerichtext.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -60,52 +60,52 @@
static bool KMessageBox_queue = false;
-static QPixmap themedMessageBoxIcon(QMessageBox::Icon icon)
+static TQPixmap themedMessageBoxIcon(TQMessageBox::Icon icon)
{
- QString icon_name;
+ TQString icon_name;
switch(icon)
{
- case QMessageBox::NoIcon:
- return QPixmap();
+ case TQMessageBox::NoIcon:
+ return TQPixmap();
break;
- case QMessageBox::Information:
+ case TQMessageBox::Information:
icon_name = "messagebox_info";
break;
- case QMessageBox::Warning:
+ case TQMessageBox::Warning:
icon_name = "messagebox_warning";
break;
- case QMessageBox::Critical:
+ case TQMessageBox::Critical:
icon_name = "messagebox_critical";
break;
default:
break;
}
- QPixmap ret = KGlobal::iconLoader()->loadIcon(icon_name, KIcon::NoGroup, KIcon::SizeMedium, KIcon::DefaultState, 0, true);
+ TQPixmap ret = KGlobal::iconLoader()->loadIcon(icon_name, KIcon::NoGroup, KIcon::SizeMedium, KIcon::DefaultState, 0, true);
if (ret.isNull())
- return QMessageBox::standardIcon(icon);
+ return TQMessageBox::standardIcon(icon);
else
return ret;
}
-static void sendNotification( QString message,
- const QStringList& strlist,
- QMessageBox::Icon icon,
+static void sendNotification( TQString message,
+ const TQStringList& strlist,
+ TQMessageBox::Icon icon,
WId parent_id )
{
// create the message for KNotify
- QString messageType;
+ TQString messageType;
switch ( icon )
{
- case QMessageBox::Warning:
+ case TQMessageBox::Warning:
messageType = "messageWarning";
break;
- case QMessageBox::Critical:
+ case TQMessageBox::Critical:
messageType = "messageCritical";
break;
- case QMessageBox::Question:
+ case TQMessageBox::Question:
messageType = "messageQuestion";
break;
default:
@@ -115,7 +115,7 @@ static void sendNotification( QString message,
if ( !strlist.isEmpty() )
{
- for ( QStringList::ConstIterator it = strlist.begin(); it != strlist.end(); ++it )
+ for ( TQStringList::ConstIterator it = strlist.begin(); it != strlist.end(); ++it )
message += "\n" + *it;
}
@@ -123,43 +123,43 @@ static void sendNotification( QString message,
KNotifyClient::event( (int)parent_id, messageType, message );
}
-static QString qrichtextify( const QString& text )
+static TQString qrichtextify( const TQString& text )
{
if ( text.isEmpty() || text[0] == '<' )
return text;
- QStringList lines = QStringList::split('\n', text);
- for(QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
+ TQStringList lines = TQStringList::split('\n', text);
+ for(TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
{
- *it = QStyleSheet::convertFromPlainText( *it, QStyleSheetItem::WhiteSpaceNormal );
+ *it = TQStyleSheet::convertFromPlainText( *it, TQStyleSheetItem::WhiteSpaceNormal );
}
- return lines.join(QString::null);
+ return lines.join(TQString::null);
}
-int KMessageBox::createKMessageBox(KDialogBase *dialog, QMessageBox::Icon icon,
- const QString &text, const QStringList &strlist,
- const QString &ask, bool *checkboxReturn,
- int options, const QString &details)
+int KMessageBox::createKMessageBox(KDialogBase *dialog, TQMessageBox::Icon icon,
+ const TQString &text, const TQStringList &strlist,
+ const TQString &ask, bool *checkboxReturn,
+ int options, const TQString &details)
{
return createKMessageBox(dialog, themedMessageBoxIcon(icon), text, strlist,
ask, checkboxReturn, options, details, icon);
}
-int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
- const QString &text, const QStringList &strlist,
- const QString &ask, bool *checkboxReturn, int options,
- const QString &details, QMessageBox::Icon notifyType)
+int KMessageBox::createKMessageBox(KDialogBase *dialog, TQPixmap icon,
+ const TQString &text, const TQStringList &strlist,
+ const TQString &ask, bool *checkboxReturn, int options,
+ const TQString &details, TQMessageBox::Icon notifyType)
{
- QVBox *topcontents = new QVBox (dialog);
+ TQVBox *topcontents = new TQVBox (dialog);
topcontents->setSpacing(KDialog::spacingHint()*2);
topcontents->setMargin(KDialog::marginHint());
- QWidget *contents = new QWidget(topcontents);
- QHBoxLayout * lay = new QHBoxLayout(contents);
+ TQWidget *contents = new TQWidget(topcontents);
+ TQHBoxLayout * lay = new TQHBoxLayout(contents);
lay->setSpacing(KDialog::spacingHint());
- QLabel *label1 = new QLabel( contents);
+ TQLabel *label1 = new TQLabel( contents);
if (!icon.isNull())
label1->setPixmap(icon);
@@ -167,14 +167,14 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
lay->addWidget( label1, 0, Qt::AlignCenter );
lay->addSpacing(KDialog::spacingHint());
// Enforce <p>text</p> otherwise the word-wrap doesn't work well
- QString qt_text = qrichtextify( text );
+ TQString qt_text = qrichtextify( text );
int pref_width = 0;
int pref_height = 0;
// Calculate a proper size for the text.
{
- QSimpleRichText rt(qt_text, dialog->font());
- QRect d = KGlobalSettings::desktopGeometry(dialog);
+ TQSimpleRichText rt(qt_text, dialog->font());
+ TQRect d = KGlobalSettings::desktopGeometry(dialog);
pref_width = d.width() / 3;
rt.setWidth(pref_width);
@@ -214,13 +214,13 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
KActiveLabel *label2 = new KActiveLabel( qt_text, contents );
if (!(options & KMessageBox::AllowLink))
{
- QObject::disconnect(label2, SIGNAL(linkClicked(const QString &)),
- label2, SLOT(openLink(const QString &)));
+ TQObject::disconnect(label2, TQT_SIGNAL(linkClicked(const TQString &)),
+ label2, TQT_SLOT(openLink(const TQString &)));
}
// We add 10 pixels extra to compensate for some KActiveLabel margins.
// TODO: find out why this is 10.
- label2->setFixedSize(QSize(pref_width+10, pref_height));
+ label2->setFixedSize(TQSize(pref_width+10, pref_height));
lay->addWidget( label2 );
lay->addStretch();
@@ -229,32 +229,32 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
{
listbox=new KListBox( topcontents );
listbox->insertStringList( strlist );
- listbox->setSelectionMode( QListBox::NoSelection );
+ listbox->setSelectionMode( TQListBox::NoSelection );
topcontents->setStretchFactor(listbox, 1);
}
- QGuardedPtr<QCheckBox> checkbox = 0;
+ TQGuardedPtr<TQCheckBox> checkbox = 0;
if (!ask.isEmpty())
{
- checkbox = new QCheckBox(ask, topcontents);
+ checkbox = new TQCheckBox(ask, topcontents);
if (checkboxReturn)
checkbox->setChecked(*checkboxReturn);
}
if (!details.isEmpty())
{
- QVGroupBox *detailsGroup = new QVGroupBox( i18n("Details"), dialog);
+ TQVGroupBox *detailsGroup = new TQVGroupBox( i18n("Details"), dialog);
if ( details.length() < 512 ) {
KActiveLabel *label3 = new KActiveLabel(qrichtextify(details),
detailsGroup);
label3->setMinimumSize(label3->sizeHint());
if (!(options & KMessageBox::AllowLink))
{
- QObject::disconnect(label3, SIGNAL(linkClicked(const QString &)),
- label3, SLOT(openLink(const QString &)));
+ TQObject::disconnect(label3, TQT_SIGNAL(linkClicked(const TQString &)),
+ label3, TQT_SLOT(openLink(const TQString &)));
}
} else {
- QTextEdit* te = new QTextEdit(details, QString::null, detailsGroup);
+ TQTextEdit* te = new TQTextEdit(details, TQString::null, detailsGroup);
te->setReadOnly( true );
te->setMinimumHeight( te->fontMetrics().lineSpacing() * 11 );
}
@@ -283,7 +283,7 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
for( unsigned int i = 0;
i < sizeof( buttons )/sizeof( buttons[ 0 ] );
++i )
- if( QPushButton* btn = dialog->actionButton( buttons[ i ] ))
+ if( TQPushButton* btn = dialog->actionButton( buttons[ i ] ))
if( btn->isDefault())
btn->setFocus();
@@ -301,10 +301,10 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
return KMessageBox::Cancel; // We have to return something.
}
- // We use a QGuardedPtr because the dialog may get deleted
+ // We use a TQGuardedPtr because the dialog may get deleted
// during exec() if the parent of the dialog gets deleted.
// In that case the guarded ptr will reset to 0.
- QGuardedPtr<KDialogBase> guardedDialog = dialog;
+ TQGuardedPtr<KDialogBase> guardedDialog = dialog;
int result = guardedDialog->exec();
if (checkbox && checkboxReturn)
@@ -314,38 +314,38 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, QPixmap icon,
}
int
-KMessageBox::questionYesNo(QWidget *parent, const QString &text,
- const QString &caption,
+KMessageBox::questionYesNo(TQWidget *parent, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return questionYesNoList(parent, text, QStringList(), caption,
+ return questionYesNoList(parent, text, TQStringList(), caption,
buttonYes, buttonNo, dontAskAgainName, options);
}
int
-KMessageBox::questionYesNoWId(WId parent_id, const QString &text,
- const QString &caption,
+KMessageBox::questionYesNoWId(WId parent_id, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return questionYesNoListWId(parent_id, text, QStringList(), caption,
+ return questionYesNoListWId(parent_id, text, TQStringList(), caption,
buttonYes, buttonNo, dontAskAgainName, options);
}
bool
-KMessageBox::shouldBeShownYesNo(const QString &dontShowAgainName,
+KMessageBox::shouldBeShownYesNo(const TQString &dontShowAgainName,
ButtonCode &result)
{
if ( dontShowAgainName.isEmpty() ) return true;
- QString grpNotifMsgs = QString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
KConfig *config = againConfig ? againConfig : KGlobal::config();
KConfigGroupSaver saver( config, grpNotifMsgs );
- QString dontAsk = config->readEntry(dontShowAgainName).lower();
+ TQString dontAsk = config->readEntry(dontShowAgainName).lower();
if (dontAsk == "yes") {
result = Yes;
return false;
@@ -358,21 +358,21 @@ KMessageBox::shouldBeShownYesNo(const QString &dontShowAgainName,
}
bool
-KMessageBox::shouldBeShownContinue(const QString &dontShowAgainName)
+KMessageBox::shouldBeShownContinue(const TQString &dontShowAgainName)
{
if ( dontShowAgainName.isEmpty() ) return true;
- QString grpNotifMsgs = QString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
KConfig *config = againConfig ? againConfig : KGlobal::config();
KConfigGroupSaver saver( config, grpNotifMsgs );
return config->readBoolEntry(dontShowAgainName, true);
}
void
-KMessageBox::saveDontShowAgainYesNo(const QString &dontShowAgainName,
+KMessageBox::saveDontShowAgainYesNo(const TQString &dontShowAgainName,
ButtonCode result)
{
if ( dontShowAgainName.isEmpty() ) return;
- QString grpNotifMsgs = QString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
KConfig *config = againConfig ? againConfig : KGlobal::config();
KConfigGroupSaver saver( config, grpNotifMsgs );
config->writeEntry( dontShowAgainName, result==Yes ? "yes" : "no", true, (dontShowAgainName[0] == ':'));
@@ -380,10 +380,10 @@ KMessageBox::saveDontShowAgainYesNo(const QString &dontShowAgainName,
}
void
-KMessageBox::saveDontShowAgainContinue(const QString &dontShowAgainName)
+KMessageBox::saveDontShowAgainContinue(const TQString &dontShowAgainName)
{
if ( dontShowAgainName.isEmpty() ) return;
- QString grpNotifMsgs = QString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
KConfig *config = againConfig ? againConfig : KGlobal::config();
KConfigGroupSaver saver( config, grpNotifMsgs );
config->writeEntry( dontShowAgainName, false, true, (dontShowAgainName[0] == ':'));
@@ -398,12 +398,12 @@ KMessageBox::setDontShowAskAgainConfig(KConfig* cfg)
}
int
-KMessageBox::questionYesNoList(QWidget *parent, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::questionYesNoList(TQWidget *parent, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{ // in order to avoid code duplication, convert to WId, it will be converted back
return questionYesNoListWId( parent ? parent->winId() : 0, text, strlist,
@@ -411,19 +411,19 @@ KMessageBox::questionYesNoList(QWidget *parent, const QString &text,
}
int
-KMessageBox::questionYesNoListWId(WId parent_id, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::questionYesNoListWId(WId parent_id, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
ButtonCode res;
if ( !shouldBeShownYesNo(dontAskAgainName, res) )
return res;
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Question") : caption,
KDialogBase::Yes | KDialogBase::No,
@@ -438,8 +438,8 @@ KMessageBox::questionYesNoListWId(WId parent_id, const QString &text,
#endif
bool checkboxResult = false;
- int result = createKMessageBox(dialog, QMessageBox::Information, text, strlist,
- dontAskAgainName.isEmpty() ? QString::null : i18n("Do not ask again"),
+ int result = createKMessageBox(dialog, TQMessageBox::Information, text, strlist,
+ dontAskAgainName.isEmpty() ? TQString::null : i18n("Do not ask again"),
&checkboxResult, options);
res = (result==KDialogBase::Yes ? Yes : No);
@@ -449,12 +449,12 @@ KMessageBox::questionYesNoListWId(WId parent_id, const QString &text,
}
int
-KMessageBox::questionYesNoCancel(QWidget *parent,
- const QString &text,
- const QString &caption,
+KMessageBox::questionYesNoCancel(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
return questionYesNoCancelWId( parent ? parent->winId() : 0, text, caption, buttonYes, buttonNo,
@@ -463,18 +463,18 @@ KMessageBox::questionYesNoCancel(QWidget *parent,
int
KMessageBox::questionYesNoCancelWId(WId parent_id,
- const QString &text,
- const QString &caption,
+ const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
ButtonCode res;
if ( !shouldBeShownYesNo(dontAskAgainName, res) )
return res;
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Question") : caption,
KDialogBase::Yes | KDialogBase::No | KDialogBase::Cancel,
@@ -489,9 +489,9 @@ KMessageBox::questionYesNoCancelWId(WId parent_id,
#endif
bool checkboxResult = false;
- int result = createKMessageBox(dialog, QMessageBox::Information,
- text, QStringList(),
- dontAskAgainName.isEmpty() ? QString::null : i18n("Do not ask again"),
+ int result = createKMessageBox(dialog, TQMessageBox::Information,
+ text, TQStringList(),
+ dontAskAgainName.isEmpty() ? TQString::null : i18n("Do not ask again"),
&checkboxResult, options);
if ( result==KDialogBase::Cancel ) return Cancel;
res = (result==KDialogBase::Yes ? Yes : No);
@@ -502,36 +502,36 @@ KMessageBox::questionYesNoCancelWId(WId parent_id,
}
int
-KMessageBox::warningYesNo(QWidget *parent, const QString &text,
- const QString &caption,
+KMessageBox::warningYesNo(TQWidget *parent, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return warningYesNoList(parent, text, QStringList(), caption,
+ return warningYesNoList(parent, text, TQStringList(), caption,
buttonYes, buttonNo, dontAskAgainName, options);
}
int
-KMessageBox::warningYesNoWId(WId parent_id, const QString &text,
- const QString &caption,
+KMessageBox::warningYesNoWId(WId parent_id, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return warningYesNoListWId(parent_id, text, QStringList(), caption,
+ return warningYesNoListWId(parent_id, text, TQStringList(), caption,
buttonYes, buttonNo, dontAskAgainName, options);
}
int
-KMessageBox::warningYesNoList(QWidget *parent, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::warningYesNoList(TQWidget *parent, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
return warningYesNoListWId( parent ? parent->winId() : 0, text, strlist, caption,
@@ -539,12 +539,12 @@ KMessageBox::warningYesNoList(QWidget *parent, const QString &text,
}
int
-KMessageBox::warningYesNoListWId(WId parent_id, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::warningYesNoListWId(WId parent_id, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
// warningYesNo and warningYesNoList are always "dangerous"
@@ -556,7 +556,7 @@ KMessageBox::warningYesNoListWId(WId parent_id, const QString &text,
if ( !shouldBeShownYesNo(dontAskAgainName, res) )
return res;
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Warning") : caption,
KDialogBase::Yes | KDialogBase::No,
@@ -571,8 +571,8 @@ KMessageBox::warningYesNoListWId(WId parent_id, const QString &text,
#endif
bool checkboxResult = false;
- int result = createKMessageBox(dialog, QMessageBox::Warning, text, strlist,
- dontAskAgainName.isEmpty() ? QString::null : i18n("Do not ask again"),
+ int result = createKMessageBox(dialog, TQMessageBox::Warning, text, strlist,
+ dontAskAgainName.isEmpty() ? TQString::null : i18n("Do not ask again"),
&checkboxResult, options);
res = (result==KDialogBase::Yes ? Yes : No);
@@ -582,35 +582,35 @@ KMessageBox::warningYesNoListWId(WId parent_id, const QString &text,
}
int
-KMessageBox::warningContinueCancel(QWidget *parent,
- const QString &text,
- const QString &caption,
+KMessageBox::warningContinueCancel(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonContinue,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return warningContinueCancelList(parent, text, QStringList(), caption,
+ return warningContinueCancelList(parent, text, TQStringList(), caption,
buttonContinue, dontAskAgainName, options);
}
int
KMessageBox::warningContinueCancelWId(WId parent_id,
- const QString &text,
- const QString &caption,
+ const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonContinue,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return warningContinueCancelListWId(parent_id, text, QStringList(), caption,
+ return warningContinueCancelListWId(parent_id, text, TQStringList(), caption,
buttonContinue, dontAskAgainName, options);
}
int
-KMessageBox::warningContinueCancelList(QWidget *parent, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::warningContinueCancelList(TQWidget *parent, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonContinue,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
return warningContinueCancelListWId( parent ? parent->winId() : 0, text, strlist,
@@ -618,17 +618,17 @@ KMessageBox::warningContinueCancelList(QWidget *parent, const QString &text,
}
int
-KMessageBox::warningContinueCancelListWId(WId parent_id, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::warningContinueCancelListWId(WId parent_id, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonContinue,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
if ( !shouldBeShownContinue(dontAskAgainName) )
return Continue;
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Warning") : caption,
KDialogBase::Yes | KDialogBase::No,
@@ -643,8 +643,8 @@ KMessageBox::warningContinueCancelListWId(WId parent_id, const QString &text,
#endif
bool checkboxResult = false;
- int result = createKMessageBox(dialog, QMessageBox::Warning, text, strlist,
- dontAskAgainName.isEmpty() ? QString::null : i18n("Do not ask again"),
+ int result = createKMessageBox(dialog, TQMessageBox::Warning, text, strlist,
+ dontAskAgainName.isEmpty() ? TQString::null : i18n("Do not ask again"),
&checkboxResult, options);
if ( result==KDialogBase::No )
@@ -655,36 +655,36 @@ KMessageBox::warningContinueCancelListWId(WId parent_id, const QString &text,
}
int
-KMessageBox::warningYesNoCancel(QWidget *parent, const QString &text,
- const QString &caption,
+KMessageBox::warningYesNoCancel(TQWidget *parent, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return warningYesNoCancelList(parent, text, QStringList(), caption,
+ return warningYesNoCancelList(parent, text, TQStringList(), caption,
buttonYes, buttonNo, dontAskAgainName, options);
}
int
-KMessageBox::warningYesNoCancelWId(WId parent_id, const QString &text,
- const QString &caption,
+KMessageBox::warningYesNoCancelWId(WId parent_id, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
- return warningYesNoCancelListWId(parent_id, text, QStringList(), caption,
+ return warningYesNoCancelListWId(parent_id, text, TQStringList(), caption,
buttonYes, buttonNo, dontAskAgainName, options);
}
int
-KMessageBox::warningYesNoCancelList(QWidget *parent, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::warningYesNoCancelList(TQWidget *parent, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
return warningYesNoCancelListWId( parent ? parent->winId() : 0, text, strlist,
@@ -692,19 +692,19 @@ KMessageBox::warningYesNoCancelList(QWidget *parent, const QString &text,
}
int
-KMessageBox::warningYesNoCancelListWId(WId parent_id, const QString &text,
- const QStringList &strlist,
- const QString &caption,
+KMessageBox::warningYesNoCancelListWId(WId parent_id, const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontAskAgainName,
+ const TQString &dontAskAgainName,
int options)
{
ButtonCode res;
if ( !shouldBeShownYesNo(dontAskAgainName, res) )
return res;
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Warning") : caption,
KDialogBase::Yes | KDialogBase::No | KDialogBase::Cancel,
@@ -719,8 +719,8 @@ KMessageBox::warningYesNoCancelListWId(WId parent_id, const QString &text,
#endif
bool checkboxResult = false;
- int result = createKMessageBox(dialog, QMessageBox::Warning, text, strlist,
- dontAskAgainName.isEmpty() ? QString::null : i18n("Do not ask again"),
+ int result = createKMessageBox(dialog, TQMessageBox::Warning, text, strlist,
+ dontAskAgainName.isEmpty() ? TQString::null : i18n("Do not ask again"),
&checkboxResult, options);
if ( result==KDialogBase::Cancel ) return Cancel;
res = (result==KDialogBase::Yes ? Yes : No);
@@ -731,31 +731,31 @@ KMessageBox::warningYesNoCancelListWId(WId parent_id, const QString &text,
}
void
-KMessageBox::error(QWidget *parent, const QString &text,
- const QString &caption, int options)
+KMessageBox::error(TQWidget *parent, const TQString &text,
+ const TQString &caption, int options)
{
- return errorListWId( parent ? parent->winId() : 0, text, QStringList(), caption, options );
+ return errorListWId( parent ? parent->winId() : 0, text, TQStringList(), caption, options );
}
void
-KMessageBox::errorWId(WId parent_id, const QString &text,
- const QString &caption, int options)
+KMessageBox::errorWId(WId parent_id, const TQString &text,
+ const TQString &caption, int options)
{
- errorListWId( parent_id, text, QStringList(), caption, options );
+ errorListWId( parent_id, text, TQStringList(), caption, options );
}
void
-KMessageBox::errorList(QWidget *parent, const QString &text, const QStringList &strlist,
- const QString &caption, int options)
+KMessageBox::errorList(TQWidget *parent, const TQString &text, const TQStringList &strlist,
+ const TQString &caption, int options)
{
return errorListWId( parent ? parent->winId() : 0, text, strlist, caption, options );
}
void
-KMessageBox::errorListWId(WId parent_id, const QString &text, const QStringList &strlist,
- const QString &caption, int options)
+KMessageBox::errorListWId(WId parent_id, const TQString &text, const TQStringList &strlist,
+ const TQString &caption, int options)
{
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Error") : caption,
KDialogBase::Yes,
@@ -769,23 +769,23 @@ KMessageBox::errorListWId(WId parent_id, const QString &text, const QStringList
XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
#endif
- createKMessageBox(dialog, QMessageBox::Critical, text, strlist, QString::null, 0, options);
+ createKMessageBox(dialog, TQMessageBox::Critical, text, strlist, TQString::null, 0, options);
}
void
-KMessageBox::detailedError(QWidget *parent, const QString &text,
- const QString &details,
- const QString &caption, int options)
+KMessageBox::detailedError(TQWidget *parent, const TQString &text,
+ const TQString &details,
+ const TQString &caption, int options)
{
return detailedErrorWId( parent ? parent->winId() : 0, text, details, caption, options );
}
void
-KMessageBox::detailedErrorWId(WId parent_id, const QString &text,
- const QString &details,
- const QString &caption, int options)
+KMessageBox::detailedErrorWId(WId parent_id, const TQString &text,
+ const TQString &details,
+ const TQString &caption, int options)
{
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Error") : caption,
KDialogBase::Yes | KDialogBase::Details,
@@ -799,21 +799,21 @@ KMessageBox::detailedErrorWId(WId parent_id, const QString &text,
XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
#endif
- createKMessageBox(dialog, QMessageBox::Critical, text, QStringList(), QString::null, 0, options, details);
+ createKMessageBox(dialog, TQMessageBox::Critical, text, TQStringList(), TQString::null, 0, options, details);
}
void
-KMessageBox::queuedDetailedError(QWidget *parent, const QString &text,
- const QString &details,
- const QString &caption)
+KMessageBox::queuedDetailedError(TQWidget *parent, const TQString &text,
+ const TQString &details,
+ const TQString &caption)
{
return queuedDetailedErrorWId( parent ? parent->winId() : 0, text, details, caption );
}
void
-KMessageBox::queuedDetailedErrorWId(WId parent_id, const QString &text,
- const QString &details,
- const QString &caption)
+KMessageBox::queuedDetailedErrorWId(WId parent_id, const TQString &text,
+ const TQString &details,
+ const TQString &caption)
{
KMessageBox_queue = true;
(void) detailedErrorWId(parent_id, text, details, caption);
@@ -822,17 +822,17 @@ KMessageBox::queuedDetailedErrorWId(WId parent_id, const QString &text,
void
-KMessageBox::sorry(QWidget *parent, const QString &text,
- const QString &caption, int options)
+KMessageBox::sorry(TQWidget *parent, const TQString &text,
+ const TQString &caption, int options)
{
return sorryWId( parent ? parent->winId() : 0, text, caption, options );
}
void
-KMessageBox::sorryWId(WId parent_id, const QString &text,
- const QString &caption, int options)
+KMessageBox::sorryWId(WId parent_id, const TQString &text,
+ const TQString &caption, int options)
{
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Sorry") : caption,
KDialogBase::Yes,
@@ -846,23 +846,23 @@ KMessageBox::sorryWId(WId parent_id, const QString &text,
XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
#endif
- createKMessageBox(dialog, QMessageBox::Warning, text, QStringList(), QString::null, 0, options);
+ createKMessageBox(dialog, TQMessageBox::Warning, text, TQStringList(), TQString::null, 0, options);
}
void
-KMessageBox::detailedSorry(QWidget *parent, const QString &text,
- const QString &details,
- const QString &caption, int options)
+KMessageBox::detailedSorry(TQWidget *parent, const TQString &text,
+ const TQString &details,
+ const TQString &caption, int options)
{
return detailedSorryWId( parent ? parent->winId() : 0, text, details, caption, options );
}
void
-KMessageBox::detailedSorryWId(WId parent_id, const QString &text,
- const QString &details,
- const QString &caption, int options)
+KMessageBox::detailedSorryWId(WId parent_id, const TQString &text,
+ const TQString &details,
+ const TQString &caption, int options)
{
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Sorry") : caption,
KDialogBase::Yes | KDialogBase::Details,
@@ -876,39 +876,39 @@ KMessageBox::detailedSorryWId(WId parent_id, const QString &text,
XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
#endif
- createKMessageBox(dialog, QMessageBox::Warning, text, QStringList(), QString::null, 0, options, details);
+ createKMessageBox(dialog, TQMessageBox::Warning, text, TQStringList(), TQString::null, 0, options, details);
}
void
-KMessageBox::information(QWidget *parent,const QString &text,
- const QString &caption, const QString &dontShowAgainName, int options)
+KMessageBox::information(TQWidget *parent,const TQString &text,
+ const TQString &caption, const TQString &dontShowAgainName, int options)
{
- informationList(parent, text, QStringList(), caption, dontShowAgainName, options);
+ informationList(parent, text, TQStringList(), caption, dontShowAgainName, options);
}
void
-KMessageBox::informationWId(WId parent_id,const QString &text,
- const QString &caption, const QString &dontShowAgainName, int options)
+KMessageBox::informationWId(WId parent_id,const TQString &text,
+ const TQString &caption, const TQString &dontShowAgainName, int options)
{
- informationListWId(parent_id, text, QStringList(), caption, dontShowAgainName, options);
+ informationListWId(parent_id, text, TQStringList(), caption, dontShowAgainName, options);
}
void
-KMessageBox::informationList(QWidget *parent,const QString &text, const QStringList & strlist,
- const QString &caption, const QString &dontShowAgainName, int options)
+KMessageBox::informationList(TQWidget *parent,const TQString &text, const TQStringList & strlist,
+ const TQString &caption, const TQString &dontShowAgainName, int options)
{
return informationListWId( parent ? parent->winId() : 0, text, strlist, caption,
dontShowAgainName, options );
}
void
-KMessageBox::informationListWId(WId parent_id,const QString &text, const QStringList & strlist,
- const QString &caption, const QString &dontShowAgainName, int options)
+KMessageBox::informationListWId(WId parent_id,const TQString &text, const TQStringList & strlist,
+ const TQString &caption, const TQString &dontShowAgainName, int options)
{
if ( !shouldBeShownContinue(dontShowAgainName) )
return;
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KDialogBase *dialog= new KDialogBase(
caption.isEmpty() ? i18n("Information") : caption,
KDialogBase::Yes,
@@ -924,8 +924,8 @@ KMessageBox::informationListWId(WId parent_id,const QString &text, const QString
bool checkboxResult = false;
- createKMessageBox(dialog, QMessageBox::Information, text, strlist,
- dontShowAgainName.isEmpty() ? QString::null : i18n("Do not show this message again"),
+ createKMessageBox(dialog, TQMessageBox::Information, text, strlist,
+ dontShowAgainName.isEmpty() ? TQString::null : i18n("Do not show this message again"),
&checkboxResult, options);
if (checkboxResult)
@@ -936,13 +936,13 @@ void
KMessageBox::enableAllMessages()
{
KConfig *config = againConfig ? againConfig : KGlobal::config();
- QString grpNotifMsgs = QString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
if (!config->hasGroup(grpNotifMsgs))
return;
KConfigGroupSaver saver( config, grpNotifMsgs );
- typedef QMap<QString, QString> configMap;
+ typedef TQMap<TQString, TQString> configMap;
configMap map = config->entryMap(grpNotifMsgs);
@@ -953,10 +953,10 @@ KMessageBox::enableAllMessages()
}
void
-KMessageBox::enableMessage(const QString &dontShowAgainName)
+KMessageBox::enableMessage(const TQString &dontShowAgainName)
{
KConfig *config = againConfig ? againConfig : KGlobal::config();
- QString grpNotifMsgs = QString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
if (!config->hasGroup(grpNotifMsgs))
return;
@@ -967,10 +967,10 @@ KMessageBox::enableMessage(const QString &dontShowAgainName)
}
void
-KMessageBox::about(QWidget *parent, const QString &text,
- const QString &caption, int options)
+KMessageBox::about(TQWidget *parent, const TQString &text,
+ const TQString &caption, int options)
{
- QString _caption = caption;
+ TQString _caption = caption;
if (_caption.isEmpty())
_caption = i18n("About %1").arg(kapp->caption());
@@ -981,36 +981,36 @@ KMessageBox::about(QWidget *parent, const QString &text,
parent, "about", true, true,
KStdGuiItem::ok() );
- QPixmap ret = KApplication::kApplication()->icon();
+ TQPixmap ret = KApplication::kApplication()->icon();
if (ret.isNull())
- ret = QMessageBox::standardIcon(QMessageBox::Information);
+ ret = TQMessageBox::standardIcon(TQMessageBox::Information);
dialog->setIcon(ret);
- createKMessageBox(dialog, ret, text, QStringList(), QString::null, 0, options);
+ createKMessageBox(dialog, ret, text, TQStringList(), TQString::null, 0, options);
return;
}
-int KMessageBox::messageBox( QWidget *parent, DialogType type, const QString &text,
- const QString &caption, const KGuiItem &buttonYes,
- const KGuiItem &buttonNo, const QString &dontShowAskAgainName,
+int KMessageBox::messageBox( TQWidget *parent, DialogType type, const TQString &text,
+ const TQString &caption, const KGuiItem &buttonYes,
+ const KGuiItem &buttonNo, const TQString &dontShowAskAgainName,
int options )
{
return messageBoxWId( parent ? parent->winId() : 0, type, text, caption,
buttonYes, buttonNo, dontShowAskAgainName, options );
}
-int KMessageBox::messageBox( QWidget *parent, DialogType type, const QString &text,
- const QString &caption, const KGuiItem &buttonYes,
+int KMessageBox::messageBox( TQWidget *parent, DialogType type, const TQString &text,
+ const TQString &caption, const KGuiItem &buttonYes,
const KGuiItem &buttonNo, int options )
{
return messageBoxWId( parent ? parent->winId() : 0, type, text, caption,
- buttonYes, buttonNo, QString::null, options );
+ buttonYes, buttonNo, TQString::null, options );
}
-int KMessageBox::messageBoxWId( WId parent_id, DialogType type, const QString &text,
- const QString &caption, const KGuiItem &buttonYes,
- const KGuiItem &buttonNo, const QString &dontShow,
+int KMessageBox::messageBoxWId( WId parent_id, DialogType type, const TQString &text,
+ const TQString &caption, const KGuiItem &buttonYes,
+ const KGuiItem &buttonNo, const TQString &dontShow,
int options )
{
switch (type) {
@@ -1045,25 +1045,25 @@ int KMessageBox::messageBoxWId( WId parent_id, DialogType type, const QString &t
return KMessageBox::Cancel;
}
-void KMessageBox::queuedMessageBox( QWidget *parent, DialogType type, const QString &text, const QString &caption, int options )
+void KMessageBox::queuedMessageBox( TQWidget *parent, DialogType type, const TQString &text, const TQString &caption, int options )
{
return queuedMessageBoxWId( parent ? parent->winId() : 0, type, text, caption, options );
}
-void KMessageBox::queuedMessageBoxWId( WId parent_id, DialogType type, const QString &text, const QString &caption, int options )
+void KMessageBox::queuedMessageBoxWId( WId parent_id, DialogType type, const TQString &text, const TQString &caption, int options )
{
KMessageBox_queue = true;
(void) messageBoxWId(parent_id, type, text, caption, KStdGuiItem::yes(),
- KStdGuiItem::no(), QString::null, options);
+ KStdGuiItem::no(), TQString::null, options);
KMessageBox_queue = false;
}
-void KMessageBox::queuedMessageBox( QWidget *parent, DialogType type, const QString &text, const QString &caption )
+void KMessageBox::queuedMessageBox( TQWidget *parent, DialogType type, const TQString &text, const TQString &caption )
{
return queuedMessageBoxWId( parent ? parent->winId() : 0, type, text, caption );
}
-void KMessageBox::queuedMessageBoxWId( WId parent_id, DialogType type, const QString &text, const QString &caption )
+void KMessageBox::queuedMessageBoxWId( WId parent_id, DialogType type, const TQString &text, const TQString &caption )
{
KMessageBox_queue = true;
(void) messageBoxWId(parent_id, type, text, caption);
diff --git a/kdeui/kmessagebox.h b/kdeui/kmessagebox.h
index 850fb7a5b..39dbdb10b 100644
--- a/kdeui/kmessagebox.h
+++ b/kdeui/kmessagebox.h
@@ -19,8 +19,8 @@
#ifndef _KMESSAGEBOX_H_
#define _KMESSAGEBOX_H_
-#include <qstring.h>
-#include <qmessagebox.h>
+#include <tqstring.h>
+#include <tqmessagebox.h>
#include <kguiitem.h>
#include <kstdguiitem.h>
@@ -112,24 +112,24 @@ public:
* The default button is "Yes". Pressing "Esc" selects "No".
*/
- static int questionYesNo(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static int questionYesNo(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int questionYesNoWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* Display a simple "question" dialog.
@@ -163,25 +163,25 @@ public:
* NOTE: The cancel button will always have the i18n'ed text '&Cancel'.
*/
- static int questionYesNoCancel(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static int questionYesNoCancel(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int questionYesNoCancelWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
@@ -218,27 +218,27 @@ public:
* The default button is "Yes". Pressing "Esc" selects "No".
*/
- static int questionYesNoList(QWidget *parent,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ static int questionYesNoList(TQWidget *parent,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int questionYesNoListWId(WId parent_id,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
@@ -271,25 +271,25 @@ public:
*
* The default button is "No". Pressing "Esc" selects "No".
*/
- static int warningYesNo(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static int warningYesNo(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify | Dangerous);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int warningYesNoWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify | Dangerous);
/**
@@ -326,27 +326,27 @@ public:
* The default button is "No". Pressing "Esc" selects "No".
*/
- static int warningYesNoList(QWidget *parent,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ static int warningYesNoList(TQWidget *parent,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify | Dangerous);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int warningYesNoListWId(WId parent_id,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify | Dangerous);
/**
@@ -378,23 +378,23 @@ public:
*
* The default button is buttonContinue. Pressing "Esc" selects "Cancel".
*/
- static int warningContinueCancel(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static int warningContinueCancel(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonContinue = KStdGuiItem::cont(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int warningContinueCancelWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonContinue = KStdGuiItem::cont(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
@@ -430,25 +430,25 @@ public:
*
* The default button is buttonContinue. Pressing "Esc" selects "Cancel".
*/
- static int warningContinueCancelList(QWidget *parent,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ static int warningContinueCancelList(TQWidget *parent,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonContinue = KStdGuiItem::cont(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int warningContinueCancelListWId(WId parent_id,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonContinue = KStdGuiItem::cont(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
@@ -487,25 +487,25 @@ public:
* NOTE: The cancel button will always have the i18n'ed text '&Cancel'.
*/
- static int warningYesNoCancel(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static int warningYesNoCancel(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int warningYesNoCancelWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
@@ -549,27 +549,27 @@ public:
*
* @since 3.2
*/
- static int warningYesNoCancelList(QWidget *parent,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ static int warningYesNoCancelList(TQWidget *parent,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static int warningYesNoCancelListWId(WId parent_id,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontAskAgainName = QString::null,
+ const TQString &dontAskAgainName = TQString::null,
int options = Notify);
/**
@@ -595,20 +595,20 @@ public:
* NOTE: The OK button will always have the i18n'ed text '&OK'.
*/
- static void error(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static void error(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
*
* @since 3.2
*/
static void errorWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
@@ -639,22 +639,22 @@ public:
* @since 3.4
*/
- static void errorList(QWidget *parent,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ static void errorList(TQWidget *parent,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.4
*/
static void errorListWId(WId parent_id,
- const QString &text,
- const QStringList &strlist,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQStringList &strlist,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
@@ -683,21 +683,21 @@ public:
*
* NOTE: The OK button will always have the i18n'ed text '&OK'.
*/
- static void detailedError(QWidget *parent,
- const QString &text,
- const QString &details,
- const QString &caption = QString::null,
+ static void detailedError(TQWidget *parent,
+ const TQString &text,
+ const TQString &details,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void detailedErrorWId(WId parent_id,
- const QString &text,
- const QString &details,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &details,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
@@ -710,20 +710,20 @@ public:
* Note that if the parent gets deleted, the messagebox will not be
* shown.
*/
- static void queuedDetailedError( QWidget *parent,
- const QString &text,
- const QString &details,
- const QString &caption = QString::null);
+ static void queuedDetailedError( TQWidget *parent,
+ const TQString &text,
+ const TQString &details,
+ const TQString &caption = TQString::null);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void queuedDetailedErrorWId( WId parent_id,
- const QString &text,
- const QString &details,
- const QString &caption = QString::null);
+ const TQString &text,
+ const TQString &details,
+ const TQString &caption = TQString::null);
/**
* Display an "Sorry" dialog.
@@ -747,19 +747,19 @@ public:
* NOTE: The ok button will always have the i18n'ed text '&OK'.
*/
- static void sorry(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
+ static void sorry(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void sorryWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
@@ -790,21 +790,21 @@ public:
* NOTE: The ok button will always have the i18n'ed text '&OK'.
*/
- static void detailedSorry(QWidget *parent,
- const QString &text,
- const QString &details,
- const QString &caption = QString::null,
+ static void detailedSorry(TQWidget *parent,
+ const TQString &text,
+ const TQString &details,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void detailedSorryWId(WId parent_id,
- const QString &text,
- const QString &details,
- const QString &caption = QString::null,
+ const TQString &text,
+ const TQString &details,
+ const TQString &caption = TQString::null,
int options = Notify);
/**
@@ -833,21 +833,21 @@ public:
* NOTE: The OK button will always have the i18n'ed text '&OK'.
*/
- static void information(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null,
- const QString &dontShowAgainName = QString::null,
+ static void information(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null,
+ const TQString &dontShowAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void informationWId(WId parent_id,
- const QString &text,
- const QString &caption = QString::null,
- const QString &dontShowAgainName = QString::null,
+ const TQString &text,
+ const TQString &caption = TQString::null,
+ const TQString &dontShowAgainName = TQString::null,
int options = Notify);
/**
@@ -880,23 +880,23 @@ public:
* @since 3.1
*/
- static void informationList(QWidget *parent,
- const QString &text,
- const QStringList & strlist,
- const QString &caption = QString::null,
- const QString &dontShowAgainName = QString::null,
+ static void informationList(TQWidget *parent,
+ const TQString &text,
+ const TQStringList & strlist,
+ const TQString &caption = TQString::null,
+ const TQString &dontShowAgainName = TQString::null,
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void informationListWId(WId parent_id,
- const QString &text,
- const QStringList & strlist,
- const QString &caption = QString::null,
- const QString &dontShowAgainName = QString::null,
+ const TQString &text,
+ const TQStringList & strlist,
+ const TQString &caption = TQString::null,
+ const TQString &dontShowAgainName = TQString::null,
int options = Notify);
/**
@@ -912,7 +912,7 @@ public:
* @see saveDontShowAgainContinue()
* @since 3.2
*/
- static void enableMessage(const QString &dontShowAgainName);
+ static void enableMessage(const TQString &dontShowAgainName);
/**
* Display an "About" dialog.
@@ -933,9 +933,9 @@ public:
*
* NOTE: The ok button will always have the i18n'ed text '&OK'.
*/
- static void about(QWidget *parent,
- const QString& text,
- const QString& caption = QString::null,
+ static void about(TQWidget *parent,
+ const TQString& text,
+ const TQString& caption = TQString::null,
int options = Notify);
/**
@@ -962,11 +962,11 @@ public:
* and for Information, none is used.
* @return a button code, as defined in KMessageBox.
*/
- static int messageBox( QWidget *parent, DialogType type, const QString &text,
- const QString &caption,
+ static int messageBox( TQWidget *parent, DialogType type, const TQString &text,
+ const TQString &caption,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontShowAskAgainName,
+ const TQString &dontShowAskAgainName,
int options = Notify);
/**
@@ -988,22 +988,22 @@ public:
* @return a button code, as defined in KMessageBox.
*/
// KDE4 - merge with above?
- static int messageBox( QWidget *parent, DialogType type, const QString &text,
- const QString &caption = QString::null,
+ static int messageBox( TQWidget *parent, DialogType type, const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
int options = Notify);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
- static int messageBoxWId( WId parent_id, DialogType type, const QString &text,
- const QString &caption = QString::null,
+ static int messageBoxWId( WId parent_id, DialogType type, const TQString &text,
+ const TQString &caption = TQString::null,
const KGuiItem &buttonYes = KStdGuiItem::yes(),
const KGuiItem &buttonNo = KStdGuiItem::no(),
- const QString &dontShowAskAgainName = QString::null,
+ const TQString &dontShowAskAgainName = TQString::null,
int options = Notify);
/**
@@ -1018,19 +1018,19 @@ public:
* Note that if the parent gets deleted, the messagebox will not be
* shown.
*/
- static void queuedMessageBox( QWidget *parent,
- DialogType type, const QString &text,
- const QString &caption,
+ static void queuedMessageBox( TQWidget *parent,
+ DialogType type, const TQString &text,
+ const TQString &caption,
int options );
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void queuedMessageBoxWId( WId parent_id,
- DialogType type, const QString &text,
- const QString &caption,
+ DialogType type, const TQString &text,
+ const TQString &caption,
int options );
/**
@@ -1039,18 +1039,18 @@ public:
* This is an overloaded member function, provided for convenience.
* It behaves essentially like the above function.
*/
- static void queuedMessageBox( QWidget *parent,
- DialogType type, const QString &text,
- const QString &caption = QString::null );
+ static void queuedMessageBox( TQWidget *parent,
+ DialogType type, const TQString &text,
+ const TQString &caption = TQString::null );
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.2
*/
static void queuedMessageBoxWId( WId parent_id,
- DialogType type, const QString &text,
- const QString &caption = QString::null );
+ DialogType type, const TQString &text,
+ const TQString &caption = TQString::null );
/**
* @return true if the corresponding yes/no message box should be shown.
@@ -1061,7 +1061,7 @@ public:
* should not be shown.
* @since 3.2
*/
- static bool shouldBeShownYesNo(const QString &dontShowAgainName,
+ static bool shouldBeShownYesNo(const TQString &dontShowAgainName,
ButtonCode &result);
/**
* @return true if the corresponding continue/cancel message box should be
@@ -1070,7 +1070,7 @@ public:
* empty, true is always returned.
* @since 3.2
*/
- static bool shouldBeShownContinue(const QString &dontShowAgainName);
+ static bool shouldBeShownContinue(const TQString &dontShowAgainName);
/**
* Save the fact that the yes/no message box should not be shown again.
@@ -1080,7 +1080,7 @@ public:
* for the message box.
* @since 3.2
*/
- static void saveDontShowAgainYesNo(const QString &dontShowAgainName,
+ static void saveDontShowAgainYesNo(const TQString &dontShowAgainName,
ButtonCode result);
/**
@@ -1090,7 +1090,7 @@ public:
* empty, this method does nothing.
* @since 3.2
*/
- static void saveDontShowAgainContinue(const QString &dontShowAgainName);
+ static void saveDontShowAgainContinue(const TQString &dontShowAgainName);
/**
* Use @p cfg for all settings related to the dontShowAgainName feature.
@@ -1122,16 +1122,16 @@ public:
* @note The @p dialog that is passed in is deleted by this
* function. Do not delete it yourself.
*/
- static int createKMessageBox(KDialogBase *dialog, QMessageBox::Icon icon,
- const QString &text, const QStringList &strlist,
- const QString &ask, bool *checkboxReturn,
- int options, const QString &details=QString::null);
+ static int createKMessageBox(KDialogBase *dialog, TQMessageBox::Icon icon,
+ const TQString &text, const TQStringList &strlist,
+ const TQString &ask, bool *checkboxReturn,
+ int options, const TQString &details=TQString::null);
/**
* Create content and layout of a standard dialog
*
* @param dialog The parent dialog base
- * @param icon A QPixmap containing the icon to be displayed in the
+ * @param icon A TQPixmap containing the icon to be displayed in the
* dialog next to the text.
* @param text Message string.
* @param strlist List of strings to be written in the listbox.
@@ -1153,11 +1153,11 @@ public:
* @note The @p dialog that is passed in is deleted by this
* function. Do not delete it yourself.
*/
- static int createKMessageBox(KDialogBase *dialog, QPixmap icon,
- const QString &text, const QStringList &strlist,
- const QString &ask, bool *checkboxReturn,
- int options, const QString &details=QString::null,
- QMessageBox::Icon notifyType=QMessageBox::Information);
+ static int createKMessageBox(KDialogBase *dialog, TQPixmap icon,
+ const TQString &text, const TQStringList &strlist,
+ const TQString &ask, bool *checkboxReturn,
+ int options, const TQString &details=TQString::null,
+ TQMessageBox::Icon notifyType=TQMessageBox::Information);
private:
static KConfig* againConfig;
diff --git a/kdeui/knuminput.cpp b/kdeui/knuminput.cpp
index 68587dcb4..4d3075bb2 100644
--- a/kdeui/knuminput.cpp
+++ b/kdeui/knuminput.cpp
@@ -36,13 +36,13 @@
#include <math.h>
#include <algorithm>
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qsize.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqsize.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqstyle.h>
#include <kglobal.h>
#include <klocale.h>
@@ -59,14 +59,14 @@ static inline int calcDiffByTen( int x, int y ) {
// ----------------------------------------------------------------------------
-KNumInput::KNumInput(QWidget* parent, const char* name)
- : QWidget(parent, name)
+KNumInput::KNumInput(TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
init();
}
-KNumInput::KNumInput(KNumInput* below, QWidget* parent, const char* name)
- : QWidget(parent, name)
+KNumInput::KNumInput(KNumInput* below, TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
init();
@@ -98,7 +98,7 @@ KNumInput::~KNumInput()
m_next->m_prev = m_prev;
}
-void KNumInput::setLabel(const QString & label, int a)
+void KNumInput::setLabel(const TQString & label, int a)
{
if(label.isEmpty()) {
delete m_label;
@@ -107,7 +107,7 @@ void KNumInput::setLabel(const QString & label, int a)
}
else {
if (m_label) m_label->setText(label);
- else m_label = new QLabel(label, this, "KNumInput::QLabel");
+ else m_label = new TQLabel(label, this, "KNumInput::TQLabel");
m_label->setAlignment((a & (~(AlignTop|AlignBottom|AlignVCenter)))
| AlignVCenter);
// if no vertical alignment set, use Top alignment
@@ -119,10 +119,10 @@ void KNumInput::setLabel(const QString & label, int a)
layout(true);
}
-QString KNumInput::label() const
+TQString KNumInput::label() const
{
if (m_label) return m_label->text();
- return QString::null;
+ return TQString::null;
}
void KNumInput::layout(bool deep)
@@ -131,7 +131,7 @@ void KNumInput::layout(bool deep)
int w2 = m_colw2;
// label sizeHint
- m_sizeLabel = (m_label ? m_label->sizeHint() : QSize(0,0));
+ m_sizeLabel = (m_label ? m_label->sizeHint() : TQSize(0,0));
if(m_label && (m_alignment & AlignVCenter))
m_colw1 = m_sizeLabel.width() + 4;
@@ -139,7 +139,7 @@ void KNumInput::layout(bool deep)
m_colw1 = 0;
// slider sizeHint
- m_sizeSlider = (m_slider ? m_slider->sizeHint() : QSize(0, 0));
+ m_sizeSlider = (m_slider ? m_slider->sizeHint() : TQSize(0, 0));
doLayout();
@@ -182,12 +182,12 @@ void KNumInput::layout(bool deep)
// kdDebug() << "w1 " << w1 << " w2 " << w2 << endl;
}
-QSizePolicy KNumInput::sizePolicy() const
+TQSizePolicy KNumInput::sizePolicy() const
{
- return QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed );
+ return TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
}
-QSize KNumInput::sizeHint() const
+TQSize KNumInput::sizeHint() const
{
return minimumSizeHint();
}
@@ -201,8 +201,8 @@ void KNumInput::setSteps(int minor, int major)
// ----------------------------------------------------------------------------
-KIntSpinBox::KIntSpinBox(QWidget *parent, const char *name)
- : QSpinBox(0, 99, 1, parent, name)
+KIntSpinBox::KIntSpinBox(TQWidget *parent, const char *name)
+ : TQSpinBox(0, 99, 1, parent, name)
{
editor()->setAlignment(AlignRight);
val_base = 10;
@@ -214,8 +214,8 @@ KIntSpinBox::~KIntSpinBox()
}
KIntSpinBox::KIntSpinBox(int lower, int upper, int step, int value, int base,
- QWidget* parent, const char* name)
- : QSpinBox(lower, upper, step, parent, name)
+ TQWidget* parent, const char* name)
+ : TQSpinBox(lower, upper, step, parent, name)
{
editor()->setAlignment(AlignRight);
val_base = base;
@@ -233,9 +233,9 @@ int KIntSpinBox::base() const
return val_base;
}
-QString KIntSpinBox::mapValueToText(int v)
+TQString KIntSpinBox::mapValueToText(int v)
{
- return QString::number(v, val_base);
+ return TQString::number(v, val_base);
}
int KIntSpinBox::mapTextToValue(bool* ok)
@@ -263,20 +263,20 @@ public:
};
-KIntNumInput::KIntNumInput(KNumInput* below, int val, QWidget* parent,
+KIntNumInput::KIntNumInput(KNumInput* below, int val, TQWidget* parent,
int _base, const char* name)
: KNumInput(below, parent, name)
{
init(val, _base);
}
-KIntNumInput::KIntNumInput(QWidget *parent, const char *name)
+KIntNumInput::KIntNumInput(TQWidget *parent, const char *name)
: KNumInput(parent, name)
{
init(0, 10);
}
-KIntNumInput::KIntNumInput(int val, QWidget *parent, int _base, const char *name)
+KIntNumInput::KIntNumInput(int val, TQWidget *parent, int _base, const char *name)
: KNumInput(parent, name)
{
init(val, _base);
@@ -293,9 +293,9 @@ void KIntNumInput::init(int val, int _base)
if (_base != 10)
m_spin->setValidator(new KIntValidator(this, _base, "KNumInput::KIntValidtr"));
- connect(m_spin, SIGNAL(valueChanged(int)), SLOT(spinValueChanged(int)));
- connect(this, SIGNAL(valueChanged(int)),
- SLOT(slotEmitRelativeValueChanged(int)));
+ connect(m_spin, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(spinValueChanged(int)));
+ connect(this, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotEmitRelativeValueChanged(int)));
setFocusProxy(m_spin);
layout(true);
@@ -332,17 +332,17 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider)
m_spin->setMaxValue(upper);
m_spin->setLineStep(step);
- step = m_spin->lineStep(); // maybe QRangeControl didn't like out lineStep?
+ step = m_spin->lineStep(); // maybe TQRangeControl didn't like out lineStep?
if(slider) {
if (m_slider)
m_slider->setRange(lower, upper);
else {
- m_slider = new QSlider(lower, upper, step, m_spin->value(),
- QSlider::Horizontal, this);
- m_slider->setTickmarks(QSlider::Below);
- connect(m_slider, SIGNAL(valueChanged(int)),
- m_spin, SLOT(setValue(int)));
+ m_slider = new TQSlider(lower, upper, step, m_spin->value(),
+ TQSlider::Horizontal, this);
+ m_slider->setTickmarks(TQSlider::Below);
+ connect(m_slider, TQT_SIGNAL(valueChanged(int)),
+ m_spin, TQT_SLOT(setValue(int)));
}
// calculate (upper-lower)/10 without overflowing int's:
@@ -383,26 +383,26 @@ int KIntNumInput::maxValue() const
return m_spin->maxValue();
}
-void KIntNumInput::setSuffix(const QString &suffix)
+void KIntNumInput::setSuffix(const TQString &suffix)
{
m_spin->setSuffix(suffix);
layout(true);
}
-QString KIntNumInput::suffix() const
+TQString KIntNumInput::suffix() const
{
return m_spin->suffix();
}
-void KIntNumInput::setPrefix(const QString &prefix)
+void KIntNumInput::setPrefix(const TQString &prefix)
{
m_spin->setPrefix(prefix);
layout(true);
}
-QString KIntNumInput::prefix() const
+TQString KIntNumInput::prefix() const
{
return m_spin->prefix();
}
@@ -412,7 +412,7 @@ void KIntNumInput::setEditFocus(bool mark)
m_spin->setEditFocus(mark);
}
-QSize KIntNumInput::minimumSizeHint() const
+TQSize KIntNumInput::minimumSizeHint() const
{
constPolish();
@@ -434,7 +434,7 @@ QSize KIntNumInput::minimumSizeHint() const
if(m_alignment & (AlignTop|AlignBottom))
w = QMAX(w, m_sizeLabel.width() + 4);
- return QSize(w, h);
+ return TQSize(w, h);
}
void KIntNumInput::doLayout()
@@ -446,7 +446,7 @@ void KIntNumInput::doLayout()
m_label->setBuddy(m_spin);
}
-void KIntNumInput::resizeEvent(QResizeEvent* e)
+void KIntNumInput::resizeEvent(TQResizeEvent* e)
{
int w = m_colw1;
int h = 0;
@@ -509,18 +509,18 @@ int KIntNumInput::value() const
return m_spin->value();
}
-void KIntNumInput::setSpecialValueText(const QString& text)
+void KIntNumInput::setSpecialValueText(const TQString& text)
{
m_spin->setSpecialValueText(text);
layout(true);
}
-QString KIntNumInput::specialValueText() const
+TQString KIntNumInput::specialValueText() const
{
return m_spin->specialValueText();
}
-void KIntNumInput::setLabel(const QString & label, int a)
+void KIntNumInput::setLabel(const TQString & label, int a)
{
KNumInput::setLabel(label, a);
@@ -541,14 +541,14 @@ public:
short blockRelative;
};
-KDoubleNumInput::KDoubleNumInput(QWidget *parent, const char *name)
+KDoubleNumInput::KDoubleNumInput(TQWidget *parent, const char *name)
: KNumInput(parent, name)
{
init(0.0, 0.0, 9999.0, 0.01, 2);
}
KDoubleNumInput::KDoubleNumInput(double lower, double upper, double value,
- double step, int precision, QWidget* parent,
+ double step, int precision, TQWidget* parent,
const char *name)
: KNumInput(parent, name)
{
@@ -557,20 +557,20 @@ KDoubleNumInput::KDoubleNumInput(double lower, double upper, double value,
KDoubleNumInput::KDoubleNumInput(KNumInput *below,
double lower, double upper, double value,
- double step, int precision, QWidget* parent,
+ double step, int precision, TQWidget* parent,
const char *name)
: KNumInput(below, parent, name)
{
init(value, lower, upper, step, precision);
}
-KDoubleNumInput::KDoubleNumInput(double value, QWidget *parent, const char *name)
+KDoubleNumInput::KDoubleNumInput(double value, TQWidget *parent, const char *name)
: KNumInput(parent, name)
{
init(value, kMin(0.0, value), kMax(0.0, value), 0.01, 2 );
}
-KDoubleNumInput::KDoubleNumInput(KNumInput* below, double value, QWidget* parent,
+KDoubleNumInput::KDoubleNumInput(KNumInput* below, double value, TQWidget* parent,
const char* name)
: KNumInput(below, parent, name)
{
@@ -584,7 +584,7 @@ KDoubleNumInput::~KDoubleNumInput()
// ### remove when BIC changes are allowed again:
-bool KDoubleNumInput::eventFilter( QObject * o, QEvent * e ) {
+bool KDoubleNumInput::eventFilter( TQObject * o, TQEvent * e ) {
return KNumInput::eventFilter( o, e );
}
@@ -611,10 +611,10 @@ void KDoubleNumInput::init(double value, double lower, double upper,
d->spin = new KDoubleSpinBox( lower, upper, step, value, precision,
this, "KDoubleNumInput::d->spin" );
setFocusProxy(d->spin);
- connect( d->spin, SIGNAL(valueChanged(double)),
- this, SIGNAL(valueChanged(double)) );
- connect( this, SIGNAL(valueChanged(double)),
- this, SLOT(slotEmitRelativeValueChanged(double)) );
+ connect( d->spin, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SIGNAL(valueChanged(double)) );
+ connect( this, TQT_SIGNAL(valueChanged(double)),
+ this, TQT_SLOT(slotEmitRelativeValueChanged(double)) );
updateLegacyMembers();
@@ -653,7 +653,7 @@ void KDoubleNumInput::slotEmitRelativeValueChanged( double value )
emit relativeValueChanged( value / d->referencePoint );
}
-QSize KDoubleNumInput::minimumSizeHint() const
+TQSize KDoubleNumInput::minimumSizeHint() const
{
constPolish();
@@ -675,10 +675,10 @@ QSize KDoubleNumInput::minimumSizeHint() const
if(m_alignment & (AlignTop|AlignBottom))
w = QMAX(w, m_sizeLabel.width() + 4);
- return QSize(w, h);
+ return TQSize(w, h);
}
-void KDoubleNumInput::resizeEvent(QResizeEvent* e)
+void KDoubleNumInput::resizeEvent(TQResizeEvent* e)
{
int w = m_colw1;
int h = 0;
@@ -748,15 +748,15 @@ void KDoubleNumInput::setRange(double lower, double upper, double step,
{
if( m_slider ) {
// don't update the slider to avoid an endless recursion
- QSpinBox * spin = d->spin;
- disconnect(spin, SIGNAL(valueChanged(int)),
- m_slider, SLOT(setValue(int)) );
+ TQSpinBox * spin = d->spin;
+ disconnect(spin, TQT_SIGNAL(valueChanged(int)),
+ m_slider, TQT_SLOT(setValue(int)) );
}
d->spin->setRange( lower, upper, step, d->spin->precision() );
if(slider) {
// upcast to base type to get the min/maxValue in int form:
- QSpinBox * spin = d->spin;
+ TQSpinBox * spin = d->spin;
int slmax = spin->maxValue();
int slmin = spin->minValue();
int slvalue = spin->value();
@@ -766,15 +766,15 @@ void KDoubleNumInput::setRange(double lower, double upper, double step,
m_slider->setLineStep(slstep);
m_slider->setValue(slvalue);
} else {
- m_slider = new QSlider(slmin, slmax, slstep, slvalue,
- QSlider::Horizontal, this);
- m_slider->setTickmarks(QSlider::Below);
+ m_slider = new TQSlider(slmin, slmax, slstep, slvalue,
+ TQSlider::Horizontal, this);
+ m_slider->setTickmarks(TQSlider::Below);
// feedback line: when one moves, the other moves, too:
- connect(m_slider, SIGNAL(valueChanged(int)),
- SLOT(sliderMoved(int)) );
+ connect(m_slider, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(sliderMoved(int)) );
}
- connect(spin, SIGNAL(valueChanged(int)),
- m_slider, SLOT(setValue(int)) );
+ connect(spin, TQT_SIGNAL(valueChanged(int)),
+ m_slider, TQT_SLOT(setValue(int)) );
// calculate ( slmax - slmin ) / 10 without overflowing ints:
int major = calcDiffByTen( slmax, slmin );
if ( !major ) major = slstep; // ### needed?
@@ -826,24 +826,24 @@ double KDoubleNumInput::referencePoint() const
return d->referencePoint;
}
-QString KDoubleNumInput::suffix() const
+TQString KDoubleNumInput::suffix() const
{
return d->spin->suffix();
}
-QString KDoubleNumInput::prefix() const
+TQString KDoubleNumInput::prefix() const
{
return d->spin->prefix();
}
-void KDoubleNumInput::setSuffix(const QString &suffix)
+void KDoubleNumInput::setSuffix(const TQString &suffix)
{
d->spin->setSuffix( suffix );
layout(true);
}
-void KDoubleNumInput::setPrefix(const QString &prefix)
+void KDoubleNumInput::setPrefix(const TQString &prefix)
{
d->spin->setPrefix( prefix );
@@ -862,7 +862,7 @@ int KDoubleNumInput::precision() const
return d->spin->precision();
}
-void KDoubleNumInput::setSpecialValueText(const QString& text)
+void KDoubleNumInput::setSpecialValueText(const TQString& text)
{
d->spin->setSpecialValueText( text );
@@ -870,7 +870,7 @@ void KDoubleNumInput::setSpecialValueText(const QString& text)
updateLegacyMembers();
}
-void KDoubleNumInput::setLabel(const QString & label, int a)
+void KDoubleNumInput::setLabel(const TQString & label, int a)
{
KNumInput::setLabel(label, a);
@@ -888,17 +888,17 @@ public:
KDoubleSpinBoxValidator( double bottom, double top, int decimals, KDoubleSpinBox* sb, const char *name )
: KDoubleValidator( bottom, top, decimals, sb, name ), spinBox( sb ) { }
- virtual State validate( QString& str, int& pos ) const;
+ virtual State validate( TQString& str, int& pos ) const;
private:
KDoubleSpinBox *spinBox;
};
-QValidator::State KDoubleSpinBoxValidator::validate( QString& str, int& pos ) const
+TQValidator::State KDoubleSpinBoxValidator::validate( TQString& str, int& pos ) const
{
- QString pref = spinBox->prefix();
- QString suff = spinBox->suffix();
- QString suffStriped = suff.stripWhiteSpace();
+ TQString pref = spinBox->prefix();
+ TQString suff = spinBox->suffix();
+ TQString suffStriped = suff.stripWhiteSpace();
uint overhead = pref.length() + suff.length();
State state = Invalid;
@@ -911,7 +911,7 @@ QValidator::State KDoubleSpinBoxValidator::validate( QString& str, int& pos ) co
|| (stripedVersion = str.endsWith(suffStriped))) ) {
if ( stripedVersion )
overhead = pref.length() + suffStriped.length();
- QString core = str.mid( pref.length(), str.length() - overhead );
+ TQString core = str.mid( pref.length(), str.length() - overhead );
int corePos = pos - pref.length();
state = KDoubleValidator::validate( core, corePos );
pos = corePos + pref.length();
@@ -919,9 +919,9 @@ QValidator::State KDoubleSpinBoxValidator::validate( QString& str, int& pos ) co
} else {
state = KDoubleValidator::validate( str, pos );
if ( state == Invalid ) {
- // stripWhiteSpace(), cf. QSpinBox::interpretText()
- QString special = spinBox->specialValueText().stripWhiteSpace();
- QString candidate = str.stripWhiteSpace();
+ // stripWhiteSpace(), cf. TQSpinBox::interpretText()
+ TQString special = spinBox->specialValueText().stripWhiteSpace();
+ TQString candidate = str.stripWhiteSpace();
if ( special.startsWith(candidate) ) {
if ( candidate.length() == special.length() ) {
@@ -993,25 +993,25 @@ public:
KDoubleSpinBoxValidator * mValidator;
};
-KDoubleSpinBox::KDoubleSpinBox( QWidget * parent, const char * name )
- : QSpinBox( parent, name )
+KDoubleSpinBox::KDoubleSpinBox( TQWidget * parent, const char * name )
+ : TQSpinBox( parent, name )
{
editor()->setAlignment( Qt::AlignRight );
d = new Private();
updateValidator();
- connect( this, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)) );
+ connect( this, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)) );
}
KDoubleSpinBox::KDoubleSpinBox( double lower, double upper, double step,
double value, int precision,
- QWidget * parent, const char * name )
- : QSpinBox( parent, name )
+ TQWidget * parent, const char * name )
+ : TQSpinBox( parent, name )
{
editor()->setAlignment( Qt::AlignRight );
d = new Private();
setRange( lower, upper, step, precision );
setValue( value );
- connect( this, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)) );
+ connect( this, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)) );
}
KDoubleSpinBox::~KDoubleSpinBox() {
@@ -1123,12 +1123,12 @@ void KDoubleSpinBox::setLineStep( double step ) {
base::setLineStep( kMax( d->mapToInt( step, &ok ), 1 ) );
}
-QString KDoubleSpinBox::mapValueToText( int value ) {
+TQString KDoubleSpinBox::mapValueToText( int value ) {
if ( acceptLocalizedNumbers() )
return KGlobal::locale()
->formatNumber( d->mapToDouble( value ), d->mPrecision );
else
- return QString().setNum( d->mapToDouble( value ), 'f', d->mPrecision );
+ return TQString().setNum( d->mapToDouble( value ), 'f', d->mPrecision );
}
int KDoubleSpinBox::mapTextToValue( bool * ok ) {
@@ -1145,7 +1145,7 @@ int KDoubleSpinBox::mapTextToValue( bool * ok ) {
return d->mapToInt( value, ok );
}
-void KDoubleSpinBox::setValidator( const QValidator * ) {
+void KDoubleSpinBox::setValidator( const TQValidator * ) {
// silently discard the new validator. We don't want another one ;-)
}
diff --git a/kdeui/knuminput.h b/kdeui/knuminput.h
index 212e0e3cf..67263f900 100644
--- a/kdeui/knuminput.h
+++ b/kdeui/knuminput.h
@@ -27,8 +27,8 @@
#ifndef K_NUMINPUT_H
#define K_NUMINPUT_H
-#include <qwidget.h>
-#include <qspinbox.h>
+#include <tqwidget.h>
+#include <tqspinbox.h>
#include <kdelibs_export.h>
class QLabel;
@@ -49,28 +49,28 @@ class KIntSpinBox;
class KDEUI_EXPORT KNumInput : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QString label READ label WRITE setLabel )
+ Q_PROPERTY( TQString label READ label WRITE setLabel )
public:
/**
* Default constructor
* @param parent If parent is 0, the new widget becomes a top-level window. If parent is another widget, this widget becomes a child window inside parent. The new widget is deleted when its parent is deleted.
- * @param name The name is sent to the QObject constructor.
+ * @param name The name is sent to the TQObject constructor.
*/
- KNumInput(QWidget* parent=0, const char* name=0);
+ KNumInput(TQWidget* parent=0, const char* name=0);
/**
* @param below A pointer to another KNumInput.
* @param parent parent widget
* @param name name of the widget
*/
- KNumInput(KNumInput* below, QWidget* parent=0, const char* name=0);
+ KNumInput(KNumInput* below, TQWidget* parent=0, const char* name=0);
~KNumInput();
/**
* Sets the text and alignment of the main description label.
*
* @param label The text of the label.
- * Use QString::null to remove an existing one.
+ * Use TQString::null to remove an existing one.
*
* @param a one of @p AlignLeft, @p AlignHCenter, YAlignRight and
* @p AlignTop, @p AlignVCenter, @p AlignBottom.
@@ -84,12 +84,12 @@ public:
* @li @p AlignBottom The label is placed below the edit/slider
*
*/
- virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop);
+ virtual void setLabel(const TQString & label, int a = AlignLeft | AlignTop);
/**
* @return the text of the label.
*/
- QString label() const;
+ TQString label() const;
/**
* @return if the num input has a slider.
@@ -107,16 +107,16 @@ public:
/**
* Specifies that this widget may stretch horizontally, but is
- * fixed vertically (like QSpinBox itself).
+ * fixed vertically (like TQSpinBox itself).
*/
- QSizePolicy sizePolicy() const;
+ TQSizePolicy sizePolicy() const;
/**
* Returns a size which fits the contents of the control.
*
* @return the preferred size necessary to show the control
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
protected:
/**
@@ -139,9 +139,9 @@ protected:
KNumInput* m_prev, *m_next;
int m_colw1, m_colw2;
- QLabel* m_label;
- QSlider* m_slider;
- QSize m_sizeSlider, m_sizeLabel;
+ TQLabel* m_label;
+ TQSlider* m_slider;
+ TQSize m_sizeSlider, m_sizeLabel;
int m_alignment;
@@ -160,7 +160,7 @@ private:
/**
* @short An input widget for integer numbers, consisting of a spinbox and a slider.
*
- * KIntNumInput combines a QSpinBox and optionally a QSlider
+ * KIntNumInput combines a TQSpinBox and optionally a QSlider
* with a label to make an easy to use control for setting some integer
* parameter. This is especially nice for configuration dialogs,
* which can have many such combinated controls.
@@ -172,7 +172,7 @@ private:
* A special feature of KIntNumInput, designed specifically for
* the situation when there are several KIntNumInputs in a column,
* is that you can specify what portion of the control is taken by the
- * QSpinBox (the remaining portion is used by the slider). This makes
+ * TQSpinBox (the remaining portion is used by the slider). This makes
* it very simple to have all the sliders in a column be the same size.
*
* It uses KIntValidator validator class. KIntNumInput enforces the
@@ -192,19 +192,19 @@ class KDEUI_EXPORT KIntNumInput : public KNumInput
Q_PROPERTY( int maxValue READ maxValue WRITE setMaxValue )
Q_PROPERTY( int referencePoint READ referencePoint WRITE setReferencePoint )
Q_PROPERTY( double relativeValue READ relativeValue WRITE setRelativeValue )
- Q_PROPERTY( QString suffix READ suffix WRITE setSuffix )
- Q_PROPERTY( QString prefix READ prefix WRITE setPrefix )
- Q_PROPERTY( QString specialValueText READ specialValueText WRITE setSpecialValueText )
+ Q_PROPERTY( TQString suffix READ suffix WRITE setSuffix )
+ Q_PROPERTY( TQString prefix READ prefix WRITE setPrefix )
+ Q_PROPERTY( TQString specialValueText READ specialValueText WRITE setSpecialValueText )
public:
/**
* Constructs an input control for integer values
* with base 10 and initial value 0.
*/
- KIntNumInput(QWidget *parent=0, const char *name=0);
+ KIntNumInput(TQWidget *parent=0, const char *name=0);
/**
* Constructor
- * It constructs a QSpinBox that allows the input of integer numbers
+ * It constructs a TQSpinBox that allows the input of integer numbers
* in the range of -INT_MAX to +INT_MAX. To set a descriptive label,
* use setLabel(). To enforce the value being in a range and optionally to
* attach a slider to it, use setRange().
@@ -214,7 +214,7 @@ public:
* @param parent parent QWidget
* @param name internal name for this widget
*/
- KIntNumInput(int value, QWidget* parent=0, int base = 10, const char *name=0);
+ KIntNumInput(int value, TQWidget* parent=0, int base = 10, const char *name=0);
/**
* Constructor
@@ -233,7 +233,7 @@ public:
* @param parent parent QWidget
* @param name internal name for this widget
*/
- KIntNumInput(KNumInput* below, int value, QWidget* parent=0, int base = 10, const char *name=0);
+ KIntNumInput(KNumInput* below, int value, TQWidget* parent=0, int base = 10, const char *name=0);
/**
* Destructor
@@ -263,17 +263,17 @@ public:
* @return the suffix displayed behind the value.
* @see setSuffix()
*/
- QString suffix() const;
+ TQString suffix() const;
/**
* @return the prefix displayed in front of the value.
* @see setPrefix()
*/
- QString prefix() const;
+ TQString prefix() const;
/**
* @return the string displayed for a special value.
* @see setSpecialValueText()
*/
- QString specialValueText() const;
+ TQString specialValueText() const;
/**
* @param min minimum value
@@ -305,9 +305,9 @@ public:
* value is equal to minVal(). Typically this is used for indicating
* that the choice has a special (default) meaning.
*/
- void setSpecialValueText(const QString& text);
+ void setSpecialValueText(const TQString& text);
- virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop);
+ virtual void setLabel(const TQString & label, int a = AlignLeft | AlignTop);
/**
* This method returns the minimum size necessary to display the
@@ -316,7 +316,7 @@ public:
*
* @return the minimum size necessary to show the control
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
public slots:
/**
@@ -338,23 +338,23 @@ public slots:
/**
* Sets the suffix to @p suffix.
- * Use QString::null to disable this feature.
+ * Use TQString::null to disable this feature.
* Formatting has to be provided (e.g. a space separator between the
* prepended @p value and the suffix's text has to be provided
* as the first character in the suffix).
*
- * @see QSpinBox::setSuffix(), #setPrefix()
+ * @see TQSpinBox::setSuffix(), #setPrefix()
*/
- void setSuffix(const QString &suffix);
+ void setSuffix(const TQString &suffix);
/**
* Sets the prefix to @p prefix.
- * Use QString::null to disable this feature.
+ * Use TQString::null to disable this feature.
* Formatting has to be provided (see above).
*
- * @see QSpinBox::setPrefix(), #setSuffix()
+ * @see TQSpinBox::setPrefix(), #setSuffix()
*/
- void setPrefix(const QString &prefix);
+ void setPrefix(const TQString &prefix);
/**
* sets focus to the edit widget and marks all text in if mark == true
@@ -382,10 +382,10 @@ private slots:
protected:
virtual void doLayout();
- void resizeEvent ( QResizeEvent * );
+ void resizeEvent ( TQResizeEvent * );
KIntSpinBox* m_spin;
- QSize m_sizeSpin;
+ TQSize m_sizeSpin;
private:
void init(int value, int _base);
@@ -405,7 +405,7 @@ class KDoubleLine;
/**
* @short An input control for real numbers, consisting of a spinbox and a slider.
*
- * KDoubleNumInput combines a QSpinBox and optionally a QSlider
+ * KDoubleNumInput combines a TQSpinBox and optionally a QSlider
* with a label to make an easy to use control for setting some float
* parameter. This is especially nice for configuration dialogs,
* which can have many such combinated controls.
@@ -417,7 +417,7 @@ class KDoubleLine;
* A special feature of KDoubleNumInput, designed specifically for
* the situation when there are several instances in a column,
* is that you can specify what portion of the control is taken by the
- * QSpinBox (the remaining portion is used by the slider). This makes
+ * TQSpinBox (the remaining portion is used by the slider). This makes
* it very simple to have all the sliders in a column be the same size.
*
* It uses the KDoubleValidator validator class. KDoubleNumInput
@@ -435,9 +435,9 @@ class KDEUI_EXPORT KDoubleNumInput : public KNumInput
Q_PROPERTY( double value READ value WRITE setValue )
Q_PROPERTY( double minValue READ minValue WRITE setMinValue )
Q_PROPERTY( double maxValue READ maxValue WRITE setMaxValue )
- Q_PROPERTY( QString suffix READ suffix WRITE setSuffix )
- Q_PROPERTY( QString prefix READ prefix WRITE setPrefix )
- Q_PROPERTY( QString specialValueText READ specialValueText WRITE setSpecialValueText )
+ Q_PROPERTY( TQString suffix READ suffix WRITE setSuffix )
+ Q_PROPERTY( TQString prefix READ prefix WRITE setPrefix )
+ Q_PROPERTY( TQString specialValueText READ specialValueText WRITE setSpecialValueText )
Q_PROPERTY( int precision READ precision WRITE setPrecision )
Q_PROPERTY( double referencePoint READ referencePoint WRITE setReferencePoint )
Q_PROPERTY( double relativeValue READ relativeValue WRITE setRelativeValue )
@@ -447,7 +447,7 @@ public:
* Constructs an input control for double values
* with initial value 0.00.
*/
- KDoubleNumInput(QWidget *parent=0, const char *name=0);
+ KDoubleNumInput(TQWidget *parent=0, const char *name=0);
/**
* @deprecated (value is rounded to a multiple of 1/100)
@@ -457,7 +457,7 @@ public:
* @param parent parent QWidget
* @param name internal name for this widget
*/
- KDoubleNumInput(double value, QWidget *parent=0, const char *name=0) KDE_DEPRECATED;
+ KDoubleNumInput(double value, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED;
/**
* Constructor
@@ -472,7 +472,7 @@ public:
* @since 3.1
*/
KDoubleNumInput(double lower, double upper, double value, double step=0.01,
- int precision=2, QWidget *parent=0, const char *name=0);
+ int precision=2, TQWidget *parent=0, const char *name=0);
/**
* destructor
@@ -490,7 +490,7 @@ public:
* @param parent parent QWidget
* @param name internal name for this widget
**/
- KDoubleNumInput(KNumInput* below, double value, QWidget* parent=0, const char* name=0) KDE_DEPRECATED;
+ KDoubleNumInput(KNumInput* below, double value, TQWidget* parent=0, const char* name=0) KDE_DEPRECATED;
/**
* Constructor
@@ -515,7 +515,7 @@ public:
*/
KDoubleNumInput(KNumInput* below,
double lower, double upper, double value, double step=0.02,
- int precision=2, QWidget *parent=0, const char *name=0);
+ int precision=2, TQWidget *parent=0, const char *name=0);
/**
* @return the current value.
@@ -526,13 +526,13 @@ public:
* @return the suffix.
* @see setSuffix()
*/
- QString suffix() const;
+ TQString suffix() const;
/**
* @return the prefix.
* @see setPrefix()
*/
- QString prefix() const;
+ TQString prefix() const;
/**
* @return the precision.
@@ -544,7 +544,7 @@ public:
* @return the string displayed for a special value.
* @see setSpecialValueText()
*/
- QString specialValueText() const { return m_specialvalue; }
+ TQString specialValueText() const { return m_specialvalue; }
/**
* @param min minimum value
@@ -593,11 +593,11 @@ public:
* value is equal to minVal(). Typically this is used for indicating
* that the choice has a special (default) meaning.
*/
- void setSpecialValueText(const QString& text);
+ void setSpecialValueText(const TQString& text);
- virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop);
- virtual QSize minimumSizeHint() const;
- virtual bool eventFilter(QObject*, QEvent*);
+ virtual void setLabel(const TQString & label, int a = AlignLeft | AlignTop);
+ virtual TQSize minimumSizeHint() const;
+ virtual bool eventFilter(TQObject*, TQEvent*);
public slots:
/**
@@ -620,21 +620,21 @@ public slots:
void setReferencePoint(double ref);
/**
- * Sets the suffix to be displayed to @p suffix. Use QString::null to disable
+ * Sets the suffix to be displayed to @p suffix. Use TQString::null to disable
* this feature. Note that the suffix is attached to the value without any
* spacing. So if you prefer to display a space separator, set suffix
* to something like " cm".
* @see setSuffix()
*/
- void setSuffix(const QString &suffix);
+ void setSuffix(const TQString &suffix);
/**
- * Sets the prefix to be displayed to @p prefix. Use QString::null to disable
+ * Sets the prefix to be displayed to @p prefix. Use TQString::null to disable
* this feature. Note that the prefix is attached to the value without any
* spacing.
* @see setPrefix()
*/
- void setPrefix(const QString &prefix);
+ void setPrefix(const TQString &prefix);
signals:
/**
@@ -657,7 +657,7 @@ private slots:
protected:
virtual void doLayout();
- void resizeEvent ( QResizeEvent * );
+ void resizeEvent ( TQResizeEvent * );
virtual void resetEditBox();
@@ -668,7 +668,7 @@ protected:
double m_lower, m_upper, m_step;
// ### end no longer used
- QSize m_sizeEdit;
+ TQSize m_sizeEdit;
friend class KDoubleLine;
private:
@@ -677,7 +677,7 @@ private:
double mapSliderToSpin(int) const;
void updateLegacyMembers();
// ### no longer used, remove when BIC allowed:
- QString m_specialvalue, m_prefix, m_suffix;
+ TQString m_specialvalue, m_prefix, m_suffix;
double m_value;
short m_precision;
// ### end remove when BIC allowed
@@ -693,9 +693,9 @@ private:
/* ------------------------------------------------------------------------ */
/**
- * @short A QSpinBox with support for arbitrary base numbers.
+ * @short A TQSpinBox with support for arbitrary base numbers.
*
- * A QSpinBox with support for arbitrary base numbers
+ * A TQSpinBox with support for arbitrary base numbers
* (e.g. hexadecimal).
*
* The class provides an easy interface to use other
@@ -715,7 +715,7 @@ public:
* and a slider, with minimal value 0, maximal value 99, step 1, base 10
* and initial value 0.
*/
- KIntSpinBox( QWidget *parent=0, const char *name=0);
+ KIntSpinBox( TQWidget *parent=0, const char *name=0);
/**
* Constructor.
@@ -732,7 +732,7 @@ public:
* @param name The Name of the widget.
*/
KIntSpinBox(int lower, int upper, int step, int value, int base = 10,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
/**
* Destructor.
@@ -759,7 +759,7 @@ protected:
* Overloaded the method in QSpinBox
* to make use of the base given in the constructor.
*/
- virtual QString mapValueToText(int);
+ virtual TQString mapValueToText(int);
/**
* Overloaded the method in QSpinBox
@@ -831,7 +831,7 @@ private:
@since 3.1
**/
-class KDEUI_EXPORT KDoubleSpinBox : public QSpinBox {
+class KDEUI_EXPORT KDoubleSpinBox : public TQSpinBox {
Q_OBJECT
Q_PROPERTY( bool acceptLocalizedNumbers READ acceptLocalizedNumbers WRITE setAcceptLocalizedNumbers )
Q_OVERRIDE( double maxValue READ maxValue WRITE setMaxValue )
@@ -844,13 +844,13 @@ public:
/** Constructs a KDoubleSpinBox with parent @p parent and
default values for range and value (whatever QRangeControl
uses) and precision (2). */
- KDoubleSpinBox( QWidget * parent=0, const char * name=0 );
+ KDoubleSpinBox( TQWidget * parent=0, const char * name=0 );
/** Constructs a KDoubleSpinBox with parent @p parent, range
[ @p lower, @p upper ], lineStep @p step, precision @p
precision and initial value @p value. */
KDoubleSpinBox( double lower, double upper, double step, double value,
- int precision=2, QWidget * parent=0, const char * name=0 );
+ int precision=2, TQWidget * parent=0, const char * name=0 );
virtual ~KDoubleSpinBox();
@@ -924,10 +924,10 @@ public:
void setLineStep( double step );
/** Overridden to ignore any setValidator() calls. */
- void setValidator( const QValidator * );
+ void setValidator( const TQValidator * );
signals:
- /** Emitted whenever QSpinBox::valueChanged( int ) is emitted. */
+ /** Emitted whenever TQSpinBox::valueChanged( int ) is emitted. */
void valueChanged( double value );
public slots:
@@ -937,7 +937,7 @@ public slots:
virtual void setValue( double value );
protected:
- virtual QString mapValueToText(int);
+ virtual TQString mapValueToText(int);
virtual int mapTextToValue(bool*);
protected slots:
@@ -946,7 +946,7 @@ protected slots:
protected:
virtual void virtual_hook( int id, void* data );
private:
- typedef QSpinBox base;
+ typedef TQSpinBox base;
void updateValidator();
int maxPrecision() const;
diff --git a/kdeui/knumvalidator.cpp b/kdeui/knumvalidator.cpp
index 890fb76a0..436f95431 100644
--- a/kdeui/knumvalidator.cpp
+++ b/kdeui/knumvalidator.cpp
@@ -22,8 +22,8 @@
**
*****************************************************************************/
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include "knumvalidator.h"
#include <klocale.h>
@@ -34,8 +34,8 @@
// Implementation of KIntValidator
//
-KIntValidator::KIntValidator ( QWidget * parent, int base, const char * name )
- : QValidator(parent, name)
+KIntValidator::KIntValidator ( TQWidget * parent, int base, const char * name )
+ : TQValidator(parent, name)
{
_base = base;
if (_base < 2) _base = 2;
@@ -44,8 +44,8 @@ KIntValidator::KIntValidator ( QWidget * parent, int base, const char * name )
_min = _max = 0;
}
-KIntValidator::KIntValidator ( int bottom, int top, QWidget * parent, int base, const char * name )
- : QValidator(parent, name)
+KIntValidator::KIntValidator ( int bottom, int top, TQWidget * parent, int base, const char * name )
+ : TQValidator(parent, name)
{
_base = base;
if (_base > 36) _base = 36;
@@ -57,21 +57,21 @@ KIntValidator::KIntValidator ( int bottom, int top, QWidget * parent, int base,
KIntValidator::~KIntValidator ()
{}
-QValidator::State KIntValidator::validate ( QString &str, int & ) const
+TQValidator::State KIntValidator::validate ( TQString &str, int & ) const
{
bool ok;
int val = 0;
- QString newStr;
+ TQString newStr;
newStr = str.stripWhiteSpace();
if (_base > 10)
newStr = newStr.upper();
- if (newStr == QString::fromLatin1("-")) // a special case
+ if (newStr == TQString::fromLatin1("-")) // a special case
if ((_min || _max) && _min >= 0)
ok = false;
else
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
else if (newStr.length())
val = newStr.toInt(&ok, _base);
else {
@@ -80,26 +80,26 @@ QValidator::State KIntValidator::validate ( QString &str, int & ) const
}
if (! ok)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
if ((! _min && ! _max) || (val >= _min && val <= _max))
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
if (_max && _min >= 0 && val < 0)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
- return QValidator::Valid;
+ return TQValidator::Valid;
}
-void KIntValidator::fixup ( QString &str ) const
+void KIntValidator::fixup ( TQString &str ) const
{
int dummy;
int val;
- QValidator::State state;
+ TQValidator::State state;
state = validate(str, dummy);
- if (state == QValidator::Invalid || state == QValidator::Acceptable)
+ if (state == TQValidator::Invalid || state == TQValidator::Acceptable)
return;
if (! _min && ! _max)
@@ -161,16 +161,16 @@ public:
};
-KFloatValidator::KFloatValidator ( QWidget * parent, const char * name )
- : QValidator(parent, name)
+KFloatValidator::KFloatValidator ( TQWidget * parent, const char * name )
+ : TQValidator(parent, name)
{
d = new KFloatValidatorPrivate;
d->acceptLocalizedNumbers=false;
_min = _max = 0;
}
-KFloatValidator::KFloatValidator ( double bottom, double top, QWidget * parent, const char * name )
- : QValidator(parent, name)
+KFloatValidator::KFloatValidator ( double bottom, double top, TQWidget * parent, const char * name )
+ : TQValidator(parent, name)
{
d = new KFloatValidatorPrivate;
d->acceptLocalizedNumbers=false;
@@ -178,8 +178,8 @@ KFloatValidator::KFloatValidator ( double bottom, double top, QWidget * parent,
_max = top;
}
-KFloatValidator::KFloatValidator ( double bottom, double top, bool localeAware, QWidget * parent, const char * name )
- : QValidator(parent, name)
+KFloatValidator::KFloatValidator ( double bottom, double top, bool localeAware, TQWidget * parent, const char * name )
+ : TQValidator(parent, name)
{
d = new KFloatValidatorPrivate;
d->acceptLocalizedNumbers = localeAware;
@@ -202,20 +202,20 @@ bool KFloatValidator::acceptLocalizedNumbers() const
return d->acceptLocalizedNumbers;
}
-QValidator::State KFloatValidator::validate ( QString &str, int & ) const
+TQValidator::State KFloatValidator::validate ( TQString &str, int & ) const
{
bool ok;
double val = 0;
- QString newStr;
+ TQString newStr;
newStr = str.stripWhiteSpace();
- if (newStr == QString::fromLatin1("-")) // a special case
+ if (newStr == TQString::fromLatin1("-")) // a special case
if ((_min || _max) && _min >= 0)
ok = false;
else
- return QValidator::Acceptable;
- else if (newStr == QString::fromLatin1(".") || (d->acceptLocalizedNumbers && newStr==KGlobal::locale()->decimalSymbol())) // another special case
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
+ else if (newStr == TQString::fromLatin1(".") || (d->acceptLocalizedNumbers && newStr==KGlobal::locale()->decimalSymbol())) // another special case
+ return TQValidator::Acceptable;
else if (newStr.length())
{
val = newStr.toDouble(&ok);
@@ -228,29 +228,29 @@ QValidator::State KFloatValidator::validate ( QString &str, int & ) const
}
if (! ok)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
if (( !_min && !_max) || (val >= _min && val <= _max))
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
if (_max && _min >= 0 && val < 0)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
if ( (_min || _max) && (val < _min || val > _max))
- return QValidator::Invalid;
+ return TQValidator::Invalid;
- return QValidator::Valid;
+ return TQValidator::Valid;
}
-void KFloatValidator::fixup ( QString &str ) const
+void KFloatValidator::fixup ( TQString &str ) const
{
int dummy;
double val;
- QValidator::State state;
+ TQValidator::State state;
state = validate(str, dummy);
- if (state == QValidator::Invalid || state == QValidator::Acceptable)
+ if (state == TQValidator::Invalid || state == TQValidator::Acceptable)
return;
if (! _min && ! _max)
@@ -297,15 +297,15 @@ public:
bool acceptLocalizedNumbers;
};
-KDoubleValidator::KDoubleValidator( QObject * parent, const char * name )
- : QDoubleValidator( parent, name ), d( 0 )
+KDoubleValidator::KDoubleValidator( TQObject * parent, const char * name )
+ : TQDoubleValidator( parent, name ), d( 0 )
{
d = new Private();
}
KDoubleValidator::KDoubleValidator( double bottom, double top, int decimals,
- QObject * parent, const char * name )
- : QDoubleValidator( bottom, top, decimals, parent, name ), d( 0 )
+ TQObject * parent, const char * name )
+ : TQDoubleValidator( bottom, top, decimals, parent, name ), d( 0 )
{
d = new Private();
}
@@ -323,8 +323,8 @@ void KDoubleValidator::setAcceptLocalizedNumbers( bool accept ) {
d->acceptLocalizedNumbers = accept;
}
-QValidator::State KDoubleValidator::validate( QString & input, int & p ) const {
- QString s = input;
+TQValidator::State KDoubleValidator::validate( TQString & input, int & p ) const {
+ TQString s = input;
if ( acceptLocalizedNumbers() ) {
KLocale * l = KGlobal::locale();
// ok, we have to re-format the number to have:
@@ -333,7 +333,7 @@ QValidator::State KDoubleValidator::validate( QString & input, int & p ) const {
// 3. positiveSign == <empty>
// 4. thousandsSeparator() == <empty> (we don't check that there
// are exactly three decimals between each separator):
- QString d = l->decimalSymbol(),
+ TQString d = l->decimalSymbol(),
n = l->negativeSign(),
p = l->positiveSign(),
t = l->thousandsSeparator();
diff --git a/kdeui/knumvalidator.h b/kdeui/knumvalidator.h
index 114a82d57..55711fadb 100644
--- a/kdeui/knumvalidator.h
+++ b/kdeui/knumvalidator.h
@@ -24,7 +24,7 @@
#ifndef __KNUMVALIDATOR_H
#define __KNUMVALIDATOR_H
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include <kdelibs_export.h>
@@ -32,26 +32,26 @@ class QWidget;
class QString;
/**
- * QValidator for integers.
+ * TQValidator for integers.
- This can be used by QLineEdit or subclass to provide validated
+ This can be used by TQLineEdit or subclass to provide validated
text entry. Can be provided with a base value (default is 10), to allow
the proper entry of hexadecimal, octal, or any other base numeric data.
@author Glen Parker <glenebob@nwlink.com>
@version 0.0.1
*/
-class KDEUI_EXPORT KIntValidator : public QValidator {
+class KDEUI_EXPORT KIntValidator : public TQValidator {
public:
/**
Constuctor. Also sets the base value.
*/
- KIntValidator ( QWidget * parent, int base = 10, const char * name = 0 );
+ KIntValidator ( TQWidget * parent, int base = 10, const char * name = 0 );
/**
* Constructor. Also sets the minimum, maximum, and numeric base values.
*/
- KIntValidator ( int bottom, int top, QWidget * parent, int base = 10, const char * name = 0 );
+ KIntValidator ( int bottom, int top, TQWidget * parent, int base = 10, const char * name = 0 );
/**
* Destructs the validator.
*/
@@ -59,11 +59,11 @@ class KDEUI_EXPORT KIntValidator : public QValidator {
/**
* Validates the text, and return the result. Does not modify the parameters.
*/
- virtual State validate ( QString &, int & ) const;
+ virtual State validate ( TQString &, int & ) const;
/**
* Fixes the text if possible, providing a valid string. The parameter may be modified.
*/
- virtual void fixup ( QString & ) const;
+ virtual void fixup ( TQString & ) const;
/**
* Sets the minimum and maximum values allowed.
*/
@@ -95,32 +95,32 @@ class KDEUI_EXPORT KIntValidator : public QValidator {
class KFloatValidatorPrivate;
/**
- \brief QValidator for floating point entry (Obsolete)
+ \brief TQValidator for floating point entry (Obsolete)
@obsolete Use KDoubleValidator
- Extends the QValidator class to properly validate double numeric data.
- This can be used by QLineEdit or subclass to provide validated
+ Extends the TQValidator class to properly validate double numeric data.
+ This can be used by TQLineEdit or subclass to provide validated
text entry.
@author Glen Parker <glenebob@nwlink.com>
@version 0.0.1
*/
-class KDEUI_EXPORT KFloatValidator : public QValidator {
+class KDEUI_EXPORT KFloatValidator : public TQValidator {
public:
/**
* Constructor.
*/
- KFloatValidator ( QWidget * parent, const char * name = 0 );
+ KFloatValidator ( TQWidget * parent, const char * name = 0 );
/**
* Constructor. Also sets the minimum and maximum values.
*/
- KFloatValidator ( double bottom, double top, QWidget * parent, const char * name = 0 );
+ KFloatValidator ( double bottom, double top, TQWidget * parent, const char * name = 0 );
/**
* Constructor. Sets the validator to be locale aware if @p localeAware is true.
*/
- KFloatValidator ( double bottom, double top, bool localeAware, QWidget * parent, const char * name = 0 );
+ KFloatValidator ( double bottom, double top, bool localeAware, TQWidget * parent, const char * name = 0 );
/**
* Destructs the validator.
*/
@@ -128,11 +128,11 @@ class KDEUI_EXPORT KFloatValidator : public QValidator {
/**
* Validates the text, and return the result. Does not modify the parameters.
*/
- virtual State validate ( QString &, int & ) const;
+ virtual State validate ( TQString &, int & ) const;
/**
* Fixes the text if possible, providing a valid string. The parameter may be modified.
*/
- virtual void fixup ( QString & ) const;
+ virtual void fixup ( TQString & ) const;
/**
* Sets the minimum and maximum value allowed.
*/
@@ -167,7 +167,7 @@ class KDEUI_EXPORT KFloatValidator : public QValidator {
/**
@short A locale-aware QDoubleValidator
- KDoubleValidator extends QDoubleValidator to be
+ KDoubleValidator extends TQDoubleValidator to be
locale-aware. That means that - subject to not being disabled -
KLocale::decimalSymbol(), KLocale::thousandsSeparator()
and KLocale::positiveSign() and KLocale::negativeSign()
@@ -178,25 +178,25 @@ class KDEUI_EXPORT KFloatValidator : public QValidator {
@since 3.1
**/
-class KDEUI_EXPORT KDoubleValidator : public QDoubleValidator {
+class KDEUI_EXPORT KDoubleValidator : public TQDoubleValidator {
Q_OBJECT
Q_PROPERTY( bool acceptLocalizedNumbers READ acceptLocalizedNumbers WRITE setAcceptLocalizedNumbers )
public:
/** Constuct a locale-aware KDoubleValidator with default range
- (whatever QDoubleValidator uses for that) and parent @p
+ (whatever TQDoubleValidator uses for that) and parent @p
parent */
- KDoubleValidator( QObject * parent, const char * name=0 );
+ KDoubleValidator( TQObject * parent, const char * name=0 );
/** Constuct a locale-aware KDoubleValidator for range [@p bottom,@p
top] and a precision of @p decimals decimals after the decimal
point. */
KDoubleValidator( double bottom, double top, int decimals,
- QObject * parent, const char * name=0 );
+ TQObject * parent, const char * name=0 );
/** Destructs the validator.
*/
virtual ~KDoubleValidator();
/** Overloaded for internal reasons. The API is not affected. */
- virtual QValidator::State validate( QString & input, int & pos ) const;
+ virtual TQValidator::State validate( TQString & input, int & pos ) const;
/** @return whether localized numbers are accepted (default: true) */
bool acceptLocalizedNumbers() const;
@@ -204,7 +204,7 @@ public:
void setAcceptLocalizedNumbers( bool accept );
private:
- typedef QDoubleValidator base;
+ typedef TQDoubleValidator base;
class Private;
Private * d;
};
diff --git a/kdeui/kpanelapplet.cpp b/kdeui/kpanelapplet.cpp
index 1536e974d..817d9de60 100644
--- a/kdeui/kpanelapplet.cpp
+++ b/kdeui/kpanelapplet.cpp
@@ -21,7 +21,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "kpanelapplet.h"
#include "kpanelapplet.moc"
@@ -36,15 +36,15 @@ public:
hasFocus(false)
{}
- const QPopupMenu* customMenu;
+ const TQPopupMenu* customMenu;
KSharedConfig::Ptr sharedConfig;
- QPtrList<QObject> watchedForFocus;
+ TQPtrList<TQObject> watchedForFocus;
bool hasFocus;
};
-KPanelApplet::KPanelApplet(const QString& configFile, Type type,
- int actions, QWidget *parent, const char *name, WFlags f)
- : QFrame(parent, name, f)
+KPanelApplet::KPanelApplet(const TQString& configFile, Type type,
+ int actions, TQWidget *parent, const char *name, WFlags f)
+ : TQFrame(parent, name, f)
, _type(type)
, _position( pBottom )
, _alignment( LeftTop )
@@ -53,7 +53,7 @@ KPanelApplet::KPanelApplet(const QString& configFile, Type type,
, d(new KPanelApplet::KPanelAppletPrivate())
{
setFrameStyle(NoFrame);
- QPalette pal(palette());
+ TQPalette pal(palette());
if(pal.active().mid() != pal.inactive().mid()){
pal.setInactive(pal.active());
setPalette(pal);
@@ -89,7 +89,7 @@ void KPanelApplet::setAlignment( Alignment a )
void KPanelApplet::positionChange( Position )
{
orientationChange( orientation() );
- QResizeEvent e( size(), size() );
+ TQResizeEvent e( size(), size() );
resizeEvent( &e );
popupDirectionChange( popupDirection() );
}
@@ -127,17 +127,17 @@ void KPanelApplet::action( Action a )
reportBug();
}
-const QPopupMenu* KPanelApplet::customMenu() const
+const TQPopupMenu* KPanelApplet::customMenu() const
{
return d->customMenu;
}
-void KPanelApplet::setCustomMenu(const QPopupMenu* menu)
+void KPanelApplet::setCustomMenu(const TQPopupMenu* menu)
{
d->customMenu = menu;
}
-void KPanelApplet::watchForFocus(QWidget* widget, bool watch)
+void KPanelApplet::watchForFocus(TQWidget* widget, bool watch)
{
if (!widget)
{
@@ -170,22 +170,22 @@ void KPanelApplet::needsFocus(bool focus)
emit requestFocus(focus);
}
-bool KPanelApplet::eventFilter(QObject *o, QEvent * e)
+bool KPanelApplet::eventFilter(TQObject *o, TQEvent * e)
{
if (d->watchedForFocus.find(o) != -1)
{
- if (e->type() == QEvent::MouseButtonRelease ||
- e->type() == QEvent::FocusIn)
+ if (e->type() == TQEvent::MouseButtonRelease ||
+ e->type() == TQEvent::FocusIn)
{
needsFocus(true);
}
- else if (e->type() == QEvent::FocusOut)
+ else if (e->type() == TQEvent::FocusOut)
{
needsFocus(false);
}
}
- return QFrame::eventFilter(o, e);
+ return TQFrame::eventFilter(o, e);
}
KSharedConfig::Ptr KPanelApplet::sharedConfig() const
diff --git a/kdeui/kpanelapplet.h b/kdeui/kpanelapplet.h
index a43e598f2..54fdef89b 100644
--- a/kdeui/kpanelapplet.h
+++ b/kdeui/kpanelapplet.h
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __kpanelapplet_h__
#define __kpanelapplet_h__
-#include <qframe.h>
+#include <tqframe.h>
#include <kconfig.h>
class KConfig;
@@ -78,7 +78,7 @@ class QPopupMenu;
*
* extern "C"
* {
- * KPanelApplet* init(QWidget *parent, const QString& configFile)
+ * KPanelApplet* init(TQWidget *parent, const TQString& configFile)
* {
* KGlobal::locale()->insertCatalogue("exampleapplet");
* return new ExampleApplet(configFile, KPanelApplet::Normal,
@@ -124,8 +124,8 @@ public:
* @param name A Qt object name for your applet.
* @param f Window control flags
**/
- KPanelApplet(const QString& configFile, Type t = Normal,
- int actions = 0, QWidget *parent = 0, const char *name = 0,
+ KPanelApplet(const TQString& configFile, Type t = Normal,
+ int actions = 0, TQWidget *parent = 0, const char *name = 0,
WFlags f = 0);
/**
@@ -213,9 +213,9 @@ public:
/**
* @return the applet's custom menu, usually the same as the context menu, or 0 if none
- * see setCustomMenu(QPopupMenu*)
+ * see setCustomMenu(TQPopupMenu*)
*/
- const QPopupMenu* customMenu() const;
+ const TQPopupMenu* customMenu() const;
/**
* @internal
@@ -335,7 +335,7 @@ protected:
* If the menu is deleted during the life of the applet, be sure to call this method again
* with the new menu (or 0) to avoid crashes
*/
- void setCustomMenu(const QPopupMenu*);
+ void setCustomMenu(const TQPopupMenu*);
/**
* Register widgets that can receive keyboard focus with this this method
@@ -344,7 +344,7 @@ protected:
* @param watch whether to start watching the widget, or to stop doing so
* @since 3.4
*/
- void watchForFocus(QWidget* widget, bool watch = true);
+ void watchForFocus(TQWidget* widget, bool watch = true);
/**
* Call this whenever focus is needed or not needed. You do not have to call this method
@@ -378,7 +378,7 @@ protected:
// FIXME: Remove for KDE 4
virtual KDE_DEPRECATED void popupDirectionChange( Direction /*direction*/ ) {}
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
private:
Type _type;
diff --git a/kdeui/kpanelappmenu.cpp b/kdeui/kpanelappmenu.cpp
index dd9f01120..68783a339 100644
--- a/kdeui/kpanelappmenu.cpp
+++ b/kdeui/kpanelappmenu.cpp
@@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "kpanelappmenu.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <dcopclient.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -35,111 +35,111 @@ static int panelmenu_get_seq_id()
}
-KPanelAppMenu::KPanelAppMenu(const QString &title, QObject *parent,
+KPanelAppMenu::KPanelAppMenu(const TQString &title, TQObject *parent,
const char *name)
- : QObject(parent, name), DCOPObject()
+ : TQObject(parent, name), DCOPObject()
{
- init(QString::null, title);
+ init(TQString::null, title);
}
-KPanelAppMenu::KPanelAppMenu(const QPixmap &icon, const QString &title,
- QObject *parent, const char *name)
-: QObject(parent, name), DCOPObject()
+KPanelAppMenu::KPanelAppMenu(const TQPixmap &icon, const TQString &title,
+ TQObject *parent, const char *name)
+: TQObject(parent, name), DCOPObject()
{
init(icon, title);
}
-KPanelAppMenu::KPanelAppMenu(QObject *parent, const char *name)
- : QObject(parent, name), DCOPObject(name)
+KPanelAppMenu::KPanelAppMenu(TQObject *parent, const char *name)
+ : TQObject(parent, name), DCOPObject(name)
{
realObjId = name;
}
-void KPanelAppMenu::init(const QPixmap &icon, const QString &title)
+void KPanelAppMenu::init(const TQPixmap &icon, const TQString &title)
{
DCOPClient *client = kapp->dcopClient();
if(!client->isAttached())
client->attach();
- QByteArray sendData, replyData;
- QCString replyType;
+ TQByteArray sendData, replyData;
+ TQCString replyType;
{
- QDataStream stream(sendData, IO_WriteOnly);
+ TQDataStream stream(sendData, IO_WriteOnly);
stream << icon << title;
- if ( client->call("kicker", "kickerMenuManager", "createMenu(QPixmap,QString)", sendData, replyType, replyData ) ) {
- if (replyType != "QCString")
+ if ( client->call("kicker", "kickerMenuManager", "createMenu(TQPixmap,TQString)", sendData, replyType, replyData ) ) {
+ if (replyType != "TQCString")
kdDebug() << "error! replyType for createMenu should be QCstring in KPanelAppMenu::init" << endl;
else {
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> realObjId;
}
}
}
{
- QDataStream stream(sendData, IO_WriteOnly);
- stream << QCString("activated(int)") << client->appId() << objId();
- client->send("kicker", realObjId, "connectDCOPSignal(QCString,QCString,QCString)", sendData);
+ TQDataStream stream(sendData, IO_WriteOnly);
+ stream << TQCString("activated(int)") << client->appId() << objId();
+ client->send("kicker", realObjId, "connectDCOPSignal(TQCString,TQCString,TQCString)", sendData);
}
}
KPanelAppMenu::~KPanelAppMenu()
{
DCOPClient *client = kapp->dcopClient();
- QByteArray sendData;
- QDataStream stream(sendData, IO_WriteOnly);
+ TQByteArray sendData;
+ TQDataStream stream(sendData, IO_WriteOnly);
stream << realObjId;
client->send("kicker", "kickerMenuManager", "removeMenu", sendData );
}
-int KPanelAppMenu::insertItem(const QPixmap &icon, const QString &text, int id )
+int KPanelAppMenu::insertItem(const TQPixmap &icon, const TQString &text, int id )
{
if ( id < 0 )
id = panelmenu_get_seq_id();
DCOPClient *client = kapp->dcopClient();
- QByteArray sendData;
- QDataStream stream(sendData, IO_WriteOnly);
+ TQByteArray sendData;
+ TQDataStream stream(sendData, IO_WriteOnly);
stream << icon << text << id;
- client->send("kicker", realObjId, "insertItem(QPixmap,QString,int)", sendData );
+ client->send("kicker", realObjId, "insertItem(TQPixmap,TQString,int)", sendData );
return id;
}
-KPanelAppMenu *KPanelAppMenu::insertMenu(const QPixmap &icon, const QString &text, int id )
+KPanelAppMenu *KPanelAppMenu::insertMenu(const TQPixmap &icon, const TQString &text, int id )
{
if ( id < 0 )
id = panelmenu_get_seq_id();
DCOPClient *client = kapp->dcopClient();
- QByteArray sendData, replyData;
- QCString replyType;
- QDataStream stream(sendData, IO_WriteOnly);
+ TQByteArray sendData, replyData;
+ TQCString replyType;
+ TQDataStream stream(sendData, IO_WriteOnly);
stream << icon << text << id;
- client->call("kicker", realObjId, "insertMenu(QPixmap,QString,int)", sendData, replyType, replyData );
- if ( replyType != "QCString")
+ client->call("kicker", realObjId, "insertMenu(TQPixmap,TQString,int)", sendData, replyType, replyData );
+ if ( replyType != "TQCString")
return 0;
- QDataStream ret(replyData, IO_ReadOnly);
- QCString subid;
+ TQDataStream ret(replyData, IO_ReadOnly);
+ TQCString subid;
ret >> subid;
- QByteArray sendData2;
- QDataStream stream2(sendData2, IO_WriteOnly);
- stream2 << QCString("activated(int)") << client->appId() << subid;
- client->send("kicker", subid, "connectDCOPSignal(QCString,QCString,QCString)", sendData2);
+ TQByteArray sendData2;
+ TQDataStream stream2(sendData2, IO_WriteOnly);
+ stream2 << TQCString("activated(int)") << client->appId() << subid;
+ client->send("kicker", subid, "connectDCOPSignal(TQCString,TQCString,TQCString)", sendData2);
return new KPanelAppMenu(this, subid);
}
-int KPanelAppMenu::insertItem(const QString &text, int id )
+int KPanelAppMenu::insertItem(const TQString &text, int id )
{
if ( id < 0 )
id = panelmenu_get_seq_id();
DCOPClient *client = kapp->dcopClient();
- QByteArray sendData;
- QDataStream stream(sendData, IO_WriteOnly);
+ TQByteArray sendData;
+ TQDataStream stream(sendData, IO_WriteOnly);
stream << text << id;
- client->send("kicker", realObjId, "insertItem(QString,int)", sendData );
+ client->send("kicker", realObjId, "insertItem(TQString,int)", sendData );
return id;
}
@@ -147,16 +147,16 @@ int KPanelAppMenu::insertItem(const QString &text, int id )
void KPanelAppMenu::clear()
{
DCOPClient *client = kapp->dcopClient();
- QByteArray sendData;
+ TQByteArray sendData;
client->send("kicker", realObjId, "clear()", sendData);
}
-bool KPanelAppMenu::process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &)
+bool KPanelAppMenu::process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &)
{
if ( fun == "activated(int)" ) {
- QDataStream dataStream( data, IO_ReadOnly );
+ TQDataStream dataStream( data, IO_ReadOnly );
int id;
dataStream >> id;
emit activated( id );
diff --git a/kdeui/kpanelappmenu.h b/kdeui/kpanelappmenu.h
index 2cb9adc1f..8df6c613b 100644
--- a/kdeui/kpanelappmenu.h
+++ b/kdeui/kpanelappmenu.h
@@ -34,23 +34,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* @author Daniel M. Duley <mosfet@kde.org>
*/
-class KDEUI_EXPORT KPanelAppMenu : public QObject, public DCOPObject
+class KDEUI_EXPORT KPanelAppMenu : public TQObject, public DCOPObject
{
Q_OBJECT
public:
/**
* Constructs a new menu with the given title.
*/
- KPanelAppMenu(const QString &title, QObject *parent = 0, const char *name = 0 );
+ KPanelAppMenu(const TQString &title, TQObject *parent = 0, const char *name = 0 );
/**
* Same as above, but with an icon for the submenu item.
*/
- KPanelAppMenu(const QPixmap &icon, const QString &title, QObject *parent,
+ KPanelAppMenu(const TQPixmap &icon, const TQString &title, TQObject *parent,
const char *name);
/**
* Constructs a new (sub)menu with a given id.
*/
- KPanelAppMenu(QObject *parent, const char *name);
+ KPanelAppMenu(TQObject *parent, const char *name);
/**
* Make sure you actually destroy this thing or the menu will never go
@@ -61,15 +61,15 @@ public:
/**
* Inserts an item into the menu.
*/
- int insertItem(const QString &text, int id = -1);
+ int insertItem(const TQString &text, int id = -1);
/**
* Inserts an item with a icon. The icon name must be a full path.
*/
- int insertItem(const QPixmap &icon, const QString &text, int id = -1 );
+ int insertItem(const TQPixmap &icon, const TQString &text, int id = -1 );
/**
* Inserts a sub menu with a icon. The icon name must be a full path.
*/
- KPanelAppMenu *insertMenu(const QPixmap &icon, const QString &text, int id=-1);
+ KPanelAppMenu *insertMenu(const TQPixmap &icon, const TQString &text, int id=-1);
/**
* Clears the menu.
@@ -79,8 +79,8 @@ public:
/**
* @internal
*/
- bool process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData);
+ bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData);
signals:
/**
@@ -89,10 +89,10 @@ signals:
void activated(int id);
protected:
- void init(const QPixmap &icon, const QString &title);
+ void init(const TQPixmap &icon, const TQString &title);
private:
- QCString realObjId;
+ TQCString realObjId;
};
diff --git a/kdeui/kpanelextension.cpp b/kdeui/kpanelextension.cpp
index 190540f70..bcb50cc57 100644
--- a/kdeui/kpanelextension.cpp
+++ b/kdeui/kpanelextension.cpp
@@ -21,7 +21,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kconfig.h>
@@ -39,14 +39,14 @@ public:
{}
KPanelExtension::Size _size;
- QPopupMenu* _customMenu;
+ TQPopupMenu* _customMenu;
int _customSize;
bool _reserveStrut;
};
-KPanelExtension::KPanelExtension(const QString& configFile, Type type,
- int actions, QWidget *parent, const char *name)
- : QFrame(parent, name)
+KPanelExtension::KPanelExtension(const TQString& configFile, Type type,
+ int actions, TQWidget *parent, const char *name)
+ : TQFrame(parent, name)
, _type(type)
, _position( Top )
, _alignment( LeftTop )
@@ -138,12 +138,12 @@ int KPanelExtension::sizeInPixels() const
return d->_customSize;
}
-QPopupMenu* KPanelExtension::customMenu() const
+TQPopupMenu* KPanelExtension::customMenu() const
{
return d->_customMenu;
}
-void KPanelExtension::setCustomMenu(QPopupMenu* menu)
+void KPanelExtension::setCustomMenu(TQPopupMenu* menu)
{
d->_customMenu = menu;
}
diff --git a/kdeui/kpanelextension.h b/kdeui/kpanelextension.h
index 59a9e0aef..2e33f4408 100644
--- a/kdeui/kpanelextension.h
+++ b/kdeui/kpanelextension.h
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __kpanelextension_h__
#define __kpanelextension_h__
-#include <qframe.h>
+#include <tqframe.h>
#include <kdelibs_export.h>
class QPopupMenu;
@@ -78,7 +78,7 @@ class KPanelExtensionPrivate;
*
* extern "C"
* {
- * KPanelExtension* init(QWidget *parent, const QString& configFile)
+ * KPanelExtension* init(TQWidget *parent, const TQString& configFile)
* {
* KGlobal::locale()->insertCatalogue("exampleextension");
* return new ExampleExtension(configFile, KPanelExtension::Normal,
@@ -119,8 +119,8 @@ public:
* @param parent The pointer to the parent widget handed over in the factory function.
* @param name A Qt object name for your extension.
**/
- KPanelExtension(const QString& configFile, Type t = Normal,
- int actions = 0, QWidget *parent = 0, const char *name = 0);
+ KPanelExtension(const TQString& configFile, Type t = Normal,
+ int actions = 0, TQWidget *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -136,7 +136,7 @@ public:
* location in the Window Manager Dock. Please note that the size can not be larger than the
* maxsize given by the handler.
**/
- virtual QSize sizeHint(Position /*p*/, QSize maxsize) const { return maxsize; }
+ virtual TQSize sizeHint(Position /*p*/, TQSize maxsize) const { return maxsize; }
/**
* Always use this KConfig object to save/load your extensions configuration.
@@ -210,10 +210,10 @@ public:
/**
* @return the extension's custom menu, usually the same as the context menu, or 0 if none
- * @see setCustomMenu(QPopupMenu*)
+ * @see setCustomMenu(TQPopupMenu*)
* @since 3.4
*/
- QPopupMenu* customMenu() const;
+ TQPopupMenu* customMenu() const;
/**
* @return whether or not to set a desktop geometry claiming strut for this panel
@@ -321,7 +321,7 @@ protected:
* with the new menu (or 0) to avoid crashes
* @since 3.4
*/
- void setCustomMenu(QPopupMenu*);
+ void setCustomMenu(TQPopupMenu*);
/**
* Use this method to set the return value for reserveStrut
diff --git a/kdeui/kpanelmenu.cpp b/kdeui/kpanelmenu.cpp
index ab1ed3d35..c1431a22e 100644
--- a/kdeui/kpanelmenu.cpp
+++ b/kdeui/kpanelmenu.cpp
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <kglobal.h>
#include <kconfig.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "kpanelmenu.h"
#include "kpanelmenu.moc"
@@ -36,31 +36,31 @@ class KPanelMenuPrivate
public:
bool init;
int clearDelay;
- QString startPath;
- QTimer t;
+ TQString startPath;
+ TQTimer t;
};
-KPanelMenu::KPanelMenu(const QString &startDir, QWidget *parent, const char *name)
+KPanelMenu::KPanelMenu(const TQString &startDir, TQWidget *parent, const char *name)
: KPopupMenu(parent, name)
{
init(startDir);
}
-KPanelMenu::KPanelMenu(QWidget *parent, const char *name)
+KPanelMenu::KPanelMenu(TQWidget *parent, const char *name)
: KPopupMenu(parent, name)
{
init();
}
-void KPanelMenu::init(const QString& path)
+void KPanelMenu::init(const TQString& path)
{
d = new KPanelMenuPrivate;
setInitialized( false );
d->startPath = path;
- connect(this, SIGNAL(activated(int)), SLOT(slotExec(int)));
- connect(this, SIGNAL(aboutToShow()), SLOT(slotAboutToShow()));
+ connect(this, TQT_SIGNAL(activated(int)), TQT_SLOT(slotExec(int)));
+ connect(this, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow()));
// setup cache timer
KConfig *config = KGlobal::config();
@@ -95,15 +95,15 @@ void KPanelMenu::slotClear()
clear();
}
-void KPanelMenu::hideEvent(QHideEvent *ev)
+void KPanelMenu::hideEvent(TQHideEvent *ev)
{
// start the cache timer
if(d->clearDelay) {
- disconnect(&(d->t), SIGNAL(timeout()), this, SLOT(slotClear()));
- connect(&(d->t), SIGNAL(timeout()), this, SLOT(slotClear()));
+ disconnect(&(d->t), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotClear()));
+ connect(&(d->t), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotClear()));
d->t.start(d->clearDelay, true);
}
- QPopupMenu::hideEvent(ev);
+ TQPopupMenu::hideEvent(ev);
}
void KPanelMenu::disableAutoClear()
@@ -111,12 +111,12 @@ void KPanelMenu::disableAutoClear()
d->clearDelay = 0;
}
-const QString& KPanelMenu::path() const
+const TQString& KPanelMenu::path() const
{
return d->startPath;
}
-void KPanelMenu::setPath(const QString& p)
+void KPanelMenu::setPath(const TQString& p)
{
d->startPath = p;
}
diff --git a/kdeui/kpanelmenu.h b/kdeui/kpanelmenu.h
index 61ec7f13b..de0b065eb 100644
--- a/kdeui/kpanelmenu.h
+++ b/kdeui/kpanelmenu.h
@@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __KPANELMENU_H__
#define __KPANELMENU_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <kpopupmenu.h>
#include <kgenericfactory.h>
@@ -59,7 +59,7 @@ public:
* Construct a KPanelMenu object. This is the normal constructor to use when
* building extrernal menu entries.
*/
- KPanelMenu(QWidget *parent=0, const char *name=0);
+ KPanelMenu(TQWidget *parent=0, const char *name=0);
/**
* Constructor used internally by Kicker. You don't really want to use it.
* @param startDir a directory to associate with this menu
@@ -67,25 +67,25 @@ public:
* @param name name of the object
* @see path(), setPath()
*/
- KPanelMenu(const QString &startDir, QWidget *parent=0, const char *name=0);
+ KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
/**
* Destructor.
*/
virtual ~KPanelMenu();
/**
- * Get the directory path associated with this menu, or QString::null if
+ * Get the directory path associated with this menu, or TQString::null if
* there's no such associated path.
* @return the associated directory path
* @see setPath()
*/
- const QString& path() const;
+ const TQString& path() const;
/**
* Set a directory path to be associated with this menu.
* @param p the directory path
* @see path()
*/
- void setPath(const QString &p);
+ void setPath(const TQString &p);
/**
* Tell if the menu has been initialized, that is it already contains items.
* This is useful when you need to know if you have to clear the menu, or to
@@ -161,11 +161,11 @@ protected:
/**
* Re-implemented for internal reasons.
*/
- virtual void hideEvent(QHideEvent *ev);
+ virtual void hideEvent(TQHideEvent *ev);
/**
* For internal use only. Used by constructors.
*/
- void init(const QString& path = QString::null);
+ void init(const TQString& path = TQString::null);
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kpassdlg.cpp b/kdeui/kpassdlg.cpp
index 6ca6cc6ea..8a2d54989 100644
--- a/kdeui/kpassdlg.cpp
+++ b/kdeui/kpassdlg.cpp
@@ -20,18 +20,18 @@
*/
#include <unistd.h>
-#include <qwidget.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qsize.h>
-#include <qevent.h>
-#include <qkeycode.h>
-#include <qcheckbox.h>
-#include <qregexp.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
-#include <qptrdict.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqsize.h>
+#include <tqevent.h>
+#include <tqkeycode.h>
+#include <tqcheckbox.h>
+#include <tqregexp.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
+#include <tqptrdict.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -55,7 +55,7 @@
// BCI: Add a real d-pointer and put the int into that
-static QPtrDict<int>* d_ptr = 0;
+static TQPtrDict<int>* d_ptr = 0;
static void cleanup_d_ptr() {
delete d_ptr;
@@ -63,7 +63,7 @@ static void cleanup_d_ptr() {
static int * ourMaxLength( const KPasswordEdit* const e ) {
if ( !d_ptr ) {
- d_ptr = new QPtrDict<int>;
+ d_ptr = new TQPtrDict<int>;
d_ptr->setAutoDelete(true);
qAddPostRoutine( cleanup_d_ptr );
}
@@ -91,8 +91,8 @@ class KPasswordDialog::KPasswordDialogPrivate
passwordStrengthWarningLevel(1), m_strengthBar(0),
reasonablePasswordLength(8)
{}
- QLabel *m_MatchLabel;
- QString iconName;
+ TQLabel *m_MatchLabel;
+ TQString iconName;
bool allowEmptyPasswords;
int minimumPasswordLength;
int maximumPasswordLength;
@@ -102,15 +102,15 @@ class KPasswordDialog::KPasswordDialogPrivate
};
-KPasswordEdit::KPasswordEdit(QWidget *parent, const char *name)
- : QLineEdit(parent, name)
+KPasswordEdit::KPasswordEdit(TQWidget *parent, const char *name)
+ : TQLineEdit(parent, name)
{
init();
KConfig* const cfg = KGlobal::config();
KConfigGroupSaver saver(cfg, "Passwords");
- const QString val = cfg->readEntry("EchoMode", "OneStar");
+ const TQString val = cfg->readEntry("EchoMode", "OneStar");
if (val == "ThreeStars")
m_EchoMode = ThreeStars;
else if (val == "NoEcho")
@@ -121,28 +121,28 @@ KPasswordEdit::KPasswordEdit(QWidget *parent, const char *name)
setInputMethodEnabled( true );
}
-KPasswordEdit::KPasswordEdit(QWidget *parent, const char *name, int echoMode)
- : QLineEdit(parent, name), m_EchoMode(echoMode)
+KPasswordEdit::KPasswordEdit(TQWidget *parent, const char *name, int echoMode)
+ : TQLineEdit(parent, name), m_EchoMode(echoMode)
{
init();
}
-KPasswordEdit::KPasswordEdit(EchoModes echoMode, QWidget *parent, const char *name)
- : QLineEdit(parent, name), m_EchoMode(echoMode)
+KPasswordEdit::KPasswordEdit(EchoModes echoMode, TQWidget *parent, const char *name)
+ : TQLineEdit(parent, name), m_EchoMode(echoMode)
{
init();
}
-KPasswordEdit::KPasswordEdit(EchoMode echoMode, QWidget *parent, const char *name)
- : QLineEdit(parent, name)
- , m_EchoMode( echoMode == QLineEdit::NoEcho ? NoEcho : OneStar )
+KPasswordEdit::KPasswordEdit(EchoMode echoMode, TQWidget *parent, const char *name)
+ : TQLineEdit(parent, name)
+ , m_EchoMode( echoMode == TQLineEdit::NoEcho ? NoEcho : OneStar )
{
init();
}
void KPasswordEdit::init()
{
- setEchoMode(QLineEdit::Password); // Just in case
+ setEchoMode(TQLineEdit::Password); // Just in case
setAcceptDrops(false);
int* t = ourMaxLength(this);
*t = (PassLen - 1); // the internal max length
@@ -158,9 +158,9 @@ KPasswordEdit::~KPasswordEdit()
delete_d(this);
}
-void KPasswordEdit::insert(const QString &txt)
+void KPasswordEdit::insert(const TQString &txt)
{
- const QCString localTxt = txt.local8Bit();
+ const TQCString localTxt = txt.local8Bit();
const unsigned int lim = localTxt.length();
const int m_MaxLength = maxPasswordLength();
for(unsigned int i=0; i < lim; ++i)
@@ -182,17 +182,17 @@ void KPasswordEdit::erase()
setText("");
}
-void KPasswordEdit::focusInEvent(QFocusEvent *e)
+void KPasswordEdit::focusInEvent(TQFocusEvent *e)
{
- const QString txt = text();
+ const TQString txt = text();
setUpdatesEnabled(false);
- QLineEdit::focusInEvent(e);
+ TQLineEdit::focusInEvent(e);
setUpdatesEnabled(true);
setText(txt);
}
-void KPasswordEdit::keyPressEvent(QKeyEvent *e)
+void KPasswordEdit::keyPressEvent(TQKeyEvent *e)
{
switch (e->key()) {
case Key_Return:
@@ -220,28 +220,28 @@ void KPasswordEdit::keyPressEvent(QKeyEvent *e)
}
}
-bool KPasswordEdit::event(QEvent *e) {
+bool KPasswordEdit::event(TQEvent *e) {
switch(e->type()) {
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseMove:
- case QEvent::IMStart:
- case QEvent::IMCompose:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::MouseMove:
+ case TQEvent::IMStart:
+ case TQEvent::IMCompose:
return true; //Ignore
- case QEvent::IMEnd:
+ case TQEvent::IMEnd:
{
- QIMEvent* const ie = (QIMEvent*) e;
+ TQIMEvent* const ie = (TQIMEvent*) e;
if (!ie->text().isEmpty())
insert( ie->text() );
return true;
}
- case QEvent::AccelOverride:
+ case TQEvent::AccelOverride:
{
- QKeyEvent* const k = (QKeyEvent*) e;
+ TQKeyEvent* const k = (TQKeyEvent*) e;
switch (k->key()) {
case Key_U:
if (k->state() & ControlButton) {
@@ -257,12 +257,12 @@ bool KPasswordEdit::event(QEvent *e) {
// Do nothing
break;
}
- return QLineEdit::event(e);
+ return TQLineEdit::event(e);
}
void KPasswordEdit::showPass()
{
- QString tmp;
+ TQString tmp;
switch (m_EchoMode) {
case OneStar:
@@ -274,7 +274,7 @@ void KPasswordEdit::showPass()
setText(tmp);
break;
case NoEcho: default:
- emit textChanged(QString::null); //To update the password comparison if need be.
+ emit textChanged(TQString::null); //To update the password comparison if need be.
break;
}
}
@@ -301,7 +301,7 @@ int KPasswordEdit::maxPasswordLength() const
*/
KPasswordDialog::KPasswordDialog(Types type, bool enableKeep, int extraBttn,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, "", Ok|Cancel|extraBttn,
Ok, true), m_Keep(enableKeep? 1 : 0), m_Type(type), d(new KPasswordDialogPrivate)
{
@@ -309,8 +309,8 @@ KPasswordDialog::KPasswordDialog(Types type, bool enableKeep, int extraBttn,
init();
}
-KPasswordDialog::KPasswordDialog(Types type, bool enableKeep, int extraBttn, const QString& icon,
- QWidget *parent, const char *name )
+KPasswordDialog::KPasswordDialog(Types type, bool enableKeep, int extraBttn, const TQString& icon,
+ TQWidget *parent, const char *name )
: KDialogBase(parent, name, true, "", Ok|Cancel|extraBttn,
Ok, true), m_Keep(enableKeep? 1 : 0), m_Type(type), d(new KPasswordDialogPrivate)
{
@@ -321,7 +321,7 @@ KPasswordDialog::KPasswordDialog(Types type, bool enableKeep, int extraBttn, con
init();
}
-KPasswordDialog::KPasswordDialog(int type, QString prompt, bool enableKeep,
+KPasswordDialog::KPasswordDialog(int type, TQString prompt, bool enableKeep,
int extraBttn)
: KDialogBase(0L, "Password Dialog", true, "", Ok|Cancel|extraBttn,
Ok, true), m_Keep(enableKeep? 1 : 0), m_Type(type), d(new KPasswordDialogPrivate)
@@ -340,23 +340,23 @@ void KPasswordDialog::init()
if (m_Keep && cfg->readBoolEntry("Keep", false))
++m_Keep;
- m_pMain = new QWidget(this);
+ m_pMain = new TQWidget(this);
setMainWidget(m_pMain);
- m_pGrid = new QGridLayout(m_pMain, 10, 3, 0, 0);
+ m_pGrid = new TQGridLayout(m_pMain, 10, 3, 0, 0);
m_pGrid->addColSpacing(1, 10);
// Row 1: pixmap + prompt
- QLabel *lbl;
- const QPixmap pix( KGlobal::iconLoader()->loadIcon( d->iconName, KIcon::NoGroup, KIcon::SizeHuge, 0, 0, true));
+ TQLabel *lbl;
+ const TQPixmap pix( KGlobal::iconLoader()->loadIcon( d->iconName, KIcon::NoGroup, KIcon::SizeHuge, 0, 0, true));
if (!pix.isNull()) {
- lbl = new QLabel(m_pMain);
+ lbl = new TQLabel(m_pMain);
lbl->setPixmap(pix);
lbl->setAlignment(AlignHCenter|AlignVCenter);
lbl->setFixedSize(lbl->sizeHint());
m_pGrid->addWidget(lbl, 0, 0, AlignCenter);
}
- m_pHelpLbl = new QLabel(m_pMain);
+ m_pHelpLbl = new TQLabel(m_pMain);
m_pHelpLbl->setAlignment(AlignLeft|AlignVCenter|WordBreak);
m_pGrid->addWidget(m_pHelpLbl, 0, 2, AlignLeft);
m_pGrid->addRowSpacing(1, 10);
@@ -367,18 +367,18 @@ void KPasswordDialog::init()
m_pGrid->setRowStretch(6, 12);
// Row 3: Password editor #1
- lbl = new QLabel(m_pMain);
+ lbl = new TQLabel(m_pMain);
lbl->setAlignment(AlignLeft|AlignVCenter);
lbl->setText(i18n("&Password:"));
lbl->setFixedSize(lbl->sizeHint());
m_pGrid->addWidget(lbl, 7, 0, AlignLeft);
- QHBoxLayout *h_lay = new QHBoxLayout();
+ TQHBoxLayout *h_lay = new TQHBoxLayout();
m_pGrid->addLayout(h_lay, 7, 2);
m_pEdit = new KPasswordEdit(m_pMain);
m_pEdit2 = 0;
lbl->setBuddy(m_pEdit);
- QSize size = m_pEdit->sizeHint();
+ TQSize size = m_pEdit->sizeHint();
m_pEdit->setFixedHeight(size.height());
m_pEdit->setMinimumWidth(size.width());
h_lay->addWidget(m_pEdit);
@@ -388,23 +388,23 @@ void KPasswordDialog::init()
if ((m_Type == Password) && m_Keep) {
m_pGrid->addRowSpacing(8, 10);
m_pGrid->setRowStretch(8, 12);
- QCheckBox* const cb = new QCheckBox(i18n("&Keep password"), m_pMain);
+ TQCheckBox* const cb = new TQCheckBox(i18n("&Keep password"), m_pMain);
cb->setFixedSize(cb->sizeHint());
if (m_Keep > 1)
cb->setChecked(true);
else
m_Keep = 0;
- connect(cb, SIGNAL(toggled(bool)), SLOT(slotKeep(bool)));
+ connect(cb, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotKeep(bool)));
m_pGrid->addWidget(cb, 9, 2, AlignLeft|AlignVCenter);
} else if (m_Type == NewPassword) {
m_pGrid->addRowSpacing(8, 10);
- lbl = new QLabel(m_pMain);
+ lbl = new TQLabel(m_pMain);
lbl->setAlignment(AlignLeft|AlignVCenter);
lbl->setText(i18n("&Verify:"));
lbl->setFixedSize(lbl->sizeHint());
m_pGrid->addWidget(lbl, 9, 0, AlignLeft);
- h_lay = new QHBoxLayout();
+ h_lay = new TQHBoxLayout();
m_pGrid->addLayout(h_lay, 9, 2);
m_pEdit2 = new KPasswordEdit(m_pMain);
lbl->setBuddy(m_pEdit2);
@@ -417,36 +417,36 @@ void KPasswordDialog::init()
m_pGrid->addRowSpacing(10, 10);
m_pGrid->setRowStretch(10, 12);
- QHBox* const strengthBox = new QHBox(m_pMain);
+ TQHBox* const strengthBox = new TQHBox(m_pMain);
strengthBox->setSpacing(10);
m_pGrid->addMultiCellWidget(strengthBox, 11, 11, 0, 2);
- QLabel* const passStrengthLabel = new QLabel(strengthBox);
+ TQLabel* const passStrengthLabel = new TQLabel(strengthBox);
passStrengthLabel->setAlignment(AlignLeft|AlignVCenter);
passStrengthLabel->setText(i18n("Password strength meter:"));
d->m_strengthBar = new KProgress(100, strengthBox, "PasswordStrengthMeter");
d->m_strengthBar->setPercentageVisible(false);
- const QString strengthBarWhatsThis(i18n("The password strength meter gives an indication of the security "
+ const TQString strengthBarWhatsThis(i18n("The password strength meter gives an indication of the security "
"of the password you have entered. To improve the strength of "
"the password, try:\n"
" - using a longer password;\n"
" - using a mixture of upper- and lower-case letters;\n"
" - using numbers or symbols, such as #, as well as letters."));
- QWhatsThis::add(passStrengthLabel, strengthBarWhatsThis);
- QWhatsThis::add(d->m_strengthBar, strengthBarWhatsThis);
+ TQWhatsThis::add(passStrengthLabel, strengthBarWhatsThis);
+ TQWhatsThis::add(d->m_strengthBar, strengthBarWhatsThis);
// Row 6: Label saying whether the passwords match
m_pGrid->addRowSpacing(12, 10);
m_pGrid->setRowStretch(12, 12);
- d->m_MatchLabel = new QLabel(m_pMain);
+ d->m_MatchLabel = new TQLabel(m_pMain);
d->m_MatchLabel->setAlignment(AlignLeft|AlignVCenter|WordBreak);
m_pGrid->addMultiCellWidget(d->m_MatchLabel, 13, 13, 0, 2);
d->m_MatchLabel->setText(i18n("Passwords do not match"));
- connect( m_pEdit, SIGNAL(textChanged(const QString&)), SLOT(enableOkBtn()) );
- connect( m_pEdit2, SIGNAL(textChanged(const QString&)), SLOT(enableOkBtn()) );
+ connect( m_pEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(enableOkBtn()) );
+ connect( m_pEdit2, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(enableOkBtn()) );
enableOkBtn();
}
@@ -465,33 +465,33 @@ void KPasswordDialog::clearPassword()
m_pEdit->erase();
}
-/* KDE 4: Make it const QString & */
-void KPasswordDialog::setPrompt(QString prompt)
+/* KDE 4: Make it const TQString & */
+void KPasswordDialog::setPrompt(TQString prompt)
{
m_pHelpLbl->setText(prompt);
m_pHelpLbl->setFixedSize(275, m_pHelpLbl->heightForWidth(275));
}
-QString KPasswordDialog::prompt() const
+TQString KPasswordDialog::prompt() const
{
return m_pHelpLbl->text();
}
-/* KDE 4: Make them const QString & */
-void KPasswordDialog::addLine(QString key, QString value)
+/* KDE 4: Make them const TQString & */
+void KPasswordDialog::addLine(TQString key, TQString value)
{
if (m_Row > 3)
return;
- QLabel *lbl = new QLabel(key, m_pMain);
+ TQLabel *lbl = new TQLabel(key, m_pMain);
lbl->setAlignment(AlignLeft|AlignTop);
lbl->setFixedSize(lbl->sizeHint());
m_pGrid->addWidget(lbl, m_Row+2, 0, AlignLeft);
- lbl = new QLabel(value, m_pMain);
+ lbl = new TQLabel(value, m_pMain);
lbl->setAlignment(AlignTop|WordBreak);
lbl->setFixedSize(275, lbl->heightForWidth(275));
m_pGrid->addWidget(lbl, m_Row+2, 2, AlignLeft);
@@ -551,8 +551,8 @@ void KPasswordDialog::slotKeep(bool keep)
}
-// static . antlarr: KDE 4: Make it const QString & prompt
-int KPasswordDialog::getPassword(QCString &password, QString prompt,
+// static . antlarr: KDE 4: Make it const TQString & prompt
+int KPasswordDialog::getPassword(TQCString &password, TQString prompt,
int *keep)
{
const bool enableKeep = (keep && *keep);
@@ -568,8 +568,8 @@ int KPasswordDialog::getPassword(QCString &password, QString prompt,
}
-// static . antlarr: KDE 4: Make it const QString & prompt
-int KPasswordDialog::getNewPassword(QCString &password, QString prompt)
+// static . antlarr: KDE 4: Make it const TQString & prompt
+int KPasswordDialog::getNewPassword(TQCString &password, TQString prompt)
{
KPasswordDialog* const dlg = new KPasswordDialog(NewPassword, prompt);
const int ret = dlg->exec();
@@ -597,7 +597,7 @@ void KPasswordDialog::enableOkBtn()
const bool match = strcmp(m_pEdit->password(), m_pEdit2->password()) == 0
&& (d->allowEmptyPasswords || m_pEdit->password()[0]);
- const QString pass(m_pEdit->password());
+ const TQString pass(m_pEdit->password());
const int minPasswordLength = minimumPasswordLength();
@@ -630,15 +630,15 @@ void KPasswordDialog::enableOkBtn()
int pwlength = (int) (pass.length() / lengthFactor);
if (pwlength > 5) pwlength = 5;
- const QRegExp numRxp("[0-9]", true, false);
+ const TQRegExp numRxp("[0-9]", true, false);
int numeric = (int) (pass.contains(numRxp) / lengthFactor);
if (numeric > 3) numeric = 3;
- const QRegExp symbRxp("\\W", false, false);
+ const TQRegExp symbRxp("\\W", false, false);
int numsymbols = (int) (pass.contains(symbRxp) / lengthFactor);
if (numsymbols > 3) numsymbols = 3;
- const QRegExp upperRxp("[A-Z]", true, false);
+ const TQRegExp upperRxp("[A-Z]", true, false);
int upper = (int) (pass.contains(upperRxp) / lengthFactor);
if (upper > 3) upper = 3;
diff --git a/kdeui/kpassdlg.h b/kdeui/kpassdlg.h
index b3bc80677..c1dc65757 100644
--- a/kdeui/kpassdlg.h
+++ b/kdeui/kpassdlg.h
@@ -21,8 +21,8 @@
#ifndef __KPassDlg_h_included__
#define __KPassDlg_h_included__
-#include <qstring.h>
-#include <qlineedit.h>
+#include <tqstring.h>
+#include <tqlineedit.h>
#include <kdialogbase.h>
class QLabel;
@@ -47,28 +47,28 @@ public:
/**
* Constructs a password input widget using the user's global "echo mode" setting.
*/
- KPasswordEdit(QWidget *parent=0, const char *name=0);
+ KPasswordEdit(TQWidget *parent=0, const char *name=0);
// KDE4: either of the two must go! add default values for parameters
/**
* Constructs a password input widget using echoMode as "echo mode".
- * Note that echoMode is a QLineEdit::EchoMode.
+ * Note that echoMode is a TQLineEdit::EchoMode.
* @since 3.0
*/
- KPasswordEdit(EchoMode echoMode, QWidget *parent, const char *name);
+ KPasswordEdit(EchoMode echoMode, TQWidget *parent, const char *name);
/**
* Constructs a password input widget using echoMode as "echo mode".
* Note that echoMode is a KPasswordEdit::EchoModes.
* @since 3.2
*/
- KPasswordEdit(EchoModes echoMode, QWidget *parent, const char *name);
+ KPasswordEdit(EchoModes echoMode, TQWidget *parent, const char *name);
/**
* @deprecated, will be removed in KDE 4.0
* Creates a password input widget using echoMode as "echo mode".
*/
- KPasswordEdit(QWidget *parent, const char *name, int echoMode) KDE_DEPRECATED;
+ KPasswordEdit(TQWidget *parent, const char *name, int echoMode) KDE_DEPRECATED;
/**
* Destructs the widget.
@@ -109,12 +109,12 @@ public slots:
/**
* Reimplementation
*/
- virtual void insert( const QString &);
+ virtual void insert( const TQString &);
protected:
- virtual void keyPressEvent(QKeyEvent *);
- virtual void focusInEvent(QFocusEvent *e);
- virtual bool event(QEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *);
+ virtual void focusInEvent(TQFocusEvent *e);
+ virtual bool event(TQEvent *e);
private:
void init();
@@ -135,7 +135,7 @@ private:
* <b>Usage example</b>\n
*
* \code
- * QCString password;
+ * TQCString password;
* int result = KPasswordDialog::getPassword(password, i18n("Prompt message"));
* if (result == KPasswordDialog::Accepted)
* use(password);
@@ -154,9 +154,9 @@ private:
*
* @li You should delete passwords as soon as they are not needed anymore.
* The functions getPassword() and getNewPassword() return the
- * password as a QCString. I believe this is safer than a QString. A QString
+ * password as a TQCString. I believe this is safer than a TQString. A QString
* stores its characters internally as 16-bit wide values, so conversions are
- * needed, both for creating the QString and by using it. The temporary
+ * needed, both for creating the TQString and by using it. The temporary
* memory used for these conversion is probably not erased. This could lead
* to stray passwords in memory, even if you think you erased all of them.
*
@@ -201,13 +201,13 @@ public:
* @since 3.0
*/
KPasswordDialog(Types type, bool enableKeep, int extraBttn,
- QWidget *parent=0, const char *name=0);
+ TQWidget *parent=0, const char *name=0);
/**
* @deprecated Variant of the previous constructor without the
* possibility to specify a parent. Will be removed in KDE 4.0
*/
- KPasswordDialog(int type, QString prompt, bool enableKeep=false,
+ KPasswordDialog(int type, TQString prompt, bool enableKeep=false,
int extraBttn=0) KDE_DEPRECATED;
// note that this implicitly deprecates the 'prompt' variants of
// getPassword() below. i guess the above constructor needs to be extended.
@@ -227,8 +227,8 @@ public:
* @param name Passed to lower level constructor
* @since 3.3
*/
- KPasswordDialog(Types type, bool enableKeep, int extraBttn, const QString& iconName,
- QWidget *parent = 0, const char *name = 0);
+ KPasswordDialog(Types type, bool enableKeep, int extraBttn, const TQString& iconName,
+ TQWidget *parent = 0, const char *name = 0);
/**
* Destructs the password dialog.
@@ -238,17 +238,17 @@ public:
/**
* Sets the password prompt.
*/
- void setPrompt(QString prompt);
+ void setPrompt(TQString prompt);
/**
* Returns the password prompt.
*/
- QString prompt() const;
+ TQString prompt() const;
/**
* Adds a line of information to the dialog.
*/
- void addLine(QString key, QString value);
+ void addLine(TQString key, TQString value);
/**
* Allow empty passwords? - Default: false
@@ -357,7 +357,7 @@ public:
* is shown and the result is stored in *keep.
* @return Result code: Accepted or Rejected.
*/
- static int getPassword(QCString &password, QString prompt, int *keep=0L);
+ static int getPassword(TQCString &password, TQString prompt, int *keep=0L);
/**
* Pops up the dialog, asks the user for a password and returns it. The
@@ -369,7 +369,7 @@ public:
* information. The text is word broken to fit nicely in the dialog.
* @return Result code: Accepted or Rejected.
*/
- static int getNewPassword(QCString &password, QString prompt);
+ static int getNewPassword(TQCString &password, TQString prompt);
/**
* Static helper function that disables core dumps.
@@ -398,9 +398,9 @@ private:
void erase();
int m_Keep, m_Type, m_Row;
- QLabel *m_pHelpLbl;
- QGridLayout *m_pGrid;
- QWidget *m_pMain;
+ TQLabel *m_pHelpLbl;
+ TQGridLayout *m_pGrid;
+ TQWidget *m_pMain;
KPasswordEdit *m_pEdit, *m_pEdit2;
protected:
diff --git a/kdeui/kpassivepopup.cpp b/kdeui/kpassivepopup.cpp
index 9da71013b..4b870c794 100644
--- a/kdeui/kpassivepopup.cpp
+++ b/kdeui/kpassivepopup.cpp
@@ -8,15 +8,15 @@
#include <kconfig.h>
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qvbox.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qbitmap.h>
-#include <qpointarray.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqbitmap.h>
+#include <tqpointarray.h>
#include <kdebug.h>
#include <kdialog.h>
@@ -36,9 +36,9 @@ class KPassivePopup::Private
{
public:
int popupStyle;
- QPointArray surround;
- QPoint anchor;
- QPoint fixedPosition;
+ TQPointArray surround;
+ TQPoint anchor;
+ TQPoint fixedPosition;
};
static const int DEFAULT_POPUP_TYPE = KPassivePopup::Boxed;
@@ -46,37 +46,37 @@ static const int DEFAULT_POPUP_TIME = 6*1000;
static const int POPUP_FLAGS = Qt::WStyle_Customize | Qt::WDestructiveClose | Qt::WX11BypassWM
| Qt::WStyle_StaysOnTop | Qt::WStyle_Tool | Qt::WStyle_NoBorder;
-KPassivePopup::KPassivePopup( QWidget *parent, const char *name, WFlags f )
- : QFrame( 0, name, f ? f : POPUP_FLAGS ),
+KPassivePopup::KPassivePopup( TQWidget *parent, const char *name, WFlags f )
+ : TQFrame( 0, name, f ? f : POPUP_FLAGS ),
window( parent ? parent->winId() : 0L ), msgView( 0 ), topLayout( 0 ),
- hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new QTimer( this, "hide_timer" ) ),
+ hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new TQTimer( this, "hide_timer" ) ),
m_autoDelete( false )
{
init( DEFAULT_POPUP_TYPE );
}
KPassivePopup::KPassivePopup( WId win, const char *name, WFlags f )
- : QFrame( 0, name, f ? f : POPUP_FLAGS ),
+ : TQFrame( 0, name, f ? f : POPUP_FLAGS ),
window( win ), msgView( 0 ), topLayout( 0 ),
- hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new QTimer( this, "hide_timer" ) ),
+ hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new TQTimer( this, "hide_timer" ) ),
m_autoDelete( false )
{
init( DEFAULT_POPUP_TYPE );
}
-KPassivePopup::KPassivePopup( int popupStyle, QWidget *parent, const char *name, WFlags f )
- : QFrame( 0, name, f ? f : POPUP_FLAGS ),
+KPassivePopup::KPassivePopup( int popupStyle, TQWidget *parent, const char *name, WFlags f )
+ : TQFrame( 0, name, f ? f : POPUP_FLAGS ),
window( parent ? parent->winId() : 0L ), msgView( 0 ), topLayout( 0 ),
- hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new QTimer( this, "hide_timer" ) ),
+ hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new TQTimer( this, "hide_timer" ) ),
m_autoDelete( false )
{
init( popupStyle );
}
KPassivePopup::KPassivePopup( int popupStyle, WId win, const char *name, WFlags f )
- : QFrame( 0, name, f ? f : POPUP_FLAGS ),
+ : TQFrame( 0, name, f ? f : POPUP_FLAGS ),
window( win ), msgView( 0 ), topLayout( 0 ),
- hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new QTimer( this, "hide_timer" ) ),
+ hideDelay( DEFAULT_POPUP_TIME ), hideTimer( new TQTimer( this, "hide_timer" ) ),
m_autoDelete( false )
{
init( popupStyle );
@@ -88,16 +88,16 @@ void KPassivePopup::init( int popupStyle )
d->popupStyle = popupStyle;
if( popupStyle == Boxed )
{
- setFrameStyle( QFrame::Box| QFrame::Plain );
+ setFrameStyle( TQFrame::Box| TQFrame::Plain );
setLineWidth( 2 );
}
else if( popupStyle == Balloon )
{
- setPalette(QToolTip::palette());
+ setPalette(TQToolTip::palette());
setAutoMask(TRUE);
}
- connect( hideTimer, SIGNAL( timeout() ), SLOT( hide() ) );
- connect( this, SIGNAL( clicked() ), SLOT( hide() ) );
+ connect( hideTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( hide() ) );
+ connect( this, TQT_SIGNAL( clicked() ), TQT_SLOT( hide() ) );
}
KPassivePopup::~KPassivePopup()
@@ -105,45 +105,45 @@ KPassivePopup::~KPassivePopup()
delete d;
}
-void KPassivePopup::setView( QWidget *child )
+void KPassivePopup::setView( TQWidget *child )
{
delete msgView;
msgView = child;
delete topLayout;
- topLayout = new QVBoxLayout( this, d->popupStyle == Balloon ? 22 : KDialog::marginHint(), KDialog::spacingHint() );
+ topLayout = new TQVBoxLayout( this, d->popupStyle == Balloon ? 22 : KDialog::marginHint(), KDialog::spacingHint() );
topLayout->addWidget( msgView );
topLayout->activate();
}
-void KPassivePopup::setView( const QString &caption, const QString &text,
- const QPixmap &icon )
+void KPassivePopup::setView( const TQString &caption, const TQString &text,
+ const TQPixmap &icon )
{
// kdDebug() << "KPassivePopup::setView " << caption << ", " << text << endl;
setView( standardView( caption, text, icon, this ) );
}
-QVBox * KPassivePopup::standardView( const QString& caption,
- const QString& text,
- const QPixmap& icon,
- QWidget *parent )
+TQVBox * KPassivePopup::standardView( const TQString& caption,
+ const TQString& text,
+ const TQPixmap& icon,
+ TQWidget *parent )
{
- QVBox *vb = new QVBox( parent ? parent : this );
+ TQVBox *vb = new TQVBox( parent ? parent : this );
vb->setSpacing( KDialog::spacingHint() );
- QHBox *hb=0;
+ TQHBox *hb=0;
if ( !icon.isNull() ) {
- hb = new QHBox( vb );
+ hb = new TQHBox( vb );
hb->setMargin( 0 );
hb->setSpacing( KDialog::spacingHint() );
- ttlIcon = new QLabel( hb, "title_icon" );
+ ttlIcon = new TQLabel( hb, "title_icon" );
ttlIcon->setPixmap( icon );
ttlIcon->setAlignment( AlignLeft );
}
if ( !caption.isEmpty() ) {
- ttl = new QLabel( caption, hb ? hb : vb, "title_label" );
- QFont fnt = ttl->font();
+ ttl = new TQLabel( caption, hb ? hb : vb, "title_label" );
+ TQFont fnt = ttl->font();
fnt.setBold( true );
ttl->setFont( fnt );
ttl->setAlignment( Qt::AlignHCenter );
@@ -152,16 +152,16 @@ QVBox * KPassivePopup::standardView( const QString& caption,
}
if ( !text.isEmpty() ) {
- msg = new QLabel( text, vb, "msg_label" );
+ msg = new TQLabel( text, vb, "msg_label" );
msg->setAlignment( AlignLeft );
}
return vb;
}
-void KPassivePopup::setView( const QString &caption, const QString &text )
+void KPassivePopup::setView( const TQString &caption, const TQString &text )
{
- setView( caption, text, QPixmap() );
+ setView( caption, text, TQPixmap() );
}
void KPassivePopup::setTimeout( int delay )
@@ -182,7 +182,7 @@ void KPassivePopup::setAutoDelete( bool autoDelete )
m_autoDelete = autoDelete;
}
-void KPassivePopup::mouseReleaseEvent( QMouseEvent *e )
+void KPassivePopup::mouseReleaseEvent( TQMouseEvent *e )
{
emit clicked();
emit clicked( e->pos() );
@@ -205,7 +205,7 @@ void KPassivePopup::show()
else
move( d->fixedPosition );
}
- QFrame::show();
+ TQFrame::show();
int delay = hideDelay;
if ( delay < 0 ) {
@@ -217,20 +217,20 @@ void KPassivePopup::show()
}
}
-void KPassivePopup::show(const QPoint &p)
+void KPassivePopup::show(const TQPoint &p)
{
d->fixedPosition = p;
show();
}
-void KPassivePopup::hideEvent( QHideEvent * )
+void KPassivePopup::hideEvent( TQHideEvent * )
{
hideTimer->stop();
if ( m_autoDelete )
deleteLater();
}
-QRect KPassivePopup::defaultArea() const
+TQRect KPassivePopup::defaultArea() const
{
#ifdef Q_WS_X11
NETRootInfo info( qt_xdisplay(),
@@ -240,11 +240,11 @@ QRect KPassivePopup::defaultArea() const
-1, false );
info.activate();
NETRect workArea = info.workArea( info.currentDesktop() );
- QRect r;
+ TQRect r;
r.setRect( workArea.pos.x, workArea.pos.y, 0, 0 ); // top left
#else
// FIX IT
- QRect r;
+ TQRect r;
r.setRect( 100, 100, 200, 200 ); // top left
#endif
return r;
@@ -252,7 +252,7 @@ QRect KPassivePopup::defaultArea() const
void KPassivePopup::positionSelf()
{
- QRect target;
+ TQRect target;
#ifdef Q_WS_X11
if ( !window ) {
@@ -291,15 +291,15 @@ void KPassivePopup::positionSelf()
moveNear( target );
}
-void KPassivePopup::moveNear( QRect target )
+void KPassivePopup::moveNear( TQRect target )
{
- QPoint pos = target.topLeft();
+ TQPoint pos = target.topLeft();
int x = pos.x();
int y = pos.y();
int w = width();
int h = height();
- QRect r = KGlobalSettings::desktopGeometry(QPoint(x+w/2,y+h/2));
+ TQRect r = KGlobalSettings::desktopGeometry(TQPoint(x+w/2,y+h/2));
if( d->popupStyle == Balloon )
{
@@ -332,33 +332,33 @@ void KPassivePopup::moveNear( QRect target )
x = r.left();
if( d->popupStyle == Balloon )
- setAnchor( QPoint( x, y ) );
+ setAnchor( TQPoint( x, y ) );
else
move( x, y );
}
-void KPassivePopup::setAnchor(const QPoint &anchor)
+void KPassivePopup::setAnchor(const TQPoint &anchor)
{
d->anchor = anchor;
updateMask();
}
-void KPassivePopup::paintEvent( QPaintEvent* pe )
+void KPassivePopup::paintEvent( TQPaintEvent* pe )
{
if( d->popupStyle == Balloon )
{
- QPainter p;
+ TQPainter p;
p.begin( this );
p.drawPolygon( d->surround );
} else
- QFrame::paintEvent( pe );
+ TQFrame::paintEvent( pe );
}
void KPassivePopup::updateMask()
{
// get screen-geometry for screen our anchor is on
// (geometry can differ from screen to screen!
- QRect deskRect = KGlobalSettings::desktopGeometry(d->anchor);
+ TQRect deskRect = KGlobalSettings::desktopGeometry(d->anchor);
int xh = 70, xl = 40;
if( width() < 80 )
@@ -369,21 +369,21 @@ void KPassivePopup::updateMask()
bool bottom = (d->anchor.y() + height()) > ((deskRect.y() + deskRect.height()-48));
bool right = (d->anchor.x() + width()) > ((deskRect.x() + deskRect.width()-48));
- QPoint corners[4] = {
- QPoint( width() - 50, 10 ),
- QPoint( 10, 10 ),
- QPoint( 10, height() - 50 ),
- QPoint( width() - 50, height() - 50 )
+ TQPoint corners[4] = {
+ TQPoint( width() - 50, 10 ),
+ TQPoint( 10, 10 ),
+ TQPoint( 10, height() - 50 ),
+ TQPoint( width() - 50, height() - 50 )
};
- QBitmap mask( width(), height(), true );
- QPainter p( &mask );
- QBrush brush( Qt::white, Qt::SolidPattern );
+ TQBitmap mask( width(), height(), true );
+ TQPainter p( &mask );
+ TQBrush brush( Qt::white, Qt::SolidPattern );
p.setBrush( brush );
int i = 0, z = 0;
for (; i < 4; ++i) {
- QPointArray corner;
+ TQPointArray corner;
corner.makeArc(corners[i].x(), corners[i].y(), 40, 40, i * 16 * 90, 16 * 90);
d->surround.resize( z + corner.count() );
@@ -394,26 +394,26 @@ void KPassivePopup::updateMask()
if (bottom && i == 2) {
if (right) {
d->surround.resize( z + 3 );
- d->surround.setPoint( z++, QPoint( width() - xh, height() - 11 ) );
- d->surround.setPoint( z++, QPoint( width() - 20, height() ) );
- d->surround.setPoint( z++, QPoint( width() - xl, height() - 11 ) );
+ d->surround.setPoint( z++, TQPoint( width() - xh, height() - 11 ) );
+ d->surround.setPoint( z++, TQPoint( width() - 20, height() ) );
+ d->surround.setPoint( z++, TQPoint( width() - xl, height() - 11 ) );
} else {
d->surround.resize( z + 3 );
- d->surround.setPoint( z++, QPoint( xl, height() - 11 ) );
- d->surround.setPoint( z++, QPoint( 20, height() ) );
- d->surround.setPoint( z++, QPoint( xh, height() - 11 ) );
+ d->surround.setPoint( z++, TQPoint( xl, height() - 11 ) );
+ d->surround.setPoint( z++, TQPoint( 20, height() ) );
+ d->surround.setPoint( z++, TQPoint( xh, height() - 11 ) );
}
} else if (!bottom && i == 0) {
if (right) {
d->surround.resize( z + 3 );
- d->surround.setPoint( z++, QPoint( width() - xl, 10 ) );
- d->surround.setPoint( z++, QPoint( width() - 20, 0 ) );
- d->surround.setPoint( z++, QPoint( width() - xh, 10 ) );
+ d->surround.setPoint( z++, TQPoint( width() - xl, 10 ) );
+ d->surround.setPoint( z++, TQPoint( width() - 20, 0 ) );
+ d->surround.setPoint( z++, TQPoint( width() - xh, 10 ) );
} else {
d->surround.resize( z + 3 );
- d->surround.setPoint( z++, QPoint( xh, 10 ) );
- d->surround.setPoint( z++, QPoint( 20, 0 ) );
- d->surround.setPoint( z++, QPoint( xl, 10 ) );
+ d->surround.setPoint( z++, TQPoint( xh, 10 ) );
+ d->surround.setPoint( z++, TQPoint( 20, 0 ) );
+ d->surround.setPoint( z++, TQPoint( xl, 10 ) );
}
}
}
@@ -433,33 +433,33 @@ void KPassivePopup::updateMask()
// Convenience Methods
//
-KPassivePopup *KPassivePopup::message( const QString &caption, const QString &text,
- const QPixmap &icon,
- QWidget *parent, const char *name, int timeout )
+KPassivePopup *KPassivePopup::message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
+ TQWidget *parent, const char *name, int timeout )
{
return message( DEFAULT_POPUP_TYPE, caption, text, icon, parent, name, timeout );
}
-KPassivePopup *KPassivePopup::message( const QString &text, QWidget *parent, const char *name )
+KPassivePopup *KPassivePopup::message( const TQString &text, TQWidget *parent, const char *name )
{
- return message( DEFAULT_POPUP_TYPE, QString::null, text, QPixmap(), parent, name );
+ return message( DEFAULT_POPUP_TYPE, TQString::null, text, TQPixmap(), parent, name );
}
-KPassivePopup *KPassivePopup::message( const QString &caption, const QString &text,
- QWidget *parent, const char *name )
+KPassivePopup *KPassivePopup::message( const TQString &caption, const TQString &text,
+ TQWidget *parent, const char *name )
{
- return message( DEFAULT_POPUP_TYPE, caption, text, QPixmap(), parent, name );
+ return message( DEFAULT_POPUP_TYPE, caption, text, TQPixmap(), parent, name );
}
-KPassivePopup *KPassivePopup::message( const QString &caption, const QString &text,
- const QPixmap &icon, WId parent, const char *name, int timeout )
+KPassivePopup *KPassivePopup::message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon, WId parent, const char *name, int timeout )
{
return message( DEFAULT_POPUP_TYPE, caption, text, icon, parent, name, timeout );
}
-KPassivePopup *KPassivePopup::message( int popupStyle, const QString &caption, const QString &text,
- const QPixmap &icon,
- QWidget *parent, const char *name, int timeout )
+KPassivePopup *KPassivePopup::message( int popupStyle, const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
+ TQWidget *parent, const char *name, int timeout )
{
KPassivePopup *pop = new KPassivePopup( popupStyle, parent, name );
pop->setAutoDelete( true );
@@ -470,19 +470,19 @@ KPassivePopup *KPassivePopup::message( int popupStyle, const QString &caption, c
return pop;
}
-KPassivePopup *KPassivePopup::message( int popupStyle, const QString &text, QWidget *parent, const char *name )
+KPassivePopup *KPassivePopup::message( int popupStyle, const TQString &text, TQWidget *parent, const char *name )
{
- return message( popupStyle, QString::null, text, QPixmap(), parent, name );
+ return message( popupStyle, TQString::null, text, TQPixmap(), parent, name );
}
-KPassivePopup *KPassivePopup::message( int popupStyle, const QString &caption, const QString &text,
- QWidget *parent, const char *name )
+KPassivePopup *KPassivePopup::message( int popupStyle, const TQString &caption, const TQString &text,
+ TQWidget *parent, const char *name )
{
- return message( popupStyle, caption, text, QPixmap(), parent, name );
+ return message( popupStyle, caption, text, TQPixmap(), parent, name );
}
-KPassivePopup *KPassivePopup::message( int popupStyle, const QString &caption, const QString &text,
- const QPixmap &icon, WId parent, const char *name, int timeout )
+KPassivePopup *KPassivePopup::message( int popupStyle, const TQString &caption, const TQString &text,
+ const TQPixmap &icon, WId parent, const char *name, int timeout )
{
KPassivePopup *pop = new KPassivePopup( popupStyle, parent, name );
pop->setAutoDelete( true );
diff --git a/kdeui/kpassivepopup.h b/kdeui/kpassivepopup.h
index 40c1e789b..7b935a5bb 100644
--- a/kdeui/kpassivepopup.h
+++ b/kdeui/kpassivepopup.h
@@ -11,7 +11,7 @@
#ifndef KPASSIVEPOPUP_H
#define KPASSIVEPOPUP_H
-#include <qframe.h>
+#include <tqframe.h>
#include <kdelibs_export.h>
@@ -31,7 +31,7 @@ class QVBox;
* @li Skip Taskbar Windows: The popup is placed adjact to the window
* itself if it is visible, and at the edge of the desktop otherwise.
*
- * You also have the option of calling show with a QPoint as a parameter that
+ * You also have the option of calling show with a TQPoint as a parameter that
* removes the automatic placing of KPassivePopup and shows it in the point you want.
*
* The most basic use of KPassivePopup displays a popup containing a piece of text:
@@ -40,21 +40,21 @@ class QVBox;
* \endcode
* We can create popups with titles and icons too, as this example shows:
* \code
- * QPixmap px;
+ * TQPixmap px;
* px.load( "hi32-app-logtracker.png" );
* KPassivePopup::message( "Some title", "This is the main text", px, this );
* \endcode
- * For more control over the popup, you can use the setView(QWidget *) method
+ * For more control over the popup, you can use the setView(TQWidget *) method
* to create a custom popup.
* \code
* KPassivePopup *pop = new KPassivePopup( parent );
*
- * QVBox *vb = new QVBox( pop );
- * (void) new QLabel( vb, "<b>Isn't this great?</b>" );
+ * TQVBox *vb = new TQVBox( pop );
+ * (void) new TQLabel( vb, "<b>Isn't this great?</b>" );
*
- * QHBox *box = new QHBox( vb );
- * (void) new QPushButton( box, "Yes" );
- * (void) new QPushButton( box, "No" );
+ * TQHBox *box = new TQHBox( vb );
+ * (void) new TQPushButton( box, "Yes" );
+ * (void) new TQPushButton( box, "No" );
*
* pop->setView( vb );
* pop->show();
@@ -86,7 +86,7 @@ public:
/**
* Creates a popup for the specified widget.
*/
- KPassivePopup( QWidget *parent=0, const char *name=0, WFlags f=0 );
+ KPassivePopup( TQWidget *parent=0, const char *name=0, WFlags f=0 );
/**
* Creates a popup for the specified window.
@@ -97,7 +97,7 @@ public:
* Creates a popup for the specified widget.
* @since 3.5
*/
- KPassivePopup( int popupStyle, QWidget *parent=0, const char *name=0, WFlags f=0 );
+ KPassivePopup( int popupStyle, TQWidget *parent=0, const char *name=0, WFlags f=0 );
/**
* Creates a popup for the specified window.
@@ -113,45 +113,45 @@ public:
/**
* Sets the main view to be the specified widget (which must be a child of the popup).
*/
- void setView( QWidget *child );
+ void setView( TQWidget *child );
/**
- * Creates a standard view then calls setView(QWidget*) .
+ * Creates a standard view then calls setView(TQWidget*) .
*/
- void setView( const QString &caption, const QString &text = QString::null );
+ void setView( const TQString &caption, const TQString &text = TQString::null );
/**
- * Creates a standard view then calls setView(QWidget*) .
+ * Creates a standard view then calls setView(TQWidget*) .
*/
- virtual void setView( const QString &caption, const QString &text, const QPixmap &icon );
+ virtual void setView( const TQString &caption, const TQString &text, const TQPixmap &icon );
/**
* Returns a widget that is used as standard view if one of the
- * setView() methods taking the QString arguments is used.
+ * setView() methods taking the TQString arguments is used.
* You can use the returned widget to customize the passivepopup while
* keeping the look similar to the "standard" passivepopups.
*
- * After customizing the widget, pass it to setView( QWidget* )
+ * After customizing the widget, pass it to setView( TQWidget* )
*
* @param caption The window caption (title) on the popup
* @param text The text for the popup
* @param icon The icon to use for the popup
- * @param parent The parent widget used for the returned QVBox. If left 0L,
+ * @param parent The parent widget used for the returned TQVBox. If left 0L,
* then "this", i.e. the passive popup object will be used.
*
- * @return a QVBox containing the given arguments, looking like the
+ * @return a TQVBox containing the given arguments, looking like the
* standard passivepopups.
- * @see setView( QWidget * )
- * @see setView( const QString&, const QString& )
- * @see setView( const QString&, const QString&, const QPixmap& )
+ * @see setView( TQWidget * )
+ * @see setView( const TQString&, const TQString& )
+ * @see setView( const TQString&, const TQString&, const TQPixmap& )
*/
- QVBox * standardView( const QString& caption, const QString& text,
- const QPixmap& icon, QWidget *parent = 0L );
+ TQVBox * standardView( const TQString& caption, const TQString& text,
+ const TQPixmap& icon, TQWidget *parent = 0L );
/**
* Returns the main view.
*/
- QWidget *view() const { return msgView; }
+ TQWidget *view() const { return msgView; }
/**
* Returns the delay before the popup is removed automatically.
@@ -177,10 +177,10 @@ public:
* itself somehow around the point.
* @since 3.5
*/
- void setAnchor( const QPoint& anchor );
+ void setAnchor( const TQPoint& anchor );
- // TODO KDE4: give all the statics method a const QPoint p = QPoint() that in
- // case the point is not null calls the show(cosnt QPoint &p) method instead
+ // TODO KDE4: give all the statics method a const TQPoint p = TQPoint() that in
+ // case the point is not null calls the show(cosnt TQPoint &p) method instead
// the show() one.
/**
* Convenience method that displays popup with the specified message beside the
@@ -188,7 +188,7 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( const QString &text, QWidget *parent, const char *name=0 );
+ static KPassivePopup *message( const TQString &text, TQWidget *parent, const char *name=0 );
/**
* Convenience method that displays popup with the specified caption and message
@@ -196,8 +196,8 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( const QString &caption, const QString &text,
- QWidget *parent, const char *name=0 );
+ static KPassivePopup *message( const TQString &caption, const TQString &text,
+ TQWidget *parent, const char *name=0 );
/**
* Convenience method that displays popup with the specified icon, caption and
@@ -205,9 +205,9 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( const QString &caption, const QString &text,
- const QPixmap &icon,
- QWidget *parent, const char *name=0, int timeout = -1 );
+ static KPassivePopup *message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
+ TQWidget *parent, const char *name=0, int timeout = -1 );
/**
* Convenience method that displays popup with the specified icon, caption and
@@ -215,8 +215,8 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( const QString &caption, const QString &text,
- const QPixmap &icon,
+ static KPassivePopup *message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
WId parent, const char *name=0, int timeout = -1 );
/**
@@ -225,7 +225,7 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( int popupStyle, const QString &text, QWidget *parent,
+ static KPassivePopup *message( int popupStyle, const TQString &text, TQWidget *parent,
const char *name=0 );
/**
@@ -234,8 +234,8 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( int popupStyle, const QString &caption, const QString &text,
- QWidget *parent, const char *name=0 );
+ static KPassivePopup *message( int popupStyle, const TQString &caption, const TQString &text,
+ TQWidget *parent, const char *name=0 );
/**
* Convenience method that displays popup with the specified popup-style, icon, caption and
@@ -243,9 +243,9 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( int popupStyle, const QString &caption, const QString &text,
- const QPixmap &icon,
- QWidget *parent, const char *name=0, int timeout = -1 );
+ static KPassivePopup *message( int popupStyle, const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
+ TQWidget *parent, const char *name=0, int timeout = -1 );
/**
* Convenience method that displays popup with the specified popup-style, icon, caption and
@@ -253,8 +253,8 @@ public:
* Note that the returned object is destroyed when it is hidden.
* @see setAutoDelete
*/
- static KPassivePopup *message( int popupStyle, const QString &caption, const QString &text,
- const QPixmap &icon,
+ static KPassivePopup *message( int popupStyle, const TQString &caption, const TQString &text,
+ const TQPixmap &icon,
WId parent, const char *name=0, int timeout = -1 );
@@ -278,7 +278,7 @@ public slots:
* Shows the popup in the given point
* @since 3.5
*/
- void show(const QPoint &p);
+ void show(const TQPoint &p);
signals:
/**
@@ -289,7 +289,7 @@ signals:
/**
* Emitted when the popup is clicked.
*/
- void clicked( QPoint pos );
+ void clicked( TQPoint pos );
protected:
/**
@@ -301,27 +301,27 @@ protected:
* Reimplemented to destroy the object when autoDelete() is
* enabled.
*/
- virtual void hideEvent( QHideEvent * );
+ virtual void hideEvent( TQHideEvent * );
/**
* Moves the popup to be adjacent to the icon of the specified rectangle.
*/
- void moveNear( QRect target );
+ void moveNear( TQRect target );
/**
* Reimplemented to detect mouse clicks.
*/
- virtual void mouseReleaseEvent( QMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
/**
* If no relative window (eg taskbar button, system tray window) is
* available, use this rectangle (pass it to moveNear()).
* Basically KWinModule::workArea() with width and height set to 0
* so that moveNear uses the upper-left position.
- * @return The QRect to be passed to moveNear() if no other is
+ * @return The TQRect to be passed to moveNear() if no other is
* available.
*/
- QRect defaultArea() const;
+ TQRect defaultArea() const;
/**
* Updates the transparency mask. Unused if PopupStyle == Boxed
@@ -333,20 +333,20 @@ protected:
* Overwrite to paint the border when PopupStyle == Balloon.
* Unused if PopupStyle == Boxed
*/
- virtual void paintEvent( QPaintEvent* pe );
+ virtual void paintEvent( TQPaintEvent* pe );
private:
void init( int popupStyle );
WId window;
- QWidget *msgView;
- QBoxLayout *topLayout;
+ TQWidget *msgView;
+ TQBoxLayout *topLayout;
int hideDelay;
- QTimer *hideTimer;
+ TQTimer *hideTimer;
- QLabel *ttlIcon;
- QLabel *ttl;
- QLabel *msg;
+ TQLabel *ttlIcon;
+ TQLabel *ttl;
+ TQLabel *msg;
bool m_autoDelete;
diff --git a/kdeui/kpixmapio.cpp b/kdeui/kpixmapio.cpp
index fd2854fb0..74c68b82e 100644
--- a/kdeui/kpixmapio.cpp
+++ b/kdeui/kpixmapio.cpp
@@ -13,10 +13,10 @@
#include "kpixmapio.h"
#include "config.h"
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qcolor.h>
-#include <qglobal.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqcolor.h>
+#include <tqglobal.h>
#include <kglobal.h>
#include <kconfig.h>
@@ -108,8 +108,8 @@ KPixmapIO::KPixmapIO()
// Sort out bit format. Create a temporary XImage for this.
d->shminfo = new XShmSegmentInfo;
- d->ximage = XShmCreateImage(qt_xdisplay(), (Visual *) QPaintDevice::x11AppVisual(),
- QPaintDevice::x11AppDepth(), ZPixmap, 0L, d->shminfo, 10, 10);
+ d->ximage = XShmCreateImage(qt_xdisplay(), (Visual *) TQPaintDevice::x11AppVisual(),
+ TQPaintDevice::x11AppDepth(), ZPixmap, 0L, d->shminfo, 10, 10);
d->bpp = d->ximage->bits_per_pixel;
d->first_try = true;
int bpp = d->bpp;
@@ -184,17 +184,17 @@ KPixmapIO::~KPixmapIO()
}
-QPixmap KPixmapIO::convertToPixmap(const QImage &img)
+TQPixmap KPixmapIO::convertToPixmap(const TQImage &img)
{
int size = img.width() * img.height();
if (m_bShm && (img.depth() > 1) && (d->bpp > 8) && (size > d->threshold))
{
- QPixmap dst(img.width(), img.height());
+ TQPixmap dst(img.width(), img.height());
putImage(&dst, 0, 0, &img);
return dst;
} else
{
- QPixmap dst;
+ TQPixmap dst;
dst.convertFromImage(img);
return dst;
}
@@ -202,9 +202,9 @@ QPixmap KPixmapIO::convertToPixmap(const QImage &img)
}
-QImage KPixmapIO::convertToImage(const QPixmap &pm)
+TQImage KPixmapIO::convertToImage(const TQPixmap &pm)
{
- QImage image;
+ TQImage image;
int size = pm.width() * pm.height();
if (m_bShm && (d->bpp >= 8) && (size > d->threshold))
image = getImage(&pm, 0, 0, pm.width(), pm.height());
@@ -214,14 +214,14 @@ QImage KPixmapIO::convertToImage(const QPixmap &pm)
}
-void KPixmapIO::putImage(QPixmap *dst, const QPoint &offset,
- const QImage *src)
+void KPixmapIO::putImage(TQPixmap *dst, const TQPoint &offset,
+ const TQImage *src)
{
putImage(dst, offset.x(), offset.y(), src);
}
-void KPixmapIO::putImage(QPixmap *dst, int dx, int dy, const QImage *src)
+void KPixmapIO::putImage(TQPixmap *dst, int dx, int dy, const TQImage *src)
{
int size = src->width() * src->height();
bool fallback = true;
@@ -242,22 +242,22 @@ void KPixmapIO::putImage(QPixmap *dst, int dx, int dy, const QImage *src)
}
if( fallback )
{
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage(*src);
bitBlt(dst, dx, dy, &pix, 0, 0, pix.width(), pix.height());
}
}
-QImage KPixmapIO::getImage(const QPixmap *src, const QRect &rect)
+TQImage KPixmapIO::getImage(const TQPixmap *src, const TQRect &rect)
{
return getImage(src, rect.x(), rect.y(), rect.width(), rect.height());
}
-QImage KPixmapIO::getImage(const QPixmap *src, int sx, int sy, int sw, int sh)
+TQImage KPixmapIO::getImage(const TQPixmap *src, int sx, int sy, int sw, int sh)
{
- QImage image;
+ TQImage image;
int size = src->width() * src->height();
bool fallback = true;
if ((m_bShm) && (d->bpp >= 8) && (size > d->threshold))
@@ -274,7 +274,7 @@ QImage KPixmapIO::getImage(const QPixmap *src, int sx, int sy, int sw, int sh)
}
if( fallback )
{
- QPixmap pix(sw, sh);
+ TQPixmap pix(sw, sh);
bitBlt(&pix, 0, 0, src, sx, sy, sw, sh);
image = pix.convertToImage();
}
@@ -353,8 +353,8 @@ void KPixmapIO::destroyXImage()
bool KPixmapIO::createXImage(int w, int h)
{
destroyXImage();
- d->ximage = XShmCreateImage(qt_xdisplay(), (Visual *) QPaintDevice::x11AppVisual(),
- QPaintDevice::x11AppDepth(), ZPixmap, 0L, d->shminfo, w, h);
+ d->ximage = XShmCreateImage(qt_xdisplay(), (Visual *) TQPaintDevice::x11AppVisual(),
+ TQPaintDevice::x11AppDepth(), ZPixmap, 0L, d->shminfo, w, h);
return d->ximage != None;
}
@@ -446,14 +446,14 @@ bool KPixmapIO::createShmSegment(int size)
* loop as possible.
*/
-QImage KPixmapIO::convertFromXImage()
+TQImage KPixmapIO::convertFromXImage()
{
int x, y;
int width = d->ximage->width, height = d->ximage->height;
int bpl = d->ximage->bytes_per_line;
char *data = d->ximage->data;
- QImage image;
+ TQImage image;
if (d->bpp == 8)
{
image.create(width, height, 8);
@@ -464,7 +464,7 @@ QImage KPixmapIO::convertFromXImage()
XColor *cmap = new XColor[ncells];
for (i=0; i<ncells; i++)
cmap[i].pixel = i;
- XQueryColors(qt_xdisplay(), QPaintDevice::x11AppColormap(),
+ XQueryColors(qt_xdisplay(), TQPaintDevice::x11AppColormap(),
cmap, ncells);
image.setNumColors(ncells);
for (i=0; i<ncells; i++)
@@ -622,7 +622,7 @@ QImage KPixmapIO::convertFromXImage()
}
-void KPixmapIO::convertToXImage(const QImage &img)
+void KPixmapIO::convertToXImage(const TQImage &img)
{
int x, y;
int width = d->ximage->width, height = d->ximage->height;
@@ -902,7 +902,7 @@ bool KPixmapIO::createXImage(int, int) { return false; }
void KPixmapIO::destroyXImage() {}
bool KPixmapIO::createShmSegment(int) { return false; }
void KPixmapIO::destroyShmSegment() {}
-QImage KPixmapIO::convertFromXImage() { return QImage(); }
-void KPixmapIO::convertToXImage(const QImage &) {}
+TQImage KPixmapIO::convertFromXImage() { return TQImage(); }
+void KPixmapIO::convertToXImage(const TQImage &) {}
#endif // HAVE_MITSHM
diff --git a/kdeui/kpixmapio.h b/kdeui/kpixmapio.h
index 26d84d39c..62549e6e1 100644
--- a/kdeui/kpixmapio.h
+++ b/kdeui/kpixmapio.h
@@ -19,11 +19,11 @@ class QPoint;
class QRect;
struct KPixmapIOPrivate;
/**
- * @short Fast QImage to/from QPixmap conversion.
+ * @short Fast TQImage to/from TQPixmap conversion.
* @author Geert Jansen <jansen@kde.org>
* @version $Id$
*
- * KPixmapIO implements a fast path for QPixmap to/from QImage conversions.
+ * KPixmapIO implements a fast path for TQPixmap to/from TQImage conversions.
* It uses the MIT-SHM shared memory extension for this. If this extension is
* not available, it will fall back to standard Qt methods.
*
@@ -95,14 +95,14 @@ public:
* @param image The image to convert.
* @return The pixmap containing the image.
*/
- QPixmap convertToPixmap(const QImage &image);
+ TQPixmap convertToPixmap(const TQImage &image);
/**
* Convert a pixmap to an image.
* @param pixmap The pixmap to convert.
* @return The image.
*/
- QImage convertToImage(const QPixmap &pixmap);
+ TQImage convertToImage(const TQPixmap &pixmap);
/**
* Bitblt an image onto a pixmap.
@@ -111,13 +111,13 @@ public:
* @param dy Destination y offset.
* @param src The image to load.
*/
- void putImage(QPixmap *dst, int dx, int dy, const QImage *src);
+ void putImage(TQPixmap *dst, int dx, int dy, const TQImage *src);
/**
* This function is identical to the one above. It only differs in the
* arguments it accepts.
*/
- void putImage(QPixmap *dst, const QPoint &offset, const QImage *src);
+ void putImage(TQPixmap *dst, const TQPoint &offset, const TQImage *src);
/**
* Transfer (a part of) a pixmap to an image.
@@ -128,13 +128,13 @@ public:
* @param sh Source height.
* @return The image.
*/
- QImage getImage(const QPixmap *src, int sx, int sy, int sw, int sh);
+ TQImage getImage(const TQPixmap *src, int sx, int sy, int sw, int sh);
/**
* This function is identical to the one above. It only differs in the
* arguments it accepts.
*/
- QImage getImage(const QPixmap *src, const QRect &rect);
+ TQImage getImage(const TQPixmap *src, const TQRect &rect);
/**
* Shared memory allocation policies.
@@ -176,8 +176,8 @@ private:
void destroyXImage();
bool createShmSegment(int size);
void destroyShmSegment();
- void convertToXImage(const QImage &);
- QImage convertFromXImage();
+ void convertToXImage(const TQImage &);
+ TQImage convertFromXImage();
private:
KPixmapIOPrivate* d;
};
diff --git a/kdeui/kpixmapregionselectordialog.cpp b/kdeui/kpixmapregionselectordialog.cpp
index ee9d185ea..c394af0f3 100644
--- a/kdeui/kpixmapregionselectordialog.cpp
+++ b/kdeui/kpixmapregionselectordialog.cpp
@@ -19,16 +19,16 @@
#include "kpixmapregionselectordialog.h"
#include <kdialogbase.h>
-#include <qdialog.h>
-#include <qdesktopwidget.h>
+#include <tqdialog.h>
+#include <tqdesktopwidget.h>
#include <klocale.h>
#include <kdialog.h>
-KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(QWidget *parent,
+KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(TQWidget *parent,
const char *name, bool modal ) : KDialogBase(parent, name, modal, i18n("Select Region of Image"), Help|Ok|Cancel, Ok, true )
{
- QVBox *vbox=new QVBox(this);
- new QLabel(i18n("Please click and drag on the image to select the region of interest:"), vbox);
+ TQVBox *vbox=new TQVBox(this);
+ new TQLabel(i18n("Please click and drag on the image to select the region of interest:"), vbox);
m_pixmapSelectorWidget= new KPixmapRegionSelectorWidget(vbox);
vbox->setSpacing( KDialog::spacingHint() );
@@ -40,86 +40,86 @@ KPixmapRegionSelectorDialog::~KPixmapRegionSelectorDialog()
{
}
-QRect KPixmapRegionSelectorDialog::getSelectedRegion(const QPixmap &pixmap, QWidget *parent )
+TQRect KPixmapRegionSelectorDialog::getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent )
{
KPixmapRegionSelectorDialog dialog(parent);
dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap);
- QDesktopWidget desktopWidget;
- QRect screen=desktopWidget.availableGeometry();
+ TQDesktopWidget desktopWidget;
+ TQRect screen=desktopWidget.availableGeometry();
dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize(
(int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5));
int result = dialog.exec();
- QRect rect;
+ TQRect rect;
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
rect = dialog.pixmapRegionSelectorWidget()->unzoomedSelectedRegion();
return rect;
}
-QRect KPixmapRegionSelectorDialog::getSelectedRegion(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent )
+TQRect KPixmapRegionSelectorDialog::getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent )
{
KPixmapRegionSelectorDialog dialog(parent);
dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap);
dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth,aspectRatioHeight);
- QDesktopWidget desktopWidget;
- QRect screen=desktopWidget.availableGeometry();
+ TQDesktopWidget desktopWidget;
+ TQRect screen=desktopWidget.availableGeometry();
dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize(
(int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5));
int result = dialog.exec();
- QRect rect;
+ TQRect rect;
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
rect = dialog.pixmapRegionSelectorWidget()->unzoomedSelectedRegion();
return rect;
}
-QImage KPixmapRegionSelectorDialog::getSelectedImage(const QPixmap &pixmap, QWidget *parent )
+TQImage KPixmapRegionSelectorDialog::getSelectedImage(const TQPixmap &pixmap, TQWidget *parent )
{
KPixmapRegionSelectorDialog dialog(parent);
dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap);
- QDesktopWidget desktopWidget;
- QRect screen=desktopWidget.availableGeometry();
+ TQDesktopWidget desktopWidget;
+ TQRect screen=desktopWidget.availableGeometry();
dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize(
(int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5));
int result = dialog.exec();
- QImage image;
+ TQImage image;
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
image = dialog.pixmapRegionSelectorWidget()->selectedImage();
return image;
}
-QImage KPixmapRegionSelectorDialog::getSelectedImage(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent )
+TQImage KPixmapRegionSelectorDialog::getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent )
{
KPixmapRegionSelectorDialog dialog(parent);
dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap);
dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth,aspectRatioHeight);
- QDesktopWidget desktopWidget;
- QRect screen=desktopWidget.availableGeometry();
+ TQDesktopWidget desktopWidget;
+ TQRect screen=desktopWidget.availableGeometry();
dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize(
(int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5));
int result = dialog.exec();
- QImage image;
+ TQImage image;
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
image = dialog.pixmapRegionSelectorWidget()->selectedImage();
return image;
diff --git a/kdeui/kpixmapregionselectordialog.h b/kdeui/kpixmapregionselectordialog.h
index 88c315fe9..5828ecdc1 100644
--- a/kdeui/kpixmapregionselectordialog.h
+++ b/kdeui/kpixmapregionselectordialog.h
@@ -20,7 +20,7 @@
#ifndef __KPIXMAPREGIONSELECTORDIALOG_H__
#define __KPIXMAPREGIONSELECTORDIALOG_H__
-#include <qimage.h>
+#include <tqimage.h>
#include <kdialogbase.h>
#include <kpixmapregionselectorwidget.h>
@@ -47,7 +47,7 @@ public:
* later the setPixmap method of the KPixmapRegionSelectorWidget widget of
* the new object.
*/
- KPixmapRegionSelectorDialog(QWidget *parent=0L, const char *name=0L,
+ KPixmapRegionSelectorDialog(TQWidget *parent=0L, const char *name=0L,
bool modal = false );
/**
* The destructor of the dialog
@@ -68,7 +68,7 @@ public:
* @returns the selected rectangle, or an invalid rectangle if the user
* pressed the Cancel button.
*/
- static QRect getSelectedRegion(const QPixmap &pixmap, QWidget *parent = 0L );
+ static TQRect getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent = 0L );
/**
* Creates a modal dialog, lets the user to select a region of the @p pixmap
@@ -78,7 +78,7 @@ public:
* @returns the selected rectangle, or an invalid rectangle if the user
* pressed the Cancel button.
*/
- static QRect getSelectedRegion(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent = 0L );
+ static TQRect getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L );
/**
* Creates a modal dialog, lets the user to select a region of the @p pixmap
@@ -87,7 +87,7 @@ public:
* @returns the selected image, or an invalid image if the user
* pressed the Cancel button.
*/
- static QImage getSelectedImage(const QPixmap &pixmap, QWidget *parent = 0L );
+ static TQImage getSelectedImage(const TQPixmap &pixmap, TQWidget *parent = 0L );
/**
* Creates a modal dialog, lets the user to select a region of the @p pixmap
@@ -97,7 +97,7 @@ public:
* @returns the selected image, or an invalid image if the user
* pressed the Cancel button.
*/
- static QImage getSelectedImage(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent = 0L );
+ static TQImage getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L );
protected:
KPixmapRegionSelectorWidget *m_pixmapSelectorWidget;
diff --git a/kdeui/kpixmapregionselectorwidget.cpp b/kdeui/kpixmapregionselectorwidget.cpp
index da2be5f92..ada867bba 100644
--- a/kdeui/kpixmapregionselectorwidget.cpp
+++ b/kdeui/kpixmapregionselectorwidget.cpp
@@ -24,29 +24,29 @@
*/
#include "kpixmapregionselectorwidget.h"
-#include <qpainter.h>
-#include <qcolor.h>
-#include <qimage.h>
-#include <qlayout.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqlayout.h>
#include <kimageeffect.h>
#include <kdebug.h>
#include <klocale.h>
#include <kpopupmenu.h>
#include <kaction.h>
#include <stdlib.h>
-#include <qcursor.h>
-#include <qapplication.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
-KPixmapRegionSelectorWidget::KPixmapRegionSelectorWidget( QWidget *parent,
- const char *name) : QWidget( parent, name)
+KPixmapRegionSelectorWidget::KPixmapRegionSelectorWidget( TQWidget *parent,
+ const char *name) : TQWidget( parent, name)
{
- QHBoxLayout * hboxLayout=new QHBoxLayout( this );
+ TQHBoxLayout * hboxLayout=new TQHBoxLayout( this );
hboxLayout->addStretch();
- QVBoxLayout * vboxLayout=new QVBoxLayout( hboxLayout );
+ TQVBoxLayout * vboxLayout=new TQVBoxLayout( hboxLayout );
vboxLayout->addStretch();
- m_label = new QLabel(this, "pixmapHolder");
+ m_label = new TQLabel(this, "pixmapHolder");
m_label->setBackgroundMode( Qt::NoBackground );
m_label->installEventFilter( this );
@@ -64,7 +64,7 @@ KPixmapRegionSelectorWidget::~KPixmapRegionSelectorWidget()
{
}
-void KPixmapRegionSelectorWidget::setPixmap( const QPixmap &pixmap )
+void KPixmapRegionSelectorWidget::setPixmap( const TQPixmap &pixmap )
{
Q_ASSERT(!pixmap.isNull()); //This class isn't designed to deal with null pixmaps.
m_originalPixmap = pixmap;
@@ -79,12 +79,12 @@ void KPixmapRegionSelectorWidget::resetSelection()
updatePixmap();
}
-QRect KPixmapRegionSelectorWidget::selectedRegion() const
+TQRect KPixmapRegionSelectorWidget::selectedRegion() const
{
return m_selectedRegion;
}
-void KPixmapRegionSelectorWidget::setSelectedRegion(const QRect &rect)
+void KPixmapRegionSelectorWidget::setSelectedRegion(const TQRect &rect)
{
if (!rect.isValid()) resetSelection();
else
@@ -92,7 +92,7 @@ void KPixmapRegionSelectorWidget::setSelectedRegion(const QRect &rect)
m_selectedRegion=rect;
updatePixmap();
- QRect r=unzoomedSelectedRegion();
+ TQRect r=unzoomedSelectedRegion();
}
}
@@ -102,7 +102,7 @@ void KPixmapRegionSelectorWidget::updatePixmap()
if (m_selectedRegion.width()>m_originalPixmap.width()) m_selectedRegion.setWidth( m_originalPixmap.width() );
if (m_selectedRegion.height()>m_originalPixmap.height()) m_selectedRegion.setHeight( m_originalPixmap.height() );
- QPainter painter;
+ TQPainter painter;
if (m_linedPixmap.isNull())
{
m_linedPixmap = m_originalPixmap;
@@ -110,21 +110,21 @@ void KPixmapRegionSelectorWidget::updatePixmap()
painter.begin(&m_linedPixmap);
painter.setRasterOp( Qt::XorROP );
painter.fillRect(0,0,m_linedPixmap.width(), m_linedPixmap.height(),
- QBrush( QColor(255,255,255), Qt::BDiagPattern) );
+ TQBrush( TQColor(255,255,255), Qt::BDiagPattern) );
painter.end();
- QImage image=m_linedPixmap.convertToImage();
- image=KImageEffect::fade(image, (float)0.4, QColor(0,0,0));
+ TQImage image=m_linedPixmap.convertToImage();
+ image=KImageEffect::fade(image, (float)0.4, TQColor(0,0,0));
m_linedPixmap.convertFromImage(image);
}
- QPixmap pixmap = m_linedPixmap;
+ TQPixmap pixmap = m_linedPixmap;
painter.begin(&pixmap);
painter.drawPixmap( m_selectedRegion.topLeft(),
m_originalPixmap, m_selectedRegion );
- painter.setPen( QColor(255,255,255) );
+ painter.setPen( TQColor(255,255,255) );
painter.setRasterOp( Qt::XorROP );
painter.drawRect( m_selectedRegion );
@@ -141,12 +141,12 @@ KPopupMenu *KPixmapRegionSelectorWidget::createPopupMenu()
popup->insertTitle(i18n("Image Operations"));
KAction *action = new KAction(i18n("&Rotate Clockwise"), "rotate_cw",
- 0, this, SLOT(rotateClockwise()),
+ 0, this, TQT_SLOT(rotateClockwise()),
popup, "rotateclockwise");
action->plug(popup);
action = new KAction(i18n("Rotate &Counterclockwise"), "rotate_ccw",
- 0, this, SLOT(rotateCounterclockwise()),
+ 0, this, TQT_SLOT(rotateCounterclockwise()),
popup, "rotatecounterclockwise");
action->plug(popup);
@@ -161,7 +161,7 @@ void KPixmapRegionSelectorWidget::rotate(KImageEffect::RotateDirection direction
{
int w=m_originalPixmap.width();
int h=m_originalPixmap.height();
- QImage img=m_unzoomedPixmap.convertToImage();
+ TQImage img=m_unzoomedPixmap.convertToImage();
img= KImageEffect::rotate(img, direction);
m_unzoomedPixmap.convertFromImage(img);
@@ -169,7 +169,7 @@ void KPixmapRegionSelectorWidget::rotate(KImageEffect::RotateDirection direction
img= KImageEffect::rotate(img, direction);
m_originalPixmap.convertFromImage(img);
- m_linedPixmap=QPixmap();
+ m_linedPixmap=TQPixmap();
if (m_forcedAspectRatio>0 && m_forcedAspectRatio!=1)
resetSelection();
@@ -206,12 +206,12 @@ void KPixmapRegionSelectorWidget::rotateCounterclockwise()
rotate(KImageEffect::Rotate270);
}
-bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
+bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev)
{
- if ( ev->type() == QEvent::MouseButtonPress )
+ if ( ev->type() == TQEvent::MouseButtonPress )
{
- QMouseEvent *mev= (QMouseEvent *)(ev);
- //kdDebug() << QString("click at %1,%2").arg( mev->x() ).arg( mev->y() ) << endl;
+ TQMouseEvent *mev= (TQMouseEvent *)(ev);
+ //kdDebug() << TQString("click at %1,%2").arg( mev->x() ).arg( mev->y() ) << endl;
if ( mev->button() == RightButton )
{
@@ -221,7 +221,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
return TRUE;
};
- QCursor cursor;
+ TQCursor cursor;
if ( m_selectedRegion.contains( mev->pos() )
&& m_selectedRegion!=m_originalPixmap.rect() )
@@ -234,7 +234,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
m_state=Resizing;
cursor.setShape( Qt::CrossCursor );
}
- QApplication::setOverrideCursor(cursor);
+ TQApplication::setOverrideCursor(cursor);
m_tempFirstClick=mev->pos();
@@ -242,11 +242,11 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
return TRUE;
}
- if ( ev->type() == QEvent::MouseMove )
+ if ( ev->type() == TQEvent::MouseMove )
{
- QMouseEvent *mev= (QMouseEvent *)(ev);
+ TQMouseEvent *mev= (TQMouseEvent *)(ev);
- //kdDebug() << QString("move to %1,%2").arg( mev->x() ).arg( mev->y() ) << endl;
+ //kdDebug() << TQString("move to %1,%2").arg( mev->x() ).arg( mev->y() ) << endl;
if ( m_state == Resizing )
{
@@ -300,26 +300,26 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
return TRUE;
}
- if ( ev->type() == QEvent::MouseButtonRelease )
+ if ( ev->type() == TQEvent::MouseButtonRelease )
{
- QMouseEvent *mev= (QMouseEvent *)(ev);
+ TQMouseEvent *mev= (TQMouseEvent *)(ev);
if ( m_state == Resizing && mev->pos() == m_tempFirstClick)
resetSelection();
m_state=None;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return TRUE;
}
- QWidget::eventFilter(obj, ev);
+ TQWidget::eventFilter(obj, ev);
return FALSE;
}
-QRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const QPoint & startPoint, const QPoint & _endPoint )
+TQRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const TQPoint & startPoint, const TQPoint & _endPoint )
{
- QPoint endPoint = _endPoint;
+ TQPoint endPoint = _endPoint;
if ( endPoint.x() < 0 ) endPoint.setX(0);
else if ( endPoint.x() > m_originalPixmap.width() ) endPoint.setX(m_originalPixmap.width());
if ( endPoint.y() < 0 ) endPoint.setY(0);
@@ -382,20 +382,20 @@ QRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const QPoint & startP
x=startPoint.x()-w;
}
- return QRect(x,y,w,h);
+ return TQRect(x,y,w,h);
}
-QRect KPixmapRegionSelectorWidget::unzoomedSelectedRegion() const
+TQRect KPixmapRegionSelectorWidget::unzoomedSelectedRegion() const
{
- return QRect((int)(m_selectedRegion.x()/m_zoomFactor),
+ return TQRect((int)(m_selectedRegion.x()/m_zoomFactor),
(int)(m_selectedRegion.y()/m_zoomFactor),
(int)(m_selectedRegion.width()/m_zoomFactor),
(int)(m_selectedRegion.height()/m_zoomFactor));
}
-QImage KPixmapRegionSelectorWidget::selectedImage() const
+TQImage KPixmapRegionSelectorWidget::selectedImage() const
{
- QImage origImage=m_unzoomedPixmap.convertToImage();
+ TQImage origImage=m_unzoomedPixmap.convertToImage();
return origImage.copy(unzoomedSelectedRegion());
}
@@ -415,25 +415,25 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height)
m_maxHeight=height;
m_originalPixmap=m_unzoomedPixmap;
- if (m_selectedRegion == m_originalPixmap.rect()) m_selectedRegion=QRect();
+ if (m_selectedRegion == m_originalPixmap.rect()) m_selectedRegion=TQRect();
-// kdDebug() << QString(" original Pixmap :") << m_originalPixmap.rect() << endl;
-// kdDebug() << QString(" unzoomed Pixmap : %1 x %2 ").arg(m_unzoomedPixmap.width()).arg(m_unzoomedPixmap.height()) << endl;
+// kdDebug() << TQString(" original Pixmap :") << m_originalPixmap.rect() << endl;
+// kdDebug() << TQString(" unzoomed Pixmap : %1 x %2 ").arg(m_unzoomedPixmap.width()).arg(m_unzoomedPixmap.height()) << endl;
if ( !m_originalPixmap.isNull() &&
( m_originalPixmap.width() > m_maxWidth ||
m_originalPixmap.height() > m_maxHeight ) )
{
/* We have to resize the pixmap to get it complete on the screen */
- QImage image=m_originalPixmap.convertToImage();
- m_originalPixmap.convertFromImage( image.smoothScale( width, height, QImage::ScaleMin ) );
+ TQImage image=m_originalPixmap.convertToImage();
+ m_originalPixmap.convertFromImage( image.smoothScale( width, height, TQImage::ScaleMin ) );
double oldZoomFactor = m_zoomFactor;
m_zoomFactor=m_originalPixmap.width()/(double)m_unzoomedPixmap.width();
if (m_selectedRegion.isValid())
{
m_selectedRegion=
- QRect((int)(m_selectedRegion.x()*m_zoomFactor/oldZoomFactor),
+ TQRect((int)(m_selectedRegion.x()*m_zoomFactor/oldZoomFactor),
(int)(m_selectedRegion.y()*m_zoomFactor/oldZoomFactor),
(int)(m_selectedRegion.width()*m_zoomFactor/oldZoomFactor),
(int)(m_selectedRegion.height()*m_zoomFactor/oldZoomFactor) );
@@ -442,7 +442,7 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height)
if (!m_selectedRegion.isValid()) m_selectedRegion = m_originalPixmap.rect();
- m_linedPixmap=QPixmap();
+ m_linedPixmap=TQPixmap();
updatePixmap();
resize(m_label->width(), m_label->height());
}
diff --git a/kdeui/kpixmapregionselectorwidget.h b/kdeui/kpixmapregionselectorwidget.h
index c865aa2a8..f88119755 100644
--- a/kdeui/kpixmapregionselectorwidget.h
+++ b/kdeui/kpixmapregionselectorwidget.h
@@ -19,10 +19,10 @@
#ifndef __KPIXMAPREGIONSELECTORWIDGET_H__
#define __KPIXMAPREGIONSELECTORWIDGET_H__
-#include <qvbox.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqlabel.h>
#include <kimageeffect.h>
class KPopupMenu;
@@ -48,7 +48,7 @@ public:
/**
* Constructor for a KPixmapRegionSelectorWidget.
*/
- KPixmapRegionSelectorWidget( QWidget *parent = 0L, const char *name=0L);
+ KPixmapRegionSelectorWidget( TQWidget *parent = 0L, const char *name=0L);
/**
* Destructor for a KPixmapRegionSelectorWidget
@@ -60,28 +60,28 @@ public:
* @param pixmap The pixmap. Must be non-null.
*
*/
- void setPixmap( const QPixmap &pixmap );
+ void setPixmap( const TQPixmap &pixmap );
/**
* @return the original whole pixmap that we're using in this widget as the
* pixmap the user is selecting a region from.
*/
- QPixmap pixmap() const { return m_unzoomedPixmap; }
+ TQPixmap pixmap() const { return m_unzoomedPixmap; }
/**
* Sets the selected region to be @p rect (in zoomed pixmap coordinates)
*/
- void setSelectedRegion(const QRect &rect);
+ void setSelectedRegion(const TQRect &rect);
/**
* Returns the selected region ( in zoomed pixmap coordinates )
*/
- QRect selectedRegion() const;
+ TQRect selectedRegion() const;
/**
* Returns the selected region ( in unzoomed, original pixmap coordinates )
*/
- QRect unzoomedSelectedRegion() const;
+ TQRect unzoomedSelectedRegion() const;
/**
* Resets the selection to use the whole image
@@ -89,10 +89,10 @@ public:
void resetSelection();
/**
- * @returns a QImage object with just the region the user selected from the
+ * @returns a TQImage object with just the region the user selected from the
* image
*/
- QImage selectedImage() const;
+ TQImage selectedImage() const;
/**
* Sets the aspect ration that the selected subimage should have. The way to
@@ -140,7 +140,7 @@ protected:
virtual KPopupMenu *createPopupMenu();
private:
- bool eventFilter(QObject *obj, QEvent *ev);
+ bool eventFilter(TQObject *obj, TQEvent *ev);
/**
* Recalculates the pixmap that is shown based on the current selected area,
@@ -148,18 +148,18 @@ private:
*/
void updatePixmap();
- QRect calcSelectionRectangle( const QPoint &startPoint, const QPoint & endPoint );
+ TQRect calcSelectionRectangle( const TQPoint &startPoint, const TQPoint & endPoint );
enum CursorState { None=0, Resizing, Moving };
CursorState m_state;
- QPixmap m_unzoomedPixmap;
- QPixmap m_originalPixmap;
- QPixmap m_linedPixmap;
- QRect m_selectedRegion;
- QLabel *m_label;
+ TQPixmap m_unzoomedPixmap;
+ TQPixmap m_originalPixmap;
+ TQPixmap m_linedPixmap;
+ TQRect m_selectedRegion;
+ TQLabel *m_label;
- QPoint m_tempFirstClick;
+ TQPoint m_tempFirstClick;
double m_forcedAspectRatio;
int m_maxWidth, m_maxHeight;
diff --git a/kdeui/kpopupmenu.cpp b/kdeui/kpopupmenu.cpp
index 6f7fbf374..6765216b4 100644
--- a/kdeui/kpopupmenu.cpp
+++ b/kdeui/kpopupmenu.cpp
@@ -16,40 +16,40 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qfontmetrics.h>
-#include <qstyle.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqfontmetrics.h>
+#include <tqstyle.h>
#include "kpopupmenu.h"
#include <kdebug.h>
#include <kapplication.h>
-KPopupTitle::KPopupTitle(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KPopupTitle::KPopupTitle(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
setMinimumSize(16, fontMetrics().height()+8);
}
KPopupTitle::KPopupTitle(KPixmapEffect::GradientType /* gradient */,
- const QColor &/* color */, const QColor &/* textColor */,
- QWidget *parent, const char *name)
- : QWidget(parent, name)
+ const TQColor &/* color */, const TQColor &/* textColor */,
+ TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
calcSize();
}
-KPopupTitle::KPopupTitle(const KPixmap & /* background */, const QColor &/* color */,
- const QColor &/* textColor */, QWidget *parent,
+KPopupTitle::KPopupTitle(const KPixmap & /* background */, const TQColor &/* color */,
+ const TQColor &/* textColor */, TQWidget *parent,
const char *name)
- : QWidget(parent, name)
+ : TQWidget(parent, name)
{
calcSize();
}
-void KPopupTitle::setTitle(const QString &text, const QPixmap *icon)
+void KPopupTitle::setTitle(const TQString &text, const TQPixmap *icon)
{
titleStr = text;
if (icon)
@@ -60,13 +60,13 @@ void KPopupTitle::setTitle(const QString &text, const QPixmap *icon)
calcSize();
}
-void KPopupTitle::setText( const QString &text )
+void KPopupTitle::setText( const TQString &text )
{
titleStr = text;
calcSize();
}
-void KPopupTitle::setIcon( const QPixmap &pix )
+void KPopupTitle::setIcon( const TQPixmap &pix )
{
miniicon = pix;
calcSize();
@@ -74,18 +74,18 @@ void KPopupTitle::setIcon( const QPixmap &pix )
void KPopupTitle::calcSize()
{
- QFont f = font();
+ TQFont f = font();
f.setBold(true);
- int w = miniicon.width()+QFontMetrics(f).width(titleStr);
+ int w = miniicon.width()+TQFontMetrics(f).width(titleStr);
int h = QMAX( fontMetrics().height(), miniicon.height() );
setMinimumSize( w+16, h+8 );
}
-void KPopupTitle::paintEvent(QPaintEvent *)
+void KPopupTitle::paintEvent(TQPaintEvent *)
{
- QRect r(rect());
- QPainter p(this);
- kapp->style().drawPrimitive(QStyle::PE_HeaderSection, &p, r, palette().active());
+ TQRect r(rect());
+ TQPainter p(this);
+ kapp->style().drawPrimitive(TQStyle::PE_HeaderSection, &p, r, palette().active());
if (!miniicon.isNull())
p.drawPixmap(4, (r.height()-miniicon.height())/2, miniicon);
@@ -93,7 +93,7 @@ void KPopupTitle::paintEvent(QPaintEvent *)
if (!titleStr.isNull())
{
p.setPen(palette().active().text());
- QFont f = p.font();
+ TQFont f = p.font();
f.setBold(true);
p.setFont(f);
if(!miniicon.isNull())
@@ -110,7 +110,7 @@ void KPopupTitle::paintEvent(QPaintEvent *)
}
}
-QSize KPopupTitle::sizeHint() const
+TQSize KPopupTitle::sizeHint() const
{
return minimumSize();
}
@@ -132,23 +132,23 @@ public:
delete m_ctxMenu;
}
- QString m_lastTitle;
+ TQString m_lastTitle;
// variables for keyboard navigation
- QTimer clearTimer;
+ TQTimer clearTimer;
bool noMatches : 1;
bool shortcuts : 1;
bool autoExec : 1;
- QString keySeq;
- QString originalText;
+ TQString keySeq;
+ TQString originalText;
int lastHitIndex;
Qt::ButtonState state;
// support for RMB menus on menus
- QPopupMenu* m_ctxMenu;
+ TQPopupMenu* m_ctxMenu;
static bool s_continueCtxMenuShow;
static int s_highlightedItem;
static KPopupMenu* s_contextedMenu;
@@ -158,12 +158,12 @@ int KPopupMenu::KPopupMenuPrivate::s_highlightedItem(-1);
KPopupMenu* KPopupMenu::KPopupMenuPrivate::s_contextedMenu(0);
bool KPopupMenu::KPopupMenuPrivate::s_continueCtxMenuShow(true);
-KPopupMenu::KPopupMenu(QWidget *parent, const char *name)
- : QPopupMenu(parent, name)
+KPopupMenu::KPopupMenu(TQWidget *parent, const char *name)
+ : TQPopupMenu(parent, name)
{
d = new KPopupMenuPrivate;
resetKeyboardVars();
- connect(&(d->clearTimer), SIGNAL(timeout()), SLOT(resetKeyboardVars()));
+ connect(&(d->clearTimer), TQT_SIGNAL(timeout()), TQT_SLOT(resetKeyboardVars()));
}
KPopupMenu::~KPopupMenu()
@@ -177,7 +177,7 @@ KPopupMenu::~KPopupMenu()
delete d;
}
-int KPopupMenu::insertTitle(const QString &text, int id, int index)
+int KPopupMenu::insertTitle(const TQString &text, int id, int index)
{
KPopupTitle *titleItem = new KPopupTitle();
titleItem->setTitle(text);
@@ -186,7 +186,7 @@ int KPopupMenu::insertTitle(const QString &text, int id, int index)
return ret;
}
-int KPopupMenu::insertTitle(const QPixmap &icon, const QString &text, int id,
+int KPopupMenu::insertTitle(const TQPixmap &icon, const TQString &text, int id,
int index)
{
KPopupTitle *titleItem = new KPopupTitle();
@@ -196,9 +196,9 @@ int KPopupMenu::insertTitle(const QPixmap &icon, const QString &text, int id,
return ret;
}
-void KPopupMenu::changeTitle(int id, const QString &text)
+void KPopupMenu::changeTitle(int id, const TQString &text)
{
- QMenuItem *item = findItem(id);
+ TQMenuItem *item = findItem(id);
if(item){
if(item->widget())
((KPopupTitle *)item->widget())->setTitle(text);
@@ -213,9 +213,9 @@ void KPopupMenu::changeTitle(int id, const QString &text)
#endif
}
-void KPopupMenu::changeTitle(int id, const QPixmap &icon, const QString &text)
+void KPopupMenu::changeTitle(int id, const TQPixmap &icon, const TQString &text)
{
- QMenuItem *item = findItem(id);
+ TQMenuItem *item = findItem(id);
if(item){
if(item->widget())
((KPopupTitle *)item->widget())->setTitle(text, &icon);
@@ -230,11 +230,11 @@ void KPopupMenu::changeTitle(int id, const QPixmap &icon, const QString &text)
#endif
}
-QString KPopupMenu::title(int id) const
+TQString KPopupMenu::title(int id) const
{
if(id == -1) // obsolete
return d->m_lastTitle;
- QMenuItem *item = findItem(id);
+ TQMenuItem *item = findItem(id);
if(item){
if(item->widget())
return ((KPopupTitle *)item->widget())->title();
@@ -243,12 +243,12 @@ QString KPopupMenu::title(int id) const
}
else
qWarning("KPopupMenu: title() called with invalid id %d.", id);
- return QString::null;
+ return TQString::null;
}
-QPixmap KPopupMenu::titlePixmap(int id) const
+TQPixmap KPopupMenu::titlePixmap(int id) const
{
- QMenuItem *item = findItem(id);
+ TQMenuItem *item = findItem(id);
if(item){
if(item->widget())
return ((KPopupTitle *)item->widget())->icon();
@@ -257,24 +257,24 @@ QPixmap KPopupMenu::titlePixmap(int id) const
}
else
qWarning("KPopupMenu: titlePixmap() called with invalid id %d.", id);
- QPixmap tmp;
+ TQPixmap tmp;
return tmp;
}
/**
* This is re-implemented for keyboard navigation.
*/
-void KPopupMenu::closeEvent(QCloseEvent*e)
+void KPopupMenu::closeEvent(TQCloseEvent*e)
{
if (d->shortcuts)
resetKeyboardVars();
- QPopupMenu::closeEvent(e);
+ TQPopupMenu::closeEvent(e);
}
void KPopupMenu::activateItemAt(int index)
{
d->state = Qt::NoButton;
- QPopupMenu::activateItemAt(index);
+ TQPopupMenu::activateItemAt(index);
}
Qt::ButtonState KPopupMenu::state() const
@@ -282,20 +282,20 @@ Qt::ButtonState KPopupMenu::state() const
return d->state;
}
-void KPopupMenu::keyPressEvent(QKeyEvent* e)
+void KPopupMenu::keyPressEvent(TQKeyEvent* e)
{
d->state = Qt::NoButton;
if (!d->shortcuts) {
// continue event processing by Qpopup
//e->ignore();
d->state = e->state();
- QPopupMenu::keyPressEvent(e);
+ TQPopupMenu::keyPressEvent(e);
return;
}
int i = 0;
bool firstpass = true;
- QString keyString = e->text();
+ TQString keyString = e->text();
// check for common commands dealt with by QPopup
int key = e->key();
@@ -307,10 +307,10 @@ void KPopupMenu::keyPressEvent(QKeyEvent* e)
// continue event processing by Qpopup
//e->ignore();
d->state = e->state();
- QPopupMenu::keyPressEvent(e);
+ TQPopupMenu::keyPressEvent(e);
return;
} else if ( key == Key_Shift || key == Key_Control || key == Key_Alt || key == Key_Meta )
- return QPopupMenu::keyPressEvent(e);
+ return TQPopupMenu::keyPressEvent(e);
// check to see if the user wants to remove a key from the sequence (backspace)
// or clear the sequence (delete)
@@ -366,7 +366,7 @@ void KPopupMenu::keyPressEvent(QKeyEvent* e)
if (!isItemEnabled(j))
continue;
- QString thisText;
+ TQString thisText;
// retrieve the right text
// (the last selected item one may have additional ampersands)
@@ -377,7 +377,7 @@ void KPopupMenu::keyPressEvent(QKeyEvent* e)
// if there is an accelerator present, remove it
if ((int)accel(j) != 0)
- thisText = thisText.replace("&", QString::null);
+ thisText = thisText.replace("&", TQString::null);
// chop text to the search length
thisText = thisText.left(seqLen);
@@ -437,18 +437,18 @@ void KPopupMenu::keyPressEvent(QKeyEvent* e)
// no matches whatsoever, clean up
resetKeyboardVars(true);
//e->ignore();
- QPopupMenu::keyPressEvent(e);
+ TQPopupMenu::keyPressEvent(e);
}
bool KPopupMenu::focusNextPrevChild( bool next )
{
resetKeyboardVars();
- return QPopupMenu::focusNextPrevChild( next );
+ return TQPopupMenu::focusNextPrevChild( next );
}
-QString KPopupMenu::underlineText(const QString& text, uint length)
+TQString KPopupMenu::underlineText(const TQString& text, uint length)
{
- QString ret = text;
+ TQString ret = text;
for (uint i = 0; i < length; i++) {
if (ret[2*i] != '&')
ret.insert(2*i, "&");
@@ -465,7 +465,7 @@ void KPopupMenu::resetKeyboardVars(bool noMatches /* = false */)
}
if (!noMatches) {
- d->keySeq = QString::null;
+ d->keySeq = TQString::null;
}
d->noMatches = noMatches;
@@ -488,7 +488,7 @@ void KPopupMenu::setKeyboardShortcutsExecute(bool enable)
* RMB menus on menus
*/
-void KPopupMenu::mousePressEvent(QMouseEvent* e)
+void KPopupMenu::mousePressEvent(TQMouseEvent* e)
{
if (d->m_ctxMenu && d->m_ctxMenu->isVisible())
{
@@ -496,30 +496,30 @@ void KPopupMenu::mousePressEvent(QMouseEvent* e)
d->m_ctxMenu->hide();
}
- QPopupMenu::mousePressEvent(e);
+ TQPopupMenu::mousePressEvent(e);
}
-void KPopupMenu::mouseReleaseEvent(QMouseEvent* e)
+void KPopupMenu::mouseReleaseEvent(TQMouseEvent* e)
{
// Save the button, and the modifiers from state()
d->state = Qt::ButtonState(e->button() | (e->state() & KeyButtonMask));
if ( !d->m_ctxMenu || !d->m_ctxMenu->isVisible() )
- QPopupMenu::mouseReleaseEvent(e);
+ TQPopupMenu::mouseReleaseEvent(e);
}
-QPopupMenu* KPopupMenu::contextMenu()
+TQPopupMenu* KPopupMenu::contextMenu()
{
if (!d->m_ctxMenu)
{
- d->m_ctxMenu = new QPopupMenu(this);
- connect(d->m_ctxMenu, SIGNAL(aboutToHide()), this, SLOT(ctxMenuHiding()));
+ d->m_ctxMenu = new TQPopupMenu(this);
+ connect(d->m_ctxMenu, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(ctxMenuHiding()));
}
return d->m_ctxMenu;
}
-const QPopupMenu* KPopupMenu::contextMenu() const
+const TQPopupMenu* KPopupMenu::contextMenu() const
{
return const_cast< KPopupMenu* >( this )->contextMenu();
}
@@ -547,18 +547,18 @@ void KPopupMenu::itemHighlighted(int /* whichItem */)
}
d->m_ctxMenu->hide();
- showCtxMenu(mapFromGlobal(QCursor::pos()));
+ showCtxMenu(mapFromGlobal(TQCursor::pos()));
}
-void KPopupMenu::showCtxMenu(QPoint pos)
+void KPopupMenu::showCtxMenu(TQPoint pos)
{
- QMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem);
+ TQMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem);
if (item)
{
- QPopupMenu* subMenu = item->popup();
+ TQPopupMenu* subMenu = item->popup();
if (subMenu)
{
- disconnect(subMenu, SIGNAL(aboutToShow()), this, SLOT(ctxMenuHideShowingMenu()));
+ disconnect(subMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(ctxMenuHideShowingMenu()));
}
}
@@ -572,11 +572,11 @@ void KPopupMenu::showCtxMenu(QPoint pos)
emit aboutToShowContextMenu(this, KPopupMenuPrivate::s_highlightedItem, d->m_ctxMenu);
- QPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup();
+ TQPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup();
if (subMenu)
{
- connect(subMenu, SIGNAL(aboutToShow()), SLOT(ctxMenuHideShowingMenu()));
- QTimer::singleShot(100, subMenu, SLOT(hide()));
+ connect(subMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(ctxMenuHideShowingMenu()));
+ TQTimer::singleShot(100, subMenu, TQT_SLOT(hide()));
}
if (!KPopupMenuPrivate::s_continueCtxMenuShow)
@@ -587,7 +587,7 @@ void KPopupMenu::showCtxMenu(QPoint pos)
KPopupMenuPrivate::s_contextedMenu = this;
d->m_ctxMenu->popup(this->mapToGlobal(pos));
- connect(this, SIGNAL(highlighted(int)), this, SLOT(itemHighlighted(int)));
+ connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(itemHighlighted(int)));
}
/*
@@ -596,13 +596,13 @@ void KPopupMenu::showCtxMenu(QPoint pos)
*/
void KPopupMenu::ctxMenuHideShowingMenu()
{
- QMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem);
+ TQMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem);
if (item)
{
- QPopupMenu* subMenu = item->popup();
+ TQPopupMenu* subMenu = item->popup();
if (subMenu)
{
- QTimer::singleShot(0, subMenu, SLOT(hide()));
+ TQTimer::singleShot(0, subMenu, TQT_SLOT(hide()));
}
}
}
@@ -611,22 +611,22 @@ void KPopupMenu::ctxMenuHiding()
{
if (KPopupMenuPrivate::s_highlightedItem)
{
- QPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup();
+ TQPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup();
if (subMenu)
{
- disconnect(subMenu, SIGNAL(aboutToShow()), this, SLOT(ctxMenuHideShowingMenu()));
+ disconnect(subMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(ctxMenuHideShowingMenu()));
}
}
- disconnect(this, SIGNAL(highlighted(int)), this, SLOT(itemHighlighted(int)));
+ disconnect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(itemHighlighted(int)));
KPopupMenuPrivate::s_continueCtxMenuShow = true;
}
-void KPopupMenu::contextMenuEvent(QContextMenuEvent* e)
+void KPopupMenu::contextMenuEvent(TQContextMenuEvent* e)
{
if (d->m_ctxMenu)
{
- if (e->reason() == QContextMenuEvent::Mouse)
+ if (e->reason() == TQContextMenuEvent::Mouse)
{
showCtxMenu(e->pos());
}
@@ -639,19 +639,19 @@ void KPopupMenu::contextMenuEvent(QContextMenuEvent* e)
return;
}
- QPopupMenu::contextMenuEvent(e);
+ TQPopupMenu::contextMenuEvent(e);
}
-void KPopupMenu::hideEvent(QHideEvent*)
+void KPopupMenu::hideEvent(TQHideEvent*)
{
if (d->m_ctxMenu && d->m_ctxMenu->isVisible())
{
// we need to block signals here when the ctxMenu is showing
- // to prevent the QPopupMenu::activated(int) signal from emitting
+ // to prevent the TQPopupMenu::activated(int) signal from emitting
// when hiding with a context menu, the user doesn't expect the
// menu to actually do anything.
// since hideEvent gets called very late in the process of hiding
- // (deep within QWidget::hide) the activated(int) signal is the
+ // (deep within TQWidget::hide) the activated(int) signal is the
// last signal to be emitted, even after things like aboutToHide()
// AJS
blockSignals(true);
@@ -664,15 +664,15 @@ void KPopupMenu::hideEvent(QHideEvent*)
*/
// Obsolete
-KPopupMenu::KPopupMenu(const QString& title, QWidget *parent, const char *name)
- : QPopupMenu(parent, name)
+KPopupMenu::KPopupMenu(const TQString& title, TQWidget *parent, const char *name)
+ : TQPopupMenu(parent, name)
{
d = new KPopupMenuPrivate;
insertTitle(title);
}
// Obsolete
-void KPopupMenu::setTitle(const QString &title)
+void KPopupMenu::setTitle(const TQString &title)
{
KPopupTitle *titleItem = new KPopupTitle();
titleItem->setTitle(title);
diff --git a/kdeui/kpopupmenu.h b/kdeui/kpopupmenu.h
index 7c392b61e..55ebbad8d 100644
--- a/kdeui/kpopupmenu.h
+++ b/kdeui/kpopupmenu.h
@@ -20,7 +20,7 @@
#define INCLUDE_MENUITEM_DEF
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kpixmapeffect.h>
#include <kpixmap.h>
#include <kdelibs_export.h>
@@ -44,55 +44,55 @@ public:
* Constructs a title widget with the user specified gradient, pixmap,
* and colors.
*/
- KPopupTitle(QWidget *parent=0, const char *name=0);
+ KPopupTitle(TQWidget *parent=0, const char *name=0);
/**
* @deprecated
* Constructs a title widget with the specified gradient and colors.
*/
- KPopupTitle(KPixmapEffect::GradientType gradient, const QColor &color,
- const QColor &textColor, QWidget *parent=0,
+ KPopupTitle(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 QColor &color,
- const QColor &textColor, QWidget *parent=0,
+ KPopupTitle(const KPixmap &background, const TQColor &color,
+ const TQColor &textColor, TQWidget *parent=0,
const char *name=0) KDE_DEPRECATED;
/**
* Sets the title string and optional icon for the title widget.
*
* You will want to call this before inserting into a menu.
*/
- void setTitle(const QString &text, const QPixmap *icon=0);
+ void setTitle(const TQString &text, const TQPixmap *icon=0);
/**
* Returns the current title.
*/
- QString title() const { return titleStr; }
+ TQString title() const { return titleStr; }
/**
* Returns the current icon.
*/
- QPixmap icon() const { return miniicon; }
+ TQPixmap icon() const { return miniicon; }
- QSize sizeHint() const;
+ TQSize sizeHint() const;
public slots:
/// @since 3.1
- void setText( const QString &text );
+ void setText( const TQString &text );
/// @since 3.1
- void setIcon( const QPixmap &pix );
+ void setIcon( const TQPixmap &pix );
protected:
void calcSize();
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
// Remove in KDE4
KPixmapEffect::GradientType grType;
- QString titleStr;
+ TQString titleStr;
// Remove in KDE4
KPixmap fill;
- QPixmap miniicon;
- QColor fgColor, bgColor, grHigh, grLow;
+ TQPixmap miniicon;
+ TQColor fgColor, bgColor, grHigh, grLow;
bool useGradient;
protected:
@@ -107,7 +107,7 @@ private:
*
* KPopupMenu 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 QPopupMenu, with the addition of insertTitle(),
+ * identically to TQPopupMenu, with the addition of insertTitle(),
* changeTitle(), setKeyboardShortcutsEnabled() and
* setKeyboardShortcutsExecute() methods.
*
@@ -120,13 +120,13 @@ private:
* @author Daniel M. Duley <mosfet@kde.org>
* @author Hamish Rodda <rodda@kde.org>
*/
-class KDEUI_EXPORT KPopupMenu : public QPopupMenu {
+class KDEUI_EXPORT KPopupMenu : public TQPopupMenu {
Q_OBJECT
public:
/**
* Constructs a KPopupMenu.
*/
- KPopupMenu(QWidget *parent=0, const char *name=0);
+ KPopupMenu(TQWidget *parent=0, const char *name=0);
/**
* Destructs the object
@@ -136,31 +136,31 @@ public:
/**
* Inserts a title item with no icon.
*/
- int insertTitle(const QString &text, int id=-1, int index=-1);
+ int insertTitle(const TQString &text, int id=-1, int index=-1);
/**
* Inserts a title item with the given icon and title.
*/
- int insertTitle(const QPixmap &icon, const QString &text, int id=-1,
+ int insertTitle(const TQPixmap &icon, const TQString &text, int id=-1,
int index=-1);
/**
* Changes the title of the item at the specified id. If a icon was
* previously set it is cleared.
*/
- void changeTitle(int id, const QString &text);
+ void changeTitle(int id, const TQString &text);
/**
* Changes the title and icon of the title item at the specified id.
*/
- void changeTitle(int id, const QPixmap &icon, const QString &text);
+ void changeTitle(int id, const TQPixmap &icon, const TQString &text);
/**
* Returns the title of the title item at the specified id. The default
* id of -1 is for backwards compatibility only, you should always specify
* the id.
*/
- QString title(int id=-1) const;
+ TQString title(int id=-1) const;
/**
* Returns the icon of the title item at the specified id.
*/
- QPixmap titlePixmap(int id) const;
+ TQPixmap titlePixmap(int id) const;
/**
* Enables keyboard navigation by searching for the entered key sequence.
@@ -190,26 +190,26 @@ public:
* Obsolete method provided for backwards compatibility only. Use the
* normal constructor and insertTitle instead.
*/
- KPopupMenu(const QString &title, QWidget *parent=0, const char *name=0) KDE_DEPRECATED;
+ KPopupMenu(const TQString &title, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED;
/**
* @deprecated
* Obsolete method provided for backwards compatibility only. Use
* insertTitle and changeTitle instead.
*/
- void setTitle(const QString &title) KDE_DEPRECATED;
+ void setTitle(const TQString &title) KDE_DEPRECATED;
/**
* Returns the context menu associated with this menu
* @since 3.2
*/
- QPopupMenu* contextMenu();
+ TQPopupMenu* contextMenu();
/**
* Returns the context menu associated with this menu
* @since 3.2
*/
- const QPopupMenu* contextMenu() const;
+ const TQPopupMenu* contextMenu() const;
/**
* Hides the context menu if shown
@@ -249,27 +249,27 @@ signals:
* @param ctxMenu The context menu itself
* @since 3.2
*/
- void aboutToShowContextMenu(KPopupMenu* menu, int menuItem, QPopupMenu* ctxMenu);
+ void aboutToShowContextMenu(KPopupMenu* menu, int menuItem, TQPopupMenu* ctxMenu);
protected:
- virtual void closeEvent(QCloseEvent *);
- virtual void keyPressEvent(QKeyEvent* e);
+ virtual void closeEvent(TQCloseEvent *);
+ virtual void keyPressEvent(TQKeyEvent* e);
/// @since 3.4
- virtual void mouseReleaseEvent(QMouseEvent* e);
- virtual void mousePressEvent(QMouseEvent* e);
+ virtual void mouseReleaseEvent(TQMouseEvent* e);
+ virtual void mousePressEvent(TQMouseEvent* e);
virtual bool focusNextPrevChild( bool next );
- virtual void contextMenuEvent(QContextMenuEvent *e);
- virtual void hideEvent(QHideEvent*);
+ virtual void contextMenuEvent(TQContextMenuEvent *e);
+ virtual void hideEvent(TQHideEvent*);
virtual void virtual_hook( int id, void* data );
protected slots:
/// @since 3.1
- QString underlineText(const QString& text, uint length);
+ TQString underlineText(const TQString& text, uint length);
/// @since 3.1
void resetKeyboardVars(bool noMatches = false);
void itemHighlighted(int whichItem);
- void showCtxMenu(QPoint pos);
+ void showCtxMenu(TQPoint pos);
void ctxMenuHiding();
void ctxMenuHideShowingMenu();
diff --git a/kdeui/kprogress.cpp b/kdeui/kprogress.cpp
index 89d41205d..17994eb88 100644
--- a/kdeui/kprogress.cpp
+++ b/kdeui/kprogress.cpp
@@ -22,15 +22,15 @@
#include <stdlib.h>
#include <limits.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include "kprogress.h"
@@ -38,15 +38,15 @@
#include <klocale.h>
#include <kwin.h>
-KProgress::KProgress(QWidget *parent, const char *name, WFlags f)
- : QProgressBar(parent, name, f),
+KProgress::KProgress(TQWidget *parent, const char *name, WFlags f)
+ : TQProgressBar(parent, name, f),
mFormat("%p%")
{
setProgress(0);
}
-KProgress::KProgress(int totalSteps, QWidget *parent, const char *name, WFlags f)
- : QProgressBar(totalSteps, parent, name, f),
+KProgress::KProgress(int totalSteps, TQWidget *parent, const char *name, WFlags f)
+ : TQProgressBar(totalSteps, parent, name, f),
mFormat("%p%")
{
setProgress(0);
@@ -63,7 +63,7 @@ void KProgress::advance(int offset)
void KProgress::setTotalSteps(int totalSteps)
{
- QProgressBar::setTotalSteps(totalSteps);
+ TQProgressBar::setTotalSteps(totalSteps);
if (totalSteps)
{
@@ -73,7 +73,7 @@ void KProgress::setTotalSteps(int totalSteps)
void KProgress::setProgress(int progress)
{
- QProgressBar::setProgress(progress);
+ TQProgressBar::setProgress(progress);
if (totalSteps())
{
@@ -109,14 +109,14 @@ bool KProgress::textEnabled() const
return percentageVisible();
}
-void KProgress::setFormat(const QString & format)
+void KProgress::setFormat(const TQString & format)
{
mFormat = format;
if (mFormat != "%p%")
setCenterIndicator(true);
}
-QString KProgress::format() const
+TQString KProgress::format() const
{
return mFormat;
}
@@ -127,23 +127,23 @@ int KProgress::value() const
return progress();
}
-bool KProgress::setIndicator(QString &indicator, int progress, int totalSteps)
+bool KProgress::setIndicator(TQString &indicator, int progress, int totalSteps)
{
if (!totalSteps)
return false;
- QString newString(mFormat);
- newString.replace(QString::fromLatin1("%v"),
- QString::number(progress));
- newString.replace(QString::fromLatin1("%m"),
- QString::number(totalSteps));
+ TQString newString(mFormat);
+ newString.replace(TQString::fromLatin1("%v"),
+ TQString::number(progress));
+ newString.replace(TQString::fromLatin1("%m"),
+ TQString::number(totalSteps));
if (totalSteps > INT_MAX / 1000) {
progress /= 1000;
totalSteps /= 1000;
}
- newString.replace(QString::fromLatin1("%p"),
- QString::number((progress * 100) / totalSteps));
+ newString.replace(TQString::fromLatin1("%p"),
+ TQString::number((progress * 100) / totalSteps));
if (newString != indicator)
{
@@ -166,8 +166,8 @@ struct KProgressDialog::KProgressDialogPrivate
/*
* KProgressDialog implementation
*/
-KProgressDialog::KProgressDialog(QWidget* parent, const char* name,
- const QString& caption, const QString& text,
+KProgressDialog::KProgressDialog(TQWidget* parent, const char* name,
+ const TQString& caption, const TQString& text,
bool modal)
: KDialogBase(KDialogBase::Plain, caption, KDialogBase::Cancel,
KDialogBase::Cancel, parent, name, modal),
@@ -182,23 +182,23 @@ KProgressDialog::KProgressDialog(QWidget* parent, const char* name,
#ifdef Q_WS_X11
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
#endif
- mShowTimer = new QTimer(this);
+ mShowTimer = new TQTimer(this);
showButton(KDialogBase::Close, false);
mCancelText = actionButton(KDialogBase::Cancel)->text();
- QFrame* mainWidget = plainPage();
- QVBoxLayout* layout = new QVBoxLayout(mainWidget, 10);
+ TQFrame* mainWidget = plainPage();
+ TQVBoxLayout* layout = new TQVBoxLayout(mainWidget, 10);
- mLabel = new QLabel(text, mainWidget);
+ mLabel = new TQLabel(text, mainWidget);
layout->addWidget(mLabel);
mProgressBar = new KProgress(mainWidget);
layout->addWidget(mProgressBar);
- connect(mProgressBar, SIGNAL(percentageChanged(int)),
- this, SLOT(slotAutoActions(int)));
- connect(mShowTimer, SIGNAL(timeout()), this, SLOT(slotAutoShow()));
+ connect(mProgressBar, TQT_SIGNAL(percentageChanged(int)),
+ this, TQT_SLOT(slotAutoActions(int)));
+ connect(mShowTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoShow()));
mShowTimer->start(mMinDuration, true);
}
@@ -290,18 +290,18 @@ const KProgress* KProgressDialog::progressBar() const
return mProgressBar;
}
-void KProgressDialog::setLabel(const QString& text)
+void KProgressDialog::setLabel(const TQString& text)
{
mLabel->setText(text);
}
// ### KDE 4 remove
-QString KProgressDialog::labelText()
+TQString KProgressDialog::labelText()
{
return mLabel->text();
}
-QString KProgressDialog::labelText() const
+TQString KProgressDialog::labelText() const
{
return mLabel->text();
}
@@ -343,19 +343,19 @@ void KProgressDialog::setAutoReset(bool autoReset)
mAutoReset = autoReset;
}
-void KProgressDialog::setButtonText(const QString& text)
+void KProgressDialog::setButtonText(const TQString& text)
{
mCancelText = text;
setButtonCancel(text);
}
// ### KDE 4 remove
-QString KProgressDialog::buttonText()
+TQString KProgressDialog::buttonText()
{
return mCancelText;
}
-QString KProgressDialog::buttonText() const
+TQString KProgressDialog::buttonText() const
{
return mCancelText;
}
diff --git a/kdeui/kprogress.h b/kdeui/kprogress.h
index 28ed989c7..b86e28598 100644
--- a/kdeui/kprogress.h
+++ b/kdeui/kprogress.h
@@ -19,20 +19,20 @@
* *
* KProgress -- progress indicator widget for KDE *
* Original QRangeControl-based version written by Martynas Kunigelis *
-* Current QProgressBar based version by Aaron Seigo *
+* Current TQProgressBar based version by Aaron Seigo *
* *
*****************************************************************************/
#ifndef _KPROGRESS_H
#define _KPROGRESS_H "$Id$"
-#include <qprogressbar.h>
+#include <tqprogressbar.h>
#include <kdialogbase.h>
/**
* @short A progress indicator widget.
*
- * KProgress is derived from QProgressBar, so
+ * KProgress is derived from TQProgressBar, so
* you can use all the methods from that class. The only real difference
* is that a signal is emitted on changes to the value and you do not need
* to subclass KProgress just to change the format of the indicator text.
@@ -51,7 +51,7 @@ public:
/**
* Construct a progress bar.
*/
- KProgress(QWidget *parent=0, const char *name=0, WFlags f = 0);
+ KProgress(TQWidget *parent=0, const char *name=0, WFlags f = 0);
/**
* Construct a progress bar with a total number of steps.
@@ -59,7 +59,7 @@ public:
* bar represents. For example, if the operation is to examine 50 files, this value would be 50. Before examining
* the first file, call setProgress(0); call setProgress(50) after examining the last file.
*/
- KProgress(int totalSteps, QWidget *parent=0, const char *name=0, WFlags f = 0);
+ KProgress(int totalSteps, TQWidget *parent=0, const char *name=0, WFlags f = 0);
/**
* Destruct the progress bar.
@@ -92,7 +92,7 @@ public:
* Retrieve the current format for printing status text.
* @see setFormat()
*/
- QString format() const;
+ TQString format() const;
/**
* @deprecated but kept for source compatibility with KDE2's KProgress.
@@ -121,7 +121,7 @@ public slots:
* @param format "%p" is replaced by percentage done, "%v" is replaced by actual
* value, "%m" is replaced by the maximum value.
*/
- void setFormat(const QString & format);
+ void setFormat(const TQString & format);
/**
* Set the current total number of steps in the action that the progress bar
@@ -156,10 +156,10 @@ signals:
void percentageChanged(int);
protected:
- virtual bool setIndicator(QString & indicator, int progress, int totalSteps);
+ virtual bool setIndicator(TQString & indicator, int progress, int totalSteps);
private:
- QString mFormat;
+ TQString mFormat;
protected:
virtual void virtual_hook( int id, void* data );
@@ -198,9 +198,9 @@ class KDEUI_EXPORT KProgressDialog : public KDialogBase
* @param text Text to display in the dialog
* @param modal Set to true to make the dialog modal
*/
- KProgressDialog(QWidget* parent = 0, const char* name = 0,
- const QString& caption = QString::null,
- const QString& text = QString::null,
+ KProgressDialog(TQWidget* parent = 0, const char* name = 0,
+ const TQString& caption = TQString::null,
+ const TQString& text = TQString::null,
bool modal = false);
/**
@@ -227,19 +227,19 @@ class KDEUI_EXPORT KProgressDialog : public KDialogBase
*
* @param text the text to display
*/
- void setLabel(const QString & text);
+ void setLabel(const TQString & text);
/**
* Returns the current dialog text
* @deprecated
*/
// ### Remove this KDE 4.0
- QString labelText() KDE_DEPRECATED;
+ TQString labelText() KDE_DEPRECATED;
/**
* Returns the current dialog text
*/
- QString labelText() const;
+ TQString labelText() const;
/**
* Sets whether or not the user can cancel the process.
@@ -337,19 +337,19 @@ class KDEUI_EXPORT KProgressDialog : public KDialogBase
/**
* Sets the text to appear on the cancel button.
*/
- void setButtonText(const QString&);
+ void setButtonText(const TQString&);
/**
* Returns the text on the cancel button
* @deprecated
*/
// ### Remove this KDE 4.0
- QString buttonText() KDE_DEPRECATED;
+ TQString buttonText() KDE_DEPRECATED;
/**
* Returns the text on the cancel button
*/
- QString buttonText() const;
+ TQString buttonText() const;
/**
* Set the minimum number of milliseconds to wait before
@@ -386,10 +386,10 @@ class KDEUI_EXPORT KProgressDialog : public KDialogBase
bool mCancelled;
bool mAllowCancel;
bool mShown;
- QString mCancelText;
- QLabel* mLabel;
+ TQString mCancelText;
+ TQLabel* mLabel;
KProgress* mProgressBar;
- QTimer* mShowTimer;
+ TQTimer* mShowTimer;
int mMinDuration;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kprogressbox.cpp b/kdeui/kprogressbox.cpp
index 965d8179b..472d36fba 100644
--- a/kdeui/kprogressbox.cpp
+++ b/kdeui/kprogressbox.cpp
@@ -23,15 +23,15 @@
#include <stdlib.h>
#include <limits.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include "kprogress.h"
#include "ktextedit.h"
@@ -53,8 +53,8 @@ struct KProgressBoxDialog::KProgressBoxDialogPrivate
/*
* KProgressBoxDialog implementation
*/
-KProgressBoxDialog::KProgressBoxDialog(QWidget* parent, const char* name,
- const QString& caption, const QString& text,
+KProgressBoxDialog::KProgressBoxDialog(TQWidget* parent, const char* name,
+ const TQString& caption, const TQString& text,
bool modal)
: KDialogBase(KDialogBase::Plain, caption, KDialogBase::Cancel,
KDialogBase::Cancel, parent, name, modal),
@@ -70,15 +70,15 @@ KProgressBoxDialog::KProgressBoxDialog(QWidget* parent, const char* name,
#ifdef Q_WS_X11
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
#endif
- mShowTimer = new QTimer(this);
+ mShowTimer = new TQTimer(this);
showButton(KDialogBase::Close, false);
mCancelText = actionButton(KDialogBase::Cancel)->text();
- QFrame* mainWidget = plainPage();
- QVBoxLayout* layout = new QVBoxLayout(mainWidget, 10);
+ TQFrame* mainWidget = plainPage();
+ TQVBoxLayout* layout = new TQVBoxLayout(mainWidget, 10);
- mLabel = new QLabel(text, mainWidget);
+ mLabel = new TQLabel(text, mainWidget);
layout->addWidget(mLabel);
mProgressBar = new KProgress(mainWidget);
@@ -86,9 +86,9 @@ KProgressBoxDialog::KProgressBoxDialog(QWidget* parent, const char* name,
mTextBox = new KTextEdit(mainWidget);
layout->addWidget(mTextBox);
- connect(mProgressBar, SIGNAL(percentageChanged(int)),
- this, SLOT(slotAutoActions(int)));
- connect(mShowTimer, SIGNAL(timeout()), this, SLOT(slotAutoShow()));
+ connect(mProgressBar, TQT_SIGNAL(percentageChanged(int)),
+ this, TQT_SLOT(slotAutoActions(int)));
+ connect(mShowTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoShow()));
mShowTimer->start(mMinDuration, true);
}
@@ -196,18 +196,18 @@ const KTextEdit* KProgressBoxDialog::textEdit() const
return mTextBox;
}
-void KProgressBoxDialog::setLabel(const QString& text)
+void KProgressBoxDialog::setLabel(const TQString& text)
{
mLabel->setText(text);
}
// ### KDE 4 remove
-QString KProgressBoxDialog::labelText()
+TQString KProgressBoxDialog::labelText()
{
return mLabel->text();
}
-QString KProgressBoxDialog::labelText() const
+TQString KProgressBoxDialog::labelText() const
{
return mLabel->text();
}
@@ -249,19 +249,19 @@ void KProgressBoxDialog::setAutoReset(bool autoReset)
mAutoReset = autoReset;
}
-void KProgressBoxDialog::setButtonText(const QString& text)
+void KProgressBoxDialog::setButtonText(const TQString& text)
{
mCancelText = text;
setButtonCancel(text);
}
// ### KDE 4 remove
-QString KProgressBoxDialog::buttonText()
+TQString KProgressBoxDialog::buttonText()
{
return mCancelText;
}
-QString KProgressBoxDialog::buttonText() const
+TQString KProgressBoxDialog::buttonText() const
{
return mCancelText;
}
diff --git a/kdeui/kprogressbox.h b/kdeui/kprogressbox.h
index 25fbee4dc..08db1be8a 100644
--- a/kdeui/kprogressbox.h
+++ b/kdeui/kprogressbox.h
@@ -20,7 +20,7 @@
* *
* KProgressBox -- progress indicator widget for KDE *
* Original QRangeControl-based version written by Martynas Kunigelis *
-* Current QProgressBar based version by Aaron Seigo *
+* Current TQProgressBar based version by Aaron Seigo *
* Textbox extension by Timothy Pearson *
* *
*****************************************************************************/
@@ -28,7 +28,7 @@
#ifndef _KProgressBox_H
#define _KProgressBox_H "$Id: KProgressBox.h 589356 2006-09-28 00:58:09Z tpearson $"
-#include <qprogressbar.h>
+#include <tqprogressbar.h>
#include <kdialogbase.h>
#include <kprogress.h>
#include <ktextedit.h>
@@ -65,9 +65,9 @@ class KDEUI_EXPORT KProgressBoxDialog : public KDialogBase
* @param text Text to display in the dialog
* @param modal Set to true to make the dialog modal
*/
- KProgressBoxDialog(QWidget* parent = 0, const char* name = 0,
- const QString& caption = QString::null,
- const QString& text = QString::null,
+ KProgressBoxDialog(TQWidget* parent = 0, const char* name = 0,
+ const TQString& caption = TQString::null,
+ const TQString& text = TQString::null,
bool modal = false);
/**
@@ -108,19 +108,19 @@ class KDEUI_EXPORT KProgressBoxDialog : public KDialogBase
*
* @param text the text to display
*/
- void setLabel(const QString & text);
+ void setLabel(const TQString & text);
/**
* Returns the current dialog text
* @deprecated
*/
// ### Remove this KDE 4.0
- QString labelText() KDE_DEPRECATED;
+ TQString labelText() KDE_DEPRECATED;
/**
* Returns the current dialog text
*/
- QString labelText() const;
+ TQString labelText() const;
/**
* Sets whether or not the user can cancel the process.
@@ -225,19 +225,19 @@ class KDEUI_EXPORT KProgressBoxDialog : public KDialogBase
/**
* Sets the text to appear on the cancel button.
*/
- void setButtonText(const QString&);
+ void setButtonText(const TQString&);
/**
* Returns the text on the cancel button
* @deprecated
*/
// ### Remove this KDE 4.0
- QString buttonText() KDE_DEPRECATED;
+ TQString buttonText() KDE_DEPRECATED;
/**
* Returns the text on the cancel button
*/
- QString buttonText() const;
+ TQString buttonText() const;
/**
* Set the minimum number of milliseconds to wait before
@@ -275,11 +275,11 @@ class KDEUI_EXPORT KProgressBoxDialog : public KDialogBase
bool mAllowCancel;
bool mAllowTextEdit;
bool mShown;
- QString mCancelText;
- QLabel* mLabel;
+ TQString mCancelText;
+ TQLabel* mLabel;
KProgress* mProgressBar;
KTextEdit* mTextBox;
- QTimer* mShowTimer;
+ TQTimer* mShowTimer;
int mMinDuration;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kpushbutton.cpp b/kdeui/kpushbutton.cpp
index a755fe3b3..52679c0e5 100644
--- a/kdeui/kpushbutton.cpp
+++ b/kdeui/kpushbutton.cpp
@@ -19,9 +19,9 @@
#include "kpushbutton.h"
-#include <qdragobject.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqdragobject.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#include "config.h"
@@ -40,32 +40,32 @@ public:
bool KPushButton::s_useIcons = false;
-KPushButton::KPushButton( QWidget *parent, const char *name )
- : QPushButton( parent, name ),
+KPushButton::KPushButton( TQWidget *parent, const char *name )
+ : TQPushButton( parent, name ),
m_dragEnabled( false )
{
init( KGuiItem( "" ) );
}
-KPushButton::KPushButton( const QString &text, QWidget *parent,
+KPushButton::KPushButton( const TQString &text, TQWidget *parent,
const char *name)
- : QPushButton( parent, name ),
+ : TQPushButton( parent, name ),
m_dragEnabled( false )
{
init( KGuiItem( text ) );
}
-KPushButton::KPushButton( const QIconSet &icon, const QString &text,
- QWidget *parent, const char *name )
- : QPushButton( text, parent, name ),
+KPushButton::KPushButton( const TQIconSet &icon, const TQString &text,
+ TQWidget *parent, const char *name )
+ : TQPushButton( text, parent, name ),
m_dragEnabled( false )
{
init( KGuiItem( text, icon ) );
}
-KPushButton::KPushButton( const KGuiItem &item, QWidget *parent,
+KPushButton::KPushButton( const KGuiItem &item, TQWidget *parent,
const char *name )
- : QPushButton( parent, name ),
+ : TQPushButton( parent, name ),
m_dragEnabled( false )
{
init( item );
@@ -88,7 +88,7 @@ void KPushButton::init( const KGuiItem &item )
// call QPushButton's implementation since we don't need to
// set the GUI items text or check the state of the icon set
- QPushButton::setText( d->item.text() );
+ TQPushButton::setText( d->item.text() );
static bool initialized = false;
if ( !initialized ) {
@@ -98,16 +98,16 @@ void KPushButton::init( const KGuiItem &item )
setIconSet( d->item.iconSet() );
- setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
- QToolTip::add( this, item.toolTip() );
+ TQToolTip::add( this, item.toolTip() );
- QWhatsThis::add( this, item.whatsThis() );
+ TQWhatsThis::add( this, item.whatsThis() );
if (kapp)
{
- connect( kapp, SIGNAL( settingsChanged(int) ),
- SLOT( slotSettingsChanged(int) ) );
+ connect( kapp, TQT_SIGNAL( settingsChanged(int) ),
+ TQT_SLOT( slotSettingsChanged(int) ) );
kapp->addKipcEventMask( KIPC::SettingsChanged );
}
}
@@ -123,15 +123,15 @@ void KPushButton::setGuiItem( const KGuiItem& item )
// call QPushButton's implementation since we don't need to
// set the GUI items text or check the state of the icon set
- QPushButton::setText( d->item.text() );
+ TQPushButton::setText( d->item.text() );
setIconSet( d->item.iconSet() );
- QWhatsThis::add( this, d->item.whatsThis() );
+ TQWhatsThis::add( this, d->item.whatsThis() );
// Do not add a tooltip to the button automatically as 99% of the time the
// tooltip is redundant to the button text and it results in QTipManager
- // invoking an eventHandler on the QApplication which breaks certain apps
+ // invoking an eventHandler on the TQApplication which breaks certain apps
// like KDesktop which are sensitive to such things
-// QToolTip::add( this, d->item.toolTip() );
+// TQToolTip::add( this, d->item.toolTip() );
}
void KPushButton::setGuiItem( KStdGuiItem::StdItem item )
@@ -145,9 +145,9 @@ KStdGuiItem::StdItem KPushButton::guiItem() const
return d->itemType;
}
-void KPushButton::setText( const QString &text )
+void KPushButton::setText( const TQString &text )
{
- QPushButton::setText(text);
+ TQPushButton::setText(text);
// we need to re-evaluate the icon set when the text
// is removed, or when it is supplied
@@ -157,14 +157,14 @@ void KPushButton::setText( const QString &text )
d->item.setText(text);
}
-void KPushButton::setIconSet( const QIconSet &iconSet )
+void KPushButton::setIconSet( const TQIconSet &iconSet )
{
d->item.setIconSet(iconSet);
if ( s_useIcons || text().isEmpty() )
- QPushButton::setIconSet( iconSet );
+ TQPushButton::setIconSet( iconSet );
else
- QPushButton::setIconSet( QIconSet() );
+ TQPushButton::setIconSet( TQIconSet() );
}
void KPushButton::slotSettingsChanged( int /* category */ )
@@ -178,18 +178,18 @@ void KPushButton::setDragEnabled( bool enable )
m_dragEnabled = enable;
}
-void KPushButton::mousePressEvent( QMouseEvent *e )
+void KPushButton::mousePressEvent( TQMouseEvent *e )
{
if ( m_dragEnabled )
startPos = e->pos();
- QPushButton::mousePressEvent( e );
+ TQPushButton::mousePressEvent( e );
}
-void KPushButton::mouseMoveEvent( QMouseEvent *e )
+void KPushButton::mouseMoveEvent( TQMouseEvent *e )
{
if ( !m_dragEnabled )
{
- QPushButton::mouseMoveEvent( e );
+ TQPushButton::mouseMoveEvent( e );
return;
}
@@ -202,14 +202,14 @@ void KPushButton::mouseMoveEvent( QMouseEvent *e )
}
}
-QDragObject * KPushButton::dragObject()
+TQDragObject * KPushButton::dragObject()
{
return 0L;
}
void KPushButton::startDrag()
{
- QDragObject *d = dragObject();
+ TQDragObject *d = dragObject();
if ( d )
d->dragCopy();
}
diff --git a/kdeui/kpushbutton.h b/kdeui/kpushbutton.h
index 637cfceb3..0b60d1b4c 100644
--- a/kdeui/kpushbutton.h
+++ b/kdeui/kpushbutton.h
@@ -20,18 +20,18 @@
#ifndef KPUSHBUTTON_H
#define KPUSHBUTTON_H
-#include <qpoint.h>
-#include <qpushbutton.h>
+#include <tqpoint.h>
+#include <tqpushbutton.h>
#include <kguiitem.h>
#include <kstdguiitem.h>
class QDragObject;
/**
- * This is nothing but a QPushButton with drag-support and KGuiItem support. You have to call
+ * This is nothing but a TQPushButton with drag-support and KGuiItem support. You have to call
* setDragEnabled( true ) and override the virtual method
- * dragObject() to specify the QDragObject to be used.
+ * dragObject() to specify the TQDragObject to be used.
*
- * @short A QPushButton with drag-support and KGuiItem support
+ * @short A TQPushButton with drag-support and KGuiItem support
* @author Carsten Pfeiffer <pfeiffer@kde.org>
*/
class KDEUI_EXPORT KPushButton : public QPushButton
@@ -45,24 +45,24 @@ public:
/**
* Default constructor.
*/
- KPushButton( QWidget *parent, const char *name=0 );
+ KPushButton( TQWidget *parent, const char *name=0 );
/**
* Constructor, that sets the button-text to @p text
*/
- KPushButton( const QString &text, QWidget *parent, const char *name=0);
+ KPushButton( const TQString &text, TQWidget *parent, const char *name=0);
/**
* Constructor, that sets an icon and the button-text to @p text
*/
- KPushButton( const QIconSet &icon, const QString &text,
- QWidget *parent, const char *name=0 );
+ KPushButton( const TQIconSet &icon, const TQString &text,
+ TQWidget *parent, const char *name=0 );
/**
* Constructor that takes a KGuiItem for the text, the icon, the tooltip
* and the what's this help
*/
- KPushButton( const KGuiItem &item, QWidget *parent, const char *name = 0 );
+ KPushButton( const KGuiItem &item, TQWidget *parent, const char *name = 0 );
/**
* Destructs the button.
@@ -104,29 +104,29 @@ public:
* Sets the Icon Set for this button. It also takes into account hte
* KGlobalSettings::showIconsOnPushButtons() setting.
*/
- void setIconSet( const QIconSet &iconSet );
+ void setIconSet( const TQIconSet &iconSet );
/**
* Sets the text of the button
*/
- void setText( const QString &text );
+ void setText( const TQString &text );
protected:
/**
- * Reimplement this and return the QDragObject that should be used
+ * Reimplement this and return the TQDragObject that should be used
* for the drag.
* Default implementation returns 0L, so that no drag is initiated.
*/
- virtual QDragObject * dragObject();
+ virtual TQDragObject * dragObject();
/**
* Reimplemented to add drag-support
*/
- virtual void mousePressEvent( QMouseEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
/**
* Reimplemented to add drag-support
*/
- virtual void mouseMoveEvent( QMouseEvent * );
+ virtual void mouseMoveEvent( TQMouseEvent * );
/**
* Starts a drag (dragCopy() by default) using dragObject()
@@ -135,7 +135,7 @@ protected:
private:
bool m_dragEnabled;
- QPoint startPos;
+ TQPoint startPos;
private slots:
void slotSettingsChanged( int category );
diff --git a/kdeui/krestrictedline.cpp b/kdeui/krestrictedline.cpp
index 1847017d5..85c52d54c 100644
--- a/kdeui/krestrictedline.cpp
+++ b/kdeui/krestrictedline.cpp
@@ -21,13 +21,13 @@
*
*/
-#include <qkeycode.h>
+#include <tqkeycode.h>
#include "krestrictedline.h"
-KRestrictedLine::KRestrictedLine( QWidget *parent,
+KRestrictedLine::KRestrictedLine( TQWidget *parent,
const char *name,
- const QString& valid )
+ const TQString& valid )
: KLineEdit( parent, name )
{
qsValidChars = valid;
@@ -39,13 +39,13 @@ KRestrictedLine::~KRestrictedLine()
}
-void KRestrictedLine::keyPressEvent( QKeyEvent *e )
+void KRestrictedLine::keyPressEvent( TQKeyEvent *e )
{
- // let QLineEdit process "special" keys and return/enter
+ // let TQLineEdit process "special" keys and return/enter
// so that we still can use the default key binding
if (e->key() == Key_Enter || e->key() == Key_Return || e->key() == Key_Delete || e->ascii() < 32)
{
- QLineEdit::keyPressEvent(e);
+ TQLineEdit::keyPressEvent(e);
return;
}
@@ -58,19 +58,19 @@ void KRestrictedLine::keyPressEvent( QKeyEvent *e )
return;
}
else
- // valid char: let QLineEdit process this key as usual
- QLineEdit::keyPressEvent(e);
+ // valid char: let TQLineEdit process this key as usual
+ TQLineEdit::keyPressEvent(e);
return;
}
-void KRestrictedLine::setValidChars( const QString& valid)
+void KRestrictedLine::setValidChars( const TQString& valid)
{
qsValidChars = valid;
}
-QString KRestrictedLine::validChars() const
+TQString KRestrictedLine::validChars() const
{
return qsValidChars;
}
diff --git a/kdeui/krestrictedline.h b/kdeui/krestrictedline.h
index 884b25782..7d13f40ca 100644
--- a/kdeui/krestrictedline.h
+++ b/kdeui/krestrictedline.h
@@ -30,33 +30,33 @@
/**
* @short A line editor for restricted character sets.
*
- * The KRestrictedLine widget is a variant of QLineEdit which
+ * The KRestrictedLine widget is a variant of TQLineEdit which
* accepts only a restricted set of characters as input.
* All other characters will be discarded and the signal invalidChar()
* will be emitted for each of them.
*
- * Valid characters can be passed as a QString to the constructor
+ * Valid characters can be passed as a TQString to the constructor
* or set afterwards via setValidChars().
- * The default key bindings of QLineEdit are still in effect.
+ * The default key bindings of TQLineEdit are still in effect.
*
* @author Michael Wiedmann <mw@miwie.in-berlin.de>
*/
class KDEUI_EXPORT KRestrictedLine : public KLineEdit
{
Q_OBJECT
- Q_PROPERTY( QString validChars READ validChars WRITE setValidChars )
+ Q_PROPERTY( TQString validChars READ validChars WRITE setValidChars )
public:
/**
* Constructor: This contructor takes three - optional - arguments.
- * The first two parameters are simply passed on to QLineEdit.
+ * The first two parameters are simply passed on to TQLineEdit.
* @param parent pointer to the parent widget
* @param name pointer to the name of this widget
* @param valid pointer to set of valid characters
*/
- KRestrictedLine( QWidget *parent=0, const char *name=0,
- const QString& valid = QString::null);
+ KRestrictedLine( TQWidget *parent=0, const char *name=0,
+ const TQString& valid = TQString::null);
/**
* Destructs the restricted line editor.
@@ -67,11 +67,11 @@ public:
* All characters in the string valid are treated as
* acceptable characters.
*/
- void setValidChars(const QString& valid);
+ void setValidChars(const TQString& valid);
/**
* @return the string of acceptable characters.
*/
- QString validChars() const;
+ TQString validChars() const;
signals:
@@ -81,10 +81,10 @@ signals:
void invalidChar(int);
protected:
- void keyPressEvent( QKeyEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
private:
- /// QString of valid characters for this line
+ /// TQString of valid characters for this line
QString qsValidChars;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/krootpixmap.cpp b/kdeui/krootpixmap.cpp
index 5f9591b5b..cf6af3fdf 100644
--- a/kdeui/krootpixmap.cpp
+++ b/kdeui/krootpixmap.cpp
@@ -9,10 +9,10 @@
* licensing terms.
*/
-#include <qwidget.h>
-#include <qtimer.h>
-#include <qrect.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
+#include <tqrect.h>
+#include <tqimage.h>
#include <kapplication.h>
#include <kimageeffect.h>
@@ -28,7 +28,7 @@
#include <krootpixmap.h>
-static QString wallpaperForDesktop(int desktop)
+static TQString wallpaperForDesktop(int desktop)
{
return DCOPRef("kdesktop", "KBackgroundIface").call("currentWallpaper", desktop);
}
@@ -36,21 +36,21 @@ static QString wallpaperForDesktop(int desktop)
class KRootPixmapData
{
public:
- QWidget *toplevel;
+ TQWidget *toplevel;
#ifdef Q_WS_X11
KWinModule *kwin;
#endif
};
-KRootPixmap::KRootPixmap( QWidget *widget, const char *name )
- : QObject(widget, name ? name : "KRootPixmap" ), m_Desk(0), m_pWidget(widget)
+KRootPixmap::KRootPixmap( TQWidget *widget, const char *name )
+ : TQObject(widget, name ? name : "KRootPixmap" ), m_Desk(0), m_pWidget(widget)
{
init();
}
-KRootPixmap::KRootPixmap( QWidget *widget, QObject *parent, const char *name )
- : QObject( parent, name ? name : "KRootPixmap" ), m_Desk(0), m_pWidget(widget)
+KRootPixmap::KRootPixmap( TQWidget *widget, TQObject *parent, const char *name )
+ : TQObject( parent, name ? name : "KRootPixmap" ), m_Desk(0), m_pWidget(widget)
{
init();
}
@@ -60,19 +60,19 @@ void KRootPixmap::init()
d = new KRootPixmapData;
m_Fade = 0;
m_pPixmap = new KSharedPixmap; //ordinary KPixmap on win32
- m_pTimer = new QTimer( this );
+ m_pTimer = new TQTimer( this );
m_bInit = false;
m_bActive = false;
m_bCustomPaint = false;
- connect(kapp, SIGNAL(backgroundChanged(int)), SLOT(slotBackgroundChanged(int)));
- connect(m_pTimer, SIGNAL(timeout()), SLOT(repaint()));
+ connect(kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int)));
+ connect(m_pTimer, TQT_SIGNAL(timeout()), TQT_SLOT(repaint()));
#ifdef Q_WS_X11
- connect(m_pPixmap, SIGNAL(done(bool)), SLOT(slotDone(bool)));
+ connect(m_pPixmap, TQT_SIGNAL(done(bool)), TQT_SLOT(slotDone(bool)));
d->kwin = new KWinModule( this );
- connect(d->kwin, SIGNAL(windowChanged(WId, unsigned int)), SLOT(desktopChanged(WId, unsigned int)));
- connect(d->kwin, SIGNAL(currentDesktopChanged(int)), SLOT(desktopChanged(int)));
+ connect(d->kwin, TQT_SIGNAL(windowChanged(WId, unsigned int)), TQT_SLOT(desktopChanged(WId, unsigned int)));
+ connect(d->kwin, TQT_SIGNAL(currentDesktopChanged(int)), TQT_SLOT(desktopChanged(int)));
#endif
d->toplevel = m_pWidget->topLevelWidget();
@@ -95,7 +95,7 @@ int KRootPixmap::currentDesktop() const
return rinfo.currentDesktop();
#else
//OK?
- return QApplication::desktop()->screenNumber(m_pWidget);
+ return TQApplication::desktop()->screenNumber(m_pWidget);
#endif
}
@@ -124,7 +124,7 @@ void KRootPixmap::stop()
}
-void KRootPixmap::setFadeEffect(double fade, const QColor &color)
+void KRootPixmap::setFadeEffect(double fade, const TQColor &color)
{
if (fade < 0)
m_Fade = 0;
@@ -138,10 +138,10 @@ void KRootPixmap::setFadeEffect(double fade, const QColor &color)
}
-bool KRootPixmap::eventFilter(QObject *, QEvent *event)
+bool KRootPixmap::eventFilter(TQObject *, TQEvent *event)
{
// Initialise after the first show or paint event on the managed widget.
- if (!m_bInit && ((event->type() == QEvent::Show) || (event->type() == QEvent::Paint)))
+ if (!m_bInit && ((event->type() == TQEvent::Show) || (event->type() == TQEvent::Paint)))
{
m_bInit = true;
m_Desk = currentDesktop();
@@ -152,16 +152,16 @@ bool KRootPixmap::eventFilter(QObject *, QEvent *event)
switch (event->type())
{
- case QEvent::Resize:
- case QEvent::Move:
+ case TQEvent::Resize:
+ case TQEvent::Move:
m_pTimer->start(100, true);
break;
- case QEvent::Paint:
+ case TQEvent::Paint:
m_pTimer->start(0, true);
break;
- case QEvent::Reparent:
+ case TQEvent::Reparent:
d->toplevel->removeEventFilter(this);
d->toplevel = m_pWidget->topLevelWidget();
d->toplevel->installEventFilter(this);
@@ -207,9 +207,9 @@ void KRootPixmap::repaint()
void KRootPixmap::repaint(bool force)
{
- QPoint p1 = m_pWidget->mapToGlobal(m_pWidget->rect().topLeft());
- QPoint p2 = m_pWidget->mapToGlobal(m_pWidget->rect().bottomRight());
- if (!force && (m_Rect == QRect(p1, p2)))
+ TQPoint p1 = m_pWidget->mapToGlobal(m_pWidget->rect().topLeft());
+ TQPoint p2 = m_pWidget->mapToGlobal(m_pWidget->rect().bottomRight());
+ if (!force && (m_Rect == TQRect(p1, p2)))
return;
// Due to northwest bit gravity, we don't need to do anything if the
@@ -220,11 +220,11 @@ void KRootPixmap::repaint(bool force)
(m_pWidget->height() < m_Rect.height())
)
{
- m_Rect = QRect(p1, p2);
+ m_Rect = TQRect(p1, p2);
updateBackground( m_pPixmap );
return;
}
- m_Rect = QRect(p1, p2);
+ m_Rect = TQRect(p1, p2);
#ifdef Q_WS_X11
m_Desk = KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop();
if (m_Desk == NET::OnAllDesktops)
@@ -253,12 +253,12 @@ bool KRootPixmap::isAvailable() const
#endif
}
-QString KRootPixmap::pixmapName(int desk) {
- QString pattern = QString("DESKTOP%1");
+TQString KRootPixmap::pixmapName(int desk) {
+ TQString pattern = TQString("DESKTOP%1");
#ifdef Q_WS_X11
int screen_number = DefaultScreen(qt_xdisplay());
if (screen_number) {
- pattern = QString("SCREEN%1-DESKTOP").arg(screen_number) + "%1";
+ pattern = TQString("SCREEN%1-DESKTOP").arg(screen_number) + "%1";
}
#endif
return pattern.arg( desk );
@@ -272,11 +272,11 @@ void KRootPixmap::enableExports()
DCOPClient *client = kapp->dcopClient();
if (!client->isAttached())
client->attach();
- QByteArray data;
- QDataStream args( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream args( data, IO_WriteOnly );
args << 1;
- QCString appname( "kdesktop" );
+ TQCString appname( "kdesktop" );
int screen_number = DefaultScreen(qt_xdisplay());
if ( screen_number )
appname.sprintf("kdesktop-screen-%d", screen_number );
@@ -302,12 +302,12 @@ void KRootPixmap::slotDone(bool success)
void KRootPixmap::updateBackground( KSharedPixmap *spm )
{
- QPixmap pm = *spm;
+ TQPixmap pm = *spm;
if (m_Fade > 1e-6)
{
KPixmapIO io;
- QImage img = io.convertToImage(pm);
+ TQImage img = io.convertToImage(pm);
img = KImageEffect::fade(img, m_Fade, m_FadeColor);
pm = io.convertToPixmap(img);
}
diff --git a/kdeui/krootpixmap.h b/kdeui/krootpixmap.h
index 3eef65f51..cf675c16b 100644
--- a/kdeui/krootpixmap.h
+++ b/kdeui/krootpixmap.h
@@ -11,8 +11,8 @@
#ifndef __KRootPixmap_h_Included__
#define __KRootPixmap_h_Included__
-#include <qobject.h>
-#include <qcolor.h>
+#include <tqobject.h>
+#include <tqcolor.h>
#include <kdelibs_export.h>
#ifndef Q_WS_QWS //FIXME
@@ -35,7 +35,7 @@ class KRootPixmapData;
* are handled automatically.
*
* Instead of using the default behavior, you can ask KRootPixmap
- * to emit a backgroundUpdated(const QPixmap &) signal whenever
+ * to emit a backgroundUpdated(const TQPixmap &) signal whenever
* the background needs updating by using setCustomPainting(bool).
* Alternatively by reimplementing updateBackground(KSharedPixmap*)
* you can take complete control of the behavior.
@@ -57,13 +57,13 @@ public:
* transparent.
* @param name The internal name of the pixmap
*/
- KRootPixmap( QWidget *target, const char *name=0 );
+ KRootPixmap( TQWidget *target, const char *name=0 );
/**
- * Constructs a KRootPixmap where the parent QObject and target QWidget are
+ * Constructs a KRootPixmap where the parent TQObject and target TQWidget are
* different.
*/
- KRootPixmap( QWidget *target, QObject *parent, const char *name=0 );
+ KRootPixmap( TQWidget *target, TQObject *parent, const char *name=0 );
/**
* Destructs the object.
@@ -103,7 +103,7 @@ public:
/** @since 3.2
* @return the fade color.
*/
- const QColor &color() const { return m_FadeColor; }
+ const TQColor &color() const { return m_FadeColor; }
/** @since 3.2
* @return the color opacity.
@@ -131,7 +131,7 @@ public slots:
* will use the fade color unchanged.
* @param color The color to fade to.
*/
- void setFadeEffect(double opacity, const QColor &color);
+ void setFadeEffect(double opacity, const TQColor &color);
/**
* Repaints the widget background. Normally, you shouldn't need this
@@ -165,7 +165,7 @@ public slots:
/**
* Returns the name of the shared pixmap (only needed for low level access)
*/
- static QString pixmapName(int desk);
+ static TQString pixmapName(int desk);
signals:
/**
* Emitted when the background needs updating and custom painting
@@ -173,19 +173,19 @@ signals:
*
* @param pm A pixmap containing the new background.
*/
- void backgroundUpdated( const QPixmap &pm );
+ void backgroundUpdated( const TQPixmap &pm );
protected:
/**
* Reimplemented to filter the events from the target widget and
* track its movements.
*/
- virtual bool eventFilter(QObject *, QEvent *);
+ virtual bool eventFilter(TQObject *, TQEvent *);
/**
* Called when the pixmap has been updated. The default implementation
* applies the fade effect, then sets the target's background, or emits
- * backgroundUpdated(const QPixmap &) depending on the painting mode.
+ * backgroundUpdated(const TQPixmap &) depending on the painting mode.
*/
virtual void updateBackground( KSharedPixmap * );
@@ -200,11 +200,11 @@ private:
int m_Desk;
double m_Fade;
- QColor m_FadeColor;
+ TQColor m_FadeColor;
- QRect m_Rect;
- QWidget *m_pWidget;
- QTimer *m_pTimer;
+ TQRect m_Rect;
+ TQWidget *m_pWidget;
+ TQTimer *m_pTimer;
KSharedPixmap *m_pPixmap;
KRootPixmapData *d;
diff --git a/kdeui/kruler.cpp b/kdeui/kruler.cpp
index 08cea5515..c50cf9620 100644
--- a/kdeui/kruler.cpp
+++ b/kdeui/kruler.cpp
@@ -20,8 +20,8 @@
#include "kruler.h"
-#include <qpainter.h>
-#include <qfont.h>
+#include <tqpainter.h>
+#include <tqfont.h>
#define INIT_VALUE 0
#define INIT_MIN_VALUE 0
@@ -68,7 +68,7 @@
#undef PROFILING
#ifdef PROFILING
-# include <qdatetime.h>
+# include <tqdatetime.h>
#endif
class KRuler::KRulerPrivate
@@ -91,8 +91,8 @@ public:
-KRuler::KRuler(QWidget *parent, const char *name)
- : QFrame(parent, name),
+KRuler::KRuler(TQWidget *parent, const char *name)
+ : TQFrame(parent, name),
range(INIT_MIN_VALUE, INIT_MAX_VALUE, 1, 10, INIT_VALUE),
dir(Horizontal)
{
@@ -102,8 +102,8 @@ KRuler::KRuler(QWidget *parent, const char *name)
KRuler::KRuler(Orientation orient,
- QWidget *parent, const char *name, WFlags f)
- : QFrame(parent, name, f),
+ TQWidget *parent, const char *name, WFlags f)
+ : TQFrame(parent, name, f),
range(INIT_MIN_VALUE, INIT_MAX_VALUE, 1, 10, INIT_VALUE),
dir(orient)
{
@@ -116,8 +116,8 @@ KRuler::KRuler(Orientation orient,
KRuler::KRuler(Orientation orient, int widgetWidth,
- QWidget *parent, const char *name, WFlags f)
- : QFrame(parent, name, f),
+ TQWidget *parent, const char *name, WFlags f)
+ : TQFrame(parent, name, f),
range(INIT_MIN_VALUE, INIT_MAX_VALUE, 1, 10, INIT_VALUE),
dir(orient)
{
@@ -357,21 +357,21 @@ KRuler::showEndLabel() const
void
-KRuler::setEndLabel(const QString& label)
+KRuler::setEndLabel(const TQString& label)
{
endlabel = label;
// premeasure the fontwidth and save it
if (dir == Vertical) {
- QFont font = this->font();
+ TQFont font = this->font();
font.setPointSize(LABEL_SIZE);
- QFontMetrics fm(font);
+ TQFontMetrics fm(font);
d->fontWidth = fm.width(endlabel);
}
update(contentsRect());
}
-QString KRuler::endLabel() const
+TQString KRuler::endLabel() const
{
return endlabel;
}
@@ -432,19 +432,19 @@ KRuler::setRulerMetricStyle(KRuler::MetricStyle style)
}
switch (style) {
case Pixel:
- setEndLabel(QString::fromLatin1("pixel"));
+ setEndLabel(TQString::fromLatin1("pixel"));
break;
case Inch:
- setEndLabel(QString::fromLatin1("inch"));
+ setEndLabel(TQString::fromLatin1("inch"));
break;
case Millimetres:
- setEndLabel(QString::fromLatin1("mm"));
+ setEndLabel(TQString::fromLatin1("mm"));
break;
case Centimetres:
- setEndLabel(QString::fromLatin1("cm"));
+ setEndLabel(TQString::fromLatin1("cm"));
break;
case Metres:
- setEndLabel(QString::fromLatin1("m"));
+ setEndLabel(TQString::fromLatin1("m"));
default: /* never reached, see above switch */
/* empty command */;
}
@@ -552,13 +552,13 @@ KRuler::slotNewValue(int _value)
// get the rectangular of the old and the new ruler pointer
// and repaint only him
if (dir == Horizontal) {
- QRect oldrec(-5+oldvalue,10, 11,6);
- QRect newrec(-5+_value,10, 11,6);
+ TQRect oldrec(-5+oldvalue,10, 11,6);
+ TQRect newrec(-5+_value,10, 11,6);
repaint( oldrec.unite(newrec) );
}
else {
- QRect oldrec(10,-5+oldvalue, 6,11);
- QRect newrec(10,-5+_value, 6,11);
+ TQRect oldrec(10,-5+oldvalue, 6,11);
+ TQRect newrec(10,-5+_value, 6,11);
repaint( oldrec.unite(newrec) );
}
}
@@ -591,12 +591,12 @@ KRuler::slotEndOffset(int offset)
}
void
-KRuler::drawContents(QPainter *p)
+KRuler::drawContents(TQPainter *p)
{
// debug ("KRuler::drawContents, %s",(horizontal==dir)?"horizontal":"vertical");
#ifdef PROFILING
- QTime time;
+ TQTime time;
time.start();
for (int profile=0; profile<10; profile++) {
#endif
@@ -625,7 +625,7 @@ KRuler::drawContents(QPainter *p)
fontOffset = (((double)minval)>offsetmin)?(double)minval:offsetmin;
// draw labels
- QFont font = p->font();
+ TQFont font = p->font();
font.setPointSize(LABEL_SIZE);
p->setFont( font );
// draw littlemarklabel
@@ -641,7 +641,7 @@ KRuler::drawContents(QPainter *p)
p->drawText( END_LABEL_X, END_LABEL_Y, endlabel );
}
else { // rotate text +pi/2 and move down a bit
- //QFontMetrics fm(font);
+ //TQFontMetrics fm(font);
#ifdef KRULER_ROTATE_TEST
p->rotate( -90.0 + rotate );
p->translate( -8.0 - fontOffset - d->fontWidth + xtrans,
@@ -717,7 +717,7 @@ KRuler::drawContents(QPainter *p)
// draw pointer
if (d->showpointer) {
- QPointArray pa(4);
+ TQPointArray pa(4);
if (dir == Horizontal) {
pa.setPoints(3, value-5, 10, value+5, 10, value/*+0*/,15);
}
diff --git a/kdeui/kruler.h b/kdeui/kruler.h
index 8d1ae3cc7..997eb5c36 100644
--- a/kdeui/kruler.h
+++ b/kdeui/kruler.h
@@ -21,8 +21,8 @@
#ifndef KRULER_H
#define KRULER_H
-#include <qframe.h>
-#include <qrangecontrol.h>
+#include <tqframe.h>
+#include <tqrangecontrol.h>
#include <kdelibs_export.h>
/**
@@ -55,12 +55,12 @@
* To receive mouse clicks or mouse moves,
* the class has to be overloaded.
*
- * For performance reasons, the public methods don't call QWidget::repaint().
+ * For performance reasons, the public methods don't call TQWidget::repaint().
* (Slots do, see documentation below.)
* All the changed settings will be painted once after leaving
* to the main event loop.
* For performance painting the slot methods should be used,
- * they do a fast QWidget::repaint() call after changing the values.
+ * they do a fast TQWidget::repaint() call after changing the values.
* For setting multiple values like minValue(), maxValue(), offset() etc.
* using the public methods is recommended
* so the widget will be painted only once when entering the main event loop.
@@ -111,21 +111,21 @@ public:
/**
* Constructs a horizontal ruler.
*/
- KRuler(QWidget *parent=0, const char *name=0);
+ KRuler(TQWidget *parent=0, const char *name=0);
/**
* Constructs a ruler with orientation @p orient.
*
- * @p parent, @p name and @p f are passed to QFrame.
+ * @p parent, @p name and @p f are passed to TQFrame.
* The default look is a raised widget
- * but may be changed with the inherited QFrame methods.
+ * but may be changed with the inherited TQFrame methods.
*
* @param orient Orientation of the ruler.
- * @param parent Will be handed over to QFrame.
- * @param name Will be handed over to QFrame.
- * @param f Will be handed over to QFrame.
+ * @param parent Will be handed over to TQFrame.
+ * @param name Will be handed over to TQFrame.
+ * @param f Will be handed over to TQFrame.
*
**/
- KRuler(Orientation orient, QWidget *parent=0, const char *name=0,
+ KRuler(Orientation orient, TQWidget *parent=0, const char *name=0,
WFlags f=0);
/**
@@ -134,16 +134,16 @@ public:
* The width sets the fixed width of the widget. This is useful if you
* want to draw the ruler bigger or smaller than the default size.
* Note: The size of the marks doesn't change.
- * @p parent, @p name and @p f are passed to QFrame.
+ * @p parent, @p name and @p f are passed to TQFrame.
*
* @param orient Orientation of the ruler.
* @param widgetWidth Fixed width of the widget.
- * @param parent Will be handed over to QFrame.
- * @param name Will be handed over to QFrame.
- * @param f Will be handed over to QFrame.
+ * @param parent Will be handed over to TQFrame.
+ * @param name Will be handed over to TQFrame.
+ * @param f Will be handed over to TQFrame.
*
*/
- KRuler(Orientation orient, int widgetWidth, QWidget *parent=0,
+ KRuler(Orientation orient, int widgetWidth, TQWidget *parent=0,
const char *name=0, WFlags f=0);
/**
@@ -323,8 +323,8 @@ public:
* Sets the label this is drawn at the beginning of the visible part
* of the ruler to @p label
**/
- void setEndLabel(const QString&);
- QString endLabel() const;
+ void setEndLabel(const TQString&);
+ TQString endLabel() const;
/**
* Sets up the necessary tasks for the provided styles.
@@ -428,7 +428,7 @@ public slots:
* Sets the pointer to a new position.
*
* The offset is NOT updated.
- * QWidget::repaint() is called afterwards.
+ * TQWidget::repaint() is called afterwards.
**/
void slotNewValue(int);
@@ -436,19 +436,19 @@ public slots:
* Sets the ruler marks to a new position.
*
* The pointer is NOT updated.
- * QWidget::repaint() is called afterwards.
+ * TQWidget::repaint() is called afterwards.
**/
void slotNewOffset(int);
void slotEndOffset(int);
protected:
- virtual void drawContents(QPainter *);
+ virtual void drawContents(TQPainter *);
private:
void init();
- QRangeControl range;
+ TQRangeControl range;
Orientation dir;
int tmDist;
int lmDist;
@@ -472,7 +472,7 @@ private:
double ppm; /* pixel per mark */
- QString endlabel;
+ TQString endlabel;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/ksconfig.cpp b/kdeui/ksconfig.cpp
index f17bd0dcc..ec5460ed7 100644
--- a/kdeui/ksconfig.cpp
+++ b/kdeui/ksconfig.cpp
@@ -19,11 +19,11 @@
#include <config.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -41,12 +41,12 @@
class KSpellConfigPrivate
{
public:
- QStringList replacelist;
+ TQStringList replacelist;
};
KSpellConfig::KSpellConfig (const KSpellConfig &_ksc)
- : QWidget(0, 0), nodialog(true)
+ : TQWidget(0, 0), nodialog(true)
, kc(0)
, cb1(0)
, cb2(0)
@@ -68,9 +68,9 @@ KSpellConfig::KSpellConfig (const KSpellConfig &_ksc)
}
-KSpellConfig::KSpellConfig( QWidget *parent, const char *name,
+KSpellConfig::KSpellConfig( TQWidget *parent, const char *name,
KSpellConfig *_ksc, bool addHelpButton )
- : QWidget (parent, name), nodialog(false)
+ : TQWidget (parent, name), nodialog(false)
, kc(0)
, cb1(0)
, cb2(0)
@@ -98,27 +98,27 @@ KSpellConfig::KSpellConfig( QWidget *parent, const char *name,
setClient( _ksc->client() );
}
- QGridLayout *glay = new QGridLayout( this, 6, 3, 0, KDialog::spacingHint() );
- cb1 = new QCheckBox( i18n("Create &root/affix combinations"
+ TQGridLayout *glay = new TQGridLayout( this, 6, 3, 0, KDialog::spacingHint() );
+ cb1 = new TQCheckBox( i18n("Create &root/affix combinations"
" not in dictionary"), this, "NoRootAffix" );
- connect( cb1, SIGNAL(toggled(bool)), SLOT(sNoAff(bool)) );
+ connect( cb1, TQT_SIGNAL(toggled(bool)), TQT_SLOT(sNoAff(bool)) );
glay->addMultiCellWidget( cb1, 0, 0, 0, 2 );
- cb2 = new QCheckBox( i18n("Consider run-together &words"
+ cb2 = new TQCheckBox( i18n("Consider run-together &words"
" as spelling errors"), this, "RunTogether" );
- connect( cb2, SIGNAL(toggled(bool)), SLOT(sRunTogether(bool)) );
+ connect( cb2, TQT_SIGNAL(toggled(bool)), TQT_SLOT(sRunTogether(bool)) );
glay->addMultiCellWidget( cb2, 1, 1, 0, 2 );
- dictcombo = new QComboBox( this, "DictFromList" );
- dictcombo->setInsertionPolicy( QComboBox::NoInsertion );
- connect( dictcombo, SIGNAL (activated(int)),
- this, SLOT (sSetDictionary(int)) );
+ dictcombo = new TQComboBox( this, "DictFromList" );
+ dictcombo->setInsertionPolicy( TQComboBox::NoInsertion );
+ connect( dictcombo, TQT_SIGNAL (activated(int)),
+ this, TQT_SLOT (sSetDictionary(int)) );
glay->addMultiCellWidget( dictcombo, 2, 2, 1, 2 );
- dictlist = new QLabel( dictcombo, i18n("&Dictionary:"), this );
+ dictlist = new TQLabel( dictcombo, i18n("&Dictionary:"), this );
glay->addWidget( dictlist, 2 ,0 );
- encodingcombo = new QComboBox( this, "Encoding" );
+ encodingcombo = new TQComboBox( this, "Encoding" );
encodingcombo->insertItem( "US-ASCII" );
encodingcombo->insertItem( "ISO 8859-1" );
encodingcombo->insertItem( "ISO 8859-2" );
@@ -136,30 +136,30 @@ KSpellConfig::KSpellConfig( QWidget *parent, const char *name,
encodingcombo->insertItem( "CP1251" );
encodingcombo->insertItem( "CP1255" );
- connect( encodingcombo, SIGNAL(activated(int)), this,
- SLOT(sChangeEncoding(int)) );
+ connect( encodingcombo, TQT_SIGNAL(activated(int)), this,
+ TQT_SLOT(sChangeEncoding(int)) );
glay->addMultiCellWidget( encodingcombo, 3, 3, 1, 2 );
- QLabel *tmpQLabel = new QLabel( encodingcombo, i18n("&Encoding:"), this);
+ TQLabel *tmpQLabel = new TQLabel( encodingcombo, i18n("&Encoding:"), this);
glay->addWidget( tmpQLabel, 3, 0 );
- clientcombo = new QComboBox( this, "Client" );
+ clientcombo = new TQComboBox( this, "Client" );
clientcombo->insertItem( i18n("International Ispell") );
clientcombo->insertItem( i18n("Aspell") );
clientcombo->insertItem( i18n("Hspell") );
clientcombo->insertItem( i18n("Zemberek") );
- connect( clientcombo, SIGNAL (activated(int)), this,
- SLOT (sChangeClient(int)) );
+ connect( clientcombo, TQT_SIGNAL (activated(int)), this,
+ TQT_SLOT (sChangeClient(int)) );
glay->addMultiCellWidget( clientcombo, 4, 4, 1, 2 );
- tmpQLabel = new QLabel( clientcombo, i18n("&Client:"), this );
+ tmpQLabel = new TQLabel( clientcombo, i18n("&Client:"), this );
glay->addWidget( tmpQLabel, 4, 0 );
if( addHelpButton )
{
- QPushButton *pushButton = new KPushButton( KStdGuiItem::help(), this );
- connect( pushButton, SIGNAL(clicked()), this, SLOT(sHelp()) );
+ TQPushButton *pushButton = new KPushButton( KStdGuiItem::help(), this );
+ connect( pushButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(sHelp()) );
glay->addWidget(pushButton, 5, 2);
}
@@ -246,16 +246,16 @@ KSpellConfig::sChangeClient( int i )
emit configChanged();
}
-// KDE 4: Make it const QString & fname (only fname)
+// KDE 4: Make it const TQString & fname (only fname)
bool
-KSpellConfig::interpret( QString &fname, QString &lname,
- QString &hname )
+KSpellConfig::interpret( TQString &fname, TQString &lname,
+ TQString &hname )
{
kdDebug(750) << "KSpellConfig::interpret [" << fname << "]" << endl;
- QString dname( fname );
+ TQString dname( fname );
if( dname.endsWith( "+" ) )
dname.remove( dname.length()-1, 1 );
@@ -264,7 +264,7 @@ KSpellConfig::interpret( QString &fname, QString &lname,
dname.endsWith("xlg"))
dname.remove(dname.length()-3,3);
- QString extension;
+ TQString extension;
int i = dname.find('-');
if ( i != -1 )
@@ -282,7 +282,7 @@ KSpellConfig::interpret( QString &fname, QString &lname,
else if ( (dname.length() == 5) && (dname[2] == '_') ) {
lname = dname.left(2);
hname = KGlobal::locale()->twoAlphaToLanguageName(lname);
- QString country = KGlobal::locale()->twoAlphaToCountryName( dname.right(2) );
+ TQString country = KGlobal::locale()->twoAlphaToCountryName( dname.right(2) );
if ( extension.isEmpty() )
extension = country;
else
@@ -363,8 +363,8 @@ KSpellConfig::interpret( QString &fname, QString &lname,
}
//We have explicitly chosen English as the default here.
- if ( ( KGlobal::locale()->language() == QString::fromLatin1("C") &&
- lname==QString::fromLatin1("en") ) ||
+ if ( ( KGlobal::locale()->language() == TQString::fromLatin1("C") &&
+ lname==TQString::fromLatin1("en") ) ||
KGlobal::locale()->language() == lname )
return true;
@@ -440,7 +440,7 @@ void KSpellConfig::getAvailDictsIspell () {
dictcombo->insertItem( i18n("ISpell Default") );
// dictionary path
- QFileInfo dir ("/usr/lib" KDELIBSUFF "/ispell");
+ TQFileInfo dir ("/usr/lib" KDELIBSUFF "/ispell");
if (!dir.exists() || !dir.isDir())
dir.setFile ("/usr/local/lib" KDELIBSUFF "/ispell");
if (!dir.exists() || !dir.isDir())
@@ -459,19 +459,19 @@ void KSpellConfig::getAvailDictsIspell () {
kdDebug(750) << "KSpellConfig::getAvailDictsIspell "
<< dir.filePath() << " " << dir.dirPath() << endl;
- const QDir thedir (dir.filePath(),"*.hash");
- const QStringList entryList = thedir.entryList();
+ const TQDir thedir (dir.filePath(),"*.hash");
+ const TQStringList entryList = thedir.entryList();
kdDebug(750) << "KSpellConfig" << thedir.path() << "\n" << endl;
kdDebug(750) << "entryList().count()="
<< entryList.count() << endl;
- QStringList::const_iterator entryListItr = entryList.constBegin();
- const QStringList::const_iterator entryListEnd = entryList.constEnd();
+ TQStringList::const_iterator entryListItr = entryList.constBegin();
+ const TQStringList::const_iterator entryListEnd = entryList.constEnd();
for ( ; entryListItr != entryListEnd; ++entryListItr)
{
- QString fname, lname, hname;
+ TQString fname, lname, hname;
fname = *entryListItr;
// remove .hash
@@ -509,7 +509,7 @@ void KSpellConfig::getAvailDictsAspell () {
// Aspell now have /usr/lib/aspell as
// ASPELL_DATADIR default.
- QFileInfo dir ( ASPELL_DATADIR );
+ TQFileInfo dir ( ASPELL_DATADIR );
if (!dir.exists() || !dir.isDir())
dir.setFile ("/usr/lib" KDELIBSUFF "/aspell-0.60");
if (!dir.exists() || !dir.isDir())
@@ -525,19 +525,19 @@ void KSpellConfig::getAvailDictsAspell () {
kdDebug(750) << "KSpellConfig::getAvailDictsAspell "
<< dir.filePath() << " " << dir.dirPath() << endl;
- const QDir thedir (dir.filePath(),"*");
- const QStringList entryList = thedir.entryList();
+ const TQDir thedir (dir.filePath(),"*");
+ const TQStringList entryList = thedir.entryList();
kdDebug(750) << "KSpellConfig" << thedir.path() << "\n" << endl;
kdDebug(750) << "entryList().count()="
<< entryList.count() << endl;
- QStringList::const_iterator entryListItr = entryList.constBegin();
- const QStringList::const_iterator entryListEnd = entryList.constEnd();
+ TQStringList::const_iterator entryListItr = entryList.constBegin();
+ const TQStringList::const_iterator entryListEnd = entryList.constEnd();
for ( ; entryListItr != entryListEnd; ++entryListItr)
{
- QString fname, lname, hname;
+ TQString fname, lname, hname;
fname = *entryListItr;
// consider only simple dicts without '-' in the name
@@ -584,7 +584,7 @@ void KSpellConfig::getAvailDictsAspell () {
}
void
-KSpellConfig::fillDicts( QComboBox* box, QStringList* dictionaries )
+KSpellConfig::fillDicts( TQComboBox* box, TQStringList* dictionaries )
{
langfnames.clear();
if ( box ) {
@@ -594,7 +594,7 @@ KSpellConfig::fillDicts( QComboBox* box, QStringList* dictionaries )
box->insertItem( i18n("ISpell Default") );
// dictionary path
- QFileInfo dir ("/usr/lib/ispell");
+ TQFileInfo dir ("/usr/lib/ispell");
if (!dir.exists() || !dir.isDir())
dir.setFile ("/usr/local/lib/ispell");
if (!dir.exists() || !dir.isDir())
@@ -613,19 +613,19 @@ KSpellConfig::fillDicts( QComboBox* box, QStringList* dictionaries )
kdDebug(750) << "KSpellConfig::getAvailDictsIspell "
<< dir.filePath() << " " << dir.dirPath() << endl;
- const QDir thedir (dir.filePath(),"*.hash");
- const QStringList entryList = thedir.entryList();
+ const TQDir thedir (dir.filePath(),"*.hash");
+ const TQStringList entryList = thedir.entryList();
kdDebug(750) << "KSpellConfig" << thedir.path() << "\n" << endl;
kdDebug(750) << "entryList().count()="
<< entryList.count() << endl;
- QStringList::const_iterator entryListItr = entryList.constBegin();
- const QStringList::const_iterator entryListEnd = entryList.constEnd();
+ TQStringList::const_iterator entryListItr = entryList.constBegin();
+ const TQStringList::const_iterator entryListEnd = entryList.constEnd();
for ( ; entryListItr != entryListEnd; ++entryListItr)
{
- QString fname, lname, hname;
+ TQString fname, lname, hname;
fname = *entryListItr;
// remove .hash
@@ -669,7 +669,7 @@ KSpellConfig::fillDicts( QComboBox* box, QStringList* dictionaries )
// dictionary path
// FIXME: use "aspell dump config" to find out the dict-dir
- QFileInfo dir ("/usr/lib" KDELIBSUFF "/aspell");
+ TQFileInfo dir ("/usr/lib" KDELIBSUFF "/aspell");
if (!dir.exists() || !dir.isDir())
dir.setFile ("/usr/lib" KDELIBSUFF "/aspell-0.60");
if (!dir.exists() || !dir.isDir())
@@ -685,19 +685,19 @@ KSpellConfig::fillDicts( QComboBox* box, QStringList* dictionaries )
kdDebug(750) << "KSpellConfig::getAvailDictsAspell "
<< dir.filePath() << " " << dir.dirPath() << endl;
- const QDir thedir (dir.filePath(),"*");
- const QStringList entryList = thedir.entryList();
+ const TQDir thedir (dir.filePath(),"*");
+ const TQStringList entryList = thedir.entryList();
kdDebug(750) << "KSpellConfig" << thedir.path() << "\n" << endl;
kdDebug(750) << "entryList().count()="
<< entryList.count() << endl;
- QStringList::const_iterator entryListItr = entryList.constBegin();
- const QStringList::const_iterator entryListEnd = entryList.constEnd();
+ TQStringList::const_iterator entryListItr = entryList.constBegin();
+ const TQStringList::const_iterator entryListEnd = entryList.constEnd();
for ( ; entryListItr != entryListEnd; ++entryListItr)
{
- QString fname, lname, hname;
+ TQString fname, lname, hname;
fname = *entryListItr;
// consider only simple dicts without '-' in the name
@@ -783,7 +783,7 @@ KSpellConfig::setRunTogether(bool b)
}
void
-KSpellConfig::setDictionary (const QString s)
+KSpellConfig::setDictionary (const TQString s)
{
qsdict=s; //.copy();
@@ -855,13 +855,13 @@ KSpellConfig::runTogether() const
}
const
-QString KSpellConfig::dictionary () const
+TQString KSpellConfig::dictionary () const
{
return qsdict;
}
/*
-const QString KSpellConfig::personalDict () const
+const TQString KSpellConfig::personalDict () const
{
return qspdict;
}
@@ -893,7 +893,7 @@ KSpellConfig::sBrowseDict()
{
return;
- QString qs( KFileDialog::getOpenFileName ("/usr/local/lib","*.hash") );
+ TQString qs( KFileDialog::getOpenFileName ("/usr/local/lib","*.hash") );
if ( !qs.isNull() )
kle1->setText (qs);
@@ -904,7 +904,7 @@ KSpellConfig::sBrowseDict()
void KSpellConfig::sBrowsePDict()
{
//how do I find home directory path??
- QString qs( KFileDialog::getOpenFileName ("",".ispell_*") );
+ TQString qs( KFileDialog::getOpenFileName ("",".ispell_*") );
if ( !qs.isNull() )
kle2->setText (qs);
@@ -917,7 +917,7 @@ KSpellConfig::sSetDictionary (int i)
{
setDictionary (langfnames[i]);
setDictFromList (true);
- QTimer::singleShot( 0, this, SIGNAL( configChanged() ) );
+ TQTimer::singleShot( 0, this, TQT_SIGNAL( configChanged() ) );
}
void
@@ -996,9 +996,9 @@ KSpellConfig::operator= (const KSpellConfig &ksc)
fillInDialog();
}
-// KDE 4: Make it const QStringList &
+// KDE 4: Make it const TQStringList &
void
-KSpellConfig::setIgnoreList (QStringList _ignorelist)
+KSpellConfig::setIgnoreList (TQStringList _ignorelist)
{
ignorelist=_ignorelist;
}
@@ -1009,9 +1009,9 @@ KSpellConfig::ignoreList () const
return ignorelist;
}
-// KDE 4: Make it const QStringList &
+// KDE 4: Make it const TQStringList &
void
-KSpellConfig::setReplaceAllList (QStringList _replacelist)
+KSpellConfig::setReplaceAllList (TQStringList _replacelist)
{
d->replacelist=_replacelist;
}
diff --git a/kdeui/ksconfig.h b/kdeui/ksconfig.h
index 548fbfc84..c50789df9 100644
--- a/kdeui/ksconfig.h
+++ b/kdeui/ksconfig.h
@@ -18,9 +18,9 @@
#ifndef KDELIBS_KSCONFIG_H
#define KDELIBS_KSCONFIG_H
-#include <qwidget.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -100,7 +100,7 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
* activateHelp for more information.
*
*/
- KSpellConfig( QWidget *parent=0, const char *name=0,
+ KSpellConfig( TQWidget *parent=0, const char *name=0,
KSpellConfig *spellConfig=0, bool addHelpButton = true );
KSpellConfig( const KSpellConfig & );
@@ -131,7 +131,7 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
* @since 3.2
*
*/
- void fillDicts( QComboBox* box, QStringList* dictionaries = 0 );
+ void fillDicts( TQComboBox* box, TQStringList* dictionaries = 0 );
/**
* @sect Options setting routines.
@@ -147,14 +147,14 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
* It may be useful to save this list with the document being
* edited to facilitate quicker future spellchecking.
*/
- void setIgnoreList( QStringList _ignorelist );
+ void setIgnoreList( TQStringList _ignorelist );
/**
* The @p _replaceAllList contains word you like that replace
* word. Be careful that this list contains word which is replaced
* and new word.
*/
- void setReplaceAllList( QStringList _replaceAllList );
+ void setReplaceAllList( TQStringList _replaceAllList );
/**
* Set an ISpell option.
@@ -173,7 +173,7 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
/**
* Set the name of the dictionary to use.
*/
- void setDictionary( const QString qs );
+ void setDictionary( const TQString qs );
void setDictFromList( bool dfl );
//void setPersonalDict (const char *s);
@@ -188,12 +188,12 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
*/
bool noRootAffix() const;
bool runTogether() const;
- const QString dictionary() const;
+ const TQString dictionary() const;
bool dictFromList() const;
- //QString personalDict () const;
+ //TQString personalDict () const;
int encoding() const;
- QStringList ignoreList() const;
- QStringList replaceAllList() const;
+ TQStringList ignoreList() const;
+ TQStringList replaceAllList() const;
int client() const; ///< Spell checker client, see KSpellClients
@@ -221,7 +221,7 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
*
* @return true if <pre>lname.data()==$LANG</pre>
*/
- bool interpret( QString &fname, QString &lname, QString &hname );
+ bool interpret( TQString &fname, TQString &lname, TQString &hname );
public slots:
@@ -260,21 +260,21 @@ class KDEUI_EXPORT KSpellConfig : public QWidget
bool bruntogether; // -B
bool dictfromlist;
bool nodialog;
- QString qsdict; // -d [dict]
- QString qspdict; // -p [dict]
- QStringList ignorelist;
+ TQString qsdict; // -d [dict]
+ TQString qspdict; // -p [dict]
+ TQStringList ignorelist;
enum {rdictlist=3, rencoding=4, rhelp=6};
KConfig *kc;
int iclient; // defaults to ispell, may be aspell, too
- QCheckBox *cb1, *cb2;
+ TQCheckBox *cb1, *cb2;
//KLineEdit *kle1, *kle2;
- //QButtonGroup *dictgroup;
- //QRadioButton *dictlistbutton, *dicteditbutton;
- QLabel *dictlist;
- QComboBox *dictcombo, *encodingcombo, *clientcombo;
- //QPushButton *browsebutton1;
- QStringList langfnames;
+ //TQButtonGroup *dictgroup;
+ //TQRadioButton *dictlistbutton, *dicteditbutton;
+ TQLabel *dictlist;
+ TQComboBox *dictcombo, *encodingcombo, *clientcombo;
+ //TQPushButton *browsebutton1;
+ TQStringList langfnames;
signals:
void configChanged();
diff --git a/kdeui/kscrollview.cpp b/kdeui/kscrollview.cpp
index 779f6a62b..1d37d03d3 100644
--- a/kdeui/kscrollview.cpp
+++ b/kdeui/kscrollview.cpp
@@ -18,9 +18,9 @@
#include "config.h"
-#include <qtimer.h>
-#include <qevent.h>
-#include <qapplication.h>
+#include <tqtimer.h>
+#include <tqevent.h>
+#include <tqapplication.h>
#include "kscrollview.h"
#include <kdebug.h>
@@ -29,7 +29,7 @@
struct KScrollView::KScrollViewPrivate {
KScrollViewPrivate() : dx(0), dy(0), ddx(0), ddy(0), rdx(0), rdy(0), scrolling(false) {}
- QTimer timer;
+ TQTimer timer;
int dx;
int dy;
// Step size * 16 and residual to avoid huge difference between 1px/step and 2px/step
@@ -40,11 +40,11 @@ struct KScrollView::KScrollViewPrivate {
bool scrolling;
};
-KScrollView::KScrollView( QWidget *parent, const char *name, Qt::WFlags f )
- : QScrollView( parent, name, f )
+KScrollView::KScrollView( TQWidget *parent, const char *name, Qt::WFlags f )
+ : TQScrollView( parent, name, f )
{
d = new KScrollViewPrivate;
- connect(&d->timer, SIGNAL(timeout()), this, SLOT(scrollTick()));
+ connect(&d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(scrollTick()));
}
KScrollView::~KScrollView()
@@ -56,7 +56,7 @@ void KScrollView::scrollBy(int dx, int dy)
{
KConfigGroup cfg( KGlobal::config(), "KDE" );
if( !cfg.readBoolEntry( "SmoothScrolling", true )) {
- QScrollView::scrollBy( dx, dy );
+ TQScrollView::scrollBy( dx, dy );
return;
}
// scrolling destination
@@ -106,7 +106,7 @@ void KScrollView::setContentsPos(int x, int y)
int dy = y - contentsY();
// to large to smooth out
-// if (dx > 1000 || dy > 1000) return QScrollView::setContentsPos(x,y);
+// if (dx > 1000 || dy > 1000) return TQScrollView::setContentsPos(x,y);
// scrolling speed
int ddx = 0;
@@ -155,8 +155,8 @@ void KScrollView::scrollTick() {
d->dx -= ddx;
d->dy -= ddy;
-// QScrollView::setContentsPos( contentsX() + ddx, contentsY() + ddy);
- QScrollView::scrollBy(ddx, ddy);
+// TQScrollView::setContentsPos( contentsX() + ddx, contentsY() + ddy);
+ TQScrollView::scrollBy(ddx, ddy);
}
void KScrollView::startScrolling()
@@ -172,12 +172,12 @@ void KScrollView::stopScrolling()
d->scrolling = false;
}
-// Overloaded from QScrollView and QScrollBar
-void KScrollView::wheelEvent( QWheelEvent *e )
+// Overloaded from TQScrollView and QScrollBar
+void KScrollView::wheelEvent( TQWheelEvent *e )
{
int pageStep = verticalScrollBar()->pageStep();
int lineStep = verticalScrollBar()->lineStep();
- int step = QMIN( QApplication::wheelScrollLines()*lineStep, pageStep );
+ int step = QMIN( TQApplication::wheelScrollLines()*lineStep, pageStep );
if ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) )
step = pageStep;
diff --git a/kdeui/kscrollview.h b/kdeui/kscrollview.h
index 9326876af..cca289e75 100644
--- a/kdeui/kscrollview.h
+++ b/kdeui/kscrollview.h
@@ -18,12 +18,12 @@
#ifndef KSCROLLVIEW_H
#define KSCROLLVIEW_H
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <kdelibs_export.h>
/**
- * @short A variant of QScrollView that supports smooth scrolling.
+ * @short A variant of TQScrollView that supports smooth scrolling.
*
*
**/
@@ -32,7 +32,7 @@ class KDEUI_EXPORT KScrollView : public QScrollView
Q_OBJECT
public:
- KScrollView( QWidget *parent = 0, const char *name = 0, Qt::WFlags f = 0 );
+ KScrollView( TQWidget *parent = 0, const char *name = 0, Qt::WFlags f = 0 );
~KScrollView();
@@ -41,7 +41,7 @@ public slots:
// virtual void setContentsPos(int x, int y);
protected:
- virtual void wheelEvent( QWheelEvent *e );
+ virtual void wheelEvent( TQWheelEvent *e );
void startScrolling();
void stopScrolling();
diff --git a/kdeui/kselect.cpp b/kdeui/kselect.cpp
index 3795056e6..a5fd0f613 100644
--- a/kdeui/kselect.cpp
+++ b/kdeui/kselect.cpp
@@ -17,10 +17,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qimage.h>
-#include <qpainter.h>
-#include <qdrawutil.h>
-#include <qstyle.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
+#include <tqstyle.h>
#include <kimageeffect.h>
#include "kselect.h"
@@ -33,8 +33,8 @@
* The contents of the selector are drawn by derived class.
*/
-KXYSelector::KXYSelector( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KXYSelector::KXYSelector( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
xPos = 0;
yPos = 0;
@@ -42,7 +42,7 @@ KXYSelector::KXYSelector( QWidget *parent, const char *name )
minY = 0;
maxX = 100;
maxY = 100;
- store.setOptimization( QPixmap::BestOptim );
+ store.setOptimization( TQPixmap::BestOptim );
store.resize( STORE_W2, STORE_W2 );
}
@@ -53,7 +53,7 @@ KXYSelector::~KXYSelector()
void KXYSelector::setRange( int _minX, int _minY, int _maxX, int _maxY )
{
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
px = w;
py = w;
minX = _minX;
@@ -74,7 +74,7 @@ void KXYSelector::setYValue( int _yPos )
void KXYSelector::setValues( int _xPos, int _yPos )
{
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) w = 5;
xPos = _xPos;
@@ -96,35 +96,35 @@ void KXYSelector::setValues( int _xPos, int _yPos )
setPosition( xp, yp );
}
-QRect KXYSelector::contentsRect() const
+TQRect KXYSelector::contentsRect() const
{
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) {
w = 5;
}
- QRect contents(rect());
+ TQRect contents(rect());
contents.addCoords(w, w, -w, -w);
return contents;
}
-void KXYSelector::paintEvent( QPaintEvent *ev )
+void KXYSelector::paintEvent( TQPaintEvent *ev )
{
- QRect cursorRect( px - STORE_W, py - STORE_W, STORE_W2, STORE_W2);
- QRect paintRect = ev->rect();
- QRect borderRect = rect();
+ TQRect cursorRect( px - STORE_W, py - STORE_W, STORE_W2, STORE_W2);
+ TQRect paintRect = ev->rect();
+ TQRect borderRect = rect();
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) {
w = 5 - w;
}
borderRect.addCoords(w, w, -w, -w);
- QPainter painter;
+ TQPainter painter;
painter.begin( this );
- style().drawPrimitive(QStyle::PE_Panel, &painter,
+ style().drawPrimitive(TQStyle::PE_Panel, &painter,
borderRect, colorGroup(),
- QStyle::Style_Sunken);
+ TQStyle::Style_Sunken);
drawContents( &painter );
if (paintRect.contains(cursorRect))
@@ -141,16 +141,16 @@ void KXYSelector::paintEvent( QPaintEvent *ev )
painter.end();
}
-void KXYSelector::mousePressEvent( QMouseEvent *e )
+void KXYSelector::mousePressEvent( TQMouseEvent *e )
{
mouseMoveEvent(e);
}
-void KXYSelector::mouseMoveEvent( QMouseEvent *e )
+void KXYSelector::mouseMoveEvent( TQMouseEvent *e )
{
int xVal, yVal;
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
valuesFromPosition( e->pos().x() - w, e->pos().y() - w, xVal, yVal );
setValues( xVal, yVal );
@@ -158,7 +158,7 @@ void KXYSelector::mouseMoveEvent( QMouseEvent *e )
emit valueChanged( xPos, yPos );
}
-void KXYSelector::wheelEvent( QWheelEvent *e )
+void KXYSelector::wheelEvent( TQWheelEvent *e )
{
if ( e->orientation() == Qt::Horizontal )
setValues( xValue() + e->delta()/120, yValue() );
@@ -170,7 +170,7 @@ void KXYSelector::wheelEvent( QWheelEvent *e )
void KXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const
{
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) w = 5;
xVal = ( (maxX-minX) * (x-w) ) / ( width()-2*w );
yVal = maxY - ( ( (maxY-minY) * (y-w) ) / ( height()-2*w ) );
@@ -188,7 +188,7 @@ void KXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const
void KXYSelector::setPosition( int xp, int yp )
{
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
if (w < 5) w = 5;
if ( xp < w )
xp = w;
@@ -200,7 +200,7 @@ void KXYSelector::setPosition( int xp, int yp )
else if ( yp > height() - w )
yp = height() - w;
- QPainter painter;
+ TQPainter painter;
painter.begin( this );
bitBlt( this, px - STORE_W, py - STORE_W, &store, 0, 0,
@@ -214,13 +214,13 @@ void KXYSelector::setPosition( int xp, int yp )
painter.end();
}
-void KXYSelector::drawContents( QPainter * )
+void KXYSelector::drawContents( TQPainter * )
{}
-void KXYSelector::drawCursor( QPainter *p, int xp, int yp )
+void KXYSelector::drawCursor( TQPainter *p, int xp, int yp )
{
- p->setPen( QPen( white ) );
+ p->setPen( TQPen( white ) );
p->drawLine( xp - 6, yp - 6, xp - 2, yp - 2 );
p->drawLine( xp - 6, yp + 6, xp - 2, yp + 2 );
@@ -235,15 +235,15 @@ void KXYSelector::drawCursor( QPainter *p, int xp, int yp )
*/
-KSelector::KSelector( QWidget *parent, const char *name )
- : QWidget( parent, name ), QRangeControl()
+KSelector::KSelector( TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), TQRangeControl()
{
_orientation = Horizontal;
_indent = true;
}
-KSelector::KSelector( Orientation o, QWidget *parent, const char *name )
- : QWidget( parent, name ), QRangeControl()
+KSelector::KSelector( Orientation o, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), TQRangeControl()
{
_orientation = o;
_indent = true;
@@ -254,20 +254,20 @@ KSelector::~KSelector()
{}
-QRect KSelector::contentsRect() const
+TQRect KSelector::contentsRect() const
{
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
int iw = (w < 5) ? 5 : w;
if ( orientation() == Vertical )
- return QRect( w, iw, width() - w * 2 - 5, height() - 2 * iw );
+ return TQRect( w, iw, width() - w * 2 - 5, height() - 2 * iw );
else
- return QRect( iw, w, width() - 2 * iw, height() - w * 2 - 5 );
+ return TQRect( iw, w, width() - 2 * iw, height() - w * 2 - 5 );
}
-void KSelector::paintEvent( QPaintEvent * )
+void KSelector::paintEvent( TQPaintEvent * )
{
- QPainter painter;
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ TQPainter painter;
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
int iw = (w < 5) ? 5 : w;
painter.begin( this );
@@ -276,33 +276,33 @@ void KSelector::paintEvent( QPaintEvent * )
if ( indent() )
{
- QRect r = rect();
+ TQRect r = rect();
if ( orientation() == Vertical )
r.addCoords(0, iw - w, -iw, w - iw);
else
r.addCoords(iw - w, 0, w - iw, -iw);
- style().drawPrimitive(QStyle::PE_Panel, &painter,
+ style().drawPrimitive(TQStyle::PE_Panel, &painter,
r, colorGroup(),
- QStyle::Style_Sunken);
+ TQStyle::Style_Sunken);
}
- QPoint pos = calcArrowPos( value() );
+ TQPoint pos = calcArrowPos( value() );
drawArrow( &painter, true, pos );
painter.end();
}
-void KSelector::mousePressEvent( QMouseEvent *e )
+void KSelector::mousePressEvent( TQMouseEvent *e )
{
moveArrow( e->pos() );
}
-void KSelector::mouseMoveEvent( QMouseEvent *e )
+void KSelector::mouseMoveEvent( TQMouseEvent *e )
{
moveArrow( e->pos() );
}
-void KSelector::wheelEvent( QWheelEvent *e )
+void KSelector::wheelEvent( TQWheelEvent *e )
{
int val = value() + e->delta()/120;
setValue( val );
@@ -310,8 +310,8 @@ void KSelector::wheelEvent( QWheelEvent *e )
void KSelector::valueChange()
{
- QPainter painter;
- QPoint pos;
+ TQPainter painter;
+ TQPoint pos;
painter.begin( this );
@@ -326,10 +326,10 @@ void KSelector::valueChange()
emit valueChanged( value() );
}
-void KSelector::moveArrow( const QPoint &pos )
+void KSelector::moveArrow( const TQPoint &pos )
{
int val;
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
int iw = (w < 5) ? 5 : w;
if ( orientation() == Vertical )
@@ -342,11 +342,11 @@ void KSelector::moveArrow( const QPoint &pos )
setValue( val );
}
-QPoint KSelector::calcArrowPos( int val )
+TQPoint KSelector::calcArrowPos( int val )
{
- QPoint p;
+ TQPoint p;
- int w = style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
int iw = (w < 5) ? 5 : w;
if ( orientation() == Vertical )
{
@@ -364,17 +364,17 @@ QPoint KSelector::calcArrowPos( int val )
return p;
}
-void KSelector::drawContents( QPainter * )
+void KSelector::drawContents( TQPainter * )
{}
-void KSelector::drawArrow( QPainter *painter, bool show, const QPoint &pos )
+void KSelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos )
{
if ( show )
{
- QPointArray array(3);
+ TQPointArray array(3);
- painter->setPen( QPen() );
- painter->setBrush( QBrush( colorGroup().buttonText() ) );
+ painter->setPen( TQPen() );
+ painter->setBrush( TQBrush( colorGroup().buttonText() ) );
array.setPoint( 0, pos.x()+0, pos.y()+0 );
array.setPoint( 1, pos.x()+5, pos.y()+5 );
if ( orientation() == Vertical )
@@ -403,14 +403,14 @@ void KSelector::drawArrow( QPainter *painter, bool show, const QPoint &pos )
//----------------------------------------------------------------------------
-KGradientSelector::KGradientSelector( QWidget *parent, const char *name )
+KGradientSelector::KGradientSelector( TQWidget *parent, const char *name )
: KSelector( parent, name )
{
init();
}
-KGradientSelector::KGradientSelector( Orientation o, QWidget *parent,
+KGradientSelector::KGradientSelector( Orientation o, TQWidget *parent,
const char *name )
: KSelector( o, parent, name )
{
@@ -431,11 +431,11 @@ void KGradientSelector::init()
}
-void KGradientSelector::drawContents( QPainter *painter )
+void KGradientSelector::drawContents( TQPainter *painter )
{
- QImage image( contentsRect().width(), contentsRect().height(), 32 );
+ TQImage image( contentsRect().width(), contentsRect().height(), 32 );
- QColor col;
+ TQColor col;
float scale;
int redDiff = color2.red() - color1.red();
@@ -474,7 +474,7 @@ void KGradientSelector::drawContents( QPainter *painter )
sizeof( unsigned int ) * image.width() );
}
- QColor ditherPalette[8];
+ TQColor ditherPalette[8];
for ( int s = 0; s < 8; s++ )
ditherPalette[s].setRgb( color1.red() + redDiff * s / 8,
@@ -483,7 +483,7 @@ void KGradientSelector::drawContents( QPainter *painter )
KImageEffect::dither( image, ditherPalette, 8 );
- QPixmap p;
+ TQPixmap p;
p.convertFromImage( image );
painter->drawPixmap( contentsRect().x(), contentsRect().y(), p );
@@ -493,7 +493,7 @@ void KGradientSelector::drawContents( QPainter *painter )
int yPos = contentsRect().top() + painter->fontMetrics().ascent() + 2;
int xPos = contentsRect().left() + (contentsRect().width() -
painter->fontMetrics().width( text2 )) / 2;
- QPen pen( color2 );
+ TQPen pen( color2 );
painter->setPen( pen );
painter->drawText( xPos, yPos, text2 );
@@ -508,7 +508,7 @@ void KGradientSelector::drawContents( QPainter *painter )
{
int yPos = contentsRect().bottom()-painter->fontMetrics().descent()-2;
- QPen pen( color2 );
+ TQPen pen( color2 );
painter->setPen( pen );
painter->drawText( contentsRect().left() + 2, yPos, text1 );
diff --git a/kdeui/kselect.h b/kdeui/kselect.h
index bc281341d..cc9d57d48 100644
--- a/kdeui/kselect.h
+++ b/kdeui/kselect.h
@@ -23,9 +23,9 @@
#ifndef __KSELECT_H__
#define __KSELECT_H__
-#include <qwidget.h>
-#include <qrangecontrol.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqrangecontrol.h>
+#include <tqpixmap.h>
#include <kdelibs_export.h>
@@ -51,7 +51,7 @@ public:
* Constructs a two-dimensional selector widget which
* has a value range of [0..100] in both directions.
*/
- KXYSelector( QWidget *parent=0, const char *name=0 );
+ KXYSelector( TQWidget *parent=0, const char *name=0 );
/**
* Destructs the widget.
*/
@@ -94,7 +94,7 @@ public:
/**
* @return the rectangle on which subclasses should draw.
*/
- QRect contentsRect() const;
+ TQRect contentsRect() const;
signals:
/**
@@ -110,17 +110,17 @@ protected:
*
* Draw within contentsRect() only.
*/
- virtual void drawContents( QPainter * );
+ virtual void drawContents( TQPainter * );
/**
* Override this function to draw the cursor which
* indicates the currently selected value pair.
*/
- virtual void drawCursor( QPainter *p, int xp, int yp );
+ virtual void drawCursor( TQPainter *p, int xp, int yp );
- virtual void paintEvent( QPaintEvent *e );
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e );
- virtual void wheelEvent( QWheelEvent * );
+ virtual void paintEvent( TQPaintEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
+ virtual void wheelEvent( TQWheelEvent * );
/**
* Converts a pixel position to its corresponding values.
@@ -137,7 +137,7 @@ private:
int maxX;
int minY;
int maxY;
- QPixmap store;
+ TQPixmap store;
protected:
virtual void virtual_hook( int id, void* data );
@@ -156,7 +156,7 @@ private:
* A custom drawing routine for the widget surface has
* to be provided by the subclass.
*/
-class KDEUI_EXPORT KSelector : public QWidget, public QRangeControl
+class KDEUI_EXPORT KSelector : public TQWidget, public QRangeControl
{
Q_OBJECT
Q_PROPERTY( int value READ value WRITE setValue )
@@ -167,12 +167,12 @@ public:
/**
* Constructs a horizontal one-dimensional selection widget.
*/
- KSelector( QWidget *parent=0, const char *name=0 );
+ KSelector( TQWidget *parent=0, const char *name=0 );
/**
* Constructs a one-dimensional selection widget with
* a given orientation.
*/
- KSelector( Orientation o, QWidget *parent = 0L, const char *name = 0L );
+ KSelector( Orientation o, TQWidget *parent = 0L, const char *name = 0L );
/*
* Destructs the widget.
*/
@@ -187,7 +187,7 @@ public:
/**
* @return the rectangle on which subclasses should draw.
*/
- QRect contentsRect() const;
+ TQRect contentsRect() const;
/**
* Sets the indent option of the widget to i.
@@ -205,37 +205,37 @@ public:
* Sets the value.
*/
void setValue(int value)
- { QRangeControl::setValue(value); }
+ { TQRangeControl::setValue(value); }
/**
* @returns the value.
*/
int value() const
- { return QRangeControl::value(); }
+ { return TQRangeControl::value(); }
/**
* Sets the min value.
*/
void setMinValue(int value)
- { QRangeControl::setMinValue(value); }
+ { TQRangeControl::setMinValue(value); }
/**
* @return the min value.
*/
int minValue() const
- { return QRangeControl::minValue(); }
+ { return TQRangeControl::minValue(); }
/**
* Sets the max value.
*/
void setMaxValue(int value)
- { QRangeControl::setMaxValue(value); }
+ { TQRangeControl::setMaxValue(value); }
/**
* @return the max value.
*/
int maxValue() const
- { return QRangeControl::maxValue(); }
+ { return TQRangeControl::maxValue(); }
signals:
/**
@@ -251,7 +251,7 @@ protected:
*
* Draw only within contentsRect().
*/
- virtual void drawContents( QPainter * );
+ virtual void drawContents( TQPainter * );
/**
* Override this function to draw the cursor which
* indicates the current value. This function is
@@ -259,17 +259,17 @@ protected:
* to clear the old cursor, once with argument show=true
* to draw the new one.
*/
- virtual void drawArrow( QPainter *painter, bool show, const QPoint &pos );
+ virtual void drawArrow( TQPainter *painter, bool show, const TQPoint &pos );
virtual void valueChange();
- virtual void paintEvent( QPaintEvent * );
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e );
- virtual void wheelEvent( QWheelEvent * );
+ virtual void paintEvent( TQPaintEvent * );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
+ virtual void wheelEvent( TQWheelEvent * );
private:
- QPoint calcArrowPos( int val );
- void moveArrow( const QPoint &pos );
+ TQPoint calcArrowPos( int val );
+ void moveArrow( const TQPoint &pos );
Orientation _orientation;
bool _indent;
@@ -294,22 +294,22 @@ class KDEUI_EXPORT KGradientSelector : public KSelector
{
Q_OBJECT
- Q_PROPERTY( QColor firstColor READ firstColor WRITE setFirstColor )
- Q_PROPERTY( QColor secondColor READ secondColor WRITE setSecondColor )
- Q_PROPERTY( QString firstText READ firstText WRITE setFirstText )
- Q_PROPERTY( QString secondText READ secondText WRITE setSecondText )
+ Q_PROPERTY( TQColor firstColor READ firstColor WRITE setFirstColor )
+ Q_PROPERTY( TQColor secondColor READ secondColor WRITE setSecondColor )
+ Q_PROPERTY( TQString firstText READ firstText WRITE setFirstText )
+ Q_PROPERTY( TQString secondText READ secondText WRITE setSecondText )
public:
/**
* Constructs a horizontal color selector which
* contains a gradient between white and black.
*/
- KGradientSelector( QWidget *parent=0, const char *name=0 );
+ KGradientSelector( TQWidget *parent=0, const char *name=0 );
/**
* Constructs a colors selector with orientation o which
* contains a gradient between white and black.
*/
- KGradientSelector( Orientation o, QWidget *parent=0, const char *name=0 );
+ KGradientSelector( Orientation o, TQWidget *parent=0, const char *name=0 );
/**
* Destructs the widget.
*/
@@ -317,49 +317,49 @@ public:
/**
* Sets the two colors which span the gradient.
*/
- void setColors( const QColor &col1, const QColor &col2 )
+ void setColors( const TQColor &col1, const TQColor &col2 )
{ color1 = col1; color2 = col2; update();}
- void setText( const QString &t1, const QString &t2 )
+ void setText( const TQString &t1, const TQString &t2 )
{ text1 = t1; text2 = t2; update(); }
/**
* Set each color on its own.
*/
- void setFirstColor( const QColor &col )
+ void setFirstColor( const TQColor &col )
{ color1 = col; update(); }
- void setSecondColor( const QColor &col )
+ void setSecondColor( const TQColor &col )
{ color2 = col; update(); }
/**
* Set each description on its own
*/
- void setFirstText( const QString &t )
+ void setFirstText( const TQString &t )
{ text1 = t; update(); }
- void setSecondText( const QString &t )
+ void setSecondText( const TQString &t )
{ text2 = t; update(); }
- const QColor firstColor() const
+ const TQColor firstColor() const
{ return color1; }
- const QColor secondColor() const
+ const TQColor secondColor() const
{ return color2; }
- const QString firstText() const
+ const TQString firstText() const
{ return text1; }
- const QString secondText() const
+ const TQString secondText() const
{ return text2; }
protected:
- virtual void drawContents( QPainter * );
- virtual QSize minimumSize() const
+ virtual void drawContents( TQPainter * );
+ virtual TQSize minimumSize() const
{ return sizeHint(); }
private:
void init();
- QColor color1;
- QColor color2;
- QString text1;
- QString text2;
+ TQColor color1;
+ TQColor color2;
+ TQString text1;
+ TQString text2;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kseparator.cpp b/kdeui/kseparator.cpp
index a0c636f4c..3b6523917 100644
--- a/kdeui/kseparator.cpp
+++ b/kdeui/kseparator.cpp
@@ -17,7 +17,7 @@
*
*/
-#include <qstyle.h>
+#include <tqstyle.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -25,8 +25,8 @@
#include "kseparator.moc"
-KSeparator::KSeparator(QWidget* parent, const char* name, WFlags f)
- : QFrame(parent, name, f)
+KSeparator::KSeparator(TQWidget* parent, const char* name, WFlags f)
+ : TQFrame(parent, name, f)
{
setLineWidth(1);
setMidLineWidth(0);
@@ -35,8 +35,8 @@ KSeparator::KSeparator(QWidget* parent, const char* name, WFlags f)
-KSeparator::KSeparator(int orientation, QWidget* parent, const char* name, WFlags f)
- : QFrame(parent, name, f)
+KSeparator::KSeparator(int orientation, TQWidget* parent, const char* name, WFlags f)
+ : TQFrame(parent, name, f)
{
setLineWidth(1);
setMidLineWidth(0);
@@ -51,7 +51,7 @@ void KSeparator::setOrientation(int orientation)
{
case Vertical:
case VLine:
- setFrameStyle( QFrame::VLine | QFrame::Sunken );
+ setFrameStyle( TQFrame::VLine | TQFrame::Sunken );
setMinimumSize(2, 0);
break;
@@ -60,7 +60,7 @@ void KSeparator::setOrientation(int orientation)
case Horizontal:
case HLine:
- setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
setMinimumSize(0, 2);
break;
}
@@ -79,36 +79,36 @@ int KSeparator::orientation() const
return 0;
}
-void KSeparator::drawFrame(QPainter *p)
+void KSeparator::drawFrame(TQPainter *p)
{
QPoint p1, p2;
QRect r = frameRect();
- const QColorGroup & g = colorGroup();
+ const TQColorGroup & g = colorGroup();
if ( frameStyle() & HLine ) {
- p1 = QPoint( r.x(), r.height()/2 );
- p2 = QPoint( r.x()+r.width(), p1.y() );
+ p1 = TQPoint( r.x(), r.height()/2 );
+ p2 = TQPoint( r.x()+r.width(), p1.y() );
}
else {
- p1 = QPoint( r.x()+r.width()/2, 0 );
- p2 = QPoint( p1.x(), r.height() );
+ p1 = TQPoint( r.x()+r.width()/2, 0 );
+ p2 = TQPoint( p1.x(), r.height() );
}
- QStyleOption opt( lineWidth(), midLineWidth() );
- style().drawPrimitive( QStyle::PE_Separator, p, QRect( p1, p2 ), g,
- QStyle::Style_Sunken, opt );
+ TQStyleOption opt( lineWidth(), midLineWidth() );
+ style().drawPrimitive( TQStyle::PE_Separator, p, TQRect( p1, p2 ), g,
+ TQStyle::Style_Sunken, opt );
}
-QSize KSeparator::sizeHint() const
+TQSize KSeparator::sizeHint() const
{
if ( frameStyle() & VLine )
- return QSize(2, 0);
+ return TQSize(2, 0);
if ( frameStyle() & HLine )
- return QSize(0, 2);
+ return TQSize(0, 2);
- return QSize(-1, -1);
+ return TQSize(-1, -1);
}
void KSeparator::virtual_hook( int, void* )
diff --git a/kdeui/kseparator.h b/kdeui/kseparator.h
index 56def3eda..008403a15 100644
--- a/kdeui/kseparator.h
+++ b/kdeui/kseparator.h
@@ -20,7 +20,7 @@
#ifndef __KSEPARATOR_H__
#define __KSEPARATOR_H__
-#include <qframe.h>
+#include <tqframe.h>
#include <kdelibs_export.h>
@@ -39,9 +39,9 @@ class KDEUI_EXPORT KSeparator : public QFrame
* Constructor.
* @param parent parent object.
* @param name name of the new object.
- * @param f extra QWidget flags.
+ * @param f extra TQWidget flags.
**/
- KSeparator(QWidget* parent=0, const char* name=0, WFlags f=0);
+ KSeparator(TQWidget* parent=0, const char* name=0, WFlags f=0);
/**
* Constructor.
@@ -49,9 +49,9 @@ class KDEUI_EXPORT KSeparator : public QFrame
* Possible values are HLine or Horizontal and VLine or Vertical.
* @param parent parent object.
* @param name name of the new object.
- * @param f extra QWidget flags.
+ * @param f extra TQWidget flags.
**/
- KSeparator(int orientation, QWidget* parent=0, const char* name=0,
+ KSeparator(int orientation, TQWidget* parent=0, const char* name=0,
WFlags f=0);
/**
@@ -70,13 +70,13 @@ class KDEUI_EXPORT KSeparator : public QFrame
/**
* The recommended height (width) for a horizontal (vertical) separator.
**/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
protected:
/**
* @param p pointer to painter
*/
- virtual void drawFrame( QPainter *p );
+ virtual void drawFrame( TQPainter *p );
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdeui/ksharedpixmap.cpp b/kdeui/ksharedpixmap.cpp
index 8af8d7277..002b4290f 100644
--- a/kdeui/ksharedpixmap.cpp
+++ b/kdeui/ksharedpixmap.cpp
@@ -13,12 +13,12 @@
*/
#include "config.h"
-#include <qrect.h>
-#include <qsize.h>
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qwindowdefs.h>
-#include <qwidget.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqwindowdefs.h>
+#include <tqwidget.h>
#ifdef Q_WS_X11
@@ -58,11 +58,11 @@ public:
Atom pixmap;
Atom target;
Atom selection;
- QRect rect;
+ TQRect rect;
};
KSharedPixmap::KSharedPixmap()
- : QWidget(0L, "shpixmap comm window")
+ : TQWidget(0L, "shpixmap comm window")
{
d = new KSharedPixmapPrivate;
init();
@@ -78,16 +78,16 @@ KSharedPixmap::~KSharedPixmap()
void KSharedPixmap::init()
{
d->pixmap = XInternAtom(qt_xdisplay(), "PIXMAP", false);
- QCString atom;
+ TQCString atom;
atom.sprintf("target prop for window %lx", static_cast<unsigned long int>(winId()));
d->target = XInternAtom(qt_xdisplay(), atom.data(), false);
d->selection = None;
}
-bool KSharedPixmap::isAvailable(const QString & name) const
+bool KSharedPixmap::isAvailable(const TQString & name) const
{
- QString str = QString("KDESHPIXMAP:%1").arg(name);
+ TQString str = TQString("KDESHPIXMAP:%1").arg(name);
Atom sel = XInternAtom(qt_xdisplay(), str.latin1(), true);
if (sel == None)
return false;
@@ -95,16 +95,16 @@ bool KSharedPixmap::isAvailable(const QString & name) const
}
-bool KSharedPixmap::loadFromShared(const QString & name, const QRect & rect)
+bool KSharedPixmap::loadFromShared(const TQString & name, const TQRect & rect)
{
d->rect = rect;
if (d->selection != None)
// already active
return false;
- QPixmap::resize(0, 0); // invalidate
+ TQPixmap::resize(0, 0); // invalidate
- QString str = QString("KDESHPIXMAP:%1").arg(name);
+ TQString str = TQString("KDESHPIXMAP:%1").arg(name);
d->selection = XInternAtom(qt_xdisplay(), str.latin1(), true);
if (d->selection == None)
return false;
@@ -167,7 +167,7 @@ bool KSharedPixmap::x11Event(XEvent *event)
if (d->rect.isEmpty())
{
- QPixmap::resize(width, height);
+ TQPixmap::resize(width, height);
XCopyArea(qt_xdisplay(), pixmap, ((KPixmap*)this)->handle(), qt_xget_temp_gc(qt_xscreen(), false),
0, 0, width, height, 0, 0);
@@ -182,11 +182,11 @@ bool KSharedPixmap::x11Event(XEvent *event)
// background tile for the rectangle "rect".
//Check for origin off screen
- QPoint origin(0, 0);
+ TQPoint origin(0, 0);
if( d->rect.topLeft().x() < 0 || d->rect.topLeft().y() < 0 ) {
//Save the offset and relocate the rect corners
- QPoint tl = d->rect.topLeft();
- QPoint br = d->rect.bottomRight();
+ TQPoint tl = d->rect.topLeft();
+ TQPoint br = d->rect.bottomRight();
if( tl.x() < 0 ) {
origin.setX( abs( tl.x() ) );
tl.setX( 0 );
@@ -195,7 +195,7 @@ bool KSharedPixmap::x11Event(XEvent *event)
origin.setY( abs( tl.y() ) );
tl.setY( 0 );
}
- QRect adjustedRect( tl, br );
+ TQRect adjustedRect( tl, br );
d->rect = adjustedRect;
}
@@ -204,7 +204,7 @@ bool KSharedPixmap::x11Event(XEvent *event)
unsigned xa = d->rect.x() % width, ya = d->rect.y() % height;
unsigned t1w = QMIN(width-xa,tw), t1h = QMIN(height-ya,th);
- QPixmap::resize( tw+origin.x(), th+origin.y() );
+ TQPixmap::resize( tw+origin.x(), th+origin.y() );
XCopyArea(qt_xdisplay(), pixmap, ((KPixmap*)this)->handle(), qt_xget_temp_gc(qt_xscreen(), false),
xa, ya, t1w+origin.x(), t1h+origin.y(), origin.x(), origin.y() );
diff --git a/kdeui/ksharedpixmap.h b/kdeui/ksharedpixmap.h
index 49e5da667..a4f4eb88c 100644
--- a/kdeui/ksharedpixmap.h
+++ b/kdeui/ksharedpixmap.h
@@ -18,9 +18,9 @@
#ifdef Q_WS_X11
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqwidget.h>
class KSharedPixmapPrivate;
@@ -41,7 +41,7 @@ class KSharedPixmapPrivate;
* An example: copy from a shared pixmap:
* \code
* KSharedPixmap *pm = new KSharedPixmap;
- * connect(pm, SIGNAL(done(bool)), SLOT(slotDone(bool)));
+ * connect(pm, TQT_SIGNAL(done(bool)), TQT_SLOT(slotDone(bool)));
* pm->loadFromShared("My Pixmap");
* \endcode
*
@@ -50,7 +50,7 @@ class KSharedPixmapPrivate;
*
*/
class KDEUI_EXPORT KSharedPixmap:
- public QWidget,
+ public TQWidget,
public KPixmap
{
Q_OBJECT
@@ -80,7 +80,7 @@ public:
* @return True if the shared pixmap exists and loading has started
* successfully, false otherwise.
*/
- bool loadFromShared(const QString & name, const QRect & rect=QRect());
+ bool loadFromShared(const TQString & name, const TQRect & rect=TQRect());
/**
* Check whether a shared pixmap is available.
@@ -88,7 +88,7 @@ public:
* @param name The shared pixmap name.
* @return True if the shared pixmap is available, false otherwise.
*/
- bool isAvailable(const QString & name) const;
+ bool isAvailable(const TQString & name) const;
signals:
/**
@@ -102,7 +102,7 @@ protected:
bool x11Event(XEvent *);
private:
- bool copy(const QString & id, const QRect & rect);
+ bool copy(const TQString & id, const TQRect & rect);
void init();
KSharedPixmapPrivate *d;
diff --git a/kdeui/kshortcutdialog.cpp b/kdeui/kshortcutdialog.cpp
index 05a6c705f..27d721626 100644
--- a/kdeui/kshortcutdialog.cpp
+++ b/kdeui/kshortcutdialog.cpp
@@ -19,7 +19,7 @@
#include "kshortcutdialog.h"
-#include <qvariant.h>
+#include <tqvariant.h>
#ifdef Q_WS_X11
#define XK_XKB_KEYS
@@ -44,13 +44,13 @@
#include <kshortcutdialog_simple.h>
#include <kshortcutdialog_advanced.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qframe.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -64,12 +64,12 @@
bool KShortcutDialog::s_showMore = false;
-KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, QWidget* parent, const char* name )
+KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n("Configure Shortcut"),
KDialogBase::Details|KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Cancel, true )
{
setButtonText(Details, i18n("Advanced"));
- m_stack = new QVBox(this);
+ m_stack = new TQVBox(this);
m_stack->setMinimumWidth(360);
m_stack->setSpacing(0);
m_stack->setMargin(0);
@@ -92,21 +92,21 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, Q
m_simple->m_btnClearShortcut->setPixmap( SmallIcon( "locationbar_erase" ) );
m_adv->m_btnClearPrimary->setPixmap( SmallIcon( "locationbar_erase" ) );
m_adv->m_btnClearAlternate->setPixmap( SmallIcon( "locationbar_erase" ) );
- connect(m_simple->m_btnClearShortcut, SIGNAL(clicked()),
- this, SLOT(slotClearShortcut()));
- connect(m_adv->m_btnClearPrimary, SIGNAL(clicked()),
- this, SLOT(slotClearPrimary()));
- connect(m_adv->m_btnClearAlternate, SIGNAL(clicked()),
- this, SLOT(slotClearAlternate()));
-
- connect(m_adv->m_txtPrimary, SIGNAL(clicked()),
- m_adv->m_btnPrimary, SLOT(animateClick()));
- connect(m_adv->m_txtAlternate, SIGNAL(clicked()),
- m_adv->m_btnAlternate, SLOT(animateClick()));
- connect(m_adv->m_btnPrimary, SIGNAL(clicked()),
- this, SLOT(slotSelectPrimary()));
- connect(m_adv->m_btnAlternate, SIGNAL(clicked()),
- this, SLOT(slotSelectAlternate()));
+ connect(m_simple->m_btnClearShortcut, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClearShortcut()));
+ connect(m_adv->m_btnClearPrimary, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClearPrimary()));
+ connect(m_adv->m_btnClearAlternate, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClearAlternate()));
+
+ connect(m_adv->m_txtPrimary, TQT_SIGNAL(clicked()),
+ m_adv->m_btnPrimary, TQT_SLOT(animateClick()));
+ connect(m_adv->m_txtAlternate, TQT_SIGNAL(clicked()),
+ m_adv->m_btnAlternate, TQT_SLOT(animateClick()));
+ connect(m_adv->m_btnPrimary, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelectPrimary()));
+ connect(m_adv->m_btnAlternate, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelectAlternate()));
KGuiItem ok = KStdGuiItem::ok();
ok.setText( i18n( "OK" ) );
@@ -141,7 +141,7 @@ void KShortcutDialog::setShortcut( const KShortcut & shortcut )
void KShortcutDialog::updateShortcutDisplay()
{
- QString s[2] = { m_shortcut.seq(0).toString(), m_shortcut.seq(1).toString() };
+ TQString s[2] = { m_shortcut.seq(0).toString(), m_shortcut.seq(1).toString() };
if( m_bRecording ) {
m_ptxtCurrent->setDefault( true );
@@ -150,7 +150,7 @@ void KShortcutDialog::updateShortcutDisplay()
// Display modifiers for the first key in the KKeySequence
if( m_iKey == 0 ) {
if( m_mod ) {
- QString keyModStr;
+ TQString keyModStr;
if( m_mod & KKey::WIN ) keyModStr += KKey::modFlagLabel(KKey::WIN) + "+";
if( m_mod & KKey::ALT ) keyModStr += KKey::modFlagLabel(KKey::ALT) + "+";
if( m_mod & KKey::CTRL ) keyModStr += KKey::modFlagLabel(KKey::CTRL) + "+";
@@ -169,8 +169,8 @@ void KShortcutDialog::updateShortcutDisplay()
this->setFocus();
}
- s[0].replace('&', QString::fromLatin1("&&"));
- s[1].replace('&', QString::fromLatin1("&&"));
+ s[0].replace('&', TQString::fromLatin1("&&"));
+ s[1].replace('&', TQString::fromLatin1("&&"));
m_simple->m_txtShortcut->setText( s[0] );
m_adv->m_txtPrimary->setText( s[0] );
@@ -391,12 +391,12 @@ void KShortcutDialog::x11KeyReleaseEvent( XEvent* pEvent )
}
}
#elif defined(Q_WS_WIN)
-void KShortcutDialog::keyPressEvent( QKeyEvent * e )
+void KShortcutDialog::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
- int keyQt = QChar( e->key() & 0xff ).isLetter() ?
- (QChar( e->key() & 0xff ).lower().latin1() | (e->key() & 0xffff00) )
+ int keyQt = TQChar( e->key() & 0xff ).isLetter() ?
+ (TQChar( e->key() & 0xff ).lower().latin1() | (e->key() & 0xffff00) )
: e->key();
int modQt = KKeyServer::qtButtonStateToMod( e->state() );
KKeyNative keyNative( KKey(keyQt, modQt) );
@@ -445,7 +445,7 @@ void KShortcutDialog::keyPressEvent( QKeyEvent * e )
updateShortcutDisplay();
if( !m_adv->m_btnMultiKey->isChecked() )
- QTimer::singleShot(500, this, SLOT(accept()));
+ TQTimer::singleShot(500, this, TQT_SLOT(accept()));
}
return;
}
@@ -457,11 +457,11 @@ void KShortcutDialog::keyPressEvent( QKeyEvent * e )
}
}
-bool KShortcutDialog::event ( QEvent * e )
+bool KShortcutDialog::event ( TQEvent * e )
{
- if (e->type()==QEvent::KeyRelease) {
- int modQt = KKeyServer::qtButtonStateToMod( static_cast<QKeyEvent*>(e)->state() );
- KKeyNative keyNative( KKey(static_cast<QKeyEvent*>(e)->key(), modQt) );
+ if (e->type()==TQEvent::KeyRelease) {
+ int modQt = KKeyServer::qtButtonStateToMod( static_cast<TQKeyEvent*>(e)->state() );
+ KKeyNative keyNative( KKey(static_cast<TQKeyEvent*>(e)->key(), modQt) );
uint keySym = keyNative.sym();
bool change = true;
@@ -523,7 +523,7 @@ void KShortcutDialog::keyPressed( KKey key )
updateShortcutDisplay();
if( !m_adv->m_btnMultiKey->isChecked() )
- QTimer::singleShot(500, this, SLOT(accept()));
+ TQTimer::singleShot(500, this, TQT_SLOT(accept()));
}
#include "kshortcutdialog.moc"
diff --git a/kdeui/kshortcutdialog.h b/kdeui/kshortcutdialog.h
index e054e356b..a9fd97d95 100644
--- a/kdeui/kshortcutdialog.h
+++ b/kdeui/kshortcutdialog.h
@@ -42,7 +42,7 @@ class KDEUI_EXPORT KShortcutDialog : public KDialogBase
{
Q_OBJECT
public:
- KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, QWidget* parent = 0, const char* name = 0 );
+ KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, TQWidget* parent = 0, const char* name = 0 );
~KShortcutDialog();
void setShortcut( const KShortcut & shortcut );
@@ -61,7 +61,7 @@ private:
uint m_mod;
KShortcutDialogSimple *m_simple;
KShortcutDialogAdvanced *m_adv;
- QVBox *m_stack;
+ TQVBox *m_stack;
void updateShortcutDisplay();
//void displayMods();
@@ -75,8 +75,8 @@ private:
void x11KeyReleaseEvent( XEvent* pEvent );
#endif
#ifdef Q_WS_WIN
- virtual void keyPressEvent( QKeyEvent * e );
- virtual bool event(QEvent * e);
+ virtual void keyPressEvent( TQKeyEvent * e );
+ virtual bool event(TQEvent * e);
#endif
protected slots:
diff --git a/kdeui/kspell.cpp b/kdeui/kspell.cpp
index e34b819e8..c4ea85ec6 100644
--- a/kdeui/kspell.cpp
+++ b/kdeui/kspell.cpp
@@ -33,9 +33,9 @@
#include <strings.h>
#endif
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -61,7 +61,7 @@ enum checkMethod { Method1 = 0, Method2 };
struct BufferedWord
{
checkMethod method;
- QString word;
+ TQString word;
bool useDialog;
bool suggest;
};
@@ -76,8 +76,8 @@ public:
SpellerType type;
KSpell* suggestSpell;
bool checking;
- QValueList<BufferedWord> unchecked;
- QTimer *checkNextTimer;
+ TQValueList<BufferedWord> unchecked;
+ TQTimer *checkNextTimer;
bool aspellV6;
};
@@ -97,23 +97,23 @@ public:
// Connects a slot to KProcIO's output signal
-#define OUTPUT(x) (connect (proc, SIGNAL (readReady(KProcIO *)), this, SLOT (x(KProcIO *))))
+#define OUTPUT(x) (connect (proc, TQT_SIGNAL (readReady(KProcIO *)), this, TQT_SLOT (x(KProcIO *))))
// Disconnect a slot from...
-#define NOOUTPUT(x) (disconnect (proc, SIGNAL (readReady(KProcIO *)), this, SLOT (x(KProcIO *))))
+#define NOOUTPUT(x) (disconnect (proc, TQT_SIGNAL (readReady(KProcIO *)), this, TQT_SLOT (x(KProcIO *))))
-KSpell::KSpell( QWidget *_parent, const QString &_caption,
- QObject *obj, const char *slot, KSpellConfig *_ksc,
+KSpell::KSpell( TQWidget *_parent, const TQString &_caption,
+ TQObject *obj, const char *slot, KSpellConfig *_ksc,
bool _progressbar, bool _modal )
{
initialize( _parent, _caption, obj, slot, _ksc,
_progressbar, _modal, Text );
}
-KSpell::KSpell( QWidget *_parent, const QString &_caption,
- QObject *obj, const char *slot, KSpellConfig *_ksc,
+KSpell::KSpell( TQWidget *_parent, const TQString &_caption,
+ TQObject *obj, const char *slot, KSpellConfig *_ksc,
bool _progressbar, bool _modal, SpellerType type )
{
initialize( _parent, _caption, obj, slot, _ksc,
@@ -128,19 +128,19 @@ int KSpell::widthDlg() const { return ksdlg->width(); }
// Check if aspell is at least version 0.6
static bool determineASpellV6()
{
- QString result;
+ TQString result;
FILE *fs = popen("aspell -v", "r");
if (fs)
{
// Close textstream before we close fs
{
- QTextStream ts(fs, IO_ReadOnly);
+ TQTextStream ts(fs, IO_ReadOnly);
result = ts.read().stripWhiteSpace();
}
pclose(fs);
}
- QRegExp rx("Aspell (\\d.\\d)");
+ TQRegExp rx("Aspell (\\d.\\d)");
if (rx.search(result) != -1)
{
float version = rx.cap(1).toFloat();
@@ -296,11 +296,11 @@ KSpell::startIspell()
if (trystart == 0) //don't connect these multiple times
{
- connect( proc, SIGNAL(receivedStderr(KProcess *, char *, int)),
- this, SLOT(ispellErrors(KProcess *, char *, int)) );
+ connect( proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ this, TQT_SLOT(ispellErrors(KProcess *, char *, int)) );
- connect( proc, SIGNAL(processExited(KProcess *)),
- this, SLOT(ispellExit (KProcess *)) );
+ connect( proc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(ispellExit (KProcess *)) );
OUTPUT(KSpell2);
}
@@ -308,7 +308,7 @@ KSpell::startIspell()
if ( !proc->start() )
{
m_status = Error;
- QTimer::singleShot( 0, this, SLOT(emitDeath()));
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()));
}
}
@@ -322,7 +322,7 @@ KSpell::ispellErrors( KProcess *, char *buffer, int buflen )
void KSpell::KSpell2( KProcIO * )
{
- QString line;
+ TQString line;
kdDebug(750) << "KSpell::KSpell2" << endl;
@@ -331,14 +331,14 @@ void KSpell::KSpell2( KProcIO * )
if ( proc->readln( line, true ) == -1 )
{
- QTimer::singleShot( 0, this, SLOT(emitDeath()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) );
return;
}
if ( line[0] != '@' ) //@ indicates that ispell is working fine
{
- QTimer::singleShot( 0, this, SLOT(emitDeath()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) );
return;
}
@@ -346,7 +346,7 @@ void KSpell::KSpell2( KProcIO * )
if ( !ignore("kde") )
{
kdDebug(750) << "@KDE was false" << endl;
- QTimer::singleShot( 0, this, SLOT(emitDeath()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) );
return;
}
@@ -354,7 +354,7 @@ void KSpell::KSpell2( KProcIO * )
if ( !ignore("linux") )
{
kdDebug(750) << "@Linux was false" << endl;
- QTimer::singleShot( 0, this, SLOT(emitDeath()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) );
return;
}
@@ -375,10 +375,10 @@ KSpell::setUpDialog( bool reallyuseprogressbar )
progressbar && reallyuseprogressbar, modaldlg );
ksdlg->setCaption( caption );
- connect( ksdlg, SIGNAL(command(int)),
- this, SLOT(slotStopCancel(int)) );
- connect( this, SIGNAL(progress(unsigned int)),
- ksdlg, SLOT(slotProgress(unsigned int)) );
+ connect( ksdlg, TQT_SIGNAL(command(int)),
+ this, TQT_SLOT(slotStopCancel(int)) );
+ connect( this, TQT_SIGNAL(progress(unsigned int)),
+ ksdlg, TQT_SLOT(slotProgress(unsigned int)) );
#ifdef Q_WS_X11 // FIXME(E): Implement for Qt/Embedded
KWin::setIcons( ksdlg->winId(), kapp->icon(), kapp->miniIcon() );
@@ -388,9 +388,9 @@ KSpell::setUpDialog( bool reallyuseprogressbar )
dialogsetup = true;
}
-bool KSpell::addPersonal( const QString & word )
+bool KSpell::addPersonal( const TQString & word )
{
- QString qs = word.simplifyWhiteSpace();
+ TQString qs = word.simplifyWhiteSpace();
//we'll let ispell do the work here b/c we can
if ( qs.find(' ') != -1 || qs.isEmpty() ) // make sure it's a _word_
@@ -407,9 +407,9 @@ bool KSpell::writePersonalDictionary()
return proc->writeStdin("#");
}
-bool KSpell::ignore( const QString & word )
+bool KSpell::ignore( const TQString & word )
{
- QString qs = word.simplifyWhiteSpace();
+ TQString qs = word.simplifyWhiteSpace();
//we'll let ispell do the work here b/c we can
if ( qs.find (' ') != -1 || qs.isEmpty() ) // make sure it's a _word_
@@ -421,9 +421,9 @@ bool KSpell::ignore( const QString & word )
}
bool
-KSpell::cleanFputsWord( const QString & s, bool appendCR )
+KSpell::cleanFputsWord( const TQString & s, bool appendCR )
{
- QString qs(s);
+ TQString qs(s);
bool empty = true;
for( unsigned int i = 0; i < qs.length(); i++ )
@@ -448,9 +448,9 @@ KSpell::cleanFputsWord( const QString & s, bool appendCR )
}
bool
-KSpell::cleanFputs( const QString & s, bool appendCR )
+KSpell::cleanFputs( const TQString & s, bool appendCR )
{
- QString qs(s);
+ TQString qs(s);
unsigned l = qs.length();
// some uses of '$' (e.g. "$0") cause ispell to skip all following text
@@ -467,10 +467,10 @@ KSpell::cleanFputs( const QString & s, bool appendCR )
return proc->writeStdin( "^"+qs, appendCR );
}
else
- return proc->writeStdin( QString::fromAscii( "^\n" ),appendCR );
+ return proc->writeStdin( TQString::fromAscii( "^\n" ),appendCR );
}
-bool KSpell::checkWord( const QString & buffer, bool _usedialog )
+bool KSpell::checkWord( const TQString & buffer, bool _usedialog )
{
if (d->checking) { // don't check multiple words simultaneously
BufferedWord bufferedWord;
@@ -481,14 +481,14 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog )
return true;
}
d->checking = true;
- QString qs = buffer.simplifyWhiteSpace();
+ TQString qs = buffer.simplifyWhiteSpace();
if ( qs.find (' ') != -1 || qs.isEmpty() ) { // make sure it's a _word_
d->checkNextTimer->start( 0, true );
return false;
}
///set the dialog signal handler
- dialog3slot = SLOT(checkWord3());
+ dialog3slot = TQT_SLOT(checkWord3());
usedialog = _usedialog;
setUpDialog( false );
@@ -499,11 +499,11 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog )
else
ksdlg->hide();
- QString blank_line;
+ TQString blank_line;
while (proc->readln( blank_line, true ) != -1); // eat spurious blanks
OUTPUT(checkWord2);
- // connect (this, SIGNAL (dialog3()), this, SLOT (checkWord3()));
+ // connect (this, TQT_SIGNAL (dialog3()), this, TQT_SLOT (checkWord3()));
proc->writeStdin( "%" ); // turn off terse mode
proc->writeStdin( buffer ); // send the word to ispell
@@ -511,7 +511,7 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog )
return true;
}
-bool KSpell::checkWord( const QString & buffer, bool _usedialog, bool suggest )
+bool KSpell::checkWord( const TQString & buffer, bool _usedialog, bool suggest )
{
if (d->checking) { // don't check multiple words simultaneously
BufferedWord bufferedWord;
@@ -523,7 +523,7 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog, bool suggest )
return true;
}
d->checking = true;
- QString qs = buffer.simplifyWhiteSpace();
+ TQString qs = buffer.simplifyWhiteSpace();
if ( qs.find (' ') != -1 || qs.isEmpty() ) { // make sure it's a _word_
d->checkNextTimer->start( 0, true );
@@ -532,7 +532,7 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog, bool suggest )
///set the dialog signal handler
if ( !suggest ) {
- dialog3slot = SLOT(checkWord3());
+ dialog3slot = TQT_SLOT(checkWord3());
usedialog = _usedialog;
setUpDialog( false );
if ( _usedialog )
@@ -543,11 +543,11 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog, bool suggest )
ksdlg->hide();
}
- QString blank_line;
+ TQString blank_line;
while (proc->readln( blank_line, true ) != -1); // eat spurious blanks
OUTPUT(checkWord2);
- // connect (this, SIGNAL (dialog3()), this, SLOT (checkWord3()));
+ // connect (this, TQT_SIGNAL (dialog3()), this, TQT_SLOT (checkWord3()));
proc->writeStdin( "%" ); // turn off terse mode
proc->writeStdin( buffer ); // send the word to ispell
@@ -557,8 +557,8 @@ bool KSpell::checkWord( const QString & buffer, bool _usedialog, bool suggest )
void KSpell::checkWord2( KProcIO* )
{
- QString word;
- QString line;
+ TQString word;
+ TQString line;
proc->readln( line, true ); //get ispell's response
/* ispell man page: "Each sentence of text input is terminated with an
@@ -570,7 +570,7 @@ void KSpell::checkWord2( KProcIO* )
can get out of sync.
</sanders>
*/
- QString blank_line;
+ TQString blank_line;
while (proc->readln( blank_line, true ) != -1); // eat the blank line
NOOUTPUT(checkWord2);
@@ -578,7 +578,7 @@ void KSpell::checkWord2( KProcIO* )
if ( mistake && usedialog )
{
cwword = word;
- dialog( word, sugg, SLOT(checkWord3()) );
+ dialog( word, sugg, TQT_SLOT(checkWord3()) );
d->checkNextTimer->start( 0, true );
return;
}
@@ -610,14 +610,14 @@ void KSpell::checkNext()
void KSpell::suggestWord( KProcIO * )
{
- QString word;
- QString line;
+ TQString word;
+ TQString line;
proc->readln( line, true ); //get ispell's response
/* ispell man page: "Each sentence of text input is terminated with an
additional blank line, indicating that ispell has completed processing
the input line." */
- QString blank_line;
+ TQString blank_line;
proc->readln( blank_line, true ); // eat the blank line
NOOUTPUT(checkWord2);
@@ -626,23 +626,23 @@ void KSpell::suggestWord( KProcIO * )
if ( mistake && usedialog )
{
cwword=word;
- dialog( word, sugg, SLOT(checkWord3()) );
+ dialog( word, sugg, TQT_SLOT(checkWord3()) );
return;
}
}
void KSpell::checkWord3()
{
- disconnect( this, SIGNAL(dialog3()), this, SLOT(checkWord3()) );
+ disconnect( this, TQT_SIGNAL(dialog3()), this, TQT_SLOT(checkWord3()) );
emit corrected( cwword, replacement(), 0L );
}
-QString KSpell::funnyWord( const QString & word )
+TQString KSpell::funnyWord( const TQString & word )
// composes a guess from ispell to a readable word
// e.g. "re+fry-y+ies" -> "refries"
{
- QString qs;
+ TQString qs;
unsigned int i=0;
for( i=0; word [i]!='\0';i++ )
@@ -651,7 +651,7 @@ QString KSpell::funnyWord( const QString & word )
continue;
if (word [i]=='-')
{
- QString shorty;
+ TQString shorty;
unsigned int j;
int k;
@@ -676,7 +676,7 @@ QString KSpell::funnyWord( const QString & word )
}
-int KSpell::parseOneResponse( const QString &buffer, QString &word, QStringList & sugg )
+int KSpell::parseOneResponse( const TQString &buffer, TQString &word, TQStringList & sugg )
// buffer is checked, word and sugg are filled in
// returns
// GOOD if word is fine
@@ -708,7 +708,7 @@ int KSpell::parseOneResponse( const QString &buffer, QString &word, QStringList
if( d->m_bIgnoreUpperWords && word[0] == word[0].upper() )
{
- QString text = word[0] + word.right( word.length()-1 ).lower();
+ TQString text = word[0] + word.right( word.length()-1 ).lower();
if( text == word )
return IGNORE;
}
@@ -721,7 +721,7 @@ int KSpell::parseOneResponse( const QString &buffer, QString &word, QStringList
return IGNORE;
//// Position in line ///
- QString qs2;
+ TQString qs2;
if ( buffer.find( ':' ) != -1 )
qs2 = buffer.left( buffer.find(':') );
@@ -731,7 +731,7 @@ int KSpell::parseOneResponse( const QString &buffer, QString &word, QStringList
posinline = qs2.right( qs2.length()-qs2.findRev(' ') ).toInt()-1;
///// Replace-list stuff ////
- QStringList::Iterator it = replacelist.begin();
+ TQStringList::Iterator it = replacelist.begin();
for( ;it != replacelist.end(); ++it, ++it ) // Skip two entries at a time.
{
if ( word == *it ) // Word matches
@@ -745,14 +745,14 @@ int KSpell::parseOneResponse( const QString &buffer, QString &word, QStringList
/////// Suggestions //////
if ( buffer[0] != '#' )
{
- QString qs = buffer.mid( buffer.find(':')+2, buffer.length() );
+ TQString qs = buffer.mid( buffer.find(':')+2, buffer.length() );
qs += ',';
sugg.clear();
i = j = 0;
while( (unsigned int)i < qs.length() )
{
- QString temp = qs.mid( i, (j=qs.find (',',i)) - i );
+ TQString temp = qs.mid( i, (j=qs.find (',',i)) - i );
sugg.append( funnyWord(temp) );
i=j+2;
@@ -779,7 +779,7 @@ int KSpell::parseOneResponse( const QString &buffer, QString &word, QStringList
return MISTAKE;
}
-bool KSpell::checkList (QStringList *_wordlist, bool _usedialog)
+bool KSpell::checkList (TQStringList *_wordlist, bool _usedialog)
// prepare check of string list
{
wordlist=_wordlist;
@@ -792,7 +792,7 @@ bool KSpell::checkList (QStringList *_wordlist, bool _usedialog)
setUpDialog();
//set the dialog signal handler
- dialog3slot = SLOT (checkList4 ());
+ dialog3slot = TQT_SLOT (checkList4 ());
proc->writeStdin ("%"); // turn off terse mode & check one word at a time
@@ -851,8 +851,8 @@ void KSpell::checkList3a (KProcIO *)
int e, tempe;
- QString word;
- QString line;
+ TQString word;
+ TQString line;
do
{
@@ -872,7 +872,7 @@ void KSpell::checkList3a (KProcIO *)
if ( e == REPLACE )
{
- QString old = *(--wlIt); ++wlIt;
+ TQString old = *(--wlIt); ++wlIt;
dlgreplacement = word;
checkListReplaceCurrent();
// inform application
@@ -883,7 +883,7 @@ void KSpell::checkList3a (KProcIO *)
cwword = word;
dlgon = true;
// show the dialog
- dialog( word, sugg, SLOT(checkList4()) );
+ dialog( word, sugg, TQT_SLOT(checkList4()) );
return;
}
else
@@ -915,7 +915,7 @@ void KSpell::checkListReplaceCurrent()
// go back to misspelled word
wlIt--;
- QString s = *wlIt;
+ TQString s = *wlIt;
s.replace(posinline+offset,orig.length(),replacement());
offset += replacement().length()-orig.length();
wordlist->insert (wlIt, s);
@@ -928,9 +928,9 @@ void KSpell::checkList4 ()
// evaluate dialog return, when a button was pressed there
{
dlgon=false;
- QString old;
+ TQString old;
- disconnect (this, SIGNAL (dialog3()), this, SLOT (checkList4()));
+ disconnect (this, TQT_SIGNAL (dialog3()), this, TQT_SLOT (checkList4()));
//others should have been processed by dialog() already
switch (dlgresult)
@@ -973,14 +973,14 @@ void KSpell::checkList4 ()
}
}
-bool KSpell::check( const QString &_buffer, bool _usedialog )
+bool KSpell::check( const TQString &_buffer, bool _usedialog )
{
- QString qs;
+ TQString qs;
usedialog = _usedialog;
setUpDialog();
//set the dialog signal handler
- dialog3slot = SLOT(check3());
+ dialog3slot = TQT_SLOT(check3());
kdDebug(750) << "KS: check" << endl;
origbuffer = _buffer;
@@ -1037,8 +1037,8 @@ void KSpell::check2( KProcIO * )
// invoked by KProcIO when read from ispell
{
int e, tempe;
- QString word;
- QString line;
+ TQString word;
+ TQString line;
static bool recursive = false;
if (recursive &&
!ksdlg )
@@ -1067,7 +1067,7 @@ void KSpell::check2( KProcIO * )
// convert line to UTF-8, cut at pos, convert back to UCS-2
// and get string length
- posinline = (QString::fromUtf8(
+ posinline = (TQString::fromUtf8(
origbuffer.mid(lastlastline,lastline-lastlastline).utf8(),
posinline)).length();
// kdDebug(750) << "posinline corr: " << posinline << endl;
@@ -1090,7 +1090,7 @@ void KSpell::check2( KProcIO * )
//kdDebug(750) << "(Before dialog) word=[" << word << "] cwword =[" << cwword << "]\n" << endl;
if ( usedialog ) {
// show the word in the dialog
- dialog( word, sugg, SLOT(check3()) );
+ dialog( word, sugg, TQT_SLOT(check3()) );
} else {
// No dialog, just emit misspelling and continue
d->m_bNoMisspellingsEncountered = false;
@@ -1125,7 +1125,7 @@ void KSpell::check2( KProcIO * )
if ( (unsigned int)lastline < origbuffer.length() )
{
int i;
- QString qs;
+ TQString qs;
//kdDebug(750) << "[EOL](" << tempe << ")[" << temp << "]" << endl;
@@ -1152,7 +1152,7 @@ void KSpell::check2( KProcIO * )
void KSpell::check3 ()
// evaluates the return value of the dialog
{
- disconnect (this, SIGNAL (dialog3()), this, SLOT (check3()));
+ disconnect (this, TQT_SIGNAL (dialog3()), this, TQT_SLOT (check3()));
kdDebug(750) << "check3 [" << cwword << "] [" << replacement() << "] " << dlgresult << endl;
//others should have been processed by dialog() already
@@ -1199,31 +1199,31 @@ KSpell::slotStopCancel (int result)
if (!dialog3slot.isEmpty())
{
dlgresult=result;
- connect (this, SIGNAL (dialog3()), this, dialog3slot.ascii());
+ connect (this, TQT_SIGNAL (dialog3()), this, dialog3slot.ascii());
emit dialog3();
}
}
-void KSpell::dialog( const QString & word, QStringList & sugg, const char *_slot )
+void KSpell::dialog( const TQString & word, TQStringList & sugg, const char *_slot )
{
dlgorigword = word;
dialog3slot = _slot;
dialogwillprocess = true;
- connect( ksdlg, SIGNAL(command(int)), this, SLOT(dialog2(int)) );
- QString tmpBuf = newbuffer;
+ connect( ksdlg, TQT_SIGNAL(command(int)), this, TQT_SLOT(dialog2(int)) );
+ TQString tmpBuf = newbuffer;
kdDebug(750)<<" position = "<<lastpos<<endl;
// extract a context string, replace all characters which might confuse
// the RichText display and highlight the possibly wrong word
- QString marker( "_MARKER_" );
+ TQString marker( "_MARKER_" );
tmpBuf.replace( lastpos, word.length(), marker );
- QString context = tmpBuf.mid(QMAX(lastpos-18,0), 2*18+marker.length());
- context.replace( '\n',QString::fromLatin1(" "));
- context.replace( '<', QString::fromLatin1("&lt;") );
- context.replace( '>', QString::fromLatin1("&gt;") );
- context.replace( marker, QString::fromLatin1("<b>%1</b>").arg( word ) );
+ TQString context = tmpBuf.mid(QMAX(lastpos-18,0), 2*18+marker.length());
+ context.replace( '\n',TQString::fromLatin1(" "));
+ context.replace( '<', TQString::fromLatin1("&lt;") );
+ context.replace( '>', TQString::fromLatin1("&gt;") );
+ context.replace( marker, TQString::fromLatin1("<b>%1</b>").arg( word ) );
context = "<qt>" + context + "</qt>";
ksdlg->init( word, &sugg, context );
@@ -1236,9 +1236,9 @@ void KSpell::dialog( const QString & word, QStringList & sugg, const char *_slot
void KSpell::dialog2( int result )
{
- QString qs;
+ TQString qs;
- disconnect( ksdlg, SIGNAL(command(int)), this, SLOT(dialog2(int)) );
+ disconnect( ksdlg, TQT_SIGNAL(command(int)), this, TQT_SLOT(dialog2(int)) );
dialogwillprocess = false;
dlgresult = result;
ksdlg->standby();
@@ -1266,7 +1266,7 @@ void KSpell::dialog2( int result )
case KS_REPLACEALL:
{
replacelist.append( dlgorigword );
- QString _replacement = replacement();
+ TQString _replacement = replacement();
replacelist.append( _replacement );
emit replaceall( dlgorigword , _replacement );
}
@@ -1277,7 +1277,7 @@ void KSpell::dialog2( int result )
break;
}
- connect( this, SIGNAL(dialog3()), this, dialog3slot.ascii() );
+ connect( this, TQT_SIGNAL(dialog3()), this, dialog3slot.ascii() );
emit dialog3();
}
@@ -1334,7 +1334,7 @@ void KSpell::ispellExit( KProcess* )
return; // Dead already
kdDebug(750) << "Death" << endl;
- QTimer::singleShot( 0, this, SLOT(emitDeath()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) );
}
// This is always called from the event loop to make
@@ -1366,7 +1366,7 @@ void KSpell::emitProgress ()
void KSpell::moveDlg( int x, int y )
{
- QPoint pt( x,y ), pt2;
+ TQPoint pt( x,y ), pt2;
pt2 = parent->mapToGlobal( pt );
ksdlg->move( pt2.x(),pt2.y() );
}
@@ -1388,13 +1388,13 @@ void KSpell::setIgnoreTitleCase(bool _ignore)
// --------------------------------------------------
int
-KSpell::modalCheck( QString& text )
+KSpell::modalCheck( TQString& text )
{
return modalCheck( text,0 );
}
int
-KSpell::modalCheck( QString& text, KSpellConfig* _kcs )
+KSpell::modalCheck( TQString& text, KSpellConfig* _kcs )
{
modalreturn = 0;
modaltext = text;
@@ -1411,7 +1411,7 @@ KSpell::modalCheck( QString& text, KSpellConfig* _kcs )
return modalreturn;
}
-void KSpell::slotSpellCheckerCorrected( const QString & oldText, const QString & newText, unsigned int pos )
+void KSpell::slotSpellCheckerCorrected( const TQString & oldText, const TQString & newText, unsigned int pos )
{
modaltext=modaltext.replace(pos,oldText.length(),newText);
}
@@ -1423,16 +1423,16 @@ void KSpell::slotModalReady()
//kdDebug(750) << "MODAL READY------------------" << endl;
Q_ASSERT( m_status == Running );
- connect( this, SIGNAL( done( const QString & ) ),
- this, SLOT( slotModalDone( const QString & ) ) );
- QObject::connect( this, SIGNAL( corrected( const QString&, const QString&, unsigned int ) ),
- this, SLOT( slotSpellCheckerCorrected( const QString&, const QString &, unsigned int ) ) );
- QObject::connect( this, SIGNAL( death() ),
- this, SLOT( slotModalSpellCheckerFinished( ) ) );
+ connect( this, TQT_SIGNAL( done( const TQString & ) ),
+ this, TQT_SLOT( slotModalDone( const TQString & ) ) );
+ TQObject::connect( this, TQT_SIGNAL( corrected( const TQString&, const TQString&, unsigned int ) ),
+ this, TQT_SLOT( slotSpellCheckerCorrected( const TQString&, const TQString &, unsigned int ) ) );
+ TQObject::connect( this, TQT_SIGNAL( death() ),
+ this, TQT_SLOT( slotModalSpellCheckerFinished( ) ) );
check( modaltext );
}
-void KSpell::slotModalDone( const QString &/*_buffer*/ )
+void KSpell::slotModalDone( const TQString &/*_buffer*/ )
{
//kdDebug(750) << "MODAL DONE " << _buffer << endl;
//modaltext = _buffer;
@@ -1450,8 +1450,8 @@ void KSpell::slotModalSpellCheckerFinished( )
modalreturn=(int)this->status();
}
-void KSpell::initialize( QWidget *_parent, const QString &_caption,
- QObject *obj, const char *slot, KSpellConfig *_ksc,
+void KSpell::initialize( TQWidget *_parent, const TQString &_caption,
+ TQObject *obj, const char *slot, KSpellConfig *_ksc,
bool _progressbar, bool _modal, SpellerType type )
{
d = new KSpellPrivate;
@@ -1462,9 +1462,9 @@ void KSpell::initialize( QWidget *_parent, const QString &_caption,
d->type = type;
d->checking = false;
d->aspellV6 = false;
- d->checkNextTimer = new QTimer( this );
- connect( d->checkNextTimer, SIGNAL( timeout() ),
- this, SLOT( checkNext() ));
+ d->checkNextTimer = new TQTimer( this );
+ connect( d->checkNextTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( checkNext() ));
autoDelete = false;
modaldlg = _modal;
progressbar = _progressbar;
@@ -1484,49 +1484,49 @@ void KSpell::initialize( QWidget *_parent, const QString &_caption,
switch ( ksconfig->encoding() )
{
case KS_E_LATIN1:
- codec = QTextCodec::codecForName("ISO 8859-1");
+ codec = TQTextCodec::codecForName("ISO 8859-1");
break;
case KS_E_LATIN2:
- codec = QTextCodec::codecForName("ISO 8859-2");
+ codec = TQTextCodec::codecForName("ISO 8859-2");
break;
case KS_E_LATIN3:
- codec = QTextCodec::codecForName("ISO 8859-3");
+ codec = TQTextCodec::codecForName("ISO 8859-3");
break;
case KS_E_LATIN4:
- codec = QTextCodec::codecForName("ISO 8859-4");
+ codec = TQTextCodec::codecForName("ISO 8859-4");
break;
case KS_E_LATIN5:
- codec = QTextCodec::codecForName("ISO 8859-5");
+ codec = TQTextCodec::codecForName("ISO 8859-5");
break;
case KS_E_LATIN7:
- codec = QTextCodec::codecForName("ISO 8859-7");
+ codec = TQTextCodec::codecForName("ISO 8859-7");
break;
case KS_E_LATIN8:
- codec = QTextCodec::codecForName("ISO 8859-8-i");
+ codec = TQTextCodec::codecForName("ISO 8859-8-i");
break;
case KS_E_LATIN9:
- codec = QTextCodec::codecForName("ISO 8859-9");
+ codec = TQTextCodec::codecForName("ISO 8859-9");
break;
case KS_E_LATIN13:
- codec = QTextCodec::codecForName("ISO 8859-13");
+ codec = TQTextCodec::codecForName("ISO 8859-13");
break;
case KS_E_LATIN15:
- codec = QTextCodec::codecForName("ISO 8859-15");
+ codec = TQTextCodec::codecForName("ISO 8859-15");
break;
case KS_E_UTF8:
- codec = QTextCodec::codecForName("UTF-8");
+ codec = TQTextCodec::codecForName("UTF-8");
break;
case KS_E_KOI8R:
- codec = QTextCodec::codecForName("KOI8-R");
+ codec = TQTextCodec::codecForName("KOI8-R");
break;
case KS_E_KOI8U:
- codec = QTextCodec::codecForName("KOI8-U");
+ codec = TQTextCodec::codecForName("KOI8-U");
break;
case KS_E_CP1251:
- codec = QTextCodec::codecForName("CP1251");
+ codec = TQTextCodec::codecForName("CP1251");
break;
case KS_E_CP1255:
- codec = QTextCodec::codecForName("CP1255");
+ codec = TQTextCodec::codecForName("CP1255");
break;
default:
break;
@@ -1545,7 +1545,7 @@ void KSpell::initialize( QWidget *_parent, const QString &_caption,
curprog=0;
dialogwillprocess = false;
- dialog3slot = QString::null;
+ dialog3slot = TQString::null;
personaldict = false;
dlgresult = -1;
@@ -1559,19 +1559,19 @@ void KSpell::initialize( QWidget *_parent, const QString &_caption,
if ( obj && slot )
// caller wants to know when kspell is ready
- connect( this, SIGNAL(ready(KSpell *)), obj, slot);
+ connect( this, TQT_SIGNAL(ready(KSpell *)), obj, slot);
else
// Hack for modal spell checking
- connect( this, SIGNAL(ready(KSpell *)), this, SLOT(slotModalReady()) );
+ connect( this, TQT_SIGNAL(ready(KSpell *)), this, TQT_SLOT(slotModalReady()) );
proc = new KProcIO( codec );
startIspell();
}
-QString KSpell::modaltext;
+TQString KSpell::modaltext;
int KSpell::modalreturn = 0;
-QWidget* KSpell::modalWidgetHack = 0;
+TQWidget* KSpell::modalWidgetHack = 0;
#include "kspell.moc"
diff --git a/kdeui/kspell.h b/kdeui/kspell.h
index 17ad038e1..aee8ed822 100644
--- a/kdeui/kspell.h
+++ b/kdeui/kspell.h
@@ -21,9 +21,9 @@
#include "ksconfig.h"
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
class QTextCodec;
@@ -96,8 +96,8 @@ public:
* @param progressbar Indicates if progress bar should be shown.
* @param modal Indicates modal or non-modal dialog.
*/
- KSpell(QWidget *parent, const QString &caption,
- QObject *receiver, const char *slot, KSpellConfig *kcs=0,
+ KSpell(TQWidget *parent, const TQString &caption,
+ TQObject *receiver, const char *slot, KSpellConfig *kcs=0,
bool progressbar = true, bool modal = false);
/**
@@ -118,8 +118,8 @@ public:
* @param modal Indicates modal or non-modal dialog.
* @param type Type of the document to check
*/
- KSpell(QWidget *parent, const QString &caption,
- QObject *receiver, const char *slot, KSpellConfig *kcs,
+ KSpell(TQWidget *parent, const TQString &caption,
+ TQObject *receiver, const char *slot, KSpellConfig *kcs,
bool progressbar, bool modal, SpellerType type);
/**
@@ -157,7 +157,7 @@ public:
* in @p _buffer check() reached before stopping.
*/
- virtual bool check (const QString &_buffer, bool usedialog = true);
+ virtual bool check (const TQString &_buffer, bool usedialog = true);
/**
* Returns the position (when using check()) or word
@@ -177,7 +177,7 @@ public:
* to check() would result in the mark-up tags being
* spell checked.
*/
- virtual bool checkList (QStringList *_wordlist, bool usedialog = true);
+ virtual bool checkList (TQStringList *_wordlist, bool usedialog = true);
/**
* Spellchecks a single word.
@@ -201,8 +201,8 @@ public:
* complete. You can look at suggestions() to see what the
* suggested replacements were.
*/
- virtual bool checkWord (const QString &_buffer, bool usedialog = false);
- bool checkWord( const QString & buffer, bool _usedialog, bool suggest );
+ virtual bool checkWord (const TQString &_buffer, bool usedialog = false);
+ bool checkWord( const TQString & buffer, bool _usedialog, bool suggest );
/**
* Hides the dialog box.
@@ -219,7 +219,7 @@ public:
* use this to get the list of
* suggestions (if any were available).
*/
- QStringList suggestions () const { return sugg; }
+ TQStringList suggestions () const { return sugg; }
/**
* Gets the result code of the dialog box.
@@ -264,7 +264,7 @@ public:
*
* You might want the full buffer in its partially-checked state.
*/
- QString intermediateBuffer () const {return newbuffer;}
+ TQString intermediateBuffer () const {return newbuffer;}
/**
* Tells ISpell/ASpell to ignore this word for the life of this KSpell instance.
@@ -272,7 +272,7 @@ public:
* @return false if @p word is not a word or there was an error
* communicating with ISpell/ASpell.
*/
- virtual bool ignore (const QString & word);
+ virtual bool ignore (const TQString & word);
/**
* Adds a word to the user's personal dictionary.
@@ -280,7 +280,7 @@ public:
* @return false if @p word
* is not a word or there was an error communicating with ISpell/ASpell.
*/
- virtual bool addPersonal (const QString & word);
+ virtual bool addPersonal (const TQString & word);
/**
* @return the KSpellConfig object being used by this KSpell instance.
@@ -310,7 +310,7 @@ public:
* Your application's GUI will still be updated, however.
*
*/
- static int modalCheck( QString& text ) KDE_DEPRECATED;
+ static int modalCheck( TQString& text ) KDE_DEPRECATED;
/**
* Performs a synchronous spellcheck.
@@ -320,7 +320,7 @@ public:
*
* This overloaded method uses the spell-check configuration passed as parameter.
*/
- static int modalCheck( QString& text, KSpellConfig * kcs );
+ static int modalCheck( TQString& text, KSpellConfig * kcs );
/**
* Call setIgnoreUpperWords(true) to tell the spell-checker to ignore
@@ -346,7 +346,7 @@ signals:
* (The first position is zero.)
* If it is emitted by checkList(), @p pos is the index to
* the misspelled
- * word in the QStringList passed to checkList().
+ * word in the TQStringList passed to checkList().
* Note, that @p originalword can be only a word part, if it's
* word with hyphens.
*
@@ -354,7 +354,7 @@ signals:
* calling program's GUI may be updated. (e.g. the misspelled word may
* be highlighted).
*/
- void misspelling (const QString & originalword, const QStringList & suggestions,
+ void misspelling (const TQString & originalword, const TQStringList & suggestions,
unsigned int pos);
/**
@@ -372,7 +372,7 @@ signals:
*
* @see check()
*/
- void corrected (const QString & originalword, const QString & newword, unsigned int pos);
+ void corrected (const TQString & originalword, const TQString & newword, unsigned int pos);
/**
* Emitted when the user pressed "Ignore All" in the dialog.
@@ -380,14 +380,14 @@ signals:
* user dictionary.
*
*/
- void ignoreall (const QString & originalword);
+ void ignoreall (const TQString & originalword);
/**
* Emitted when the user pressed "Ignore" in the dialog.
* Don't know if this could be useful.
*
*/
- void ignoreword (const QString & originalword);
+ void ignoreword (const TQString & originalword);
/**
* Emitted when the user pressed "Add" in the dialog.
@@ -395,12 +395,12 @@ signals:
* independent of the ISpell personal dictionary.
*
*/
- void addword (const QString & originalword);
+ void addword (const TQString & originalword);
/**
* Emitted when the user pressed "ReplaceAll" in the dialog.
*/
- void replaceall( const QString & origword , const QString &replacement );
+ void replaceall( const TQString & origword , const TQString &replacement );
/**
* Emitted after KSpell has verified that ISpell/ASpell is running
@@ -422,7 +422,7 @@ signals:
* on the contents of buffer for the life of the slot which was signaled
* by done().
*/
- void done (const QString &buffer);
+ void done (const TQString &buffer);
/**
* Emitted when checkList() is done.
@@ -475,12 +475,12 @@ private slots:
/**
* Used for modalCheck().
*/
- void slotModalDone( const QString & );
+ void slotModalDone( const TQString & );
/**
* Used for modalCheck().
*/
- void slotSpellCheckerCorrected( const QString & oldText, const QString & newText, unsigned int );
+ void slotSpellCheckerCorrected( const TQString & oldText, const TQString & newText, unsigned int );
/**
* Used for modalCheck().
@@ -493,15 +493,15 @@ signals:
protected:
KProcIO *proc;
- QWidget *parent;
+ TQWidget *parent;
KSpellConfig *ksconfig;
KSpellDlg *ksdlg;
- QStringList *wordlist;
- QStringList::Iterator wlIt;
- QStringList ignorelist;
- QStringList replacelist;
- QStringList sugg;
- QTextCodec* codec;
+ TQStringList *wordlist;
+ TQStringList::Iterator wlIt;
+ TQStringList ignorelist;
+ TQStringList replacelist;
+ TQStringList sugg;
+ TQTextCodec* codec;
spellStatus m_status;
@@ -514,14 +514,14 @@ protected:
bool dialogsetup;
bool autoDelete;
- QString caption;
- QString orig;
- QString origbuffer;
- QString newbuffer;
- QString cwword;
- QString dlgorigword;
- QString dlgreplacement;
- QString dialog3slot;
+ TQString caption;
+ TQString orig;
+ TQString origbuffer;
+ TQString newbuffer;
+ TQString cwword;
+ TQString dlgorigword;
+ TQString dlgreplacement;
+ TQString dialog3slot;
int dlgresult;
int trystart;
@@ -539,25 +539,25 @@ protected:
* Used for modalCheck.
*/
bool modaldlg;
- static QString modaltext;
+ static TQString modaltext;
static int modalreturn;
- static QWidget* modalWidgetHack;
+ static TQWidget* modalWidgetHack;
- int parseOneResponse (const QString &_buffer, QString &word, QStringList &sugg);
- QString funnyWord (const QString & word);
- void dialog (const QString & word, QStringList & sugg, const char* _slot);
- QString replacement () const
+ int parseOneResponse (const TQString &_buffer, TQString &word, TQStringList &sugg);
+ TQString funnyWord (const TQString & word);
+ void dialog (const TQString & word, TQStringList & sugg, const char* _slot);
+ TQString replacement () const
{ return dlgreplacement; }
void setUpDialog ( bool reallyusedialogbox = true);
void emitProgress ();
- bool cleanFputs (const QString & s, bool appendCR=true);
- bool cleanFputsWord (const QString & s, bool appendCR=true);
+ bool cleanFputs (const TQString & s, bool appendCR=true);
+ bool cleanFputsWord (const TQString & s, bool appendCR=true);
void startIspell();
bool writePersonalDictionary();
- void initialize( QWidget *_parent, const QString &_caption,
- QObject *obj, const char *slot, KSpellConfig *_ksc,
+ void initialize( TQWidget *_parent, const TQString &_caption,
+ TQObject *obj, const char *slot, KSpellConfig *_ksc,
bool _progressbar, bool _modal, SpellerType type );
private:
diff --git a/kdeui/kspelldlg.cpp b/kdeui/kspelldlg.cpp
index 60607dd75..d21b6975e 100644
--- a/kdeui/kspelldlg.cpp
+++ b/kdeui/kspelldlg.cpp
@@ -19,10 +19,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstringlist.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqstringlist.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <klocale.h>
@@ -48,7 +48,7 @@ public:
KSpellConfig* spellConfig;
};
-KSpellDlg::KSpellDlg( QWidget * parent, const char * name, bool _progressbar, bool _modal )
+KSpellDlg::KSpellDlg( TQWidget * parent, const char * name, bool _progressbar, bool _modal )
: KDialogBase(
parent, name, _modal, i18n("Check Spelling"), Help|Cancel|User1,
Cancel, true, i18n("&Finished")
@@ -60,44 +60,44 @@ KSpellDlg::KSpellDlg( QWidget * parent, const char * name, bool _progressbar, bo
d->ui = new KSpellUI( this );
setMainWidget( d->ui );
- connect( d->ui->m_replaceBtn, SIGNAL(clicked()),
- this, SLOT(replace()));
- connect( this, SIGNAL(ready(bool)),
- d->ui->m_replaceBtn, SLOT(setEnabled(bool)) );
+ connect( d->ui->m_replaceBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(replace()));
+ connect( this, TQT_SIGNAL(ready(bool)),
+ d->ui->m_replaceBtn, TQT_SLOT(setEnabled(bool)) );
- connect( d->ui->m_replaceAllBtn, SIGNAL(clicked()), this, SLOT(replaceAll()));
- connect(this, SIGNAL(ready(bool)), d->ui->m_replaceAllBtn, SLOT(setEnabled(bool)));
+ connect( d->ui->m_replaceAllBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(replaceAll()));
+ connect(this, TQT_SIGNAL(ready(bool)), d->ui->m_replaceAllBtn, TQT_SLOT(setEnabled(bool)));
- connect( d->ui->m_skipBtn, SIGNAL(clicked()), this, SLOT(ignore()));
- connect( this, SIGNAL(ready(bool)), d->ui->m_skipBtn, SLOT(setEnabled(bool)));
+ connect( d->ui->m_skipBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(ignore()));
+ connect( this, TQT_SIGNAL(ready(bool)), d->ui->m_skipBtn, TQT_SLOT(setEnabled(bool)));
- connect( d->ui->m_skipAllBtn, SIGNAL(clicked()), this, SLOT(ignoreAll()));
- connect( this, SIGNAL(ready(bool)), d->ui->m_skipAllBtn, SLOT(setEnabled(bool)));
+ connect( d->ui->m_skipAllBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(ignoreAll()));
+ connect( this, TQT_SIGNAL(ready(bool)), d->ui->m_skipAllBtn, TQT_SLOT(setEnabled(bool)));
- connect( d->ui->m_addBtn, SIGNAL(clicked()), this, SLOT(add()));
- connect( this, SIGNAL(ready(bool)), d->ui->m_addBtn, SLOT(setEnabled(bool)));
+ connect( d->ui->m_addBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(add()));
+ connect( this, TQT_SIGNAL(ready(bool)), d->ui->m_addBtn, TQT_SLOT(setEnabled(bool)));
- connect( d->ui->m_suggestBtn, SIGNAL(clicked()), this, SLOT(suggest()));
- connect( this, SIGNAL(ready(bool)), d->ui->m_suggestBtn, SLOT(setEnabled(bool)) );
+ connect( d->ui->m_suggestBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(suggest()));
+ connect( this, TQT_SIGNAL(ready(bool)), d->ui->m_suggestBtn, TQT_SLOT(setEnabled(bool)) );
d->ui->m_suggestBtn->hide();
- connect(this, SIGNAL(user1Clicked()), this, SLOT(stop()));
+ connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(stop()));
- connect( d->ui->m_replacement, SIGNAL(textChanged(const QString &)),
- SLOT(textChanged(const QString &)) );
+ connect( d->ui->m_replacement, TQT_SIGNAL(textChanged(const TQString &)),
+ TQT_SLOT(textChanged(const TQString &)) );
- connect( d->ui->m_replacement, SIGNAL(returnPressed()), SLOT(replace()) );
- connect( d->ui->m_suggestions, SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(slotSelectionChanged(QListViewItem*)) );
+ connect( d->ui->m_replacement, TQT_SIGNAL(returnPressed()), TQT_SLOT(replace()) );
+ connect( d->ui->m_suggestions, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(slotSelectionChanged(TQListViewItem*)) );
- connect( d->ui->m_suggestions, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int ) ),
- SLOT( replace() ) );
+ connect( d->ui->m_suggestions, TQT_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ),
+ TQT_SLOT( replace() ) );
d->spellConfig = new KSpellConfig( 0, 0 ,0, false );
d->spellConfig->fillDicts( d->ui->m_language );
- connect( d->ui->m_language, SIGNAL(activated(int)),
- d->spellConfig, SLOT(sSetDictionary(int)) );
- connect( d->spellConfig, SIGNAL(configChanged()),
- SLOT(slotConfigChanged()) );
+ connect( d->ui->m_language, TQT_SIGNAL(activated(int)),
+ d->spellConfig, TQT_SLOT(sSetDictionary(int)) );
+ connect( d->spellConfig, TQT_SIGNAL(configChanged()),
+ TQT_SLOT(slotConfigChanged()) );
setHelp( "spelldlg", "kspell" );
setMinimumSize( sizeHint() );
@@ -111,15 +111,15 @@ KSpellDlg::~KSpellDlg()
}
void
-KSpellDlg::init( const QString & _word, QStringList * _sugg )
+KSpellDlg::init( const TQString & _word, TQStringList * _sugg )
{
sugg = _sugg;
word = _word;
d->ui->m_suggestions->clear();
d->ui->m_suggestions->setSorting( NONSORTINGCOLUMN );
- for ( QStringList::Iterator it = _sugg->begin(); it != _sugg->end(); ++it ) {
- QListViewItem *item = new QListViewItem( d->ui->m_suggestions,
+ for ( TQStringList::Iterator it = _sugg->begin(); it != _sugg->end(); ++it ) {
+ TQListViewItem *item = new TQListViewItem( d->ui->m_suggestions,
d->ui->m_suggestions->lastItem() );
item->setText( 0, *it );
}
@@ -144,16 +144,16 @@ KSpellDlg::init( const QString & _word, QStringList * _sugg )
}
void
-KSpellDlg::init( const QString& _word, QStringList* _sugg,
- const QString& context )
+KSpellDlg::init( const TQString& _word, TQStringList* _sugg,
+ const TQString& context )
{
sugg = _sugg;
word = _word;
d->ui->m_suggestions->clear();
d->ui->m_suggestions->setSorting( NONSORTINGCOLUMN );
- for ( QStringList::Iterator it = _sugg->begin(); it != _sugg->end(); ++it ) {
- QListViewItem *item = new QListViewItem( d->ui->m_suggestions,
+ for ( TQStringList::Iterator it = _sugg->begin(); it != _sugg->end(); ++it ) {
+ TQListViewItem *item = new TQListViewItem( d->ui->m_suggestions,
d->ui->m_suggestions->lastItem() );
item->setText( 0, *it );
}
@@ -189,7 +189,7 @@ KSpellDlg::slotProgress( unsigned int p )
}
void
-KSpellDlg::textChanged( const QString & )
+KSpellDlg::textChanged( const TQString & )
{
d->ui->m_replaceBtn->setEnabled( true );
d->ui->m_replaceAllBtn->setEnabled( true );
@@ -197,7 +197,7 @@ KSpellDlg::textChanged( const QString & )
}
void
-KSpellDlg::slotSelectionChanged( QListViewItem* item )
+KSpellDlg::slotSelectionChanged( TQListViewItem* item )
{
if ( item )
d->ui->m_replacement->setText( item->text( 0 ) );
@@ -208,7 +208,7 @@ KSpellDlg::slotSelectionChanged( QListViewItem* item )
*/
void
-KSpellDlg::closeEvent( QCloseEvent * )
+KSpellDlg::closeEvent( TQCloseEvent * )
{
cancel();
}
diff --git a/kdeui/kspelldlg.h b/kdeui/kspelldlg.h
index 532471cf3..7d4be785b 100644
--- a/kdeui/kspelldlg.h
+++ b/kdeui/kspelldlg.h
@@ -52,18 +52,18 @@ class KDEUI_EXPORT KSpellDlg : public KDialogBase
KLineEdit *editbox;
KProgress *progbar;
KListBox *listbox;
- QStringList *sugg;
- QPushButton *qpbrep, *qpbrepa;
- QLabel *wordlabel;
- QString word, newword;
+ TQStringList *sugg;
+ TQPushButton *qpbrep, *qpbrepa;
+ TQLabel *wordlabel;
+ TQString word, newword;
bool progressbar;
public:
- KSpellDlg( QWidget *parent, const char *name,
+ KSpellDlg( TQWidget *parent, const char *name,
bool _progressbar = false, bool _modal = false );
~KSpellDlg();
- QString replacement() const
+ TQString replacement() const
{ return newword; }
/**
@@ -71,9 +71,9 @@ public:
* and enable the disabled buttons on the dialog box.
* (Buttons are disabled by standby().)
**/
- void init( const QString& _word, QStringList* _sugg );
- void init( const QString& _word, QStringList* _sugg,
- const QString& context );
+ void init( const TQString& _word, TQStringList* _sugg );
+ void init( const TQString& _word, TQStringList* _sugg,
+ const TQString& context );
void standby() { emit ready( false ); }
@@ -84,7 +84,7 @@ public:
void slotProgress( unsigned int p );
protected:
- virtual void closeEvent( QCloseEvent * e );
+ virtual void closeEvent( TQCloseEvent * e );
void done( int i );
signals:
@@ -106,9 +106,9 @@ protected slots:
void stop();
void slotConfigChanged();
- void textChanged( const QString & );
+ void textChanged( const TQString & );
- void slotSelectionChanged( QListViewItem* item );
+ void slotSelectionChanged( TQListViewItem* item );
};
#endif
diff --git a/kdeui/ksplashscreen.cpp b/kdeui/ksplashscreen.cpp
index 219af2595..6d605dcd7 100644
--- a/kdeui/ksplashscreen.cpp
+++ b/kdeui/ksplashscreen.cpp
@@ -21,13 +21,13 @@
#include <kglobal.h>
#include <kglobalsettings.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include "ksplashscreen.h"
-KSplashScreen::KSplashScreen(const QPixmap &pixmap, WFlags f): QSplashScreen(pixmap, f)
+KSplashScreen::KSplashScreen(const TQPixmap &pixmap, WFlags f): TQSplashScreen(pixmap, f)
{
- QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect desk = KGlobalSettings::splashScreenDesktopGeometry();
resize(pixmap.width(), pixmap.height());
setGeometry( ( desk.width() / 2 ) - ( width() / 2 ) + desk.left(),
( desk.height() / 2 ) - ( height() / 2 ) + desk.top(),
diff --git a/kdeui/ksplashscreen.h b/kdeui/ksplashscreen.h
index d88ad478c..bf822a232 100644
--- a/kdeui/ksplashscreen.h
+++ b/kdeui/ksplashscreen.h
@@ -20,7 +20,7 @@
#ifndef KSPLASHSCREEN_H
#define KSPLASHSCREEN_H
-#include <qsplashscreen.h>
+#include <tqsplashscreen.h>
#include <kdelibs_export.h>
@@ -29,11 +29,11 @@ class QPixmap;
/**
* @short %KDE splash screen
*
- * This class is based on QSplashScreen and exists solely to make
+ * This class is based on TQSplashScreen and exists solely to make
* splash screens obey KDE's Xinerama settings.
*
* For documentation on how to use the class, see the documentation
- * for QSplashScreen.
+ * for TQSplashScreen.
*
* @author Chris Howells (howells@kde.org)
* @since 3.2
@@ -47,7 +47,7 @@ public:
/**
* Constructs a splash screen.
*/
- KSplashScreen(const QPixmap &pixmap, WFlags f = 0);
+ KSplashScreen(const TQPixmap &pixmap, WFlags f = 0);
/**
* Destructor.
diff --git a/kdeui/ksqueezedtextlabel.cpp b/kdeui/ksqueezedtextlabel.cpp
index 2f12d26ba..f44b38916 100644
--- a/kdeui/ksqueezedtextlabel.cpp
+++ b/kdeui/ksqueezedtextlabel.cpp
@@ -18,57 +18,57 @@
#include "ksqueezedtextlabel.h"
#include "kstringhandler.h"
-#include <qtooltip.h>
+#include <tqtooltip.h>
-KSqueezedTextLabel::KSqueezedTextLabel( const QString &text , QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
- setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+KSqueezedTextLabel::KSqueezedTextLabel( const TQString &text , TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
+ setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
fullText = text;
squeezeTextToLabel();
}
-KSqueezedTextLabel::KSqueezedTextLabel( QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
- setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+KSqueezedTextLabel::KSqueezedTextLabel( TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
+ setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
}
-void KSqueezedTextLabel::resizeEvent( QResizeEvent * ) {
+void KSqueezedTextLabel::resizeEvent( TQResizeEvent * ) {
squeezeTextToLabel();
}
-QSize KSqueezedTextLabel::minimumSizeHint() const
+TQSize KSqueezedTextLabel::minimumSizeHint() const
{
- QSize sh = QLabel::minimumSizeHint();
+ TQSize sh = TQLabel::minimumSizeHint();
sh.setWidth(-1);
return sh;
}
-QSize KSqueezedTextLabel::sizeHint() const
+TQSize KSqueezedTextLabel::sizeHint() const
{
- return QSize(contentsRect().width(), QLabel::sizeHint().height());
+ return TQSize(contentsRect().width(), TQLabel::sizeHint().height());
}
-void KSqueezedTextLabel::setText( const QString &text ) {
+void KSqueezedTextLabel::setText( const TQString &text ) {
fullText = text;
squeezeTextToLabel();
}
void KSqueezedTextLabel::squeezeTextToLabel() {
- QFontMetrics fm(fontMetrics());
+ TQFontMetrics fm(fontMetrics());
int labelWidth = size().width();
int textWidth = fm.width(fullText);
if (textWidth > labelWidth) {
- QString squeezedText = KStringHandler::cPixelSqueeze(fullText, fm, labelWidth);
- QLabel::setText(squeezedText);
+ TQString squeezedText = KStringHandler::cPixelSqueeze(fullText, fm, labelWidth);
+ TQLabel::setText(squeezedText);
- QToolTip::remove( this );
- QToolTip::add( this, fullText );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, fullText );
} else {
- QLabel::setText(fullText);
+ TQLabel::setText(fullText);
- QToolTip::remove( this );
- QToolTip::hide();
+ TQToolTip::remove( this );
+ TQToolTip::hide();
}
}
@@ -76,8 +76,8 @@ void KSqueezedTextLabel::squeezeTextToLabel() {
void KSqueezedTextLabel::setAlignment( int alignment )
{
// save fullText and restore it
- QString tmpFull(fullText);
- QLabel::setAlignment(alignment);
+ TQString tmpFull(fullText);
+ TQLabel::setAlignment(alignment);
fullText = tmpFull;
}
diff --git a/kdeui/ksqueezedtextlabel.h b/kdeui/ksqueezedtextlabel.h
index 5410d56c1..9ad81d9dd 100644
--- a/kdeui/ksqueezedtextlabel.h
+++ b/kdeui/ksqueezedtextlabel.h
@@ -19,12 +19,12 @@
#ifndef KSQUEEZEDTEXTLABEL_H
#define KSQUEEZEDTEXTLABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdelibs_export.h>
/**
- * @short A replacement for QLabel that squeezes its text
+ * @short A replacement for TQLabel that squeezes its text
*
* A label class that squeezes its text into the label
*
@@ -43,36 +43,36 @@
/*
* QLabel
*/
-class KDEUI_EXPORT KSqueezedTextLabel : public QLabel {
+class KDEUI_EXPORT KSqueezedTextLabel : public TQLabel {
Q_OBJECT
public:
/**
* Default constructor.
*/
- KSqueezedTextLabel( QWidget *parent, const char *name = 0 );
- KSqueezedTextLabel( const QString &text, QWidget *parent, const char *name = 0 );
+ KSqueezedTextLabel( TQWidget *parent, const char *name = 0 );
+ KSqueezedTextLabel( const TQString &text, TQWidget *parent, const char *name = 0 );
- virtual QSize minimumSizeHint() const;
- virtual QSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* Overridden for internal reasons; the API remains unaffected.
*/
virtual void setAlignment( int );
public slots:
- void setText( const QString & );
+ void setText( const TQString & );
protected:
/**
* used when widget is resized
*/
- void resizeEvent( QResizeEvent * );
+ void resizeEvent( TQResizeEvent * );
/**
* does the dirty work
*/
void squeezeTextToLabel();
- QString fullText;
+ TQString fullText;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kstatusbar.cpp b/kdeui/kstatusbar.cpp
index 8a2a964b5..b70c8ae9c 100644
--- a/kdeui/kstatusbar.cpp
+++ b/kdeui/kstatusbar.cpp
@@ -24,9 +24,9 @@
#include <kglobal.h>
-KStatusBarLabel::KStatusBarLabel( const QString& text, int _id,
+KStatusBarLabel::KStatusBarLabel( const TQString& text, int _id,
KStatusBar *parent, const char *name) :
- QLabel( parent, name)
+ TQLabel( parent, name)
{
id = _id;
@@ -34,39 +34,39 @@ KStatusBarLabel::KStatusBarLabel( const QString& text, int _id,
// umm... Mosfet? Can you help here?
- // Warning: QStatusBar draws shaded rectangle around every item - which
+ // Warning: TQStatusBar draws shaded rectangle around every item - which
// IMHO is stupid.
// So NoFrame|Plain is the best you get. the problem is that only in case of
- // StyledPanel|Something you get QFrame to call QStyle::drawPanel().
+ // StyledPanel|Something you get TQFrame to call TQStyle::drawPanel().
setLineWidth (0);
- setFrameStyle (QFrame::NoFrame);
+ setFrameStyle (TQFrame::NoFrame);
setAlignment( AlignHCenter | AlignVCenter | SingleLine );
- connect (this, SIGNAL(itemPressed(int)), parent, SIGNAL(pressed(int)));
- connect (this, SIGNAL(itemReleased(int)), parent, SIGNAL(released(int)));
+ connect (this, TQT_SIGNAL(itemPressed(int)), parent, TQT_SIGNAL(pressed(int)));
+ connect (this, TQT_SIGNAL(itemReleased(int)), parent, TQT_SIGNAL(released(int)));
}
-void KStatusBarLabel::mousePressEvent (QMouseEvent *)
+void KStatusBarLabel::mousePressEvent (TQMouseEvent *)
{
emit itemPressed (id);
}
-void KStatusBarLabel::mouseReleaseEvent (QMouseEvent *)
+void KStatusBarLabel::mouseReleaseEvent (TQMouseEvent *)
{
emit itemReleased (id);
}
-KStatusBar::KStatusBar( QWidget *parent, const char *name )
- : QStatusBar( parent, name )
+KStatusBar::KStatusBar( TQWidget *parent, const char *name )
+ : TQStatusBar( parent, name )
{
// make the size grip stuff configurable
// ...but off by default (sven)
KConfig *config = KGlobal::config();
- QString group(config->group());
- config->setGroup(QString::fromLatin1("StatusBar style"));
- bool grip_enabled = config->readBoolEntry(QString::fromLatin1("SizeGripEnabled"), false);
+ TQString group(config->group());
+ config->setGroup(TQString::fromLatin1("StatusBar style"));
+ bool grip_enabled = config->readBoolEntry(TQString::fromLatin1("SizeGripEnabled"), false);
setSizeGripEnabled(grip_enabled);
config->setGroup(group);
}
@@ -75,7 +75,7 @@ KStatusBar::~KStatusBar ()
{
}
-void KStatusBar::insertItem( const QString& text, int id, int stretch, bool permanent)
+void KStatusBar::insertItem( const TQString& text, int id, int stretch, bool permanent)
{
if (items[id])
kdDebug() << "KStatusBar::insertItem: item id " << id << " already exists." << endl;
@@ -109,7 +109,7 @@ bool KStatusBar::hasItem( int id ) const
return false;
}
-void KStatusBar::changeItem( const QString& text, int id )
+void KStatusBar::changeItem( const TQString& text, int id )
{
KStatusBarLabel *l = items[id];
if (l)
diff --git a/kdeui/kstatusbar.h b/kdeui/kstatusbar.h
index 9ba05dc5b..97ec7881d 100644
--- a/kdeui/kstatusbar.h
+++ b/kdeui/kstatusbar.h
@@ -21,9 +21,9 @@
#ifndef __KSTATUSBAR_H__
#define __KSTATUSBAR_H__
-#include <qstatusbar.h>
-#include <qintdict.h>
-#include <qlabel.h>
+#include <tqstatusbar.h>
+#include <tqintdict.h>
+#include <tqlabel.h>
#include <kdelibs_export.h>
class KStatusBar;
@@ -39,13 +39,13 @@ class KDEUI_EXPORT KStatusBarLabel : public QLabel
public:
- KStatusBarLabel( const QString& text, int _id, KStatusBar* parent = 0L, const char *name=0L );
+ KStatusBarLabel( const TQString& text, int _id, KStatusBar* parent = 0L, const char *name=0L );
~KStatusBarLabel () {}
protected:
- void mousePressEvent (QMouseEvent* _event);
- void mouseReleaseEvent (QMouseEvent* _event);
+ void mousePressEvent (TQMouseEvent* _event);
+ void mouseReleaseEvent (TQMouseEvent* _event);
private:
@@ -68,13 +68,13 @@ signals:
*
* 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 QStatusBar::clear(). See
- * QStatusBar::message for details.
+ * 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
- * QStatusBar::message slots.
+ * TQStatusBar::message slots.
*
- * KStatusBar inherits QStatusBar, you can freely use all QStatusBar
+ * KStatusBar inherits TQStatusBar, you can freely use all QStatusBar
* methods.
*
* Empty text items are not visible. They will become visible when you change
@@ -99,7 +99,7 @@ public:
/**
* Constructs a status bar. @p parent is usually KMainWindow.
*/
- KStatusBar( QWidget* parent = 0L, const char* name = 0L );
+ KStatusBar( TQWidget* parent = 0L, const char* name = 0L );
/**
* Destructor.
@@ -111,20 +111,20 @@ public:
/**
* Inserts a text label into the status bar.
* Parameters @p stretch and @p permanent are passed to
- * QStatusBar::addWidget .
+ * TQStatusBar::addWidget .
*
* If @p permanent is true, then item will be placed on the far right of
- * the statusbar and will never be hidden by QStatusBar::message.
+ * the statusbar and will never be hidden by TQStatusBar::message.
*
* @param text The label's text string.
* @param id id of item
- * @param stretch stretch passed to QStatusBar::addWidget
- * @param permanent is item permanent or not (passed to QStatusBar::addWidget )
+ * @param stretch stretch passed to TQStatusBar::addWidget
+ * @param permanent is item permanent or not (passed to TQStatusBar::addWidget )
*
* @see QStatusbar::addWidget
*
*/
- void insertItem(const QString& text, int id, int stretch=0, bool permanent=false );
+ void insertItem(const TQString& text, int id, int stretch=0, bool permanent=false );
/**
* Inserts a fixed width text label into status bar. The width will be set
@@ -133,9 +133,9 @@ public:
*
* @param text The label's text string
* @param id id of item
- * @param permanent permanent flag passed to QStatusBar::addWidget
+ * @param permanent permanent flag passed to TQStatusBar::addWidget
*/
- inline void insertFixedItem(const QString& text, int id, bool permanent=false)
+ inline void insertFixedItem(const TQString& text, int id, bool permanent=false)
{ insertItem(text, id, 0, permanent); setItemFixed(id); }
/**
@@ -164,11 +164,11 @@ public:
* @param text The label's text string
* @param id The id of item.
*/
- void changeItem( const QString& text, int id );
+ void changeItem( const TQString& text, int id );
/**
* Sets the alignment of item @p id. By default all fields are aligned
- * @p AlignHCenter | @p AlignVCenter. See QLabel::setAlignment for details.
+ * @p AlignHCenter | @p AlignVCenter. See TQLabel::setAlignment for details.
*
*/
void setItemAlignment(int id, int align);
@@ -200,7 +200,7 @@ signals:
void released( int );
private:
- QIntDict<KStatusBarLabel> items;
+ TQIntDict<KStatusBarLabel> items;
class KStatusBarPrivate* d;
};
diff --git a/kdeui/kstdaction.cpp b/kdeui/kstdaction.cpp
index ae22c01c3..3dae8f281 100644
--- a/kdeui/kstdaction.cpp
+++ b/kdeui/kstdaction.cpp
@@ -18,8 +18,8 @@
#include "kstdaction.h"
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
#include <kaboutdata.h>
#include <kaction.h>
@@ -35,26 +35,26 @@
namespace KStdAction
{
-QStringList stdNames()
+TQStringList stdNames()
{
return internal_stdNames();
}
-KAction* create( StdAction id, const char *name, const QObject *recvr, const char *slot, KActionCollection* parent )
+KAction* create( StdAction id, const char *name, const TQObject *recvr, const char *slot, KActionCollection* parent )
{
KAction* pAction = 0;
const KStdActionInfo* pInfo = infoPtr( id );
kdDebug(125) << "KStdAction::create( " << id << "=" << (pInfo ? pInfo->psName : (const char*)0) << ", " << parent << ", " << name << " )" << endl; // ellis
if( pInfo ) {
- QString sLabel, iconName = pInfo->psIconName;
+ TQString sLabel, iconName = pInfo->psIconName;
switch( id ) {
case Back: sLabel = i18n("go back", "&Back");
- if (QApplication::reverseLayout() )
+ if (TQApplication::reverseLayout() )
iconName = "forward";
break;
case Forward: sLabel = i18n("go forward", "&Forward");
- if (QApplication::reverseLayout() )
+ if (TQApplication::reverseLayout() )
iconName = "back";
break;
@@ -72,14 +72,14 @@ KAction* create( StdAction id, const char *name, const QObject *recvr, const cha
else
aboutData = KGlobal::instance()->aboutData();
*/
- QString appName = (aboutData) ? aboutData->programName() : QString::fromLatin1(qApp->name());
+ TQString appName = (aboutData) ? aboutData->programName() : TQString::fromLatin1(qApp->name());
sLabel = i18n(pInfo->psLabel).arg(appName);
}
break;
default: sLabel = i18n(pInfo->psLabel);
}
- if (QApplication::reverseLayout()){
+ if (TQApplication::reverseLayout()){
if (id == Prior) iconName = "forward";
if (id == Next ) iconName = "back";
if (id == FirstPage) iconName = "finish";
@@ -139,107 +139,107 @@ const char* name( StdAction id )
return (pInfo) ? pInfo->psName : 0;
}
-KAction *openNew( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *openNew( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( New, name, recvr, slot, parent ); }
-KAction *open( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *open( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Open, name, recvr, slot, parent ); }
-KRecentFilesAction *openRecent( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+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 QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *save( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Save, name, recvr, slot, parent ); }
-KAction *saveAs( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *saveAs( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( SaveAs, name, recvr, slot, parent ); }
-KAction *revert( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *revert( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Revert, name, recvr, slot, parent ); }
-KAction *print( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *print( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Print, name, recvr, slot, parent ); }
-KAction *printPreview( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *printPreview( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( PrintPreview, name, recvr, slot, parent ); }
-KAction *close( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *close( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Close, name, recvr, slot, parent ); }
-KAction *mail( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *mail( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Mail, name, recvr, slot, parent ); }
-KAction *quit( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *quit( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Quit, name, recvr, slot, parent ); }
-KAction *undo( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *undo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Undo, name, recvr, slot, parent ); }
-KAction *redo( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *redo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Redo, name, recvr, slot, parent ); }
-KAction *cut( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *cut( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Cut, name, recvr, slot, parent ); }
-KAction *copy( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *copy( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Copy, name, recvr, slot, parent ); }
-KAction *paste( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *paste( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Paste, name, recvr, slot, parent ); }
-KAction *pasteText( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *pasteText( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( PasteText, name, recvr, slot, parent ); }
-KAction *clear( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *clear( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Clear, name, recvr, slot, parent ); }
-KAction *selectAll( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *selectAll( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( SelectAll, name, recvr, slot, parent ); }
-KAction *deselect( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *deselect( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Deselect, name, recvr, slot, parent ); }
-KAction *find( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *find( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Find, name, recvr, slot, parent ); }
-KAction *findNext( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *findNext( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( FindNext, name, recvr, slot, parent ); }
-KAction *findPrev( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *findPrev( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( FindPrev, name, recvr, slot, parent ); }
-KAction *replace( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *replace( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Replace, name, recvr, slot, parent ); }
-KAction *actualSize( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *actualSize( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( ActualSize, name, recvr, slot, parent ); }
-KAction *fitToPage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *fitToPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( FitToPage, name, recvr, slot, parent ); }
-KAction *fitToWidth( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *fitToWidth( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( FitToWidth, name, recvr, slot, parent ); }
-KAction *fitToHeight( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *fitToHeight( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( FitToHeight, name, recvr, slot, parent ); }
-KAction *zoomIn( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *zoomIn( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( ZoomIn, name, recvr, slot, parent ); }
-KAction *zoomOut( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *zoomOut( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( ZoomOut, name, recvr, slot, parent ); }
-KAction *zoom( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *zoom( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Zoom, name, recvr, slot, parent ); }
-KAction *redisplay( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *redisplay( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Redisplay, name, recvr, slot, parent ); }
-KAction *up( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *up( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Up, name, recvr, slot, parent ); }
-KAction *back( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *back( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Back, name, recvr, slot, parent ); }
-KAction *forward( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *forward( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Forward, name, recvr, slot, parent ); }
-KAction *home( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *home( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Home, name, recvr, slot, parent ); }
-KAction *prior( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *prior( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Prior, name, recvr, slot, parent ); }
-KAction *next( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *next( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Next, name, recvr, slot, parent ); }
-KAction *goTo( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *goTo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Goto, name, recvr, slot, parent ); }
-KAction *gotoPage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *gotoPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( GotoPage, name, recvr, slot, parent ); }
-KAction *gotoLine( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *gotoLine( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( GotoLine, name, recvr, slot, parent ); }
-KAction *firstPage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *firstPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( FirstPage, name, recvr, slot, parent ); }
-KAction *lastPage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *lastPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( LastPage, name, recvr, slot, parent ); }
-KAction *addBookmark( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *addBookmark( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( AddBookmark, name, recvr, slot, parent ); }
-KAction *editBookmarks( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *editBookmarks( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( EditBookmarks, name, recvr, slot, parent ); }
-KAction *spelling( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *spelling( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Spelling, name, recvr, slot, parent ); }
-KToggleAction *showMenubar( const QObject *recvr, const char *slot, KActionCollection* parent, const char *_name )
+KToggleAction *showMenubar( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *_name )
{
KToggleAction *ret;
ret = new KToggleAction(i18n("Show &Menubar"), "showmenu", KStdAccel::shortcut(KStdAccel::ShowMenubar), recvr, slot,
parent, _name ? _name : name(ShowMenubar));
ret->setWhatsThis( i18n( "Show Menubar<p>"
"Shows the menubar again after it has been hidden" ) );
- KGuiItem guiItem( i18n("Hide &Menubar"), 0 /*same icon*/, QString::null,
+ KGuiItem guiItem( i18n("Hide &Menubar"), 0 /*same icon*/, TQString::null,
i18n( "Hide Menubar<p>"
"Hide the menubar. You can usually get it back using the right mouse button inside the window itself." ) );
ret->setCheckedState( guiItem );
@@ -248,7 +248,7 @@ KToggleAction *showMenubar( const QObject *recvr, const char *slot, KActionColle
}
// obsolete
-KToggleAction *showToolbar( const QObject *recvr, const char *slot, KActionCollection* parent, const char *_name )
+KToggleAction *showToolbar( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *_name )
{
KToggleAction *ret;
ret = new KToggleAction(i18n("Show &Toolbar"), 0, recvr, slot, parent,
@@ -267,7 +267,7 @@ KToggleToolBarAction *showToolbar( const char* toolBarName, KActionCollection* p
return ret;
}
-KToggleAction *showStatusbar( const QObject *recvr, const char *slot,
+KToggleAction *showStatusbar( const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *_name )
{
KToggleAction *ret;
@@ -275,7 +275,7 @@ KToggleAction *showStatusbar( const QObject *recvr, const char *slot,
_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." ) );
- KGuiItem guiItem( i18n("Hide St&atusbar"), QString::null, QString::null,
+ KGuiItem guiItem( i18n("Hide St&atusbar"), TQString::null, TQString::null,
i18n( "Hide Statusbar<p>"
"Hides the statusbar, which is the bar at the bottom of the window used for status information." ) );
ret->setCheckedState( guiItem );
@@ -284,8 +284,8 @@ KToggleAction *showStatusbar( const QObject *recvr, const char *slot,
return ret;
}
-KToggleFullScreenAction *fullScreen( const QObject *recvr, const char *slot, KActionCollection* parent,
- QWidget* window, const char *name )
+KToggleFullScreenAction *fullScreen( const TQObject *recvr, const char *slot, KActionCollection* parent,
+ TQWidget* window, const char *name )
{
KToggleFullScreenAction *ret;
ret = static_cast< KToggleFullScreenAction* >( KStdAction::create( FullScreen, name, recvr, slot, parent ));
@@ -293,31 +293,31 @@ KToggleFullScreenAction *fullScreen( const QObject *recvr, const char *slot, KAc
return ret;
}
-KAction *saveOptions( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *saveOptions( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( SaveOptions, name, recvr, slot, parent ); }
-KAction *keyBindings( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *keyBindings( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( KeyBindings, name, recvr, slot, parent ); }
-KAction *preferences( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *preferences( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Preferences, name, recvr, slot, parent ); }
-KAction *configureToolbars( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *configureToolbars( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( ConfigureToolbars, name, recvr, slot, parent ); }
-KAction *configureNotifications( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *configureNotifications( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( ConfigureNotifications, name, recvr, slot, parent ); }
-KAction *help( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *help( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( Help, name, recvr, slot, parent ); }
-KAction *helpContents( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *helpContents( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( HelpContents, name, recvr, slot, parent ); }
-KAction *whatsThis( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *whatsThis( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( WhatsThis, name, recvr, slot, parent ); }
-KAction *tipOfDay( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *tipOfDay( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( TipofDay, name, recvr, slot, parent ); }
-KAction *reportBug( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *reportBug( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( ReportBug, name, recvr, slot, parent ); }
-KAction *switchApplicationLanguage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *switchApplicationLanguage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( SwitchApplicationLanguage, name, recvr, slot, parent ); }
-KAction *aboutApp( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *aboutApp( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( AboutApp, name, recvr, slot, parent ); }
-KAction *aboutKDE( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name )
+KAction *aboutKDE( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name )
{ return KStdAction::create( AboutKDE, name, recvr, slot, parent ); }
}
diff --git a/kdeui/kstdaction.h b/kdeui/kstdaction.h
index d45f76b99..eb19404eb 100644
--- a/kdeui/kstdaction.h
+++ b/kdeui/kstdaction.h
@@ -28,7 +28,7 @@ class KToggleAction;
class KToggleToolBarAction;
class KToggleFullScreenAction;
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -50,15 +50,15 @@ class KToggleFullScreenAction;
* for regular actions. For example, if you previously had:
*
* \code
- * KAction *newAct = new KAction(i18n("&New"), QIconSet(BarIcon("filenew")),
+ * KAction *newAct = new KAction(i18n("&New"), TQIconSet(BarIcon("filenew")),
* KStdAccel::shortcut(KStdAccel::New), this,
- * SLOT(fileNew()), actionCollection());
+ * TQT_SLOT(fileNew()), actionCollection());
* \endcode
*
* You could drop that and replace it with:
*
* \code
- * KAction *newAct = KStdAction::openNew(this, SLOT(fileNew()),
+ * KAction *newAct = KStdAction::openNew(this, TQT_SLOT(fileNew()),
* actionCollection());
* \endcode
*
@@ -84,7 +84,7 @@ class KToggleFullScreenAction;
* do something like:
*
* \code
- * (void)KStdAction::cut(this, SLOT(editCut()), actionCollection(), "my_cut");
+ * (void)KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection(), "my_cut");
* \endcode
*
* Now, in your local XML resource file (e.g., yourappui.rc), simply
@@ -108,8 +108,8 @@ class KToggleFullScreenAction;
* here's how:
*
* \code
- * (void)KStdAction::action(KStdAction::New, this, SLOT(fileNew()), actionCollection());
- * (void)KStdAction::action(KStdAction::Cut, this, SLOT(editCut()), actionCollection());
+ * (void)KStdAction::action(KStdAction::New, this, TQT_SLOT(fileNew()), actionCollection());
+ * (void)KStdAction::action(KStdAction::Cut, this, TQT_SLOT(editCut()), actionCollection());
* \endcode
*
* @author Kurt Granroth <granroth@kde.org>
@@ -166,11 +166,11 @@ namespace KStdAction
* KStdAction::StdAction enum.
*/
KDEUI_EXPORT KAction* create( StdAction id, const char *name,
- const QObject *recvr, const char *slot,
+ const TQObject *recvr, const char *slot,
KActionCollection* parent );
inline KAction* create( StdAction id,
- const QObject *recvr, const char *slot,
+ const TQObject *recvr, const char *slot,
KActionCollection* parent )
{ return KStdAction::create( id, 0, recvr, slot, parent ); }
@@ -179,7 +179,7 @@ namespace KStdAction
* KStdAction::StdAction enum.
*/
inline KAction *action(StdAction act_enum,
- const QObject *recvr, const char *slot,
+ const TQObject *recvr, const char *slot,
KActionCollection *parent, const char *name = 0L )
{ return KStdAction::create( act_enum, name, recvr, slot, parent ); }
@@ -196,107 +196,107 @@ namespace KStdAction
* to give those heigher weight.
* @since 3.1
*/
- KDEUI_EXPORT QStringList stdNames();
+ KDEUI_EXPORT TQStringList stdNames();
/**
* Create a new document or window.
*/
- KDEUI_EXPORT KAction *openNew(const QObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
+ KDEUI_EXPORT KAction *openNew(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
/**
* Open an existing file.
*/
- KDEUI_EXPORT KAction *open(const QObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
+ KDEUI_EXPORT KAction *open(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
/**
* Open a recently used document. The signature of the slot being called
* is of the form slotURLSelected( const KURL & ).
* @param recvr object to receive slot
- * @param slot The SLOT to invoke when a URL is selected. The slot's
+ * @param slot The TQT_SLOT to invoke when a URL is selected. The slot's
* signature is slotURLSelected( const KURL & ).
* @param parent parent widget
* @param name name of widget
*/
- KDEUI_EXPORT KRecentFilesAction *openRecent(const QObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
+ KDEUI_EXPORT KRecentFilesAction *openRecent(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
/**
* Save the current document.
*/
- KDEUI_EXPORT KAction *save(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *save(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Save the current document under a different name.
*/
- KDEUI_EXPORT KAction *saveAs(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *saveAs(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Revert the current document to the last saved version
* (essentially will undo all changes).
*/
- KDEUI_EXPORT KAction *revert(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *revert(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Close the current document.
*/
- KDEUI_EXPORT KAction *close(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *close(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Print the current document.
*/
- KDEUI_EXPORT KAction *print(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *print(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Show a print preview of the current document.
*/
- KDEUI_EXPORT KAction *printPreview(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *printPreview(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Mail this document.
*/
- KDEUI_EXPORT KAction *mail(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *mail(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Quit the program.
*/
- KDEUI_EXPORT KAction *quit(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *quit(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Undo the last operation.
*/
- KDEUI_EXPORT KAction *undo(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *undo(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Redo the last operation.
*/
- KDEUI_EXPORT KAction *redo(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *redo(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Cut selected area and store it in the clipboard.
*/
- KDEUI_EXPORT KAction *cut(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *cut(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Copy the selected area into the clipboard.
*/
- KDEUI_EXPORT KAction *copy(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *copy(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Paste the contents of clipboard at the current mouse or cursor
* position.
*/
- KDEUI_EXPORT KAction *paste(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *paste(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
@@ -305,190 +305,190 @@ namespace KStdAction
* menu if Klipper is running.
* @since 3.2
*/
- KDEUI_EXPORT KAction *pasteText(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *pasteText(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Clear the content of the focus widget
* @since 3.2
*/
- KDEUI_EXPORT KAction *clear(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *clear(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Select all elements in the current document.
*/
- KDEUI_EXPORT KAction *selectAll(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *selectAll(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Deselect any selected elements in the current document.
*/
- KDEUI_EXPORT KAction *deselect(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *deselect(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Initiate a 'find' request in the current document.
*/
- KDEUI_EXPORT KAction *find(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *find(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Find the next instance of a stored 'find'.
*/
- KDEUI_EXPORT KAction *findNext(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *findNext(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Find a previous instance of a stored 'find'.
*/
- KDEUI_EXPORT KAction *findPrev(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *findPrev(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Find and replace matches.
*/
- KDEUI_EXPORT KAction *replace(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *replace(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* View the document at its actual size.
*/
- KDEUI_EXPORT KAction *actualSize(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *actualSize(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Fit the document view to the size of the current window.
*/
- KDEUI_EXPORT KAction *fitToPage(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *fitToPage(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Fit the document view to the width of the current window.
*/
- KDEUI_EXPORT KAction *fitToWidth(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *fitToWidth(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Fit the document view to the height of the current window.
*/
- KDEUI_EXPORT KAction *fitToHeight(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *fitToHeight(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Zoom in.
*/
- KDEUI_EXPORT KAction *zoomIn(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *zoomIn(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Zoom out.
*/
- KDEUI_EXPORT KAction *zoomOut(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *zoomOut(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Popup a zoom dialog.
*/
- KDEUI_EXPORT KAction *zoom(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *zoom(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Redisplay or redraw the document.
*/
- KDEUI_EXPORT KAction *redisplay(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *redisplay(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Move up (web style menu).
*/
- KDEUI_EXPORT KAction *up(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *up(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Move back (web style menu).
*/
- KDEUI_EXPORT KAction *back(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *back(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Move forward (web style menu).
*/
- KDEUI_EXPORT KAction *forward(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *forward(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Go to the "Home" position or document.
*/
- KDEUI_EXPORT KAction *home(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *home(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Scroll up one page.
*/
- KDEUI_EXPORT KAction *prior(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *prior(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Scroll down one page.
*/
- KDEUI_EXPORT KAction *next(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *next(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Go to somewhere in general.
*/
- KDEUI_EXPORT KAction *goTo(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *goTo(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Go to a specific page (dialog).
*/
- KDEUI_EXPORT KAction *gotoPage(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *gotoPage(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Go to a specific line (dialog).
*/
- KDEUI_EXPORT KAction *gotoLine(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *gotoLine(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Jump to the first page.
*/
- KDEUI_EXPORT KAction *firstPage(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *firstPage(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Jump to the last page.
*/
- KDEUI_EXPORT KAction *lastPage(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *lastPage(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Add the current page to the bookmarks tree.
*/
- KDEUI_EXPORT KAction *addBookmark(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *addBookmark(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Edit the application bookmarks.
*/
- KDEUI_EXPORT KAction *editBookmarks(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *editBookmarks(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Pop up the spell checker.
*/
- KDEUI_EXPORT KAction *spelling(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *spelling(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Show/Hide the menubar.
*/
- KDEUI_EXPORT KToggleAction *showMenubar(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KToggleAction *showMenubar(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
@@ -498,7 +498,7 @@ namespace KStdAction
* Show/Hide the primary toolbar.
* @since 3.1
*/
- KDEUI_EXPORT KToggleAction *showToolbar(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KToggleAction *showToolbar(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED;
/**
* @obsolete. toolbar actions are created automatically now in the
@@ -512,41 +512,41 @@ namespace KStdAction
/**
* Show/Hide the statusbar.
*/
- KDEUI_EXPORT KToggleAction *showStatusbar(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KToggleAction *showStatusbar(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Switch to/from full screen mode
* @since 3.2
*/
- KDEUI_EXPORT KToggleFullScreenAction *fullScreen(const QObject *recvr, const char *slot,
- KActionCollection* parent, QWidget* window, const char *name = 0 );
+ KDEUI_EXPORT KToggleFullScreenAction *fullScreen(const TQObject *recvr, const char *slot,
+ KActionCollection* parent, TQWidget* window, const char *name = 0 );
/**
* Display the save options dialog.
*/
- KDEUI_EXPORT KAction *saveOptions(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *saveOptions(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display the configure key bindings dialog.
*
* Note that you might be able to use the pre-built KXMLGUIFactory's fuction:
- * KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), actionCollection());
+ * KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection());
*/
- KDEUI_EXPORT KAction *keyBindings(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *keyBindings(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display the preferences/options dialog.
*/
- KDEUI_EXPORT KAction *preferences(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *preferences(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* The Customize Toolbar dialog.
*/
- KDEUI_EXPORT KAction *configureToolbars(const QObject *recvr,
+ KDEUI_EXPORT KAction *configureToolbars(const TQObject *recvr,
const char *slot,
KActionCollection* parent,
const char *name = 0 );
@@ -555,7 +555,7 @@ namespace KStdAction
* The Configure Notifications dialog.
* @since 3.1
*/
- KDEUI_EXPORT KAction *configureNotifications(const QObject *recvr,
+ KDEUI_EXPORT KAction *configureNotifications(const TQObject *recvr,
const char *slot,
KActionCollection *parent,
const char *name = 0);
@@ -563,51 +563,51 @@ namespace KStdAction
/**
* Display the help.
*/
- KDEUI_EXPORT KAction *help(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *help(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display the help contents.
*/
- KDEUI_EXPORT KAction *helpContents(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *helpContents(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Trigger the What's This cursor.
*/
- KDEUI_EXPORT KAction *whatsThis(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *whatsThis(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display "Tip of the Day"
* @since 3.1
*/
- KDEUI_EXPORT KAction *tipOfDay(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *tipOfDay(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Open up the Report Bug dialog.
*/
- KDEUI_EXPORT KAction *reportBug(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *reportBug(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display the application's About box.
*/
- KDEUI_EXPORT KAction *aboutApp(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *aboutApp(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display the About KDE dialog.
*/
- KDEUI_EXPORT KAction *aboutKDE(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *aboutKDE(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
/**
* Display "Switch application language" dialog.
* @since 3.5.8
*/
- KDEUI_EXPORT KAction *switchApplicationLanguage(const QObject *recvr, const char *slot,
+ KDEUI_EXPORT KAction *switchApplicationLanguage(const TQObject *recvr, const char *slot,
KActionCollection* parent, const char *name = 0 );
}
diff --git a/kdeui/kstdaction_p.h b/kdeui/kstdaction_p.h
index f8f91868d..bc60115b1 100644
--- a/kdeui/kstdaction_p.h
+++ b/kdeui/kstdaction_p.h
@@ -124,9 +124,9 @@ inline const KStdActionInfo* infoPtr( StdAction id )
return 0;
}
-static inline QStringList internal_stdNames()
+static inline TQStringList internal_stdNames()
{
- QStringList result;
+ TQStringList result;
for( uint i = 0; g_rgActionInfo[i].id != ActionNone; i++ )
if (g_rgActionInfo[i].psLabel)
diff --git a/kdeui/kstdguiitem.cpp b/kdeui/kstdguiitem.cpp
index ce9466091..8391819ed 100644
--- a/kdeui/kstdguiitem.cpp
+++ b/kdeui/kstdguiitem.cpp
@@ -59,38 +59,38 @@ KGuiItem KStdGuiItem::guiItem ( StdItem ui_enum )
};
}
-QString KStdGuiItem::stdItem( StdItem ui_enum )
+TQString KStdGuiItem::stdItem( StdItem ui_enum )
{
switch (ui_enum ) {
- case Ok : return QString::fromLatin1("ok");
- case Cancel : return QString::fromLatin1("cancel");
- case Yes : return QString::fromLatin1("yes");
- case No : return QString::fromLatin1("no");
- case Discard : return QString::fromLatin1("discard");
- case Save : return QString::fromLatin1("save");
- case DontSave : return QString::fromLatin1("dontSave");
- case SaveAs : return QString::fromLatin1("saveAs");
- case Apply : return QString::fromLatin1("apply");
- case Help : return QString::fromLatin1("help");
- case Close : return QString::fromLatin1("close");
- case Defaults : return QString::fromLatin1("defaults");
- case Back : return QString::fromLatin1("back");
- case Forward : return QString::fromLatin1("forward");
- case Print : return QString::fromLatin1("print");
- case Continue : return QString::fromLatin1("continue");
- case Open : return QString::fromLatin1("open");
- case Quit : return QString::fromLatin1("quit");
- case AdminMode: return QString::fromLatin1("adminMode");
- case Delete : return QString::fromLatin1("delete");
- case Insert : return QString::fromLatin1("insert");
- case Find : return QString::fromLatin1("find");
- case Stop : return QString::fromLatin1("stop");
- case Add : return QString::fromLatin1("add");
- case Remove : return QString::fromLatin1("remove");
- case Test : return QString::fromLatin1("test");
- case Properties : return QString::fromLatin1("properties");
- case Overwrite : return QString::fromLatin1("overwrite");
- default : return QString::null;
+ case Ok : return TQString::fromLatin1("ok");
+ case Cancel : return TQString::fromLatin1("cancel");
+ case Yes : return TQString::fromLatin1("yes");
+ case No : return TQString::fromLatin1("no");
+ case Discard : return TQString::fromLatin1("discard");
+ case Save : return TQString::fromLatin1("save");
+ case DontSave : return TQString::fromLatin1("dontSave");
+ case SaveAs : return TQString::fromLatin1("saveAs");
+ case Apply : return TQString::fromLatin1("apply");
+ case Help : return TQString::fromLatin1("help");
+ case Close : return TQString::fromLatin1("close");
+ case Defaults : return TQString::fromLatin1("defaults");
+ case Back : return TQString::fromLatin1("back");
+ case Forward : return TQString::fromLatin1("forward");
+ case Print : return TQString::fromLatin1("print");
+ case Continue : return TQString::fromLatin1("continue");
+ case Open : return TQString::fromLatin1("open");
+ case Quit : return TQString::fromLatin1("quit");
+ case AdminMode: return TQString::fromLatin1("adminMode");
+ case Delete : return TQString::fromLatin1("delete");
+ case Insert : return TQString::fromLatin1("insert");
+ case Find : return TQString::fromLatin1("find");
+ case Stop : return TQString::fromLatin1("stop");
+ case Add : return TQString::fromLatin1("add");
+ case Remove : return TQString::fromLatin1("remove");
+ case Test : return TQString::fromLatin1("test");
+ case Properties : return TQString::fromLatin1("properties");
+ case Overwrite : return TQString::fromLatin1("overwrite");
+ default : return TQString::null;
};
}
@@ -183,7 +183,7 @@ KGuiItem KStdGuiItem::defaults()
KGuiItem KStdGuiItem::back( BidiMode useBidi )
{
- QString icon = ( useBidi == UseRTL && QApplication::reverseLayout() )
+ TQString icon = ( useBidi == UseRTL && TQApplication::reverseLayout() )
? "forward" : "back";
return KGuiItem( i18n( "go back", "&Back" ), icon,
i18n( "Go back one step" ) );
@@ -191,7 +191,7 @@ KGuiItem KStdGuiItem::back( BidiMode useBidi )
KGuiItem KStdGuiItem::forward( BidiMode useBidi )
{
- QString icon = ( useBidi == UseRTL && QApplication::reverseLayout() )
+ TQString icon = ( useBidi == UseRTL && TQApplication::reverseLayout() )
? "back" : "forward";
return KGuiItem( i18n( "go forward", "&Forward" ), icon,
i18n( "Go forward one step" ) );
@@ -211,7 +211,7 @@ KGuiItem KStdGuiItem::print()
KGuiItem KStdGuiItem::cont()
{
- return KGuiItem( i18n( "C&ontinue" ), QString::null,
+ return KGuiItem( i18n( "C&ontinue" ), TQString::null,
i18n( "Continue operation" ) );
}
diff --git a/kdeui/kstdguiitem.h b/kdeui/kstdguiitem.h
index 413a47296..bf2182191 100644
--- a/kdeui/kstdguiitem.h
+++ b/kdeui/kstdguiitem.h
@@ -22,8 +22,8 @@
// Needed for the template below
#include <kguiitem.h>
-#include <qstring.h>
-#include <qpair.h>
+#include <tqstring.h>
+#include <tqpair.h>
/**
* @short Provides a set of standardized KGuiItems.
@@ -59,7 +59,7 @@ public:
Overwrite ///< @since 3.5
};
static KGuiItem guiItem ( StdItem ui_enum );
- static QString stdItem ( StdItem ui_enum );
+ static TQString stdItem ( StdItem ui_enum );
static KGuiItem ok();
static KGuiItem cancel();
static KGuiItem yes();
diff --git a/kdeui/kstringvalidator.cpp b/kdeui/kstringvalidator.cpp
index e45e0dcbe..f783a4b9f 100644
--- a/kdeui/kstringvalidator.cpp
+++ b/kdeui/kstringvalidator.cpp
@@ -26,7 +26,7 @@
// KStringListValidator
//
-QValidator::State KStringListValidator::validate( QString & input, int& ) const {
+TQValidator::State KStringListValidator::validate( TQString & input, int& ) const {
if ( input.isEmpty() ) return Intermediate;
if ( isRejecting() ) // anything not in mStringList is acceptable:
@@ -38,7 +38,7 @@ QValidator::State KStringListValidator::validate( QString & input, int& ) const
if ( mStringList.find( input ) != mStringList.end() )
return Acceptable;
else
- for ( QStringList::ConstIterator it = mStringList.begin() ;
+ for ( TQStringList::ConstIterator it = mStringList.begin() ;
it != mStringList.end() ; ++it )
if ( (*it).startsWith( input ) || input.startsWith( *it ) )
return Intermediate;
@@ -46,7 +46,7 @@ QValidator::State KStringListValidator::validate( QString & input, int& ) const
return Invalid;
}
-void KStringListValidator::fixup( QString & /* input */ ) const {
+void KStringListValidator::fixup( TQString & /* input */ ) const {
if ( !isFixupEnabled() ) return;
// warn (but only once!) about non-implemented fixup():
static bool warn = true;
@@ -63,17 +63,17 @@ void KStringListValidator::fixup( QString & /* input */ ) const {
#define ALLOWED_CHARS "!#-'*+.0-9^-~+-"
-QValidator::State KMimeTypeValidator::validate( QString & input, int& ) const
+TQValidator::State KMimeTypeValidator::validate( TQString & input, int& ) const
{
if ( input.isEmpty() )
return Intermediate;
- QRegExp acceptable( "[" ALLOWED_CHARS "]+/[" ALLOWED_CHARS "]+",
+ TQRegExp acceptable( "[" ALLOWED_CHARS "]+/[" ALLOWED_CHARS "]+",
false /*case-insens.*/);
if ( acceptable.exactMatch( input ) )
return Acceptable;
- QRegExp intermediate( "[" ALLOWED_CHARS "]*/?[" ALLOWED_CHARS "]*",
+ TQRegExp intermediate( "[" ALLOWED_CHARS "]*/?[" ALLOWED_CHARS "]*",
false /*case-insensitive*/);
if ( intermediate.exactMatch( input ) )
return Intermediate;
@@ -81,10 +81,10 @@ QValidator::State KMimeTypeValidator::validate( QString & input, int& ) const
return Invalid;
}
-void KMimeTypeValidator::fixup( QString & input ) const
+void KMimeTypeValidator::fixup( TQString & input ) const
{
- QRegExp invalidChars("[^/" ALLOWED_CHARS "]+");
- input.replace( invalidChars, QString::null);
+ TQRegExp invalidChars("[^/" ALLOWED_CHARS "]+");
+ input.replace( invalidChars, TQString::null);
}
#include "kstringvalidator.moc"
diff --git a/kdeui/kstringvalidator.h b/kdeui/kstringvalidator.h
index 42e1c7b3b..77b26d6db 100644
--- a/kdeui/kstringvalidator.h
+++ b/kdeui/kstringvalidator.h
@@ -22,13 +22,13 @@
#ifndef __KSTRINGVALIDATOR_H__
#define __KSTRINGVALIDATOR_H__
-#include <qvalidator.h>
-#include <qstringlist.h>
+#include <tqvalidator.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
/**
- * @short A QValidator to (dis)allow certain strings
+ * @short A TQValidator to (dis)allow certain strings
*
* This validator allows you to accept only certain or to accept all
* but certain strings.
@@ -57,9 +57,9 @@
*
* @author Marc Mutz <mutz@kde.org>
**/
-class KDEUI_EXPORT KStringListValidator : public QValidator {
+class KDEUI_EXPORT KStringListValidator : public TQValidator {
Q_OBJECT
- Q_PROPERTY( QStringList stringList READ stringList WRITE setStringList )
+ Q_PROPERTY( TQStringList stringList READ stringList WRITE setStringList )
Q_PROPERTY( bool rejecting READ isRejecting WRITE setRejecting )
Q_PROPERTY( bool fixupEnabled READ isFixupEnabled WRITE setFixupEnabled )
public:
@@ -73,14 +73,14 @@ public:
* @param name Passed to lower level constructor
*
**/
- KStringListValidator( const QStringList & list=QStringList(),
+ KStringListValidator( const TQStringList & list=TQStringList(),
bool rejecting=true, bool fixupEnabled=false,
- QObject * parent=0, const char * name=0 )
- : QValidator( parent, name ), mStringList( list ),
+ TQObject * parent=0, const char * name=0 )
+ : TQValidator( parent, name ), mStringList( list ),
mRejecting( rejecting ), mFixupEnabled( fixupEnabled ) {}
- virtual State validate( QString & input, int & pos ) const;
- virtual void fixup( QString & input ) const;
+ virtual State validate( TQString & input, int & pos ) const;
+ virtual void fixup( TQString & input ) const;
void setRejecting( bool rejecting ) { mRejecting = rejecting; }
bool isRejecting() const { return mRejecting; }
@@ -88,11 +88,11 @@ public:
void setFixupEnabled( bool fixupEnabled ) { mFixupEnabled = fixupEnabled; }
bool isFixupEnabled() const { return mFixupEnabled; }
- void setStringList( const QStringList & list ) { mStringList = list; }
- QStringList stringList() const { return mStringList; }
+ void setStringList( const TQStringList & list ) { mStringList = list; }
+ TQStringList stringList() const { return mStringList; }
protected:
- QStringList mStringList;
+ TQStringList mStringList;
bool mRejecting;
bool mFixupEnabled;
private:
@@ -100,7 +100,7 @@ private:
};
/**
- * @short A QValidator for mime types.
+ * @short A TQValidator for mime types.
*
* This validator allows you to validate mimetype names
* (e.g. text/plain, image/jpeg). Note that the validation is only
@@ -120,8 +120,8 @@ class KDEUI_EXPORT KMimeTypeValidator : public QValidator
{
Q_OBJECT
public:
- KMimeTypeValidator( QObject* parent, const char* name=0)
- : QValidator( parent, name ) {}
+ KMimeTypeValidator( TQObject* parent, const char* name=0)
+ : TQValidator( parent, name ) {}
/**
* Checks for well-formed mimetype. Returns
@@ -129,11 +129,11 @@ public:
* @li Intermediate iff input ~= /^[:allowed chars:]*\/?[:allowed chars:]*$/
* @li Invalid else
*/
- virtual State validate( QString & input, int & pos ) const;
+ virtual State validate( TQString & input, int & pos ) const;
/**
* Removes all characters that are forbidden in mimetypes.
*/
- virtual void fixup( QString & input ) const;
+ virtual void fixup( TQString & input ) const;
private:
class KMimeTypeValidator* d;
};
diff --git a/kdeui/kswitchlanguagedialog.cpp b/kdeui/kswitchlanguagedialog.cpp
index 9b390a7de..3cfcc011b 100644
--- a/kdeui/kswitchlanguagedialog.cpp
+++ b/kdeui/kswitchlanguagedialog.cpp
@@ -21,10 +21,10 @@
#include "kswitchlanguagedialog.h"
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qmap.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqmap.h>
#include <klanguagebutton.h>
#include <kconfig.h>
@@ -35,12 +35,12 @@
struct LanguageRowData
{
- QLabel *label;
+ TQLabel *label;
KLanguageButton *languageButton;
KPushButton *removeButton;
void setRowWidgets(
- QLabel *label,
+ TQLabel *label,
KLanguageButton *languageButton,
KPushButton *removeButton
)
@@ -67,47 +67,47 @@ public:
/**
Adds one button with language to widget.
*/
- void addLanguageButton(const QString & languageCode, bool primaryLanguage);
+ void addLanguageButton(const TQString & languageCode, bool primaryLanguage);
/**
Returns list of languages chosen for application or default languages is they are not set.
*/
- QStringList applicationLanguageList();
+ TQStringList applicationLanguageList();
- QMap<KPushButton*, LanguageRowData> languageRows;
- QPtrList<KLanguageButton> languageButtons;
- QGridLayout *languagesLayout;
- QWidget *page;
+ TQMap<KPushButton*, LanguageRowData> languageRows;
+ TQPtrList<KLanguageButton> languageButtons;
+ TQGridLayout *languagesLayout;
+ TQWidget *page;
};
/*************************** KSwitchLanguageDialog **************************/
KSwitchLanguageDialog::KSwitchLanguageDialog(
- QWidget *parent,
+ TQWidget *parent,
const char *name,
bool modal
):
KDialogBase(parent, name, modal, i18n("Switch application language"), Ok|Cancel, Ok, true ),
d(new KSwitchLanguageDialogPrivate(this))
{
- d->page = new QWidget( this );
+ d->page = new TQWidget( this );
setMainWidget(d->page);
- QVBoxLayout *topLayout = new QVBoxLayout( d->page, 0, spacingHint() );
- QLabel *label = new QLabel( i18n("Please choose language which should be used for this application"), d->page, "label1" );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( d->page, 0, spacingHint() );
+ TQLabel *label = new TQLabel( i18n("Please choose language which should be used for this application"), d->page, "label1" );
topLayout->addWidget( label );
- QHBoxLayout *languageHorizontalLayout = new QHBoxLayout();
+ TQHBoxLayout *languageHorizontalLayout = new TQHBoxLayout();
topLayout->addLayout(languageHorizontalLayout);
- d->languagesLayout = new QGridLayout(0 , 2);
+ d->languagesLayout = new TQGridLayout(0 , 2);
languageHorizontalLayout->addLayout(d->languagesLayout);
languageHorizontalLayout->addStretch();
- QStringList defaultLanguages = d->applicationLanguageList();
+ TQStringList defaultLanguages = d->applicationLanguageList();
- for ( QStringList::ConstIterator it = defaultLanguages.begin(); it != defaultLanguages.end(); ++it )
+ for ( TQStringList::ConstIterator it = defaultLanguages.begin(); it != defaultLanguages.end(); ++it )
{
- QString language = *it;
+ TQString language = *it;
bool primaryLanguage = (it == defaultLanguages.begin());
d->addLanguageButton(language, primaryLanguage);
}
@@ -117,12 +117,12 @@ KSwitchLanguageDialog::KSwitchLanguageDialog(
d->addLanguageButton(KGlobal::locale()->defaultLanguage(), true);
}
- QHBoxLayout *addButtonHorizontalLayout = new QHBoxLayout();
+ TQHBoxLayout *addButtonHorizontalLayout = new TQHBoxLayout();
topLayout->addLayout(addButtonHorizontalLayout);
KPushButton *addLangButton = new KPushButton(i18n("Add fallback language"), d->page, "addLangButton");
- QToolTip::add(addLangButton, i18n("Adds one more language which will be used if other translations do not contain proper translation"));
- connect(addLangButton, SIGNAL(clicked()), this, SLOT(slotAddLanguageButton()));
+ TQToolTip::add(addLangButton, i18n("Adds one more language which will be used if other translations do not contain proper translation"));
+ connect(addLangButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddLanguageButton()));
addButtonHorizontalLayout->addWidget(addLangButton);
addButtonHorizontalLayout->addStretch();
@@ -142,7 +142,7 @@ void KSwitchLanguageDialog::slotAddLanguageButton()
void KSwitchLanguageDialog::removeButtonClicked()
{
- QObject const *signalSender = sender();
+ TQObject const *signalSender = sender();
if (signalSender == NULL)
{
@@ -158,7 +158,7 @@ void KSwitchLanguageDialog::removeButtonClicked()
return;
}
- QMap<KPushButton *, LanguageRowData>::iterator it = d->languageRows.find(removeButton);
+ TQMap<KPushButton *, LanguageRowData>::iterator it = d->languageRows.find(removeButton);
if (it == d->languageRows.end())
{
@@ -176,9 +176,9 @@ void KSwitchLanguageDialog::removeButtonClicked()
d->languageRows.erase(it);
}
-void KSwitchLanguageDialog::languageOnButtonChanged(const QString & languageCode)
+void KSwitchLanguageDialog::languageOnButtonChanged(const TQString & languageCode)
{
- for ( QPtrList<KLanguageButton>::ConstIterator it = d->languageButtons.begin(); it != d->languageButtons.end(); ++it )
+ for ( TQPtrList<KLanguageButton>::ConstIterator it = d->languageButtons.begin(); it != d->languageButtons.end(); ++it )
{
KLanguageButton *languageButton = *it;
if (languageButton->current() == languageCode)
@@ -192,10 +192,10 @@ void KSwitchLanguageDialog::languageOnButtonChanged(const QString & languageCode
void KSwitchLanguageDialog::slotOk()
{
- QString languageString;
+ TQString languageString;
bool first = true;
- for ( QPtrList<KLanguageButton>::ConstIterator it = d->languageButtons.begin(); it != d->languageButtons.end(); ++it )
+ for ( TQPtrList<KLanguageButton>::ConstIterator it = d->languageButtons.begin(); it != d->languageButtons.end(); ++it )
{
KLanguageButton *languageButton = *it;
@@ -242,10 +242,10 @@ KSwitchLanguageDialogPrivate::KSwitchLanguageDialogPrivate(
void KSwitchLanguageDialogPrivate::fillApplicationLanguages(KLanguageButton *button)
{
KLocale *locale = KGlobal::locale();
- QStringList allLanguages = locale->allLanguagesTwoAlpha();
- for ( QStringList::ConstIterator it = allLanguages.begin(); it != allLanguages.end(); ++it )
+ TQStringList allLanguages = locale->allLanguagesTwoAlpha();
+ for ( TQStringList::ConstIterator it = allLanguages.begin(); it != allLanguages.end(); ++it )
{
- QString languageCode = *it;
+ TQString languageCode = *it;
if (locale->isApplicationTranslatedInto(languageCode))
{
button->insertItem(
@@ -256,10 +256,10 @@ void KSwitchLanguageDialogPrivate::fillApplicationLanguages(KLanguageButton *but
}
}
-QStringList KSwitchLanguageDialogPrivate::applicationLanguageList()
+TQStringList KSwitchLanguageDialogPrivate::applicationLanguageList()
{
KConfig *config = KGlobal::config();
- QStringList languagesList;
+ TQStringList languagesList;
if (config->hasGroup("Locale"))
{
@@ -277,9 +277,9 @@ QStringList KSwitchLanguageDialogPrivate::applicationLanguageList()
return languagesList;
}
-void KSwitchLanguageDialogPrivate::addLanguageButton(const QString & languageCode, bool primaryLanguage)
+void KSwitchLanguageDialogPrivate::addLanguageButton(const TQString & languageCode, bool primaryLanguage)
{
- QString labelText = primaryLanguage ? i18n("Primary language:") : i18n("Fallback language:");
+ TQString labelText = primaryLanguage ? i18n("Primary language:") : i18n("Fallback language:");
KLanguageButton *languageButton = new KLanguageButton(page);
@@ -289,11 +289,11 @@ void KSwitchLanguageDialogPrivate::addLanguageButton(const QString & languageCod
languageButton->setCurrentItem(languageCode);
- QObject::connect(
+ TQObject::connect(
languageButton,
- SIGNAL(activated( const QString &)),
+ TQT_SIGNAL(activated( const TQString &)),
p,
- SLOT(languageOnButtonChanged(const QString &))
+ TQT_SLOT(languageOnButtonChanged(const TQString &))
);
LanguageRowData languageRowData;
@@ -303,26 +303,26 @@ void KSwitchLanguageDialogPrivate::addLanguageButton(const QString & languageCod
{
removeButton = new KPushButton(i18n("Remove"), page);
- QObject::connect(
+ TQObject::connect(
removeButton,
- SIGNAL(clicked()),
+ TQT_SIGNAL(clicked()),
p,
- SLOT(removeButtonClicked())
+ TQT_SLOT(removeButtonClicked())
);
}
if (primaryLanguage)
{
- QToolTip::add(languageButton, i18n("This is main application language which will be used first before any other languages"));
+ TQToolTip::add(languageButton, i18n("This is main application language which will be used first before any other languages"));
}
else
{
- QToolTip::add(languageButton, i18n("This is language which will be used if any previous languages does not contain proper translation"));
+ TQToolTip::add(languageButton, i18n("This is language which will be used if any previous languages does not contain proper translation"));
}
int numRows = languagesLayout->numRows();
- QLabel *languageLabel = new QLabel(labelText, page);
+ TQLabel *languageLabel = new TQLabel(labelText, page);
languagesLayout->addWidget( languageLabel, numRows + 1, 1, Qt::AlignAuto );
languagesLayout->addWidget( languageButton, numRows + 1, 2, Qt::AlignAuto );
diff --git a/kdeui/kswitchlanguagedialog.h b/kdeui/kswitchlanguagedialog.h
index 0161453c5..185941b57 100644
--- a/kdeui/kswitchlanguagedialog.h
+++ b/kdeui/kswitchlanguagedialog.h
@@ -50,10 +50,10 @@ class KDEUI_EXPORT KSwitchLanguageDialog : public KDialogBase
* @param name Internal name of the widget. This name in not used in the
* caption.
* @param modal If false, this widget will be modeless and must be
- * made visible using QWidget::show(). Otherwise it will be
- * modal and must be made visible using QWidget::exec()
+ * made visible using TQWidget::show(). Otherwise it will be
+ * modal and must be made visible using TQWidget::exec()
*/
- KSwitchLanguageDialog( QWidget *parent=0, const char *name=0, bool modal=true );
+ KSwitchLanguageDialog( TQWidget *parent=0, const char *name=0, bool modal=true );
virtual ~KSwitchLanguageDialog();
@@ -66,7 +66,7 @@ class KDEUI_EXPORT KSwitchLanguageDialog : public KDialogBase
/**
Called when one of language buttons changes state.
*/
- virtual void languageOnButtonChanged(const QString & );
+ virtual void languageOnButtonChanged(const TQString & );
/**
Called to add one language button to dialog.
diff --git a/kdeui/ksyntaxhighlighter.cpp b/kdeui/ksyntaxhighlighter.cpp
index b60940bb4..c70cd672e 100644
--- a/kdeui/ksyntaxhighlighter.cpp
+++ b/kdeui/ksyntaxhighlighter.cpp
@@ -21,10 +21,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcolor.h>
-#include <qregexp.h>
-#include <qsyntaxhighlighter.h>
-#include <qtimer.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
+#include <tqsyntaxhighlighter.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kconfig.h>
@@ -45,7 +45,7 @@ static const int tenSeconds = 10*1000;
class KSyntaxHighlighter::KSyntaxHighlighterPrivate
{
public:
- QColor col1, col2, col3, col4, col5;
+ TQColor col1, col2, col3, col4, col5;
SyntaxMode mode;
bool enabled;
};
@@ -58,10 +58,10 @@ public:
alwaysEndsWithSpace( true ),
intraWordEditing( false ) {}
- QString currentWord;
+ TQString currentWord;
int currentPos;
bool alwaysEndsWithSpace;
- QColor color;
+ TQColor color;
bool intraWordEditing;
};
@@ -84,21 +84,21 @@ public:
delete spell;
}
- static QDict<int>* sDict()
+ static TQDict<int>* sDict()
{
if (!statDict)
- statDict = new QDict<int>(50021);
+ statDict = new TQDict<int>(50021);
return statDict;
}
- QDict<int>* mDict;
- QDict<int> autoDict;
- QDict<int> autoIgnoreDict;
- static QObject *sDictionaryMonitor;
+ TQDict<int>* mDict;
+ TQDict<int> autoDict;
+ TQDict<int> autoIgnoreDict;
+ static TQObject *sDictionaryMonitor;
KSpell *spell;
KSpellConfig *mSpellConfig;
- QTimer *rehighlightRequest, *spellTimeout;
- QString spellKey;
+ TQTimer *rehighlightRequest, *spellTimeout;
+ TQString spellKey;
int wordCount, errorCount;
int checksRequested, checksDone;
int disablePercentage;
@@ -107,21 +107,21 @@ public:
bool active, automatic, autoReady;
bool globalConfig, spellReady;
private:
- static QDict<int>* statDict;
+ static TQDict<int>* statDict;
};
-QDict<int>* KDictSpellingHighlighter::KDictSpellingHighlighterPrivate::statDict = 0;
+TQDict<int>* KDictSpellingHighlighter::KDictSpellingHighlighterPrivate::statDict = 0;
-KSyntaxHighlighter::KSyntaxHighlighter( QTextEdit *textEdit,
+KSyntaxHighlighter::KSyntaxHighlighter( TQTextEdit *textEdit,
bool colorQuoting,
- const QColor& depth0,
- const QColor& depth1,
- const QColor& depth2,
- const QColor& depth3,
+ const TQColor& depth0,
+ const TQColor& depth1,
+ const TQColor& depth2,
+ const TQColor& depth3,
SyntaxMode mode )
- : QSyntaxHighlighter( textEdit )
+ : TQSyntaxHighlighter( textEdit )
{
d = new KSyntaxHighlighterPrivate();
@@ -140,35 +140,35 @@ KSyntaxHighlighter::~KSyntaxHighlighter()
delete d;
}
-int KSyntaxHighlighter::highlightParagraph( const QString &text, int )
+int KSyntaxHighlighter::highlightParagraph( const TQString &text, int )
{
if (!d->enabled) {
setFormat( 0, text.length(), textEdit()->viewport()->paletteForegroundColor() );
return 0;
}
- QString simplified = text;
- simplified = simplified.replace( QRegExp( "\\s" ), QString::null ).replace( '|', QString::fromLatin1(">") );
- while ( simplified.startsWith( QString::fromLatin1(">>>>") ) )
+ TQString simplified = text;
+ simplified = simplified.replace( TQRegExp( "\\s" ), TQString::null ).replace( '|', TQString::fromLatin1(">") );
+ while ( simplified.startsWith( TQString::fromLatin1(">>>>") ) )
simplified = simplified.mid(3);
- if ( simplified.startsWith( QString::fromLatin1(">>>") ) || simplified.startsWith( QString::fromLatin1("> > >") ) )
+ if ( simplified.startsWith( TQString::fromLatin1(">>>") ) || simplified.startsWith( TQString::fromLatin1("> > >") ) )
setFormat( 0, text.length(), d->col2 );
- else if ( simplified.startsWith( QString::fromLatin1(">>") ) || simplified.startsWith( QString::fromLatin1("> >") ) )
+ else if ( simplified.startsWith( TQString::fromLatin1(">>") ) || simplified.startsWith( TQString::fromLatin1("> >") ) )
setFormat( 0, text.length(), d->col3 );
- else if ( simplified.startsWith( QString::fromLatin1(">") ) )
+ else if ( simplified.startsWith( TQString::fromLatin1(">") ) )
setFormat( 0, text.length(), d->col4 );
else
setFormat( 0, text.length(), d->col5 );
return 0;
}
-KSpellingHighlighter::KSpellingHighlighter( QTextEdit *textEdit,
- const QColor& spellColor,
+KSpellingHighlighter::KSpellingHighlighter( TQTextEdit *textEdit,
+ const TQColor& spellColor,
bool colorQuoting,
- const QColor& depth0,
- const QColor& depth1,
- const QColor& depth2,
- const QColor& depth3 )
+ const TQColor& depth0,
+ const TQColor& depth1,
+ const TQColor& depth2,
+ const TQColor& depth3 )
: KSyntaxHighlighter( textEdit, colorQuoting, depth0, depth1, depth2, depth3 )
{
d = new KSpellingHighlighterPrivate();
@@ -181,13 +181,13 @@ KSpellingHighlighter::~KSpellingHighlighter()
delete d;
}
-int KSpellingHighlighter::highlightParagraph( const QString &text,
+int KSpellingHighlighter::highlightParagraph( const TQString &text,
int paraNo )
{
if ( paraNo == -2 )
paraNo = 0;
// leave #includes, diffs, and quoted replies alone
- QString diffAndCo( ">|" );
+ TQString diffAndCo( ">|" );
bool isCode = diffAndCo.find(text[0]) != -1;
@@ -228,9 +228,9 @@ int KSpellingHighlighter::highlightParagraph( const QString &text,
return ++paraNo;
}
-QStringList KSpellingHighlighter::personalWords()
+TQStringList KSpellingHighlighter::personalWords()
{
- QStringList l;
+ TQStringList l;
l.append( "KMail" );
l.append( "KOrganizer" );
l.append( "KAddressBook" );
@@ -251,7 +251,7 @@ void KSpellingHighlighter::flushCurrentWord()
d->currentPos++;
}
- QChar ch;
+ TQChar ch;
while ( ( ch = d->currentWord[(int) d->currentWord.length() - 1] ).isPunct() &&
ch != '(' && ch != '@' )
d->currentWord.truncate( d->currentWord.length() - 1 );
@@ -265,17 +265,17 @@ void KSpellingHighlighter::flushCurrentWord()
d->currentWord = "";
}
-QObject *KDictSpellingHighlighter::KDictSpellingHighlighterPrivate::sDictionaryMonitor = 0;
+TQObject *KDictSpellingHighlighter::KDictSpellingHighlighterPrivate::sDictionaryMonitor = 0;
-KDictSpellingHighlighter::KDictSpellingHighlighter( QTextEdit *textEdit,
+KDictSpellingHighlighter::KDictSpellingHighlighter( TQTextEdit *textEdit,
bool spellCheckingActive ,
bool autoEnable,
- const QColor& spellColor,
+ const TQColor& spellColor,
bool colorQuoting,
- const QColor& depth0,
- const QColor& depth1,
- const QColor& depth2,
- const QColor& depth3,
+ const TQColor& depth0,
+ const TQColor& depth1,
+ const TQColor& depth2,
+ const TQColor& depth3,
KSpellConfig *spellConfig )
: KSpellingHighlighter( textEdit, spellColor,
colorQuoting, depth0, depth1, depth2, depth3 )
@@ -299,23 +299,23 @@ KDictSpellingHighlighter::KDictSpellingHighlighter( QTextEdit *textEdit,
textEdit->installEventFilter( this );
textEdit->viewport()->installEventFilter( this );
- d->rehighlightRequest = new QTimer(this);
- connect( d->rehighlightRequest, SIGNAL( timeout() ),
- this, SLOT( slotRehighlight() ));
- d->spellTimeout = new QTimer(this);
- connect( d->spellTimeout, SIGNAL( timeout() ),
- this, SLOT( slotKSpellNotResponding() ));
+ d->rehighlightRequest = new TQTimer(this);
+ connect( d->rehighlightRequest, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotRehighlight() ));
+ d->spellTimeout = new TQTimer(this);
+ connect( d->spellTimeout, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotKSpellNotResponding() ));
if ( d->globalConfig ) {
d->spellKey = spellKey();
if ( !d->sDictionaryMonitor )
- d->sDictionaryMonitor = new QObject();
+ d->sDictionaryMonitor = new TQObject();
}
else {
- d->mDict = new QDict<int>(4001);
- connect( d->mSpellConfig, SIGNAL( configChanged() ),
- this, SLOT( slotLocalSpellConfigChanged() ) );
+ d->mDict = new TQDict<int>(4001);
+ connect( d->mSpellConfig, TQT_SIGNAL( configChanged() ),
+ this, TQT_SLOT( slotLocalSpellConfigChanged() ) );
}
slotDictionaryChanged();
@@ -339,8 +339,8 @@ void KDictSpellingHighlighter::slotSpellReady( KSpell *spell )
if ( cg.readEntry("KSpell_DoSpellChecking") != "0" )
{
if ( d->globalConfig ) {
- connect( d->sDictionaryMonitor, SIGNAL( destroyed()),
- this, SLOT( slotDictionaryChanged() ));
+ connect( d->sDictionaryMonitor, TQT_SIGNAL( destroyed()),
+ this, TQT_SLOT( slotDictionaryChanged() ));
}
if ( spell != d->spell )
{
@@ -348,14 +348,14 @@ void KDictSpellingHighlighter::slotSpellReady( KSpell *spell )
d->spell = spell;
}
d->spellReady = true;
- const QStringList l = KSpellingHighlighter::personalWords();
- for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ const TQStringList l = KSpellingHighlighter::personalWords();
+ for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
d->spell->addPersonal( *it );
}
- connect( spell, SIGNAL( misspelling( const QString &, const QStringList &, unsigned int )),
- this, SLOT( slotMisspelling( const QString &, const QStringList &, unsigned int )));
- connect( spell, SIGNAL( corrected( const QString &, const QString &, unsigned int )),
- this, SLOT( slotCorrected( const QString &, const QString &, unsigned int )));
+ connect( spell, TQT_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int )),
+ this, TQT_SLOT( slotMisspelling( const TQString &, const TQStringList &, unsigned int )));
+ connect( spell, TQT_SIGNAL( corrected( const TQString &, const TQString &, unsigned int )),
+ this, TQT_SLOT( slotCorrected( const TQString &, const TQString &, unsigned int )));
d->checksRequested = 0;
d->checksDone = 0;
d->completeRehighlightRequired = true;
@@ -363,7 +363,7 @@ void KDictSpellingHighlighter::slotSpellReady( KSpell *spell )
}
}
-bool KDictSpellingHighlighter::isMisspelled( const QString &word )
+bool KDictSpellingHighlighter::isMisspelled( const TQString &word )
{
if (!d->spellReady)
return false;
@@ -378,7 +378,7 @@ bool KDictSpellingHighlighter::isMisspelled( const QString &word )
d->autoIgnoreDict.replace( word, Ignore );
// "dict" is used as a cache to store the results of KSpell
- QDict<int>* dict = ( d->globalConfig ? d->sDict() : d->mDict );
+ TQDict<int>* dict = ( d->globalConfig ? d->sDict() : d->mDict );
if ( !dict->isEmpty() && (*dict)[word] == NotOkay ) {
if ( d->autoReady && ( d->autoDict[word] != NotOkay )) {
if ( !d->autoIgnoreDict[word] )
@@ -419,7 +419,7 @@ void KSpellingHighlighter::setIntraWordEditing( bool editing )
d->intraWordEditing = editing;
}
-void KDictSpellingHighlighter::slotMisspelling (const QString &originalWord, const QStringList &suggestions,
+void KDictSpellingHighlighter::slotMisspelling (const TQString &originalWord, const TQStringList &suggestions,
unsigned int pos)
{
Q_UNUSED( suggestions );
@@ -434,12 +434,12 @@ void KDictSpellingHighlighter::slotMisspelling (const QString &originalWord, con
emit newSuggestions( originalWord, suggestions, pos );
}
-void KDictSpellingHighlighter::slotCorrected(const QString &word,
- const QString &,
+void KDictSpellingHighlighter::slotCorrected(const TQString &word,
+ const TQString &,
unsigned int)
{
- QDict<int>* dict = ( d->globalConfig ? d->sDict() : d->mDict );
+ TQDict<int>* dict = ( d->globalConfig ? d->sDict() : d->mDict );
if ( !dict->isEmpty() && (*dict)[word] == Unknown ) {
dict->replace( word, Okay );
}
@@ -454,8 +454,8 @@ void KDictSpellingHighlighter::slotCorrected(const QString &word,
void KDictSpellingHighlighter::dictionaryChanged()
{
- QObject *oldMonitor = KDictSpellingHighlighterPrivate::sDictionaryMonitor;
- KDictSpellingHighlighterPrivate::sDictionaryMonitor = new QObject();
+ TQObject *oldMonitor = KDictSpellingHighlighterPrivate::sDictionaryMonitor;
+ KDictSpellingHighlighterPrivate::sDictionaryMonitor = new TQObject();
KDictSpellingHighlighterPrivate::sDict()->clear();
delete oldMonitor;
}
@@ -514,7 +514,7 @@ void KDictSpellingHighlighter::slotRehighlight()
}
if (d->checksDone == d->checksRequested)
d->completeRehighlightRequired = false;
- QTimer::singleShot( 0, this, SLOT( slotAutoDetection() ));
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotAutoDetection() ));
}
void KDictSpellingHighlighter::slotDictionaryChanged()
@@ -526,7 +526,7 @@ void KDictSpellingHighlighter::slotDictionaryChanged()
d->autoDict.clear();
d->spell = new KSpell( 0, i18n( "Incremental Spellcheck" ), this,
- SLOT( slotSpellReady( KSpell * ) ), d->mSpellConfig );
+ TQT_SLOT( slotSpellReady( KSpell * ) ), d->mSpellConfig );
}
void KDictSpellingHighlighter::slotLocalSpellConfigChanged()
@@ -537,23 +537,23 @@ void KDictSpellingHighlighter::slotLocalSpellConfigChanged()
slotDictionaryChanged();
}
-QString KDictSpellingHighlighter::spellKey()
+TQString KDictSpellingHighlighter::spellKey()
{
KConfig *config = KGlobal::config();
KConfigGroupSaver cs( config, "KSpell" );
config->reparseConfiguration();
- QString key;
- key += QString::number( config->readNumEntry( "KSpell_NoRootAffix", 0 ));
+ TQString key;
+ key += TQString::number( config->readNumEntry( "KSpell_NoRootAffix", 0 ));
key += '/';
- key += QString::number( config->readNumEntry( "KSpell_RunTogether", 0 ));
+ key += TQString::number( config->readNumEntry( "KSpell_RunTogether", 0 ));
key += '/';
key += config->readEntry( "KSpell_Dictionary", "" );
key += '/';
- key += QString::number( config->readNumEntry( "KSpell_DictFromList", false ));
+ key += TQString::number( config->readNumEntry( "KSpell_DictFromList", false ));
key += '/';
- key += QString::number( config->readNumEntry( "KSpell_Encoding", KS_E_ASCII ));
+ key += TQString::number( config->readNumEntry( "KSpell_Encoding", KS_E_ASCII ));
key += '/';
- key += QString::number( config->readNumEntry( "KSpell_Client", KS_CLIENT_ISPELL ));
+ key += TQString::number( config->readNumEntry( "KSpell_Client", KS_CLIENT_ISPELL ));
return key;
}
@@ -607,11 +607,11 @@ void KDictSpellingHighlighter::slotKSpellNotResponding()
++retries;
}
-bool KDictSpellingHighlighter::eventFilter( QObject *o, QEvent *e)
+bool KDictSpellingHighlighter::eventFilter( TQObject *o, TQEvent *e)
{
- if (o == textEdit() && (e->type() == QEvent::FocusIn)) {
+ if (o == textEdit() && (e->type() == TQEvent::FocusIn)) {
if ( d->globalConfig ) {
- QString skey = spellKey();
+ TQString skey = spellKey();
if ( d->spell && d->spellKey != skey ) {
d->spellKey = skey;
KDictSpellingHighlighter::dictionaryChanged();
@@ -619,8 +619,8 @@ bool KDictSpellingHighlighter::eventFilter( QObject *o, QEvent *e)
}
}
- if (o == textEdit() && (e->type() == QEvent::KeyPress)) {
- QKeyEvent *k = static_cast<QKeyEvent *>(e);
+ if (o == textEdit() && (e->type() == TQEvent::KeyPress)) {
+ TQKeyEvent *k = static_cast<TQKeyEvent *>(e);
d->autoReady = true;
if (d->rehighlightRequest->isActive()) // try to stay out of the users way
d->rehighlightRequest->changeInterval( 500 );
@@ -657,12 +657,12 @@ bool KDictSpellingHighlighter::eventFilter( QObject *o, QEvent *e)
if ( k->key() == Key_Space ||
k->key() == Key_Enter ||
k->key() == Key_Return ) {
- QTimer::singleShot( 0, this, SLOT( slotAutoDetection() ));
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotAutoDetection() ));
}
}
else if ( o == textEdit()->viewport() &&
- ( e->type() == QEvent::MouseButtonPress )) {
+ ( e->type() == TQEvent::MouseButtonPress )) {
d->autoReady = true;
if ( intraWordEditing() ) {
setIntraWordEditing( false );
diff --git a/kdeui/ksyntaxhighlighter.h b/kdeui/ksyntaxhighlighter.h
index ea020afa9..3ed561236 100644
--- a/kdeui/ksyntaxhighlighter.h
+++ b/kdeui/ksyntaxhighlighter.h
@@ -24,10 +24,10 @@
#ifndef KSYNTAXHIGHLIGHTER_H
#define KSYNTAXHIGHLIGHTER_H
-#include <qtextedit.h>
-#include <qsyntaxhighlighter.h>
-#include <qcolor.h>
-#include <qstringlist.h>
+#include <tqtextedit.h>
+#include <tqsyntaxhighlighter.h>
+#include <tqcolor.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -46,16 +46,16 @@ public:
PlainTextMode,
RichTextMode
};
- KSyntaxHighlighter( QTextEdit *textEdit,
+ KSyntaxHighlighter( TQTextEdit *textEdit,
bool colorQuoting = false,
- const QColor& QuoteColor0 = black,
- const QColor& QuoteColor1 = QColor( 0x00, 0x80, 0x00 ),
- const QColor& QuoteColor2 = QColor( 0x00, 0x80, 0x00 ),
- const QColor& QuoteColor3 = QColor( 0x00, 0x80, 0x00 ),
+ const TQColor& QuoteColor0 = black,
+ const TQColor& QuoteColor1 = TQColor( 0x00, 0x80, 0x00 ),
+ const TQColor& QuoteColor2 = TQColor( 0x00, 0x80, 0x00 ),
+ const TQColor& QuoteColor3 = TQColor( 0x00, 0x80, 0x00 ),
SyntaxMode mode = PlainTextMode );
~KSyntaxHighlighter();
- int highlightParagraph( const QString& text, int endStateOfLastPara );
+ int highlightParagraph( const TQString& text, int endStateOfLastPara );
private:
class KSyntaxHighlighterPrivate;
@@ -65,21 +65,21 @@ private:
class KDEUI_EXPORT KSpellingHighlighter : public KSyntaxHighlighter
{
public:
- KSpellingHighlighter( QTextEdit *textEdit,
- const QColor& spellColor = red,
+ KSpellingHighlighter( TQTextEdit *textEdit,
+ const TQColor& spellColor = red,
bool colorQuoting = false,
- const QColor& QuoteColor0 = black,
- const QColor& QuoteColor1 = QColor( 0x00, 0x80, 0x00 ),
- const QColor& QuoteColor2 = QColor( 0x00, 0x80, 0x00 ),
- const QColor& QuoteColor3 = QColor( 0x00, 0x80, 0x00 ) );
+ const TQColor& QuoteColor0 = black,
+ const TQColor& QuoteColor1 = TQColor( 0x00, 0x80, 0x00 ),
+ const TQColor& QuoteColor2 = TQColor( 0x00, 0x80, 0x00 ),
+ const TQColor& QuoteColor3 = TQColor( 0x00, 0x80, 0x00 ) );
~KSpellingHighlighter();
- virtual int highlightParagraph( const QString &text,
+ virtual int highlightParagraph( const TQString &text,
int endStateOfLastPara );
- virtual bool isMisspelled( const QString& word ) = 0;
+ virtual bool isMisspelled( const TQString& word ) = 0;
bool intraWordEditing() const;
void setIntraWordEditing( bool editing );
- static QStringList personalWords();
+ static TQStringList personalWords();
private:
void flushCurrentWord();
@@ -91,24 +91,24 @@ private:
/**
* \brief Dictionary sensitive text highlighter
*/
-class KDEUI_EXPORT KDictSpellingHighlighter : public QObject, public KSpellingHighlighter
+class KDEUI_EXPORT KDictSpellingHighlighter : public TQObject, public KSpellingHighlighter
{
Q_OBJECT
public:
- KDictSpellingHighlighter( QTextEdit *textEdit,
+ KDictSpellingHighlighter( TQTextEdit *textEdit,
bool spellCheckingActive = true,
bool autoEnable = true,
- const QColor& spellColor = red,
+ const TQColor& spellColor = red,
bool colorQuoting = false,
- const QColor& QuoteColor0 = black,
- const QColor& QuoteColor1 = QColor( 0x00, 0x80, 0x00 ),
- const QColor& QuoteColor2 = QColor( 0x00, 0x70, 0x00 ),
- const QColor& QuoteColor3 = QColor( 0x00, 0x60, 0x00 ),
+ const TQColor& QuoteColor0 = black,
+ const TQColor& QuoteColor1 = TQColor( 0x00, 0x80, 0x00 ),
+ const TQColor& QuoteColor2 = TQColor( 0x00, 0x70, 0x00 ),
+ const TQColor& QuoteColor3 = TQColor( 0x00, 0x60, 0x00 ),
KSpellConfig *spellConfig = 0 );
~KDictSpellingHighlighter();
- virtual bool isMisspelled( const QString &word );
+ virtual bool isMisspelled( const TQString &word );
static void dictionaryChanged();
void restartBackgroundSpellCheck();
@@ -158,17 +158,17 @@ public:
bool automatic() const;
signals:
- void activeChanged(const QString &);
- void newSuggestions(const QString& originalword, const QStringList& suggestions,
+ void activeChanged(const TQString &);
+ void newSuggestions(const TQString& originalword, const TQStringList& suggestions,
unsigned int pos);
protected:
- QString spellKey();
- bool eventFilter(QObject *o, QEvent *e);
+ TQString spellKey();
+ bool eventFilter(TQObject *o, TQEvent *e);
protected slots:
- void slotMisspelling( const QString &originalWord, const QStringList &suggestions, unsigned int pos );
- void slotCorrected( const QString &originalWord, const QString &, unsigned int );
+ void slotMisspelling( const TQString &originalWord, const TQStringList &suggestions, unsigned int pos );
+ void slotCorrected( const TQString &originalWord, const TQString &, unsigned int );
void slotRehighlight();
void slotDictionaryChanged();
void slotSpellReady( KSpell *spell );
diff --git a/kdeui/ksystemtray.cpp b/kdeui/ksystemtray.cpp
index 33d7f3506..5742eb174 100644
--- a/kdeui/ksystemtray.cpp
+++ b/kdeui/ksystemtray.cpp
@@ -37,7 +37,7 @@
#include <kiconloader.h>
#include <kconfig.h>
-#include <qapplication.h>
+#include <tqapplication.h>
class KSystemTrayPrivate
{
@@ -56,8 +56,8 @@ public:
bool on_all_desktops; // valid only when the parent widget was hidden
};
-KSystemTray::KSystemTray( QWidget* parent, const char* name )
- : QLabel( parent, name, WType_TopLevel )
+KSystemTray::KSystemTray( TQWidget* parent, const char* name )
+ : TQLabel( parent, name, WType_TopLevel )
{
#ifdef Q_WS_X11
QXEmbed::initialize();
@@ -75,12 +75,12 @@ KSystemTray::KSystemTray( QWidget* parent, const char* name )
menu = new KPopupMenu( this );
menu->insertTitle( kapp->miniIcon(), kapp->caption() );
move( -1000, -1000 );
- KStdAction::quit(this, SLOT(maybeQuit()), d->actionCollection);
+ KStdAction::quit(this, TQT_SLOT(maybeQuit()), d->actionCollection);
if (parentWidget())
{
new KAction(i18n("Minimize"), KShortcut(),
- this, SLOT( minimizeRestoreAction() ),
+ this, TQT_SLOT( minimizeRestoreAction() ),
d->actionCollection, "minimizeRestore");
#ifdef Q_WS_X11
KWin::WindowInfo info = KWin::windowInfo( parentWidget()->winId());
@@ -106,7 +106,7 @@ KSystemTray::~KSystemTray()
}
-void KSystemTray::showEvent( QShowEvent * )
+void KSystemTray::showEvent( TQShowEvent * )
{
if ( !hasQuit ) {
menu->insertSeparator();
@@ -129,9 +129,9 @@ void KSystemTray::showEvent( QShowEvent * )
}
// KDE4 remove
-void KSystemTray::enterEvent( QEvent* e )
+void KSystemTray::enterEvent( TQEvent* e )
{
- QLabel::enterEvent( e );
+ TQLabel::enterEvent( e );
}
KPopupMenu* KSystemTray::contextMenu() const
@@ -140,7 +140,7 @@ KPopupMenu* KSystemTray::contextMenu() const
}
-void KSystemTray::mousePressEvent( QMouseEvent *e )
+void KSystemTray::mousePressEvent( TQMouseEvent *e )
{
if ( !rect().contains( e->pos() ) )
return;
@@ -168,7 +168,7 @@ void KSystemTray::mousePressEvent( QMouseEvent *e )
}
}
-void KSystemTray::mouseReleaseEvent( QMouseEvent * )
+void KSystemTray::mouseReleaseEvent( TQMouseEvent * )
{
}
@@ -190,12 +190,12 @@ void KSystemTray::minimizeRestoreAction()
void KSystemTray::maybeQuit()
{
- QString query = i18n("<qt>Are you sure you want to quit <b>%1</b>?</qt>")
+ TQString query = i18n("<qt>Are you sure you want to quit <b>%1</b>?</qt>")
.arg(kapp->caption());
if (KMessageBox::warningContinueCancel(this, query,
i18n("Confirm Quit From System Tray"),
KStdGuiItem::quit(),
- QString("systemtrayquit%1")
+ TQString("systemtrayquit%1")
.arg(kapp->caption())) !=
KMessageBox::Continue)
{
@@ -237,7 +237,7 @@ void KSystemTray::setInactive()
// (just like taskbar); otherwise hide it
void KSystemTray::activateOrHide()
{
- QWidget *pw = parentWidget();
+ TQWidget *pw = parentWidget();
if ( !pw )
return;
@@ -255,7 +255,7 @@ void KSystemTray::activateOrHide()
else
{
KWinModule module;
- for( QValueList< WId >::ConstIterator it = module.stackingOrder().fromLast();
+ for( TQValueList< WId >::ConstIterator it = module.stackingOrder().fromLast();
it != module.stackingOrder().end() && (*it) != pw->winId();
--it )
{
@@ -283,7 +283,7 @@ void KSystemTray::activateOrHide()
void KSystemTray::minimizeRestore( bool restore )
{
- QWidget* pw = parentWidget();
+ TQWidget* pw = parentWidget();
if( !pw )
return;
#ifdef Q_WS_X11
@@ -310,7 +310,7 @@ KActionCollection* KSystemTray::actionCollection()
return d->actionCollection;
}
-QPixmap KSystemTray::loadIcon( const QString &icon, KInstance *instance )
+TQPixmap KSystemTray::loadIcon( const TQString &icon, KInstance *instance )
{
KConfig *appCfg = kapp->config();
KConfigGroupSaver configSaver(appCfg, "System Tray");
@@ -318,22 +318,22 @@ QPixmap KSystemTray::loadIcon( const QString &icon, KInstance *instance )
return instance->iconLoader()->loadIcon( icon, KIcon::Panel, iconWidth );
}
-QPixmap KSystemTray::loadSizedIcon( const QString &icon, int iconWidth, KInstance *instance )
+TQPixmap KSystemTray::loadSizedIcon( const TQString &icon, int iconWidth, KInstance *instance )
{
return instance->iconLoader()->loadIcon( icon, KIcon::Panel, iconWidth );
}
-void KSystemTray::setPixmap( const QPixmap& p )
+void KSystemTray::setPixmap( const TQPixmap& p )
{
- QLabel::setPixmap( p );
+ TQLabel::setPixmap( p );
#ifdef Q_WS_X11
- KWin::setIcons( winId(), p, QPixmap());
+ KWin::setIcons( winId(), p, TQPixmap());
#endif
}
-void KSystemTray::setCaption( const QString& s )
+void KSystemTray::setCaption( const TQString& s )
{
- QLabel::setCaption( s );
+ TQLabel::setCaption( s );
}
void KSystemTray::virtual_hook( int, void* )
diff --git a/kdeui/ksystemtray.h b/kdeui/ksystemtray.h
index b0dab69b6..861de3f3b 100644
--- a/kdeui/ksystemtray.h
+++ b/kdeui/ksystemtray.h
@@ -19,7 +19,7 @@
#define KSYSTEMTRAY_H
#include <kglobal.h>
-#include <qlabel.h>
+#include <tqlabel.h>
class KActionCollection;
class KPopupMenu;
@@ -78,7 +78,7 @@ public:
* when the user clicks on the trray window with the left mouse
* button.
**/
- KSystemTray( QWidget* parent = 0, const char* name = 0 );
+ KSystemTray( TQWidget* parent = 0, const char* name = 0 );
/*
Destructor
@@ -101,13 +101,13 @@ public:
/**
* Changes the tray's icon.
*/
- virtual void setPixmap( const QPixmap& icon );
+ virtual void setPixmap( const TQPixmap& icon );
/**
* Changes the tray's text description (which can be seen e.g. in the systray
* configuration dialog). The default value is KAboutData::programName().
*/
- virtual void setCaption( const QString& title );
+ virtual void setCaption( const TQString& title );
/**
* Loads an icon @p icon using the icon loader class of the given instance @p instance.
@@ -117,7 +117,7 @@ public:
*
* @since 3.2
*/
- static QPixmap loadIcon( const QString &icon, KInstance *instance=KGlobal::instance() );
+ static TQPixmap loadIcon( const TQString &icon, KInstance *instance=KGlobal::instance() );
/**
* Loads an icon @p icon using the icon loader class of the given instance @p instance.
@@ -128,7 +128,7 @@ public:
*
* @since 3.5.12
*/
- static QPixmap loadSizedIcon( const QString &icon, int iconWidth, KInstance *instance=KGlobal::instance() );
+ static TQPixmap loadSizedIcon( const TQString &icon, int iconWidth, KInstance *instance=KGlobal::instance() );
signals:
/**
@@ -167,7 +167,7 @@ protected:
Feel free to reimplement this if you need something special.
*/
- void mousePressEvent( QMouseEvent * );
+ void mousePressEvent( TQMouseEvent * );
/**
Reimplemented to provide the standard show/raise behavior
@@ -175,7 +175,7 @@ protected:
Feel free to reimplement this if you need something special.
*/
- void mouseReleaseEvent( QMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
@@ -188,12 +188,12 @@ protected:
/**
Reimplemented for internal reasons.
*/
- void showEvent( QShowEvent * );
+ void showEvent( TQShowEvent * );
/**
Reimplemented for internal reasons.
*/
- void enterEvent( QEvent* );
+ void enterEvent( TQEvent* );
private slots:
void minimizeRestoreAction();
diff --git a/kdeui/ktabbar.cpp b/kdeui/ktabbar.cpp
index fcac5a975..e95eb54ca 100644
--- a/kdeui/ktabbar.cpp
+++ b/kdeui/ktabbar.cpp
@@ -18,13 +18,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
#include <kglobalsettings.h>
#include <kiconloader.h>
@@ -33,8 +33,8 @@
#include "ktabbar.h"
#include "ktabwidget.h"
-KTabBar::KTabBar( QWidget *parent, const char *name )
- : QTabBar( parent, name ), mReorderStartTab( -1 ), mReorderPreviousTab( -1 ),
+KTabBar::KTabBar( TQWidget *parent, const char *name )
+ : TQTabBar( parent, name ), mReorderStartTab( -1 ), mReorderPreviousTab( -1 ),
mHoverCloseButtonTab( 0 ), mDragSwitchTab( 0 ), mHoverCloseButton( 0 ),
mHoverCloseButtonEnabled( false ), mHoverCloseButtonDelayed( true ),
mTabReorderingEnabled( false ), mTabCloseActivatePrevious( false )
@@ -42,13 +42,13 @@ KTabBar::KTabBar( QWidget *parent, const char *name )
setAcceptDrops( true );
setMouseTracking( true );
- mEnableCloseButtonTimer = new QTimer( this );
- connect( mEnableCloseButtonTimer, SIGNAL( timeout() ), SLOT( enableCloseButton() ) );
+ mEnableCloseButtonTimer = new TQTimer( this );
+ connect( mEnableCloseButtonTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( enableCloseButton() ) );
- mActivateDragSwitchTabTimer = new QTimer( this );
- connect( mActivateDragSwitchTabTimer, SIGNAL( timeout() ), SLOT( activateDragSwitchTab() ) );
+ mActivateDragSwitchTabTimer = new TQTimer( this );
+ connect( mActivateDragSwitchTabTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( activateDragSwitchTab() ) );
- connect(this, SIGNAL(layoutChanged()), SLOT(onLayoutChange()));
+ connect(this, TQT_SIGNAL(layoutChanged()), TQT_SLOT(onLayoutChange()));
}
KTabBar::~KTabBar()
@@ -59,13 +59,13 @@ KTabBar::~KTabBar()
void KTabBar::setTabEnabled( int id, bool enabled )
{
- QTab * t = tab( id );
+ TQTab * t = tab( id );
if ( t ) {
if ( t->isEnabled() != enabled ) {
t->setEnabled( enabled );
- QRect r( t->rect() );
+ TQRect r( t->rect() );
if ( !enabled && id == currentTab() && count()>1 ) {
- QPtrList<QTab> *tablist = tabList();
+ TQPtrList<TQTab> *tablist = tabList();
if ( mTabCloseActivatePrevious )
t = tablist->at( count()-2 );
else {
@@ -85,46 +85,46 @@ void KTabBar::setTabEnabled( int id, bool enabled )
}
}
-void KTabBar::mouseDoubleClickEvent( QMouseEvent *e )
+void KTabBar::mouseDoubleClickEvent( TQMouseEvent *e )
{
if( e->button() != LeftButton )
return;
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
emit( mouseDoubleClick( indexOf( tab->identifier() ) ) );
return;
}
- QTabBar::mouseDoubleClickEvent( e );
+ TQTabBar::mouseDoubleClickEvent( e );
}
-void KTabBar::mousePressEvent( QMouseEvent *e )
+void KTabBar::mousePressEvent( TQMouseEvent *e )
{
if( e->button() == LeftButton ) {
mEnableCloseButtonTimer->stop();
mDragStart = e->pos();
}
else if( e->button() == RightButton ) {
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
emit( contextMenu( indexOf( tab->identifier() ), mapToGlobal( e->pos() ) ) );
return;
}
}
- QTabBar::mousePressEvent( e );
+ TQTabBar::mousePressEvent( e );
}
-void KTabBar::mouseMoveEvent( QMouseEvent *e )
+void KTabBar::mouseMoveEvent( TQMouseEvent *e )
{
if ( e->state() == LeftButton ) {
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if ( mDragSwitchTab && tab != mDragSwitchTab ) {
mActivateDragSwitchTabTimer->stop();
mDragSwitchTab = 0;
}
int delay = KGlobalSettings::dndEventDelay();
- QPoint newPos = e->pos();
+ TQPoint newPos = e->pos();
if( newPos.x() > mDragStart.x()+delay || newPos.x() < mDragStart.x()-delay ||
newPos.y() > mDragStart.y()+delay || newPos.y() < mDragStart.y()-delay )
{
@@ -137,11 +137,11 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
else if ( e->state() == MidButton ) {
if (mReorderStartTab==-1) {
int delay = KGlobalSettings::dndEventDelay();
- QPoint newPos = e->pos();
+ TQPoint newPos = e->pos();
if( newPos.x() > mDragStart.x()+delay || newPos.x() < mDragStart.x()-delay ||
newPos.y() > mDragStart.y()+delay || newPos.y() < mDragStart.y()-delay )
{
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab && mTabReorderingEnabled ) {
mReorderStartTab = indexOf( tab->identifier() );
grabMouse( sizeAllCursor );
@@ -150,7 +150,7 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
}
}
else {
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
int reorderStopTab = indexOf( tab->identifier() );
if ( mReorderStartTab!=reorderStopTab && mReorderPreviousTab!=reorderStopTab ) {
@@ -164,16 +164,16 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
}
if ( mHoverCloseButtonEnabled && mReorderStartTab==-1) {
- QTab *t = selectTab( e->pos() );
+ TQTab *t = selectTab( e->pos() );
if( t && t->iconSet() && t->isEnabled() ) {
- QPixmap pixmap = t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal );
- QRect rect( 0, 0, pixmap.width() + 4, pixmap.height() +4);
+ TQPixmap pixmap = t->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal );
+ TQRect rect( 0, 0, pixmap.width() + 4, pixmap.height() +4);
int xoff = 0, yoff = 0;
// The additional offsets were found by try and error, TODO: find the rational behind them
if ( t == tab( currentTab() ) ) {
- xoff = style().pixelMetric( QStyle::PM_TabBarTabShiftHorizontal, this ) + 3;
- yoff = style().pixelMetric( QStyle::PM_TabBarTabShiftVertical, this ) - 4;
+ xoff = style().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ) + 3;
+ yoff = style().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ) - 4;
}
else {
xoff = 7;
@@ -190,18 +190,18 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
mHoverCloseButton = 0;
}
- mHoverCloseButton = new QPushButton( this );
+ mHoverCloseButton = new TQPushButton( this );
mHoverCloseButton->setIconSet( KGlobal::iconLoader()->loadIconSet("fileclose", KIcon::Toolbar, KIcon::SizeSmall) );
mHoverCloseButton->setGeometry( rect );
- QToolTip::add(mHoverCloseButton,i18n("Close this tab"));
+ TQToolTip::add(mHoverCloseButton,i18n("Close this tab"));
mHoverCloseButton->setFlat(true);
mHoverCloseButton->show();
if ( mHoverCloseButtonDelayed ) {
mHoverCloseButton->setEnabled(false);
- mEnableCloseButtonTimer->start( QApplication::doubleClickInterval(), true );
+ mEnableCloseButtonTimer->start( TQApplication::doubleClickInterval(), true );
}
mHoverCloseButtonTab = t;
- connect( mHoverCloseButton, SIGNAL( clicked() ), SLOT( closeButtonClicked() ) );
+ connect( mHoverCloseButton, TQT_SIGNAL( clicked() ), TQT_SLOT( closeButtonClicked() ) );
return;
}
}
@@ -212,7 +212,7 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
}
}
- QTabBar::mouseMoveEvent( e );
+ TQTabBar::mouseMoveEvent( e );
}
void KTabBar::enableCloseButton()
@@ -222,17 +222,17 @@ void KTabBar::enableCloseButton()
void KTabBar::activateDragSwitchTab()
{
- QTab *tab = selectTab( mapFromGlobal( QCursor::pos() ) );
+ TQTab *tab = selectTab( mapFromGlobal( TQCursor::pos() ) );
if ( tab && mDragSwitchTab == tab )
setCurrentTab( mDragSwitchTab );
mDragSwitchTab = 0;
}
-void KTabBar::mouseReleaseEvent( QMouseEvent *e )
+void KTabBar::mouseReleaseEvent( TQMouseEvent *e )
{
if( e->button() == MidButton ) {
if ( mReorderStartTab==-1 ) {
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
emit( mouseMiddleClick( indexOf( tab->identifier() ) ) );
return;
@@ -245,42 +245,42 @@ void KTabBar::mouseReleaseEvent( QMouseEvent *e )
mReorderPreviousTab=-1;
}
}
- QTabBar::mouseReleaseEvent( e );
+ TQTabBar::mouseReleaseEvent( e );
}
-void KTabBar::dragMoveEvent( QDragMoveEvent *e )
+void KTabBar::dragMoveEvent( TQDragMoveEvent *e )
{
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
bool accept = false;
// The receivers of the testCanDecode() signal has to adjust
// 'accept' accordingly.
emit testCanDecode( e, accept);
- if ( accept && tab != QTabBar::tab( currentTab() ) ) {
+ if ( accept && tab != TQTabBar::tab( currentTab() ) ) {
mDragSwitchTab = tab;
- mActivateDragSwitchTabTimer->start( QApplication::doubleClickInterval()*2, true );
+ mActivateDragSwitchTabTimer->start( TQApplication::doubleClickInterval()*2, true );
}
e->accept( accept );
return;
}
e->accept( false );
- QTabBar::dragMoveEvent( e );
+ TQTabBar::dragMoveEvent( e );
}
-void KTabBar::dropEvent( QDropEvent *e )
+void KTabBar::dropEvent( TQDropEvent *e )
{
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
mActivateDragSwitchTabTimer->stop();
mDragSwitchTab = 0;
emit( receivedDropEvent( indexOf( tab->identifier() ) , e ) );
return;
}
- QTabBar::dropEvent( e );
+ TQTabBar::dropEvent( e );
}
#ifndef QT_NO_WHEELEVENT
-void KTabBar::wheelEvent( QWheelEvent *e )
+void KTabBar::wheelEvent( TQWheelEvent *e )
{
if ( e->orientation() == Horizontal )
return;
@@ -289,16 +289,16 @@ void KTabBar::wheelEvent( QWheelEvent *e )
}
#endif
-void KTabBar::setTabColor( int id, const QColor& color )
+void KTabBar::setTabColor( int id, const TQColor& color )
{
- QTab *t = tab( id );
+ TQTab *t = tab( id );
if ( t ) {
mTabColors.insert( id, color );
repaint( t->rect(), false );
}
}
-const QColor &KTabBar::tabColor( int id ) const
+const TQColor &KTabBar::tabColor( int id ) const
{
if ( mTabColors.contains( id ) )
return mTabColors[id];
@@ -306,43 +306,43 @@ const QColor &KTabBar::tabColor( int id ) const
return colorGroup().foreground();
}
-int KTabBar::insertTab( QTab *t, int index )
+int KTabBar::insertTab( TQTab *t, int index )
{
- int res = QTabBar::insertTab( t, index );
+ int res = TQTabBar::insertTab( t, index );
if ( mTabCloseActivatePrevious && count() > 2 ) {
- QPtrList<QTab> *tablist = tabList();
+ TQPtrList<TQTab> *tablist = tabList();
tablist->insert( count()-2, tablist->take( tablist->findRef( t ) ) );
}
return res;
}
-void KTabBar::removeTab( QTab *t )
+void KTabBar::removeTab( TQTab *t )
{
mTabColors.remove( t->identifier() );
- QTabBar::removeTab( t );
+ TQTabBar::removeTab( t );
}
-void KTabBar::paintLabel( QPainter *p, const QRect& br,
- QTab *t, bool has_focus ) const
+void KTabBar::paintLabel( TQPainter *p, const TQRect& br,
+ TQTab *t, bool has_focus ) const
{
- QRect r = br;
+ TQRect r = br;
bool selected = currentTab() == t->identifier();
if ( t->iconSet() ) {
// the tab has an iconset, draw it in the right mode
- QIconSet::Mode mode = ( t->isEnabled() && isEnabled() )
- ? QIconSet::Normal : QIconSet::Disabled;
- if ( mode == QIconSet::Normal && has_focus )
- mode = QIconSet::Active;
- QPixmap pixmap = t->iconSet()->pixmap( QIconSet::Small, mode );
+ TQIconSet::Mode mode = ( t->isEnabled() && isEnabled() )
+ ? TQIconSet::Normal : TQIconSet::Disabled;
+ if ( mode == TQIconSet::Normal && has_focus )
+ mode = TQIconSet::Active;
+ TQPixmap pixmap = t->iconSet()->pixmap( TQIconSet::Small, mode );
int pixw = pixmap.width();
int pixh = pixmap.height();
r.setLeft( r.left() + pixw + 4 );
r.setRight( r.right() + 2 );
- int inactiveXShift = style().pixelMetric( QStyle::PM_TabBarTabShiftHorizontal, this );
- int inactiveYShift = style().pixelMetric( QStyle::PM_TabBarTabShiftVertical, this );
+ int inactiveXShift = style().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this );
+ int inactiveYShift = style().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this );
int right = t->text().isEmpty() ? br.right() - pixw : br.left() + 2;
@@ -351,20 +351,20 @@ void KTabBar::paintLabel( QPainter *p, const QRect& br,
pixmap );
}
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if ( isEnabled() && t->isEnabled() )
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if ( has_focus )
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_HasFocus;
- QColorGroup cg( colorGroup() );
+ TQColorGroup cg( colorGroup() );
if ( mTabColors.contains( t->identifier() ) )
- cg.setColor( QColorGroup::Foreground, mTabColors[t->identifier()] );
+ cg.setColor( TQColorGroup::Foreground, mTabColors[t->identifier()] );
- style().drawControl( QStyle::CE_TabBarLabel, p, this, r,
+ style().drawControl( TQStyle::CE_TabBarLabel, p, this, r,
t->isEnabled() ? cg : palette().disabled(),
- flags, QStyleOption(t) );
+ flags, TQStyleOption(t) );
}
bool KTabBar::isTabReorderingEnabled() const
diff --git a/kdeui/ktabbar.h b/kdeui/ktabbar.h
index 2ea300db6..c8f81169e 100644
--- a/kdeui/ktabbar.h
+++ b/kdeui/ktabbar.h
@@ -21,7 +21,7 @@
#ifndef KTABBAR_H
#define KTABBAR_H
-#include <qtabbar.h>
+#include <tqtabbar.h>
#include <kdelibs_export.h>
@@ -37,16 +37,16 @@ class KDEUI_EXPORT KTabBar: public QTabBar
Q_OBJECT
public:
- KTabBar( QWidget* parent=0, const char* name=0 );
+ KTabBar( TQWidget* parent=0, const char* name=0 );
virtual ~KTabBar();
virtual void setTabEnabled( int, bool );
- const QColor &tabColor( int ) const;
- void setTabColor( int, const QColor& );
+ const TQColor &tabColor( int ) const;
+ void setTabColor( int, const TQColor& );
- virtual int insertTab( QTab *, int index = -1 );
- virtual void removeTab( QTab * );
+ virtual int insertTab( TQTab *, int index = -1 );
+ virtual void removeTab( TQTab * );
void setTabReorderingEnabled( bool enable );
bool isTabReorderingEnabled() const;
@@ -61,12 +61,12 @@ public:
bool tabCloseActivatePrevious() const;
signals:
- void contextMenu( int, const QPoint & );
+ void contextMenu( int, const TQPoint & );
void mouseDoubleClick( int );
void mouseMiddleClick( int );
void initiateDrag( int );
- void testCanDecode(const QDragMoveEvent *e, bool &accept /* result */);
- void receivedDropEvent( int, QDropEvent * );
+ void testCanDecode(const TQDragMoveEvent *e, bool &accept /* result */);
+ void receivedDropEvent( int, TQDropEvent * );
void moveTab( int, int );
void closeRequest( int );
#ifndef QT_NO_WHEELEVENT
@@ -74,18 +74,18 @@ signals:
#endif
protected:
- virtual void mouseDoubleClickEvent( QMouseEvent *e );
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e );
- virtual void mouseReleaseEvent( QMouseEvent *e );
+ virtual void mouseDoubleClickEvent( TQMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
#ifndef QT_NO_WHEELEVENT
- virtual void wheelEvent( QWheelEvent *e );
+ virtual void wheelEvent( TQWheelEvent *e );
#endif
- virtual void dragMoveEvent( QDragMoveEvent *e );
- virtual void dropEvent( QDropEvent *e );
+ virtual void dragMoveEvent( TQDragMoveEvent *e );
+ virtual void dropEvent( TQDropEvent *e );
- virtual void paintLabel( QPainter*, const QRect&, QTab*, bool ) const;
+ virtual void paintLabel( TQPainter*, const TQRect&, TQTab*, bool ) const;
protected slots:
virtual void closeButtonClicked();
@@ -94,13 +94,13 @@ protected slots:
virtual void activateDragSwitchTab();
private:
- QPoint mDragStart;
+ TQPoint mDragStart;
int mReorderStartTab;
int mReorderPreviousTab;
- QMap<int, QColor> mTabColors;
- QTab *mHoverCloseButtonTab, *mDragSwitchTab;
- QPushButton *mHoverCloseButton;
- QTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer;
+ TQMap<int, TQColor> mTabColors;
+ TQTab *mHoverCloseButtonTab, *mDragSwitchTab;
+ TQPushButton *mHoverCloseButton;
+ TQTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer;
bool mHoverCloseButtonEnabled;
bool mHoverCloseButtonDelayed;
diff --git a/kdeui/ktabctl.cpp b/kdeui/ktabctl.cpp
index 190dc077e..a4b3c8ac8 100644
--- a/kdeui/ktabctl.cpp
+++ b/kdeui/ktabctl.cpp
@@ -21,21 +21,21 @@
* KTabCtl provides a universal tab control. It is in no ways limited to dialogs and
* can be used for whatever you want. It has no buttons or any other stuff.
*
- * However, this is based on the original QTabDialog.
+ * However, this is based on the original TQTabDialog.
*/
-#include <qtabbar.h>
-#include <qpushbutton.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqtabbar.h>
+#include <tqpushbutton.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include "ktabctl.h"
-KTabCtl::KTabCtl(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KTabCtl::KTabCtl(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- tabs = new QTabBar(this, "_tabbar");
- connect(tabs, SIGNAL(selected(int)), this, SLOT(showTab(int)));
+ tabs = new TQTabBar(this, "_tabbar");
+ connect(tabs, TQT_SIGNAL(selected(int)), this, TQT_SLOT(showTab(int)));
tabs->move(2, 1);
blBorder = true;
@@ -47,35 +47,35 @@ KTabCtl::~KTabCtl()
delete tabs;
}
-void KTabCtl::resizeEvent(QResizeEvent *)
+void KTabCtl::resizeEvent(TQResizeEvent *)
{
int i;
- QRect r = getChildRect();
+ TQRect r = getChildRect();
if (tabs) {
for (i=0; i<(int)pages.size(); i++) {
pages[i]->setGeometry(r);
}
- if( ( tabs->shape() == QTabBar::RoundedBelow ) ||
- ( tabs->shape() == QTabBar::TriangularBelow ) ) {
+ if( ( tabs->shape() == TQTabBar::RoundedBelow ) ||
+ ( tabs->shape() == TQTabBar::TriangularBelow ) ) {
tabs->move( 0, height()-tabs->height()-4 );
}
}
}
-void KTabCtl::setFont(const QFont & font)
+void KTabCtl::setFont(const TQFont & font)
{
- QFont f(font);
- f.setWeight(QFont::Light);
- QWidget::setFont(f);
+ TQFont f(font);
+ f.setWeight(TQFont::Light);
+ TQWidget::setFont(f);
setSizes();
}
-void KTabCtl::setTabFont(const QFont & font)
+void KTabCtl::setTabFont(const TQFont & font)
{
- QFont f(font);
-// f.setWeight(QFont::Light);
+ TQFont f(font);
+// f.setWeight(TQFont::Light);
tabs->setFont(f);
setSizes();
@@ -93,23 +93,23 @@ void KTabCtl::show()
for(i = 0; i < pages.size(); i++)
pages[i]->hide();
- QResizeEvent r(size(), size());
+ TQResizeEvent r(size(), size());
resizeEvent(&r);
- QWidget::show();
+ TQWidget::show();
}
-bool KTabCtl::isTabEnabled(const QString& name)
+bool KTabCtl::isTabEnabled(const TQString& name)
{
unsigned int i;
for(i = 0; i < pages.size(); i++)
- if (QString::fromLatin1(pages[i]->name()) == name)
+ if (TQString::fromLatin1(pages[i]->name()) == name)
return tabs->isTabEnabled(i); /* return the enabled status */
return false; /* tab does not exist */
}
-void KTabCtl::setTabEnabled(const QString& name, bool state)
+void KTabCtl::setTabEnabled(const TQString& name, bool state)
{
unsigned i;
@@ -117,7 +117,7 @@ void KTabCtl::setTabEnabled(const QString& name, bool state)
return;
for (i = 0; i < pages.size(); i++)
- if (QString::fromLatin1(pages[i]->name()) == name)
+ if (TQString::fromLatin1(pages[i]->name()) == name)
tabs->setTabEnabled(i, state);
}
@@ -125,11 +125,11 @@ void KTabCtl::setSizes()
{
unsigned i;
- QSize min(tabs->sizeHint()); /* the minimum required size for the tabbar */
+ TQSize min(tabs->sizeHint()); /* the minimum required size for the tabbar */
tabs->resize(min); /* make sure that the tabbar does not require more space than actually needed. */
- QSize max(QCOORD_MAX,QCOORD_MAX);
+ TQSize max(QCOORD_MAX,QCOORD_MAX);
//int th = min.height(); /* the height of the tabbar itself (without pages and stuff) */
for (i = 0; i < pages.size(); i++) {
@@ -174,7 +174,7 @@ void KTabCtl::setSizes()
*/
if(isVisible()) {
- QResizeEvent r(size(), size());
+ TQResizeEvent r(size(), size());
resizeEvent(&r);
}
}
@@ -184,7 +184,7 @@ void KTabCtl::setBorder( bool state )
blBorder = state;
}
-void KTabCtl::setShape( QTabBar::Shape shape )
+void KTabCtl::setShape( TQTabBar::Shape shape )
{
tabs->setShape( shape );
}
@@ -193,13 +193,13 @@ QSize
KTabCtl::sizeHint() const
{
/* desired size of the tabbar */
- QSize hint(tabs->sizeHint());
+ TQSize hint(tabs->sizeHint());
/* overall desired size of all pages */
- QSize pageHint;
+ TQSize pageHint;
for (unsigned int i = 0; i < pages.size(); i++)
{
- QSize sizeI(pages[i]->sizeHint());
+ TQSize sizeI(pages[i]->sizeHint());
if (sizeI.isValid())
{
@@ -225,7 +225,7 @@ KTabCtl::sizeHint() const
I cannot get the size to be correct unless the total
border size is included: ie 2*2 pixels.
*/
- return (hint + QSize(4,4));
+ return (hint + TQSize(4,4));
}
/*
@@ -235,7 +235,7 @@ KTabCtl::sizeHint() const
return (pageHint);
}
-void KTabCtl::paintEvent(QPaintEvent *)
+void KTabCtl::paintEvent(TQPaintEvent *)
{
if (!tabs)
return;
@@ -243,7 +243,7 @@ void KTabCtl::paintEvent(QPaintEvent *)
if( !blBorder )
return;
- QPainter p;
+ TQPainter p;
p.begin(this);
int y0 = getChildRect().top() - 1;
@@ -271,14 +271,14 @@ void KTabCtl::paintEvent(QPaintEvent *)
* widget (page).
*/
-QRect KTabCtl::getChildRect() const
+TQRect KTabCtl::getChildRect() const
{
- if( ( tabs->shape() == QTabBar::RoundedBelow ) ||
- ( tabs->shape() == QTabBar::TriangularBelow ) ) {
- return QRect(2, 1, width() - 4,
+ if( ( tabs->shape() == TQTabBar::RoundedBelow ) ||
+ ( tabs->shape() == TQTabBar::TriangularBelow ) ) {
+ return TQRect(2, 1, width() - 4,
height() - tabs->height() - 4);
} else {
- return QRect(2, tabs->height() + 1, width() - 4,
+ return TQRect(2, tabs->height() + 1, width() - 4,
height() - tabs->height() - 4);
}
}
@@ -310,15 +310,15 @@ void KTabCtl::showTab(int i)
/*
* add a tab to the control. This tab will manage the given Widget w.
- * in most cases, w will be a QWidget and will only act as parent for the
+ * in most cases, w will be a TQWidget and will only act as parent for the
* actual widgets on this page
- * NOTE: w is not required to be of class QWidget, but expect strange results with
+ * NOTE: w is not required to be of class TQWidget, but expect strange results with
* other types of widgets
*/
-void KTabCtl::addTab(QWidget *w, const QString& name)
+void KTabCtl::addTab(TQWidget *w, const TQString& name)
{
- QTab *t = new QTab();
+ TQTab *t = new TQTab();
t->setText( name );
t->setEnabled( true );
int id = tabs->addTab(t); /* add the tab itself to the tabbar */
diff --git a/kdeui/ktabctl.h b/kdeui/ktabctl.h
index c8cb3cf1b..9c390351f 100644
--- a/kdeui/ktabctl.h
+++ b/kdeui/ktabctl.h
@@ -23,17 +23,17 @@
#ifndef KTABCTL_H
#define KTABCTL_H
-#include <qwidget.h>
-#include <qtabbar.h>
-#include <qmemarray.h>
+#include <tqwidget.h>
+#include <tqtabbar.h>
+#include <tqmemarray.h>
#include <kdelibs_export.h>
/**
* Tabbed dialog with extended features.
- * KTabCtl is very similar to QTabDialog, with the following differences:
+ * KTabCtl is very similar to TQTabDialog, with the following differences:
*
- * @li To avoid confusion, the API is almost identical with QTabDialog.
+ * @li To avoid confusion, the API is almost identical with TQTabDialog.
* @li Does not create any buttons, therefore KTabCtl is not limited
* to dialog boxes. You can use it whereever you want.
* @li emits the signal tabSelected(int pagenumber) when the user
@@ -50,23 +50,23 @@ class KDEUI_EXPORT KTabCtl : public QWidget
Q_OBJECT
public:
- KTabCtl(QWidget *parent = 0, const char *name = 0);
+ KTabCtl(TQWidget *parent = 0, const char *name = 0);
~KTabCtl();
void show();
- void setFont(const QFont & font);
- void setTabFont( const QFont &font );
+ void setFont(const TQFont & font);
+ void setTabFont( const TQFont &font );
- void addTab(QWidget *, const QString&);
- bool isTabEnabled(const QString& );
- void setTabEnabled(const QString&, bool);
+ void addTab(TQWidget *, const TQString&);
+ bool isTabEnabled(const TQString& );
+ void setTabEnabled(const TQString&, bool);
void setBorder(bool);
- void setShape( QTabBar::Shape shape );
- virtual QSize sizeHint() const;
+ void setShape( TQTabBar::Shape shape );
+ virtual TQSize sizeHint() const;
protected:
- void paintEvent(QPaintEvent *);
- void resizeEvent(QResizeEvent *);
+ void paintEvent(TQPaintEvent *);
+ void resizeEvent(TQResizeEvent *);
signals:
void tabSelected(int);
@@ -76,10 +76,10 @@ protected slots:
protected:
void setSizes();
- QRect getChildRect() const;
+ TQRect getChildRect() const;
- QTabBar * tabs;
- QMemArray<QWidget *> pages;
+ TQTabBar * tabs;
+ TQMemArray<TQWidget *> pages;
int bh;
bool blBorder;
protected:
diff --git a/kdeui/ktabwidget.cpp b/kdeui/ktabwidget.cpp
index a012ea96e..5a431ecd2 100644
--- a/kdeui/ktabwidget.cpp
+++ b/kdeui/ktabwidget.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qstyle.h>
-#include <qstylesheet.h>
+#include <tqapplication.h>
+#include <tqstyle.h>
+#include <tqstylesheet.h>
#include <kconfig.h>
#include <kiconloader.h>
@@ -38,7 +38,7 @@ public:
//holds the full names of the tab, otherwise all we
//know about is the shortened name
- QStringList m_tabNames;
+ TQStringList m_tabNames;
KTabWidgetPrivate() {
m_automaticResizeTabs = false;
@@ -49,8 +49,8 @@ public:
}
};
-KTabWidget::KTabWidget( QWidget *parent, const char *name, WFlags f )
- : QTabWidget( parent, name, f )
+KTabWidget::KTabWidget( TQWidget *parent, const char *name, WFlags f )
+ : TQTabWidget( parent, name, f )
{
d = new KTabWidgetPrivate;
setTabBar( new KTabBar(this, "tabbar") );
@@ -58,16 +58,16 @@ KTabWidget::KTabWidget( QWidget *parent, const char *name, WFlags f )
setHoverCloseButtonDelayed(false);
- connect(tabBar(), SIGNAL(contextMenu( int, const QPoint & )), SLOT(contextMenu( int, const QPoint & )));
- connect(tabBar(), SIGNAL(mouseDoubleClick( int )), SLOT(mouseDoubleClick( int )));
- connect(tabBar(), SIGNAL(mouseMiddleClick( int )), SLOT(mouseMiddleClick( int )));
- connect(tabBar(), SIGNAL(initiateDrag( int )), SLOT(initiateDrag( int )));
- connect(tabBar(), SIGNAL(testCanDecode(const QDragMoveEvent *, bool & )), SIGNAL(testCanDecode(const QDragMoveEvent *, bool & )));
- connect(tabBar(), SIGNAL(receivedDropEvent( int, QDropEvent * )), SLOT(receivedDropEvent( int, QDropEvent * )));
- connect(tabBar(), SIGNAL(moveTab( int, int )), SLOT(moveTab( int, int )));
- connect(tabBar(), SIGNAL(closeRequest( int )), SLOT(closeRequest( int )));
+ connect(tabBar(), TQT_SIGNAL(contextMenu( int, const TQPoint & )), TQT_SLOT(contextMenu( int, const TQPoint & )));
+ connect(tabBar(), TQT_SIGNAL(mouseDoubleClick( int )), TQT_SLOT(mouseDoubleClick( int )));
+ connect(tabBar(), TQT_SIGNAL(mouseMiddleClick( int )), TQT_SLOT(mouseMiddleClick( int )));
+ connect(tabBar(), TQT_SIGNAL(initiateDrag( int )), TQT_SLOT(initiateDrag( int )));
+ connect(tabBar(), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )));
+ connect(tabBar(), TQT_SIGNAL(receivedDropEvent( int, TQDropEvent * )), TQT_SLOT(receivedDropEvent( int, TQDropEvent * )));
+ connect(tabBar(), TQT_SIGNAL(moveTab( int, int )), TQT_SLOT(moveTab( int, int )));
+ connect(tabBar(), TQT_SIGNAL(closeRequest( int )), TQT_SLOT(closeRequest( int )));
#ifndef QT_NO_WHEELEVENT
- connect(tabBar(), SIGNAL(wheelDelta( int )), SLOT(wheelDelta( int )));
+ connect(tabBar(), TQT_SIGNAL(wheelDelta( int )), TQT_SLOT(wheelDelta( int )));
#endif
}
@@ -76,19 +76,19 @@ KTabWidget::~KTabWidget()
delete d;
}
-void KTabWidget::insertTab( QWidget *child, const QString &label, int index )
+void KTabWidget::insertTab( TQWidget *child, const TQString &label, int index )
{
- QTabWidget::insertTab( child, label, index );
+ TQTabWidget::insertTab( child, label, index );
}
-void KTabWidget::insertTab( QWidget *child, const QIconSet& iconset, const QString &label, int index )
+void KTabWidget::insertTab( TQWidget *child, const TQIconSet& iconset, const TQString &label, int index )
{
- QTabWidget::insertTab( child, iconset, label, index );
+ TQTabWidget::insertTab( child, iconset, label, index );
}
-void KTabWidget::insertTab( QWidget *child, QTab *tab, int index )
+void KTabWidget::insertTab( TQWidget *child, TQTab *tab, int index )
{
- QTabWidget::insertTab( child, tab, index);
+ TQTabWidget::insertTab( child, tab, index);
if ( d->m_automaticResizeTabs ) {
if ( index < 0 || index >= count() ) {
d->m_tabNames.append( tab->text() );
@@ -103,8 +103,8 @@ void KTabWidget::insertTab( QWidget *child, QTab *tab, int index )
void KTabWidget::setTabBarHidden( bool hide )
{
- QWidget *rightcorner = this->cornerWidget( TopRight );
- QWidget *leftcorner = this->cornerWidget( TopLeft );
+ TQWidget *rightcorner = this->cornerWidget( TopRight );
+ TQWidget *leftcorner = this->cornerWidget( TopLeft );
if ( hide ) {
if ( leftcorner ) leftcorner->hide();
@@ -122,21 +122,21 @@ bool KTabWidget::isTabBarHidden() const
return !( tabBar()->isVisible() );
}
-void KTabWidget::setTabColor( QWidget *w, const QColor& color )
+void KTabWidget::setTabColor( TQWidget *w, const TQColor& color )
{
- QTab *t = tabBar()->tabAt( indexOf( w ) );
+ TQTab *t = tabBar()->tabAt( indexOf( w ) );
if (t) {
static_cast<KTabBar*>(tabBar())->setTabColor( t->identifier(), color );
}
}
-QColor KTabWidget::tabColor( QWidget *w ) const
+TQColor KTabWidget::tabColor( TQWidget *w ) const
{
- QTab *t = tabBar()->tabAt( indexOf( w ) );
+ TQTab *t = tabBar()->tabAt( indexOf( w ) );
if (t) {
return static_cast<KTabBar*>(tabBar())->tabColor( t->identifier() );
} else {
- return QColor();
+ return TQColor();
}
}
@@ -163,30 +163,30 @@ bool KTabWidget::tabCloseActivatePrevious() const
unsigned int KTabWidget::tabBarWidthForMaxChars( uint maxLength )
{
int hframe, overlap;
- hframe = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabHSpace, tabBar() );
- overlap = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabOverlap, tabBar() );
+ hframe = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabHSpace, tabBar() );
+ overlap = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabOverlap, tabBar() );
- QFontMetrics fm = tabBar()->fontMetrics();
+ TQFontMetrics fm = tabBar()->fontMetrics();
int x = 0;
for( int i=0; i < count(); ++i ) {
- QString newTitle = d->m_tabNames[ i ];
+ TQString newTitle = d->m_tabNames[ i ];
newTitle = KStringHandler::rsqueeze( newTitle, maxLength ).leftJustify( d->m_minLength, ' ' );
- QTab* tab = tabBar()->tabAt( i );
+ TQTab* tab = tabBar()->tabAt( i );
int lw = fm.width( newTitle );
int iw = 0;
if ( tab->iconSet() )
- iw = tab->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4;
- x += ( tabBar()->style().sizeFromContents( QStyle::CT_TabBarTab, this,
- QSize( QMAX( lw + hframe + iw, QApplication::globalStrut().width() ), 0 ),
- QStyleOption( tab ) ) ).width();
+ iw = tab->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4;
+ x += ( tabBar()->style().sizeFromContents( TQStyle::CT_TabBarTab, this,
+ TQSize( QMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ),
+ TQStyleOption( tab ) ) ).width();
}
return x;
}
-void KTabWidget::changeTab( QWidget *w, const QString &label )
+void KTabWidget::changeTab( TQWidget *w, const TQString &label )
{
- QTabWidget::changeTab( w, label );
+ TQTabWidget::changeTab( w, label );
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index != -1 ) {
@@ -196,9 +196,9 @@ void KTabWidget::changeTab( QWidget *w, const QString &label )
}
}
-void KTabWidget::changeTab( QWidget *w, const QIconSet &iconset, const QString &label )
+void KTabWidget::changeTab( TQWidget *w, const TQIconSet &iconset, const TQString &label )
{
- QTabWidget::changeTab( w, iconset, label );
+ TQTabWidget::changeTab( w, iconset, label );
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index != -1 ) {
@@ -208,34 +208,34 @@ void KTabWidget::changeTab( QWidget *w, const QIconSet &iconset, const QString &
}
}
-QString KTabWidget::label( int index ) const
+TQString KTabWidget::label( int index ) const
{
if ( d->m_automaticResizeTabs ) {
if ( index >= 0 && index < count() )
return d->m_tabNames[ index ];
else
- return QString::null;
+ return TQString::null;
}
else
- return QTabWidget::label( index );
+ return TQTabWidget::label( index );
}
-QString KTabWidget::tabLabel( QWidget * w ) const
+TQString KTabWidget::tabLabel( TQWidget * w ) const
{
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index == -1 )
- return QString::null;
+ return TQString::null;
else
return d->m_tabNames[ index ];
}
else
- return QTabWidget::tabLabel( w );
+ return TQTabWidget::tabLabel( w );
}
-void KTabWidget::setTabLabel( QWidget *w, const QString &l )
+void KTabWidget::setTabLabel( TQWidget *w, const TQString &l )
{
- QTabWidget::setTabLabel( w, l );
+ TQTabWidget::setTabLabel( w, l );
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index != -1 ) {
@@ -281,11 +281,11 @@ void KTabWidget::resizeTabs( int changeTabIndex )
void KTabWidget::updateTab( int index )
{
- QString title = d->m_automaticResizeTabs ? d->m_tabNames[ index ] : QTabWidget::label( index );
+ TQString title = d->m_automaticResizeTabs ? d->m_tabNames[ index ] : TQTabWidget::label( index );
removeTabToolTip( page( index ) );
if ( title.length() > d->m_CurrentMaxLength ) {
- if ( QStyleSheet::mightBeRichText( title ) )
- setTabToolTip( page( index ), QStyleSheet::escape(title) );
+ if ( TQStyleSheet::mightBeRichText( title ) )
+ setTabToolTip( page( index ), TQStyleSheet::escape(title) );
else
setTabToolTip( page( index ), title );
}
@@ -293,11 +293,11 @@ void KTabWidget::updateTab( int index )
title = KStringHandler::rsqueeze( title, d->m_CurrentMaxLength ).leftJustify( d->m_minLength, ' ' );
title.replace( '&', "&&" );
- if ( QTabWidget::label( index ) != title )
- QTabWidget::setTabLabel( page( index ), title );
+ if ( TQTabWidget::label( index ) != title )
+ TQTabWidget::setTabLabel( page( index ), title );
}
-void KTabWidget::dragMoveEvent( QDragMoveEvent *e )
+void KTabWidget::dragMoveEvent( TQDragMoveEvent *e )
{
if ( isEmptyTabbarSpace( e->pos() ) ) {
bool accept = false;
@@ -308,20 +308,20 @@ void KTabWidget::dragMoveEvent( QDragMoveEvent *e )
return;
}
e->accept( false );
- QTabWidget::dragMoveEvent( e );
+ TQTabWidget::dragMoveEvent( e );
}
-void KTabWidget::dropEvent( QDropEvent *e )
+void KTabWidget::dropEvent( TQDropEvent *e )
{
if ( isEmptyTabbarSpace( e->pos() ) ) {
emit ( receivedDropEvent( e ) );
return;
}
- QTabWidget::dropEvent( e );
+ TQTabWidget::dropEvent( e );
}
#ifndef QT_NO_WHEELEVENT
-void KTabWidget::wheelEvent( QWheelEvent *e )
+void KTabWidget::wheelEvent( TQWheelEvent *e )
{
if ( e->orientation() == Horizontal )
return;
@@ -349,7 +349,7 @@ void KTabWidget::wheelDelta( int delta )
}
#endif
-void KTabWidget::mouseDoubleClickEvent( QMouseEvent *e )
+void KTabWidget::mouseDoubleClickEvent( TQMouseEvent *e )
{
if( e->button() != LeftButton )
return;
@@ -358,10 +358,10 @@ void KTabWidget::mouseDoubleClickEvent( QMouseEvent *e )
emit( mouseDoubleClick() );
return;
}
- QTabWidget::mouseDoubleClickEvent( e );
+ TQTabWidget::mouseDoubleClickEvent( e );
}
-void KTabWidget::mousePressEvent( QMouseEvent *e )
+void KTabWidget::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == RightButton ) {
if ( isEmptyTabbarSpace( e->pos() ) ) {
@@ -374,10 +374,10 @@ void KTabWidget::mousePressEvent( QMouseEvent *e )
return;
}
}
- QTabWidget::mousePressEvent( e );
+ TQTabWidget::mousePressEvent( e );
}
-void KTabWidget::receivedDropEvent( int index, QDropEvent *e )
+void KTabWidget::receivedDropEvent( int index, TQDropEvent *e )
{
emit( receivedDropEvent( page( index ), e ) );
}
@@ -387,7 +387,7 @@ void KTabWidget::initiateDrag( int index )
emit( initiateDrag( page( index ) ) );
}
-void KTabWidget::contextMenu( int index, const QPoint &p )
+void KTabWidget::contextMenu( int index, const TQPoint &p )
{
emit( contextMenu( page( index ), p ) );
}
@@ -404,25 +404,25 @@ void KTabWidget::mouseMiddleClick( int index )
void KTabWidget::moveTab( int from, int to )
{
- QString tablabel = label( from );
- QWidget *w = page( from );
- QColor color = tabColor( w );
- QIconSet tabiconset = tabIconSet( w );
- QString tabtooltip = tabToolTip( w );
+ TQString tablabel = label( from );
+ TQWidget *w = page( from );
+ TQColor color = tabColor( w );
+ TQIconSet tabiconset = tabIconSet( w );
+ TQString tabtooltip = tabToolTip( w );
bool current = ( w == currentPage() );
bool enabled = isTabEnabled( w );
blockSignals(true);
removePage( w );
// Work-around kmdi brain damage which calls showPage() in insertTab()
- QTab * t = new QTab();
+ TQTab * t = new TQTab();
t->setText(tablabel);
- QTabWidget::insertTab( w, t, to );
+ TQTabWidget::insertTab( w, t, to );
if ( d->m_automaticResizeTabs ) {
if ( to < 0 || to >= count() )
- d->m_tabNames.append( QString::null );
+ d->m_tabNames.append( TQString::null );
else
- d->m_tabNames.insert( d->m_tabNames.at( to ), QString::null );
+ d->m_tabNames.insert( d->m_tabNames.at( to ), TQString::null );
}
w = page( to );
@@ -437,33 +437,33 @@ void KTabWidget::moveTab( int from, int to )
emit ( movedTab( from, to ) );
}
-void KTabWidget::removePage( QWidget * w ) {
+void KTabWidget::removePage( TQWidget * w ) {
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index != -1 )
d->m_tabNames.remove( d->m_tabNames.at( index ) );
}
- QTabWidget::removePage( w );
+ TQTabWidget::removePage( w );
if ( d->m_automaticResizeTabs )
resizeTabs();
}
-bool KTabWidget::isEmptyTabbarSpace( const QPoint &point ) const
+bool KTabWidget::isEmptyTabbarSpace( const TQPoint &point ) const
{
- QSize size( tabBar()->sizeHint() );
+ TQSize size( tabBar()->sizeHint() );
if ( ( tabPosition()==Top && point.y()< size.height() ) || ( tabPosition()==Bottom && point.y()>(height()-size.height() ) ) ) {
- QWidget *rightcorner = cornerWidget( TopRight );
+ TQWidget *rightcorner = cornerWidget( TopRight );
if ( rightcorner ) {
if ( point.x()>=width()-rightcorner->width() )
return false;
}
- QWidget *leftcorner = cornerWidget( TopLeft );
+ TQWidget *leftcorner = cornerWidget( TopLeft );
if ( leftcorner ) {
if ( point.x()<=leftcorner->width() )
return false;
}
- QTab *tab = tabBar()->selectTab( tabBar()->mapFromParent( point ) );
+ TQTab *tab = tabBar()->selectTab( tabBar()->mapFromParent( point ) );
if( !tab )
return true;
}
@@ -517,9 +517,9 @@ void KTabWidget::closeRequest( int index )
emit( closeRequest( page( index ) ) );
}
-void KTabWidget::resizeEvent( QResizeEvent *e )
+void KTabWidget::resizeEvent( TQResizeEvent *e )
{
- QTabWidget::resizeEvent( e );
+ TQTabWidget::resizeEvent( e );
resizeTabs();
}
diff --git a/kdeui/ktabwidget.h b/kdeui/ktabwidget.h
index 971c4af1d..2ce850744 100644
--- a/kdeui/ktabwidget.h
+++ b/kdeui/ktabwidget.h
@@ -21,8 +21,8 @@
#ifndef KTABWIDGET_H
#define KTABWIDGET_H
-#include <qtabwidget.h>
-#include <qstringlist.h>
+#include <tqtabwidget.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -43,7 +43,7 @@ class KDEUI_EXPORT KTabWidget : public QTabWidget
Q_PROPERTY( bool automaticResizeTabs READ automaticResizeTabs WRITE setAutomaticResizeTabs )
public:
- KTabWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KTabWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
/**
* Destructor.
*/
@@ -51,11 +51,11 @@ public:
/*!
Set the tab of the given widget to \a color.
*/
- void setTabColor( QWidget *, const QColor& color );
+ void setTabColor( TQWidget *, const TQColor& color );
/*!
Returns the tab color for the given widget.
*/
- QColor tabColor( QWidget * ) const;
+ TQColor tabColor( TQWidget * ) const;
/*!
Returns true if tab ordering with the middle mouse button
@@ -105,42 +105,42 @@ public:
/*!
Reimplemented for internal reasons.
*/
- virtual void insertTab( QWidget *, const QString &, int index = -1 );
+ virtual void insertTab( TQWidget *, const TQString &, int index = -1 );
/*!
Reimplemented for internal reasons.
*/
- virtual void insertTab( QWidget *child, const QIconSet& iconset,
- const QString &label, int index = -1 );
+ virtual void insertTab( TQWidget *child, const TQIconSet& iconset,
+ const TQString &label, int index = -1 );
/*!
Reimplemented for internal reasons.
*/
- virtual void insertTab( QWidget *, QTab *, int index = -1 );
+ virtual void insertTab( TQWidget *, TQTab *, int index = -1 );
/*!
Reimplemented for internal reasons.
*/
- void changeTab( QWidget *, const QString & );
+ void changeTab( TQWidget *, const TQString & );
/*!
Reimplemented for internal reasons.
*/
- void changeTab( QWidget *child, const QIconSet& iconset, const QString &label );
+ void changeTab( TQWidget *child, const TQIconSet& iconset, const TQString &label );
/*!
Reimplemented for internal reasons.
*/
- QString label( int ) const;
+ TQString label( int ) const;
/*!
Reimplemented for internal reasons.
*/
- QString tabLabel( QWidget * ) const;
+ TQString tabLabel( TQWidget * ) const;
/*!
Reimplemented for internal reasons.
*/
- void setTabLabel( QWidget *, const QString & );
+ void setTabLabel( TQWidget *, const TQString & );
public slots:
/*!
@@ -153,13 +153,13 @@ public slots:
Removes the widget, reimplemented for
internal reasons (keeping labels in sync).
*/
- virtual void removePage ( QWidget * w );
+ virtual void removePage ( TQWidget * w );
/*!
If \a enable is true, tab reordering with middle button will be enabled.
Note that once enabled you shouldn't rely on previously queried
- currentPageIndex() or indexOf( QWidget * ) values anymore.
+ currentPageIndex() or indexOf( TQWidget * ) values anymore.
You can connect to signal movedTab(int, int) which will notify
you from which index to which index a tab has been moved.
@@ -168,7 +168,7 @@ public slots:
/*!
If \a enable is true, a close button will be shown on mouse hover
- over tab icons which will emit signal closeRequest( QWidget * )
+ over tab icons which will emit signal closeRequest( TQWidget * )
when pressed.
*/
void setHoverCloseButton( bool enable );
@@ -189,7 +189,7 @@ public slots:
/*!
If \a enable is true, tabs will be resized to the width of the tab bar.
- Does not work reliable with "QTabWidget* foo=new KTabWidget()" and if
+ Does not work reliable with "TQTabWidget* foo=new KTabWidget()" and if
you change tabs via the tabbar or by accessing tabs directly.
@since 3.4
*/
@@ -199,34 +199,34 @@ signals:
/*!
Connect to this and set accept to true if you can and want to decode the event.
*/
- void testCanDecode(const QDragMoveEvent *e, bool &accept /* result */);
+ void testCanDecode(const TQDragMoveEvent *e, bool &accept /* result */);
/*!
Received an event in the empty space beside tabbar. Usually creates a new tab.
This signal is only possible after testCanDecode and positive accept result.
*/
- void receivedDropEvent( QDropEvent * );
+ void receivedDropEvent( TQDropEvent * );
/*!
Received an drop event on given widget's tab.
This signal is only possible after testCanDecode and positive accept result.
*/
- void receivedDropEvent( QWidget *, QDropEvent * );
+ void receivedDropEvent( TQWidget *, TQDropEvent * );
/*!
Request to start a drag operation on the given tab.
*/
- void initiateDrag( QWidget * );
+ void initiateDrag( TQWidget * );
/*!
The right mouse button was pressed over empty space besides tabbar.
*/
- void contextMenu( const QPoint & );
+ void contextMenu( const TQPoint & );
/*!
The right mouse button was pressed over a widget.
*/
- void contextMenu( QWidget *, const QPoint & );
+ void contextMenu( TQWidget *, const TQPoint & );
/*!
A tab was moved from first to second index. This signal is only
@@ -243,7 +243,7 @@ signals:
/*!
A double left mouse button click was performed over the widget.
*/
- void mouseDoubleClick( QWidget * );
+ void mouseDoubleClick( TQWidget * );
/*!
A middle mouse button click was performed over empty space besides tabbar.
@@ -253,29 +253,29 @@ signals:
/*!
A middle mouse button click was performed over the widget.
*/
- void mouseMiddleClick( QWidget * );
+ void mouseMiddleClick( TQWidget * );
/*!
The close button of a widget's tab was clicked. This signal is
only possible after you have called setHoverCloseButton( true ).
*/
- void closeRequest( QWidget * );
+ void closeRequest( TQWidget * );
protected:
- virtual void mouseDoubleClickEvent( QMouseEvent *e );
- virtual void mousePressEvent( QMouseEvent * );
- virtual void dragMoveEvent( QDragMoveEvent * );
- virtual void dropEvent( QDropEvent * );
+ virtual void mouseDoubleClickEvent( TQMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent * );
+ virtual void dragMoveEvent( TQDragMoveEvent * );
+ virtual void dropEvent( TQDropEvent * );
unsigned int tabBarWidthForMaxChars( uint maxLength );
#ifndef QT_NO_WHEELEVENT
- virtual void wheelEvent( QWheelEvent *e );
+ virtual void wheelEvent( TQWheelEvent *e );
#endif
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
protected slots:
- virtual void receivedDropEvent( int, QDropEvent * );
+ virtual void receivedDropEvent( int, TQDropEvent * );
virtual void initiateDrag( int );
- virtual void contextMenu( int, const QPoint & );
+ virtual void contextMenu( int, const TQPoint & );
virtual void mouseDoubleClick( int );
virtual void mouseMiddleClick( int );
virtual void closeRequest( int );
@@ -284,7 +284,7 @@ protected slots:
#endif
private:
- bool isEmptyTabbarSpace( const QPoint & ) const;
+ bool isEmptyTabbarSpace( const TQPoint & ) const;
void resizeTabs( int changedTabIndex = -1 );
void updateTab( int index );
diff --git a/kdeui/ktextbrowser.cpp b/kdeui/ktextbrowser.cpp
index 4abc268d2..6b3685a81 100644
--- a/kdeui/ktextbrowser.cpp
+++ b/kdeui/ktextbrowser.cpp
@@ -18,7 +18,7 @@
*/
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kapplication.h>
#include <kglobalsettings.h>
#include <ktextbrowser.h>
@@ -26,14 +26,14 @@
#include <kurl.h>
#include <kiconloader.h>
-KTextBrowser::KTextBrowser( QWidget *parent, const char *name,
+KTextBrowser::KTextBrowser( TQWidget *parent, const char *name,
bool notifyClick )
- : QTextBrowser( parent, name ), mNotifyClick(notifyClick)
+ : TQTextBrowser( parent, name ), mNotifyClick(notifyClick)
{
//
//1999-10-04 Espen Sand: Not required anymore ?
- //connect( this, SIGNAL(highlighted(const QString &)),
- // this, SLOT(refChanged(const QString &)));
+ //connect( this, TQT_SIGNAL(highlighted(const TQString &)),
+ // this, TQT_SLOT(refChanged(const TQString &)));
}
KTextBrowser::~KTextBrowser( void )
@@ -53,7 +53,7 @@ bool KTextBrowser::isNotifyClick() const
}
-void KTextBrowser::setSource( const QString& name )
+void KTextBrowser::setSource( const TQString& name )
{
if( name.isNull() )
{
@@ -68,7 +68,7 @@ void KTextBrowser::setSource( const QString& name )
}
else
{
- emit mailClick( QString::null, name );
+ emit mailClick( TQString::null, name );
}
}
else
@@ -85,7 +85,7 @@ void KTextBrowser::setSource( const QString& name )
}
-void KTextBrowser::keyPressEvent(QKeyEvent *e)
+void KTextBrowser::keyPressEvent(TQKeyEvent *e)
{
if( e->key() == Key_Escape )
{
@@ -97,32 +97,32 @@ void KTextBrowser::keyPressEvent(QKeyEvent *e)
}
else
{
- QTextBrowser::keyPressEvent(e);
+ TQTextBrowser::keyPressEvent(e);
}
}
-void KTextBrowser::viewportMouseMoveEvent( QMouseEvent* e)
+void KTextBrowser::viewportMouseMoveEvent( TQMouseEvent* e)
{
// do this first so we get the right type of cursor
- QTextBrowser::viewportMouseMoveEvent(e);
+ TQTextBrowser::viewportMouseMoveEvent(e);
if ( viewport()->cursor().shape() == PointingHandCursor )
viewport()->setCursor( KCursor::handCursor() );
}
-void KTextBrowser::contentsWheelEvent( QWheelEvent *e )
+void KTextBrowser::contentsWheelEvent( TQWheelEvent *e )
{
if ( KGlobalSettings::wheelMouseZooms() )
- QTextBrowser::contentsWheelEvent( e );
+ TQTextBrowser::contentsWheelEvent( e );
else // thanks, we don't want to zoom, so skip QTextEdit's impl.
- QScrollView::contentsWheelEvent( e );
+ TQScrollView::contentsWheelEvent( e );
}
-QPopupMenu *KTextBrowser::createPopupMenu( const QPoint & pos )
+TQPopupMenu *KTextBrowser::createPopupMenu( const TQPoint & pos )
{
enum { IdUndo, IdRedo, IdSep1, IdCut, IdCopy, IdPaste, IdClear, IdSep2, IdSelectAll };
- QPopupMenu *popup = QTextBrowser::createPopupMenu( pos );
+ TQPopupMenu *popup = TQTextBrowser::createPopupMenu( pos );
if ( isReadOnly() )
popup->changeItem( popup->idAt(0), SmallIconSet("editcopy"), popup->text( popup->idAt(0) ) );
diff --git a/kdeui/ktextbrowser.h b/kdeui/ktextbrowser.h
index 68fa7f18e..fd20d9cef 100644
--- a/kdeui/ktextbrowser.h
+++ b/kdeui/ktextbrowser.h
@@ -20,14 +20,14 @@
#ifndef _KTEXT_BROWSER_H_
#define _KTEXT_BROWSER_H_
-#include <qtextbrowser.h>
+#include <tqtextbrowser.h>
#include <kdelibs_export.h>
/**
- * @short Extended QTextBrowser.
+ * @short Extended TQTextBrowser.
*
- * An extended QTextBrowser.
+ * An extended TQTextBrowser.
*
* By default it will
* invoke the system mailer or the system browser when a link is
@@ -52,7 +52,7 @@ class KDEUI_EXPORT KTextBrowser : public QTextBrowser
* @param name Widget name.
* @param notifyClick @p true causes signals to be emitted.
*/
- KTextBrowser( QWidget *parent=0, const char *name=0,
+ KTextBrowser( TQWidget *parent=0, const char *name=0,
bool notifyClick=false );
/**
@@ -78,39 +78,39 @@ class KDEUI_EXPORT KTextBrowser : public QTextBrowser
Reimplemented to NOT set the source but to do the special handling.
Do not call.
*/
- void setSource(const QString& name);
+ void setSource(const TQString& name);
/**
* Makes sure Key_Escape is ignored
*/
- virtual void keyPressEvent(QKeyEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *e);
/**
* Make sure we use our own hand cursor
*/
- virtual void viewportMouseMoveEvent( QMouseEvent* e);
+ virtual void viewportMouseMoveEvent( TQMouseEvent* e);
/**
* Reimplemented to support Qt2 behavior (Ctrl-Wheel = fast scroll)
*/
- virtual void contentsWheelEvent( QWheelEvent *e );
+ virtual void contentsWheelEvent( TQWheelEvent *e );
/**
* Re-implemented for internal reasons. API not affected.
*
- * See QLineEdit::createPopupMenu().
+ * See TQLineEdit::createPopupMenu().
*/
- virtual QPopupMenu *createPopupMenu( const QPoint &pos );
+ virtual TQPopupMenu *createPopupMenu( const TQPoint &pos );
signals:
/**
* Emitted when a mail link has been activated and the widget has
* been configured to emit the signal.
*
- * @param name The destination name. It is QString::null at the moment.
+ * @param name The destination name. It is TQString::null at the moment.
* @param address The destination address.
*/
- void mailClick( const QString &name, const QString &address );
+ void mailClick( const TQString &name, const TQString &address );
/**
* Emitted if mailClick() is not emitted and the widget has been
@@ -118,7 +118,7 @@ class KDEUI_EXPORT KTextBrowser : public QTextBrowser
*
* @param url The destination address.
*/
- void urlClick( const QString &url );
+ void urlClick( const TQString &url );
private:
bool mNotifyClick;
diff --git a/kdeui/ktextedit.cpp b/kdeui/ktextedit.cpp
index a368a56d0..0951fe066 100644
--- a/kdeui/ktextedit.cpp
+++ b/kdeui/ktextedit.cpp
@@ -19,9 +19,9 @@
#include "ktextedit.h"
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qpopupmenu.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqpopupmenu.h>
#include <ksyntaxhighlighter.h>
#include <kspell.h>
@@ -51,16 +51,16 @@ public:
KSpell *spell;
};
-KTextEdit::KTextEdit( const QString& text, const QString& context,
- QWidget *parent, const char *name )
- : QTextEdit ( text, context, parent, name )
+KTextEdit::KTextEdit( const TQString& text, const TQString& context,
+ TQWidget *parent, const char *name )
+ : TQTextEdit ( text, context, parent, name )
{
d = new KTextEditPrivate();
KCursor::setAutoHideCursor( this, true, false );
}
-KTextEdit::KTextEdit( QWidget *parent, const char *name )
- : QTextEdit ( parent, name )
+KTextEdit::KTextEdit( TQWidget *parent, const char *name )
+ : TQTextEdit ( parent, name )
{
d = new KTextEditPrivate();
KCursor::setAutoHideCursor( this, true, false );
@@ -71,7 +71,7 @@ KTextEdit::~KTextEdit()
delete d;
}
-void KTextEdit::keyPressEvent( QKeyEvent *e )
+void KTextEdit::keyPressEvent( TQKeyEvent *e )
{
KKey key( e );
@@ -172,7 +172,7 @@ void KTextEdit::keyPressEvent( QKeyEvent *e )
}
else if ( KStdAccel::pasteSelection().contains( key ) )
{
- QString text = QApplication::clipboard()->text( QClipboard::Selection);
+ TQString text = TQApplication::clipboard()->text( QClipboard::Selection);
if ( !text.isEmpty() )
insert( text );
e->accept();
@@ -188,7 +188,7 @@ void KTextEdit::keyPressEvent( QKeyEvent *e )
return;
}
- QTextEdit::keyPressEvent( e );
+ TQTextEdit::keyPressEvent( e );
}
void KTextEdit::deleteWordBack()
@@ -210,11 +210,11 @@ void KTextEdit::slotAllowTab()
setTabChangesFocus(!tabChangesFocus());
}
-QPopupMenu *KTextEdit::createPopupMenu( const QPoint &pos )
+TQPopupMenu *KTextEdit::createPopupMenu( const TQPoint &pos )
{
enum { IdUndo, IdRedo, IdSep1, IdCut, IdCopy, IdPaste, IdClear, IdSep2, IdSelectAll };
- QPopupMenu *menu = QTextEdit::createPopupMenu( pos );
+ TQPopupMenu *menu = TQTextEdit::createPopupMenu( pos );
if ( isReadOnly() )
menu->changeItem( menu->idAt(0), SmallIconSet("editcopy"), menu->text( menu->idAt(0) ) );
@@ -229,38 +229,38 @@ QPopupMenu *KTextEdit::createPopupMenu( const QPoint &pos )
menu->insertSeparator();
id = menu->insertItem( SmallIconSet( "spellcheck" ), i18n( "Check Spelling..." ),
- this, SLOT( checkSpelling() ) );
+ this, TQT_SLOT( checkSpelling() ) );
if( text().isEmpty() )
menu->setItemEnabled( id, false );
id = menu->insertItem( i18n( "Auto Spell Check" ),
- this, SLOT( toggleAutoSpellCheck() ) );
+ this, TQT_SLOT( toggleAutoSpellCheck() ) );
menu->setItemChecked(id, d->checkSpellingEnabled);
menu->insertSeparator();
- id=menu->insertItem(i18n("Allow Tabulations"),this,SLOT(slotAllowTab()));
+ id=menu->insertItem(i18n("Allow Tabulations"),this,TQT_SLOT(slotAllowTab()));
menu->setItemChecked(id, !tabChangesFocus());
}
return menu;
}
-QPopupMenu *KTextEdit::createPopupMenu()
+TQPopupMenu *KTextEdit::createPopupMenu()
{
- return QTextEdit::createPopupMenu();
+ return TQTextEdit::createPopupMenu();
}
-void KTextEdit::contentsWheelEvent( QWheelEvent *e )
+void KTextEdit::contentsWheelEvent( TQWheelEvent *e )
{
if ( KGlobalSettings::wheelMouseZooms() )
- QTextEdit::contentsWheelEvent( e );
+ TQTextEdit::contentsWheelEvent( e );
else // thanks, we don't want to zoom, so skip QTextEdit's impl.
- QScrollView::contentsWheelEvent( e );
+ TQScrollView::contentsWheelEvent( e );
}
-void KTextEdit::setPalette( const QPalette& palette )
+void KTextEdit::setPalette( const TQPalette& palette )
{
- QTextEdit::setPalette( palette );
+ TQTextEdit::setPalette( palette );
// unsetPalette() is not virtual and calls setPalette() as well
// so we can use ownPalette() to find out about unsetting
d->customPalette = ownPalette();
@@ -293,12 +293,12 @@ void KTextEdit::setCheckSpellingEnabled( bool check )
}
}
-void KTextEdit::focusInEvent( QFocusEvent *e )
+void KTextEdit::focusInEvent( TQFocusEvent *e )
{
if ( d->checkSpellingEnabled && !isReadOnly() && !d->highlighter )
d->highlighter = new KDictSpellingHighlighter( this );
- QTextEdit::focusInEvent( e );
+ TQTextEdit::focusInEvent( e );
}
bool KTextEdit::checkSpellingEnabled() const
@@ -320,10 +320,10 @@ void KTextEdit::setReadOnly(bool readOnly)
d->highlighter = 0;
bool custom = ownPalette();
- QPalette p = palette();
- QColor color = p.color(QPalette::Disabled, QColorGroup::Background);
- p.setColor(QColorGroup::Base, color);
- p.setColor(QColorGroup::Background, color);
+ TQPalette p = palette();
+ TQColor color = p.color(TQPalette::Disabled, TQColorGroup::Background);
+ p.setColor(TQColorGroup::Base, color);
+ p.setColor(TQColorGroup::Background, color);
setPalette(p);
d->customPalette = custom;
}
@@ -331,17 +331,17 @@ void KTextEdit::setReadOnly(bool readOnly)
{
if ( d->customPalette )
{
- QPalette p = palette();
- QColor color = p.color(QPalette::Normal, QColorGroup::Base);
- p.setColor(QColorGroup::Base, color);
- p.setColor(QColorGroup::Background, color);
+ TQPalette p = palette();
+ TQColor color = p.color(TQPalette::Normal, TQColorGroup::Base);
+ p.setColor(TQColorGroup::Base, color);
+ p.setColor(TQColorGroup::Background, color);
setPalette( p );
}
else
unsetPalette();
}
- QTextEdit::setReadOnly (readOnly);
+ TQTextEdit::setReadOnly (readOnly);
}
void KTextEdit::virtual_hook( int, void* )
@@ -351,24 +351,24 @@ void KTextEdit::checkSpelling()
{
delete d->spell;
d->spell = new KSpell( this, i18n( "Spell Checking" ),
- this, SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true);
+ this, TQT_SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true);
- connect( d->spell, SIGNAL( death() ),
- this, SLOT( spellCheckerFinished() ) );
+ connect( d->spell, TQT_SIGNAL( death() ),
+ this, TQT_SLOT( spellCheckerFinished() ) );
- connect( d->spell, SIGNAL( misspelling( const QString &, const QStringList &, unsigned int ) ),
- this, SLOT( spellCheckerMisspelling( const QString &, const QStringList &, unsigned int ) ) );
+ connect( d->spell, TQT_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int ) ),
+ this, TQT_SLOT( spellCheckerMisspelling( const TQString &, const TQStringList &, unsigned int ) ) );
- connect( d->spell, SIGNAL( corrected( const QString &, const QString &, unsigned int ) ),
- this, SLOT( spellCheckerCorrected( const QString &, const QString &, unsigned int ) ) );
+ connect( d->spell, TQT_SIGNAL( corrected( const TQString &, const TQString &, unsigned int ) ),
+ this, TQT_SLOT( spellCheckerCorrected( const TQString &, const TQString &, unsigned int ) ) );
}
-void KTextEdit::spellCheckerMisspelling( const QString &text, const QStringList &, unsigned int pos )
+void KTextEdit::spellCheckerMisspelling( const TQString &text, const TQStringList &, unsigned int pos )
{
highLightWord( text.length(), pos );
}
-void KTextEdit::spellCheckerCorrected( const QString &oldWord, const QString &newWord, unsigned int pos )
+void KTextEdit::spellCheckerCorrected( const TQString &oldWord, const TQString &newWord, unsigned int pos )
{
unsigned int l = 0;
unsigned int cnt = 0;
@@ -398,10 +398,10 @@ void KTextEdit::spellCheckerFinished()
void KTextEdit::slotSpellCheckReady( KSpell *s )
{
s->check( text() );
- connect( s, SIGNAL( done( const QString & ) ), this, SLOT( slotSpellCheckDone( const QString & ) ) );
+ connect( s, TQT_SIGNAL( done( const TQString & ) ), this, TQT_SLOT( slotSpellCheckDone( const TQString & ) ) );
}
-void KTextEdit::slotSpellCheckDone( const QString &s )
+void KTextEdit::slotSpellCheckDone( const TQString &s )
{
if ( s != text() )
setText( s );
diff --git a/kdeui/ktextedit.h b/kdeui/ktextedit.h
index df08ddc9a..7735beb34 100644
--- a/kdeui/ktextedit.h
+++ b/kdeui/ktextedit.h
@@ -20,7 +20,7 @@
#ifndef KTEXTEDIT_H
#define KTEXTEDIT_H
-#include <qtextedit.h>
+#include <tqtextedit.h>
#include <kdelibs_export.h>
@@ -29,12 +29,12 @@ class KSpell;
/**
* @short A KDE'ified QTextEdit
*
- * This is just a little subclass of QTextEdit, implementing
+ * This is just a little subclass of TQTextEdit, implementing
* some standard KDE features, like Cursor auto-hiding, configurable
* wheelscrolling (fast-scroll or zoom) and deleting of entire
* words with Ctrl-Backspace or Ctrl-Delete.
*
- * Basic rule: whenever you want to use QTextEdit, use KTextEdit!
+ * Basic rule: whenever you want to use TQTextEdit, use KTextEdit!
*
* @see QTextEdit
* @author Carsten Pfeiffer <pfeiffer@kde.org>
@@ -46,18 +46,18 @@ class KDEUI_EXPORT KTextEdit : public QTextEdit
public:
/**
- * Constructs a KTextEdit object. See QTextEdit::QTextEdit
+ * Constructs a KTextEdit object. See TQTextEdit::QTextEdit
* for details.
*/
- KTextEdit( const QString& text,
- const QString& context = QString::null,
- QWidget * parent = 0, const char *name = 0 );
+ KTextEdit( const TQString& text,
+ const TQString& context = TQString::null,
+ TQWidget * parent = 0, const char *name = 0 );
/**
- * Constructs a KTextEdit object. See QTextEdit::QTextEdit
+ * Constructs a KTextEdit object. See TQTextEdit::QTextEdit
* for details.
*/
- KTextEdit( QWidget *parent = 0L, const char *name = 0 );
+ KTextEdit( TQWidget *parent = 0L, const char *name = 0 );
/**
* Destroys the KTextEdit object.
*/
@@ -71,7 +71,7 @@ public:
/**
* Reimplemented for tracking custom palettes.
*/
- virtual void setPalette( const QPalette& palette );
+ virtual void setPalette( const TQPalette& palette );
/**
* Turns spell checking for this text edit on or off. Note that spell
@@ -110,19 +110,19 @@ protected:
/**
* Reimplemented to catch "delete word" key events.
*/
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
/**
* Reimplemented to instantiate a KDictSpellingHighlighter, if
* spellchecking is enabled.
*/
- virtual void focusInEvent( QFocusEvent * );
+ virtual void focusInEvent( TQFocusEvent * );
/**
* Reimplemented to allow fast-wheelscrolling with Ctrl-Wheel
* or zoom.
*/
- virtual void contentsWheelEvent( QWheelEvent * );
+ virtual void contentsWheelEvent( TQWheelEvent * );
/**
* Deletes a word backwards from the current cursor position,
@@ -137,29 +137,29 @@ protected:
virtual void deleteWordForward();
/**
- * Reimplemented from QTextEdit to add spelling related items
+ * Reimplemented from TQTextEdit to add spelling related items
* when appropriate.
*/
- virtual QPopupMenu *createPopupMenu( const QPoint &pos );
+ virtual TQPopupMenu *createPopupMenu( const TQPoint &pos );
/**
- * This is just a reimplementation of a deprecated method from QTextEdit and
+ * This is just a reimplementation of a deprecated method from TQTextEdit and
* is just here to keep source compatibility. This should not be used in
* new code. Specifically reimplementing this method will probably not do
* what you expect. See the method above.
*
* @deprecated
*/
- virtual QPopupMenu *createPopupMenu();
+ virtual TQPopupMenu *createPopupMenu();
protected:
virtual void virtual_hook( int id, void* data );
private slots:
void slotSpellCheckReady( KSpell *s );
- void slotSpellCheckDone( const QString &s );
- void spellCheckerMisspelling( const QString &text, const QStringList &, unsigned int pos);
- void spellCheckerCorrected( const QString &, const QString &, unsigned int );
+ void slotSpellCheckDone( const TQString &s );
+ void spellCheckerMisspelling( const TQString &text, const TQStringList &, unsigned int pos);
+ void spellCheckerCorrected( const TQString &, const TQString &, unsigned int );
void spellCheckerFinished();
void toggleAutoSpellCheck();
void slotAllowTab();
diff --git a/kdeui/ktimewidget.cpp b/kdeui/ktimewidget.cpp
index 6a3ec4bb3..3a5ec3936 100644
--- a/kdeui/ktimewidget.cpp
+++ b/kdeui/ktimewidget.cpp
@@ -1,5 +1,5 @@
-#include <qdatetimeedit.h>
-#include <qlayout.h>
+#include <tqdatetimeedit.h>
+#include <tqlayout.h>
#include "kdebug.h"
#include "kdialog.h"
@@ -12,15 +12,15 @@ public:
QTimeEdit * timeWidget;
};
-KTimeWidget::KTimeWidget(QWidget * parent, const char * name)
- : QWidget(parent, name)
+KTimeWidget::KTimeWidget(TQWidget * parent, const char * name)
+ : TQWidget(parent, name)
{
init();
}
-KTimeWidget::KTimeWidget(const QTime & time,
- QWidget * parent, const char * name)
- : QWidget(parent, name)
+KTimeWidget::KTimeWidget(const TQTime & time,
+ TQWidget * parent, const char * name)
+ : TQWidget(parent, name)
{
init();
@@ -36,21 +36,21 @@ void KTimeWidget::init()
{
d = new KTimeWidgetPrivate;
- QHBoxLayout *layout = new QHBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
layout->setAutoAdd(true);
d->timeWidget = new QTimeEdit(this);
- connect(d->timeWidget, SIGNAL(valueChanged(const QTime &)),
- SIGNAL(valueChanged(const QTime &)));
+ connect(d->timeWidget, TQT_SIGNAL(valueChanged(const TQTime &)),
+ TQT_SIGNAL(valueChanged(const TQTime &)));
}
-void KTimeWidget::setTime(const QTime & time)
+void KTimeWidget::setTime(const TQTime & time)
{
d->timeWidget->setTime(time);
}
-QTime KTimeWidget::time() const
+TQTime KTimeWidget::time() const
{
return d->timeWidget->time();
}
diff --git a/kdeui/ktimewidget.h b/kdeui/ktimewidget.h
index 1e263dafd..b9808f0e8 100644
--- a/kdeui/ktimewidget.h
+++ b/kdeui/ktimewidget.h
@@ -19,8 +19,8 @@
#ifndef __KTIMEWIDGET__
#define __KTIMEWIDGET__
-#include <qwidget.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqdatetime.h>
#include <kdelibs_export.h>
@@ -37,20 +37,20 @@
class KDEUI_EXPORT KTimeWidget : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QTime time READ time WRITE setTime )
+ Q_PROPERTY( TQTime time READ time WRITE setTime )
public:
/**
* Constructs a time selection widget.
*/
- KTimeWidget(QWidget * parent = 0, const char * name = 0);
+ KTimeWidget(TQWidget * parent = 0, const char * name = 0);
/**
* Constructs a time selection widget with the initial time set to
* @p time.
*/
- KTimeWidget(const QTime & time,
- QWidget * parent = 0, const char * name = 0 );
+ KTimeWidget(const TQTime & time,
+ TQWidget * parent = 0, const char * name = 0 );
/**
* Destructs the time selection widget.
@@ -60,20 +60,20 @@ public:
/**
* Returns the currently selected time.
*/
- QTime time() const;
+ TQTime time() const;
public slots:
/**
* Changes the selected time to @p time.
*/
- void setTime(const QTime & time);
+ void setTime(const TQTime & time);
signals:
/**
* Emitted whenever the time of the widget
* is changed, either with setTime() or via user selection.
*/
- void valueChanged(const QTime & time);
+ void valueChanged(const TQTime & time);
private:
void init();
diff --git a/kdeui/ktimezonewidget.cpp b/kdeui/ktimezonewidget.cpp
index 879b26176..a9a73a4f5 100644
--- a/kdeui/ktimezonewidget.cpp
+++ b/kdeui/ktimezonewidget.cpp
@@ -25,7 +25,7 @@
#include <kstandarddirs.h>
#include <ktimezones.h>
#include <ktimezonewidget.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <time.h>
#define COLUMN_CITY 0
@@ -33,7 +33,7 @@
#define COLUMN_COMMENT 2
#define COLUMN_ZONE 3
-KTimezoneWidget::KTimezoneWidget(QWidget *parent, const char *name, KTimezones *db) :
+KTimezoneWidget::KTimezoneWidget(TQWidget *parent, const char *name, KTimezones *db) :
KListView(parent, name),
d(0)
{
@@ -50,8 +50,8 @@ KTimezoneWidget::KTimezoneWidget(QWidget *parent, const char *name, KTimezones *
for (KTimezones::ZoneMap::ConstIterator it = zones.begin(); it != zones.end(); ++it)
{
const KTimezone *zone = it.data();
- QString tzName = zone->name();
- QString comment = zone->comment();
+ TQString tzName = zone->name();
+ TQString comment = zone->comment();
if (!comment.isEmpty())
comment = i18n(comment.utf8());
@@ -59,17 +59,17 @@ KTimezoneWidget::KTimezoneWidget(QWidget *parent, const char *name, KTimezones *
//
// "Europe/London", "GB" -> "London", "Europe/GB".
// "UTC", "" -> "UTC", "".
- QStringList continentCity = QStringList::split("/", displayName(zone));
- QListViewItem *listItem = new QListViewItem(this, continentCity[continentCity.count() - 1]);
+ TQStringList continentCity = TQStringList::split("/", displayName(zone));
+ TQListViewItem *listItem = new TQListViewItem(this, continentCity[continentCity.count() - 1]);
continentCity[continentCity.count() - 1] = zone->countryCode();
listItem->setText(COLUMN_REGION, continentCity.join("/"));
listItem->setText(COLUMN_COMMENT, comment);
listItem->setText(COLUMN_ZONE, tzName); /* store complete path in ListView */
// Locate the flag from /l10n/%1/flag.png.
- QString flag = locate("locale", QString("l10n/%1/flag.png").arg(zone->countryCode().lower()));
- if (QFile::exists(flag))
- listItem->setPixmap(COLUMN_REGION, QPixmap(flag));
+ TQString flag = locate("locale", TQString("l10n/%1/flag.png").arg(zone->countryCode().lower()));
+ if (TQFile::exists(flag))
+ listItem->setPixmap(COLUMN_REGION, TQPixmap(flag));
}
if (!userDb)
@@ -83,17 +83,17 @@ KTimezoneWidget::~KTimezoneWidget()
// delete d;
}
-QString KTimezoneWidget::displayName(const KTimezone *zone)
+TQString KTimezoneWidget::displayName(const KTimezone *zone)
{
return i18n(zone->name().utf8()).replace("_", " ");
}
-QStringList KTimezoneWidget::selection() const
+TQStringList KTimezoneWidget::selection() const
{
- QStringList selection;
+ TQStringList selection;
// Loop through all entries.
- QListViewItem *listItem = firstChild();
+ TQListViewItem *listItem = firstChild();
while (listItem)
{
if (listItem->isSelected())
@@ -105,12 +105,12 @@ QStringList KTimezoneWidget::selection() const
return selection;
}
-void KTimezoneWidget::setSelected(const QString &zone, bool selected)
+void KTimezoneWidget::setSelected(const TQString &zone, bool selected)
{
bool found = false;
// Loop through all entries.
- QListViewItem *listItem = firstChild();
+ TQListViewItem *listItem = firstChild();
while (listItem)
{
if (listItem->text(COLUMN_ZONE) == zone)
diff --git a/kdeui/ktimezonewidget.h b/kdeui/ktimezonewidget.h
index 9241b14a3..a09b1dd56 100644
--- a/kdeui/ktimezonewidget.h
+++ b/kdeui/ktimezonewidget.h
@@ -22,7 +22,7 @@
#include <kdelibs_export.h>
#include <klistview.h>
-#include <qstring.h>
+#include <tqstring.h>
class KTimezone;
class KTimezones;
@@ -70,7 +70,7 @@ public:
* @param db The timezone database to use. If 0, the system timezone
* database is used.
*/
- KTimezoneWidget(QWidget *parent = 0, const char *name = 0, KTimezones *db = 0);
+ KTimezoneWidget(TQWidget *parent = 0, const char *name = 0, KTimezones *db = 0);
/**
* Destroys the timezone selection widget.
@@ -78,12 +78,12 @@ public:
virtual ~KTimezoneWidget();
/**
- * Returns the currently selected timezones. See QListView::selectionChanged().
+ * Returns the currently selected timezones. See TQListView::selectionChanged().
*
* @return a list of timezone names, in the format used by the database
* supplied to the {@link KTimezoneWidget() } constructor.
*/
- QStringList selection() const;
+ TQStringList selection() const;
/**
* Select/deselect the named timezone.
@@ -91,7 +91,7 @@ public:
* @param zone The timezone name to be selected. Ignored if not recognised!
* @param selected The new selection state.
*/
- void setSelected(const QString &zone, bool selected);
+ void setSelected(const TQString &zone, bool selected);
/**
* Format a timezone name in a standardised manner. The returned value is
@@ -103,7 +103,7 @@ public:
*
* @return formatted timezone name.
*/
- static QString displayName(const KTimezone *zone);
+ static TQString displayName(const KTimezone *zone);
private:
KTimezoneWidgetPrivate *d;
diff --git a/kdeui/ktip.cpp b/kdeui/ktip.cpp
index b74862ced..778d5e33b 100644
--- a/kdeui/ktip.cpp
+++ b/kdeui/ktip.cpp
@@ -23,15 +23,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qimage.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqimage.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -55,11 +55,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "ktip.h"
-KTipDatabase::KTipDatabase(const QString &_tipFile)
+KTipDatabase::KTipDatabase(const TQString &_tipFile)
{
- QString tipFile = _tipFile;
+ TQString tipFile = _tipFile;
if (tipFile.isEmpty())
- tipFile = QString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips";
+ tipFile = TQString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips";
loadTips(tipFile);
@@ -68,15 +68,15 @@ KTipDatabase::KTipDatabase(const QString &_tipFile)
}
-KTipDatabase::KTipDatabase( const QStringList& tipsFiles )
+KTipDatabase::KTipDatabase( const TQStringList& tipsFiles )
{
if ( tipsFiles.isEmpty() || ( ( tipsFiles.count() == 1 ) && tipsFiles.first().isEmpty() ) )
{
- addTips(QString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips");
+ addTips(TQString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips");
}
else
{
- for (QStringList::ConstIterator it = tipsFiles.begin(); it != tipsFiles.end(); ++it)
+ for (TQStringList::ConstIterator it = tipsFiles.begin(); it != tipsFiles.end(); ++it)
addTips( *it );
}
if (!mTips.isEmpty())
@@ -84,7 +84,7 @@ KTipDatabase::KTipDatabase( const QStringList& tipsFiles )
}
-void KTipDatabase::loadTips(const QString &tipFile)
+void KTipDatabase::loadTips(const TQString &tipFile)
{
mTips.clear();
addTips(tipFile);
@@ -93,9 +93,9 @@ void KTipDatabase::loadTips(const QString &tipFile)
// if you change something here, please update the script
// preparetips, which depends on extracting exactly the same
// text as done here.
-void KTipDatabase::addTips(const QString& tipFile )
+void KTipDatabase::addTips(const TQString& tipFile )
{
- QString fileName = locate("data", tipFile);
+ TQString fileName = locate("data", tipFile);
if (fileName.isEmpty())
{
@@ -103,23 +103,23 @@ void KTipDatabase::addTips(const QString& tipFile )
return;
}
- QFile file(fileName);
+ TQFile file(fileName);
if (!file.open(IO_ReadOnly))
{
kdDebug() << "KTipDatabase::addTips: can't open '" << fileName << "' for reading" << endl;
return;
}
- QByteArray data = file.readAll();
- QString content = QString::fromUtf8(data.data(), data.size());
- const QRegExp rx("\\n+");
+ TQByteArray data = file.readAll();
+ TQString content = TQString::fromUtf8(data.data(), data.size());
+ const TQRegExp rx("\\n+");
int pos = -1;
while ((pos = content.find("<html>", pos + 1, false)) != -1)
{
// to make translations work, tip extraction here must exactly
// match what is done by the preparetips script
- QString tip = content
+ TQString tip = content
.mid(pos + 6, content.find("</html>", pos, false) - pos - 6)
.replace(rx, "\n");
if (!tip.endsWith("\n"))
@@ -158,17 +158,17 @@ void KTipDatabase::prevTip()
}
-QString KTipDatabase::tip() const
+TQString KTipDatabase::tip() const
{
if (mTips.isEmpty())
- return QString::null;
+ return TQString::null;
return mTips[mCurrent];
}
KTipDialog *KTipDialog::mInstance = 0;
-KTipDialog::KTipDialog(KTipDatabase *db, QWidget *parent, const char *name)
+KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name)
: KDialog(parent, name)
{
/**
@@ -177,7 +177,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, QWidget *parent, const char *name)
*/
bool isTipDialog = (parent);
- QImage img;
+ TQImage img;
int h,s,v;
mBlendedColor = KGlobalSettings::activeTitleColor();
@@ -186,12 +186,12 @@ KTipDialog::KTipDialog(KTipDatabase *db, QWidget *parent, const char *name)
if (!isTipDialog)
{
- img = QImage(locate("data", "kdewizard/pics/wizard_small.png"));
+ img = TQImage(locate("data", "kdewizard/pics/wizard_small.png"));
// colorize and check to figure the correct color
KIconEffect::colorize(img, mBlendedColor, 1.0);
QRgb colPixel( img.pixel(0,0) );
- mBlendedColor = QColor(qRed(colPixel),qGreen(colPixel),qBlue(colPixel));
+ mBlendedColor = TQColor(qRed(colPixel),qGreen(colPixel),qBlue(colPixel));
}
mBaseColor = KGlobalSettings::alternateBackgroundColor();
@@ -209,71 +209,71 @@ KTipDialog::KTipDialog(KTipDatabase *db, QWidget *parent, const char *name)
KGlobal::iconLoader()->loadIcon( "idea", KIcon::NoGroup, 32 ),
KGlobal::iconLoader()->loadIcon( "idea", KIcon::NoGroup, 16 ) );
#endif
- QVBoxLayout *vbox = new QVBoxLayout(this, marginHint(), spacingHint());
+ TQVBoxLayout *vbox = new TQVBoxLayout(this, marginHint(), spacingHint());
if (isTipDialog)
{
- QHBoxLayout *pl = new QHBoxLayout(vbox, 0, 0);
+ TQHBoxLayout *pl = new TQHBoxLayout(vbox, 0, 0);
- QLabel *bulb = new QLabel(this);
+ TQLabel *bulb = new TQLabel(this);
bulb->setPixmap(locate("data", "kdeui/pics/ktip-bulb.png"));
pl->addWidget(bulb);
- QLabel *titlePane = new QLabel(this);
+ TQLabel *titlePane = new TQLabel(this);
titlePane->setBackgroundPixmap(locate("data", "kdeui/pics/ktip-background.png"));
titlePane->setText(i18n("Did you know...?\n"));
- titlePane->setFont(QFont(KGlobalSettings::generalFont().family(), 20, QFont::Bold));
- titlePane->setAlignment(QLabel::AlignCenter);
+ titlePane->setFont(TQFont(KGlobalSettings::generalFont().family(), 20, TQFont::Bold));
+ titlePane->setAlignment(TQLabel::AlignCenter);
pl->addWidget(titlePane, 100);
}
- QHBox *hbox = new QHBox(this);
+ TQHBox *hbox = new TQHBox(this);
hbox->setSpacing(0);
- hbox->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ hbox->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
vbox->addWidget(hbox);
- QHBox *tl = new QHBox(hbox);
+ TQHBox *tl = new TQHBox(hbox);
tl->setMargin(7);
tl->setBackgroundColor(mBlendedColor);
- QHBox *topLeft = new QHBox(tl);
+ TQHBox *topLeft = new TQHBox(tl);
topLeft->setMargin(15);
topLeft->setBackgroundColor(mBaseColor);
mTipText = new KTextBrowser(topLeft);
- mTipText->setWrapPolicy( QTextEdit::AtWordOrDocumentBoundary );
+ mTipText->setWrapPolicy( TQTextEdit::AtWordOrDocumentBoundary );
mTipText->mimeSourceFactory()->addFilePath(
KGlobal::dirs()->findResourceDir("data", "kdewizard/pics")+"kdewizard/pics/");
- mTipText->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
- mTipText->setHScrollBarMode(QScrollView::AlwaysOff);
+ mTipText->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain);
+ mTipText->setHScrollBarMode(TQScrollView::AlwaysOff);
mTipText->setLinkUnderline(false);
- QStyleSheet *sheet = mTipText->styleSheet();
- QStyleSheetItem *item = sheet->item("a");
- item->setFontWeight(QFont::Bold);
+ TQStyleSheet *sheet = mTipText->styleSheet();
+ TQStyleSheetItem *item = sheet->item("a");
+ item->setFontWeight(TQFont::Bold);
mTipText->setStyleSheet(sheet);
- QPalette pal = mTipText->palette();
- pal.setColor( QPalette::Active, QColorGroup::Link, mBlendedColor );
- pal.setColor( QPalette::Inactive, QColorGroup::Link, mBlendedColor );
+ TQPalette pal = mTipText->palette();
+ pal.setColor( TQPalette::Active, TQColorGroup::Link, mBlendedColor );
+ pal.setColor( TQPalette::Inactive, TQColorGroup::Link, mBlendedColor );
mTipText->setPalette(pal);
- QStringList icons = KGlobal::dirs()->resourceDirs("icon");
- QStringList::Iterator it;
+ TQStringList icons = KGlobal::dirs()->resourceDirs("icon");
+ TQStringList::Iterator it;
for (it = icons.begin(); it != icons.end(); ++it)
mTipText->mimeSourceFactory()->addFilePath(*it);
if (!isTipDialog)
{
- QLabel *l = new QLabel(hbox);
+ TQLabel *l = new TQLabel(hbox);
l->setPixmap(img);
l->setBackgroundColor(mBlendedColor);
l->setAlignment(Qt::AlignRight | Qt::AlignBottom);
resize(550, 230);
- QSize sh = size();
+ TQSize sh = size();
- QRect rect = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect rect = KGlobalSettings::splashScreenDesktopGeometry();
move(rect.x() + (rect.width() - sh.width())/2,
rect.y() + (rect.height() - sh.height())/2);
@@ -282,9 +282,9 @@ KTipDialog::KTipDialog(KTipDatabase *db, QWidget *parent, const char *name)
KSeparator* sep = new KSeparator( KSeparator::HLine, this);
vbox->addWidget(sep);
- QHBoxLayout *hbox2 = new QHBoxLayout(vbox, 4);
+ TQHBoxLayout *hbox2 = new TQHBoxLayout(vbox, 4);
- mTipOnStart = new QCheckBox(i18n("&Show tips on startup"), this);
+ mTipOnStart = new TQCheckBox(i18n("&Show tips on startup"), this);
hbox2->addWidget(mTipOnStart, 1);
KPushButton *prev = new KPushButton( KStdGuiItem::back(
@@ -304,10 +304,10 @@ KTipDialog::KTipDialog(KTipDatabase *db, QWidget *parent, const char *name)
KConfigGroup config(kapp->config(), "TipOfDay");
mTipOnStart->setChecked(config.readBoolEntry("RunOnStart", true));
- connect(next, SIGNAL(clicked()), this, SLOT(nextTip()));
- connect(prev, SIGNAL(clicked()), this, SLOT(prevTip()));
- connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
- connect(mTipOnStart, SIGNAL(toggled(bool)), this, SLOT(showOnStart(bool)));
+ connect(next, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextTip()));
+ connect(prev, TQT_SIGNAL(clicked()), this, TQT_SLOT(prevTip()));
+ connect(ok, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()));
+ connect(mTipOnStart, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(showOnStart(bool)));
ok->setFocus();
@@ -320,17 +320,17 @@ KTipDialog::~KTipDialog()
mInstance = 0L;
}
-void KTipDialog::showTip(const QString &tipFile, bool force)
+void KTipDialog::showTip(const TQString &tipFile, bool force)
{
showTip(kapp->mainWidget(), tipFile, force);
}
-void KTipDialog::showTip(QWidget *parent, const QString &tipFile, bool force)
+void KTipDialog::showTip(TQWidget *parent, const TQString &tipFile, bool force)
{
- showMultiTip( parent, QStringList(tipFile), force );
+ showMultiTip( parent, TQStringList(tipFile), force );
}
-void KTipDialog::showMultiTip(QWidget *parent, const QStringList &tipFiles, bool force)
+void KTipDialog::showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bool force)
{
KConfigGroup configGroup(kapp->config(), "TipOfDay");
@@ -345,12 +345,12 @@ void KTipDialog::showMultiTip(QWidget *parent, const QStringList &tipFiles, bool
if (hasLastShown)
{
const int oneDay = 24*60*60;
- QDateTime lastShown = configGroup.readDateTimeEntry("TipLastShown");
+ TQDateTime lastShown = configGroup.readDateTimeEntry("TipLastShown");
// Show tip roughly once a week
- if (lastShown.secsTo(QDateTime::currentDateTime()) < (oneDay + (kapp->random() % (10*oneDay))))
+ if (lastShown.secsTo(TQDateTime::currentDateTime()) < (oneDay + (kapp->random() % (10*oneDay))))
return;
}
- configGroup.writeEntry("TipLastShown", QDateTime::currentDateTime());
+ configGroup.writeEntry("TipLastShown", TQDateTime::currentDateTime());
kapp->config()->sync();
if (!hasLastShown)
return; // Don't show tip on first start
@@ -370,7 +370,7 @@ void KTipDialog::showMultiTip(QWidget *parent, const QStringList &tipFiles, bool
void KTipDialog::prevTip()
{
mDatabase->prevTip();
- mTipText->setText(QString::fromLatin1(
+ mTipText->setText(TQString::fromLatin1(
"<qt text=\"%1\" bgcolor=\"%2\">%3</qt>")
.arg(mTextColor.name())
.arg(mBaseColor.name())
@@ -381,7 +381,7 @@ void KTipDialog::showMultiTip(QWidget *parent, const QStringList &tipFiles, bool
void KTipDialog::nextTip()
{
mDatabase->nextTip();
- mTipText->setText(QString::fromLatin1("<qt text=\"%1\" bgcolor=\"%2\">%3</qt>")
+ mTipText->setText(TQString::fromLatin1("<qt text=\"%1\" bgcolor=\"%2\">%3</qt>")
.arg(mTextColor.name())
.arg(mBaseColor.name())
.arg(i18n(mDatabase->tip().utf8())));
@@ -400,11 +400,11 @@ void KTipDialog::showMultiTip(QWidget *parent, const QStringList &tipFiles, bool
config.sync();
}
- bool KTipDialog::eventFilter(QObject *o, QEvent *e)
+ bool KTipDialog::eventFilter(TQObject *o, TQEvent *e)
{
- if (o == mTipText && e->type()== QEvent::KeyPress &&
- (((QKeyEvent *)e)->key() == Key_Return ||
- ((QKeyEvent *)e)->key() == Key_Space ))
+ if (o == mTipText && e->type()== TQEvent::KeyPress &&
+ (((TQKeyEvent *)e)->key() == Key_Return ||
+ ((TQKeyEvent *)e)->key() == Key_Space ))
accept();
// If the user presses Return or Space, we close the dialog as if the
@@ -413,7 +413,7 @@ void KTipDialog::showMultiTip(QWidget *parent, const QStringList &tipFiles, bool
// keyboard to open urls in the KTextBrowser, so we just let it handle
// the key event _additionally_. (Antonio)
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
void KTipDialog::virtual_hook( int id, void* data )
diff --git a/kdeui/ktip.h b/kdeui/ktip.h
index f11978343..bdbfdc4d2 100644
--- a/kdeui/ktip.h
+++ b/kdeui/ktip.h
@@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __K_TIP_H__
#define __K_TIP_H__
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdialog.h>
@@ -61,7 +61,7 @@ public:
*
* @param tipFile The absolute path to the tips file.
*/
- KTipDatabase(const QString &tipFile = QString::null);
+ KTipDatabase(const TQString &tipFile = TQString::null);
/**
* This constructor takes a list of files that will be merged. This constructor
@@ -69,12 +69,12 @@ public:
*
* @param tipFiles A list of absolute paths to the tips file
*/
- KTipDatabase(const QStringList &tipFiles);
+ KTipDatabase(const TQStringList &tipFiles);
/**
* Returns the current tip.
*/
- QString tip() const;
+ TQString tip() const;
/**
* The next tip will become the current one.
@@ -87,11 +87,11 @@ public:
void prevTip();
private:
- void loadTips(const QString &tipFile);
+ void loadTips(const TQString &tipFile);
- void addTips(const QString &tipFile);
+ void addTips(const TQString &tipFile);
- QStringList mTips;
+ TQStringList mTips;
int mCurrent;
class KTipDatabasePrivate;
@@ -116,7 +116,7 @@ public:
* @param parent Parent widget of TipDialog.
* @param name The object name.
*/
- KTipDialog(KTipDatabase *db, QWidget *parent = 0, const char *name = 0);
+ KTipDialog(KTipDatabase *db, TQWidget *parent = 0, const char *name = 0);
~KTipDialog();
/**
@@ -135,7 +135,7 @@ public:
* @param force If true, the dialog is show, even when the users
* disabled it.
*/
- static void showTip(QWidget *parent, const QString &tipFile = QString::null, bool force=false);
+ static void showTip(TQWidget *parent, const TQString &tipFile = TQString::null, bool force=false);
/**
* Shows a tip
@@ -148,7 +148,7 @@ public:
* @param force If true, the dialog is show, even when the users
* disabled it.
*/
- static void showMultiTip(QWidget *parent, const QStringList &tipFiles, bool force=false);
+ static void showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bool force=false);
/**
* Shows a tip.
@@ -156,7 +156,7 @@ public:
* This methods calls showTip() with the applications main window as parent.
*
*/
- static void showTip(const QString &tipFile = QString::null, bool force = false);
+ static void showTip(const TQString &tipFile = TQString::null, bool force = false);
/**
* Toggles the start behavior.
@@ -167,7 +167,7 @@ public:
static void setShowOnStart(bool show);
protected:
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
virtual void virtual_hook( int id, void* data );
private slots:
@@ -178,7 +178,7 @@ private slots:
private:
KTipDatabase *mDatabase;
- QCheckBox *mTipOnStart;
+ TQCheckBox *mTipOnStart;
KTextBrowser *mTipText;
class KTipDialogPrivate;
@@ -186,7 +186,7 @@ private:
static KTipDialog *mInstance;
- QColor mBaseColor, mBlendedColor, mTextColor;
+ TQColor mBaseColor, mBlendedColor, mTextColor;
};
#endif
diff --git a/kdeui/ktoolbar.cpp b/kdeui/ktoolbar.cpp
index 4d7acd5b1..6f3eddba2 100644
--- a/kdeui/ktoolbar.cpp
+++ b/kdeui/ktoolbar.cpp
@@ -27,20 +27,20 @@
#ifdef KDE_USE_FINAL
#undef Always
-#include <qdockwindow.h>
+#include <tqdockwindow.h>
#endif
#include <string.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qdrawutil.h>
-#include <qstring.h>
-#include <qrect.h>
-#include <qobjectlist.h>
-#include <qtimer.h>
-#include <qstyle.h>
-#include <qlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqdrawutil.h>
+#include <tqstring.h>
+#include <tqrect.h>
+#include <tqobjectlist.h>
+#include <tqtimer.h>
+#include <tqstyle.h>
+#include <tqlayout.h>
#include <ktoolbar.h>
#include <kmainwindow.h>
@@ -114,9 +114,9 @@ public:
bool modified : 1;
bool positioned : 1;
- QWidget *m_parent;
+ TQWidget *m_parent;
- QMainWindow::ToolBarDock oldPos;
+ TQMainWindow::ToolBarDock oldPos;
KXMLGUIClient *m_xmlguiClient;
@@ -130,26 +130,26 @@ public:
};
ToolBarInfo toolBarInfo;
- QValueList<int> iconSizes;
- QTimer repaintTimer;
+ TQValueList<int> iconSizes;
+ TQTimer repaintTimer;
// Default Values.
bool HiddenDefault;
int IconSizeDefault;
- QString IconTextDefault;
+ TQString IconTextDefault;
bool NewLineDefault;
int OffsetDefault;
- QString PositionDefault;
+ TQString PositionDefault;
- QPtrList<QWidget> idleButtons;
+ TQPtrList<TQWidget> idleButtons;
};
-KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, QToolBar *parent,
+KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, TQToolBar *parent,
const char* name )
- :QFrame( parent, name ), line( l )
+ :TQFrame( parent, name ), line( l )
{
- connect( parent, SIGNAL(orientationChanged(Orientation)),
- this, SLOT(setOrientation(Orientation)) );
+ connect( parent, TQT_SIGNAL(orientationChanged(Orientation)),
+ this, TQT_SLOT(setOrientation(Orientation)) );
setOrientation( o );
setBackgroundMode( parent->backgroundMode() );
setBackgroundOrigin( ParentOrigin );
@@ -161,56 +161,56 @@ void KToolBarSeparator::setOrientation( Orientation o )
setFrameStyle( NoFrame );
}
-void KToolBarSeparator::drawContents( QPainter* p )
+void KToolBarSeparator::drawContents( TQPainter* p )
{
if ( line ) {
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if ( orientation() == Horizontal )
- flags = flags | QStyle::Style_Horizontal;
+ flags = flags | TQStyle::Style_Horizontal;
- style().drawPrimitive(QStyle::PE_DockWindowSeparator, p,
+ style().drawPrimitive(TQStyle::PE_DockWindowSeparator, p,
contentsRect(), colorGroup(), flags);
} else {
- QFrame::drawContents(p);
+ TQFrame::drawContents(p);
}
}
-void KToolBarSeparator::styleChange( QStyle& )
+void KToolBarSeparator::styleChange( TQStyle& )
{
setOrientation( orient );
}
-QSize KToolBarSeparator::sizeHint() const
+TQSize KToolBarSeparator::sizeHint() const
{
- int dim = style().pixelMetric( QStyle::PM_DockWindowSeparatorExtent, this );
- return orientation() == Vertical ? QSize( 0, dim ) : QSize( dim, 0 );
+ int dim = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this );
+ return orientation() == Vertical ? TQSize( 0, dim ) : TQSize( dim, 0 );
}
-QSizePolicy KToolBarSeparator::sizePolicy() const
+TQSizePolicy KToolBarSeparator::sizePolicy() const
{
- return QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ return TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
}
-KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool readConfig )
- : QToolBar( QString::fromLatin1( name ),
- dynamic_cast<QMainWindow*>(parent),
+KToolBar::KToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig )
+ : TQToolBar( TQString::fromLatin1( name ),
+ dynamic_cast<TQMainWindow*>(parent),
parent, false,
name ? name : "mainToolBar")
{
init( readConfig, honorStyle );
}
-KToolBar::KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
- : QToolBar( QString::fromLatin1( name ),
+KToolBar::KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
+ : TQToolBar( TQString::fromLatin1( name ),
parentWindow, dock, newLine,
name ? name : "mainToolBar")
{
init( readConfig, honorStyle );
}
-KToolBar::KToolBar( QMainWindow *parentWindow, QWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
- : QToolBar( QString::fromLatin1( name ),
+KToolBar::KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
+ : TQToolBar( TQString::fromLatin1( name ),
parentWindow, dock, newLine,
name ? name : "mainToolBar")
{
@@ -229,17 +229,17 @@ void KToolBar::init( bool readConfig, bool honorStyle )
setFullSize( true );
d->m_honorStyle = honorStyle;
context = 0;
- layoutTimer = new QTimer( this );
- connect( layoutTimer, SIGNAL( timeout() ),
- this, SLOT( rebuildLayout() ) );
- connect( &(d->repaintTimer), SIGNAL( timeout() ),
- this, SLOT( slotRepaint() ) );
+ layoutTimer = new TQTimer( this );
+ connect( layoutTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( rebuildLayout() ) );
+ connect( &(d->repaintTimer), TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotRepaint() ) );
if ( kapp ) { // may be null when started inside designer
- connect(kapp, SIGNAL(toolbarAppearanceChanged(int)), this, SLOT(slotAppearanceChanged()));
+ connect(kapp, TQT_SIGNAL(toolbarAppearanceChanged(int)), this, TQT_SLOT(slotAppearanceChanged()));
// request notification of changes in icon style
kapp->addKipcEventMask(KIPC::IconChanged);
- connect(kapp, SIGNAL(iconChanged(int)), this, SLOT(slotIconChanged(int)));
+ connect(kapp, TQT_SIGNAL(iconChanged(int)), this, TQT_SLOT(slotIconChanged(int)));
}
// finally, read in our configurable settings
@@ -247,15 +247,15 @@ void KToolBar::init( bool readConfig, bool honorStyle )
slotReadConfig();
if ( mainWindow() )
- connect( mainWindow(), SIGNAL( toolBarPositionChanged( QToolBar * ) ),
- this, SLOT( toolBarPosChanged( QToolBar * ) ) );
+ connect( mainWindow(), TQT_SIGNAL( toolBarPositionChanged( TQToolBar * ) ),
+ this, TQT_SLOT( toolBarPosChanged( TQToolBar * ) ) );
// Hack to make sure we recalculate our size when we dock.
- connect( this, SIGNAL(placeChanged(QDockWindow::Place)), SLOT(rebuildLayout()) );
+ connect( this, TQT_SIGNAL(placeChanged(TQDockWindow::Place)), TQT_SLOT(rebuildLayout()) );
}
-int KToolBar::insertButton(const QString& icon, int id, bool enabled,
- const QString& text, int index, KInstance *_instance )
+int KToolBar::insertButton(const TQString& icon, int id, bool enabled,
+ const TQString& text, int index, KInstance *_instance )
{
KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text, _instance );
@@ -266,9 +266,9 @@ int KToolBar::insertButton(const QString& icon, int id, bool enabled,
}
-int KToolBar::insertButton(const QString& icon, int id, const char *signal,
- const QObject *receiver, const char *slot,
- bool enabled, const QString& text, int index, KInstance *_instance )
+int KToolBar::insertButton(const TQString& icon, int id, const char *signal,
+ const TQObject *receiver, const char *slot,
+ bool enabled, const TQString& text, int index, KInstance *_instance )
{
KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text, _instance);
insertWidgetInternal( button, index, id );
@@ -279,8 +279,8 @@ int KToolBar::insertButton(const QString& icon, int id, const char *signal,
}
-int KToolBar::insertButton(const QPixmap& pixmap, int id, bool enabled,
- const QString& text, int index )
+int KToolBar::insertButton(const TQPixmap& pixmap, int id, bool enabled,
+ const TQString& text, int index )
{
KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text);
insertWidgetInternal( button, index, id );
@@ -290,9 +290,9 @@ int KToolBar::insertButton(const QPixmap& pixmap, int id, bool enabled,
}
-int KToolBar::insertButton(const QPixmap& pixmap, int id, const char *signal,
- const QObject *receiver, const char *slot,
- bool enabled, const QString& text,
+int KToolBar::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);
@@ -304,8 +304,8 @@ int KToolBar::insertButton(const QPixmap& pixmap, int id, const char *signal,
}
-int KToolBar::insertButton(const QString& icon, int id, QPopupMenu *popup,
- bool enabled, const QString &text, int index )
+int KToolBar::insertButton(const TQString& icon, int id, TQPopupMenu *popup,
+ bool enabled, const TQString &text, int index )
{
KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text );
insertWidgetInternal( button, index, id );
@@ -316,8 +316,8 @@ int KToolBar::insertButton(const QString& icon, int id, QPopupMenu *popup,
}
-int KToolBar::insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup,
- bool enabled, const QString &text, int index )
+int KToolBar::insertButton(const TQPixmap& pixmap, int id, TQPopupMenu *popup,
+ bool enabled, const TQString &text, int index )
{
KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text );
insertWidgetInternal( button, index, id );
@@ -328,16 +328,16 @@ int KToolBar::insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup,
}
-int KToolBar::insertLined (const QString& text, int id,
+int KToolBar::insertLined (const TQString& text, int id,
const char *signal,
- const QObject *receiver, const char *slot,
+ const TQObject *receiver, const char *slot,
bool enabled ,
- const QString& toolTipText,
+ const TQString& toolTipText,
int size, int index )
{
KLineEdit *lined = new KLineEdit ( this, 0 );
if ( !toolTipText.isEmpty() )
- QToolTip::add( lined, toolTipText );
+ TQToolTip::add( lined, toolTipText );
if ( size > 0 )
lined->setMinimumWidth( size );
insertWidgetInternal( lined, index, id );
@@ -347,12 +347,12 @@ int KToolBar::insertLined (const QString& text, int id,
return index;
}
-int KToolBar::insertCombo (const QStringList &list, int id, bool writable,
- const char *signal, const QObject *receiver,
+int KToolBar::insertCombo (const TQStringList &list, int id, bool writable,
+ const char *signal, const TQObject *receiver,
const char *slot, bool enabled,
- const QString& tooltiptext,
+ const TQString& tooltiptext,
int size, int index,
- QComboBox::Policy policy )
+ TQComboBox::Policy policy )
{
KComboBox *combo = new KComboBox ( writable, this );
@@ -363,7 +363,7 @@ int KToolBar::insertCombo (const QStringList &list, int id, bool writable,
if ( size > 0 )
combo->setMinimumWidth( size );
if (!tooltiptext.isNull())
- QToolTip::add( combo, tooltiptext );
+ TQToolTip::add( combo, tooltiptext );
if ( signal && receiver && slot )
connect ( combo, signal, receiver, slot );
@@ -371,12 +371,12 @@ int KToolBar::insertCombo (const QStringList &list, int id, bool writable,
}
-int KToolBar::insertCombo (const QString& text, int id, bool writable,
- const char *signal, QObject *receiver,
+int KToolBar::insertCombo (const TQString& text, int id, bool writable,
+ const char *signal, TQObject *receiver,
const char *slot, bool enabled,
- const QString& tooltiptext,
+ const TQString& tooltiptext,
int size, int index,
- QComboBox::Policy policy )
+ TQComboBox::Policy policy )
{
KComboBox *combo = new KComboBox ( writable, this );
insertWidgetInternal( combo, index, id );
@@ -386,41 +386,41 @@ int KToolBar::insertCombo (const QString& text, int id, bool writable,
if ( size > 0 )
combo->setMinimumWidth( size );
if (!tooltiptext.isNull())
- QToolTip::add( combo, tooltiptext );
+ TQToolTip::add( combo, tooltiptext );
connect (combo, signal, receiver, slot);
return index;
}
int KToolBar::insertSeparator(int index, int id)
{
- QWidget *w = new KToolBarSeparator( orientation(), false, this, "tool bar separator" );
+ TQWidget *w = new KToolBarSeparator( orientation(), false, this, "tool bar separator" );
insertWidgetInternal( w, index, id );
return index;
}
int KToolBar::insertLineSeparator(int index, int id)
{
- QWidget *w = new KToolBarSeparator( orientation(), true, this, "tool bar separator" );
+ TQWidget *w = new KToolBarSeparator( orientation(), true, this, "tool bar separator" );
insertWidgetInternal( w, index, id );
return index;
}
-int KToolBar::insertWidget(int id, int /*width*/, QWidget *widget, int index)
+int KToolBar::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, QObject *receiver, const char *slot,
- const QString& icons, int index )
+int KToolBar::insertAnimatedWidget(int id, TQObject *receiver, const char *slot,
+ const TQString& icons, int index )
{
KAnimWidget *anim = new KAnimWidget( icons, d->m_iconSize, this );
insertWidgetInternal( anim, index, id );
if ( receiver )
- connect( anim, SIGNAL(clicked()), receiver, slot);
+ connect( anim, TQT_SIGNAL(clicked()), receiver, slot);
return index;
}
@@ -433,13 +433,13 @@ KAnimWidget *KToolBar::animatedWidget( int id )
KAnimWidget *aw = dynamic_cast<KAnimWidget *>(*it);
if ( aw )
return aw;
- QObjectList *l = queryList( "KAnimWidget" );
+ TQObjectList *l = queryList( "KAnimWidget" );
if ( !l || !l->first() ) {
delete l;
return 0;
}
- for ( QObject *o = l->first(); o; o = l->next() ) {
+ for ( TQObject *o = l->first(); o; o = l->next() ) {
KAnimWidget *aw = dynamic_cast<KAnimWidget *>(o);
if ( aw )
{
@@ -454,22 +454,22 @@ KAnimWidget *KToolBar::animatedWidget( int id )
void KToolBar::addConnection (int id, const char *signal,
- const QObject *receiver, const char *slot)
+ const TQObject *receiver, const char *slot)
{
- QWidget* w = getWidget( id );
+ TQWidget* w = getWidget( id );
if ( w )
connect( w, signal, receiver, slot );
}
void KToolBar::setItemEnabled( int id, bool enabled )
{
- QWidget* w = getWidget( id );
+ TQWidget* w = getWidget( id );
if ( w )
w->setEnabled( enabled );
}
-void KToolBar::setButtonPixmap( int id, const QPixmap& _pixmap )
+void KToolBar::setButtonPixmap( int id, const TQPixmap& _pixmap )
{
KToolBarButton * button = getButton( id );
if ( button )
@@ -477,14 +477,14 @@ void KToolBar::setButtonPixmap( int id, const QPixmap& _pixmap )
}
-void KToolBar::setButtonIcon( int id, const QString& _icon )
+void KToolBar::setButtonIcon( int id, const TQString& _icon )
{
KToolBarButton * button = getButton( id );
if ( button )
button->setIcon( _icon );
}
-void KToolBar::setButtonIconSet( int id, const QIconSet& iconset )
+void KToolBar::setButtonIconSet( int id, const TQIconSet& iconset )
{
KToolBarButton * button = getButton( id );
if ( button )
@@ -492,7 +492,7 @@ void KToolBar::setButtonIconSet( int id, const QIconSet& iconset )
}
-void KToolBar::setDelayedPopup (int id , QPopupMenu *_popup, bool toggle )
+void KToolBar::setDelayedPopup (int id , TQPopupMenu *_popup, bool toggle )
{
KToolBarButton * button = getButton( id );
if ( button )
@@ -539,7 +539,7 @@ bool KToolBar::isButtonOn (int id) const
}
-void KToolBar::setLinedText (int id, const QString& text)
+void KToolBar::setLinedText (int id, const TQString& text)
{
KLineEdit * lineEdit = getLined( id );
if ( lineEdit )
@@ -547,21 +547,21 @@ void KToolBar::setLinedText (int id, const QString& text)
}
-QString KToolBar::getLinedText (int id) const
+TQString KToolBar::getLinedText (int id) const
{
KLineEdit * lineEdit = const_cast<KToolBar*>( this )->getLined( id );
- return lineEdit ? lineEdit->text() : QString::null;
+ return lineEdit ? lineEdit->text() : TQString::null;
}
-void KToolBar::insertComboItem (int id, const QString& text, int index)
+void KToolBar::insertComboItem (int id, const TQString& text, int index)
{
KComboBox * comboBox = getCombo( id );
if (comboBox)
comboBox->insertItem( text, index );
}
-void KToolBar::insertComboList (int id, const QStringList &list, int index)
+void KToolBar::insertComboList (int id, const TQStringList &list, 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 QString& text, int index)
+void KToolBar::changeComboItem (int id, const TQString& text, int index)
{
KComboBox * comboBox = getCombo( id );
if (comboBox)
@@ -601,10 +601,10 @@ void KToolBar::clearCombo (int id)
}
-QString KToolBar::getComboItem (int id, int index) const
+TQString KToolBar::getComboItem (int id, int index) const
{
KComboBox * comboBox = const_cast<KToolBar*>( this )->getCombo( id );
- return comboBox ? comboBox->text( index ) : QString::null;
+ return comboBox ? comboBox->text( index ) : TQString::null;
}
@@ -647,7 +647,7 @@ void KToolBar::alignItemRight (int id, bool right )
}
-QWidget *KToolBar::getWidget (int id)
+TQWidget *KToolBar::getWidget (int id)
{
Id2WidgetMap::Iterator it = id2widget.find( id );
return ( it == id2widget.end() ) ? 0 : (*it);
@@ -656,7 +656,7 @@ QWidget *KToolBar::getWidget (int id)
void KToolBar::setItemAutoSized (int id, bool yes )
{
- QWidget *w = getWidget(id);
+ TQWidget *w = getWidget(id);
if ( w && yes )
setStretchableWidget( w );
}
@@ -664,12 +664,12 @@ void KToolBar::setItemAutoSized (int id, bool yes )
void KToolBar::clear ()
{
- /* Delete any idle buttons, so QToolBar doesn't delete them itself, making a mess */
- for(QWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next())
+ /* 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())
w->blockSignals(false);
d->idleButtons.clear();
- QToolBar::clear();
+ TQToolBar::clear();
widget2id.clear();
id2widget.clear();
}
@@ -683,7 +683,7 @@ void KToolBar::removeItem(int id)
kdDebug(220) << name() << " KToolBar::removeItem item " << id << " not found" << endl;
return;
}
- QWidget * w = (*it);
+ TQWidget * w = (*it);
id2widget.remove( id );
widget2id.remove( w );
widgets.removeRef( w );
@@ -699,7 +699,7 @@ void KToolBar::removeItemDelayed(int id)
kdDebug(220) << name() << " KToolBar::removeItem item " << id << " not found" << endl;
return;
}
- QWidget * w = (*it);
+ TQWidget * w = (*it);
id2widget.remove( id );
widget2id.remove( w );
widgets.removeRef( w );
@@ -712,7 +712,7 @@ void KToolBar::removeItemDelayed(int id)
void KToolBar::hideItem (int id)
{
- QWidget *w = getWidget(id);
+ TQWidget *w = getWidget(id);
if ( w )
w->hide();
}
@@ -720,7 +720,7 @@ void KToolBar::hideItem (int id)
void KToolBar::showItem (int id)
{
- QWidget *w = getWidget(id);
+ TQWidget *w = getWidget(id);
if ( w )
w->show();
}
@@ -728,13 +728,13 @@ void KToolBar::showItem (int id)
int KToolBar::itemIndex (int id)
{
- QWidget *w = getWidget(id);
+ TQWidget *w = getWidget(id);
return w ? widgets.findRef(w) : -1;
}
int KToolBar::idAt (int index)
{
- QWidget *w = widgets.at(index);
+ TQWidget *w = widgets.at(index);
return widget2id[w];
}
@@ -769,11 +769,11 @@ void KToolBar::setBarPos (BarPosition bpos)
KToolBar::BarPosition KToolBar::barPos() const
{
if ( !this->mainWindow() )
- return place() == QDockWindow::InDock ? KToolBar::Top : KToolBar::Floating;
+ return place() == TQDockWindow::InDock ? KToolBar::Top : KToolBar::Floating;
Dock dock;
int dm1, dm2;
bool dm3;
- this->mainWindow()->getLocation( (QToolBar*)this, dock, dm1, dm3, dm2 );
+ this->mainWindow()->getLocation( (TQToolBar*)this, dock, dm1, dm3, dm2 );
if ( dock == DockUnmanaged ) {
return (KToolBar::BarPosition)DockTop;
}
@@ -817,7 +817,7 @@ int KToolBar::maxWidth()
}
-void KToolBar::setTitle (const QString& _title)
+void KToolBar::setTitle (const TQString& _title)
{
setLabel( _title );
}
@@ -853,8 +853,8 @@ void KToolBar::setIconText(IconText icontext, bool update)
if (doUpdate)
doModeChange(); // tell buttons what happened
- // ugly hack to force a QMainWindow::triggerLayout( true )
- QMainWindow *mw = mainWindow();
+ // ugly hack to force a TQMainWindow::triggerLayout( true )
+ TQMainWindow *mw = mainWindow();
if ( mw ) {
mw->setUpdatesEnabled( false );
mw->setToolBarsMovable( !mw->toolBarsMovable() );
@@ -890,9 +890,9 @@ void KToolBar::setIconSize(int size, bool update)
if (doUpdate)
doModeChange(); // tell buttons what happened
- // ugly hack to force a QMainWindow::triggerLayout( true )
+ // ugly hack to force a TQMainWindow::triggerLayout( true )
if ( mainWindow() ) {
- QMainWindow *mw = mainWindow();
+ TQMainWindow *mw = mainWindow();
mw->setUpdatesEnabled( false );
mw->setToolBarsMovable( !mw->toolBarsMovable() );
mw->setToolBarsMovable( !mw->toolBarsMovable() );
@@ -911,7 +911,7 @@ int KToolBar::iconSize() const
int KToolBar::iconSizeDefault() const
{
- if (!::qstrcmp(QObject::name(), "mainToolBar"))
+ if (!::qstrcmp(TQObject::name(), "mainToolBar"))
return KGlobal::iconLoader()->currentSize(KIcon::MainToolbar);
return KGlobal::iconLoader()->currentSize(KIcon::Toolbar);
@@ -963,19 +963,19 @@ void KToolBar::saveState()
// first, try to save to the xml file
if ( d->m_xmlguiClient && !d->m_xmlguiClient->xmlFile().isEmpty() ) {
//kdDebug(220) << name() << " saveState: saving to " << d->m_xmlguiClient->xmlFile() << endl;
- QString barname(!::qstrcmp(name(), "unnamed") ? "mainToolBar" : name());
+ TQString barname(!::qstrcmp(name(), "unnamed") ? "mainToolBar" : name());
// try to find our toolbar
d->modified = false;
// go down one level to get to the right tags
- QDomElement current;
- for( QDomNode n = d->m_xmlguiClient->domDocument().documentElement().firstChild();
+ TQDomElement current;
+ for( TQDomNode n = d->m_xmlguiClient->domDocument().documentElement().firstChild();
!n.isNull(); n = n.nextSibling()) {
current = n.toElement();
if ( current.tagName().lower() != "toolbar" )
continue;
- QString curname(current.attribute( "name" ));
+ TQString curname(current.attribute( "name" ));
if ( curname == barname ) {
saveState( current );
@@ -987,21 +987,21 @@ void KToolBar::saveState()
return;
// now we load in the (non-merged) local file
- QString local_xml(KXMLGUIFactory::readConfigFile(d->m_xmlguiClient->xmlFile(), true, d->m_xmlguiClient->instance()));
- QDomDocument local;
+ TQString local_xml(KXMLGUIFactory::readConfigFile(d->m_xmlguiClient->xmlFile(), true, d->m_xmlguiClient->instance()));
+ TQDomDocument local;
local.setContent(local_xml);
// make sure we don't append if this toolbar already exists locally
bool just_append = true;
- for( QDomNode n = local.documentElement().firstChild();
+ for( TQDomNode n = local.documentElement().firstChild();
!n.isNull(); n = n.nextSibling()) {
- QDomElement elem = n.toElement();
+ TQDomElement elem = n.toElement();
if ( elem.tagName().lower() != "toolbar" )
continue;
- QString curname(elem.attribute( "name" ));
+ TQString curname(elem.attribute( "name" ));
if ( curname == barname ) {
just_append = false;
@@ -1020,17 +1020,17 @@ void KToolBar::saveState()
// if that didn't work, we save to the config file
KConfig *config = KGlobal::config();
- saveSettings(config, QString::null);
+ saveSettings(config, TQString::null);
config->sync();
}
-QString KToolBar::settingsGroup() const
+TQString KToolBar::settingsGroup() const
{
- QString configGroup;
+ TQString configGroup;
if (!::qstrcmp(name(), "unnamed") || !::qstrcmp(name(), "mainToolBar"))
configGroup = "Toolbar style";
else
- configGroup = QString(name()) + " Toolbar style";
+ configGroup = TQString(name()) + " Toolbar style";
if ( this->mainWindow() )
{
configGroup.prepend(" ");
@@ -1039,14 +1039,14 @@ QString KToolBar::settingsGroup() const
return configGroup;
}
-void KToolBar::saveSettings(KConfig *config, const QString &_configGroup)
+void KToolBar::saveSettings(KConfig *config, const TQString &_configGroup)
{
- QString configGroup = _configGroup;
+ TQString configGroup = _configGroup;
if (configGroup.isEmpty())
configGroup = settingsGroup();
//kdDebug(220) << name() << " saveSettings() group=" << _configGroup << " -> " << configGroup << endl;
- QString position, icontext;
+ TQString position, icontext;
int index;
getAttributes( position, icontext, index );
@@ -1097,17 +1097,17 @@ void KToolBar::saveSettings(KConfig *config, const QString &_configGroup)
// Don't use kmw->toolBarIterator() because you might
// mess up someone else's iterator. Make the list on your own
- QPtrList<KToolBar> toolbarList;
- QPtrList<QToolBar> lst;
- for ( int i = (int)QMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) {
+ TQPtrList<KToolBar> toolbarList;
+ TQPtrList<TQToolBar> lst;
+ for ( int i = (int)TQMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) {
lst = kmw->toolBars( (ToolBarDock)i );
- for ( QToolBar *tb = lst.first(); tb; tb = lst.next() ) {
+ for ( TQToolBar *tb = lst.first(); tb; tb = lst.next() ) {
if ( !tb->inherits( "KToolBar" ) )
continue;
toolbarList.append( (KToolBar*)tb );
}
}
- QPtrListIterator<KToolBar> toolbarIterator( toolbarList );
+ TQPtrListIterator<KToolBar> toolbarIterator( toolbarList );
if ( !kmw || toolbarIterator.count() > 1 )
config->writeEntry("Index", index);
else
@@ -1130,13 +1130,13 @@ void KToolBar::setXMLGUIClient( KXMLGUIClient *client )
d->m_xmlguiClient = client;
}
-void KToolBar::setText( const QString & txt )
+void KToolBar::setText( const TQString & txt )
{
setLabel( txt + " (" + kapp->caption() + ") " );
}
-QString KToolBar::text() const
+TQString KToolBar::text() const
{
return label();
}
@@ -1144,22 +1144,22 @@ QString KToolBar::text() const
void KToolBar::doConnections( KToolBarButton *button )
{
- connect(button, SIGNAL(clicked(int)), this, SIGNAL( clicked( int ) ) );
- connect(button, SIGNAL(doubleClicked(int)), this, SIGNAL( doubleClicked( int ) ) );
- connect(button, SIGNAL(released(int)), this, SIGNAL( released( int ) ) );
- connect(button, SIGNAL(pressed(int)), this, SIGNAL( pressed( int ) ) );
- connect(button, SIGNAL(toggled(int)), this, SIGNAL( toggled( int ) ) );
- connect(button, SIGNAL(highlighted(int, bool)), this, SIGNAL( highlighted( int, bool ) ) );
+ connect(button, TQT_SIGNAL(clicked(int)), this, TQT_SIGNAL( clicked( int ) ) );
+ connect(button, TQT_SIGNAL(doubleClicked(int)), this, TQT_SIGNAL( doubleClicked( int ) ) );
+ connect(button, TQT_SIGNAL(released(int)), this, TQT_SIGNAL( released( int ) ) );
+ connect(button, TQT_SIGNAL(pressed(int)), this, TQT_SIGNAL( pressed( int ) ) );
+ connect(button, TQT_SIGNAL(toggled(int)), this, TQT_SIGNAL( toggled( int ) ) );
+ connect(button, TQT_SIGNAL(highlighted(int, bool)), this, TQT_SIGNAL( highlighted( int, bool ) ) );
}
-void KToolBar::mousePressEvent ( QMouseEvent *m )
+void KToolBar::mousePressEvent ( TQMouseEvent *m )
{
if ( !mainWindow() )
return;
- QMainWindow *mw = mainWindow();
+ TQMainWindow *mw = mainWindow();
if ( mw->toolBarsMovable() && d->m_enableContext ) {
if ( m->button() == RightButton ) {
- QGuardedPtr<KToolBar> guard( this );
+ TQGuardedPtr<KToolBar> guard( this );
int i = contextMenu()->exec( m->globalPos(), 0 );
// "Configure Toolbars" recreates toolbars, so we might not exist anymore.
if ( guard )
@@ -1212,7 +1212,7 @@ void KToolBar::mousePressEvent ( QMouseEvent *m )
void KToolBar::doModeChange()
{
- for(QWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next())
+ for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next())
w->blockSignals(false);
d->idleButtons.clear();
@@ -1221,20 +1221,20 @@ void KToolBar::doModeChange()
void KToolBar::rebuildLayout()
{
- for(QWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next())
+ for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next())
w->blockSignals(false);
d->idleButtons.clear();
layoutTimer->stop();
- QApplication::sendPostedEvents( this, QEvent::ChildInserted );
- QBoxLayout *l = boxLayout();
+ TQApplication::sendPostedEvents( this, TQEvent::ChildInserted );
+ TQBoxLayout *l = boxLayout();
// clear the old layout
- QLayoutIterator it = l->iterator();
+ TQLayoutIterator it = l->iterator();
while ( it.current() )
it.deleteCurrent();
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
+ for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( w == rightAligned )
continue;
KToolBarSeparator *ktbs = dynamic_cast<KToolBarSeparator *>(w);
@@ -1243,11 +1243,11 @@ void KToolBar::rebuildLayout()
w->hide();
continue;
}
- if ( dynamic_cast<QPopupMenu *>(w) ) // w is a QPopupMenu?
+ if ( dynamic_cast<TQPopupMenu *>(w) ) // w is a QPopupMenu?
continue;
l->addWidget( w );
w->show();
- if ((orientation() == Horizontal) && dynamic_cast<QLineEdit *>(w)) // w is QLineEdit ?
+ if ((orientation() == Horizontal) && dynamic_cast<TQLineEdit *>(w)) // w is TQLineEdit ?
l->addSpacing(2); // A little bit extra spacing behind it.
}
if ( rightAligned ) {
@@ -1263,20 +1263,20 @@ void KToolBar::rebuildLayout()
l->setStretchFactor( stretchableWidget, 10 );
}
l->invalidate();
- QApplication::postEvent( this, new QEvent( QEvent::LayoutHint ) );
+ TQApplication::postEvent( this, new TQEvent( TQEvent::LayoutHint ) );
}
-void KToolBar::childEvent( QChildEvent *e )
+void KToolBar::childEvent( TQChildEvent *e )
{
if ( e->child()->isWidgetType() ) {
- QWidget * w = dynamic_cast<QWidget *>(e->child());
+ TQWidget * w = dynamic_cast<TQWidget *>(e->child());
if (!w || !(::qstrcmp( "qt_dockwidget_internal", w->name())))
{
- QToolBar::childEvent( e );
+ TQToolBar::childEvent( e );
return;
}
- if ( e->type() == QEvent::ChildInserted ) {
- if ( !dynamic_cast<QPopupMenu *>(w)) { // e->child() is not a QPopupMenu
+ if ( e->type() == TQEvent::ChildInserted ) {
+ if ( !dynamic_cast<TQPopupMenu *>(w)) { // e->child() is not a QPopupMenu
// prevent items that have been explicitly inserted by insert*() from
// being inserted again
if ( !widget2id.contains( w ) )
@@ -1291,25 +1291,25 @@ void KToolBar::childEvent( QChildEvent *e )
if ( isVisibleTo( 0 ) )
{
layoutTimer->start( 50, true );
- QBoxLayout *l = boxLayout();
+ TQBoxLayout *l = boxLayout();
// clear the old layout so that we don't get unnecassery layout
// changes till we have rebuild the thing
- QLayoutIterator it = l->iterator();
+ TQLayoutIterator it = l->iterator();
while ( it.current() )
it.deleteCurrent();
}
}
- QToolBar::childEvent( e );
+ TQToolBar::childEvent( e );
}
-void KToolBar::insertWidgetInternal( QWidget *w, int &index, int id )
+void KToolBar::insertWidgetInternal( TQWidget *w, int &index, int id )
{
// we can't have it in widgets, or something is really wrong
//widgets.removeRef( w );
- connect( w, SIGNAL( destroyed() ),
- this, SLOT( widgetDestroyed() ) );
+ connect( w, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( widgetDestroyed() ) );
if ( index == -1 || index > (int)widgets.count() ) {
index = (int)widgets.count();
widgets.append( w );
@@ -1322,90 +1322,90 @@ void KToolBar::insertWidgetInternal( QWidget *w, int &index, int id )
widget2id.insert( w, id );
}
-void KToolBar::showEvent( QShowEvent *e )
+void KToolBar::showEvent( TQShowEvent *e )
{
- QToolBar::showEvent( e );
+ TQToolBar::showEvent( e );
rebuildLayout();
}
-void KToolBar::setStretchableWidget( QWidget *w )
+void KToolBar::setStretchableWidget( TQWidget *w )
{
- QToolBar::setStretchableWidget( w );
+ TQToolBar::setStretchableWidget( w );
stretchableWidget = w;
}
-QSizePolicy KToolBar::sizePolicy() const
+TQSizePolicy KToolBar::sizePolicy() const
{
if ( orientation() == Horizontal )
- return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+ return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
else
- return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Expanding );
+ return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding );
}
-QSize KToolBar::sizeHint() const
+TQSize KToolBar::sizeHint() const
{
- QSize minSize(0,0);
+ TQSize minSize(0,0);
KToolBar *ncThis = const_cast<KToolBar *>(this);
ncThis->polish();
- int margin = static_cast<QWidget*>(ncThis)->layout()->margin() + frameWidth();
+ int margin = static_cast<TQWidget*>(ncThis)->layout()->margin() + frameWidth();
switch( barPos() )
{
case KToolBar::Top:
case KToolBar::Bottom:
- for ( QWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() )
+ for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() )
{
- QSize sh = w->sizeHint();
- if ( w->sizePolicy().horData() == QSizePolicy::Ignored )
+ TQSize sh = w->sizeHint();
+ if ( w->sizePolicy().horData() == TQSizePolicy::Ignored )
sh.setWidth( 1 );
- if ( w->sizePolicy().verData() == QSizePolicy::Ignored )
+ if ( w->sizePolicy().verData() == TQSizePolicy::Ignored )
sh.setHeight( 1 );
sh = sh.boundedTo( w->maximumSize() )
- .expandedTo( w->minimumSize() ).expandedTo( QSize(1, 1) );
+ .expandedTo( w->minimumSize() ).expandedTo( TQSize(1, 1) );
- minSize = minSize.expandedTo(QSize(0, sh.height()));
- minSize += QSize(sh.width()+1, 0);
- if (dynamic_cast<QLineEdit *>(w)) // w is a QLineEdit ?
- minSize += QSize(2, 0); // A little bit extra spacing behind it.
+ minSize = minSize.expandedTo(TQSize(0, sh.height()));
+ minSize += TQSize(sh.width()+1, 0);
+ if (dynamic_cast<TQLineEdit *>(w)) // w is a TQLineEdit ?
+ minSize += TQSize(2, 0); // A little bit extra spacing behind it.
}
- minSize += QSize(QApplication::style().pixelMetric( QStyle::PM_DockWindowHandleExtent ), 0);
- minSize += QSize(margin*2, margin*2);
+ minSize += TQSize(TQApplication::style().pixelMetric( TQStyle::PM_DockWindowHandleExtent ), 0);
+ minSize += TQSize(margin*2, margin*2);
break;
case KToolBar::Left:
case KToolBar::Right:
- for ( QWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() )
+ for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() )
{
- QSize sh = w->sizeHint();
- if ( w->sizePolicy().horData() == QSizePolicy::Ignored )
+ TQSize sh = w->sizeHint();
+ if ( w->sizePolicy().horData() == TQSizePolicy::Ignored )
sh.setWidth( 1 );
- if ( w->sizePolicy().verData() == QSizePolicy::Ignored )
+ if ( w->sizePolicy().verData() == TQSizePolicy::Ignored )
sh.setHeight( 1 );
sh = sh.boundedTo( w->maximumSize() )
- .expandedTo( w->minimumSize() ).expandedTo( QSize(1, 1) );
+ .expandedTo( w->minimumSize() ).expandedTo( TQSize(1, 1) );
- minSize = minSize.expandedTo(QSize(sh.width(), 0));
- minSize += QSize(0, sh.height()+1);
+ minSize = minSize.expandedTo(TQSize(sh.width(), 0));
+ minSize += TQSize(0, sh.height()+1);
}
- minSize += QSize(0, QApplication::style().pixelMetric( QStyle::PM_DockWindowHandleExtent ));
- minSize += QSize(margin*2, margin*2);
+ minSize += TQSize(0, TQApplication::style().pixelMetric( TQStyle::PM_DockWindowHandleExtent ));
+ minSize += TQSize(margin*2, margin*2);
break;
default:
- minSize = QToolBar::sizeHint();
+ minSize = TQToolBar::sizeHint();
break;
}
return minSize;
}
-QSize KToolBar::minimumSize() const
+TQSize KToolBar::minimumSize() const
{
return minimumSizeHint();
}
-QSize KToolBar::minimumSizeHint() const
+TQSize KToolBar::minimumSizeHint() const
{
return sizeHint();
}
@@ -1417,19 +1417,19 @@ bool KToolBar::highlight() const
void KToolBar::hide()
{
- QToolBar::hide();
+ TQToolBar::hide();
}
void KToolBar::show()
{
- QToolBar::show();
+ TQToolBar::show();
}
-void KToolBar::resizeEvent( QResizeEvent *e )
+void KToolBar::resizeEvent( TQResizeEvent *e )
{
bool b = isUpdatesEnabled();
setUpdatesEnabled( false );
- QToolBar::resizeEvent( e );
+ TQToolBar::resizeEvent( e );
if (b)
{
if (layoutTimer->isActive())
@@ -1464,13 +1464,13 @@ void KToolBar::slotReadConfig()
// Read appearance settings (hmm, we used to do both here,
// but a well behaved application will call applyMainWindowSettings
// anyway, right ?)
- applyAppearanceSettings(KGlobal::config(), QString::null );
+ applyAppearanceSettings(KGlobal::config(), TQString::null );
}
void KToolBar::slotAppearanceChanged()
{
// Read appearance settings from global file.
- applyAppearanceSettings(KGlobal::config(), QString::null, true /* lose local settings */ );
+ applyAppearanceSettings(KGlobal::config(), TQString::null, true /* lose local settings */ );
// And remember to save the new look later
KMainWindow *kmw = dynamic_cast<KMainWindow *>(mainWindow());
@@ -1481,25 +1481,25 @@ void KToolBar::slotAppearanceChanged()
//static
bool KToolBar::highlightSetting()
{
- QString grpToolbar(QString::fromLatin1("Toolbar style"));
+ TQString grpToolbar(TQString::fromLatin1("Toolbar style"));
KConfigGroupSaver saver(KGlobal::config(), grpToolbar);
- return KGlobal::config()->readBoolEntry(QString::fromLatin1("Highlighting"),true);
+ return KGlobal::config()->readBoolEntry(TQString::fromLatin1("Highlighting"),true);
}
//static
bool KToolBar::transparentSetting()
{
- QString grpToolbar(QString::fromLatin1("Toolbar style"));
+ TQString grpToolbar(TQString::fromLatin1("Toolbar style"));
KConfigGroupSaver saver(KGlobal::config(), grpToolbar);
- return KGlobal::config()->readBoolEntry(QString::fromLatin1("TransparentMoving"),true);
+ return KGlobal::config()->readBoolEntry(TQString::fromLatin1("TransparentMoving"),true);
}
//static
KToolBar::IconText KToolBar::iconTextSetting()
{
- QString grpToolbar(QString::fromLatin1("Toolbar style"));
+ TQString grpToolbar(TQString::fromLatin1("Toolbar style"));
KConfigGroupSaver saver(KGlobal::config(), grpToolbar);
- QString icontext = KGlobal::config()->readEntry(QString::fromLatin1("IconText"),QString::fromLatin1("IconOnly"));
+ TQString icontext = KGlobal::config()->readEntry(TQString::fromLatin1("IconText"),TQString::fromLatin1("IconOnly"));
if ( icontext == "IconTextRight" )
return IconTextRight;
else if ( icontext == "IconTextBottom" )
@@ -1510,9 +1510,9 @@ KToolBar::IconText KToolBar::iconTextSetting()
return IconOnly;
}
-void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGroup, bool forceGlobal)
+void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configGroup, bool forceGlobal)
{
- QString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup;
+ TQString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup;
//kdDebug(220) << name() << " applyAppearanceSettings: configGroup=" << configGroup << " forceGlobal=" << forceGlobal << endl;
// If we have application-specific settings in the XML file,
@@ -1524,10 +1524,10 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGr
KConfig *gconfig = KGlobal::config();
- static const QString &attrIconText = KGlobal::staticQString("IconText");
- static const QString &attrHighlight = KGlobal::staticQString("Highlighting");
- static const QString &attrTrans = KGlobal::staticQString("TransparentMoving");
- static const QString &attrIconSize = KGlobal::staticQString("IconSize");
+ static const TQString &attrIconText = KGlobal::staticQString("IconText");
+ static const TQString &attrHighlight = KGlobal::staticQString("Highlighting");
+ static const TQString &attrTrans = KGlobal::staticQString("TransparentMoving");
+ static const TQString &attrIconSize = KGlobal::staticQString("IconSize");
// we actually do this in two steps.
// First, we read in the global styles [Toolbar style] (from the KControl module).
@@ -1538,10 +1538,10 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGr
bool applyIconSize = !xmlgui;
int iconSize = d->IconSizeDefault;
- QString iconText = d->IconTextDefault;
+ TQString iconText = d->IconTextDefault;
// this is the first iteration
- QString grpToolbar(QString::fromLatin1("Toolbar style"));
+ TQString grpToolbar(TQString::fromLatin1("Toolbar style"));
{ // start block for KConfigGroupSaver
KConfigGroupSaver saver(gconfig, grpToolbar);
@@ -1612,7 +1612,7 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGr
doUpdate = true;
}
- QMainWindow *mw = mainWindow();
+ TQMainWindow *mw = mainWindow();
// ...and if we should highlight
if ( highlight != d->m_highlight ) {
@@ -1632,16 +1632,16 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGr
updateGeometry();
}
-void KToolBar::applySettings(KConfig *config, const QString &_configGroup)
+void KToolBar::applySettings(KConfig *config, const TQString &_configGroup)
{
return applySettings(config,_configGroup,false);
}
-void KToolBar::applySettings(KConfig *config, const QString &_configGroup, bool force)
+void KToolBar::applySettings(KConfig *config, const TQString &_configGroup, bool force)
{
//kdDebug(220) << name() << " applySettings group=" << _configGroup << endl;
- QString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup;
+ TQString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup;
/*
Let's explain this a bit more in details.
@@ -1665,13 +1665,13 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup, bool
{
KConfigGroupSaver cgs(config, configGroup);
- static const QString &attrPosition = KGlobal::staticQString("Position");
- static const QString &attrIndex = KGlobal::staticQString("Index");
- static const QString &attrOffset = KGlobal::staticQString("Offset");
- static const QString &attrNewLine = KGlobal::staticQString("NewLine");
- static const QString &attrHidden = KGlobal::staticQString("Hidden");
+ static const TQString &attrPosition = KGlobal::staticQString("Position");
+ static const TQString &attrIndex = KGlobal::staticQString("Index");
+ static const TQString &attrOffset = KGlobal::staticQString("Offset");
+ static const TQString &attrNewLine = KGlobal::staticQString("NewLine");
+ static const TQString &attrHidden = KGlobal::staticQString("Hidden");
- QString position = config->readEntry(attrPosition, d->PositionDefault);
+ TQString position = config->readEntry(attrPosition, d->PositionDefault);
int index = config->readNumEntry(attrIndex, -1);
int offset = config->readNumEntry(attrOffset, d->OffsetDefault);
bool newLine = config->readBoolEntry(attrNewLine, d->NewLineDefault);
@@ -1708,21 +1708,21 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup, bool
}
}
-bool KToolBar::event( QEvent *e )
+bool KToolBar::event( TQEvent *e )
{
- if ( (e->type() == QEvent::LayoutHint) && isUpdatesEnabled() )
+ if ( (e->type() == TQEvent::LayoutHint) && isUpdatesEnabled() )
d->repaintTimer.start( 100, true );
- if (e->type() == QEvent::ChildInserted )
+ if (e->type() == TQEvent::ChildInserted )
{
- // Bypass QToolBar::event,
+ // Bypass TQToolBar::event,
// it will show() the inserted child and we don't want to
// do that until we have rebuilt the layout.
- childEvent((QChildEvent *)e);
+ childEvent((TQChildEvent *)e);
return true;
}
- return QToolBar::event( e );
+ return TQToolBar::event( e );
}
void KToolBar::slotRepaint()
@@ -1731,26 +1731,26 @@ void KToolBar::slotRepaint()
// Send a resizeEvent to update the "toolbar extension arrow"
// (The button you get when your toolbar-items don't fit in
// the available space)
- QResizeEvent ev(size(), size());
+ TQResizeEvent ev(size(), size());
resizeEvent(&ev);
- QApplication::sendPostedEvents( this, QEvent::LayoutHint );
+ TQApplication::sendPostedEvents( this, TQEvent::LayoutHint );
setUpdatesEnabled( true );
repaint( true );
}
-void KToolBar::toolBarPosChanged( QToolBar *tb )
+void KToolBar::toolBarPosChanged( TQToolBar *tb )
{
if ( tb != this )
return;
if ( d->oldPos == DockMinimized )
rebuildLayout();
- d->oldPos = (QMainWindow::ToolBarDock)barPos();
+ d->oldPos = (TQMainWindow::ToolBarDock)barPos();
KMainWindow *kmw = dynamic_cast<KMainWindow *>(mainWindow());
if ( kmw )
kmw->setSettingsDirty();
}
-static KToolBar::Dock stringToDock( const QString& attrPosition )
+static KToolBar::Dock stringToDock( const TQString& attrPosition )
{
KToolBar::Dock dock = KToolBar::DockTop;
if ( !attrPosition.isEmpty() ) {
@@ -1771,15 +1771,15 @@ static KToolBar::Dock stringToDock( const QString& attrPosition )
}
-void KToolBar::loadState( const QDomElement &element )
+void KToolBar::loadState( const TQDomElement &element )
{
- QMainWindow *mw = mainWindow();
+ TQMainWindow *mw = mainWindow();
if ( !mw )
return;
{
- QCString text = element.namedItem( "text" ).toElement().text().utf8();
+ TQCString text = element.namedItem( "text" ).toElement().text().utf8();
if ( text.isEmpty() )
text = element.namedItem( "Text" ).toElement().text().utf8();
if ( !text.isEmpty() )
@@ -1787,7 +1787,7 @@ void KToolBar::loadState( const QDomElement &element )
}
{
- QCString attrFullWidth = element.attribute( "fullWidth" ).lower().latin1();
+ TQCString attrFullWidth = element.attribute( "fullWidth" ).lower().latin1();
if ( !attrFullWidth.isEmpty() )
setFullSize( attrFullWidth == "true" );
}
@@ -1825,7 +1825,7 @@ void KToolBar::loadState( const QDomElement &element )
Dock dock = stringToDock( element.attribute( "position" ).lower() );
{
- QCString attrIconText = element.attribute( "iconText" ).lower().latin1();
+ TQCString attrIconText = element.attribute( "iconText" ).lower().latin1();
if ( !attrIconText.isEmpty() ) {
//kdDebug(220) << name() << " loadState attrIconText=" << attrIconText << endl;
if ( attrIconText == "icontextright" )
@@ -1847,7 +1847,7 @@ void KToolBar::loadState( const QDomElement &element )
}
}
- QString attrIconSize = element.attribute( "iconSize" ).lower();
+ TQString attrIconSize = element.attribute( "iconSize" ).lower();
int iconSize = d->IconSizeDefault;
if ( !attrIconSize.isEmpty() )
iconSize = attrIconSize.toInt();
@@ -1856,7 +1856,7 @@ void KToolBar::loadState( const QDomElement &element )
int index = -1; // append by default. This is very important, otherwise
// with all 0 indexes, we keep reversing the toolbars.
{
- QString attrIndex = element.attribute( "index" ).lower();
+ TQString attrIndex = element.attribute( "index" ).lower();
if ( !attrIndex.isEmpty() )
index = attrIndex.toInt();
}
@@ -1866,19 +1866,19 @@ void KToolBar::loadState( const QDomElement &element )
bool hidden = d->HiddenDefault;
{
- QString attrOffset = element.attribute( "offset" );
+ TQString attrOffset = element.attribute( "offset" );
if ( !attrOffset.isEmpty() )
offset = attrOffset.toInt();
}
{
- QString attrNewLine = element.attribute( "newline" ).lower();
+ TQString attrNewLine = element.attribute( "newline" ).lower();
if ( !attrNewLine.isEmpty() )
newLine = attrNewLine == "true";
}
{
- QString attrHidden = element.attribute( "hidden" ).lower();
+ TQString attrHidden = element.attribute( "hidden" ).lower();
if ( !attrHidden.isEmpty() ) {
hidden = attrHidden == "true";
}
@@ -1919,7 +1919,7 @@ int KToolBar::dockWindowIndex()
int index = 0;
Q_ASSERT( mainWindow() );
if ( mainWindow() ) {
- QMainWindow::ToolBarDock dock;
+ TQMainWindow::ToolBarDock dock;
bool newLine;
int offset;
mainWindow()->getLocation( this, dock, index, newLine, offset );
@@ -1927,7 +1927,7 @@ int KToolBar::dockWindowIndex()
return index;
}
-void KToolBar::getAttributes( QString &position, QString &icontext, int &index )
+void KToolBar::getAttributes( TQString &position, TQString &icontext, int &index )
{
// get all of the stuff to save
switch ( barPos() ) {
@@ -1972,10 +1972,10 @@ void KToolBar::getAttributes( QString &position, QString &icontext, int &index )
//kdDebug(220) << name() << " getAttributes: icontext=" << icontext << endl;
}
-void KToolBar::saveState( QDomElement &current )
+void KToolBar::saveState( TQDomElement &current )
{
Q_ASSERT( !current.isNull() );
- QString position, icontext;
+ TQString position, icontext;
int index = -1;
getAttributes( position, icontext, index );
@@ -2035,7 +2035,7 @@ KPopupMenu *KToolBar::contextMenu()
if ( context )
return context;
// Construct our context popup menu. Name it qt_dockwidget_internal so it
- // won't be deleted by QToolBar::clear().
+ // won't be deleted by TQToolBar::clear().
context = new KPopupMenu( this, "qt_dockwidget_internal" );
context->insertTitle(i18n("Toolbar Menu"));
@@ -2058,10 +2058,10 @@ KPopupMenu *KToolBar::contextMenu()
size->insertItem( i18n("Default"), CONTEXT_ICONSIZES );
// Query the current theme for available sizes
KIconTheme *theme = KGlobal::instance()->iconLoader()->theme();
- QValueList<int> avSizes;
+ TQValueList<int> avSizes;
if (theme)
{
- if (!::qstrcmp(QObject::name(), "mainToolBar"))
+ if (!::qstrcmp(TQObject::name(), "mainToolBar"))
avSizes = theme->querySizes( KIcon::MainToolbar);
else
avSizes = theme->querySizes( KIcon::Toolbar);
@@ -2070,12 +2070,12 @@ KPopupMenu *KToolBar::contextMenu()
d->iconSizes = avSizes;
qHeapSort(avSizes);
- QValueList<int>::Iterator it;
+ TQValueList<int>::Iterator it;
if (avSizes.count() < 10) {
// Fixed or threshold type icons
- QValueList<int>::Iterator end(avSizes.end());
+ TQValueList<int>::Iterator end(avSizes.end());
for (it=avSizes.begin(); it!=end; ++it) {
- QString text;
+ TQString text;
if ( *it < 19 )
text = i18n("Small (%1x%2)").arg(*it).arg(*it);
else if (*it < 25)
@@ -2096,7 +2096,7 @@ KPopupMenu *KToolBar::contextMenu()
for (uint i = 0; i < 9; i++) {
while (it++ != avSizes.end()) {
if (*it >= progression[i]) {
- QString text;
+ TQString text;
if ( *it < 19 )
text = i18n("Small (%1x%2)").arg(*it).arg(*it);
else if (*it < 25)
@@ -2119,10 +2119,10 @@ KPopupMenu *KToolBar::contextMenu()
context->setItemChecked(CONTEXT_ICONS, true);
context->insertItem( i18n("Icon Size"), size );
- connect( context, SIGNAL( aboutToShow() ), this, SLOT( slotContextAboutToShow() ) );
+ connect( context, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotContextAboutToShow() ) );
// Unplugging a submenu from abouttohide leads to the popupmenu floating around
// So better simply call that code from after exec() returns (DF)
- //connect( context, SIGNAL( aboutToHide() ), this, SLOT( slotContextAboutToHide() ) );
+ //connect( context, TQT_SIGNAL( aboutToHide() ), this, TQT_SLOT( slotContextAboutToHide() ) );
return context;
}
@@ -2151,7 +2151,7 @@ void KToolBar::slotContextAboutToShow()
configureAction = kmw->actionCollection()->action(actionName);
if ( configureAction )
configureAction->plug(context);
- KEditToolbar::setDefaultToolbar(QObject::name());
+ KEditToolbar::setDefaultToolbar(TQObject::name());
for(int i = CONTEXT_ICONS; i <= CONTEXT_TEXTUNDER; ++i)
context->setItemChecked(i, false);
@@ -2173,8 +2173,8 @@ void KToolBar::slotContextAboutToShow()
break;
}
- QValueList<int>::ConstIterator iIt = d->iconSizes.begin();
- QValueList<int>::ConstIterator iEnd = d->iconSizes.end();
+ TQValueList<int>::ConstIterator iIt = d->iconSizes.begin();
+ TQValueList<int>::ConstIterator iEnd = d->iconSizes.end();
for (; iIt != iEnd; ++iIt )
context->setItemChecked( CONTEXT_ICONSIZES + *iIt, false );
@@ -2228,24 +2228,24 @@ void KToolBar::slotContextAboutToHide()
if ( configureAction )
configureAction->unplug(context);
- QPtrListIterator<QWidget> it( widgets );
- QWidget *wdg;
+ TQPtrListIterator<TQWidget> it( widgets );
+ TQWidget *wdg;
while ( ( wdg = it.current() ) != 0 ) {
- if ( wdg->inherits( "QToolButton" ) )
- static_cast<QToolButton*>( wdg )->setDown( false );
+ if ( wdg->inherits( "TQToolButton" ) )
+ static_cast<TQToolButton*>( wdg )->setDown( false );
++it;
}
}
void KToolBar::widgetDestroyed()
{
- removeWidgetInternal( (QWidget*)sender() );
+ removeWidgetInternal( (TQWidget*)sender() );
}
-void KToolBar::removeWidgetInternal( QWidget * w )
+void KToolBar::removeWidgetInternal( TQWidget * w )
{
widgets.removeRef( w );
- QMap< QWidget*, int >::Iterator it = widget2id.find( w );
+ TQMap< TQWidget*, int >::Iterator it = widget2id.find( w );
if ( it == widget2id.end() )
return;
id2widget.remove( *it );
diff --git a/kdeui/ktoolbar.h b/kdeui/ktoolbar.h
index 3deab0f73..0eb974f24 100644
--- a/kdeui/ktoolbar.h
+++ b/kdeui/ktoolbar.h
@@ -24,14 +24,14 @@
#ifndef KTOOLBAR_H
#define KTOOLBAR_H
-#include <qtoolbar.h>
-#include <qmainwindow.h>
-#include <qcombobox.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qguardedptr.h>
-#include <qframe.h>
-#include <qiconset.h>
+#include <tqtoolbar.h>
+#include <tqmainwindow.h>
+#include <tqcombobox.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqguardedptr.h>
+#include <tqframe.h>
+#include <tqiconset.h>
#include <kglobal.h>
@@ -59,17 +59,17 @@ class KDEUI_EXPORT KToolBarSeparator : public QFrame
{
Q_OBJECT
public:
- KToolBarSeparator( Orientation, bool l, QToolBar *parent, const char* name=0 );
+ KToolBarSeparator( Orientation, bool l, TQToolBar *parent, const char* name=0 );
- QSize sizeHint() const;
+ TQSize sizeHint() const;
Orientation orientation() const { return orient; }
- QSizePolicy sizePolicy() const;
+ TQSizePolicy sizePolicy() const;
bool showLine() const { return line; }
public slots:
void setOrientation( Orientation );
protected:
- void styleChange( QStyle& );
- void drawContents( QPainter* );
+ void styleChange( TQStyle& );
+ void drawContents( TQPainter* );
private:
Orientation orient;
bool line;
@@ -108,7 +108,7 @@ class KDEUI_EXPORT KToolBar : public QToolBar
Q_PROPERTY( BarPosition barPos READ barPos WRITE setBarPos )
Q_PROPERTY( bool fullSize READ fullSize WRITE setFullSize )
Q_PROPERTY( int iconSize READ iconSize WRITE setIconSize )
- Q_PROPERTY( QString text READ text WRITE setText )
+ Q_PROPERTY( TQString text READ text WRITE setText )
public:
enum IconText{IconOnly = 0, IconTextRight, TextOnly, IconTextBottom};
@@ -125,7 +125,7 @@ public:
/**
* Normal constructor.
* This constructor is used by the XML-GUI. If you use it, you need
- * to call QMainWindow::addToolBar to specify the position of the toolbar.
+ * to call TQMainWindow::addToolBar to specify the position of the toolbar.
* So it's simpler to use the other constructor.
*
* The toolbar will read in various global config settings for
@@ -139,7 +139,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( QWidget *parent, const char *name = 0, bool honorStyle = false, bool readConfig = true );
+ KToolBar( TQWidget *parent, const char *name = 0, bool honorStyle = false, bool readConfig = true );
/**
* Constructor for non-XML-GUI applications.
@@ -150,13 +150,13 @@ public:
* true. All other toolbars will be IconOnly and use Medium icons.
*
* @param parentWindow The window that should be the parent of this toolbar
- * @param dock The position of the toolbar. Usually QMainWindow::Top.
+ * @param dock The position of the toolbar. Usually TQMainWindow::Top.
* @param newLine If true, start a new line in the dock for this toolbar.
* @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( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock /*= QMainWindow::Top*/, bool newLine = false,
+ KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock /*= TQMainWindow::Top*/, bool newLine = false,
const char *name = 0, bool honorStyle = false, bool readConfig = true );
/**
@@ -174,7 +174,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( QMainWindow *parentWindow, QWidget *dock, bool newLine = false,
+ KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine = false,
const char *name = 0, bool honorStyle = false, bool readConfig = true );
/**
@@ -203,8 +203,8 @@ public:
*
* @return The item index.
*/
- int insertButton(const QString& icon, int id, bool enabled = true,
- const QString& text = QString::null, int index=-1,
+ int insertButton(const TQString& icon, int id, bool enabled = true,
+ const TQString& text = TQString::null, int index=-1,
KInstance *_instance = KGlobal::instance());
/**
@@ -225,9 +225,9 @@ public:
*
* @return The item index.
*/
- int insertButton(const QString& icon, int id, const char *signal,
- const QObject *receiver, const char *slot,
- bool enabled = true, const QString& text = QString::null,
+ int insertButton(const TQString& icon, int id, const char *signal,
+ const TQObject *receiver, const char *slot,
+ bool enabled = true, const TQString& text = TQString::null,
int index=-1, KInstance *_instance = KGlobal::instance() );
/**
@@ -254,8 +254,8 @@ public:
*
* @return The item index.
*/
- int insertButton(const QPixmap& pixmap, int id, bool enabled = true,
- const QString& text = QString::null, int index=-1 );
+ int insertButton(const TQPixmap& pixmap, int id, bool enabled = true,
+ const TQString& text = TQString::null, int index=-1 );
/**
* This is the same as above, but with specified signals and
@@ -274,9 +274,9 @@ public:
*
* @return The item index.
*/
- int insertButton(const QPixmap& pixmap, int id, const char *signal,
- const QObject *receiver, const char *slot,
- bool enabled = true, const QString& text = QString::null,
+ int insertButton(const TQPixmap& pixmap, int id, const char *signal,
+ const TQObject *receiver, const char *slot,
+ bool enabled = true, const TQString& text = TQString::null,
int index=-1 );
/**
@@ -288,11 +288,11 @@ public:
* KButton::clicked() or KButton::doubleClicked() are @p not
* emmited by
* this button (see setDelayedPopup() for that).
- * You can add custom popups which inherit QPopupMenu to get popups
+ * You can add custom popups which inherit TQPopupMenu to get popups
* with tables, drawings etc. Just don't fiddle with events there.
*/
- int insertButton(const QString& icon, int id, QPopupMenu *popup,
- bool enabled, const QString&_text, int index=-1);
+ int insertButton(const TQString& icon, int id, TQPopupMenu *popup,
+ bool enabled, const TQString&_text, int index=-1);
/**
* Inserts a button with popupmenu.
@@ -303,11 +303,11 @@ public:
* KButton::clicked() or KButton::doubleClicked() are @p not
* emmited by
* this button (see setDelayedPopup() for that).
- * You can add custom popups which inherit QPopupMenu to get popups
+ * You can add custom popups which inherit TQPopupMenu to get popups
* with tables, drawings etc. Just don't fiddle with events there.
*/
- int insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup,
- bool enabled, const QString&_text, int index=-1);
+ int insertButton(const TQPixmap& pixmap, int id, TQPopupMenu *popup,
+ bool enabled, const TQString&_text, int index=-1);
/**
* Inserts a KLineEdit. You have to specify signals and slots to
@@ -321,11 +321,11 @@ public:
* @see KLineEdit
* @return Item index.
*/
- int insertLined (const QString& text, int id,
+ int insertLined (const TQString& text, int id,
const char *signal,
- const QObject *receiver, const char *slot,
+ const TQObject *receiver, const char *slot,
bool enabled = true,
- const QString& toolTipText = QString::null,
+ const TQString& toolTipText = TQString::null,
int size = 70, int index =-1);
/**
@@ -342,12 +342,12 @@ public:
* @see KComboBox
* @return Item index.
*/
- int insertCombo (const QStringList &list, int id, bool writable,
- const char *signal, const QObject *receiver,
+ int insertCombo (const TQStringList &list, int id, bool writable,
+ const char *signal, const TQObject *receiver,
const char *slot, bool enabled=true,
- const QString& tooltiptext=QString::null,
+ const TQString& tooltiptext=TQString::null,
int size=70, int index=-1,
- QComboBox::Policy policy = QComboBox::AtBottom);
+ TQComboBox::Policy policy = TQComboBox::AtBottom);
/**
* Insert a KComboBox with text.
@@ -358,12 +358,12 @@ public:
* @see KComboBox
* @return Item index.
*/
- int insertCombo (const QString& text, int id, bool writable,
- const char *signal, QObject *receiver,
+ int insertCombo (const TQString& text, int id, bool writable,
+ const char *signal, TQObject *receiver,
const char *slot, bool enabled=true,
- const QString& tooltiptext=QString::null,
+ const TQString& tooltiptext=TQString::null,
int size=70, int index=-1,
- QComboBox::Policy policy = QComboBox::AtBottom);
+ TQComboBox::Policy policy = TQComboBox::AtBottom);
/**
* Inserts a separator into the toolbar with the given @p id.
@@ -381,13 +381,13 @@ public:
* Inserts a user-defined widget. The widget @p must have this
* toolbar as its parent.
*
- * Widget must have a QWidget for base class. Widget can be
+ * Widget must have a TQWidget for base class. Widget can be
* autosized to full width. If you forget about it, you can get a
* pointer to this widget with getWidget().
* @see setItemAutoSized()
* @return Item index.
*/
- int insertWidget(int id, int width, QWidget *_widget, int index=-1);
+ int insertWidget(int id, int width, TQWidget *_widget, int index=-1);
/**
* Inserts an animated widget. A KAnimWidget will be created
@@ -405,8 +405,8 @@ public:
*
* @return The item index
*/
- int insertAnimatedWidget(int id, QObject *receiver, const char *slot,
- const QString& icons, int index = -1);
+ int insertAnimatedWidget(int id, TQObject *receiver, const char *slot,
+ const TQString& icons, int index = -1);
/**
* This will return a pointer to the animated widget with the
@@ -425,7 +425,7 @@ public:
* know the @p id of particular item. Nothing happens if you forget @p id.
*/
void addConnection (int id, const char *signal,
- const QObject *receiver, const char *slot);
+ const TQObject *receiver, const char *slot);
/**
* Enables/disables item.
*/
@@ -436,21 +436,21 @@ public:
*
* Can be used while button is visible.
*/
- void setButtonIcon( int id, const QString& _icon );
+ void setButtonIcon( int id, const TQString& _icon );
/**
* Sets button pixmap.
*
* Can be used while button is visible.
*/
- void setButtonPixmap( int id, const QPixmap& _pixmap );
+ void setButtonPixmap( int id, const TQPixmap& _pixmap );
/**
- * Sets a button icon from a QIconSet.
+ * Sets a button icon from a TQIconSet.
*
* Can be used while button is visible.
*/
- void setButtonIconSet( int id, const QIconSet& iconset );
+ void setButtonIconSet( int id, const TQIconSet& iconset );
/**
* Sets a delayed popup for a button.
@@ -464,8 +464,8 @@ public:
* You will insert a normal button with connection (or use signals from
* toolbar):
* \code
- * bar->insertButton(icon, id, SIGNAL(clicked ()), this,
- * SLOT (slotClick()), true, "click or wait for popup");
+ * bar->insertButton(icon, id, TQT_SIGNAL(clicked ()), this,
+ * TQT_SLOT (slotClick()), true, "click or wait for popup");
* \endcode
* And then add a delayed popup:
* \code
@@ -474,11 +474,11 @@ public:
*
* Don't add delayed popups to buttons which have normal popups.
*
- * You may add popups which are derived from QPopupMenu. You may
+ * You may add popups which are derived from TQPopupMenu. You may
* add popups that are already in the menu bar or are submenus of
* other popups.
*/
- void setDelayedPopup (int id , QPopupMenu *_popup, bool toggle = false);
+ void setDelayedPopup (int id , TQPopupMenu *_popup, bool toggle = false);
/**
* Turns a button into an autorepeat button.
@@ -490,7 +490,7 @@ public:
* When the user presses this button, you will receive the signal clicked(),
* and if the button is still pressed after some time,
* you will receive more clicked() signals separated by regular
- * intervals. Since this uses QButton::setAutoRepeat() ,
+ * intervals. Since this uses TQButton::setAutoRepeat() ,
* I can't quantify 'some'.
*/
void setAutoRepeat (int id, bool flag=true);
@@ -535,23 +535,23 @@ public:
*
* Cursor is set at end of text.
*/
- void setLinedText (int id, const QString& text);
+ void setLinedText (int id, const TQString& text);
/**
* Returns the line editor text.
* @return the line editor text.
*/
- QString getLinedText (int id) const;
+ TQString getLinedText (int id) const;
/**
* Inserts @p text in combobox @p id at position @p index.
*/
- void insertComboItem (int id, const QString& text, int index);
+ void insertComboItem (int id, const TQString& text, int index);
/**
* Inserts @p list in combobox @p id at position @p index.
*/
- void insertComboList (int id, const QStringList &list, int index);
+ void insertComboList (int id, const TQStringList &list, int index);
/**
* Removes item @p index from combobox @p id.
@@ -568,7 +568,7 @@ public:
*
* @p index = -1 refers current item (one displayed in the button).
*/
- void changeComboItem (int id, const QString& text, int index=-1);
+ void changeComboItem (int id, const TQString& text, int index=-1);
/**
* Clears the combobox @p id.
@@ -584,7 +584,7 @@ public:
* @p index = -1 refers to current item.
*/
- QString getComboItem (int id, int index=-1) const;
+ TQString getComboItem (int id, int index=-1) const;
/**
* Returns a pointer to the combobox with @p id.
@@ -609,7 +609,7 @@ public:
* \endcode
* That way you can get access to other public methods
* that KLineEdit provides. KLineEdit is the same thing
- * as QLineEdit plus completion signals.
+ * as TQLineEdit plus completion signals.
*/
KLineEdit * getLined (int id);
@@ -642,11 +642,11 @@ public:
* Wrong ids are not tested.
* You can do with this whatever you want,
* except change its height (hardcoded). If you change its width
- * you will probably have to call QToolBar::updateRects(true)
+ * you will probably have to call TQToolBar::updateRects(true)
* @see QWidget
* @see updateRects()
*/
- QWidget *getWidget (int id); // ### KDE4: make this const!
+ TQWidget *getWidget (int id); // ### KDE4: make this const!
/**
* Set item autosized.
@@ -790,7 +790,7 @@ public:
* Titles are however not (yet)
* visible. You can't change toolbar's title while it's floating.
*/
- void setTitle (const QString& _title);
+ void setTitle (const TQString& _title);
/**
* Use setMovingEnabled(bool) instead.
@@ -903,15 +903,15 @@ public:
/**
* Save the toolbar settings to group @p configGroup in @p config.
*/
- void saveSettings(KConfig *config, const QString &configGroup);
+ void saveSettings(KConfig *config, const TQString &configGroup);
/**
* Read the toolbar settings from group @p configGroup in @p config
* and apply them. Even default settings are re-applied if @p force is set.
*/
- void applySettings(KConfig *config, const QString &configGroup,bool force);
+ void applySettings(KConfig *config, const TQString &configGroup,bool force);
// KDE4 merge with force=false
- void applySettings(KConfig *config, const QString &configGroup);
+ void applySettings(KConfig *config, const TQString &configGroup);
/*
* Tell the toolbar what XML-GUI resource file it should use to save
@@ -924,7 +924,7 @@ public:
* @param xml The DOM document for the XML-GUI building
* @internal
*/
- // void setXML(const QString& xmlfile, const QDomDocument& xml);
+ // void setXML(const TQString& xmlfile, const TQDomDocument& xml);
void setXMLGUIClient( KXMLGUIClient *client );
@@ -932,20 +932,20 @@ public:
* Assign a (translated) text to this toolbar. This is used
* for the tooltip on the handle, and when listing the toolbars.
*/
- void setText( const QString & txt );
+ void setText( const TQString & txt );
/**
* Returns the toolbar's text.
* @return the toolbar's text.
*/
- QString text() const;
+ TQString text() const;
- void setStretchableWidget( QWidget *w );
- QSizePolicy sizePolicy() const;
+ void setStretchableWidget( TQWidget *w );
+ TQSizePolicy sizePolicy() const;
bool highlight() const;
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
- QSize minimumSize() const;
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
+ TQSize minimumSize() const;
void hide();
void show();
@@ -955,11 +955,11 @@ public:
/**
* Load state from an XML element, called by KXMLGUIBuilder
*/
- void loadState( const QDomElement &e );
+ void loadState( const TQDomElement &e );
/*
* Save state into an XML element, called by KXMLGUIBuilder
*/
- void saveState( QDomElement &e );
+ void saveState( TQDomElement &e );
/**
* @internal
@@ -979,7 +979,7 @@ signals:
* recive two clicked() , pressed() and released() signals.
* There is no way to avoid it - at least no easy way.
* If you need to resolve this all you can do is set up timers
- * which wait for QApplication::doubleClickInterval() to expire.
+ * which wait for TQApplication::doubleClickInterval() to expire.
* If in that time you don't get this signal, you may belive that
* button was only clicked and not double-clicked.
* And please note that butons with popup menus do not emit this signal,
@@ -1079,17 +1079,17 @@ public:
static IconText iconTextSetting();
public slots:
- virtual void setIconText( const QString &txt )
- { QToolBar::setIconText( txt ); }
+ virtual void setIconText( const TQString &txt )
+ { TQToolBar::setIconText( txt ); }
protected:
- void mousePressEvent( QMouseEvent * );
- void childEvent( QChildEvent *e );
- void showEvent( QShowEvent *e );
- void resizeEvent( QResizeEvent *e );
- bool event( QEvent *e );
- void applyAppearanceSettings(KConfig *config, const QString &_configGroup, bool forceGlobal = false);
- QString settingsGroup() const;
+ void mousePressEvent( TQMouseEvent * );
+ void childEvent( TQChildEvent *e );
+ void showEvent( TQShowEvent *e );
+ void resizeEvent( TQResizeEvent *e );
+ bool event( TQEvent *e );
+ void applyAppearanceSettings(KConfig *config, const TQString &_configGroup, bool forceGlobal = false);
+ TQString settingsGroup() const;
private slots:
void rebuildLayout();
@@ -1097,7 +1097,7 @@ private slots:
void slotAppearanceChanged();
void slotIconChanged(int);
void slotRepaint();
- void toolBarPosChanged( QToolBar *tb );
+ void toolBarPosChanged( TQToolBar *tb );
void slotContextAboutToShow();
void slotContextAboutToHide();
void widgetDestroyed();
@@ -1105,20 +1105,20 @@ private slots:
private:
void init( bool readConfig = true, bool honorStyle = false );
void doConnections( KToolBarButton *button );
- void insertWidgetInternal( QWidget *w, int &index, int id );
- void removeWidgetInternal( QWidget *w );
- void getAttributes( QString &position, QString &icontext, int &index );
+ void insertWidgetInternal( TQWidget *w, int &index, int id );
+ void removeWidgetInternal( TQWidget *w );
+ void getAttributes( TQString &position, TQString &icontext, int &index );
int dockWindowIndex();
KPopupMenu *contextMenu();
void doModeChange();
- QMap<QWidget*, int > widget2id;
- typedef QMap<int, QWidget* > Id2WidgetMap;
+ TQMap<TQWidget*, int > widget2id;
+ typedef TQMap<int, TQWidget* > Id2WidgetMap;
Id2WidgetMap id2widget;
KPopupMenu *context;
- QPtrList<QWidget> widgets;
- QTimer *layoutTimer;
- QGuardedPtr<QWidget> stretchableWidget, rightAligned;
+ TQPtrList<TQWidget> widgets;
+ TQTimer *layoutTimer;
+ TQGuardedPtr<TQWidget> stretchableWidget, rightAligned;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdeui/ktoolbarbutton.cpp b/kdeui/ktoolbarbutton.cpp
index 919bfbe70..765b2e433 100644
--- a/kdeui/ktoolbarbutton.cpp
+++ b/kdeui/ktoolbarbutton.cpp
@@ -27,16 +27,16 @@
#include "ktoolbarbutton.h"
#include "ktoolbar.h"
-#include <qstyle.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qdrawutil.h>
-#include <qtooltip.h>
-#include <qbitmap.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qlayout.h>
+#include <tqstyle.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqdrawutil.h>
+#include <tqtooltip.h>
+#include <tqbitmap.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -48,7 +48,7 @@
// needed to get our instance
#include <kmainwindow.h>
-template class QIntDict<KToolBarButton>;
+template class TQIntDict<KToolBarButton>;
class KToolBarButtonPrivate
{
@@ -64,7 +64,7 @@ public:
m_isRaised = false;
m_isActive = false;
- m_iconName = QString::null;
+ m_iconName = TQString::null;
m_iconText = KToolBar::IconOnly;
m_iconSize = 0;
@@ -84,21 +84,21 @@ public:
bool m_isRaised: 1;
bool m_isActive: 1;
- QString m_iconName;
+ TQString m_iconName;
KToolBar *m_parent;
KToolBar::IconText m_iconText;
int m_iconSize;
- QSize size;
+ TQSize size;
- QPoint m_mousePressPos;
+ TQPoint m_mousePressPos;
KInstance *m_instance;
};
// This will construct a separator
-KToolBarButton::KToolBarButton( QWidget *_parent, const char *_name )
- : QToolButton( _parent , _name)
+KToolBarButton::KToolBarButton( TQWidget *_parent, const char *_name )
+ : TQToolButton( _parent , _name)
{
d = new KToolBarButtonPrivate;
@@ -107,32 +107,32 @@ KToolBarButton::KToolBarButton( QWidget *_parent, const char *_name )
d->m_isSeparator = true;
}
-KToolBarButton::KToolBarButton( const QString& _icon, int _id,
- QWidget *_parent, const char *_name,
- const QString &_txt, KInstance *_instance )
- : QToolButton( _parent, _name ), d( 0 )
+KToolBarButton::KToolBarButton( const TQString& _icon, int _id,
+ TQWidget *_parent, const char *_name,
+ const TQString &_txt, KInstance *_instance )
+ : TQToolButton( _parent, _name ), d( 0 )
{
d = new KToolBarButtonPrivate;
d->m_id = _id;
- QToolButton::setTextLabel(_txt);
+ TQToolButton::setTextLabel(_txt);
d->m_instance = _instance;
d->m_parent = dynamic_cast<KToolBar*>(_parent);
if (d->m_parent) {
- connect(d->m_parent, SIGNAL( modechange() ),
- this, SLOT( modeChange() ));
+ connect(d->m_parent, TQT_SIGNAL( modechange() ),
+ this, TQT_SLOT( modeChange() ));
}
setFocusPolicy( NoFocus );
// connect all of our slots and start trapping events
- connect(this, SIGNAL( clicked() ),
- this, SLOT( slotClicked() ) );
- connect(this, SIGNAL( pressed() ),
- this, SLOT( slotPressed() ) );
- connect(this, SIGNAL( released() ),
- this, SLOT( slotReleased() ) );
+ connect(this, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotClicked() ) );
+ connect(this, TQT_SIGNAL( pressed() ),
+ this, TQT_SLOT( slotPressed() ) );
+ connect(this, TQT_SIGNAL( released() ),
+ this, TQT_SLOT( slotReleased() ) );
installEventFilter(this);
d->m_iconName = _icon;
@@ -141,35 +141,35 @@ KToolBarButton::KToolBarButton( const QString& _icon, int _id,
modeChange();
}
-KToolBarButton::KToolBarButton( const QPixmap& pixmap, int _id,
- QWidget *_parent, const char *name,
- const QString& txt)
- : QToolButton( _parent, name ), d( 0 )
+KToolBarButton::KToolBarButton( const TQPixmap& pixmap, int _id,
+ TQWidget *_parent, const char *name,
+ const TQString& txt)
+ : TQToolButton( _parent, name ), d( 0 )
{
d = new KToolBarButtonPrivate;
d->m_id = _id;
- QToolButton::setTextLabel(txt);
+ TQToolButton::setTextLabel(txt);
d->m_parent = dynamic_cast<KToolBar*>(_parent);
if (d->m_parent) {
- connect(d->m_parent, SIGNAL( modechange() ),
- this, SLOT( modeChange() ));
+ connect(d->m_parent, TQT_SIGNAL( modechange() ),
+ this, TQT_SLOT( modeChange() ));
}
setFocusPolicy( NoFocus );
// connect all of our slots and start trapping events
- connect(this, SIGNAL( clicked() ),
- this, SLOT( slotClicked() ));
- connect(this, SIGNAL( pressed() ),
- this, SLOT( slotPressed() ));
- connect(this, SIGNAL( released() ),
- this, SLOT( slotReleased() ));
+ connect(this, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotClicked() ));
+ connect(this, TQT_SIGNAL( pressed() ),
+ this, TQT_SLOT( slotPressed() ));
+ connect(this, TQT_SIGNAL( released() ),
+ this, TQT_SLOT( slotReleased() ));
installEventFilter(this);
// set our pixmap and do our initial setup
- setIconSet( QIconSet( pixmap ));
+ setIconSet( TQIconSet( pixmap ));
modeChange();
}
@@ -180,7 +180,7 @@ KToolBarButton::~KToolBarButton()
void KToolBarButton::modeChange()
{
- QSize mysize;
+ TQSize mysize;
// grab a few global variables for use in this function and others
if (d->m_parent) {
@@ -205,14 +205,14 @@ void KToolBarButton::modeChange()
int text_height = 0;
int text_width = 0;
- QToolTip::remove(this);
+ TQToolTip::remove(this);
if (d->m_iconText != KToolBar::IconOnly)
{
// okay, we have to deal with fonts. let's get our information now
- QFont tmp_font = KGlobalSettings::toolBarFont();
+ TQFont tmp_font = KGlobalSettings::toolBarFont();
// now parse out our font sizes from our chosen font
- QFontMetrics fm(tmp_font);
+ TQFontMetrics fm(tmp_font);
text_height = fm.lineSpacing();
text_width = fm.width(textLabel());
@@ -221,33 +221,33 @@ void KToolBarButton::modeChange()
}
else
{
- QToolTip::add(this, textLabel());
+ TQToolTip::add(this, textLabel());
}
switch (d->m_iconText)
{
case KToolBar::IconOnly:
- mysize = QSize(pix_width, pix_height);
+ mysize = TQSize(pix_width, pix_height);
break;
case KToolBar::IconTextRight:
- mysize = QSize(pix_width + text_width + 4, pix_height);
+ mysize = TQSize(pix_width + text_width + 4, pix_height);
break;
case KToolBar::TextOnly:
- mysize = QSize(text_width + 4, text_height);
+ mysize = TQSize(text_width + 4, text_height);
break;
case KToolBar::IconTextBottom:
- mysize = QSize((text_width + 4 > pix_width) ? text_width + 4 : pix_width, pix_height + text_height);
+ mysize = TQSize((text_width + 4 > pix_width) ? text_width + 4 : pix_width, pix_height + text_height);
break;
default:
break;
}
- mysize = style().sizeFromContents(QStyle::CT_ToolButton, this, mysize).
- expandedTo(QApplication::globalStrut());
+ mysize = style().sizeFromContents(TQStyle::CT_ToolButton, this, mysize).
+ expandedTo(TQApplication::globalStrut());
// make sure that this isn't taller then it is wide
if (mysize.height() > mysize.width())
@@ -257,120 +257,120 @@ void KToolBarButton::modeChange()
updateGeometry();
}
-void KToolBarButton::setTextLabel( const QString& text, bool tipToo)
+void KToolBarButton::setTextLabel( const TQString& text, bool tipToo)
{
if (text.isNull())
return;
- QString txt(text);
- if (txt.endsWith(QString::fromLatin1("...")))
+ TQString txt(text);
+ if (txt.endsWith(TQString::fromLatin1("...")))
txt.truncate(txt.length() - 3);
- QToolButton::setTextLabel(txt, tipToo);
+ TQToolButton::setTextLabel(txt, tipToo);
update();
}
-void KToolBarButton::setText( const QString& text)
+void KToolBarButton::setText( const TQString& text)
{
setTextLabel(text, true);
modeChange();
}
-void KToolBarButton::setIcon( const QString &icon )
+void KToolBarButton::setIcon( const TQString &icon )
{
d->m_iconName = icon;
if (d->m_parent)
d->m_iconSize = d->m_parent->iconSize();
- // QObject::name() return "const char *" instead of QString.
+ // TQObject::name() return "const char *" instead of TQString.
if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar"))
- QToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet(
+ TQToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet(
d->m_iconName, KIcon::MainToolbar, d->m_iconSize ));
else
- QToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet(
+ TQToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet(
d->m_iconName, KIcon::Toolbar, d->m_iconSize ));
}
-void KToolBarButton::setIconSet( const QIconSet &iconset )
+void KToolBarButton::setIconSet( const TQIconSet &iconset )
{
- QToolButton::setIconSet( iconset );
+ TQToolButton::setIconSet( iconset );
}
// remove?
-void KToolBarButton::setPixmap( const QPixmap &pixmap )
+void KToolBarButton::setPixmap( const TQPixmap &pixmap )
{
if( pixmap.isNull()) // called by QToolButton
{
- QToolButton::setPixmap( pixmap );
+ TQToolButton::setPixmap( pixmap );
return;
}
- QIconSet set = iconSet();
- set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Active );
- QToolButton::setIconSet( set );
+ TQIconSet set = iconSet();
+ set.setPixmap( pixmap, TQIconSet::Automatic, TQIconSet::Active );
+ TQToolButton::setIconSet( set );
}
-void KToolBarButton::setDefaultPixmap( const QPixmap &pixmap )
+void KToolBarButton::setDefaultPixmap( const TQPixmap &pixmap )
{
- QIconSet set = iconSet();
- set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Normal );
- QToolButton::setIconSet( set );
+ TQIconSet set = iconSet();
+ set.setPixmap( pixmap, TQIconSet::Automatic, TQIconSet::Normal );
+ TQToolButton::setIconSet( set );
}
-void KToolBarButton::setDisabledPixmap( const QPixmap &pixmap )
+void KToolBarButton::setDisabledPixmap( const TQPixmap &pixmap )
{
- QIconSet set = iconSet();
- set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Disabled );
- QToolButton::setIconSet( set );
+ TQIconSet set = iconSet();
+ set.setPixmap( pixmap, TQIconSet::Automatic, TQIconSet::Disabled );
+ TQToolButton::setIconSet( set );
}
-void KToolBarButton::setDefaultIcon( const QString& icon )
+void KToolBarButton::setDefaultIcon( const TQString& icon )
{
- QIconSet set = iconSet();
- QPixmap pm;
+ TQIconSet set = iconSet();
+ TQPixmap pm;
if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar"))
pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::MainToolbar,
d->m_iconSize );
else
pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::Toolbar,
d->m_iconSize );
- set.setPixmap( pm, QIconSet::Automatic, QIconSet::Normal );
- QToolButton::setIconSet( set );
+ set.setPixmap( pm, TQIconSet::Automatic, TQIconSet::Normal );
+ TQToolButton::setIconSet( set );
}
-void KToolBarButton::setDisabledIcon( const QString& icon )
+void KToolBarButton::setDisabledIcon( const TQString& icon )
{
- QIconSet set = iconSet();
- QPixmap pm;
+ TQIconSet set = iconSet();
+ TQPixmap pm;
if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar"))
pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::MainToolbar,
d->m_iconSize );
else
pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::Toolbar,
d->m_iconSize );
- set.setPixmap( pm, QIconSet::Automatic, QIconSet::Disabled );
- QToolButton::setIconSet( set );
+ set.setPixmap( pm, TQIconSet::Automatic, TQIconSet::Disabled );
+ TQToolButton::setIconSet( set );
}
-QPopupMenu *KToolBarButton::popup()
+TQPopupMenu *KToolBarButton::popup()
{
// obsolete
// KDE4: remove me
- return QToolButton::popup();
+ return TQToolButton::popup();
}
-void KToolBarButton::setPopup(QPopupMenu *p, bool)
+void KToolBarButton::setPopup(TQPopupMenu *p, bool)
{
- QToolButton::setPopup(p);
- QToolButton::setPopupDelay(-1);
+ TQToolButton::setPopup(p);
+ TQToolButton::setPopupDelay(-1);
}
-void KToolBarButton::setDelayedPopup (QPopupMenu *p, bool)
+void KToolBarButton::setDelayedPopup (TQPopupMenu *p, bool)
{
- QToolButton::setPopup(p);
- QToolButton::setPopupDelay(QApplication::startDragTime());
+ TQToolButton::setPopup(p);
+ TQToolButton::setPopupDelay(TQApplication::startDragTime());
}
-void KToolBarButton::leaveEvent(QEvent *)
+void KToolBarButton::leaveEvent(TQEvent *)
{
if( d->m_isRaised || d->m_isActive )
{
@@ -382,7 +382,7 @@ void KToolBarButton::leaveEvent(QEvent *)
emit highlighted(d->m_id, false);
}
-void KToolBarButton::enterEvent(QEvent *)
+void KToolBarButton::enterEvent(TQEvent *)
{
if (d->m_highlight)
{
@@ -403,23 +403,23 @@ void KToolBarButton::enterEvent(QEvent *)
emit highlighted(d->m_id, true);
}
-bool KToolBarButton::eventFilter(QObject *o, QEvent *ev)
+bool KToolBarButton::eventFilter(TQObject *o, TQEvent *ev)
{
if ((KToolBarButton *)o == this)
{
// Popup the menu when the left mousebutton is pressed and the mouse
// is moved by a small distance.
- if (QToolButton::popup())
+ if (TQToolButton::popup())
{
- if (ev->type() == QEvent::MouseButtonPress)
+ if (ev->type() == TQEvent::MouseButtonPress)
{
- QMouseEvent* mev = static_cast<QMouseEvent*>(ev);
+ TQMouseEvent* mev = static_cast<TQMouseEvent*>(ev);
d->m_mousePressPos = mev->pos();
}
- else if (ev->type() == QEvent::MouseMove)
+ else if (ev->type() == TQEvent::MouseMove)
{
- QMouseEvent* mev = static_cast<QMouseEvent*>(ev);
+ TQMouseEvent* mev = static_cast<TQMouseEvent*>(ev);
if ((mev->pos() - d->m_mousePressPos).manhattanLength()
> KGlobalSettings::dndEventDelay())
{
@@ -430,46 +430,46 @@ bool KToolBarButton::eventFilter(QObject *o, QEvent *ev)
}
if (d->m_isRadio &&
- (ev->type() == QEvent::MouseButtonPress ||
- ev->type() == QEvent::MouseButtonRelease ||
- ev->type() == QEvent::MouseButtonDblClick) && isOn())
+ (ev->type() == TQEvent::MouseButtonPress ||
+ ev->type() == TQEvent::MouseButtonRelease ||
+ ev->type() == TQEvent::MouseButtonDblClick) && isOn())
return true;
// From Kai-Uwe Sattler <kus@iti.CS.Uni-Magdeburg.De>
- if (ev->type() == QEvent::MouseButtonDblClick)
+ if (ev->type() == TQEvent::MouseButtonDblClick)
{
emit doubleClicked(d->m_id);
return false;
}
}
- return QToolButton::eventFilter(o, ev);
+ return TQToolButton::eventFilter(o, ev);
}
-void KToolBarButton::mousePressEvent( QMouseEvent * e )
+void KToolBarButton::mousePressEvent( TQMouseEvent * e )
{
d->m_buttonDown = true;
if ( e->button() == MidButton )
{
- // Get QToolButton to show the button being down while pressed
- QMouseEvent ev( QEvent::MouseButtonPress, e->pos(), e->globalPos(), LeftButton, e->state() );
- QToolButton::mousePressEvent(&ev);
+ // Get TQToolButton to show the button being down while pressed
+ TQMouseEvent ev( TQEvent::MouseButtonPress, e->pos(), e->globalPos(), LeftButton, e->state() );
+ TQToolButton::mousePressEvent(&ev);
return;
}
- QToolButton::mousePressEvent(e);
+ TQToolButton::mousePressEvent(e);
}
-void KToolBarButton::mouseReleaseEvent( QMouseEvent * e )
+void KToolBarButton::mouseReleaseEvent( TQMouseEvent * e )
{
Qt::ButtonState state = Qt::ButtonState(e->button() | (e->state() & KeyButtonMask));
if ( e->button() == MidButton )
{
- QMouseEvent ev( QEvent::MouseButtonRelease, e->pos(), e->globalPos(), LeftButton, e->state() );
- QToolButton::mouseReleaseEvent(&ev);
+ TQMouseEvent ev( TQEvent::MouseButtonRelease, e->pos(), e->globalPos(), LeftButton, e->state() );
+ TQToolButton::mouseReleaseEvent(&ev);
}
else
- QToolButton::mouseReleaseEvent(e);
+ TQToolButton::mouseReleaseEvent(e);
if ( !d->m_buttonDown )
return;
@@ -479,41 +479,41 @@ void KToolBarButton::mouseReleaseEvent( QMouseEvent * e )
emit buttonClicked( d->m_id, state );
}
-void KToolBarButton::drawButton( QPainter *_painter )
+void KToolBarButton::drawButton( TQPainter *_painter )
{
- QStyle::SFlags flags = QStyle::Style_Default;
- QStyle::SCFlags active = QStyle::SC_None;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
+ TQStyle::SCFlags active = TQStyle::SC_None;
if (isDown()) {
- flags |= QStyle::Style_Down;
- active |= QStyle::SC_ToolButton;
+ flags |= TQStyle::Style_Down;
+ active |= TQStyle::SC_ToolButton;
}
- if (isEnabled()) flags |= QStyle::Style_Enabled;
- if (isOn()) flags |= QStyle::Style_On;
- if (isEnabled() && hasMouse()) flags |= QStyle::Style_Raised;
- if (hasFocus()) flags |= QStyle::Style_HasFocus;
+ if (isEnabled()) flags |= TQStyle::Style_Enabled;
+ if (isOn()) flags |= TQStyle::Style_On;
+ if (isEnabled() && hasMouse()) flags |= TQStyle::Style_Raised;
+ if (hasFocus()) flags |= TQStyle::Style_HasFocus;
// Draw a styled toolbutton
- style().drawComplexControl(QStyle::CC_ToolButton, _painter, this, rect(),
- colorGroup(), flags, QStyle::SC_ToolButton, active, QStyleOption());
+ style().drawComplexControl(TQStyle::CC_ToolButton, _painter, this, rect(),
+ colorGroup(), flags, TQStyle::SC_ToolButton, active, TQStyleOption());
int dx, dy;
- QFont tmp_font(KGlobalSettings::toolBarFont());
- QFontMetrics fm(tmp_font);
- QRect textRect;
+ TQFont tmp_font(KGlobalSettings::toolBarFont());
+ TQFontMetrics fm(tmp_font);
+ TQRect textRect;
int textFlags = 0;
if (d->m_iconText == KToolBar::IconOnly) // icon only
{
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) :
- QIconSet::Disabled,
- isOn() ? QIconSet::On : QIconSet::Off );
+ TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic,
+ isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) :
+ TQIconSet::Disabled,
+ isOn() ? TQIconSet::On : TQIconSet::Off );
if( !pixmap.isNull())
{
dx = ( width() - pixmap.width() ) / 2;
dy = ( height() - pixmap.height() ) / 2;
- if ( isDown() && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle )
+ if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{
++dx;
++dy;
@@ -523,15 +523,15 @@ void KToolBarButton::drawButton( QPainter *_painter )
}
else if (d->m_iconText == KToolBar::IconTextRight) // icon and text (if any)
{
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) :
- QIconSet::Disabled,
- isOn() ? QIconSet::On : QIconSet::Off );
+ TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic,
+ isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) :
+ TQIconSet::Disabled,
+ isOn() ? TQIconSet::On : TQIconSet::Off );
if( !pixmap.isNull())
{
dx = 4;
dy = ( height() - pixmap.height() ) / 2;
- if ( isDown() && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle )
+ if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{
++dx;
++dy;
@@ -547,12 +547,12 @@ void KToolBarButton::drawButton( QPainter *_painter )
else
dx = 4;
dy = 0;
- if ( isDown() && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle )
+ if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{
++dx;
++dy;
}
- textRect = QRect(dx, dy, width()-dx, height());
+ textRect = TQRect(dx, dy, width()-dx, height());
}
}
else if (d->m_iconText == KToolBar::TextOnly)
@@ -562,25 +562,25 @@ void KToolBarButton::drawButton( QPainter *_painter )
textFlags = AlignVCenter|AlignLeft;
dx = (width() - fm.width(textLabel())) / 2;
dy = (height() - fm.lineSpacing()) / 2;
- if ( isDown() && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle )
+ if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{
++dx;
++dy;
}
- textRect = QRect( dx, dy, fm.width(textLabel()), fm.lineSpacing() );
+ textRect = TQRect( dx, dy, fm.width(textLabel()), fm.lineSpacing() );
}
}
else if (d->m_iconText == KToolBar::IconTextBottom)
{
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) :
- QIconSet::Disabled,
- isOn() ? QIconSet::On : QIconSet::Off );
+ TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic,
+ isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) :
+ TQIconSet::Disabled,
+ isOn() ? TQIconSet::On : TQIconSet::Off );
if( !pixmap.isNull())
{
dx = (width() - pixmap.width()) / 2;
dy = (height() - fm.lineSpacing() - pixmap.height()) / 2;
- if ( isDown() && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle )
+ if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{
++dx;
++dy;
@@ -594,12 +594,12 @@ void KToolBarButton::drawButton( QPainter *_painter )
dx = (width() - fm.width(textLabel())) / 2;
dy = height() - fm.lineSpacing() - 4;
- if ( isDown() && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle )
+ if ( isDown() && style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle )
{
++dx;
++dy;
}
- textRect = QRect( dx, dy, fm.width(textLabel()), fm.lineSpacing() );
+ textRect = TQRect( dx, dy, fm.width(textLabel()), fm.lineSpacing() );
}
}
@@ -616,20 +616,20 @@ void KToolBarButton::drawButton( QPainter *_painter )
_painter->drawText(textRect, textFlags, textLabel());
}
- if (QToolButton::popup())
+ if (TQToolButton::popup())
{
- QStyle::SFlags arrowFlags = QStyle::Style_Default;
+ TQStyle::SFlags arrowFlags = TQStyle::Style_Default;
- if (isDown()) arrowFlags |= QStyle::Style_Down;
- if (isEnabled()) arrowFlags |= QStyle::Style_Enabled;
+ if (isDown()) arrowFlags |= TQStyle::Style_Down;
+ if (isEnabled()) arrowFlags |= TQStyle::Style_Enabled;
- style().drawPrimitive(QStyle::PE_ArrowDown, _painter,
- QRect(width()-7, height()-7, 7, 7), colorGroup(),
- arrowFlags, QStyleOption() );
+ style().drawPrimitive(TQStyle::PE_ArrowDown, _painter,
+ TQRect(width()-7, height()-7, 7, 7), colorGroup(),
+ arrowFlags, TQStyleOption() );
}
}
-void KToolBarButton::paletteChange(const QPalette &)
+void KToolBarButton::paletteChange(const TQPalette &)
{
if(!d->m_isSeparator)
{
@@ -638,9 +638,9 @@ void KToolBarButton::paletteChange(const QPalette &)
}
}
-bool KToolBarButton::event(QEvent *e)
+bool KToolBarButton::event(TQEvent *e)
{
- if (e->type() == QEvent::ParentFontChange || e->type() == QEvent::ApplicationFontChange)
+ 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)
@@ -648,7 +648,7 @@ bool KToolBarButton::event(QEvent *e)
return true;
}
- return QToolButton::event(e);
+ return TQToolButton::event(e);
}
@@ -714,7 +714,7 @@ void KToolBarButton::on(bool flag)
else
{
setDown(flag);
- leaveEvent((QEvent *) 0);
+ leaveEvent((TQEvent *) 0);
}
repaint();
}
@@ -729,22 +729,22 @@ void KToolBarButton::setToggle(bool flag)
{
setToggleButton(flag);
if (flag)
- connect(this, SIGNAL(toggled(bool)), this, SLOT(slotToggled()));
+ connect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled()));
else
- disconnect(this, SIGNAL(toggled(bool)), this, SLOT(slotToggled()));
+ disconnect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled()));
}
-QSize KToolBarButton::sizeHint() const
+TQSize KToolBarButton::sizeHint() const
{
return d->size;
}
-QSize KToolBarButton::minimumSizeHint() const
+TQSize KToolBarButton::minimumSizeHint() const
{
return d->size;
}
-QSize KToolBarButton::minimumSize() const
+TQSize KToolBarButton::minimumSize() const
{
return d->size;
}
diff --git a/kdeui/ktoolbarbutton.h b/kdeui/ktoolbarbutton.h
index 20ab5024d..2b723cce8 100644
--- a/kdeui/ktoolbarbutton.h
+++ b/kdeui/ktoolbarbutton.h
@@ -23,10 +23,10 @@
#ifndef _KTOOLBARBUTTON_H
#define _KTOOLBARBUTTON_H
-#include <qpixmap.h>
-#include <qtoolbutton.h>
-#include <qintdict.h>
-#include <qstring.h>
+#include <tqpixmap.h>
+#include <tqtoolbutton.h>
+#include <tqintdict.h>
+#include <tqstring.h>
#include <kglobal.h>
class KToolBar;
@@ -58,8 +58,8 @@ public:
* @param txt This button's text (in a tooltip or otherwise)
* @param _instance the instance to use for this button
*/
- KToolBarButton(const QString& icon, int id, QWidget *parent,
- const char *name=0L, const QString &txt=QString::null,
+ KToolBarButton(const TQString& icon, int id, TQWidget *parent,
+ const char *name=0L, const TQString &txt=TQString::null,
KInstance *_instance = KGlobal::instance());
/**
@@ -73,8 +73,8 @@ public:
* @param name This button's internal name
* @param txt This button's text (in a tooltip or otherwise)
*/
- KToolBarButton(const QPixmap& pixmap, int id, QWidget *parent,
- const char *name=0L, const QString &txt=QString::null);
+ KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
+ const char *name=0L, const TQString &txt=TQString::null);
/**
* Construct a separator button
@@ -82,7 +82,7 @@ public:
* @param parent This button's parent
* @param name This button's internal name
*/
- KToolBarButton(QWidget *parent=0L, const char *name=0L);
+ KToolBarButton(TQWidget *parent=0L, const char *name=0L);
/**
* Standard destructor
@@ -99,8 +99,8 @@ public:
*
* @param pixmap The active pixmap
*/
- // this one is from QButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const QPixmap &pixmap) KDE_DEPRECATED;
+ // this one is from TQButton, so #ifdef-ing it out doesn't break BC
+ virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
/**
* @deprecated
@@ -109,7 +109,7 @@ public:
*
* @param pixmap The pixmap to use as the default (normal) one
*/
- void setDefaultPixmap(const QPixmap& pixmap) KDE_DEPRECATED;
+ void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
/**
* @deprecated
@@ -118,7 +118,7 @@ public:
*
* @param pixmap The pixmap to use when disabled
*/
- void setDisabledPixmap(const QPixmap& pixmap) KDE_DEPRECATED;
+ void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
#endif
/**
@@ -127,7 +127,7 @@ public:
*
* @param text The button (or tooltip) text
*/
- virtual void setText(const QString &text);
+ virtual void setText(const TQString &text);
/**
* Set the icon for this button. The icon will be loaded internally
@@ -135,19 +135,19 @@ public:
*
* @param icon The name of the icon
*/
- virtual void setIcon(const QString &icon);
+ virtual void setIcon(const TQString &icon);
/// @since 3.1
- virtual void setIcon( const QPixmap &pixmap )
- { QToolButton::setIcon( pixmap ); }
+ virtual void setIcon( const TQPixmap &pixmap )
+ { TQToolButton::setIcon( pixmap ); }
/**
- * Set the pixmaps for this toolbar button from a QIconSet.
+ * Set the pixmaps for this toolbar button from a TQIconSet.
* If you call this you don't need to call any of the other methods
* that set icons or pixmaps.
* @param iconset The iconset to use
*/
- virtual void setIconSet( const QIconSet &iconset );
+ virtual void setIconSet( const TQIconSet &iconset );
#ifndef KDE_NO_COMPAT
/**
@@ -161,7 +161,7 @@ public:
* @param generate If true, then the other icons are automagically
* generated from this one
*/
- KDE_DEPRECATED void setIcon(const QString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
+ KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
/**
* @deprecated
@@ -170,7 +170,7 @@ public:
*
* @param icon The icon to use as the default (normal) one
*/
- void setDefaultIcon(const QString& icon) KDE_DEPRECATED;
+ void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
/**
* @deprecated
@@ -179,7 +179,7 @@ public:
*
* @param icon The icon to use when disabled
*/
- void setDisabledIcon(const QString& icon) KDE_DEPRECATED;
+ void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
#endif
/**
@@ -206,7 +206,7 @@ public:
/**
* Return a pointer to this button's popup menu (if it exists)
*/
- QPopupMenu *popup();
+ TQPopupMenu *popup();
/**
* Returns the button's id.
@@ -222,7 +222,7 @@ public:
* @param p The new popup menu
* @param unused Has no effect - ignore it.
*/
- void setPopup (QPopupMenu *p, bool unused = false);
+ void setPopup (TQPopupMenu *p, bool unused = false);
/**
* Gives this button a delayed popup menu.
@@ -234,7 +234,7 @@ public:
* @param p the new popup menu
* @param unused Has no effect - ignore it.
*/
- void setDelayedPopup(QPopupMenu *p, bool unused = false);
+ void setDelayedPopup(TQPopupMenu *p, bool unused = false);
/**
* Turn this button into a radio button
@@ -277,23 +277,23 @@ public slots:
* orientation changing, etc.
*/
void modeChange();
- virtual void setTextLabel(const QString&, bool tipToo);
+ virtual void setTextLabel(const TQString&, bool tipToo);
protected:
- bool event(QEvent *e);
- void paletteChange(const QPalette &);
- void leaveEvent(QEvent *e);
- void enterEvent(QEvent *e);
- void drawButton(QPainter *p);
- bool eventFilter (QObject *o, QEvent *e);
+ bool event(TQEvent *e);
+ void paletteChange(const TQPalette &);
+ void leaveEvent(TQEvent *e);
+ void enterEvent(TQEvent *e);
+ void drawButton(TQPainter *p);
+ bool eventFilter (TQObject *o, TQEvent *e);
/// @since 3.4
- void mousePressEvent( QMouseEvent * );
+ void mousePressEvent( TQMouseEvent * );
/// @since 3.4
- void mouseReleaseEvent( QMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
void showMenu();
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
- QSize minimumSize() const;
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
+ TQSize minimumSize() const;
/// @since 3.1
bool isRaised() const;
@@ -320,7 +320,7 @@ private:
* @internal
* @version $Id$
*/
-class KDEUI_EXPORT KToolBarButtonList : public QIntDict<KToolBarButton>
+class KDEUI_EXPORT KToolBarButtonList : public TQIntDict<KToolBarButton>
{
public:
KToolBarButtonList();
diff --git a/kdeui/ktoolbarhandler.cpp b/kdeui/ktoolbarhandler.cpp
index 91a35d0c4..5d8a49d8f 100644
--- a/kdeui/ktoolbarhandler.cpp
+++ b/kdeui/ktoolbarhandler.cpp
@@ -18,7 +18,7 @@
#include "ktoolbarhandler.h"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kapplication.h>
#include <ktoolbar.h>
#include <kmainwindow.h>
@@ -44,11 +44,11 @@ namespace
class BarActionBuilder
{
public:
- BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, QPtrList<KToolBar> &oldToolBarList )
+ BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, TQPtrList<KToolBar> &oldToolBarList )
: m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false )
{
- QPtrList<QDockWindow> dockWindows = m_mainWindow->dockWindows();
- QPtrListIterator<QDockWindow> dockWindowIt( dockWindows );
+ TQPtrList<TQDockWindow> dockWindows = m_mainWindow->dockWindows();
+ TQPtrListIterator<TQDockWindow> dockWindowIt( dockWindows );
for ( ; dockWindowIt.current(); ++dockWindowIt ) {
KToolBar *toolBar = dynamic_cast<KToolBar *>( dockWindowIt.current() );
@@ -67,16 +67,16 @@ namespace
bool needsRebuild() const { return m_needsRebuild; }
- QPtrList<KAction> create()
+ TQPtrList<KAction> create()
{
if ( !m_needsRebuild )
- return QPtrList<KAction>();
+ return TQPtrList<KAction>();
- QPtrListIterator<KToolBar> toolBarIt( m_toolBars );
+ TQPtrListIterator<KToolBar> toolBarIt( m_toolBars );
for ( ; toolBarIt.current(); ++toolBarIt )
handleToolBar( toolBarIt.current() );
- QPtrList<KAction> actions;
+ TQPtrList<KAction> actions;
if ( m_toolBarActions.count() == 0 )
return actions;
@@ -90,7 +90,7 @@ namespace
KActionMenu *menuAction = new KActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" );
- QPtrListIterator<KAction> actionIt( m_toolBarActions );
+ TQPtrListIterator<KAction> actionIt( m_toolBarActions );
for ( ; actionIt.current(); ++actionIt )
menuAction->insert( actionIt.current() );
@@ -98,7 +98,7 @@ namespace
return actions;
}
- const QPtrList<KToolBar> &toolBars() const { return m_toolBars; }
+ const TQPtrList<KToolBar> &toolBars() const { return m_toolBars; }
private:
void handleToolBar( KToolBar *toolBar )
@@ -115,8 +115,8 @@ namespace
KActionCollection *m_actionCollection;
KMainWindow *m_mainWindow;
- QPtrList<KToolBar> m_toolBars;
- QPtrList<KAction> m_toolBarActions;
+ TQPtrList<KToolBar> m_toolBars;
+ TQPtrList<KAction> m_toolBarActions;
bool m_needsRebuild : 1;
};
@@ -125,13 +125,13 @@ namespace
using namespace KDEPrivate;
ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, const char *name )
- : QObject( mainWindow, name ), KXMLGUIClient( mainWindow )
+ : TQObject( mainWindow, name ), KXMLGUIClient( mainWindow )
{
init( mainWindow );
}
-ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, QObject *parent, const char *name )
- : QObject( parent, name ), KXMLGUIClient( mainWindow )
+ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, TQObject *parent, const char *name )
+ : TQObject( parent, name ), KXMLGUIClient( mainWindow )
{
init( mainWindow );
}
@@ -167,7 +167,7 @@ void ToolBarHandler::setupActions()
m_actions = builder.create();
/*
- for ( QPtrListIterator<KToolBar> toolBarIt( m_toolBars );
+ for ( TQPtrListIterator<KToolBar> toolBarIt( m_toolBars );
toolBarIt.current(); ++toolBarIt )
toolBarIt.current()->disconnect( this );
*/
@@ -175,10 +175,10 @@ void ToolBarHandler::setupActions()
m_toolBars = builder.toolBars();
/*
- for ( QPtrListIterator<KToolBar> toolBarIt( m_toolBars );
+ for ( TQPtrListIterator<KToolBar> toolBarIt( m_toolBars );
toolBarIt.current(); ++toolBarIt )
- connect( toolBarIt.current(), SIGNAL( destroyed() ),
- this, SLOT( setupActions() ) );
+ connect( toolBarIt.current(), TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( setupActions() ) );
*/
if (kapp && kapp->authorizeKAction("options_show_toolbar"))
@@ -198,8 +198,8 @@ void ToolBarHandler::init( KMainWindow *mainWindow )
d = 0;
m_mainWindow = mainWindow;
- connect( m_mainWindow->guiFactory(), SIGNAL( clientAdded( KXMLGUIClient * ) ),
- this, SLOT( clientAdded( KXMLGUIClient * ) ) );
+ connect( m_mainWindow->guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient * ) ),
+ this, TQT_SLOT( clientAdded( KXMLGUIClient * ) ) );
/* re-use an existing resource file if it exists. can happen if the user launches the
* toolbar editor */
@@ -209,7 +209,7 @@ void ToolBarHandler::init( KMainWindow *mainWindow )
if ( domDocument().documentElement().isNull() ) {
- QString completeDescription = QString::fromLatin1( guiDescription )
+ TQString completeDescription = TQString::fromLatin1( guiDescription )
.arg( actionListName );
setXML( completeDescription, false /*merge*/ );
@@ -218,7 +218,7 @@ void ToolBarHandler::init( KMainWindow *mainWindow )
void ToolBarHandler::connectToActionContainers()
{
- QPtrListIterator<KAction> actionIt( m_actions );
+ TQPtrListIterator<KAction> actionIt( m_actions );
for ( ; actionIt.current(); ++actionIt )
connectToActionContainer( actionIt.current() );
}
@@ -230,14 +230,14 @@ void ToolBarHandler::connectToActionContainer( KAction *action )
connectToActionContainer( action->container( i ) );
}
-void ToolBarHandler::connectToActionContainer( QWidget *container )
+void ToolBarHandler::connectToActionContainer( TQWidget *container )
{
- QPopupMenu *popupMenu = dynamic_cast<QPopupMenu *>( container );
+ TQPopupMenu *popupMenu = dynamic_cast<TQPopupMenu *>( container );
if ( !popupMenu )
return;
- connect( popupMenu, SIGNAL( aboutToShow() ),
- this, SLOT( setupActions() ) );
+ connect( popupMenu, TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( setupActions() ) );
}
#include "ktoolbarhandler.moc"
diff --git a/kdeui/ktoolbarhandler.h b/kdeui/ktoolbarhandler.h
index c0cc332cc..e6336967f 100644
--- a/kdeui/ktoolbarhandler.h
+++ b/kdeui/ktoolbarhandler.h
@@ -19,8 +19,8 @@
#ifndef KBARHANDLER_H
#define KBARHANDLER_H
-#include <qobject.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
#include <kxmlguiclient.h>
class KMainWindow;
@@ -30,13 +30,13 @@ namespace KDEPrivate
{
/// @since 3.1
-class ToolBarHandler : public QObject,
+class ToolBarHandler : public TQObject,
public KXMLGUIClient
{
Q_OBJECT
public:
ToolBarHandler( KMainWindow *mainWindow, const char *name = 0 );
- ToolBarHandler( KMainWindow *mainWindow, QObject *parent, const char *name = 0 );
+ ToolBarHandler( KMainWindow *mainWindow, TQObject *parent, const char *name = 0 );
virtual ~ToolBarHandler();
KAction *toolBarMenuAction();
@@ -51,14 +51,14 @@ private:
void init( KMainWindow *mainWindow );
void connectToActionContainers();
void connectToActionContainer( KAction *action );
- void connectToActionContainer( QWidget *container );
+ void connectToActionContainer( TQWidget *container );
struct Data;
Data *d;
- QGuardedPtr<KMainWindow> m_mainWindow;
- QPtrList<KAction> m_actions;
- QPtrList<KToolBar> m_toolBars;
+ TQGuardedPtr<KMainWindow> m_mainWindow;
+ TQPtrList<KAction> m_actions;
+ TQPtrList<KToolBar> m_toolBars;
};
} // namespace KDEPrivate
diff --git a/kdeui/ktoolbarlabelaction.cpp b/kdeui/ktoolbarlabelaction.cpp
index 9eac6a1bc..aab7717b8 100644
--- a/kdeui/ktoolbarlabelaction.cpp
+++ b/kdeui/ktoolbarlabelaction.cpp
@@ -18,8 +18,8 @@
#include "ktoolbarlabelaction.h"
-#include <qlabel.h>
-#include <qapplication.h>
+#include <tqlabel.h>
+#include <tqapplication.h>
class KToolBarLabelAction::KToolBarLabelActionPrivate
{
@@ -28,47 +28,47 @@ public:
: m_label(0)
{
}
- QLabel* m_label;
+ TQLabel* m_label;
};
-KToolBarLabelAction::KToolBarLabelAction(const QString &text,
+KToolBarLabelAction::KToolBarLabelAction(const TQString &text,
const KShortcut &cut,
- const QObject *receiver,
+ const TQObject *receiver,
const char *slot,
KActionCollection *parent,
const char *name)
- : KWidgetAction(new QLabel(text, 0, "kde toolbar widget"), text, cut,
+ : KWidgetAction(new TQLabel(text, 0, "kde toolbar widget"), text, cut,
receiver, slot, parent, name),
d(new KToolBarLabelActionPrivate)
{
init();
}
-KToolBarLabelAction::KToolBarLabelAction(QWidget* buddy,
- const QString &text,
+KToolBarLabelAction::KToolBarLabelAction(TQWidget* buddy,
+ const TQString &text,
const KShortcut &cut,
- const QObject *receiver,
+ const TQObject *receiver,
const char *slot,
KActionCollection *parent,
const char *name)
- : KWidgetAction(new QLabel(buddy, text, 0, "kde toolbar widget"), text,
+ : KWidgetAction(new TQLabel(buddy, text, 0, "kde toolbar widget"), text,
cut, receiver, slot, parent, name),
d(new KToolBarLabelActionPrivate)
{
init();
}
-KToolBarLabelAction::KToolBarLabelAction(QLabel* label,
+KToolBarLabelAction::KToolBarLabelAction(TQLabel* label,
const KShortcut &cut,
- const QObject *receiver,
+ const TQObject *receiver,
const char *slot,
KActionCollection* parent,
const char *name)
: KWidgetAction(label, label->text(), cut, receiver, slot, parent, name),
d(new KToolBarLabelActionPrivate)
{
- Q_ASSERT(QString::fromLatin1("kde toolbar widget") == label->name());
+ Q_ASSERT(TQString::fromLatin1("kde toolbar widget") == label->name());
init();
}
@@ -80,33 +80,33 @@ KToolBarLabelAction::~KToolBarLabelAction()
void KToolBarLabelAction::init()
{
- d->m_label = static_cast<QLabel*>(widget());
+ d->m_label = static_cast<TQLabel*>(widget());
/* these lines were copied from Konqueror's KonqDraggableLabel class in
konq_misc.cc */
d->m_label->setBackgroundMode(Qt::PaletteButton);
- d->m_label->setAlignment((QApplication::reverseLayout()
+ d->m_label->setAlignment((TQApplication::reverseLayout()
? Qt::AlignRight : Qt::AlignLeft) |
Qt::AlignVCenter | Qt::ShowPrefix );
d->m_label->adjustSize();
}
-void KToolBarLabelAction::setText(const QString& text)
+void KToolBarLabelAction::setText(const TQString& text)
{
KWidgetAction::setText(text);
d->m_label->setText(text);
}
-void KToolBarLabelAction::setBuddy(QWidget* buddy)
+void KToolBarLabelAction::setBuddy(TQWidget* buddy)
{
d->m_label->setBuddy(buddy);
}
-QWidget* KToolBarLabelAction::buddy() const
+TQWidget* KToolBarLabelAction::buddy() const
{
return d->m_label->buddy();
}
-QLabel* KToolBarLabelAction::label() const
+TQLabel* KToolBarLabelAction::label() const
{
return d->m_label;
}
diff --git a/kdeui/ktoolbarlabelaction.h b/kdeui/ktoolbarlabelaction.h
index 926d75c7d..099227981 100644
--- a/kdeui/ktoolbarlabelaction.h
+++ b/kdeui/ktoolbarlabelaction.h
@@ -28,7 +28,7 @@ class QLabel;
* KToolBarLabelAction is a convenience class for displaying a label in a
* toolbar.
*
- * It provides easy access to the label's #setBuddy(QWidget*) and #buddy()
+ * It provides easy access to the label's #setBuddy(TQWidget*) and #buddy()
* methods and can be used as follows:
*
* \code
@@ -36,10 +36,10 @@ class QLabel;
* KHistoryCombo* findCombo = new KHistoryCombo(true, this);
* KWidgetAction* action
* = new KWidgetAction(findCombo, i18n("F&ind Combo"), Qt::Key_F6, this,
- * SLOT(slotFocus()), actionCollection(), "find_combo");
+ * TQT_SLOT(slotFocus()), actionCollection(), "find_combo");
*
* new KToolBarLabelAction(findCombo, i18n("F&ind "), 0, this,
- * SLOT(slotFocus()), actionCollection(),
+ * TQT_SLOT(slotFocus()), actionCollection(),
* "find_label");
*
* \endcode
@@ -55,13 +55,13 @@ public:
* @param text The label's and the action's text.
* @param cut The action's shortcut.
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToolBarLabelAction(const QString &text,
+ KToolBarLabelAction(const TQString &text,
const KShortcut &cut,
- const QObject *receiver, const char *slot,
+ const TQObject *receiver, const char *slot,
KActionCollection *parent, const char *name);
/**
* Constructs a toolbar label setting a buddy for the label.
@@ -71,19 +71,19 @@ public:
* @param text The label's and the action's text.
* @param cut The action's shortcut.
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToolBarLabelAction(QWidget* buddy, const QString &text,
+ KToolBarLabelAction(TQWidget* buddy, const TQString &text,
const KShortcut &cut,
- const QObject *receiver, const char *slot,
+ const TQObject *receiver, const char *slot,
KActionCollection *parent, const char *name);
/**
* Constructs a toolbar label for a label.
*
* You can use this constructor if you want to display a class which is
- * derived from QLabel in the toolbar. Note that ownership of the label is
+ * derived from TQLabel in the toolbar. Note that ownership of the label is
* transferred to the action and the label is deleted when the action is
* deleted. So you shouldn't hold any pointers to the label.
*
@@ -94,35 +94,35 @@ public:
* @param label the label which is displayed in the toolbar.
* @param cut The action's shortcut.
* @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke to execute this action.
+ * @param slot The TQT_SLOT to invoke to execute this action.
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KToolBarLabelAction(QLabel* label, const KShortcut &cut,
- const QObject *receiver, const char *slot,
+ KToolBarLabelAction(TQLabel* label, const KShortcut &cut,
+ const TQObject *receiver, const char *slot,
KActionCollection* parent, const char *name);
virtual ~KToolBarLabelAction();
/**
* Reimplemented to update both the action's text and the label's text.
*/
- virtual void setText(const QString& text);
+ virtual void setText(const TQString& text);
/**
* Sets the label's buddy to buddy.
*
* See QLabel#setBuddy() for details.
*/
- virtual void setBuddy(QWidget* buddy);
+ virtual void setBuddy(TQWidget* buddy);
/**
* Returns the label's buddy or 0 if no buddy is currently set.
*
* See QLabel#buddy() and QLabel#setBuddy() for more information.
*/
- QWidget* buddy() const;
+ TQWidget* buddy() const;
/**
* Returns the label which is used internally.
*/
- QLabel* label() const;
+ TQLabel* label() const;
protected:
virtual void virtual_hook(int id, void* data);
diff --git a/kdeui/ktoolbarradiogroup.cpp b/kdeui/ktoolbarradiogroup.cpp
index ca78db630..ab8e50e08 100644
--- a/kdeui/ktoolbarradiogroup.cpp
+++ b/kdeui/ktoolbarradiogroup.cpp
@@ -32,11 +32,11 @@
KToolBarRadioGroup::KToolBarRadioGroup (KToolBar *_parent, const char *_name)
-: QObject(_parent, _name)
+: TQObject(_parent, _name)
{
buttons = new KToolBarButtonList();
tb = _parent;
- connect (tb, SIGNAL(toggled(int)), this, SLOT(slotToggled(int)));
+ connect (tb, TQT_SIGNAL(toggled(int)), this, TQT_SLOT(slotToggled(int)));
}
KToolBarRadioGroup::~KToolBarRadioGroup()
@@ -63,7 +63,7 @@ void KToolBarRadioGroup::slotToggled(int id)
{
if (buttons->find(id) && buttons->find(id)->isOn())
{
- QIntDictIterator<KToolBarButton> it(*buttons);
+ TQIntDictIterator<KToolBarButton> it(*buttons);
while (it.current())
{
if (it.currentKey() != id)
diff --git a/kdeui/ktoolbarradiogroup.h b/kdeui/ktoolbarradiogroup.h
index 2cdc1c8e9..2fbf08174 100644
--- a/kdeui/ktoolbarradiogroup.h
+++ b/kdeui/ktoolbarradiogroup.h
@@ -22,7 +22,7 @@
#ifndef _KTOOLBARRADIOGROUP_H
#define _KTOOLBARRADIOGROUP_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
diff --git a/kdeui/kurllabel.cpp b/kdeui/kurllabel.cpp
index f45fce3a7..d4d4ff7c0 100644
--- a/kdeui/kurllabel.cpp
+++ b/kdeui/kurllabel.cpp
@@ -18,13 +18,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcolor.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qapplication.h>
+#include <tqcolor.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
#include <kcursor.h>
#include <kglobalsettings.h>
@@ -34,7 +34,7 @@
class KURLLabel::Private
{
public:
- Private (const QString& url, KURLLabel* label)
+ Private (const TQString& url, KURLLabel* label)
: URL (url),
LinkColor (KGlobalSettings::linkColor()),
HighlightedLinkColor (Qt::red),
@@ -48,9 +48,9 @@ public:
MousePressed(false),
WasInsideRect(false),
MarginAltered(false),
- Timer (new QTimer (label))
+ Timer (new TQTimer (label))
{
- connect (Timer, SIGNAL (timeout ()), label, SLOT (updateColor ()));
+ connect (Timer, TQT_SIGNAL (timeout ()), label, TQT_SLOT (updateColor ()));
}
~Private ()
@@ -58,14 +58,14 @@ public:
delete Cursor;
}
- QString URL;
- QPixmap AltPixmap;
+ TQString URL;
+ TQPixmap AltPixmap;
- QColor LinkColor;
- QColor HighlightedLinkColor;
+ TQColor LinkColor;
+ TQColor HighlightedLinkColor;
- QString Tip;
- QCursor* Cursor;
+ TQString Tip;
+ TQCursor* Cursor;
bool Underline:1;
bool UseTips:1;
bool Glow:1;
@@ -74,31 +74,31 @@ public:
bool MousePressed:1;
bool WasInsideRect:1;
bool MarginAltered:1;
- QPixmap RealPixmap;
+ TQPixmap RealPixmap;
- QTimer* Timer;
+ TQTimer* Timer;
};
-KURLLabel::KURLLabel (const QString& url, const QString& text,
- QWidget* parent, const char* name)
- : QLabel (!text.isNull() ? text : url, parent, name),
+KURLLabel::KURLLabel (const TQString& url, const TQString& text,
+ TQWidget* parent, const char* name)
+ : TQLabel (!text.isNull() ? text : url, parent, name),
d (new Private (url, this))
{
setFont (font());
setUseCursor (true);
setLinkColor (d->LinkColor);
- setFocusPolicy( QWidget::StrongFocus ); //better accessibility
+ setFocusPolicy( TQWidget::StrongFocus ); //better accessibility
setMouseTracking (true);
}
-KURLLabel::KURLLabel (QWidget* parent, const char* name)
- : QLabel (parent, name),
- d (new Private (QString::null, this))
+KURLLabel::KURLLabel (TQWidget* parent, const char* name)
+ : TQLabel (parent, name),
+ d (new Private (TQString::null, this))
{
setFont (font());
setUseCursor (true);
setLinkColor (d->LinkColor);
- setFocusPolicy( QWidget::StrongFocus ); //better accessibility
+ setFocusPolicy( TQWidget::StrongFocus ); //better accessibility
setMouseTracking (true);
}
@@ -107,13 +107,13 @@ KURLLabel::~KURLLabel ()
delete d;
}
-void KURLLabel::mouseReleaseEvent (QMouseEvent* e)
+void KURLLabel::mouseReleaseEvent (TQMouseEvent* e)
{
- QLabel::mouseReleaseEvent (e);
+ TQLabel::mouseReleaseEvent (e);
if (!d->MousePressed)
return;
d->MousePressed = false;
- QRect r( activeRect() );
+ TQRect r( activeRect() );
if (!r.contains(e->pos()))
return;
@@ -142,12 +142,12 @@ void KURLLabel::mouseReleaseEvent (QMouseEvent* e)
}
}
-void KURLLabel::setFont (const QFont& f)
+void KURLLabel::setFont (const TQFont& f)
{
- QFont newFont = f;
+ TQFont newFont = f;
newFont.setUnderline (d->Underline);
- QLabel::setFont (newFont);
+ TQLabel::setFont (newFont);
}
void KURLLabel::setUnderline (bool on)
@@ -161,21 +161,21 @@ void KURLLabel::updateColor ()
{
d->Timer->stop();
- QRect r( activeRect() );
- if (!(d->Glow || d->Float) || !r.contains (mapFromGlobal(QCursor::pos())))
+ TQRect r( activeRect() );
+ if (!(d->Glow || d->Float) || !r.contains (mapFromGlobal(TQCursor::pos())))
setLinkColor (d->LinkColor);
}
-void KURLLabel::setLinkColor (const QColor& col)
+void KURLLabel::setLinkColor (const TQColor& col)
{
- QPalette p = palette();
- p.setColor (QColorGroup::Foreground, col);
+ TQPalette p = palette();
+ p.setColor (TQColorGroup::Foreground, col);
setPalette (p);
update();
}
-void KURLLabel::setURL (const QString& url)
+void KURLLabel::setURL (const TQString& url)
{
if ( d->Tip == d->URL ) { // update the tip as well
d->Tip = url;
@@ -185,7 +185,7 @@ void KURLLabel::setURL (const QString& url)
d->URL = url;
}
-const QString& KURLLabel::url () const
+const TQString& KURLLabel::url () const
{
return d->URL;
}
@@ -196,13 +196,13 @@ void KURLLabel::unsetCursor ()
d->Cursor = 0;
}
-void KURLLabel::setCursor ( const QCursor& cursor )
+void KURLLabel::setCursor ( const TQCursor& cursor )
{
delete d->Cursor;
- d->Cursor = new QCursor( cursor );
+ d->Cursor = new TQCursor( cursor );
}
-void KURLLabel::setUseCursor (bool on, QCursor* cursor)
+void KURLLabel::setUseCursor (bool on, TQCursor* cursor)
{
if (on)
{
@@ -225,12 +225,12 @@ void KURLLabel::setUseTips (bool on)
d->UseTips = on;
if (on) {
- QToolTip::add (this, activeRect(), d->Tip);
+ TQToolTip::add (this, activeRect(), d->Tip);
} else
- QToolTip::remove (this);
+ TQToolTip::remove (this);
}
-void KURLLabel::setTipText (const QString& tip)
+void KURLLabel::setTipText (const TQString& tip)
{
d->Tip = tip;
@@ -242,12 +242,12 @@ bool KURLLabel::useTips () const
return d->UseTips;
}
-const QString& KURLLabel::tipText () const
+const TQString& KURLLabel::tipText () const
{
return d->Tip;
}
-void KURLLabel::setHighlightedColor (const QColor& highcolor)
+void KURLLabel::setHighlightedColor (const TQColor& highcolor)
{
d->LinkColor = highcolor;
@@ -255,12 +255,12 @@ void KURLLabel::setHighlightedColor (const QColor& highcolor)
setLinkColor (highcolor);
}
-void KURLLabel::setHighlightedColor (const QString& highcolor)
+void KURLLabel::setHighlightedColor (const TQString& highcolor)
{
- setHighlightedColor (QColor (highcolor));
+ setHighlightedColor (TQColor (highcolor));
}
-void KURLLabel::setSelectedColor (const QColor& selcolor)
+void KURLLabel::setSelectedColor (const TQColor& selcolor)
{
d->HighlightedLinkColor = selcolor;
@@ -268,9 +268,9 @@ void KURLLabel::setSelectedColor (const QColor& selcolor)
setLinkColor (selcolor);
}
-void KURLLabel::setSelectedColor (const QString& selcolor)
+void KURLLabel::setSelectedColor (const TQString& selcolor)
{
- setSelectedColor (QColor (selcolor));
+ setSelectedColor (TQColor (selcolor));
}
void KURLLabel::setGlow (bool glow)
@@ -293,22 +293,22 @@ bool KURLLabel::isFloatEnabled () const
return d->Float;
}
-void KURLLabel::setAltPixmap (const QPixmap& altPix)
+void KURLLabel::setAltPixmap (const TQPixmap& altPix)
{
d->AltPixmap = altPix;
}
-const QPixmap* KURLLabel::altPixmap () const
+const TQPixmap* KURLLabel::altPixmap () const
{
return &d->AltPixmap;
}
-void KURLLabel::enterEvent (QEvent* e)
+void KURLLabel::enterEvent (TQEvent* e)
{
- QLabel::enterEvent (e);
+ TQLabel::enterEvent (e);
- QRect r( activeRect() );
- if (!r.contains( static_cast<QMouseEvent*>(e)->pos() ))
+ TQRect r( activeRect() );
+ if (!r.contains( static_cast<TQMouseEvent*>(e)->pos() ))
return;
if (!d->AltPixmap.isNull() && pixmap())
@@ -333,9 +333,9 @@ void KURLLabel::enterEvent (QEvent* e)
emit enteredURL (d->URL);
}
-void KURLLabel::leaveEvent (QEvent* e)
+void KURLLabel::leaveEvent (TQEvent* e)
{
- QLabel::leaveEvent (e);
+ TQLabel::leaveEvent (e);
if (!d->AltPixmap.isNull() && pixmap())
setPixmap (d->RealPixmap);
@@ -349,30 +349,30 @@ void KURLLabel::leaveEvent (QEvent* e)
emit leftURL (d->URL);
}
-bool KURLLabel::event (QEvent *e)
+bool KURLLabel::event (TQEvent *e)
{
- if (e && e->type() == QEvent::ParentPaletteChange)
+ if (e && e->type() == TQEvent::ParentPaletteChange)
{
// use parentWidget() unless you are a toplevel widget, then try qAapp
- QPalette p = parentWidget() ? parentWidget()->palette() : qApp->palette();
- p.setBrush(QColorGroup::Base, p.brush(QPalette::Normal, QColorGroup::Background));
- p.setColor(QColorGroup::Foreground, palette().active().foreground());
+ TQPalette p = parentWidget() ? parentWidget()->palette() : qApp->palette();
+ p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background));
+ p.setColor(TQColorGroup::Foreground, palette().active().foreground());
setPalette(p);
d->LinkColor = KGlobalSettings::linkColor();
setLinkColor(d->LinkColor);
return true;
}
- else if (e->type() == QEvent::Paint) {
- const bool result = QLabel::event(e);
+ else if (e->type() == TQEvent::Paint) {
+ const bool result = TQLabel::event(e);
if (result && hasFocus()) {
- QPainter p(this);
- QRect r( activeRect() );
- style().drawPrimitive( QStyle::PE_FocusRect, &p, r, colorGroup() );
+ TQPainter p(this);
+ TQRect r( activeRect() );
+ style().drawPrimitive( TQStyle::PE_FocusRect, &p, r, colorGroup() );
}
return result;
}
- else if (e->type() == QEvent::KeyPress) {
- QKeyEvent* ke = static_cast<QKeyEvent*>(e);
+ else if (e->type() == TQEvent::KeyPress) {
+ TQKeyEvent* ke = static_cast<TQKeyEvent*>(e);
if (ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return) {
setLinkColor (d->HighlightedLinkColor);
d->Timer->start (300);
@@ -382,34 +382,34 @@ bool KURLLabel::event (QEvent *e)
return true;
}
}
- else if (e->type() == QEvent::MouseButtonPress) {
- QRect r( activeRect() );
- d->MousePressed = r.contains(static_cast<QMouseEvent*>(e)->pos());
+ else if (e->type() == TQEvent::MouseButtonPress) {
+ TQRect r( activeRect() );
+ d->MousePressed = r.contains(static_cast<TQMouseEvent*>(e)->pos());
}
- else if (e->type() == QEvent::MouseMove) {
+ else if (e->type() == TQEvent::MouseMove) {
if (d->Cursor) {
- QRect r( activeRect() );
- bool inside = r.contains(static_cast<QMouseEvent*>(e)->pos());
+ TQRect r( activeRect() );
+ bool inside = r.contains(static_cast<TQMouseEvent*>(e)->pos());
if (d->WasInsideRect != inside) {
if (inside)
- QLabel::setCursor(*d->Cursor);
+ TQLabel::setCursor(*d->Cursor);
else
- QLabel::unsetCursor();
+ TQLabel::unsetCursor();
d->WasInsideRect = inside;
}
}
}
- return QLabel::event(e);
+ return TQLabel::event(e);
}
-QRect KURLLabel::activeRect() const
+TQRect KURLLabel::activeRect() const
{
- QRect r( contentsRect() );
- if (text().isEmpty() || (!d->MarginAltered && sizePolicy() == QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)))
+ TQRect r( contentsRect() );
+ if (text().isEmpty() || (!d->MarginAltered && sizePolicy() == TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)))
return r; //fixed size is sometimes used with pixmap
- int hAlign = QApplication::horizontalAlignment( alignment() );
+ int hAlign = TQApplication::horizontalAlignment( alignment() );
int indentX = (hAlign && indent()>0) ? indent() : 0;
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
r.setWidth( QMIN(fm.width(text()), r.width()));
if ( hAlign & AlignLeft )
r.moveLeft(r.left() + indentX);
@@ -418,29 +418,29 @@ QRect KURLLabel::activeRect() const
if ( hAlign & AlignRight )
r.moveLeft(contentsRect().width()-r.width()-indentX+margin());
int add = QMIN(3, margin());
- r = QRect(r.left()-add, r.top()-add, r.width()+2*add, r.height()+2*add);
+ r = TQRect(r.left()-add, r.top()-add, r.width()+2*add, r.height()+2*add);
return r;
}
void KURLLabel::setMargin( int margin )
{
- QLabel::setMargin(margin);
+ TQLabel::setMargin(margin);
d->MarginAltered = true;
}
void KURLLabel::setFocusPolicy( FocusPolicy policy )
{
- QLabel::setFocusPolicy(policy);
+ TQLabel::setFocusPolicy(policy);
if (!d->MarginAltered) {
- QLabel::setMargin(policy == NoFocus ? 0 : 3); //better default : better look when focused
+ TQLabel::setMargin(policy == NoFocus ? 0 : 3); //better default : better look when focused
}
}
-void KURLLabel::setSizePolicy ( QSizePolicy policy )
+void KURLLabel::setSizePolicy ( TQSizePolicy policy )
{
- QLabel::setSizePolicy(policy);
- if (!d->MarginAltered && policy.horData()==QSizePolicy::Fixed && policy.verData()==QSizePolicy::Fixed) {
- QLabel::setMargin(0); //better default : better look when fixed size
+ TQLabel::setSizePolicy(policy);
+ if (!d->MarginAltered && policy.horData()==TQSizePolicy::Fixed && policy.verData()==TQSizePolicy::Fixed) {
+ TQLabel::setMargin(0); //better default : better look when fixed size
}
}
diff --git a/kdeui/kurllabel.h b/kdeui/kurllabel.h
index 81f2d97ab..0d3853da4 100644
--- a/kdeui/kurllabel.h
+++ b/kdeui/kurllabel.h
@@ -21,7 +21,7 @@
#ifndef KURLLABEL_H
#define KURLLABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdelibs_export.h>
@@ -30,9 +30,9 @@ class QCursor;
class QPixmap;
/**
- * @short A drop-in replacement for QLabel that displays hyperlinks.
+ * @short A drop-in replacement for TQLabel that displays hyperlinks.
*
- * KURLLabel is a drop-in replacement for QLabel that handles text
+ * KURLLabel is a drop-in replacement for TQLabel that handles text
* in a fashion similar to how an HTML widget handles hyperlinks. The
* text can be underlined (or not) and set to different colors. It
* can also "glow" (cycle colors) when the mouse passes over it.
@@ -51,8 +51,8 @@ class QPixmap;
* KURLLabel *address = new KURLLabel(this);
* address->setText("My homepage");
* address->setURL("http://www.home.com/~me");
- * connect(address, SIGNAL(leftClickedURL(const QString&)),
- * SLOT(processMyURL(const QString&)));
+ * connect(address, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ * TQT_SLOT(processMyURL(const TQString&)));
* \endcode
*
* In this example, the text "My homepage" would be displayed
@@ -71,9 +71,9 @@ class QPixmap;
class KDEUI_EXPORT KURLLabel : public QLabel
{
Q_OBJECT
- Q_PROPERTY (QString url READ url WRITE setURL)
- Q_PROPERTY (QString tipText READ tipText WRITE setTipText )
- Q_PROPERTY (QPixmap altPixmap READ altPixmap WRITE setAltPixmap)
+ Q_PROPERTY (TQString url READ url WRITE setURL)
+ Q_PROPERTY (TQString tipText READ tipText WRITE setTipText )
+ Q_PROPERTY (TQPixmap altPixmap READ altPixmap WRITE setAltPixmap)
Q_PROPERTY (bool glowEnabled READ isGlowEnabled WRITE setGlow )
Q_PROPERTY (bool floatEnabled READ isFloatEnabled WRITE setFloat )
Q_PROPERTY (bool useTips READ useTips WRITE setUseTips )
@@ -83,25 +83,25 @@ public:
/**
* Default constructor.
*
- * Use setURL() and setText() or QListView::setPixmap()
+ * Use setURL() and setText() or TQListView::setPixmap()
* to set the resp. properties.
*/
- KURLLabel (QWidget* parent = 0L, const char* name = 0L);
+ KURLLabel (TQWidget* parent = 0L, const char* name = 0L);
/**
* Convenience constructor.
*
* @param url is the URL emitted when the label is clicked.
- * @param text is the displayed string. If it's equal to QString::null
+ * @param text is the displayed string. If it's equal to TQString::null
* the @p url will be used instead.
* @param parent Passed to lower level constructor
* @param name Passed to lower level constructor
*
- * @p parent and @p name are passed to QLabel, which in turn passes
+ * @p parent and @p name are passed to TQLabel, which in turn passes
* them further down
*/
- KURLLabel (const QString& url, const QString& text = QString::null,
- QWidget* parent = 0L, const char* name = 0L);
+ KURLLabel (const TQString& url, const TQString& text = TQString::null,
+ TQWidget* parent = 0L, const char* name = 0L);
/**
* Destructs the label.
@@ -111,12 +111,12 @@ public:
/**
* Returns the URL.
*/
- const QString& url () const;
+ const TQString& url () const;
/**
* Returns the current tooltip text.
*/
- const QString& tipText () const;
+ const TQString& tipText () const;
/**
* @return true if a tooltip will be displayed.
@@ -151,7 +151,7 @@ public:
/**
* @return the alternate pixmap (may be 0L if none was set).
*/
- const QPixmap* altPixmap () const;
+ const TQPixmap* altPixmap () const;
/**
* Reimplemented for internal reasons, the API is not affected.
@@ -166,7 +166,7 @@ public:
/**
* Reimplemented for internal reasons, the API is not affected.
*/
- virtual void setSizePolicy ( QSizePolicy );
+ virtual void setSizePolicy ( TQSizePolicy );
public slots:
/**
@@ -182,12 +182,12 @@ public slots:
*
* @see url
*/
- void setURL (const QString& url);
+ void setURL (const TQString& url);
/**
* Overridden for internal reasons; the API remains unaffected.
*/
- virtual void setFont (const QFont&);
+ virtual void setFont (const TQFont&);
/**
* Turns on or off the tool tip feature.
@@ -205,7 +205,7 @@ public slots:
*
* @see setUseTips()
*/
- void setTipText (const QString& tip);
+ void setTipText (const TQString& tip);
/**
* Sets the highlight color.
@@ -213,14 +213,14 @@ public slots:
* This is the default foreground
* color (non-selected). By default, it is @p blue.
*/
- void setHighlightedColor(const QColor& highcolor);
+ void setHighlightedColor(const TQColor& highcolor);
/**
* This is an overloaded version for convenience.
*
* @see setHighlightedColor()
*/
- void setHighlightedColor(const QString& highcolor);
+ void setHighlightedColor(const TQString& highcolor);
/**
* Sets the selected color.
@@ -229,19 +229,19 @@ public slots:
* to when either a mouse passes over it and "glow" mode is on or
* when it is selected (clicked). By default, it is @p red.
*/
- void setSelectedColor(const QColor& selcolor);
+ void setSelectedColor(const TQColor& selcolor);
/**
* This is an overloaded version for convenience.
*
* @see setSelectedColor()
*/
- void setSelectedColor(const QString& selcolor);
+ void setSelectedColor(const TQString& selcolor);
/**
* Overridden for internal reasons; the API remains unaffected.
*/
- virtual void setCursor ( const QCursor& cursor );
+ virtual void setCursor ( const TQCursor& cursor );
/**
* Overridden for internal reasons; the API remains unaffected.
@@ -258,7 +258,7 @@ public slots:
* @param on whether a custom cursor should be displayed.
* @param cursor is the custom cursor. @p 0L indicates the default "hand cursor".
*/
- void setUseCursor (bool on, QCursor* cursor = 0L);
+ void setUseCursor (bool on, TQCursor* cursor = 0L);
/**
* Turns on or off the "glow" feature.
@@ -291,7 +291,7 @@ public slots:
*
* @see altPixmap()
*/
- void setAltPixmap (const QPixmap& altPix);
+ void setAltPixmap (const TQPixmap& altPix);
signals:
@@ -300,7 +300,7 @@ signals:
*
* @param url The URL for this label.
*/
- void enteredURL (const QString& url);
+ void enteredURL (const TQString& url);
/**
* Emitted when the mouse has passed over the label.
@@ -312,7 +312,7 @@ signals:
*
* @param url The URL for this label.
*/
- void leftURL (const QString& url);
+ void leftURL (const TQString& url);
/**
* Emitted when the mouse is no longer over the label.
@@ -324,7 +324,7 @@ signals:
*
* @param url The URL for this label.
*/
- void leftClickedURL(const QString& url);
+ void leftClickedURL(const TQString& url);
/**
* Emitted when the user clicked the left mouse button on this label.
@@ -336,7 +336,7 @@ signals:
*
* @param url The URL for this label.
*/
- void rightClickedURL(const QString& url);
+ void rightClickedURL(const TQString& url);
/**
* Emitted when the user clicked the right mouse button on this label.
@@ -348,7 +348,7 @@ signals:
*
* @param url The URL for this label.
*/
- void middleClickedURL(const QString& url);
+ void middleClickedURL(const TQString& url);
/**
* Emitted when the user clicked the left mouse button on this label.
@@ -360,27 +360,27 @@ protected:
/**
* Overridden for internal reasons; the API remains unaffected.
*/
- virtual void mouseReleaseEvent ( QMouseEvent * e );
+ virtual void mouseReleaseEvent ( TQMouseEvent * e );
/**
* Overridden for internal reasons; the API remains unaffected.
*/
- virtual void enterEvent (QEvent*);
+ virtual void enterEvent (TQEvent*);
/**
* Overridden for internal reasons; the API remains unaffected.
*/
- virtual void leaveEvent (QEvent*);
+ virtual void leaveEvent (TQEvent*);
/**
* Catch parent palette changes
*/
- virtual bool event (QEvent *e);
+ virtual bool event (TQEvent *e);
/**
*
*/
- QRect activeRect() const;
+ TQRect activeRect() const;
private slots:
@@ -395,7 +395,7 @@ private:
* @internal
* A private helper function to set the link-color to @p col.
*/
- void setLinkColor (const QColor& col);
+ void setLinkColor (const TQColor& col);
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kwhatsthismanager.cpp b/kdeui/kwhatsthismanager.cpp
index 77c957a62..a2f3cf0f6 100644
--- a/kdeui/kwhatsthismanager.cpp
+++ b/kdeui/kwhatsthismanager.cpp
@@ -17,10 +17,10 @@
* Boston, MA 02110-1301, USA.
*/
#include "kwhatsthismanager_p.h"
-#include "qwhatsthis.h"
-#include <qvariant.h>
+#include "tqwhatsthis.h"
+#include <tqvariant.h>
#include <kdebug.h>
-#include <qtextedit.h>
+#include <tqtextedit.h>
#include <klocale.h>
#include <kapplication.h>
@@ -29,57 +29,57 @@ KWhatsThisManager *KWhatsThisManager::s_instance = 0;
class KWhatsThisUndefined : public QWhatsThis
{
public:
- KWhatsThisUndefined (QWidget *);
- QString text (const QPoint &);
+ KWhatsThisUndefined (TQWidget *);
+ TQString text (const TQPoint &);
public slots:
- bool clicked (const QString &);
+ bool clicked (const TQString &);
protected:
- QWidget *m_widget;
+ TQWidget *m_widget;
};
-KWhatsThisUndefined::KWhatsThisUndefined (QWidget *w)
- : QWhatsThis (w)
+KWhatsThisUndefined::KWhatsThisUndefined (TQWidget *w)
+ : TQWhatsThis (w)
{
m_widget = w;
}
-QString KWhatsThisUndefined::text (const QPoint &)
+TQString KWhatsThisUndefined::text (const TQPoint &)
{
if (!m_widget)
return "";
- QString txt = i18n ("<b>Not Defined</b><br>There is no \"What's This?\""
+ TQString txt = i18n ("<b>Not Defined</b><br>There is no \"What's This?\""
" help assigned to this widget. If you want to help us to "
" describe the widget, you are welcome to <a href=\"submit"
"-whatsthis\">send us your own \"What's This?\" help</a> for it.");
- QString parent;
+ TQString parent;
if (m_widget -> parentWidget ())
- parent = QWhatsThis::textFor (m_widget -> parentWidget ());
+ parent = TQWhatsThis::textFor (m_widget -> parentWidget ());
if (parent != txt)
if (! parent . isEmpty ())
return parent;
return txt;
}
-bool KWhatsThisUndefined::clicked (const QString& href)
+bool KWhatsThisUndefined::clicked (const TQString& href)
{
if (href == "submit-whatsthis") {
- QWidget *w = m_widget;
- QString body;
+ TQWidget *w = m_widget;
+ TQString body;
body . append ("Widget text: '" + (m_widget -> property ("text") . toString ()) + "'\n");
- QString dsc = QString ("current --> ") + m_widget -> name ();
- dsc . append (QString (" (") + m_widget -> className () + ")\n");
+ TQString dsc = TQString ("current --> ") + m_widget -> name ();
+ dsc . append (TQString (" (") + m_widget -> className () + ")\n");
for (w = m_widget; w && w != m_widget -> topLevelWidget (); w = w -> parentWidget ()) {
dsc . append (w -> name ());
- dsc . append (QString (" (") + w -> className () + ")\n");
+ dsc . append (TQString (" (") + w -> className () + ")\n");
}
w = m_widget -> topLevelWidget ();
if (w) {
dsc . append ("toplevel --> ");
dsc . append (w -> name ());
- dsc . append (QString (" (") + w -> className () + ")\n");
+ dsc . append (TQString (" (") + w -> className () + ")\n");
}
body . append (dsc);
- QString subj ("What's This submission: ");
+ TQString subj ("What's This submission: ");
subj . append (qApp -> argv () [0]);
body . append ("\nPlease type in your what's this help between these lines: "
"\n--%-----------------------------------------------------------------------\n"
@@ -102,15 +102,15 @@ KWhatsThisManager::KWhatsThisManager ()
// qApp -> installEventFilter (this);
}
-bool KWhatsThisManager::eventFilter (QObject * /*o*/, QEvent *e)
+bool KWhatsThisManager::eventFilter (TQObject * /*o*/, TQEvent *e)
{
- if (e -> type () == QEvent::ChildInserted) {
- QChildEvent *ce = (QChildEvent *)e;
+ if (e -> type () == TQEvent::ChildInserted) {
+ TQChildEvent *ce = (TQChildEvent *)e;
// kdDebug () << "new qobject:" << ce -> child () << endl;
if (ce -> child () -> isWidgetType ()) {
- QWidget *w = (QWidget *) (ce -> child ());
+ TQWidget *w = (TQWidget *) (ce -> child ());
// kdDebug () << "new qwidget:" << w << endl;
- if (QWhatsThis::textFor (w) . isEmpty ())
+ if (TQWhatsThis::textFor (w) . isEmpty ())
new KWhatsThisUndefined (w);
}
}
diff --git a/kdeui/kwhatsthismanager_p.h b/kdeui/kwhatsthismanager_p.h
index 6dd420be5..3c32c7d18 100644
--- a/kdeui/kwhatsthismanager_p.h
+++ b/kdeui/kwhatsthismanager_p.h
@@ -19,8 +19,8 @@
#ifndef KWHATSTHISMANAGER_P_H
#define KWHATSTHISMANAGER_P_H
-#include <qwhatsthis.h>
-#include <qapplication.h>
+#include <tqwhatsthis.h>
+#include <tqapplication.h>
#include <kdialogbase.h>
@@ -48,7 +48,7 @@ class KDEUI_EXPORT KWhatsThisManager : public QObject
Q_OBJECT
public:
static void init ();
- bool eventFilter (QObject *o, QEvent *e);
+ bool eventFilter (TQObject *o, TQEvent *e);
protected:
static KWhatsThisManager *s_instance;
private:
diff --git a/kdeui/kwindowinfo.cpp b/kdeui/kwindowinfo.cpp
index 263deae84..362cc5b79 100644
--- a/kdeui/kwindowinfo.cpp
+++ b/kdeui/kwindowinfo.cpp
@@ -4,10 +4,10 @@
* email : rich@kde.org
*/
-#include <qobjectlist.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqobjectlist.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <ksystemtray.h>
#include <kwin.h>
@@ -17,8 +17,8 @@
static const int UNSPECIFIED_TIMEOUT = -1;
static const int DEFAULT_MESSAGE_TIMEOUT = 3000;
-KWindowInfo::KWindowInfo( QWidget *parent, const char *name )
- : QObject( parent, name ), win( parent ), autoDel( false )
+KWindowInfo::KWindowInfo( TQWidget *parent, const char *name )
+ : TQObject( parent, name ), win( parent ), autoDel( false )
{
}
@@ -26,7 +26,7 @@ KWindowInfo::~KWindowInfo()
{
}
-void KWindowInfo::showMessage( QWidget *window, const QString &text, int timeout )
+void KWindowInfo::showMessage( TQWidget *window, const TQString &text, int timeout )
{
KWindowInfo *info = new KWindowInfo( window );
info->autoDel = true;
@@ -35,29 +35,29 @@ void KWindowInfo::showMessage( QWidget *window, const QString &text, int timeout
delete info;
}
-void KWindowInfo::showMessage( QWidget *window, const QString &text, const QPixmap &pix, int timeout )
+void KWindowInfo::showMessage( TQWidget *window, const TQString &text, const TQPixmap &pix, int timeout )
{
KWindowInfo *info = new KWindowInfo( window );
info->autoDel = true;
info->message( text, pix, timeout );
}
-void KWindowInfo::message( const QString &text )
+void KWindowInfo::message( const TQString &text )
{
- message( text, QPixmap(), UNSPECIFIED_TIMEOUT );
+ message( text, TQPixmap(), UNSPECIFIED_TIMEOUT );
}
-void KWindowInfo::message( const QString &text, const QPixmap &pix )
+void KWindowInfo::message( const TQString &text, const TQPixmap &pix )
{
message( text, pix, UNSPECIFIED_TIMEOUT );
}
-void KWindowInfo::message( const QString &text, int timeout )
+void KWindowInfo::message( const TQString &text, int timeout )
{
- message( text, QPixmap(), timeout );
+ message( text, TQPixmap(), timeout );
}
-void KWindowInfo::message( const QString &text, const QPixmap &pix, int timeout )
+void KWindowInfo::message( const TQString &text, const TQPixmap &pix, int timeout )
{
if ( timeout != 0 )
save();
@@ -67,10 +67,10 @@ void KWindowInfo::message( const QString &text, const QPixmap &pix, int timeout
if ( timeout < 0 )
timeout = DEFAULT_MESSAGE_TIMEOUT;
if ( timeout != 0 )
- QTimer::singleShot( timeout, this, SLOT( restore() ) );
+ TQTimer::singleShot( timeout, this, TQT_SLOT( restore() ) );
}
-void KWindowInfo::permanent( const QString &text )
+void KWindowInfo::permanent( const TQString &text )
{
#ifdef Q_WS_X11
oldMiniIcon = KWin::icon( win->winId(), 16, 16, true );
@@ -82,12 +82,12 @@ void KWindowInfo::permanent( const QString &text )
permanent( text, oldIcon );
}
-void KWindowInfo::permanent( const QString &text, const QPixmap &pix )
+void KWindowInfo::permanent( const TQString &text, const TQPixmap &pix )
{
if ( !oldText.isNull() ) {
- QObjectList *l = queryList( "QTimer" );
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectList *l = queryList( "TQTimer" );
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
++it;
@@ -96,13 +96,13 @@ void KWindowInfo::permanent( const QString &text, const QPixmap &pix )
delete l;
}
- oldText = QString::null;
+ oldText = TQString::null;
display( text, pix );
}
-void KWindowInfo::display( const QString &text, const QPixmap &pix )
+void KWindowInfo::display( const TQString &text, const TQPixmap &pix )
{
- QPixmap icon;
+ TQPixmap icon;
if ( pix.isNull() )
icon.load( "bell.png" );
else
@@ -111,7 +111,7 @@ void KWindowInfo::display( const QString &text, const QPixmap &pix )
if ( win->inherits( "KSystemTray" ) ) {
KSystemTray *tray = static_cast<KSystemTray *>( win );
tray->setPixmap( icon );
- QToolTip::add( tray, text );
+ TQToolTip::add( tray, text );
return;
}
@@ -130,7 +130,7 @@ void KWindowInfo::save()
if ( win->inherits( "KSystemTray" ) ) {
KSystemTray *tray = static_cast<KSystemTray *>( win );
oldIcon = *(tray->pixmap());
- oldText = QToolTip::textFor( tray );
+ oldText = TQToolTip::textFor( tray );
return;
}
@@ -143,7 +143,7 @@ void KWindowInfo::save()
#endif
if ( oldIcon.isNull() ) {
- const QPixmap *px = win->icon();
+ const TQPixmap *px = win->icon();
if ( px )
oldIcon = *px;
else
@@ -156,8 +156,8 @@ void KWindowInfo::restore()
if ( win->inherits( "KSystemTray" ) ) {
KSystemTray *tray = static_cast<KSystemTray *>( win );
tray->setPixmap( oldIcon );
- QToolTip::add( tray, oldText );
- oldText = QString::null;
+ TQToolTip::add( tray, oldText );
+ oldText = TQString::null;
return;
}
@@ -166,7 +166,7 @@ void KWindowInfo::restore()
KWin::setIcons( win->winId(), oldIcon, oldMiniIcon );
#endif
win->setCaption( oldText );
- oldText = QString::null;
+ oldText = TQString::null;
if ( autoDel )
delete this;
diff --git a/kdeui/kwindowinfo.h b/kdeui/kwindowinfo.h
index c419a41d3..efd797c91 100644
--- a/kdeui/kwindowinfo.h
+++ b/kdeui/kwindowinfo.h
@@ -9,9 +9,9 @@
#ifndef KWINDOWINFO_H
#define KWINDOWINFO_H
-#include <qobject.h>
-#include <qpixmap.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -28,7 +28,7 @@
* default timeout to ensure the message is only displayed for 1
* second.
* \code
- * QPixmap px;
+ * TQPixmap px;
* px.load( "lo16-app-logtracker.png" );
* KWindowInfo::showMessage( this, i18n("Message Body"), px, 1000 );
* \endcode
@@ -46,7 +46,7 @@ public:
/**
* Creates a KWindowInfo with the specified parent.
*/
- KWindowInfo( QWidget *parent, const char *name=0 );
+ KWindowInfo( TQWidget *parent, const char *name=0 );
/**
* Cleans up.
@@ -68,30 +68,30 @@ public:
* Utility method to display a title bar message for the specified
* window.
*/
- static void showMessage( QWidget *window, const QString &text, int timeout = -1 );
+ static void showMessage( TQWidget *window, const TQString &text, int timeout = -1 );
/**
* Utility method to display a title bar message and icon for the
* specified window.
*/
- static void showMessage( QWidget *window, const QString &text,
- const QPixmap &pix, int timeout = -1 );
+ static void showMessage( TQWidget *window, const TQString &text,
+ const TQPixmap &pix, int timeout = -1 );
public slots:
/**
* Shows the specified text in the window title.
*/
- void message( const QString &text );
+ void message( const TQString &text );
/**
* Shows the specified text in the window title, and sets the window icon.
*/
- void message( const QString &text, const QPixmap &pix );
+ void message( const TQString &text, const TQPixmap &pix );
/**
* Shows the specified text in the window title for the specified time.
*/
- void message( const QString &text, int timeout );
+ void message( const TQString &text, int timeout );
/**
* Shows the specified icon and text in the window title and WM
@@ -100,23 +100,23 @@ public slots:
* values are -1 which means the default timeout should be used,
* and 0 which means the message is permanent.
*/
- void message( const QString &text, const QPixmap &pix, int timeout );
+ void message( const TQString &text, const TQPixmap &pix, int timeout );
/**
* Shows the specified text in the window title with no timeout.
*/
- void permanent( const QString &text );
+ void permanent( const TQString &text );
/**
* Shows the specified text and icon in the window title with no timeout.
*/
- void permanent( const QString &text, const QPixmap &pix );
+ void permanent( const TQString &text, const TQPixmap &pix );
protected:
/**
* Displays the message in the titlebar/icon.
*/
- virtual void display( const QString &text, const QPixmap &pix );
+ virtual void display( const TQString &text, const TQPixmap &pix );
protected slots:
/**
@@ -131,10 +131,10 @@ protected slots:
virtual void restore();
private:
- QWidget *win;
- QPixmap oldIcon;
- QPixmap oldMiniIcon;
- QString oldText;
+ TQWidget *win;
+ TQPixmap oldIcon;
+ TQPixmap oldMiniIcon;
+ TQString oldText;
bool autoDel;
/* @internal */
diff --git a/kdeui/kwindowlistmenu.cpp b/kdeui/kwindowlistmenu.cpp
index 8167bcdae..de9cd0c08 100644
--- a/kdeui/kwindowlistmenu.cpp
+++ b/kdeui/kwindowlistmenu.cpp
@@ -22,13 +22,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qglobal.h>
+#include <tqglobal.h>
#ifdef Q_WS_X11
#include "config.h"
-#include <qpainter.h>
-#include <qvaluelist.h>
+#include <tqpainter.h>
+#include <tqvaluelist.h>
#include <kwin.h>
#include <kwinmodule.h>
@@ -45,8 +45,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "kwindowlistmenu.h"
#include "kwindowlistmenu.moc"
-static QCString kwinName() {
- QCString appname;
+static TQCString kwinName() {
+ TQCString appname;
int screen_number = DefaultScreen(qt_xdisplay());
if (screen_number == 0)
appname = "kwin";
@@ -58,21 +58,21 @@ static QCString kwinName() {
// helper class
namespace
{
-class NameSortedInfoList : public QPtrList<KWin::WindowInfo>
+class NameSortedInfoList : public TQPtrList<KWin::WindowInfo>
{
public:
NameSortedInfoList() { setAutoDelete(true); }
~NameSortedInfoList() {}
private:
- int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 );
+ int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 );
};
-int NameSortedInfoList::compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
+int NameSortedInfoList::compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
{
KWin::WindowInfo *i1 = static_cast<KWin::WindowInfo *>(s1);
KWin::WindowInfo *i2 = static_cast<KWin::WindowInfo *>(s2);
- QString title1, title2;
+ TQString title1, title2;
if (i1)
title1 = i1->visibleNameWithState().lower();
if (i2)
@@ -82,12 +82,12 @@ int NameSortedInfoList::compareItems( QPtrCollection::Item s1, QPtrCollection::I
} // namespace
-KWindowListMenu::KWindowListMenu(QWidget *parent, const char *name)
+KWindowListMenu::KWindowListMenu(TQWidget *parent, const char *name)
: KPopupMenu(parent, name)
{
kwin_module = new KWinModule(this);
- connect(this, SIGNAL(activated(int)), SLOT(slotExec(int)));
+ connect(this, TQT_SIGNAL(activated(int)), TQT_SLOT(slotExec(int)));
}
KWindowListMenu::~KWindowListMenu()
@@ -102,7 +102,7 @@ static bool standaloneDialog( const KWin::WindowInfo* info, const NameSortedInfo
{
return info->transientFor() == qt_xrootwin();
}
- for( QPtrListIterator< KWin::WindowInfo > it( list );
+ for( TQPtrListIterator< KWin::WindowInfo > it( list );
it.current() != NULL;
++it )
if( (*it)->groupLeader() == group )
@@ -127,9 +127,9 @@ void KWindowListMenu::init()
map.clear();
int unclutter = insertItem( i18n("Unclutter Windows"),
- this, SLOT( slotUnclutterWindows() ) );
+ this, TQT_SLOT( slotUnclutterWindows() ) );
int cascade = insertItem( i18n("Cascade Windows"),
- this, SLOT( slotCascadeWindows() ) );
+ this, TQT_SLOT( slotCascadeWindows() ) );
// if we only have one desktop we won't be showing titles, so put a separator in
if (nd == 1)
@@ -138,8 +138,8 @@ void KWindowListMenu::init()
}
- QValueList<KWin::WindowInfo> windows;
- for (QValueList<WId>::ConstIterator it = kwin_module->windows().begin();
+ TQValueList<KWin::WindowInfo> windows;
+ for (TQValueList<WId>::ConstIterator it = kwin_module->windows().begin();
it != kwin_module->windows().end(); ++it) {
windows.append( KWin::windowInfo( *it, NET::WMDesktop ));
}
@@ -154,7 +154,7 @@ void KWindowListMenu::init()
NameSortedInfoList list;
list.setAutoDelete(true);
- for (QValueList<KWin::WindowInfo>::ConstIterator it = windows.begin();
+ for (TQValueList<KWin::WindowInfo>::ConstIterator it = windows.begin();
it != windows.end(); ++it) {
if (((*it).desktop() == d) || (on_all_desktops && (*it).onAllDesktops())
|| (!show_all_desktops_group && (*it).onAllDesktops())) {
@@ -166,14 +166,14 @@ void KWindowListMenu::init()
for (KWin::WindowInfo* info = list.first(); info; info = list.next(), ++i)
{
- QString itemText = KStringHandler::cPixelSqueeze(info->visibleNameWithState(), fontMetrics(), maxwidth);
+ TQString itemText = KStringHandler::cPixelSqueeze(info->visibleNameWithState(), fontMetrics(), maxwidth);
NET::WindowType windowType = info->windowType( NET::NormalMask | NET::DesktopMask
| NET::DockMask | NET::ToolbarMask | NET::MenuMask | NET::DialogMask
| NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask );
if ( (windowType == NET::Normal || windowType == NET::Unknown
|| (windowType == NET::Dialog && standaloneDialog( info, list )))
&& !(info->state() & NET::SkipTaskbar) ) {
- QPixmap pm = KWin::icon(info->win(), 16, 16, true );
+ TQPixmap pm = KWin::icon(info->win(), 16, 16, true );
items++;
// ok, we have items on this desktop, let's show the title
@@ -186,7 +186,7 @@ void KWindowListMenu::init()
}
// Avoid creating unwanted accelerators.
- itemText.replace('&', QString::fromLatin1("&&"));
+ itemText.replace('&', TQString::fromLatin1("&&"));
insertItem( pm, itemText, i);
map.insert(i, info->win());
if (info->win() == active_window)
@@ -225,8 +225,8 @@ void KWindowListMenu::slotExec(int id)
}
// This popup is much more useful from keyboard if it has the active
-// window active by default - however, QPopupMenu tries hard to resist.
-// QPopupMenu::popup() resets the active item, so this needs to be
+// window active by default - however, TQPopupMenu tries hard to resist.
+// TQPopupMenu::popup() resets the active item, so this needs to be
// called after popup().
void KWindowListMenu::selectActiveWindow()
{
diff --git a/kdeui/kwindowlistmenu.h b/kdeui/kwindowlistmenu.h
index 8e63ed59e..4b69799d2 100644
--- a/kdeui/kwindowlistmenu.h
+++ b/kdeui/kwindowlistmenu.h
@@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define __kwindowlistmenu_h__
#include <kpopupmenu.h>
-#include <qmap.h>
+#include <tqmap.h>
#ifdef Q_WS_X11 // not yet available for non-X11
@@ -38,7 +38,7 @@ class KDEUI_EXPORT KWindowListMenu : public KPopupMenu
Q_OBJECT
public:
- KWindowListMenu( QWidget *parent = 0, const char *name = 0 );
+ KWindowListMenu( TQWidget *parent = 0, const char *name = 0 );
virtual ~KWindowListMenu();
void init();
@@ -58,7 +58,7 @@ protected slots:
private:
KWinModule* kwin_module;
- QMap<int,WId> map;
+ TQMap<int,WId> map;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdeui/kwizard.cpp b/kdeui/kwizard.cpp
index 80443fead..21462faad 100644
--- a/kdeui/kwizard.cpp
+++ b/kdeui/kwizard.cpp
@@ -17,9 +17,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qapplication.h>
-#include <qpushbutton.h>
+#include <tqstring.h>
+#include <tqapplication.h>
+#include <tqpushbutton.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -28,8 +28,8 @@
#include "kwizard.h"
-KWizard::KWizard( QWidget *parent, const char *name, bool modal, WFlags f )
- : QWizard( parent, name, modal, f )
+KWizard::KWizard( TQWidget *parent, const char *name, bool modal, WFlags f )
+ : TQWizard( parent, name, modal, f )
{
bool useIcons = KGlobalSettings::showIconsOnPushButtons();
@@ -49,7 +49,7 @@ KWizard::KWizard( QWidget *parent, const char *name, bool modal, WFlags f )
nextButton()->setText( i18n( "Opposite to Back","&Next" ) );
}
- QFont font = titleFont();
+ TQFont font = titleFont();
font.setBold( true );
setTitleFont( font );
}
diff --git a/kdeui/kwizard.h b/kdeui/kwizard.h
index d9d1e05a1..81a2c2d65 100644
--- a/kdeui/kwizard.h
+++ b/kdeui/kwizard.h
@@ -23,7 +23,7 @@
#ifndef __KWIZARD_H
#define __KWIZARD_H
-#include <qwizard.h>
+#include <tqwizard.h>
#include <kdelibs_export.h>
@@ -35,8 +35,8 @@
* "Cancel" and "Help" buttons. A wizard comes in handy for tutorials or
* configuration dialogs with sequential steps.
*
-* KWizard is just a wrapper for Qt's QWizard class. See the
-* QWizard documentation for a detailed description of available
+* KWizard is just a wrapper for Qt's TQWizard class. See the
+* TQWizard documentation for a detailed description of available
* functions. The only added functionality is a KDE conformant translation
* mechanism for the built-in buttons.
*
@@ -50,7 +50,7 @@ public:
/**
* Constructor
*/
- KWizard(QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0);
+ KWizard(TQWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0);
/**
* Destructor
*/
diff --git a/kdeui/kwordwrap.cpp b/kdeui/kwordwrap.cpp
index 4b2e801d0..9c6427eb5 100644
--- a/kdeui/kwordwrap.cpp
+++ b/kdeui/kwordwrap.cpp
@@ -19,19 +19,19 @@
#include "kwordwrap.h"
#include <kdebug.h>
#include <kstringhandler.h>
-#include <qpainter.h>
+#include <tqpainter.h>
class KWordWrapPrivate {
public:
- QRect m_constrainingRect;
+ TQRect m_constrainingRect;
};
-KWordWrap::KWordWrap(const QRect & r) {
+KWordWrap::KWordWrap(const TQRect & r) {
d = new KWordWrapPrivate;
d->m_constrainingRect = r;
}
-KWordWrap* KWordWrap::formatText( QFontMetrics &fm, const QRect & r, int /*flags*/, const QString & str, int len )
+KWordWrap* KWordWrap::formatText( TQFontMetrics &fm, const TQRect & r, int /*flags*/, const TQString & str, int len )
{
KWordWrap* kw = new KWordWrap( r );
// The wordwrap algorithm
@@ -58,7 +58,7 @@ KWordWrap* KWordWrap::formatText( QFontMetrics &fm, const QRect & r, int /*flags
for ( int i = 0 ; i < len; ++i )
{
- QChar c = str[i];
+ TQChar c = str[i];
int ww = fm.charWidth( str, i );
isParens = ( c == '(' || c == '[' || c == '{' );
@@ -67,7 +67,7 @@ KWordWrap* KWordWrap::formatText( QFontMetrics &fm, const QRect & r, int /*flags
// Special case for '(', '[' and '{': we want to break before them
if ( !isBreakable && i < len-1 ) {
- QChar nextc = str[i+1]; // look at next char
+ TQChar nextc = str[i+1]; // look at next char
isBreakable = ( nextc == '(' || nextc == '[' || nextc == '{' );
}
// Special case for '/': after normal chars it's breakable (e.g. inside a path),
@@ -76,7 +76,7 @@ KWordWrap* KWordWrap::formatText( QFontMetrics &fm, const QRect & r, int /*flags
if ( c == '/' && (wasBreakable || wasParens) )
isBreakable = false;
- /*kdDebug() << "c='" << QString(c) << "' i=" << i << "/" << len
+ /*kdDebug() << "c='" << TQString(c) << "' i=" << i << "/" << len
<< " x=" << x << " ww=" << ww << " w=" << w
<< " lastBreak=" << lastBreak << " isBreakable=" << isBreakable << endl;*/
int breakAt = -1;
@@ -145,12 +145,12 @@ KWordWrap::~KWordWrap() {
delete d;
}
-QString KWordWrap::wrappedString() const
+TQString KWordWrap::wrappedString() const
{
// We use the calculated break positions to insert '\n' into the string
- QString ws;
+ TQString ws;
int start = 0;
- QValueList<int>::ConstIterator it = m_breakPositions.begin();
+ TQValueList<int>::ConstIterator it = m_breakPositions.begin();
for ( ; it != m_breakPositions.end() ; ++it )
{
int end = (*it);
@@ -161,28 +161,28 @@ QString KWordWrap::wrappedString() const
return ws;
}
-QString KWordWrap::truncatedString( bool dots ) const
+TQString KWordWrap::truncatedString( bool dots ) const
{
if ( m_breakPositions.isEmpty() )
return m_text;
- QString ts = m_text.left( m_breakPositions.first() + 1 );
+ TQString ts = m_text.left( m_breakPositions.first() + 1 );
if ( dots )
ts += "...";
return ts;
}
-static QColor mixColors(double p1, QColor c1, QColor c2) {
- return QColor(int(c1.red() * p1 + c2.red() * (1.0-p1)),
+static TQColor mixColors(double p1, TQColor c1, TQColor c2) {
+ return TQColor(int(c1.red() * p1 + c2.red() * (1.0-p1)),
int(c1.green() * p1 + c2.green() * (1.0-p1)),
int(c1.blue() * p1 + c2.blue() * (1.0-p1)));
}
-void KWordWrap::drawFadeoutText(QPainter *p, int x, int y, int maxW,
- const QString &t) {
- QFontMetrics fm = p->fontMetrics();
- QColor bgColor = p->backgroundColor();
- QColor textColor = p->pen().color();
+void KWordWrap::drawFadeoutText(TQPainter *p, int x, int y, int maxW,
+ const TQString &t) {
+ TQFontMetrics fm = p->fontMetrics();
+ TQColor bgColor = p->backgroundColor();
+ TQColor textColor = p->pen().color();
if ( ( fm.boundingRect( t ).width() > maxW ) && ( t.length() > 1 ) ) {
unsigned int tl = 0;
@@ -201,7 +201,7 @@ void KWordWrap::drawFadeoutText(QPainter *p, int x, int y, int maxW,
int n = QMIN( tl, 3);
for (int i = 0; i < n; i++) {
p->setPen( mixColors( 0.70 - i * 0.25, textColor, bgColor ) );
- QString s( t.at( tl - n + i ) );
+ TQString s( t.at( tl - n + i ) );
p->drawText( x, y, s );
x += fm.width( s );
}
@@ -210,24 +210,24 @@ void KWordWrap::drawFadeoutText(QPainter *p, int x, int y, int maxW,
p->drawText( x, y, t );
}
-void KWordWrap::drawTruncateText(QPainter *p, int x, int y, int maxW,
- const QString &t) {
- QString tmpText = KStringHandler::rPixelSqueeze( t, p->fontMetrics(), maxW );
+void KWordWrap::drawTruncateText(TQPainter *p, int x, int y, int maxW,
+ const TQString &t) {
+ TQString tmpText = KStringHandler::rPixelSqueeze( t, p->fontMetrics(), maxW );
p->drawText( x, y, tmpText, maxW );
}
-void KWordWrap::drawText( QPainter *painter, int textX, int textY, int flags ) const
+void KWordWrap::drawText( TQPainter *painter, int textX, int textY, int flags ) const
{
//kdDebug() << "KWordWrap::drawText text=" << wrappedString() << " x=" << textX << " y=" << textY << endl;
// We use the calculated break positions to draw the text line by line using QPainter
int start = 0;
int y = 0;
- QFontMetrics fm = painter->fontMetrics();
+ TQFontMetrics fm = painter->fontMetrics();
int height = fm.height(); // line height
int ascent = fm.ascent();
int maxwidth = m_boundingRect.width();
- QValueList<int>::ConstIterator it = m_breakPositions.begin();
- QValueList<int>::ConstIterator itw = m_lineWidths.begin();
+ TQValueList<int>::ConstIterator it = m_breakPositions.begin();
+ TQValueList<int>::ConstIterator itw = m_lineWidths.begin();
for ( ; it != m_breakPositions.end() ; ++it, ++itw )
{
// if this is the last line, leave the loop
diff --git a/kdeui/kwordwrap.h b/kdeui/kwordwrap.h
index 676000789..22fcf940a 100644
--- a/kdeui/kwordwrap.h
+++ b/kdeui/kwordwrap.h
@@ -19,10 +19,10 @@
#ifndef kwordwrap_h
#define kwordwrap_h
-#include <qfontmetrics.h>
-#include <qvaluelist.h>
-#include <qrect.h>
-#include <qstring.h>
+#include <tqfontmetrics.h>
+#include <tqvaluelist.h>
+#include <tqrect.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -58,7 +58,7 @@ public:
/**
* Main method for wrapping text.
*
- * @param fm Font metrics, for the chosen font. Better cache it, creating a QFontMetrics is expensive.
+ * @param fm Font metrics, for the chosen font. Better cache it, creating a TQFontMetrics is expensive.
* @param r Constraining rectangle. Only the width and height matter. With
* negative height the complete text will be rendered
* @param flags currently unused
@@ -66,7 +66,7 @@ public:
* @param len Length of text to wrap (default is -1 for all).
* @return a KWordWrap instance. The caller is responsible for storing and deleting the result.
*/
- static KWordWrap* formatText( QFontMetrics &fm, const QRect & r, int flags, const QString & str, int len = -1 );
+ static KWordWrap* formatText( TQFontMetrics &fm, const TQRect & r, int flags, const TQString & str, int len = -1 );
/**
* @return the bounding rect, calculated by formatText. The width is the
@@ -74,26 +74,26 @@ public:
* the rectangle given to formatText. The height is the
* text block. X and Y are always 0.
*/
- QRect boundingRect() const { return m_boundingRect; }
+ TQRect boundingRect() const { return m_boundingRect; }
/**
* @return the original string, with '\n' inserted where
* the text is broken by the wordwrap algorithm.
*/
- QString wrappedString() const; // gift for Dirk :)
+ TQString wrappedString() const; // gift for Dirk :)
/**
* @return the original string, truncated to the first line.
* If @p dots was set, '...' is appended in case the string was truncated.
* Bug: Note that the '...' come out of the bounding rect.
*/
- QString truncatedString( bool dots = true ) const;
+ TQString truncatedString( bool dots = true ) const;
/**
* Draw the text that has been previously wrapped, at position x,y.
* Flags are for alignment, e.g. Qt::AlignHCenter. Default is
* Qt::AlignAuto.
- * @param painter the QPainter to use.
+ * @param painter the TQPainter to use.
* @param x the horizontal position of the text
* @param y the vertical position of the text
* @param flags the ORed text alignment flags from the Qt namespace,
@@ -101,7 +101,7 @@ public:
* does not fit (the @p painter's background must be set
* accordingly)
*/
- void drawText( QPainter *painter, int x, int y, int flags = Qt::AlignAuto ) const;
+ void drawText( TQPainter *painter, int x, int y, int flags = Qt::AlignAuto ) const;
/**
* Destructor.
@@ -120,8 +120,8 @@ public:
* @param t the text to draw
* @since 3.2
*/
- static void drawFadeoutText( QPainter *p, int x, int y, int maxW,
- const QString &t );
+ static void drawFadeoutText( TQPainter *p, int x, int y, int maxW,
+ const TQString &t );
/**
* Draws the string @p t at the given coordinates, if it does not
@@ -133,15 +133,15 @@ public:
* @param t the text to draw
* @since 3.3
*/
- static void drawTruncateText( QPainter *p, int x, int y, int maxW,
- const QString &t );
+ static void drawTruncateText( TQPainter *p, int x, int y, int maxW,
+ const TQString &t );
private:
- KWordWrap( const QRect & r );
- QValueList<int> m_breakPositions;
- QValueList<int> m_lineWidths;
- QRect m_boundingRect;
- QString m_text;
+ KWordWrap( const TQRect & r );
+ TQValueList<int> m_breakPositions;
+ TQValueList<int> m_lineWidths;
+ TQRect m_boundingRect;
+ TQString m_text;
private:
class KWordWrapPrivate* d;
};
diff --git a/kdeui/kxmlguibuilder.cpp b/kdeui/kxmlguibuilder.cpp
index d3a19b77b..305ce135c 100644
--- a/kdeui/kxmlguibuilder.cpp
+++ b/kdeui/kxmlguibuilder.cpp
@@ -30,7 +30,7 @@
#include <klocale.h>
#include <kiconloader.h>
#include <kdebug.h>
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
class KXMLGUIBuilderPrivate
{
@@ -40,54 +40,54 @@ public:
~KXMLGUIBuilderPrivate() {
}
- QWidget *m_widget;
+ TQWidget *m_widget;
- QString tagMainWindow;
- QString tagMenuBar;
- QString tagMenu;
- QString tagToolBar;
- QString tagStatusBar;
+ TQString tagMainWindow;
+ TQString tagMenuBar;
+ TQString tagMenu;
+ TQString tagToolBar;
+ TQString tagStatusBar;
- QString tagSeparator;
- QString tagTearOffHandle;
- QString tagMenuTitle;
+ TQString tagSeparator;
+ TQString tagTearOffHandle;
+ TQString tagMenuTitle;
- QString attrName;
- QString attrLineSeparator;
+ TQString attrName;
+ TQString attrLineSeparator;
- QString attrText1;
- QString attrText2;
- QString attrContext;
+ TQString attrText1;
+ TQString attrText2;
+ TQString attrContext;
- QString attrIcon;
+ TQString attrIcon;
KInstance *m_instance;
KXMLGUIClient *m_client;
};
-KXMLGUIBuilder::KXMLGUIBuilder( QWidget *widget )
+KXMLGUIBuilder::KXMLGUIBuilder( TQWidget *widget )
{
d = new KXMLGUIBuilderPrivate;
d->m_widget = widget;
- d->tagMainWindow = QString::fromLatin1( "mainwindow" );
- d->tagMenuBar = QString::fromLatin1( "menubar" );
- d->tagMenu = QString::fromLatin1( "menu" );
- d->tagToolBar = QString::fromLatin1( "toolbar" );
- d->tagStatusBar = QString::fromLatin1( "statusbar" );
+ d->tagMainWindow = TQString::fromLatin1( "mainwindow" );
+ d->tagMenuBar = TQString::fromLatin1( "menubar" );
+ d->tagMenu = TQString::fromLatin1( "menu" );
+ d->tagToolBar = TQString::fromLatin1( "toolbar" );
+ d->tagStatusBar = TQString::fromLatin1( "statusbar" );
- d->tagSeparator = QString::fromLatin1( "separator" );
- d->tagTearOffHandle = QString::fromLatin1( "tearoffhandle" );
- d->tagMenuTitle = QString::fromLatin1( "title" );
+ d->tagSeparator = TQString::fromLatin1( "separator" );
+ d->tagTearOffHandle = TQString::fromLatin1( "tearoffhandle" );
+ d->tagMenuTitle = TQString::fromLatin1( "title" );
- d->attrName = QString::fromLatin1( "name" );
- d->attrLineSeparator = QString::fromLatin1( "lineseparator" );
+ d->attrName = TQString::fromLatin1( "name" );
+ d->attrLineSeparator = TQString::fromLatin1( "lineseparator" );
- d->attrText1 = QString::fromLatin1( "text" );
- d->attrText2 = QString::fromLatin1( "Text" );
- d->attrContext = QString::fromLatin1( "context" );
+ d->attrText1 = TQString::fromLatin1( "text" );
+ d->attrText2 = TQString::fromLatin1( "Text" );
+ d->attrContext = TQString::fromLatin1( "context" );
- d->attrIcon = QString::fromLatin1( "icon" );
+ d->attrIcon = TQString::fromLatin1( "icon" );
d->m_instance = 0;
d->m_client = 0;
@@ -98,20 +98,20 @@ KXMLGUIBuilder::~KXMLGUIBuilder()
delete d;
}
-QWidget *KXMLGUIBuilder::widget()
+TQWidget *KXMLGUIBuilder::widget()
{
return d->m_widget;
}
-QStringList KXMLGUIBuilder::containerTags() const
+TQStringList KXMLGUIBuilder::containerTags() const
{
- QStringList res;
+ TQStringList res;
res << d->tagMenu << d->tagToolBar << d->tagMainWindow << d->tagMenuBar << d->tagStatusBar;
return res;
}
-QWidget *KXMLGUIBuilder::createContainer( QWidget *parent, int index, const QDomElement &element, int &id )
+TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQDomElement &element, int &id )
{
id = -1;
if ( element.tagName().lower() == d->tagMainWindow )
@@ -144,23 +144,23 @@ QWidget *KXMLGUIBuilder::createContainer( QWidget *parent, int index, const QDom
// the popup won't be hidden if it is used as a standalone menu as well.
// And we don't want to set the parent for a standalone popupmenu,
// otherwise its shortcuts appear.
- QWidget* p = parent;
+ TQWidget* p = parent;
while ( p && !::qt_cast<KMainWindow *>( p ) )
p = p->parentWidget();
- QCString name = element.attribute( d->attrName ).utf8();
+ TQCString name = element.attribute( d->attrName ).utf8();
if (!kapp->authorizeKAction(name))
return 0;
KPopupMenu *popup = new KPopupMenu( p, name);
- QString i18nText;
- QDomElement textElem = element.namedItem( d->attrText1 ).toElement();
+ TQString i18nText;
+ TQDomElement textElem = element.namedItem( d->attrText1 ).toElement();
if ( textElem.isNull() ) // try with capital T
textElem = element.namedItem( d->attrText2 ).toElement();
- QCString text = textElem.text().utf8();
- QCString context = textElem.attribute(d->attrContext).utf8();
+ TQCString text = textElem.text().utf8();
+ TQCString context = textElem.attribute(d->attrContext).utf8();
if ( text.isEmpty() ) // still no luck
i18nText = i18n( "No text!" );
@@ -169,8 +169,8 @@ QWidget *KXMLGUIBuilder::createContainer( QWidget *parent, int index, const QDom
else
i18nText = i18n( context, text );
- QString icon = element.attribute( d->attrIcon );
- QIconSet pix;
+ TQString icon = element.attribute( d->attrIcon );
+ TQIconSet pix;
if ( !icon.isEmpty() )
{
@@ -188,12 +188,12 @@ QWidget *KXMLGUIBuilder::createContainer( QWidget *parent, int index, const QDom
else
id = static_cast<KMenuBar *>(parent)->insertItem( i18nText, popup, -1, index );
}
- else if ( parent && ::qt_cast<QPopupMenu *>( parent ) )
+ else if ( parent && ::qt_cast<TQPopupMenu *>( parent ) )
{
if ( !icon.isEmpty() )
- id = static_cast<QPopupMenu *>(parent)->insertItem( pix, i18nText, popup, -1, index );
+ id = static_cast<TQPopupMenu *>(parent)->insertItem( pix, i18nText, popup, -1, index );
else
- id = static_cast<QPopupMenu *>(parent)->insertItem( i18nText, popup, -1, index );
+ id = static_cast<TQPopupMenu *>(parent)->insertItem( i18nText, popup, -1, index );
}
return popup;
@@ -203,7 +203,7 @@ QWidget *KXMLGUIBuilder::createContainer( QWidget *parent, int index, const QDom
{
bool honor = (element.attribute( d->attrName ) == "mainToolBar");
- QCString name = element.attribute( d->attrName ).utf8();
+ TQCString name = element.attribute( d->attrName ).utf8();
KToolBar *bar = static_cast<KToolBar*>(d->m_widget->child( name, "KToolBar" ));
if( !bar )
@@ -237,18 +237,18 @@ QWidget *KXMLGUIBuilder::createContainer( QWidget *parent, int index, const QDom
return 0L;
}
-void KXMLGUIBuilder::removeContainer( QWidget *container, QWidget *parent, QDomElement &element, int id )
+void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQDomElement &element, int id )
{
// Warning parent can be 0L
- if ( ::qt_cast<QPopupMenu *>( container ) )
+ if ( ::qt_cast<TQPopupMenu *>( container ) )
{
if ( parent )
{
if ( ::qt_cast<KMenuBar *>( parent ) )
static_cast<KMenuBar *>(parent)->removeItem( id );
- else if ( ::qt_cast<QPopupMenu *>( parent ) )
- static_cast<QPopupMenu *>(parent)->removeItem( id );
+ else if ( ::qt_cast<TQPopupMenu *>( parent ) )
+ static_cast<TQPopupMenu *>(parent)->removeItem( id );
}
delete container;
@@ -266,7 +266,7 @@ void KXMLGUIBuilder::removeContainer( QWidget *container, QWidget *parent, QDomE
mb->hide();
// Don't delete menubar - it can be reused by createContainer.
// If you decide that you do need to delete the menubar, make
- // sure that QMainWindow::d->mb does not point to a deleted
+ // sure that TQMainWindow::d->mb does not point to a deleted
// menubar object.
}
else if ( ::qt_cast<KStatusBar *>( container ) )
@@ -280,21 +280,21 @@ void KXMLGUIBuilder::removeContainer( QWidget *container, QWidget *parent, QDomE
kdWarning() << "Unhandled container to remove : " << container->className() << endl;
}
-QStringList KXMLGUIBuilder::customTags() const
+TQStringList KXMLGUIBuilder::customTags() const
{
- QStringList res;
+ TQStringList res;
res << d->tagSeparator << d->tagTearOffHandle << d->tagMenuTitle;
return res;
}
-int KXMLGUIBuilder::createCustomElement( QWidget *parent, int index, const QDomElement &element )
+int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDomElement &element )
{
if ( element.tagName().lower() == d->tagSeparator )
{
- if ( ::qt_cast<QPopupMenu *>( parent ) )
+ if ( ::qt_cast<TQPopupMenu *>( parent ) )
{
// Don't insert multiple separators in a row
- QPopupMenu *menu = static_cast<QPopupMenu *>(parent);
+ TQPopupMenu *menu = static_cast<TQPopupMenu *>(parent);
int count = menu->count();
if (count)
{
@@ -317,22 +317,22 @@ int KXMLGUIBuilder::createCustomElement( QWidget *parent, int index, const QDomE
else
return menu->insertSeparator( index );
}
- else if ( ::qt_cast<QMenuBar *>( parent ) )
- return static_cast<QMenuBar *>(parent)->insertSeparator( index );
+ else if ( ::qt_cast<TQMenuBar *>( parent ) )
+ return static_cast<TQMenuBar *>(parent)->insertSeparator( index );
else if ( ::qt_cast<KToolBar *>( parent ) )
{
KToolBar *bar = static_cast<KToolBar *>( parent );
bool isLineSep = true;
- QDomNamedNodeMap attributes = element.attributes();
+ TQDomNamedNodeMap attributes = element.attributes();
unsigned int i = 0;
for (; i < attributes.length(); i++ )
{
- QDomAttr attr = attributes.item( i ).toAttr();
+ TQDomAttr attr = attributes.item( i ).toAttr();
if ( attr.name().lower() == d->attrLineSeparator &&
- attr.value().lower() == QString::fromLatin1("false") )
+ attr.value().lower() == TQString::fromLatin1("false") )
{
isLineSep = false;
break;
@@ -351,23 +351,23 @@ int KXMLGUIBuilder::createCustomElement( QWidget *parent, int index, const QDomE
}
else if ( element.tagName().lower() == d->tagTearOffHandle )
{
- if ( ::qt_cast<QPopupMenu *>( parent ) && KGlobalSettings::insertTearOffHandle())
- return static_cast<QPopupMenu *>(parent)->insertTearOffHandle( -1, index );
+ if ( ::qt_cast<TQPopupMenu *>( parent ) && KGlobalSettings::insertTearOffHandle())
+ return static_cast<TQPopupMenu *>(parent)->insertTearOffHandle( -1, index );
}
else if ( element.tagName().lower() == d->tagMenuTitle )
{
if ( ::qt_cast<KPopupMenu *>( parent ) )
{
- QString i18nText;
- QCString text = element.text().utf8();
+ TQString i18nText;
+ TQCString text = element.text().utf8();
if ( text.isEmpty() )
i18nText = i18n( "No text!" );
else
i18nText = i18n( text );
- QString icon = element.attribute( d->attrIcon );
- QPixmap pix;
+ TQString icon = element.attribute( d->attrIcon );
+ TQPixmap pix;
if ( !icon.isEmpty() )
{
@@ -387,12 +387,12 @@ int KXMLGUIBuilder::createCustomElement( QWidget *parent, int index, const QDomE
return 0;
}
-void KXMLGUIBuilder::removeCustomElement( QWidget *parent, int id )
+void KXMLGUIBuilder::removeCustomElement( TQWidget *parent, int id )
{
- if ( ::qt_cast<QPopupMenu *>( parent ) )
- static_cast<QPopupMenu *>(parent)->removeItem( id );
- else if ( ::qt_cast<QMenuBar *>( parent ) )
- static_cast<QMenuBar *>(parent)->removeItem( id );
+ if ( ::qt_cast<TQPopupMenu *>( parent ) )
+ static_cast<TQPopupMenu *>(parent)->removeItem( id );
+ else if ( ::qt_cast<TQMenuBar *>( parent ) )
+ static_cast<TQMenuBar *>(parent)->removeItem( id );
else if ( ::qt_cast<KToolBar *>( parent ) )
static_cast<KToolBar *>(parent)->removeItemDelayed( id );
}
diff --git a/kdeui/kxmlguibuilder.h b/kdeui/kxmlguibuilder.h
index 22f0cd6fd..4165c972c 100644
--- a/kdeui/kxmlguibuilder.h
+++ b/kdeui/kxmlguibuilder.h
@@ -20,8 +20,8 @@
#ifndef __kxmlguibuilder_h__
#define __kxmlguibuilder_h__
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -40,7 +40,7 @@ class KDEUI_EXPORT KXMLGUIBuilder
{
public:
- KXMLGUIBuilder( QWidget *widget );
+ KXMLGUIBuilder( TQWidget *widget );
virtual ~KXMLGUIBuilder();
/* @internal */
@@ -52,9 +52,9 @@ class KDEUI_EXPORT KXMLGUIBuilder
/* @internal */
void setBuilderInstance( KInstance *instance );
/* @internal */
- QWidget *widget();
+ TQWidget *widget();
- virtual QStringList containerTags() const;
+ virtual TQStringList containerTags() const;
/**
* Creates a container (menubar/menu/toolbar/statusbar/separator/...)
@@ -68,22 +68,22 @@ class KDEUI_EXPORT KXMLGUIBuilder
* attributes or child elements)
* @param id The id to be used for this container
*/
- virtual QWidget *createContainer( QWidget *parent, int index,
- const QDomElement &element, int &id );
+ virtual TQWidget *createContainer( TQWidget *parent, int index,
+ const TQDomElement &element, int &id );
/**
* Removes the given (and previously via createContainer )
* created container.
*
*/
- virtual void removeContainer( QWidget *container, QWidget *parent,
- QDomElement &element, int id );
+ virtual void removeContainer( TQWidget *container, TQWidget *parent,
+ TQDomElement &element, int id );
- virtual QStringList customTags() const;
+ virtual TQStringList customTags() const;
- virtual int createCustomElement( QWidget *parent, int index, const QDomElement &element );
+ virtual int createCustomElement( TQWidget *parent, int index, const TQDomElement &element );
- virtual void removeCustomElement( QWidget *parent, int id );
+ virtual void removeCustomElement( TQWidget *parent, int id );
virtual void finalizeGUI( KXMLGUIClient *client );
diff --git a/kdeui/kxmlguiclient.cpp b/kdeui/kxmlguiclient.cpp
index ef14c2f49..f857f3109 100644
--- a/kdeui/kxmlguiclient.cpp
+++ b/kdeui/kxmlguiclient.cpp
@@ -21,12 +21,12 @@
#include "kxmlguifactory.h"
#include "kxmlguibuilder.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qdom.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qguardedptr.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqguardedptr.h>
#include <kinstance.h>
#include <kstandarddirs.h>
@@ -52,16 +52,16 @@ public:
KInstance *m_instance;
- QDomDocument m_doc;
+ TQDomDocument m_doc;
KActionCollection *m_actionCollection;
- QDomDocument m_buildDocument;
- QGuardedPtr<KXMLGUIFactory> m_factory;
+ TQDomDocument m_buildDocument;
+ TQGuardedPtr<KXMLGUIFactory> m_factory;
KXMLGUIClient *m_parent;
- //QPtrList<KXMLGUIClient> m_supers;
- QPtrList<KXMLGUIClient> m_children;
+ //TQPtrList<KXMLGUIClient> m_supers;
+ TQPtrList<KXMLGUIClient> m_children;
KXMLGUIBuilder *m_builder;
- QString m_xmlFile;
- QString m_localXMLFile;
+ TQString m_xmlFile;
+ TQString m_localXMLFile;
};
KXMLGUIClient::KXMLGUIClient()
@@ -80,7 +80,7 @@ KXMLGUIClient::~KXMLGUIClient()
if ( d->m_parent )
d->m_parent->removeChildClient( this );
- QPtrListIterator<KXMLGUIClient> it( d->m_children );
+ TQPtrListIterator<KXMLGUIClient> it( d->m_children );
for ( ; it.current(); ++it ) {
assert( it.current()->d->m_parent == this );
it.current()->d->m_parent = 0;
@@ -94,7 +94,7 @@ KAction *KXMLGUIClient::action( const char *name ) const
{
KAction* act = actionCollection()->action( name );
if ( !act ) {
- QPtrListIterator<KXMLGUIClient> childIt( d->m_children );
+ TQPtrListIterator<KXMLGUIClient> childIt( d->m_children );
for (; childIt.current(); ++childIt ) {
act = childIt.current()->actionCollection()->action( name );
if ( act )
@@ -114,9 +114,9 @@ KActionCollection *KXMLGUIClient::actionCollection() const
return d->m_actionCollection;
}
-KAction *KXMLGUIClient::action( const QDomElement &element ) const
+KAction *KXMLGUIClient::action( const TQDomElement &element ) const
{
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
return actionCollection()->action( element.attribute( attrName ).latin1() );
}
@@ -125,31 +125,31 @@ KInstance *KXMLGUIClient::instance() const
return d->m_instance;
}
-QDomDocument KXMLGUIClient::domDocument() const
+TQDomDocument KXMLGUIClient::domDocument() const
{
return d->m_doc;
}
-QString KXMLGUIClient::xmlFile() const
+TQString KXMLGUIClient::xmlFile() const
{
return d->m_xmlFile;
}
-QString KXMLGUIClient::localXMLFile() const
+TQString KXMLGUIClient::localXMLFile() const
{
if ( !d->m_localXMLFile.isEmpty() )
return d->m_localXMLFile;
- if ( !QDir::isRelativePath(d->m_xmlFile) )
- return QString::null; // can't save anything here
+ if ( !TQDir::isRelativePath(d->m_xmlFile) )
+ return TQString::null; // can't save anything here
- return locateLocal( "data", QString::fromLatin1( instance()->instanceName() + '/' ) + d->m_xmlFile );
+ return locateLocal( "data", TQString::fromLatin1( instance()->instanceName() + '/' ) + d->m_xmlFile );
}
void KXMLGUIClient::reloadXML()
{
- QString file( xmlFile() );
+ TQString file( xmlFile() );
if ( !file.isEmpty() )
setXMLFile( file );
}
@@ -162,7 +162,7 @@ void KXMLGUIClient::setInstance( KInstance *instance )
d->m_builder->setBuilderClient( this );
}
-void KXMLGUIClient::setXMLFile( const QString& _file, bool merge, bool setXMLDoc )
+void KXMLGUIClient::setXMLFile( const TQString& _file, bool merge, bool setXMLDoc )
{
// store our xml file name
if ( !_file.isNull() ) {
@@ -173,14 +173,14 @@ void KXMLGUIClient::setXMLFile( const QString& _file, bool merge, bool setXMLDoc
if ( !setXMLDoc )
return;
- QString file = _file;
- if ( QDir::isRelativePath(file) )
+ TQString file = _file;
+ if ( TQDir::isRelativePath(file) )
{
- QString doc;
+ TQString doc;
- QString filter = QString::fromLatin1( instance()->instanceName() + '/' ) + _file;
+ TQString filter = TQString::fromLatin1( instance()->instanceName() + '/' ) + _file;
- QStringList allFiles = instance()->dirs()->findAllResources( "data", filter ) + instance()->dirs()->findAllResources( "data", _file );
+ TQStringList allFiles = instance()->dirs()->findAllResources( "data", filter ) + instance()->dirs()->findAllResources( "data", _file );
file = findMostRecentXMLFile( allFiles, doc );
@@ -195,7 +195,7 @@ void KXMLGUIClient::setXMLFile( const QString& _file, bool merge, bool setXMLDoc
if ( !_file.isEmpty() )
kdWarning() << "KXMLGUIClient::setXMLFile: cannot find .rc file " << _file << endl;
- setXML( QString::null, true );
+ setXML( TQString::null, true );
return;
}
else if ( !doc.isEmpty() )
@@ -205,29 +205,29 @@ void KXMLGUIClient::setXMLFile( const QString& _file, bool merge, bool setXMLDoc
}
}
- QString xml = KXMLGUIFactory::readConfigFile( file );
+ TQString xml = KXMLGUIFactory::readConfigFile( file );
setXML( xml, merge );
}
-void KXMLGUIClient::setLocalXMLFile( const QString &file )
+void KXMLGUIClient::setLocalXMLFile( const TQString &file )
{
d->m_localXMLFile = file;
}
-void KXMLGUIClient::setXML( const QString &document, bool merge )
+void KXMLGUIClient::setXML( const TQString &document, bool merge )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( document );
setDOMDocument( doc, merge );
}
-void KXMLGUIClient::setDOMDocument( const QDomDocument &document, bool merge )
+void KXMLGUIClient::setDOMDocument( const TQDomDocument &document, bool merge )
{
if ( merge )
{
- QDomElement base = d->m_doc.documentElement();
+ TQDomElement base = d->m_doc.documentElement();
- QDomElement e = document.documentElement();
+ TQDomElement e = document.documentElement();
// merge our original (global) xml with our new one
mergeXML(base, e, actionCollection());
@@ -245,22 +245,22 @@ void KXMLGUIClient::setDOMDocument( const QDomDocument &document, bool merge )
d->m_doc = document;
}
- setXMLGUIBuildDocument( QDomDocument() );
+ setXMLGUIBuildDocument( TQDomDocument() );
}
-bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KActionCollection *actionCollection )
+bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, KActionCollection *actionCollection )
{
- static const QString &tagAction = KGlobal::staticQString( "Action" );
- static const QString &tagMerge = KGlobal::staticQString( "Merge" );
- static const QString &tagSeparator = KGlobal::staticQString( "Separator" );
- static const QString &attrName = KGlobal::staticQString( "name" );
- static const QString &attrAppend = KGlobal::staticQString( "append" );
- static const QString &attrWeakSeparator = KGlobal::staticQString( "weakSeparator" );
- static const QString &tagMergeLocal = KGlobal::staticQString( "MergeLocal" );
- static const QString &tagText = KGlobal::staticQString( "text" );
- static const QString &attrAlreadyVisited = KGlobal::staticQString( "alreadyVisited" );
- static const QString &attrNoMerge = KGlobal::staticQString( "noMerge" );
- static const QString &attrOne = KGlobal::staticQString( "1" );
+ static const TQString &tagAction = KGlobal::staticQString( "Action" );
+ static const TQString &tagMerge = KGlobal::staticQString( "Merge" );
+ static const TQString &tagSeparator = KGlobal::staticQString( "Separator" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrAppend = KGlobal::staticQString( "append" );
+ static const TQString &attrWeakSeparator = KGlobal::staticQString( "weakSeparator" );
+ static const TQString &tagMergeLocal = KGlobal::staticQString( "MergeLocal" );
+ static const TQString &tagText = KGlobal::staticQString( "text" );
+ static const TQString &attrAlreadyVisited = KGlobal::staticQString( "alreadyVisited" );
+ static const TQString &attrNoMerge = KGlobal::staticQString( "noMerge" );
+ static const TQString &attrOne = KGlobal::staticQString( "1" );
// there is a possibility that we don't want to merge in the
// additive.. rather, we might want to *replace* the base with the
@@ -273,13 +273,13 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
return true;
}
- QString tag;
+ TQString tag;
// iterate over all elements in the container (of the global DOM tree)
- QDomNode n = base.firstChild();
+ TQDomNode n = base.firstChild();
while ( !n.isNull() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
n = n.nextSibling(); // Advance now so that we can safely delete e
if (e.isNull())
continue;
@@ -290,7 +290,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// not implemented, then we remove the element
if ( tag == tagAction )
{
- QCString name = e.attribute( attrName ).utf8(); // WABA
+ TQCString name = e.attribute( attrName ).utf8(); // WABA
if ( !actionCollection->action( name ) ||
(kapp && !kapp->authorizeKAction(name)))
{
@@ -309,7 +309,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// okay, hack time. if the last item was a weak separator OR
// this is the first item in a container, then we nuke the
// current one
- QDomElement prev = e.previousSibling().toElement();
+ TQDomElement prev = e.previousSibling().toElement();
if ( prev.isNull() ||
( prev.tagName() == tagSeparator && !prev.attribute( attrWeakSeparator ).isNull() ) ||
( prev.tagName() == tagText ) )
@@ -325,10 +325,10 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// elements we delete this element
else if ( tag == tagMergeLocal )
{
- QDomNode it = additive.firstChild();
+ TQDomNode it = additive.firstChild();
while ( !it.isNull() )
{
- QDomElement newChild = it.toElement();
+ TQDomElement newChild = it.toElement();
it = it.nextSibling();
if (newChild.isNull() )
continue;
@@ -339,8 +339,8 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
if ( newChild.attribute( attrAlreadyVisited ) == attrOne )
continue;
- QString itAppend( newChild.attribute( attrAppend ) );
- QString elemName( e.attribute( attrName ) );
+ TQString itAppend( newChild.attribute( attrAppend ) );
+ TQString elemName( e.attribute( attrName ) );
if ( ( itAppend.isNull() && elemName.isEmpty() ) ||
( itAppend == elemName ) )
@@ -348,7 +348,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// first, see if this new element matches a standard one in
// the global file. if it does, then we skip it as it will
// be merged in, later
- QDomElement matchingElement = findMatchingElement( newChild, base );
+ TQDomElement matchingElement = findMatchingElement( newChild, base );
if ( matchingElement.isNull() || newChild.tagName() == tagSeparator )
base.insertBefore( newChild, e );
}
@@ -368,7 +368,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
if ( tag == tagText )
continue;
- QDomElement matchingElement = findMatchingElement( e, additive );
+ TQDomElement matchingElement = findMatchingElement( e, additive );
if ( !matchingElement.isNull() )
{
@@ -381,12 +381,12 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
}
// Merge attributes
- const QDomNamedNodeMap attribs = matchingElement.attributes();
+ const TQDomNamedNodeMap attribs = matchingElement.attributes();
const uint attribcount = attribs.count();
for(uint i = 0; i < attribcount; ++i)
{
- const QDomNode node = attribs.item(i);
+ const TQDomNode node = attribs.item(i);
e.setAttribute(node.nodeName(), node.nodeValue());
}
@@ -399,7 +399,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// this container. However we have to call mergeXML recursively
// and make it check if there are actions implemented for this
// container. *If* none, then we can remove this container now
- if ( mergeXML( e, QDomElement(), actionCollection ) )
+ if ( mergeXML( e, TQDomElement(), actionCollection ) )
base.removeChild( e );
continue;
}
@@ -411,12 +411,12 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
n = additive.firstChild();
while ( !n.isNull() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
n = n.nextSibling(); // Advance now so that we can safely delete e
if (e.isNull())
continue;
- QDomElement matchingElement = findMatchingElement( e, base );
+ TQDomElement matchingElement = findMatchingElement( e, base );
if ( matchingElement.isNull() )
{
@@ -426,7 +426,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// do one quick check to make sure that the last element was not
// a weak separator
- QDomElement last = base.lastChild().toElement();
+ TQDomElement last = base.lastChild().toElement();
if ( (last.tagName() == tagSeparator) && (!last.attribute( attrWeakSeparator ).isNull()) )
{
base.removeChild( last );
@@ -440,7 +440,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
n = base.firstChild();
while ( !n.isNull() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
n = n.nextSibling(); // Advance now so that we can safely delete e
if (e.isNull())
continue;
@@ -463,7 +463,7 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
// if we have a separator which has *not* the weak attribute
// set, then it must be owned by the "local" tree in which case
// we must not get deleted either
- QString weakAttr = e.attribute( attrWeakSeparator );
+ TQString weakAttr = e.attribute( attrWeakSeparator );
if ( weakAttr.isEmpty() || weakAttr.toInt() != 1 )
{
deleteMe = false;
@@ -499,16 +499,16 @@ bool KXMLGUIClient::mergeXML( QDomElement &base, const QDomElement &additive, KA
return deleteMe;
}
-QDomElement KXMLGUIClient::findMatchingElement( const QDomElement &base, const QDomElement &additive )
+TQDomElement KXMLGUIClient::findMatchingElement( const TQDomElement &base, const TQDomElement &additive )
{
- static const QString &tagAction = KGlobal::staticQString( "Action" );
- static const QString &tagMergeLocal = KGlobal::staticQString( "MergeLocal" );
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &tagAction = KGlobal::staticQString( "Action" );
+ static const TQString &tagMergeLocal = KGlobal::staticQString( "MergeLocal" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
- QDomNode n = additive.firstChild();
+ TQDomNode n = additive.firstChild();
while ( !n.isNull() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
n = n.nextSibling(); // Advance now so that we can safely delete e
if (e.isNull())
continue;
@@ -528,21 +528,21 @@ QDomElement KXMLGUIClient::findMatchingElement( const QDomElement &base, const Q
}
// nope, return a (now) null element
- return QDomElement();
+ return TQDomElement();
}
void KXMLGUIClient::conserveMemory()
{
- d->m_doc = QDomDocument();
- d->m_buildDocument = QDomDocument();
+ d->m_doc = TQDomDocument();
+ d->m_buildDocument = TQDomDocument();
}
-void KXMLGUIClient::setXMLGUIBuildDocument( const QDomDocument &doc )
+void KXMLGUIClient::setXMLGUIBuildDocument( const TQDomDocument &doc )
{
d->m_buildDocument = doc;
}
-QDomDocument KXMLGUIClient::xmlguiBuildDocument() const
+TQDomDocument KXMLGUIClient::xmlguiBuildDocument() const
{
return d->m_buildDocument;
}
@@ -585,7 +585,7 @@ void KXMLGUIClient::removeChildClient( KXMLGUIClient *child )
return true;
}*/
-const QPtrList<KXMLGUIClient> *KXMLGUIClient::childClients()
+const TQPtrList<KXMLGUIClient> *KXMLGUIClient::childClients()
{
return &d->m_children;
}
@@ -602,7 +602,7 @@ KXMLGUIBuilder *KXMLGUIClient::clientBuilder() const
return d->m_builder;
}
-void KXMLGUIClient::plugActionList( const QString &name, const QPtrList<KAction> &actionList )
+void KXMLGUIClient::plugActionList( const TQString &name, const TQPtrList<KAction> &actionList )
{
if ( !d->m_factory )
return;
@@ -610,7 +610,7 @@ void KXMLGUIClient::plugActionList( const QString &name, const QPtrList<KAction>
d->m_factory->plugActionList( this, name, actionList );
}
-void KXMLGUIClient::unplugActionList( const QString &name )
+void KXMLGUIClient::unplugActionList( const TQString &name )
{
if ( !d->m_factory )
return;
@@ -618,31 +618,31 @@ void KXMLGUIClient::unplugActionList( const QString &name )
d->m_factory->unplugActionList( this, name );
}
-QString KXMLGUIClient::findMostRecentXMLFile( const QStringList &files, QString &doc )
+TQString KXMLGUIClient::findMostRecentXMLFile( const TQStringList &files, TQString &doc )
{
- QValueList<DocStruct> allDocuments;
+ TQValueList<DocStruct> allDocuments;
- QStringList::ConstIterator it = files.begin();
- QStringList::ConstIterator end = files.end();
+ TQStringList::ConstIterator it = files.begin();
+ TQStringList::ConstIterator end = files.end();
for (; it != end; ++it )
{
//kdDebug() << "KXMLGUIClient::findMostRecentXMLFile " << *it << endl;
- QString data = KXMLGUIFactory::readConfigFile( *it );
+ TQString data = KXMLGUIFactory::readConfigFile( *it );
DocStruct d;
d.file = *it;
d.data = data;
allDocuments.append( d );
}
- QValueList<DocStruct>::Iterator best = allDocuments.end();
+ TQValueList<DocStruct>::Iterator best = allDocuments.end();
uint bestVersion = 0;
- QValueList<DocStruct>::Iterator docIt = allDocuments.begin();
- QValueList<DocStruct>::Iterator docEnd = allDocuments.end();
+ TQValueList<DocStruct>::Iterator docIt = allDocuments.begin();
+ TQValueList<DocStruct>::Iterator docEnd = allDocuments.end();
for (; docIt != docEnd; ++docIt )
{
- QString versionStr = findVersionNumber( (*docIt).data );
+ TQString versionStr = findVersionNumber( (*docIt).data );
if ( versionStr.isEmpty() )
continue;
@@ -664,10 +664,10 @@ QString KXMLGUIClient::findMostRecentXMLFile( const QStringList &files, QString
{
if ( best != allDocuments.begin() )
{
- QValueList<DocStruct>::Iterator local = allDocuments.begin();
+ TQValueList<DocStruct>::Iterator local = allDocuments.begin();
// load the local document and extract the action properties
- QDomDocument document;
+ TQDomDocument document;
document.setContent( (*local).data );
ActionPropertiesMap properties = extractActionProperties( document );
@@ -688,19 +688,19 @@ QString KXMLGUIClient::findMostRecentXMLFile( const QStringList &files, QString
best = local;
// write out the new version of the local document
- QFile f( (*local).file );
+ TQFile f( (*local).file );
if ( f.open( IO_WriteOnly ) )
{
- QCString utf8data = (*local).data.utf8();
+ TQCString utf8data = (*local).data.utf8();
f.writeBlock( utf8data.data(), utf8data.length() );
f.close();
}
}
else
{
- QString f = (*local).file;
- QString backup = f + QString::fromLatin1( ".backup" );
- QDir dir;
+ TQString f = (*local).file;
+ TQString backup = f + TQString::fromLatin1( ".backup" );
+ TQDir dir;
dir.rename( f, backup );
}
}
@@ -714,12 +714,12 @@ QString KXMLGUIClient::findMostRecentXMLFile( const QStringList &files, QString
return (*allDocuments.begin()).file;
}
- return QString::null;
+ return TQString::null;
}
-QString KXMLGUIClient::findVersionNumber( const QString &xml )
+TQString KXMLGUIClient::findVersionNumber( const TQString &xml )
{
enum { ST_START, ST_AFTER_OPEN, ST_AFTER_GUI,
ST_EXPECT_VERSION, ST_VERSION_NUM} state = ST_START;
@@ -736,7 +736,7 @@ QString KXMLGUIClient::findVersionNumber( const QString &xml )
//Jump to gui..
int guipos = xml.find("gui", pos, false /*case-insensitive*/);
if (guipos == -1)
- return QString::null; //Reject
+ return TQString::null; //Reject
pos = guipos + 2; //Position at i, so we're moved ahead to the next character by the ++;
state = ST_AFTER_GUI;
@@ -749,7 +749,7 @@ QString KXMLGUIClient::findVersionNumber( const QString &xml )
{
int verpos = xml.find("version=\"", pos, false /*case-insensitive*/);
if (verpos == -1)
- return QString::null; //Reject
+ return TQString::null; //Reject
pos = verpos + 8; //v = 0, e = +1, r = +2, s = +3 , i = +4, o = +5, n = +6, = = +7, " = + 8
state = ST_VERSION_NUM;
@@ -772,7 +772,7 @@ QString KXMLGUIClient::findVersionNumber( const QString &xml )
if (endpos != pos && endpos < xml.length() )
{
- QString matchCandidate = xml.mid(pos, endpos - pos); //Don't include " ".
+ TQString matchCandidate = xml.mid(pos, endpos - pos); //Don't include " ".
return matchCandidate;
}
@@ -782,22 +782,22 @@ QString KXMLGUIClient::findVersionNumber( const QString &xml )
} //switch
} //for
- return QString::null;
+ return TQString::null;
}
-KXMLGUIClient::ActionPropertiesMap KXMLGUIClient::extractActionProperties( const QDomDocument &doc )
+KXMLGUIClient::ActionPropertiesMap KXMLGUIClient::extractActionProperties( const TQDomDocument &doc )
{
ActionPropertiesMap properties;
- QDomElement actionPropElement = doc.documentElement().namedItem( "ActionProperties" ).toElement();
+ TQDomElement actionPropElement = doc.documentElement().namedItem( "ActionProperties" ).toElement();
if ( actionPropElement.isNull() )
return properties;
- QDomNode n = actionPropElement.firstChild();
+ TQDomNode n = actionPropElement.firstChild();
while(!n.isNull())
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
n = n.nextSibling(); // Advance now so that we can safely delete e
if ( e.isNull() )
continue;
@@ -805,26 +805,26 @@ KXMLGUIClient::ActionPropertiesMap KXMLGUIClient::extractActionProperties( const
if ( e.tagName().lower() != "action" )
continue;
- QString actionName = e.attribute( "name" );
+ TQString actionName = e.attribute( "name" );
if ( actionName.isEmpty() )
continue;
- QMap<QString, QMap<QString, QString> >::Iterator propIt = properties.find( actionName );
+ TQMap<TQString, TQMap<TQString, TQString> >::Iterator propIt = properties.find( actionName );
if ( propIt == properties.end() )
- propIt = properties.insert( actionName, QMap<QString, QString>() );
+ propIt = properties.insert( actionName, TQMap<TQString, TQString>() );
- const QDomNamedNodeMap attributes = e.attributes();
+ const TQDomNamedNodeMap attributes = e.attributes();
const uint attributeslength = attributes.length();
for ( uint i = 0; i < attributeslength; ++i )
{
- const QDomAttr attr = attributes.item( i ).toAttr();
+ const TQDomAttr attr = attributes.item( i ).toAttr();
if ( attr.isNull() )
continue;
- const QString name = attr.name();
+ const TQString name = attr.name();
if ( name == "name" || name.isEmpty() )
continue;
@@ -837,9 +837,9 @@ KXMLGUIClient::ActionPropertiesMap KXMLGUIClient::extractActionProperties( const
return properties;
}
-void KXMLGUIClient::storeActionProperties( QDomDocument &doc, const ActionPropertiesMap &properties )
+void KXMLGUIClient::storeActionProperties( TQDomDocument &doc, const ActionPropertiesMap &properties )
{
- QDomElement actionPropElement = doc.documentElement().namedItem( "ActionProperties" ).toElement();
+ TQDomElement actionPropElement = doc.documentElement().namedItem( "ActionProperties" ).toElement();
if ( actionPropElement.isNull() )
{
@@ -854,20 +854,20 @@ void KXMLGUIClient::storeActionProperties( QDomDocument &doc, const ActionProper
ActionPropertiesMap::ConstIterator end = properties.end();
for (; it != end; ++it )
{
- QDomElement action = doc.createElement( "Action" );
+ TQDomElement action = doc.createElement( "Action" );
action.setAttribute( "name", it.key() );
actionPropElement.appendChild( action );
- QMap<QString, QString> attributes = (*it);
- QMap<QString, QString>::ConstIterator attrIt = attributes.begin();
- QMap<QString, QString>::ConstIterator attrEnd = attributes.end();
+ TQMap<TQString, TQString> attributes = (*it);
+ TQMap<TQString, TQString>::ConstIterator attrIt = attributes.begin();
+ TQMap<TQString, TQString>::ConstIterator attrEnd = attributes.end();
for (; attrIt != attrEnd; ++attrIt )
action.setAttribute( attrIt.key(), attrIt.data() );
}
}
-void KXMLGUIClient::addStateActionEnabled(const QString& state,
- const QString& action)
+void KXMLGUIClient::addStateActionEnabled(const TQString& state,
+ const TQString& action)
{
StateChange stateChange = getActionsToChangeForState(state);
@@ -878,8 +878,8 @@ void KXMLGUIClient::addStateActionEnabled(const QString& state,
}
-void KXMLGUIClient::addStateActionDisabled(const QString& state,
- const QString& action)
+void KXMLGUIClient::addStateActionDisabled(const TQString& state,
+ const TQString& action)
{
StateChange stateChange = getActionsToChangeForState(state);
@@ -890,13 +890,13 @@ void KXMLGUIClient::addStateActionDisabled(const QString& state,
}
-KXMLGUIClient::StateChange KXMLGUIClient::getActionsToChangeForState(const QString& state)
+KXMLGUIClient::StateChange KXMLGUIClient::getActionsToChangeForState(const TQString& state)
{
return m_actionsStateMap[state];
}
-void KXMLGUIClient::stateChanged(const QString &newstate, KXMLGUIClient::ReverseStateChange reverse)
+void KXMLGUIClient::stateChanged(const TQString &newstate, KXMLGUIClient::ReverseStateChange reverse)
{
StateChange stateChange = getActionsToChangeForState(newstate);
@@ -905,7 +905,7 @@ void KXMLGUIClient::stateChanged(const QString &newstate, KXMLGUIClient::Reverse
// Enable actions which need to be enabled...
//
- for ( QStringList::Iterator it = stateChange.actionsToEnable.begin();
+ for ( TQStringList::Iterator it = stateChange.actionsToEnable.begin();
it != stateChange.actionsToEnable.end(); ++it ) {
KAction *action = actionCollection()->action((*it).latin1());
@@ -914,7 +914,7 @@ void KXMLGUIClient::stateChanged(const QString &newstate, KXMLGUIClient::Reverse
// and disable actions which need to be disabled...
//
- for ( QStringList::Iterator it = stateChange.actionsToDisable.begin();
+ for ( TQStringList::Iterator it = stateChange.actionsToDisable.begin();
it != stateChange.actionsToDisable.end(); ++it ) {
KAction *action = actionCollection()->action((*it).latin1());
@@ -923,10 +923,10 @@ void KXMLGUIClient::stateChanged(const QString &newstate, KXMLGUIClient::Reverse
}
-void KXMLGUIClient::beginXMLPlug( QWidget *w )
+void KXMLGUIClient::beginXMLPlug( TQWidget *w )
{
actionCollection()->beginXMLPlug( w );
- QPtrListIterator<KXMLGUIClient> childIt( d->m_children );
+ TQPtrListIterator<KXMLGUIClient> childIt( d->m_children );
for (; childIt.current(); ++childIt )
childIt.current()->actionCollection()->beginXMLPlug( w );
}
@@ -934,15 +934,15 @@ void KXMLGUIClient::beginXMLPlug( QWidget *w )
void KXMLGUIClient::endXMLPlug()
{
actionCollection()->endXMLPlug();
- QPtrListIterator<KXMLGUIClient> childIt( d->m_children );
+ TQPtrListIterator<KXMLGUIClient> childIt( d->m_children );
for (; childIt.current(); ++childIt )
childIt.current()->actionCollection()->endXMLPlug();
}
-void KXMLGUIClient::prepareXMLUnplug( QWidget * )
+void KXMLGUIClient::prepareXMLUnplug( TQWidget * )
{
actionCollection()->prepareXMLUnplug();
- QPtrListIterator<KXMLGUIClient> childIt( d->m_children );
+ TQPtrListIterator<KXMLGUIClient> childIt( d->m_children );
for (; childIt.current(); ++childIt )
childIt.current()->actionCollection()->prepareXMLUnplug();
}
diff --git a/kdeui/kxmlguiclient.h b/kdeui/kxmlguiclient.h
index c3d377c91..4203a063c 100644
--- a/kdeui/kxmlguiclient.h
+++ b/kdeui/kxmlguiclient.h
@@ -19,10 +19,10 @@
#ifndef _KXMLGUICLIENT_H
#define _KXMLGUICLIENT_H
-#include <qdom.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -77,20 +77,20 @@ public:
KAction* action( const char* name ) const;
/**
- * Retrieves an action for a given QDomElement. The default
+ * 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 QDomElement &element ) const;
+ virtual KAction *action( const TQDomElement &element ) const;
/**
* Retrieves the entire action collection for the GUI client. If
* you subclass KXMLGUIClient you should call
- * KActionCollection::setWidget( QWidget* ) with this object, or
+ * 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.
*
- * @see KActionCollection::setWidget( QWidget* )
+ * @see KActionCollection::setWidget( TQWidget* )
*/
virtual KActionCollection* actionCollection() const;
@@ -100,11 +100,11 @@ public:
virtual KInstance *instance() const;
/**
- * @return The parsed XML in a QDomDocument, set by
+ * @return The parsed XML in a TQDomDocument, set by
* setXMLFile() or setXML().
* This document describes the layout of the GUI.
*/
- virtual QDomDocument domDocument() const;
+ virtual TQDomDocument domDocument() const;
/**
* This will return the name of the XML file as set by setXMLFile().
@@ -117,20 +117,20 @@ public:
* return the last XML file set. This, in almost all cases, will
* be the local XML file.
*
- * @return The name of the XML file or QString::null
+ * @return The name of the XML file or TQString::null
*/
- virtual QString xmlFile() const;
+ virtual TQString xmlFile() const;
- virtual QString localXMLFile() const;
+ virtual TQString localXMLFile() const;
/**
* @internal
*/
- void setXMLGUIBuildDocument( const QDomDocument &doc );
+ void setXMLGUIBuildDocument( const TQDomDocument &doc );
/**
* @internal
*/
- QDomDocument xmlguiBuildDocument() const;
+ TQDomDocument xmlguiBuildDocument() const;
/**
* This method is called by the KXMLGUIFactory as soon as the client
@@ -167,7 +167,7 @@ public:
/**
* Retrieves a list of all child clients.
*/
- const QPtrList<KXMLGUIClient> *childClients();
+ const TQPtrList<KXMLGUIClient> *childClients();
/**
* A client can have an own KXMLGUIBuilder.
@@ -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
- * QPtrList<KAction> file_actions;
+ * TQPtrList<KAction> file_actions;
* for( ... )
* if( ... )
* file_actions.append( cool_action );
@@ -234,34 +234,34 @@ public:
* plugActionList() would leave the previous actions in the
* menu too..
*/
- void plugActionList( const QString &name, const QPtrList<KAction> &actionList );
+ void plugActionList( const TQString &name, const TQPtrList<KAction> &actionList );
/**
* The complement of plugActionList() ...
*/
- void unplugActionList( const QString &name );
+ void unplugActionList( const TQString &name );
- static QString findMostRecentXMLFile( const QStringList &files, QString &doc );
+ static TQString findMostRecentXMLFile( const TQStringList &files, TQString &doc );
- void addStateActionEnabled(const QString& state, const QString& action);
+ void addStateActionEnabled(const TQString& state, const TQString& action);
- void addStateActionDisabled(const QString& state, const QString& action);
+ void addStateActionDisabled(const TQString& state, const TQString& action);
enum ReverseStateChange { StateNoReverse, StateReverse };
struct StateChange
{
- QStringList actionsToEnable;
- QStringList actionsToDisable;
+ TQStringList actionsToEnable;
+ TQStringList actionsToDisable;
};
- StateChange getActionsToChangeForState(const QString& state);
+ StateChange getActionsToChangeForState(const TQString& state);
/// @since 3.1
- void beginXMLPlug( QWidget * );
+ void beginXMLPlug( TQWidget * );
/// @since 3.1
void endXMLPlug();
/// @since 3.1
- void prepareXMLUnplug( QWidget * );
+ void prepareXMLUnplug( TQWidget * );
protected:
/**
@@ -291,9 +291,9 @@ protected:
* @param setXMLDoc Specify whether to call setXML. Default is true.
* and the DOM document at once.
**/
- virtual void setXMLFile( const QString& file, bool merge = false, bool setXMLDoc = true );
+ virtual void setXMLFile( const TQString& file, bool merge = false, bool setXMLDoc = true );
- virtual void setLocalXMLFile( const QString &file );
+ virtual void setLocalXMLFile( const TQString &file );
/**
* Sets the XML for the part.
@@ -301,7 +301,7 @@ protected:
* Call this in the Part-inherited class constructor if you
* don't call setXMLFile().
**/
- virtual void setXML( const QString &document, bool merge = false );
+ virtual void setXML( const TQString &document, bool merge = false );
/**
* Sets the Document for the part, describing the layout of the GUI.
@@ -309,7 +309,7 @@ protected:
* Call this in the Part-inherited class constructor if you don't call
* setXMLFile or setXML .
*/
- virtual void setDOMDocument( const QDomDocument &document, bool merge = false );
+ virtual void setDOMDocument( const TQDomDocument &document, bool merge = false );
/**
* This function will attempt to give up some memory after the GUI
@@ -329,34 +329,34 @@ protected:
* (actions to be enabled will be disabled and action to be disabled will be enabled)
* Default is reverse=false.
*/
- virtual void stateChanged(const QString &newstate, ReverseStateChange reverse = StateNoReverse);
+ virtual void stateChanged(const TQString &newstate, ReverseStateChange reverse = StateNoReverse);
// Use this one for KDE 4.0
- //virtual void stateChanged(const QString &newstate, bool reverse = false);
+ //virtual void stateChanged(const TQString &newstate, bool reverse = false);
private:
struct DocStruct
{
- QString file;
- QString data;
+ TQString file;
+ TQString data;
};
- bool mergeXML( QDomElement &base, const QDomElement &additive,
+ bool mergeXML( TQDomElement &base, const TQDomElement &additive,
KActionCollection *actionCollection );
- QDomElement findMatchingElement( const QDomElement &base,
- const QDomElement &additive );
+ TQDomElement findMatchingElement( const TQDomElement &base,
+ const TQDomElement &additive );
- typedef QMap<QString, QMap<QString, QString> > ActionPropertiesMap;
+ typedef TQMap<TQString, TQMap<TQString, TQString> > ActionPropertiesMap;
- static ActionPropertiesMap extractActionProperties( const QDomDocument &doc );
+ static ActionPropertiesMap extractActionProperties( const TQDomDocument &doc );
- static void storeActionProperties( QDomDocument &doc, const ActionPropertiesMap &properties );
+ static void storeActionProperties( TQDomDocument &doc, const ActionPropertiesMap &properties );
- static QString findVersionNumber( const QString &_xml );
+ static TQString findVersionNumber( const TQString &_xml );
// Actions to enable/disable on a state change
- QMap<QString,StateChange> m_actionsStateMap;
+ TQMap<TQString,StateChange> m_actionsStateMap;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kxmlguifactory.cpp b/kdeui/kxmlguifactory.cpp
index 1dbab4ddf..c166df861 100644
--- a/kdeui/kxmlguifactory.cpp
+++ b/kdeui/kxmlguifactory.cpp
@@ -25,12 +25,12 @@
#include <assert.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qwidget.h>
-#include <qdatetime.h>
-#include <qvariant.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqwidget.h>
+#include <tqdatetime.h>
+#include <tqvariant.h>
#include <kaction.h>
#include <kdebug.h>
@@ -43,7 +43,7 @@
using namespace KXMLGUI;
/*
- * TODO: - make more use of QValueList instead of QPtrList
+ * TODO: - make more use of TQValueList instead of QPtrList
*/
class KXMLGUIFactoryPrivate : public BuildState
@@ -51,11 +51,11 @@ class KXMLGUIFactoryPrivate : public BuildState
public:
KXMLGUIFactoryPrivate()
{
- static const QString &defaultMergingName = KGlobal::staticQString( "<default>" );
- static const QString &actionList = KGlobal::staticQString( "actionlist" );
- static const QString &name = KGlobal::staticQString( "name" );
+ static const TQString &defaultMergingName = KGlobal::staticQString( "<default>" );
+ static const TQString &actionList = KGlobal::staticQString( "actionlist" );
+ static const TQString &name = KGlobal::staticQString( "name" );
- m_rootNode = new ContainerNode( 0L, QString::null, 0L );
+ m_rootNode = new ContainerNode( 0L, TQString::null, 0L );
m_defaultMergingName = defaultMergingName;
tagActionList = actionList;
attrName = name;
@@ -77,79 +77,79 @@ public:
ContainerNode *m_rootNode;
- QString m_defaultMergingName;
+ TQString m_defaultMergingName;
/*
* Contains the container which is searched for in ::container .
*/
- QString m_containerName;
+ TQString m_containerName;
/*
* List of all clients
*/
- QPtrList<KXMLGUIClient> m_clients;
+ TQPtrList<KXMLGUIClient> m_clients;
- QString tagActionList;
+ TQString tagActionList;
- QString attrName;
+ TQString attrName;
BuildStateStack m_stateStack;
};
-QString KXMLGUIFactory::readConfigFile( const QString &filename, const KInstance *instance )
+TQString KXMLGUIFactory::readConfigFile( const TQString &filename, const KInstance *instance )
{
return readConfigFile( filename, false, instance );
}
-QString KXMLGUIFactory::readConfigFile( const QString &filename, bool never_null, const KInstance *_instance )
+TQString KXMLGUIFactory::readConfigFile( const TQString &filename, bool never_null, const KInstance *_instance )
{
const KInstance *instance = _instance ? _instance : KGlobal::instance();
- QString xml_file;
+ TQString xml_file;
- if (!QDir::isRelativePath(filename))
+ if (!TQDir::isRelativePath(filename))
xml_file = filename;
else
{
- xml_file = locate("data", QString::fromLatin1(instance->instanceName() + '/' ) + filename);
- if ( !QFile::exists( xml_file ) )
+ xml_file = locate("data", TQString::fromLatin1(instance->instanceName() + '/' ) + filename);
+ if ( !TQFile::exists( xml_file ) )
xml_file = locate( "data", filename );
}
- QFile file( xml_file );
+ TQFile file( xml_file );
if ( !file.open( IO_ReadOnly ) )
{
kdError(240) << "No such XML file " << filename << endl;
if ( never_null )
- return QString::fromLatin1( "<!DOCTYPE kpartgui>\n<kpartgui name=\"empty\">\n</kpartgui>" );
+ return TQString::fromLatin1( "<!DOCTYPE kpartgui>\n<kpartgui name=\"empty\">\n</kpartgui>" );
else
- return QString::null;
+ return TQString::null;
}
#if QT_VERSION <= 0x030302
- // Work around bug in QString::fromUtf8 (which calls strlen).
- QByteArray buffer(file.size() + 1);
+ // Work around bug in TQString::fromUtf8 (which calls strlen).
+ TQByteArray buffer(file.size() + 1);
buffer = file.readAll();
if(!buffer.isEmpty())
buffer[ buffer.size() - 1 ] = '\0';
else
- return QString::null;
+ return TQString::null;
#else
- QByteArray buffer(file.readAll());
+ TQByteArray buffer(file.readAll());
#endif
- return QString::fromUtf8(buffer.data(), buffer.size());
+ return TQString::fromUtf8(buffer.data(), buffer.size());
}
-bool KXMLGUIFactory::saveConfigFile( const QDomDocument& doc,
- const QString& filename, const KInstance *_instance )
+bool KXMLGUIFactory::saveConfigFile( const TQDomDocument& doc,
+ const TQString& filename, const KInstance *_instance )
{
const KInstance *instance = _instance ? _instance : KGlobal::instance();
- QString xml_file(filename);
+ TQString xml_file(filename);
- if (QDir::isRelativePath(xml_file))
- xml_file = locateLocal("data", QString::fromLatin1( instance->instanceName() + '/' )
+ if (TQDir::isRelativePath(xml_file))
+ xml_file = locateLocal("data", TQString::fromLatin1( instance->instanceName() + '/' )
+ filename);
- QFile file( xml_file );
+ TQFile file( xml_file );
if ( !file.open( IO_WriteOnly ) )
{
kdError(240) << "Could not write to " << filename << endl;
@@ -157,54 +157,54 @@ bool KXMLGUIFactory::saveConfigFile( const QDomDocument& doc,
}
// write out our document
- QTextStream ts(&file);
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts(&file);
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << doc;
file.close();
return true;
}
-QString KXMLGUIFactory::documentToXML( const QDomDocument& doc )
+TQString KXMLGUIFactory::documentToXML( const TQDomDocument& doc )
{
- QString str;
- QTextStream ts(&str, IO_WriteOnly);
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQString str;
+ TQTextStream ts(&str, IO_WriteOnly);
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << doc;
return str;
}
-QString KXMLGUIFactory::elementToXML( const QDomElement& elem )
+TQString KXMLGUIFactory::elementToXML( const TQDomElement& elem )
{
- QString str;
- QTextStream ts(&str, IO_WriteOnly);
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQString str;
+ TQTextStream ts(&str, IO_WriteOnly);
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << elem;
return str;
}
-void KXMLGUIFactory::removeDOMComments( QDomNode &node )
+void KXMLGUIFactory::removeDOMComments( TQDomNode &node )
{
- QDomNode n = node.firstChild();
+ TQDomNode n = node.firstChild();
while ( !n.isNull() )
{
- if ( n.nodeType() == QDomNode::CommentNode )
+ if ( n.nodeType() == TQDomNode::CommentNode )
{
- QDomNode tmp = n;
+ TQDomNode tmp = n;
n = n.nextSibling();
node.removeChild( tmp );
}
else
{
- QDomNode tmp = n;
+ TQDomNode tmp = n;
n = n.nextSibling();
removeDOMComments( tmp );
}
}
}
-KXMLGUIFactory::KXMLGUIFactory( KXMLGUIBuilder *builder, QObject *parent, const char *name )
- : QObject( parent, name )
+KXMLGUIFactory::KXMLGUIFactory( KXMLGUIBuilder *builder, TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
d = new KXMLGUIFactoryPrivate;
d->builder = builder;
@@ -224,7 +224,7 @@ KXMLGUIFactory::~KXMLGUIFactory()
void KXMLGUIFactory::addClient( KXMLGUIClient *client )
{
kdDebug(1002) << "KXMLGUIFactory::addClient( " << client << " )" << endl; // ellis
- static const QString &actionPropElementName = KGlobal::staticQString( "ActionProperties" );
+ static const TQString &actionPropElementName = KGlobal::staticQString( "ActionProperties" );
if ( client->factory() ) {
if ( client->factory() == this )
@@ -235,7 +235,7 @@ void KXMLGUIFactory::addClient( KXMLGUIClient *client )
d->pushState();
-// QTime dt; dt.start();
+// TQTime dt; dt.start();
d->guiClient = client;
@@ -253,11 +253,11 @@ void KXMLGUIFactory::addClient( KXMLGUIClient *client )
// try to use the build document for building the client's GUI, as the build document
// contains the correct container state information (like toolbar positions, sizes, etc.) .
// if there is non available, then use the "real" document.
- QDomDocument doc = client->xmlguiBuildDocument();
+ TQDomDocument doc = client->xmlguiBuildDocument();
if ( doc.documentElement().isNull() )
doc = client->domDocument();
- QDomElement docElement = doc.documentElement();
+ TQDomElement docElement = doc.documentElement();
d->m_rootNode->index = -1;
@@ -279,7 +279,7 @@ void KXMLGUIFactory::addClient( KXMLGUIClient *client )
// process a possibly existing actionproperties section
- QDomElement actionPropElement = docElement.namedItem( actionPropElementName ).toElement();
+ TQDomElement actionPropElement = docElement.namedItem( actionPropElementName ).toElement();
if ( actionPropElement.isNull() )
actionPropElement = docElement.namedItem( actionPropElementName.lower() ).toElement();
@@ -309,8 +309,8 @@ void KXMLGUIFactory::addClient( KXMLGUIClient *client )
// build child clients
if ( client->childClients()->count() > 0 )
{
- const QPtrList<KXMLGUIClient> *children = client->childClients();
- QPtrListIterator<KXMLGUIClient> childIt( *children );
+ const TQPtrList<KXMLGUIClient> *children = client->childClients();
+ TQPtrListIterator<KXMLGUIClient> childIt( *children );
for (; childIt.current(); ++childIt )
addClient( childIt.current() );
}
@@ -332,8 +332,8 @@ void KXMLGUIFactory::removeClient( KXMLGUIClient *client )
// remove child clients first
if ( client->childClients()->count() > 0 )
{
- const QPtrList<KXMLGUIClient> *children = client->childClients();
- QPtrListIterator<KXMLGUIClient> childIt( *children );
+ const TQPtrList<KXMLGUIClient> *children = client->childClients();
+ TQPtrListIterator<KXMLGUIClient> childIt( *children );
childIt.toLast();
for (; childIt.current(); --childIt )
removeClient( childIt.current() );
@@ -354,7 +354,7 @@ void KXMLGUIFactory::removeClient( KXMLGUIClient *client )
// if we don't have a build document for that client, yet, then create one by
// cloning the original document, so that saving container information in the
// DOM tree does not touch the original document.
- QDomDocument doc = client->xmlguiBuildDocument();
+ TQDomDocument doc = client->xmlguiBuildDocument();
if ( doc.documentElement().isNull() )
{
doc = client->domDocument().cloneNode( true ).toDocument();
@@ -376,29 +376,29 @@ void KXMLGUIFactory::removeClient( KXMLGUIClient *client )
emit clientRemoved( client );
}
-QPtrList<KXMLGUIClient> KXMLGUIFactory::clients() const
+TQPtrList<KXMLGUIClient> KXMLGUIFactory::clients() const
{
return d->m_clients;
}
-QWidget *KXMLGUIFactory::container( const QString &containerName, KXMLGUIClient *client,
+TQWidget *KXMLGUIFactory::container( const TQString &containerName, KXMLGUIClient *client,
bool useTagName )
{
d->pushState();
d->m_containerName = containerName;
d->guiClient = client;
- QWidget *result = findRecursive( d->m_rootNode, useTagName );
+ TQWidget *result = findRecursive( d->m_rootNode, useTagName );
d->guiClient = 0L;
- d->m_containerName = QString::null;
+ d->m_containerName = TQString::null;
d->popState();
return result;
}
-QPtrList<QWidget> KXMLGUIFactory::containers( const QString &tagName )
+TQPtrList<TQWidget> KXMLGUIFactory::containers( const TQString &tagName )
{
return findRecursive( d->m_rootNode, tagName );
}
@@ -410,7 +410,7 @@ void KXMLGUIFactory::reset()
d->m_rootNode->clearChildren();
}
-void KXMLGUIFactory::resetContainer( const QString &containerName, bool useTagName )
+void KXMLGUIFactory::resetContainer( const TQString &containerName, bool useTagName )
{
if ( containerName.isEmpty() )
return;
@@ -429,17 +429,17 @@ void KXMLGUIFactory::resetContainer( const QString &containerName, bool useTagNa
parent->removeChild( container );
}
-QWidget *KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node, bool tag )
+TQWidget *KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node, bool tag )
{
if ( ( ( !tag && node->name == d->m_containerName ) ||
( tag && node->tagName == d->m_containerName ) ) &&
( !d->guiClient || node->client == d->guiClient ) )
return node->container;
- QPtrListIterator<ContainerNode> it( node->children );
+ TQPtrListIterator<ContainerNode> it( node->children );
for (; it.current(); ++it )
{
- QWidget *cont = findRecursive( it.current(), tag );
+ TQWidget *cont = findRecursive( it.current(), tag );
if ( cont )
return cont;
}
@@ -447,19 +447,19 @@ QWidget *KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node, bool tag )
return 0L;
}
-QPtrList<QWidget> KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node,
- const QString &tagName )
+TQPtrList<TQWidget> KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node,
+ const TQString &tagName )
{
- QPtrList<QWidget> res;
+ TQPtrList<TQWidget> res;
if ( node->tagName == tagName.lower() )
res.append( node->container );
- QPtrListIterator<KXMLGUI::ContainerNode> it( node->children );
+ TQPtrListIterator<KXMLGUI::ContainerNode> it( node->children );
for (; it.current(); ++it )
{
- QPtrList<QWidget> lst = findRecursive( it.current(), tagName );
- QPtrListIterator<QWidget> wit( lst );
+ TQPtrList<TQWidget> lst = findRecursive( it.current(), tagName );
+ TQPtrListIterator<TQWidget> wit( lst );
for (; wit.current(); ++wit )
res.append( wit.current() );
}
@@ -467,8 +467,8 @@ QPtrList<QWidget> KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node,
return res;
}
-void KXMLGUIFactory::plugActionList( KXMLGUIClient *client, const QString &name,
- const QPtrList<KAction> &actionList )
+void KXMLGUIFactory::plugActionList( KXMLGUIClient *client, const TQString &name,
+ const TQPtrList<KAction> &actionList )
{
d->pushState();
d->guiClient = client;
@@ -482,7 +482,7 @@ void KXMLGUIFactory::plugActionList( KXMLGUIClient *client, const QString &name,
d->popState();
}
-void KXMLGUIFactory::unplugActionList( KXMLGUIClient *client, const QString &name )
+void KXMLGUIFactory::unplugActionList( KXMLGUIClient *client, const TQString &name )
{
d->pushState();
d->guiClient = client;
@@ -495,14 +495,14 @@ void KXMLGUIFactory::unplugActionList( KXMLGUIClient *client, const QString &nam
d->popState();
}
-void KXMLGUIFactory::applyActionProperties( const QDomElement &actionPropElement )
+void KXMLGUIFactory::applyActionProperties( const TQDomElement &actionPropElement )
{
- static const QString &tagAction = KGlobal::staticQString( "action" );
+ static const TQString &tagAction = KGlobal::staticQString( "action" );
- for (QDomNode n = actionPropElement.firstChild();
+ for (TQDomNode n = actionPropElement.firstChild();
!n.isNull(); n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName().lower() != tagAction )
continue;
@@ -514,11 +514,11 @@ void KXMLGUIFactory::applyActionProperties( const QDomElement &actionPropElement
}
}
-void KXMLGUIFactory::configureAction( KAction *action, const QDomNamedNodeMap &attributes )
+void KXMLGUIFactory::configureAction( KAction *action, const TQDomNamedNodeMap &attributes )
{
for ( uint i = 0; i < attributes.length(); i++ )
{
- QDomAttr attr = attributes.item( i ).toAttr();
+ TQDomAttr attr = attributes.item( i ).toAttr();
if ( attr.isNull() )
continue;
@@ -526,25 +526,25 @@ void KXMLGUIFactory::configureAction( KAction *action, const QDomNamedNodeMap &a
}
}
-void KXMLGUIFactory::configureAction( KAction *action, const QDomAttr &attribute )
+void KXMLGUIFactory::configureAction( KAction *action, const TQDomAttr &attribute )
{
- static const QString &attrShortcut = KGlobal::staticQString( "shortcut" );
+ static const TQString &attrShortcut = KGlobal::staticQString( "shortcut" );
- QString attrName = attribute.name();
+ TQString attrName = attribute.name();
// If the attribute is a deprecated "accel", change to "shortcut".
if ( attrName.lower() == "accel" )
attrName = attrShortcut;
- QVariant propertyValue;
+ TQVariant propertyValue;
- QVariant::Type propertyType = action->property( attrName.latin1() ).type();
+ TQVariant::Type propertyType = action->property( attrName.latin1() ).type();
- if ( propertyType == QVariant::Int )
- propertyValue = QVariant( attribute.value().toInt() );
- else if ( propertyType == QVariant::UInt )
- propertyValue = QVariant( attribute.value().toUInt() );
+ if ( propertyType == TQVariant::Int )
+ propertyValue = TQVariant( attribute.value().toInt() );
+ else if ( propertyType == TQVariant::UInt )
+ propertyValue = TQVariant( attribute.value().toUInt() );
else
- propertyValue = QVariant( attribute.value() );
+ propertyValue = TQVariant( attribute.value() );
action->setProperty( attrName.latin1(), propertyValue );
}
@@ -552,8 +552,8 @@ void KXMLGUIFactory::configureAction( KAction *action, const QDomAttr &attribute
int KXMLGUIFactory::configureShortcuts(bool bAllowLetterShortcuts , bool bSaveSettings )
{
- KKeyDialog dlg( bAllowLetterShortcuts, dynamic_cast<QWidget*>(parent()) );
- QPtrListIterator<KXMLGUIClient> it( d->m_clients );
+ KKeyDialog dlg( bAllowLetterShortcuts, dynamic_cast<TQWidget*>(parent()) );
+ TQPtrListIterator<KXMLGUIClient> it( d->m_clients );
KXMLGUIClient *client;
while( (client=it.current()) !=0 )
{
@@ -564,14 +564,14 @@ int KXMLGUIFactory::configureShortcuts(bool bAllowLetterShortcuts , bool bSaveSe
return dlg.configure(bSaveSettings);
}
-QDomElement KXMLGUIFactory::actionPropertiesElement( QDomDocument& doc )
+TQDomElement KXMLGUIFactory::actionPropertiesElement( TQDomDocument& doc )
{
- const QString tagActionProp = QString::fromLatin1("ActionProperties");
+ const TQString tagActionProp = TQString::fromLatin1("ActionProperties");
// first, lets see if we have existing properties
- QDomElement elem;
- QDomNode it = doc.documentElement().firstChild();
+ TQDomElement elem;
+ TQDomNode it = doc.documentElement().firstChild();
for( ; !it.isNull(); it = it.nextSibling() ) {
- QDomElement e = it.toElement();
+ TQDomElement e = it.toElement();
if( e.tagName() == tagActionProp ) {
elem = e;
break;
@@ -586,23 +586,23 @@ QDomElement KXMLGUIFactory::actionPropertiesElement( QDomDocument& doc )
return elem;
}
-QDomElement KXMLGUIFactory::findActionByName( QDomElement& elem, const QString& sName, bool create )
+TQDomElement KXMLGUIFactory::findActionByName( TQDomElement& elem, const TQString& sName, bool create )
{
- static const QString& attrName = KGlobal::staticQString( "name" );
- static const QString& tagAction = KGlobal::staticQString( "Action" );
- for( QDomNode it = elem.firstChild(); !it.isNull(); it = it.nextSibling() ) {
- QDomElement e = it.toElement();
+ static const TQString& attrName = KGlobal::staticQString( "name" );
+ static const TQString& tagAction = KGlobal::staticQString( "Action" );
+ for( TQDomNode it = elem.firstChild(); !it.isNull(); it = it.nextSibling() ) {
+ TQDomElement e = it.toElement();
if( e.attribute( attrName ) == sName )
return e;
}
if( create ) {
- QDomElement act_elem = elem.ownerDocument().createElement( tagAction );
+ TQDomElement act_elem = elem.ownerDocument().createElement( tagAction );
act_elem.setAttribute( attrName, sName );
elem.appendChild( act_elem );
return act_elem;
}
- return QDomElement();
+ return TQDomElement();
}
void KXMLGUIFactory::virtual_hook( int, void* )
diff --git a/kdeui/kxmlguifactory.h b/kdeui/kxmlguifactory.h
index cb4a86ef3..fa534e093 100644
--- a/kdeui/kxmlguifactory.h
+++ b/kdeui/kxmlguifactory.h
@@ -21,10 +21,10 @@
#ifndef __kxmlguifactory_h__
#define __kxmlguifactory_h__
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qdom.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqdom.h>
+#include <tqvaluelist.h>
#include <kdelibs_export.h>
@@ -51,7 +51,7 @@ class BuildHelper;
* actions. KXMLGUIFactory takes care of building (with the help of a KXMLGUIBuilder)
* and merging the GUI from an unlimited number of clients.
*
- * Each client provides XML through a QDomDocument and actions through a
+ * Each client provides XML through a TQDomDocument and actions through a
* KActionCollection . The XML document contains the rules for how to merge the
* GUI.
*
@@ -71,7 +71,7 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
* Note that the ownership of the given KXMLGUIBuilder object won't be transferred to this
* KXMLGUIFactory, so you have to take care of deleting it properly.
*/
- KXMLGUIFactory( KXMLGUIBuilder *builder, QObject *parent = 0, const char *name = 0 );
+ KXMLGUIFactory( KXMLGUIBuilder *builder, TQObject *parent = 0, const char *name = 0 );
/**
* Destructor
@@ -79,34 +79,34 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
~KXMLGUIFactory();
// XXX move to somewhere else? (Simon)
- static QString readConfigFile( const QString &filename, bool never_null, const KInstance *instance = 0 );
- static QString readConfigFile( const QString &filename, const KInstance *instance = 0 );
- static bool saveConfigFile( const QDomDocument& doc, const QString& filename,
+ static TQString readConfigFile( const TQString &filename, bool never_null, const KInstance *instance = 0 );
+ static TQString readConfigFile( const TQString &filename, const KInstance *instance = 0 );
+ static bool saveConfigFile( const TQDomDocument& doc, const TQString& filename,
const KInstance *instance = 0 );
- static QString documentToXML( const QDomDocument& doc );
- static QString elementToXML( const QDomElement& elem );
+ static TQString documentToXML( const TQDomDocument& doc );
+ static TQString elementToXML( const TQDomElement& elem );
/**
- * Removes all QDomComment objects from the specified node and all its children.
+ * Removes all TQDomComment objects from the specified node and all its children.
*/
- static void removeDOMComments( QDomNode &node );
+ static void removeDOMComments( TQDomNode &node );
/**
* @internal
* Find or create the ActionProperties element, used when saving custom action properties
*/
- static QDomElement actionPropertiesElement( QDomDocument& doc );
+ static TQDomElement actionPropertiesElement( TQDomDocument& doc );
/**
* @internal
* Find or create the element for a given action, by name.
* Used when saving custom action properties
*/
- static QDomElement findActionByName( QDomElement& elem, const QString& sName, bool create );
+ static TQDomElement findActionByName( TQDomElement& elem, const TQString& sName, bool create );
/**
- * Creates the GUI described by the QDomDocument of the client,
+ * Creates the GUI described by the TQDomDocument of the client,
* using the client's actions, and merges it with the previously
* created GUI.
* This also means that the order in which clients are added to the factory
@@ -124,13 +124,13 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
*/
void removeClient( KXMLGUIClient *client );
- void plugActionList( KXMLGUIClient *client, const QString &name, const QPtrList<KAction> &actionList );
- void unplugActionList( KXMLGUIClient *client, const QString &name );
+ void plugActionList( KXMLGUIClient *client, const TQString &name, const TQPtrList<KAction> &actionList );
+ void unplugActionList( KXMLGUIClient *client, const TQString &name );
/**
* Returns a list of all clients currently added to this factory
*/
- QPtrList<KXMLGUIClient> clients() const;
+ TQPtrList<KXMLGUIClient> clients() const;
/**
* Use this method to get access to a container widget with the name specified with @p containerName
@@ -140,7 +140,7 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
* This function is particularly useful for getting hold of a popupmenu defined in an XMLUI file.
* For instance:
* \code
- * QPopupMenu *popup = static_cast<QPopupMenu*>(factory()->container("my_popup",this));
+ * TQPopupMenu *popup = static_cast<TQPopupMenu*>(factory()->container("my_popup",this));
* \endcode
* where @p "my_popup" is the name of the menu in the XMLUI file, and
* @p "this" is XMLGUIClient which owns the popupmenu (e.g. the mainwindow, or the part, or the plugin...)
@@ -152,9 +152,9 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
*
* This method may return 0L if no container with the given name exists or is not owned by the client.
*/
- QWidget *container( const QString &containerName, KXMLGUIClient *client, bool useTagName = false );
+ TQWidget *container( const TQString &containerName, KXMLGUIClient *client, bool useTagName = false );
- QPtrList<QWidget> containers( const QString &tagName );
+ TQPtrList<TQWidget> containers( const TQString &tagName );
/**
* Use this method to free all memory allocated by the KXMLGUIFactory. This deletes the internal node
@@ -175,7 +175,7 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
* (also note that this will call KXMLGUIClient::setFactory( 0L ) for all clients of the
* container)
*/
- void resetContainer( const QString &containerName, bool useTagName = false );
+ void resetContainer( const TQString &containerName, bool useTagName = false );
public slots:
/**
@@ -184,7 +184,7 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
* This slot can be connected dirrectly to the action to configure shortcuts. This is very simple to
* do that by adding a single line
* \code
- * KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), actionCollection() );
+ * KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), actionCollection() );
* \endcode
*
* @param bAllowLetterShortcuts Set to false if unmodified alphanumeric
@@ -201,13 +201,13 @@ class KDEUI_EXPORT KXMLGUIFactory : public QObject
private:
- QWidget *findRecursive( KXMLGUI::ContainerNode *node, bool tag );
+ TQWidget *findRecursive( KXMLGUI::ContainerNode *node, bool tag );
- QPtrList<QWidget> findRecursive( KXMLGUI::ContainerNode *node, const QString &tagName );
+ TQPtrList<TQWidget> findRecursive( KXMLGUI::ContainerNode *node, const TQString &tagName );
- void applyActionProperties( const QDomElement &element );
- void configureAction( KAction *action, const QDomNamedNodeMap &attributes );
- void configureAction( KAction *action, const QDomAttr &attribute );
+ void applyActionProperties( const TQDomElement &element );
+ void configureAction( KAction *action, const TQDomNamedNodeMap &attributes );
+ void configureAction( KAction *action, const TQDomAttr &attribute );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdeui/kxmlguifactory_p.cpp b/kdeui/kxmlguifactory_p.cpp
index 329b11881..4bd5ad68e 100644
--- a/kdeui/kxmlguifactory_p.cpp
+++ b/kdeui/kxmlguifactory_p.cpp
@@ -21,7 +21,7 @@
#include "kxmlguiclient.h"
#include "kxmlguibuilder.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -30,26 +30,26 @@
using namespace KXMLGUI;
-void ActionList::plug( QWidget *container, int index ) const
+void ActionList::plug( TQWidget *container, int index ) const
{
ActionListIt it( *this );
for (; it.current(); ++it )
it.current()->plug( container, index++ );
}
-void ActionList::unplug( QWidget *container ) const
+void ActionList::unplug( TQWidget *container ) const
{
ActionListIt it( *this );
for (; it.current(); ++it )
it.current()->unplug( container );
}
-ContainerNode::ContainerNode( QWidget *_container, const QString &_tagName,
- const QString &_name, ContainerNode *_parent,
+ContainerNode::ContainerNode( TQWidget *_container, const TQString &_tagName,
+ const TQString &_name, ContainerNode *_parent,
KXMLGUIClient *_client, KXMLGUIBuilder *_builder,
- int id, const QString &_mergingName,
- const QString &_groupName, const QStringList &customTags,
- const QStringList &containerTags )
+ int id, const TQString &_mergingName,
+ const TQString &_groupName, const TQStringList &customTags,
+ const TQStringList &containerTags )
: parent( _parent ), client( _client ), builder( _builder ),
builderCustomTags( customTags ), builderContainerTags( containerTags ),
container( _container ), containerId( id ), tagName( _tagName ), name( _name ),
@@ -73,7 +73,7 @@ void ContainerNode::removeChild( ContainerNode *child )
* Find a merging index with the given name. Used to find an index defined by <Merge name="blah"/>
* or by a <DefineGroup name="foo" /> tag.
*/
-MergingIndexList::Iterator ContainerNode::findIndex( const QString &name )
+MergingIndexList::Iterator ContainerNode::findIndex( const TQString &name )
{
MergingIndexList::Iterator it( mergingIndices.begin() );
MergingIndexList::Iterator end( mergingIndices.end() );
@@ -87,7 +87,7 @@ MergingIndexList::Iterator ContainerNode::findIndex( const QString &name )
* Check if the given container widget is a child of this node and return the node structure
* if fonud.
*/
-ContainerNode *ContainerNode::findContainerNode( QWidget *container )
+ContainerNode *ContainerNode::findContainerNode( TQWidget *container )
{
ContainerNodeListIt it( children );
@@ -103,7 +103,7 @@ ContainerNode *ContainerNode::findContainerNode( QWidget *container )
* container's tag name or the value of the container's name attribute. Specified by
* the tag bool .
*/
-ContainerNode *ContainerNode::findContainer( const QString &_name, bool tag )
+ContainerNode *ContainerNode::findContainer( const TQString &_name, bool tag )
{
if ( ( tag && tagName == _name ) ||
( !tag && name == _name ) )
@@ -125,8 +125,8 @@ ContainerNode *ContainerNode::findContainer( const QString &_name, bool tag )
* leaves out container widgets specified in the exludeList . Also ensures that the containers
* belongs to currClient.
*/
-ContainerNode *ContainerNode::findContainer( const QString &name, const QString &tagName,
- const QPtrList<QWidget> *excludeList,
+ContainerNode *ContainerNode::findContainer( const TQString &name, const TQString &tagName,
+ const TQPtrList<TQWidget> *excludeList,
KXMLGUIClient * /*currClient*/ )
{
ContainerNode *res = 0L;
@@ -176,7 +176,7 @@ ContainerNode *ContainerNode::findContainer( const QString &name, const QString
}
ContainerClient *ContainerNode::findChildContainerClient( KXMLGUIClient *currentGUIClient,
- const QString &groupName,
+ const TQString &groupName,
const MergingIndexList::Iterator &mergingIdx )
{
if ( !clients.isEmpty() )
@@ -213,18 +213,18 @@ void ContainerNode::plugActionList( BuildState &state )
for (; mIt != mEnd; ++mIt )
plugActionList( state, mIt );
- QPtrListIterator<ContainerNode> childIt( children );
+ TQPtrListIterator<ContainerNode> childIt( children );
for (; childIt.current(); ++childIt )
childIt.current()->plugActionList( state );
}
void ContainerNode::plugActionList( BuildState &state, const MergingIndexList::Iterator &mergingIdxIt )
{
- static const QString &tagActionList = KGlobal::staticQString( "actionlist" );
+ static const TQString &tagActionList = KGlobal::staticQString( "actionlist" );
MergingIndex mergingIdx = *mergingIdxIt;
- QString k( mergingIdx.mergingName );
+ TQString k( mergingIdx.mergingName );
if ( k.find( tagActionList ) == -1 )
return;
@@ -238,7 +238,7 @@ void ContainerNode::plugActionList( BuildState &state, const MergingIndexList::I
return;
ContainerClient *client = findChildContainerClient( state.guiClient,
- QString::null,
+ TQString::null,
mergingIndices.end() );
client->actionLists.insert( k, state.actionList );
@@ -255,18 +255,18 @@ void ContainerNode::unplugActionList( BuildState &state )
for (; mIt != mEnd; ++mIt )
unplugActionList( state, mIt );
- QPtrListIterator<ContainerNode> childIt( children );
+ TQPtrListIterator<ContainerNode> childIt( children );
for (; childIt.current(); ++childIt )
childIt.current()->unplugActionList( state );
}
void ContainerNode::unplugActionList( BuildState &state, const MergingIndexList::Iterator &mergingIdxIt )
{
- static const QString &tagActionList = KGlobal::staticQString( "actionlist" );
+ static const TQString &tagActionList = KGlobal::staticQString( "actionlist" );
MergingIndex mergingIdx = *mergingIdxIt;
- QString k = mergingIdx.mergingName;
+ TQString k = mergingIdx.mergingName;
if ( k.find( tagActionList ) == -1 )
return;
@@ -280,7 +280,7 @@ void ContainerNode::unplugActionList( BuildState &state, const MergingIndexList:
return;
ContainerClient *client = findChildContainerClient( state.guiClient,
- QString::null,
+ TQString::null,
mergingIndices.end() );
ActionListMap::Iterator lIt( client->actionLists.find( k ) );
@@ -306,7 +306,7 @@ void ContainerNode::adjustMergingIndices( int offset,
index += offset;
}
-bool ContainerNode::destruct( QDomElement element, BuildState &state )
+bool ContainerNode::destruct( TQDomElement element, BuildState &state )
{
destructChildren( element, state );
@@ -324,7 +324,7 @@ bool ContainerNode::destruct( QDomElement element, BuildState &state )
if ( clients.count() == 0 && children.count() == 0 && container &&
client == state.guiClient )
{
- QWidget *parentContainer = 0L;
+ TQWidget *parentContainer = 0L;
if ( parent && parent->container )
parentContainer = parent->container;
@@ -345,14 +345,14 @@ bool ContainerNode::destruct( QDomElement element, BuildState &state )
}
-void ContainerNode::destructChildren( const QDomElement &element, BuildState &state )
+void ContainerNode::destructChildren( const TQDomElement &element, BuildState &state )
{
- QPtrListIterator<ContainerNode> childIt( children );
+ TQPtrListIterator<ContainerNode> childIt( children );
while ( childIt.current() )
{
ContainerNode *childNode = childIt.current();
- QDomElement childElement = findElementForChild( element, childNode );
+ TQDomElement childElement = findElementForChild( element, childNode );
// destruct returns true in case the container really got deleted
if ( childNode->destruct( childElement, state ) )
@@ -362,22 +362,22 @@ void ContainerNode::destructChildren( const QDomElement &element, BuildState &st
}
}
-QDomElement ContainerNode::findElementForChild( const QDomElement &baseElement,
+TQDomElement ContainerNode::findElementForChild( const TQDomElement &baseElement,
ContainerNode *childNode )
{
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
// ### slow
- for ( QDomNode n = baseElement.firstChild(); !n.isNull();
+ for ( TQDomNode n = baseElement.firstChild(); !n.isNull();
n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName().lower() == childNode->tagName &&
e.attribute( attrName ) == childNode->name )
return e;
}
- return QDomElement();
+ return TQDomElement();
}
void ContainerNode::unplugActions( BuildState &state )
@@ -412,14 +412,14 @@ void ContainerNode::unplugActions( BuildState &state )
void ContainerNode::unplugClient( ContainerClient *client )
{
- static const QString &tagActionList = KGlobal::staticQString( "actionlist" );
+ static const TQString &tagActionList = KGlobal::staticQString( "actionlist" );
assert( builder );
// now quickly remove all custom elements (i.e. separators) and unplug all actions
- QValueList<int>::ConstIterator custIt = client->customElements.begin();
- QValueList<int>::ConstIterator custEnd = client->customElements.end();
+ TQValueList<int>::ConstIterator custIt = client->customElements.begin();
+ TQValueList<int>::ConstIterator custEnd = client->customElements.end();
for (; custIt != custEnd; ++custIt )
builder->removeCustomElement( container, *custIt );
@@ -443,7 +443,7 @@ void ContainerNode::unplugClient( ContainerClient *client )
// construct the merging index key (i.e. like named merging) , find the
// corresponding merging index and adjust all indices
- QString mergingKey = alIt.key();
+ TQString mergingKey = alIt.key();
mergingKey.prepend( tagActionList );
MergingIndexList::Iterator mIt = findIndex( mergingKey );
@@ -460,7 +460,7 @@ void ContainerNode::unplugClient( ContainerClient *client )
void ContainerNode::reset()
{
- QPtrListIterator<ContainerNode> childIt( children );
+ TQPtrListIterator<ContainerNode> childIt( children );
for (; childIt.current(); ++childIt )
childIt.current()->reset();
@@ -468,7 +468,7 @@ void ContainerNode::reset()
client->setFactory( 0L );
}
-int ContainerNode::calcMergingIndex( const QString &mergingName,
+int ContainerNode::calcMergingIndex( const TQString &mergingName,
MergingIndexList::Iterator &it,
BuildState &state,
bool ignoreDefaultMergingIndex )
@@ -495,9 +495,9 @@ int ContainerNode::calcMergingIndex( const QString &mergingName,
return (*it).value;
}
-int BuildHelper::calcMergingIndex( const QDomElement &element, MergingIndexList::Iterator &it, QString &group )
+int BuildHelper::calcMergingIndex( const TQDomElement &element, MergingIndexList::Iterator &it, TQString &group )
{
- static const QString &attrGroup = KGlobal::staticQString( "group" );
+ static const TQString &attrGroup = KGlobal::staticQString( "group" );
bool haveGroup = false;
group = element.attribute( attrGroup );
@@ -521,7 +521,7 @@ BuildHelper::BuildHelper( BuildState &state, ContainerNode *node )
: containerClient( 0 ), ignoreDefaultMergingIndex( false ), m_state( state ),
parentNode( node )
{
- static const QString &defaultMergingName = KGlobal::staticQString( "<default>" );
+ static const TQString &defaultMergingName = KGlobal::staticQString( "<default>" );
// create a list of supported container and custom tags
customTags = m_state.builderCustomTags;
@@ -539,32 +539,32 @@ BuildHelper::BuildHelper( BuildState &state, ContainerNode *node )
}
m_state.currentDefaultMergingIt = parentNode->findIndex( defaultMergingName );
- parentNode->calcMergingIndex( QString::null, m_state.currentClientMergingIt,
+ parentNode->calcMergingIndex( TQString::null, m_state.currentClientMergingIt,
m_state, /*ignoreDefaultMergingIndex*/ false );
}
-void BuildHelper::build( const QDomElement &element )
+void BuildHelper::build( const TQDomElement &element )
{
- for (QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for (TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (e.isNull()) continue;
processElement( e );
}
}
-void BuildHelper::processElement( const QDomElement &e )
+void BuildHelper::processElement( const TQDomElement &e )
{
// some often used QStrings
- static const QString &tagAction = KGlobal::staticQString( "action" );
- static const QString &tagMerge = KGlobal::staticQString( "merge" );
- static const QString &tagState = KGlobal::staticQString( "state" );
- static const QString &tagDefineGroup = KGlobal::staticQString( "definegroup" );
- static const QString &tagActionList = KGlobal::staticQString( "actionlist" );
- static const QString &attrName = KGlobal::staticQString( "name" );
+ static const TQString &tagAction = KGlobal::staticQString( "action" );
+ static const TQString &tagMerge = KGlobal::staticQString( "merge" );
+ static const TQString &tagState = KGlobal::staticQString( "state" );
+ static const TQString &tagDefineGroup = KGlobal::staticQString( "definegroup" );
+ static const TQString &tagActionList = KGlobal::staticQString( "actionlist" );
+ static const TQString &attrName = KGlobal::staticQString( "name" );
- QString tag( e.tagName().lower() );
- QString currName( e.attribute( attrName ) );
+ TQString tag( e.tagName().lower() );
+ TQString currName( e.attribute( attrName ) );
bool isActionTag = ( tag == tagAction );
@@ -578,14 +578,14 @@ void BuildHelper::processElement( const QDomElement &e )
processStateElement( e );
}
-void BuildHelper::processActionOrCustomElement( const QDomElement &e, bool isActionTag )
+void BuildHelper::processActionOrCustomElement( const TQDomElement &e, bool isActionTag )
{
if ( !parentNode->container )
return;
MergingIndexList::Iterator it( m_state.currentClientMergingIt );
- QString group;
+ TQString group;
int idx = calcMergingIndex( e, it, group );
containerClient = parentNode->findChildContainerClient( m_state.guiClient, group, it );
@@ -601,7 +601,7 @@ void BuildHelper::processActionOrCustomElement( const QDomElement &e, bool isAct
parentNode->adjustMergingIndices( 1, it );
}
-bool BuildHelper::processActionElement( const QDomElement &e, int idx )
+bool BuildHelper::processActionElement( const TQDomElement &e, int idx )
{
assert( m_state.guiClient );
@@ -620,7 +620,7 @@ bool BuildHelper::processActionElement( const QDomElement &e, int idx )
return true;
}
-bool BuildHelper::processCustomElement( const QDomElement &e, int idx )
+bool BuildHelper::processCustomElement( const TQDomElement &e, int idx )
{
assert( parentNode->builder );
@@ -632,18 +632,18 @@ bool BuildHelper::processCustomElement( const QDomElement &e, int idx )
return true;
}
-void BuildHelper::processStateElement( const QDomElement &element )
+void BuildHelper::processStateElement( const TQDomElement &element )
{
- QString stateName = element.attribute( "name" );
+ TQString stateName = element.attribute( "name" );
if ( !stateName || !stateName.length() ) return;
- for (QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for (TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (e.isNull()) continue;
- QString tagName = e.tagName().lower();
+ TQString tagName = e.tagName().lower();
if ( tagName != "enable" && tagName != "disable" )
continue;
@@ -651,12 +651,12 @@ void BuildHelper::processStateElement( const QDomElement &element )
bool processingActionsToEnable = (tagName == "enable");
// process action names
- for (QDomNode n2 = n.firstChild(); !n2.isNull(); n2 = n2.nextSibling() )
+ for (TQDomNode n2 = n.firstChild(); !n2.isNull(); n2 = n2.nextSibling() )
{
- QDomElement actionEl = n2.toElement();
+ TQDomElement actionEl = n2.toElement();
if ( actionEl.tagName().lower() != "action" ) continue;
- QString actionName = actionEl.attribute( "name" );
+ TQString actionName = actionEl.attribute( "name" );
if ( !actionName || !actionName.length() ) return;
if ( processingActionsToEnable )
@@ -668,14 +668,14 @@ void BuildHelper::processStateElement( const QDomElement &element )
}
}
-void BuildHelper::processMergeElement( const QString &tag, const QString &name, const QDomElement &e )
+void BuildHelper::processMergeElement( const TQString &tag, const TQString &name, const TQDomElement &e )
{
- static const QString &tagDefineGroup = KGlobal::staticQString( "definegroup" );
- static const QString &tagActionList = KGlobal::staticQString( "actionlist" );
- static const QString &defaultMergingName = KGlobal::staticQString( "<default>" );
- static const QString &attrGroup = KGlobal::staticQString( "group" );
+ static const TQString &tagDefineGroup = KGlobal::staticQString( "definegroup" );
+ static const TQString &tagActionList = KGlobal::staticQString( "actionlist" );
+ static const TQString &defaultMergingName = KGlobal::staticQString( "<default>" );
+ static const TQString &attrGroup = KGlobal::staticQString( "group" );
- QString mergingName( name );
+ TQString mergingName( name );
if ( mergingName.isEmpty() )
{
if ( tag == tagDefineGroup )
@@ -702,7 +702,7 @@ void BuildHelper::processMergeElement( const QString &tag, const QString &name,
MergingIndexList::Iterator mIt( parentNode->mergingIndices.end() );
- QString group( e.attribute( attrGroup ) );
+ TQString group( e.attribute( attrGroup ) );
if ( !group.isEmpty() )
group.prepend( attrGroup );
@@ -727,14 +727,14 @@ void BuildHelper::processMergeElement( const QString &tag, const QString &name,
// re-calculate the running default and client merging indices.
m_state.currentDefaultMergingIt = parentNode->findIndex( defaultMergingName );
- parentNode->calcMergingIndex( QString::null, m_state.currentClientMergingIt,
+ parentNode->calcMergingIndex( TQString::null, m_state.currentClientMergingIt,
m_state, ignoreDefaultMergingIndex );
}
-void BuildHelper::processContainerElement( const QDomElement &e, const QString &tag,
- const QString &name )
+void BuildHelper::processContainerElement( const TQDomElement &e, const TQString &tag,
+ const TQString &name )
{
- static const QString &defaultMergingName = KGlobal::staticQString( "<default>" );
+ static const TQString &defaultMergingName = KGlobal::staticQString( "<default>" );
ContainerNode *containerNode = parentNode->findContainer( name, tag,
&containerList,
@@ -743,7 +743,7 @@ void BuildHelper::processContainerElement( const QDomElement &e, const QString &
if ( !containerNode )
{
MergingIndexList::Iterator it( m_state.currentClientMergingIt );
- QString group;
+ TQString group;
int idx = calcMergingIndex( e, it, group );
@@ -751,7 +751,7 @@ void BuildHelper::processContainerElement( const QDomElement &e, const QString &
KXMLGUIBuilder *builder;
- QWidget *container = createContainer( parentNode->container, idx, e, id, &builder );
+ TQWidget *container = createContainer( parentNode->container, idx, e, id, &builder );
// no container? (probably some <text> tag or so ;-)
if ( !container )
@@ -763,12 +763,12 @@ void BuildHelper::processContainerElement( const QDomElement &e, const QString &
containerList.append( container );
- QString mergingName;
+ TQString mergingName;
if ( it != parentNode->mergingIndices.end() )
mergingName = (*it).mergingName;
- QStringList cusTags = m_state.builderCustomTags;
- QStringList conTags = m_state.builderContainerTags;
+ TQStringList cusTags = m_state.builderCustomTags;
+ TQStringList conTags = m_state.builderContainerTags;
if ( builder != m_state.builder )
{
cusTags = m_state.clientBuilderCustomTags;
@@ -784,15 +784,15 @@ void BuildHelper::processContainerElement( const QDomElement &e, const QString &
// and re-calculate running values, for better performance
m_state.currentDefaultMergingIt = parentNode->findIndex( defaultMergingName );
- parentNode->calcMergingIndex( QString::null, m_state.currentClientMergingIt,
+ parentNode->calcMergingIndex( TQString::null, m_state.currentClientMergingIt,
m_state, ignoreDefaultMergingIndex );
}
-QWidget *BuildHelper::createContainer( QWidget *parent, int index,
- const QDomElement &element, int &id,
+TQWidget *BuildHelper::createContainer( TQWidget *parent, int index,
+ const TQDomElement &element, int &id,
KXMLGUIBuilder **builder )
{
- QWidget *res = 0L;
+ TQWidget *res = 0L;
if ( m_state.clientBuilder )
{
@@ -823,8 +823,8 @@ QWidget *BuildHelper::createContainer( QWidget *parent, int index,
void BuildState::reset()
{
- clientName = QString::null;
- actionListName = QString::null;
+ clientName = TQString::null;
+ actionListName = TQString::null;
actionList.clear();
guiClient = 0;
clientBuilder = 0;
diff --git a/kdeui/kxmlguifactory_p.h b/kdeui/kxmlguifactory_p.h
index 6e7f8f15a..2561ba915 100644
--- a/kdeui/kxmlguifactory_p.h
+++ b/kdeui/kxmlguifactory_p.h
@@ -19,10 +19,10 @@
#ifndef __kxmlguifactory_p_h__
#define __kxmlguifactory_p_h__
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qdom.h>
-#include <qvaluestack.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqdom.h>
+#include <tqvaluestack.h>
#include <kaction.h>
@@ -36,22 +36,22 @@ namespace KXMLGUI
struct BuildState;
-class KDEUI_EXPORT ActionList : public QPtrList<KAction>
+class KDEUI_EXPORT ActionList : public TQPtrList<KAction>
{
public:
ActionList() {}
- ActionList( const QPtrList<KAction> &rhs )
- : QPtrList<KAction>( rhs )
+ ActionList( const TQPtrList<KAction> &rhs )
+ : TQPtrList<KAction>( rhs )
{}
- ActionList &operator=( const QPtrList<KAction> &rhs )
- { QPtrList<KAction>::operator=( rhs ); return *this; }
+ ActionList &operator=( const TQPtrList<KAction> &rhs )
+ { TQPtrList<KAction>::operator=( rhs ); return *this; }
- void plug( QWidget *container, int index ) const;
- void unplug( QWidget *container ) const;
+ void plug( TQWidget *container, int index ) const;
+ void unplug( TQWidget *container ) const;
};
-typedef QPtrListIterator<KAction> ActionListIt;
-typedef QMap< QString, ActionList > ActionListMap;
+typedef TQPtrListIterator<KAction> ActionListIt;
+typedef TQMap< TQString, ActionList > ActionListMap;
/*
* This structure is used to know to which client certain actions and custom elements
@@ -69,24 +69,24 @@ struct ContainerClient
{
KXMLGUIClient *client;
ActionList actions;
- QValueList<int> customElements;
- QString groupName; //is empty if no group client
+ TQValueList<int> customElements;
+ TQString groupName; //is empty if no group client
ActionListMap actionLists;
- QString mergingName;
+ TQString mergingName;
};
-typedef QPtrList<ContainerClient> ContainerClientList;
-typedef QPtrListIterator<ContainerClient> ContainerClientListIt;
+typedef TQPtrList<ContainerClient> ContainerClientList;
+typedef TQPtrListIterator<ContainerClient> ContainerClientListIt;
struct ContainerNode;
struct MergingIndex
{
int value; // the actual index value, used as index for plug() or createContainer() calls
- QString mergingName; // the name of the merging index (i.e. the name attribute of the
+ TQString mergingName; // the name of the merging index (i.e. the name attribute of the
// Merge or DefineGroup tag)
- QString clientName; // the name of the client that defined this index
+ TQString clientName; // the name of the client that defined this index
};
-typedef QValueList<MergingIndex> MergingIndexList;
+typedef TQValueList<MergingIndex> MergingIndexList;
/*
* Here we store detailed information about a container, its clients (client=a guiclient having actions
@@ -109,47 +109,47 @@ typedef QValueList<MergingIndex> MergingIndexList;
*/
struct KDEUI_EXPORT ContainerNode
{
- ContainerNode( QWidget *_container, const QString &_tagName, const QString &_name,
+ ContainerNode( TQWidget *_container, const TQString &_tagName, const TQString &_name,
ContainerNode *_parent = 0L, KXMLGUIClient *_client = 0L,
KXMLGUIBuilder *_builder = 0L, int id = -1,
- const QString &_mergingName = QString::null,
- const QString &groupName = QString::null,
- const QStringList &customTags = QStringList(),
- const QStringList &containerTags = QStringList() );
+ const TQString &_mergingName = TQString::null,
+ const TQString &groupName = TQString::null,
+ const TQStringList &customTags = TQStringList(),
+ const TQStringList &containerTags = TQStringList() );
ContainerNode *parent;
KXMLGUIClient *client;
KXMLGUIBuilder *builder;
- QStringList builderCustomTags;
- QStringList builderContainerTags;
- QWidget *container;
+ TQStringList builderCustomTags;
+ TQStringList builderContainerTags;
+ TQWidget *container;
int containerId;
- QString tagName;
- QString name;
+ TQString tagName;
+ TQString name;
- QString groupName; //is empty if the container is in no group
+ TQString groupName; //is empty if the container is in no group
ContainerClientList clients;
- QPtrList<ContainerNode> children;
+ TQPtrList<ContainerNode> children;
int index;
MergingIndexList mergingIndices;
- QString mergingName;
+ TQString mergingName;
void clearChildren() { children.clear(); }
void removeChild( ContainerNode *child );
- MergingIndexList::Iterator findIndex( const QString &name );
- ContainerNode *findContainerNode( QWidget *container );
- ContainerNode *findContainer( const QString &_name, bool tag );
- ContainerNode *findContainer( const QString &name, const QString &tagName,
- const QPtrList<QWidget> *excludeList,
+ MergingIndexList::Iterator findIndex( const TQString &name );
+ ContainerNode *findContainerNode( TQWidget *container );
+ ContainerNode *findContainer( const TQString &_name, bool tag );
+ ContainerNode *findContainer( const TQString &name, const TQString &tagName,
+ const TQPtrList<TQWidget> *excludeList,
KXMLGUIClient *currClient );
ContainerClient *findChildContainerClient( KXMLGUIClient *currentGUIClient,
- const QString &groupName,
+ const TQString &groupName,
const MergingIndexList::Iterator &mergingIdx );
void plugActionList( BuildState &state );
@@ -160,23 +160,23 @@ struct KDEUI_EXPORT ContainerNode
void adjustMergingIndices( int offset, const MergingIndexList::Iterator &it );
- bool destruct( QDomElement element, BuildState &state );
- void destructChildren( const QDomElement &element, BuildState &state );
- static QDomElement findElementForChild( const QDomElement &baseElement,
+ bool destruct( TQDomElement element, BuildState &state );
+ void destructChildren( const TQDomElement &element, BuildState &state );
+ static TQDomElement findElementForChild( const TQDomElement &baseElement,
ContainerNode *childNode );
void unplugActions( BuildState &state );
void unplugClient( ContainerClient *client );
void reset();
- int calcMergingIndex( const QString &mergingName,
+ int calcMergingIndex( const TQString &mergingName,
MergingIndexList::Iterator &it,
BuildState &state,
bool ignoreDefaultMergingIndex );
};
-typedef QPtrList<ContainerNode> ContainerNodeList;
-typedef QPtrListIterator<ContainerNode> ContainerNodeListIt;
+typedef TQPtrList<ContainerNode> ContainerNodeList;
+typedef TQPtrListIterator<ContainerNode> ContainerNodeListIt;
class KDEUI_EXPORT BuildHelper
{
@@ -184,32 +184,32 @@ public:
BuildHelper( BuildState &state,
ContainerNode *node );
- void build( const QDomElement &element );
+ void build( const TQDomElement &element );
private:
- void processElement( const QDomElement &element );
+ void processElement( const TQDomElement &element );
- void processActionOrCustomElement( const QDomElement &e, bool isActionTag );
- bool processActionElement( const QDomElement &e, int idx );
- bool processCustomElement( const QDomElement &e, int idx );
+ void processActionOrCustomElement( const TQDomElement &e, bool isActionTag );
+ bool processActionElement( const TQDomElement &e, int idx );
+ bool processCustomElement( const TQDomElement &e, int idx );
- void processStateElement( const QDomElement &element );
+ void processStateElement( const TQDomElement &element );
- void processMergeElement( const QString &tag, const QString &name, const QDomElement &e );
+ void processMergeElement( const TQString &tag, const TQString &name, const TQDomElement &e );
- void processContainerElement( const QDomElement &e, const QString &tag,
- const QString &name );
+ void processContainerElement( const TQDomElement &e, const TQString &tag,
+ const TQString &name );
- QWidget *createContainer( QWidget *parent, int index, const QDomElement &element,
+ TQWidget *createContainer( TQWidget *parent, int index, const TQDomElement &element,
int &id, KXMLGUIBuilder **builder );
- int calcMergingIndex( const QDomElement &element, MergingIndexList::Iterator &it, QString &group );
+ int calcMergingIndex( const TQDomElement &element, MergingIndexList::Iterator &it, TQString &group );
- QStringList customTags;
- QStringList containerTags;
+ TQStringList customTags;
+ TQStringList containerTags;
- QPtrList<QWidget> containerList;
+ TQPtrList<TQWidget> containerList;
ContainerClient *containerClient;
@@ -226,9 +226,9 @@ struct KDEUI_EXPORT BuildState
void reset();
- QString clientName;
+ TQString clientName;
- QString actionListName;
+ TQString actionListName;
ActionList actionList;
KXMLGUIClient *guiClient;
@@ -237,15 +237,15 @@ struct KDEUI_EXPORT BuildState
MergingIndexList::Iterator currentClientMergingIt;
KXMLGUIBuilder *builder;
- QStringList builderCustomTags;
- QStringList builderContainerTags;
+ TQStringList builderCustomTags;
+ TQStringList builderContainerTags;
KXMLGUIBuilder *clientBuilder;
- QStringList clientBuilderCustomTags;
- QStringList clientBuilderContainerTags;
+ TQStringList clientBuilderCustomTags;
+ TQStringList clientBuilderContainerTags;
};
-typedef QValueStack<BuildState> BuildStateStack;
+typedef TQValueStack<BuildState> BuildStateStack;
}
diff --git a/kdeui/qxembed.cpp b/kdeui/qxembed.cpp
index 19b4a3d19..6403f9d8a 100644
--- a/kdeui/qxembed.cpp
+++ b/kdeui/qxembed.cpp
@@ -46,12 +46,12 @@
//
-#include <qapplication.h>
-#include <qptrlist.h>
-#include <qptrdict.h>
-#include <qguardedptr.h>
-#include <qwhatsthis.h>
-#include <qfocusdata.h>
+#include <tqapplication.h>
+#include <tqptrlist.h>
+#include <tqptrdict.h>
+#include <tqguardedptr.h>
+#include <tqwhatsthis.h>
+#include <tqfocusdata.h>
// L0001: QXEmbed works only under X windows.
#ifdef Q_WS_X11
@@ -134,7 +134,7 @@ public:
xplain = false;
xgrab = false;
mapAfterRelease = false;
- lastPos = QPoint(0,0);
+ lastPos = TQPoint(0,0);
}
~QXEmbedData(){}
@@ -142,8 +142,8 @@ public:
bool xplain; // L0102: See L1100
bool xgrab; // L0103: See L2800
bool mapAfterRelease;
- QWidget* focusProxy; // L0104: See XEmbed spec
- QPoint lastPos; // L0105: See L1390
+ TQWidget* focusProxy; // L0104: See XEmbed spec
+ TQPoint lastPos; // L0105: See L1390
};
namespace
@@ -155,18 +155,18 @@ namespace
public:
QXEmbedAppFilter() { qApp->installEventFilter( this ); }
~QXEmbedAppFilter() { }
- bool eventFilter( QObject *, QEvent * );
+ bool eventFilter( TQObject *, TQEvent * );
};
}
// L0201: See L0200, L0740
static QXEmbedAppFilter* filter = 0;
// L0202: See L0610, L0730
-static QPtrDict<QGuardedPtr<QWidget> > *focusMap = 0;
+static TQPtrDict<TQGuardedPtr<TQWidget> > *focusMap = 0;
// L0203: See L0660, L1400, L1450
static XKeyEvent last_key_event;
-// L0300: This class gives access protected members of class QWidget.
+// L0300: This class gives access protected members of class TQWidget.
// Function focusData() is useful to reimplement tab focus management
// (L0620) Function topData() returns a structure QTLWExtra containing
// information unique to toplevel windows. This structure contains two
@@ -177,8 +177,8 @@ static XKeyEvent last_key_event;
class QPublicWidget : public QWidget
{
public:
- QTLWExtra* topData() { return QWidget::topData(); }
- QFocusData *focusData(){ return QWidget::focusData(); }
+ QTLWExtra* topData() { return TQWidget::topData(); }
+ TQFocusData *focusData(){ return TQWidget::focusData(); }
bool focusNextPrev(bool b) { return focusNextPrevChild(b); }
};
@@ -297,25 +297,25 @@ static void sendFocusMessage(Window window, int type, int mode, int detail)
// when this happens (L2060). This can be achieved without
// cooperation from the client.
-bool QXEmbedAppFilter::eventFilter( QObject *o, QEvent * e)
+bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e)
{
static bool obeyFocus = false;
switch ( e->type() ) {
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
// L0612: This will become clear with L0614
- if ( !((QWidget*)o)->isActiveWindow() )
+ if ( !((TQWidget*)o)->isActiveWindow() )
obeyFocus = true;
break;
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
// L0613: FocusIn events either occur because the widget already was
// active and has just been given the Qt focus (L0614) or
// because the widget already had the Qt focus and just became
// active (L0615).
if ( qApp->focusWidget() == o &&
((QPublicWidget*)qApp->focusWidget()->topLevelWidget())->topData()->embedded ) {
- QFocusEvent* fe = (QFocusEvent*) e;
- if ( obeyFocus || fe->reason() == QFocusEvent::Mouse ||
- fe->reason() == QFocusEvent::Shortcut ) {
+ TQFocusEvent* fe = (TQFocusEvent*) e;
+ if ( obeyFocus || fe->reason() == TQFocusEvent::Mouse ||
+ fe->reason() == TQFocusEvent::Shortcut ) {
// L0614: A widget in the embedded client was just given the Qt focus.
// Variable `obeyFocus' suggests that this is the result of mouse
// activity in the client. The XEMBED_REQUEST_FOCUS message causes
@@ -323,7 +323,7 @@ bool QXEmbedAppFilter::eventFilter( QObject *o, QEvent * e)
WId window = ((QPublicWidget*)qApp->focusWidget()->topLevelWidget())->topData()->parentWinId;
focusMap->remove( qApp->focusWidget()->topLevelWidget() );
sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS );
- } else if ( fe->reason() == QFocusEvent::ActiveWindow ) {
+ } else if ( fe->reason() == TQFocusEvent::ActiveWindow ) {
// L0615: Both the embedder and the embedded client became active.
// But we do not know whether the QXEmbed widget has the Qt focus.
// So we clear the Qt focus for now. If indeed the QXEmbed widget
@@ -331,7 +331,7 @@ bool QXEmbedAppFilter::eventFilter( QObject *o, QEvent * e)
// tell us to restore the focus (L0680, L0683).
focusMap->remove( qApp->focusWidget()->topLevelWidget() );
focusMap->insert( qApp->focusWidget()->topLevelWidget(),
- new QGuardedPtr<QWidget>(qApp->focusWidget()->topLevelWidget()->focusWidget() ) );
+ new TQGuardedPtr<TQWidget>(qApp->focusWidget()->topLevelWidget()->focusWidget() ) );
// L0616: qApp->focusWidget() might belong to a modal dialog and not be
// equal to qApp->focusWidget()->topLevelWidget()->focusWidget() !
qApp->focusWidget()->clearFocus();
@@ -340,7 +340,7 @@ bool QXEmbedAppFilter::eventFilter( QObject *o, QEvent * e)
obeyFocus = false;
}
break;
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
if (qApp->focusWidget() == o &&
((QPublicWidget*)qApp->focusWidget()->topLevelWidget())->topData()->embedded ) {
// L0620: The following code replaces the Qt code that
@@ -355,29 +355,29 @@ bool QXEmbedAppFilter::eventFilter( QObject *o, QEvent * e)
// messages are sent back to the embedding application
// (L0653, L0654) which then performs tab navigation
// (L2081).
- QKeyEvent *k = (QKeyEvent *)e;
- QWidget *w = qApp->focusWidget();
- // L0621: The following tests are copied from QWidget::event().
+ TQKeyEvent *k = (TQKeyEvent *)e;
+ TQWidget *w = qApp->focusWidget();
+ // L0621: The following tests are copied from TQWidget::event().
bool res = false;
bool tabForward = true;
if ( !(k->state() & ControlButton || k->state() & AltButton) ) {
if ( k->key() == Key_Backtab || (k->key() == Key_Tab && (k->state() & ShiftButton)) ) {
- QFocusEvent::setReason( QFocusEvent::Backtab );
+ TQFocusEvent::setReason( TQFocusEvent::Backtab );
res = ((QPublicWidget*)w)->focusNextPrev( tabForward = false );
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
} else if ( k->key() == Key_Tab ) {
- QFocusEvent::setReason( QFocusEvent::Tab );
+ TQFocusEvent::setReason( TQFocusEvent::Tab );
res = ((QPublicWidget*)w)->focusNextPrev( tabForward = true );
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
}
}
if (res) {
// L0625: We changed the focus because of tab/backtab key
// Now check whether we have been looping around.
- QFocusData *fd = ((QPublicWidget*)w)->focusData();
+ TQFocusData *fd = ((QPublicWidget*)w)->focusData();
WId window = ((QPublicWidget*)w->topLevelWidget())->topData()->parentWinId;
- QWidget *cw = 0;
- QWidget *fw = fd->home();
+ TQWidget *cw = 0;
+ TQWidget *fw = fd->home();
if (tabForward && window) {
while (cw != w && cw != fw && cw != w->topLevelWidget())
cw = fd->prev();
@@ -422,7 +422,7 @@ static int qxembed_x11_event_filter( XEvent* e)
// L0671: Keep Qt message time up to date
if ( msgtime > qt_x_time )
qt_x_time = msgtime;
- QWidget* w = QWidget::find( e->xclient.window );
+ TQWidget* w = TQWidget::find( e->xclient.window );
if ( !w )
break;
switch ( message) {
@@ -468,8 +468,8 @@ static int qxembed_x11_event_filter( XEvent* e)
// L0680: Embedding application gives us the focus.
{
// L0681: Search saved focus widget.
- QWidget* focusCurrent = 0;
- QGuardedPtr<QWidget>* fw = focusMap->find( w->topLevelWidget() );
+ TQWidget* focusCurrent = 0;
+ TQGuardedPtr<TQWidget>* fw = focusMap->find( w->topLevelWidget() );
if ( fw ) {
focusCurrent = *fw;
// L0682: Remove it from the map
@@ -486,19 +486,19 @@ static int qxembed_x11_event_filter( XEvent* e)
case XEMBED_FOCUS_FIRST:
{
// L0684: Search first widget in tab chain
- QFocusEvent::setReason( QFocusEvent::Tab );
+ TQFocusEvent::setReason( TQFocusEvent::Tab );
w->topLevelWidget()->setFocus();
((QPublicWidget*)w->topLevelWidget())->focusNextPrev(true);
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
}
break;
case XEMBED_FOCUS_LAST:
{
// L0686: Search last widget in tab chain
- QFocusEvent::setReason( QFocusEvent::Backtab );
+ TQFocusEvent::setReason( TQFocusEvent::Backtab );
w->topLevelWidget()->setFocus();
((QPublicWidget*)w->topLevelWidget())->focusNextPrev(false);
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
}
break;
default:
@@ -512,7 +512,7 @@ static int qxembed_x11_event_filter( XEvent* e)
// and clear the Qt focus.
if ( w->topLevelWidget()->focusWidget() ) {
focusMap->insert( w->topLevelWidget(),
- new QGuardedPtr<QWidget>(w->topLevelWidget()->focusWidget() ) );
+ new TQGuardedPtr<TQWidget>(w->topLevelWidget()->focusWidget() ) );
w->topLevelWidget()->focusWidget()->clearFocus();
}
break;
@@ -521,7 +521,7 @@ static int qxembed_x11_event_filter( XEvent* e)
}
} else if ( e->xclient.format == 32 && e->xclient.message_type ) {
if ( e->xclient.message_type == qt_wm_protocols ) {
- QWidget* w = QWidget::find( e->xclient.window );
+ TQWidget* w = TQWidget::find( e->xclient.window );
if ( !w )
break;
// L0690: This is for the embedding side!
@@ -541,8 +541,8 @@ static int qxembed_x11_event_filter( XEvent* e)
// do the job (L1310). This does not happen if the
// window is already active. So we simulate it.
if ( w->isActiveWindow() ) {
- QEvent e( QEvent::WindowActivate );
- QApplication::sendEvent( w, &e );
+ TQEvent e( TQEvent::WindowActivate );
+ TQApplication::sendEvent( w, &e );
}
}
}
@@ -576,7 +576,7 @@ void QXEmbed::initialize()
// L0720: Install low level filter for X11 events (L0650)
oldFilter = qt_set_x11_event_filter( qxembed_x11_event_filter );
// L0730: See L0610 for an explanation about focusMap.
- focusMap = new QPtrDict<QGuardedPtr<QWidget> >;
+ focusMap = new TQPtrDict<TQGuardedPtr<TQWidget> >;
focusMap->setAutoDelete( true );
// L0740: Create client side application wide event filter (L0610)
filter = new QXEmbedAppFilter;
@@ -605,8 +605,8 @@ void QXEmbed::initialize()
// L0900: Constructs a xembed widget.
-QXEmbed::QXEmbed(QWidget *parent, const char *name, WFlags f)
- : QWidget(parent, name, f)
+QXEmbed::QXEmbed(TQWidget *parent, const char *name, WFlags f)
+ : TQWidget(parent, name, f)
{
// L0901: Create private data. See L0100.
d = new QXEmbedData;
@@ -616,11 +616,11 @@ QXEmbed::QXEmbed(QWidget *parent, const char *name, WFlags f)
// whole embedding application. They compete between themselves and
// against Qt (L0690, L0914, L1040, L1310, L1510, L1580).
// This would be much simpler if implemented within Qt.
- d->focusProxy = new QWidget( topLevelWidget(), "xembed_focus" );
+ d->focusProxy = new TQWidget( topLevelWidget(), "xembed_focus" );
d->focusProxy->setGeometry( -1, -1, 1, 1 );
d->focusProxy->show();
// make sure it's shown - for XSetInputFocus
- QApplication::sendPostedEvents( d->focusProxy, 0 );
+ TQApplication::sendPostedEvents( d->focusProxy, 0 );
// L0903: Install the client side event filters
// because they also provide services for the embedder side
// See L0660, L0671, L0685.
@@ -755,14 +755,14 @@ QXEmbed::Protocol QXEmbed::protocol()
// L1200: QXEmbed widget size changes: resize embedded window.
-void QXEmbed::resizeEvent(QResizeEvent*)
+void QXEmbed::resizeEvent(TQResizeEvent*)
{
if (window)
XResizeWindow(qt_xdisplay(), window, width(), height());
}
// L1250: QXEmbed widget is shown: make sure embedded window is visible.
-void QXEmbed::showEvent(QShowEvent*)
+void QXEmbed::showEvent(TQShowEvent*)
{
if (window)
XMapRaised(qt_xdisplay(), window);
@@ -770,11 +770,11 @@ void QXEmbed::showEvent(QShowEvent*)
// L1300: This event filter sees all application events (L0913).
-bool QXEmbed::eventFilter( QObject *o, QEvent * e)
+bool QXEmbed::eventFilter( TQObject *o, TQEvent * e)
{
switch ( e->type() ) {
- case QEvent::WindowActivate:
+ case TQEvent::WindowActivate:
if ( o == topLevelWidget() ) {
// L1310: Qt thinks the application window has just been activated.
// Make sure the X11 focus is on the focus proxy window. See L0686.
@@ -790,7 +790,7 @@ bool QXEmbed::eventFilter( QObject *o, QEvent * e)
sendXEmbedMessage( window, XEMBED_WINDOW_ACTIVATE );
}
break;
- case QEvent::WindowDeactivate:
+ case TQEvent::WindowDeactivate:
if ( o == topLevelWidget() ) {
if (d->xplain)
// L1321: Activation has changed. Grab state might change. See L2800.
@@ -800,15 +800,15 @@ bool QXEmbed::eventFilter( QObject *o, QEvent * e)
sendXEmbedMessage( window, XEMBED_WINDOW_DEACTIVATE );
}
break;
- case QEvent::Move:
+ case TQEvent::Move:
{
- QWidget* pos = this;
+ TQWidget* pos = this;
while( pos != o && pos != topLevelWidget())
pos = pos->parentWidget();
if( pos == o ) {
// L1390: Send fake configure notify events whenever the
// global position of the client changes. See L2900.
- QPoint globalPos = mapToGlobal(QPoint(0,0));
+ TQPoint globalPos = mapToGlobal(TQPoint(0,0));
if (globalPos != d->lastPos) {
d->lastPos = globalPos;
sendSyntheticConfigureNotifyEvent();
@@ -823,9 +823,9 @@ bool QXEmbed::eventFilter( QObject *o, QEvent * e)
}
// L1350: ??? [why this?]
-bool QXEmbed::event( QEvent * e)
+bool QXEmbed::event( TQEvent * e)
{
- return QWidget::event( e );
+ return TQWidget::event( e );
}
// L1400: Forward keypress event to the client
@@ -834,7 +834,7 @@ bool QXEmbed::event( QEvent * e)
// The X11 event that caused the Qt key event
// must be forwarded to the client.
// See L0660.
-void QXEmbed::keyPressEvent( QKeyEvent *)
+void QXEmbed::keyPressEvent( TQKeyEvent *)
{
if (!window)
return;
@@ -845,7 +845,7 @@ void QXEmbed::keyPressEvent( QKeyEvent *)
// L1450: Forward keyrelease event to the client.
// See comment L1400.
-void QXEmbed::keyReleaseEvent( QKeyEvent *)
+void QXEmbed::keyReleaseEvent( TQKeyEvent *)
{
if (!window)
return;
@@ -854,7 +854,7 @@ void QXEmbed::keyReleaseEvent( QKeyEvent *)
}
// L1500: Handle Qt focus in event.
-void QXEmbed::focusInEvent( QFocusEvent * e ){
+void QXEmbed::focusInEvent( TQFocusEvent * e ){
if (!window)
return;
// L1510: This is a good time to set the X11 focus on the focus proxy window.
@@ -880,16 +880,16 @@ void QXEmbed::focusInEvent( QFocusEvent * e ){
// L1531: When the focus change is caused by the tab key,
// the client must select the first (or last) widget of
// its own tab chain.
- if ( e->reason() == QFocusEvent::Tab )
+ if ( e->reason() == TQFocusEvent::Tab )
detail = XEMBED_FOCUS_FIRST;
- else if ( e->reason() == QFocusEvent::Backtab )
+ else if ( e->reason() == TQFocusEvent::Backtab )
detail = XEMBED_FOCUS_LAST;
sendXEmbedMessage( window, XEMBED_FOCUS_IN, detail);
}
}
// L1550: Handle Qt focus out event.
-void QXEmbed::focusOutEvent( QFocusEvent * ){
+void QXEmbed::focusOutEvent( TQFocusEvent * ){
if (!window)
return;
if (d->xplain) {
@@ -971,7 +971,7 @@ void QXEmbed::embed(WId w)
// no longer try to manage this window.
if ( !wstate_withdrawn(window) ) {
XWithdrawWindow(qt_xdisplay(), window, qt_xscreen());
- QApplication::flushX();
+ TQApplication::flushX();
// L1711: See L1610
for (int i=0; i < 10000; ++i) {
if (wstate_withdrawn(window)) {
@@ -988,7 +988,7 @@ void QXEmbed::embed(WId w)
// time to create the embedded application main window.
Window parent = 0;
get_parent(w, &parent);
- kdDebug() << QString("> before reparent: parent=0x%1").arg(parent,0,16) << endl;
+ kdDebug() << TQString("> before reparent: parent=0x%1").arg(parent,0,16) << endl;
for (int i = 0; i < 50; i++) {
// this is done once more when finishing embedding, but it's done also here
// just in case we crash before reaching that place
@@ -996,16 +996,16 @@ void QXEmbed::embed(WId w)
XAddToSaveSet( qt_xdisplay(), w );
XReparentWindow(qt_xdisplay(), w, winId(), 0, 0);
if (get_parent(w, &parent) && parent == winId()) {
- kdDebug() << QString("> Loop %1: ").arg(i)
- << QString("> reparent of 0x%1").arg(w,0,16)
- << QString(" into 0x%1").arg(winId(),0,16)
- << QString(" successful") << endl;
+ kdDebug() << TQString("> Loop %1: ").arg(i)
+ << TQString("> reparent of 0x%1").arg(w,0,16)
+ << TQString(" into 0x%1").arg(winId(),0,16)
+ << TQString(" successful") << endl;
break;
}
- kdDebug() << QString("> Loop %1: ").arg(i)
- << QString("> reparent of 0x%1").arg(w,0,16)
- << QString(" into 0x%1").arg(winId(),0,16)
- << QString(" failed") << endl;
+ kdDebug() << TQString("> Loop %1: ").arg(i)
+ << TQString("> reparent of 0x%1").arg(w,0,16)
+ << TQString(" into 0x%1").arg(winId(),0,16)
+ << TQString(" failed") << endl;
USLEEP(1000);
}
if( parent != winId()) // failed
@@ -1030,8 +1030,8 @@ void QXEmbed::handleEmbed()
if ( parent() ) {
// L2030: embedded window might have new size requirements.
// see L2500, L2520, L2550.
- QEvent * layoutHint = new QEvent( QEvent::LayoutHint );
- QApplication::postEvent( parent(), layoutHint );
+ TQEvent * layoutHint = new TQEvent( TQEvent::LayoutHint );
+ TQApplication::postEvent( parent(), layoutHint );
}
windowChanged( window );
if (d->xplain) {
@@ -1069,11 +1069,11 @@ bool QXEmbed::focusNextPrevChild( bool next )
// the focus and pass the TAB key events to the QXEmbed widget.
// These key events will be forwarded to the client (L1400, L1450)
// who eventually will manage the tab focus (L0620) and possible
- // instruct us to call QWidget::focusNextPrevChild (L2081).
+ // instruct us to call TQWidget::focusNextPrevChild (L2081).
return false;
else
// L1920: Default behavior otherwise.
- return QWidget::focusNextPrevChild( next );
+ return TQWidget::focusNextPrevChild( next );
}
@@ -1122,9 +1122,9 @@ bool QXEmbed::x11Event( XEvent* e)
if (d->xplain && d->xgrab) {
// L2060: The passive grab has intercepted a mouse click
// in the embedded client window. Take the focus.
- QFocusEvent::setReason( QFocusEvent::Mouse );
+ TQFocusEvent::setReason( TQFocusEvent::Mouse );
setFocus();
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
// L2064: Resume X11 event processing.
XAllowEvents(qt_xdisplay(), ReplayPointer, CurrentTime);
// L2065: Qt should not know about this.
@@ -1150,13 +1150,13 @@ bool QXEmbed::x11Event( XEvent* e)
long message = e->xclient.data.l[1];
switch ( message ) {
// L2081: Tab focus management. It is very important to call the
- // focusNextPrevChild() defined by QWidget (not QXEmbed).
+ // focusNextPrevChild() defined by TQWidget (not QXEmbed).
// See L1901.
case XEMBED_FOCUS_NEXT:
- QWidget::focusNextPrevChild( true );
+ TQWidget::focusNextPrevChild( true );
break;
case XEMBED_FOCUS_PREV:
- QWidget::focusNextPrevChild( false );
+ TQWidget::focusNextPrevChild( false );
break;
// L2085: The client asks for the focus.
case XEMBED_REQUEST_FOCUS:
@@ -1164,9 +1164,9 @@ bool QXEmbed::x11Event( XEvent* e)
WId window = ((QPublicWidget*)topLevelWidget())->topData()->parentWinId;
sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS );
} else {
- QFocusEvent::setReason( QFocusEvent::Mouse );
+ TQFocusEvent::setReason( TQFocusEvent::Mouse );
setFocus();
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
}
break;
default:
@@ -1187,7 +1187,7 @@ bool QXEmbed::x11Event( XEvent* e)
// fall through, workaround for Qt 3.0 < 3.0.3
case EnterNotify:
// L2095: See L2200.
- if ( QWhatsThis::inWhatsThisMode() )
+ if ( TQWhatsThis::inWhatsThisMode() )
enterWhatsThisMode();
break;
default:
@@ -1205,7 +1205,7 @@ void QXEmbed::enterWhatsThisMode()
// cancel what-s-this mode, and use a non stantard _NET_WM_ message
// to instruct the embedded client to enter the "what's this" mode.
// This works only one way...
- QWhatsThis::leaveWhatsThisMode();
+ TQWhatsThis::leaveWhatsThisMode();
if ( !context_help )
context_help = XInternAtom( x11Display(), "_NET_WM_CONTEXT_HELP", false );
sendClientMessage(window , qt_wm_protocols, context_help );
@@ -1220,7 +1220,7 @@ void QXEmbed::windowChanged( WId )
// L2400: Utility function for clients that embed themselves.
// This is client side code.
-bool QXEmbed::processClientCmdline( QWidget* client, int& argc, char ** argv )
+bool QXEmbed::processClientCmdline( TQWidget* client, int& argc, char ** argv )
{
int myargc = argc;
WId window = 0;
@@ -1232,9 +1232,9 @@ bool QXEmbed::processClientCmdline( QWidget* client, int& argc, char ** argv )
argv[j++] = argv[i];
continue;
}
- QCString arg = argv[i];
+ TQCString arg = argv[i];
if ( !strcmp(arg,"-embed") && i < myargc-1 ) {
- QCString s = argv[++i];
+ TQCString s = argv[++i];
window = s.toInt();
} else
argv[j++] = argv[i];
@@ -1252,7 +1252,7 @@ bool QXEmbed::processClientCmdline( QWidget* client, int& argc, char ** argv )
// L2450: Utility function for clients that embed themselves.
// This is client side code.
-void QXEmbed::embedClientIntoWindow(QWidget* client, WId window)
+void QXEmbed::embedClientIntoWindow(TQWidget* client, WId window)
{
initialize();
XReparentWindow(qt_xdisplay(), client->winId(), window, 0, 0);
@@ -1268,20 +1268,20 @@ void QXEmbed::embedClientIntoWindow(QWidget* client, WId window)
// L2500: Specifies that this widget can use additional space,
// and that it can survive on less than sizeHint().
-QSizePolicy QXEmbed::sizePolicy() const
+TQSizePolicy QXEmbed::sizePolicy() const
{
- return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+ return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
}
// L2520: Returns a size sufficient for the embedded window
-QSize QXEmbed::sizeHint() const
+TQSize QXEmbed::sizeHint() const
{
return minimumSizeHint();
}
// L2550: Returns the minimum size specified by the embedded window.
-QSize QXEmbed::minimumSizeHint() const
+TQSize QXEmbed::minimumSizeHint() const
{
int minw = 0;
int minh = 0;
@@ -1295,7 +1295,7 @@ QSize QXEmbed::minimumSizeHint() const
}
}
- return QSize( minw, minh );
+ return TQSize( minw, minh );
}
// L2600: Tells what shoud be done with the embedded window when
@@ -1344,7 +1344,7 @@ void QXEmbed::sendSyntheticConfigureNotifyEvent()
// L2910: It seems that the x and y coordinates are global.
// But this is what ICCCM section 4.1.5 wants.
// See http://lists.kde.org/?l=kfm-devel&m=107090222032378
- QPoint globalPos = mapToGlobal(QPoint(0,0));
+ TQPoint globalPos = mapToGlobal(TQPoint(0,0));
if (window) {
#if 0
XConfigureEvent c;
@@ -1369,15 +1369,15 @@ void QXEmbed::sendSyntheticConfigureNotifyEvent()
}
}
-// L3000: One should not call QWidget::reparent after embedding a window.
-void QXEmbed::reparent( QWidget * parent, WFlags f, const QPoint & p, bool showIt )
+// L3000: One should not call TQWidget::reparent after embedding a window.
+void QXEmbed::reparent( TQWidget * parent, WFlags f, const TQPoint & p, bool showIt )
{
- // QWidget::reparent() destroys the old X Window for the widget, and
+ // TQWidget::reparent() destroys the old X Window for the widget, and
// creates a new one, thus QXEmbed after reparenting is no longer the
// parent of the embedded window. I think reparenting of QXEmbed can be
// done only by a mistake, so just complain.
Q_ASSERT( !window );
- QWidget::reparent( parent, f, p, showIt );
+ TQWidget::reparent( parent, f, p, showIt );
}
// for KDE
diff --git a/kdeui/qxembed.h b/kdeui/qxembed.h
index 40772d801..38aabbd77 100644
--- a/kdeui/qxembed.h
+++ b/kdeui/qxembed.h
@@ -22,7 +22,7 @@
#ifndef QXEMBED_H
#define QXEMBED_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
#ifdef Q_WS_X11
@@ -68,7 +68,7 @@ public:
* The parent, name and f arguments are passed to the QFrame
* constructor.
*/
- QXEmbed( QWidget *parent=0, const char *name=0, WFlags f = 0 );
+ QXEmbed( TQWidget *parent=0, const char *name=0, WFlags f = 0 );
/**
* Destructor. Cleans up the focus if necessary.
@@ -140,7 +140,7 @@ public:
*
* @short #processClientCmdline()
*/
- static void embedClientIntoWindow( QWidget* client, WId window );
+ static void embedClientIntoWindow( TQWidget* client, WId window );
/**
* A utility function for clients that embed theirselves. The widget
@@ -152,7 +152,7 @@ public:
*
* @see embedClientIntoWindow()
*/
- static bool processClientCmdline( QWidget* client, int& argc, char ** argv );
+ static bool processClientCmdline( TQWidget* client, int& argc, char ** argv );
/**
* Sends a WM_DELETE_WINDOW message to the embedded window. This is what
@@ -183,13 +183,13 @@ public:
bool autoDelete() const;
/* Reimp */
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
- QSizePolicy sizePolicy() const;
- bool eventFilter( QObject *, QEvent * );
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
+ TQSizePolicy sizePolicy() const;
+ bool eventFilter( TQObject *, TQEvent * );
bool customWhatsThis() const;
void enterWhatsThisMode(); // temporary, fix in Qt (Matthias, Mon Jul 17 15:20:55 CEST 2000 )
- virtual void reparent( QWidget * parent, WFlags f, const QPoint & p, bool showIt = false );
+ virtual void reparent( TQWidget * parent, WFlags f, const TQPoint & p, bool showIt = false );
signals:
/**
@@ -201,13 +201,13 @@ signals:
void embeddedWindowDestroyed();
protected:
- bool event( QEvent * );
- void keyPressEvent( QKeyEvent * );
- void keyReleaseEvent( QKeyEvent * );
- void focusInEvent( QFocusEvent * );
- void focusOutEvent( QFocusEvent * );
- void resizeEvent(QResizeEvent *);
- void showEvent( QShowEvent * );
+ bool event( TQEvent * );
+ void keyPressEvent( TQKeyEvent * );
+ void keyReleaseEvent( TQKeyEvent * );
+ void focusInEvent( TQFocusEvent * );
+ void focusOutEvent( TQFocusEvent * );
+ void resizeEvent(TQResizeEvent *);
+ void showEvent( TQShowEvent * );
bool x11Event( XEvent* );
/**
diff --git a/kdeui/tests/itemcontainertest.cpp b/kdeui/tests/itemcontainertest.cpp
index 7ad145c9e..1767bec5f 100644
--- a/kdeui/tests/itemcontainertest.cpp
+++ b/kdeui/tests/itemcontainertest.cpp
@@ -8,13 +8,13 @@
*
*/
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -56,70 +56,70 @@ static const char * item_xpm[] = {
KApplication *app;
-TopLevel::TopLevel(QWidget *parent, const char *name)
- : QWidget(parent, name)
+TopLevel::TopLevel(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
setCaption("Item container test application");
- QHBoxLayout* hBox = new QHBoxLayout( this );
- QVBoxLayout* vBox = new QVBoxLayout( hBox );
+ TQHBoxLayout* hBox = new TQHBoxLayout( this );
+ TQVBoxLayout* vBox = new TQVBoxLayout( hBox );
hBox->addSpacing( 5 );
//Selection mode selection
- m_pbgMode = new QButtonGroup( 1, Qt::Horizontal, "Selection Mode", this);
- m_pbgMode->insert(new QRadioButton("NoSlection", m_pbgMode), TopLevel::NoSelection );
- m_pbgMode->insert(new QRadioButton("Single", m_pbgMode), TopLevel::Single );
- m_pbgMode->insert(new QRadioButton("Multi", m_pbgMode), TopLevel::Multi );
- m_pbgMode->insert(new QRadioButton("Extended", m_pbgMode), TopLevel::Extended );
+ m_pbgMode = new TQButtonGroup( 1, Qt::Horizontal, "Selection Mode", this);
+ m_pbgMode->insert(new TQRadioButton("NoSlection", m_pbgMode), TopLevel::NoSelection );
+ m_pbgMode->insert(new TQRadioButton("Single", m_pbgMode), TopLevel::Single );
+ m_pbgMode->insert(new TQRadioButton("Multi", m_pbgMode), TopLevel::Multi );
+ m_pbgMode->insert(new TQRadioButton("Extended", m_pbgMode), TopLevel::Extended );
m_pbgMode->setExclusive( true );
vBox->addWidget( m_pbgMode );
- connect( m_pbgMode, SIGNAL( clicked( int ) ),
- this, SLOT( slotSwitchMode( int ) ) );
+ connect( m_pbgMode, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( slotSwitchMode( int ) ) );
//Signal labels
- QGroupBox* gbWiget = new QGroupBox( 1, Qt::Horizontal, "Widget", this);
- m_plblWidget = new QLabel( gbWiget );
+ TQGroupBox* gbWiget = new TQGroupBox( 1, Qt::Horizontal, "Widget", this);
+ m_plblWidget = new TQLabel( gbWiget );
vBox->addWidget( gbWiget );
- QGroupBox* gbSignal = new QGroupBox( 1, Qt::Horizontal, "emitted Signal", this);
- m_plblSignal = new QLabel( gbSignal );
+ TQGroupBox* gbSignal = new TQGroupBox( 1, Qt::Horizontal, "emitted Signal", this);
+ m_plblSignal = new TQLabel( gbSignal );
vBox->addWidget( gbSignal );
- QGroupBox* gbItem = new QGroupBox( 1, Qt::Horizontal, "on Item", this);
- m_plblItem = new QLabel( gbItem );
+ TQGroupBox* gbItem = new TQGroupBox( 1, Qt::Horizontal, "on Item", this);
+ m_plblItem = new TQLabel( gbItem );
vBox->addWidget( gbItem );
- QButtonGroup* bgListView = new QButtonGroup( 1, Qt::Horizontal, "KListView", this);
- QCheckBox* cbListView = new QCheckBox("Single Column", bgListView);
+ TQButtonGroup* bgListView = new TQButtonGroup( 1, Qt::Horizontal, "KListView", this);
+ TQCheckBox* cbListView = new TQCheckBox("Single Column", bgListView);
vBox->addWidget( bgListView );
- connect( cbListView, SIGNAL( toggled( bool ) ),
- this, SLOT( slotToggleSingleColumn( bool ) ) );
+ connect( cbListView, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotToggleSingleColumn( bool ) ) );
KGlobal::config()->reparseConfiguration();
//Create IconView
- QGroupBox* gbIconView = new QGroupBox( 1, Qt::Horizontal, "KIconView", this);
+ TQGroupBox* gbIconView = new TQGroupBox( 1, Qt::Horizontal, "KIconView", this);
m_pIconView = new KIconView( gbIconView );
hBox->addWidget( gbIconView );
hBox->addSpacing( 5 );
- connect( m_pIconView, SIGNAL( executed( QIconViewItem* ) ),
- this, SLOT( slotIconViewExec( QIconViewItem* ) ) );
+ connect( m_pIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ),
+ this, TQT_SLOT( slotIconViewExec( TQIconViewItem* ) ) );
//Create ListView
- QGroupBox* gbListView = new QGroupBox( 1, Qt::Horizontal, "KListView", this);
+ TQGroupBox* gbListView = new TQGroupBox( 1, Qt::Horizontal, "KListView", this);
m_pListView = new KListView( gbListView );
m_pListView->addColumn("Item");
m_pListView->addColumn("Text");
hBox->addWidget( gbListView );
hBox->addSpacing( 5 );
- connect( m_pListView, SIGNAL( executed( QListViewItem* ) ),
- this, SLOT( slotListViewExec( QListViewItem* ) ) );
+ connect( m_pListView, TQT_SIGNAL( executed( TQListViewItem* ) ),
+ this, TQT_SLOT( slotListViewExec( TQListViewItem* ) ) );
//Create ListBox
- QGroupBox* gbListBox = new QGroupBox( 1, Qt::Horizontal, "KListBox", this);
+ TQGroupBox* gbListBox = new TQGroupBox( 1, Qt::Horizontal, "KListBox", this);
m_pListBox = new KListBox( gbListBox );
hBox->addWidget( gbListBox );
- connect( m_pListBox, SIGNAL( executed( QListBoxItem* ) ),
- this, SLOT( slotListBoxExec( QListBoxItem* ) ) );
+ connect( m_pListBox, TQT_SIGNAL( executed( TQListBoxItem* ) ),
+ this, TQT_SLOT( slotListBoxExec( TQListBoxItem* ) ) );
//Initialize buttons
cbListView->setChecked( !m_pListView->allColumnsShowFocus() );
@@ -128,19 +128,19 @@ TopLevel::TopLevel(QWidget *parent, const char *name)
//Fill container widgets
for( int i = 0; i < 10; i++ ) {
- new QIconViewItem( m_pIconView, QString("Item%1").arg(i), QPixmap(item_xpm) );
+ new TQIconViewItem( m_pIconView, TQString("Item%1").arg(i), TQPixmap(item_xpm) );
- QListViewItem* lv = new QListViewItem( m_pListView, QString("Item%1").arg(i), QString("Text%1").arg(i) );
- lv->setPixmap( 0, QPixmap(item_xpm));
- lv->setPixmap( 1, QPixmap(item_xpm));
+ TQListViewItem* lv = new TQListViewItem( m_pListView, TQString("Item%1").arg(i), TQString("Text%1").arg(i) );
+ lv->setPixmap( 0, TQPixmap(item_xpm));
+ lv->setPixmap( 1, TQPixmap(item_xpm));
- new QListBoxPixmap( m_pListBox, QPixmap(item_xpm), QString("Item%1").arg(i));
+ new TQListBoxPixmap( m_pListBox, TQPixmap(item_xpm), TQString("Item%1").arg(i));
}
- connect( m_pIconView, SIGNAL( clicked( QIconViewItem* ) ),
- this, SLOT( slotClicked( QIconViewItem* ) ) );
- connect( m_pIconView, SIGNAL( doubleClicked( QIconViewItem* ) ),
- this, SLOT( slotDoubleClicked( QIconViewItem* ) ) );
+ connect( m_pIconView, TQT_SIGNAL( clicked( TQIconViewItem* ) ),
+ this, TQT_SLOT( slotClicked( TQIconViewItem* ) ) );
+ connect( m_pIconView, TQT_SIGNAL( doubleClicked( TQIconViewItem* ) ),
+ this, TQT_SLOT( slotDoubleClicked( TQIconViewItem* ) ) );
}
void TopLevel::slotSwitchMode( int id )
@@ -152,22 +152,22 @@ void TopLevel::slotSwitchMode( int id )
switch( id ) {
case TopLevel::NoSelection:
m_pIconView->setSelectionMode( KIconView::NoSelection );
- m_pListView->setSelectionMode( QListView::NoSelection );
+ m_pListView->setSelectionMode( TQListView::NoSelection );
m_pListBox->setSelectionMode( KListBox::NoSelection );
break;
case TopLevel::Single:
m_pIconView->setSelectionMode( KIconView::Single );
- m_pListView->setSelectionMode( QListView::Single );
+ m_pListView->setSelectionMode( TQListView::Single );
m_pListBox->setSelectionMode( KListBox::Single );
break;
case TopLevel::Multi:
m_pIconView->setSelectionMode( KIconView::Multi );
- m_pListView->setSelectionMode( QListView::Multi );
+ m_pListView->setSelectionMode( TQListView::Multi );
m_pListBox->setSelectionMode( KListBox::Multi );
break;
case TopLevel::Extended:
m_pIconView->setSelectionMode( KIconView::Extended );
- m_pListView->setSelectionMode( QListView::Extended );
+ m_pListView->setSelectionMode( TQListView::Extended );
m_pListBox->setSelectionMode( KListBox::Extended );
break;
default:
@@ -175,7 +175,7 @@ void TopLevel::slotSwitchMode( int id )
}
}
-void TopLevel::slotIconViewExec( QIconViewItem* item )
+void TopLevel::slotIconViewExec( TQIconViewItem* item )
{
m_plblWidget->setText("KIconView");
m_plblSignal->setText("executed");
@@ -185,7 +185,7 @@ void TopLevel::slotIconViewExec( QIconViewItem* item )
m_plblItem->setText("Viewport");
}
-void TopLevel::slotListViewExec( QListViewItem* item )
+void TopLevel::slotListViewExec( TQListViewItem* item )
{
m_plblWidget->setText("KListView");
m_plblSignal->setText("executed");
@@ -195,7 +195,7 @@ void TopLevel::slotListViewExec( QListViewItem* item )
m_plblItem->setText("Viewport");
}
-void TopLevel::slotListBoxExec( QListBoxItem* item )
+void TopLevel::slotListBoxExec( TQListBoxItem* item )
{
m_plblWidget->setText("KListBox");
m_plblSignal->setText("executed");
diff --git a/kdeui/tests/itemcontainertest.h b/kdeui/tests/itemcontainertest.h
index c6091f5e5..01f7c006c 100644
--- a/kdeui/tests/itemcontainertest.h
+++ b/kdeui/tests/itemcontainertest.h
@@ -1,7 +1,7 @@
#ifndef _ITEMCONTAINERTEST_H
#define _ITEMCONTAINERTEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KIconView;
class KListView;
@@ -14,7 +14,7 @@ class TopLevel : public QWidget
Q_OBJECT
public:
- TopLevel( QWidget *parent=0, const char *name=0 );
+ TopLevel( TQWidget *parent=0, const char *name=0 );
enum ViewID { IconView, ListView, ListBox };
enum ModeID { NoSelection, Single, Multi, Extended };
@@ -23,23 +23,23 @@ public slots:
//void slotSwitchView( int id );
void slotSwitchMode( int id );
- void slotIconViewExec( QIconViewItem* item );
- void slotListViewExec( QListViewItem* item );
- void slotListBoxExec( QListBoxItem* item );
+ void slotIconViewExec( TQIconViewItem* item );
+ void slotListViewExec( TQListViewItem* item );
+ void slotListBoxExec( TQListBoxItem* item );
void slotToggleSingleColumn( bool b );
- void slotClicked( QIconViewItem* ) { qDebug("CLICK");}
- void slotDoubleClicked( QIconViewItem* ) { qDebug("DOUBLE CLICK");}
+ void slotClicked( TQIconViewItem* ) { qDebug("CLICK");}
+ void slotDoubleClicked( TQIconViewItem* ) { qDebug("DOUBLE CLICK");}
protected:
KIconView* m_pIconView;
KListView* m_pListView;
KListBox* m_pListBox;
- QButtonGroup* m_pbgView;
- QButtonGroup* m_pbgMode;
- QLabel* m_plblWidget;
- QLabel* m_plblSignal;
- QLabel* m_plblItem;
+ TQButtonGroup* m_pbgView;
+ TQButtonGroup* m_pbgMode;
+ TQLabel* m_plblWidget;
+ TQLabel* m_plblSignal;
+ TQLabel* m_plblItem;
};
#endif
diff --git a/kdeui/tests/kaboutdialogtest.cpp b/kdeui/tests/kaboutdialogtest.cpp
index 89d25d531..ea92096b0 100644
--- a/kdeui/tests/kaboutdialogtest.cpp
+++ b/kdeui/tests/kaboutdialogtest.cpp
@@ -10,16 +10,16 @@
#include "kaboutdialog.h"
// #include <kimgio.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <kapplication.h>
#include <klocale.h>
int main(int argc, char** argv)
{
(void)new KApplication(argc, argv, "KAboutDialogTest");
- QImage logo;
- QImage bg;
- QPixmap pix;
+ TQImage logo;
+ TQImage bg;
+ TQPixmap pix;
KAboutDialog about;
// -----
// kimgioRegister();
diff --git a/kdeui/tests/kaccelgentest.cpp b/kdeui/tests/kaccelgentest.cpp
index d619bdfba..f5f95ac57 100644
--- a/kdeui/tests/kaccelgentest.cpp
+++ b/kdeui/tests/kaccelgentest.cpp
@@ -1,13 +1,13 @@
#include "kaccelgen.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <iostream>
using std::cout;
using std::endl;
-void check( const QString &what, const QStringList &expected, const QStringList &received )
+void check( const TQString &what, const TQStringList &expected, const TQStringList &received )
{
cout << "Testing " << what.latin1() << ": ";
if ( expected == received ) {
@@ -21,20 +21,20 @@ void check( const QString &what, const QStringList &expected, const QStringList
int main()
{
- QStringList input;
+ TQStringList input;
input << "foo" << "bar item" << "&baz" << "bif" << "boz" << "boz 2"
<< "yoyo && dyne";
- QStringList expected;
+ TQStringList expected;
expected << "&foo" << "bar &item" << "&baz" << "bif" << "b&oz" << "boz &2"
<< "&yoyo && dyne";
- QStringList output;
+ TQStringList output;
KAccelGen::generate( input, output );
- check( "QStringList value generation", expected, output );
+ check( "TQStringList value generation", expected, output );
- QMap<QString,QString> map;
- for (QStringList::ConstIterator it = input.begin(); it != input.end(); ++it) {
+ TQMap<TQString,TQString> map;
+ for (TQStringList::ConstIterator it = input.begin(); it != input.end(); ++it) {
map.insert(*it, *it);
}
input.sort();
diff --git a/kdeui/tests/kactiontest.cpp b/kdeui/tests/kactiontest.cpp
index 60fa334ee..ea97883c8 100644
--- a/kdeui/tests/kactiontest.cpp
+++ b/kdeui/tests/kactiontest.cpp
@@ -1,5 +1,5 @@
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kapplication.h>
#include <kaction.h>
@@ -10,15 +10,15 @@ int main( int argc, char **argv )
{
KApplication app( argc, argv, "kactiontest" );
- KActionCollection coll( static_cast<QObject *>( 0 ) );
+ KActionCollection coll( static_cast<TQObject *>( 0 ) );
- QGuardedPtr<KAction> action1 = new KRadioAction("test",0, &coll);
- QGuardedPtr<KAction> action2 = new KRadioAction("test",0, &coll);
- QGuardedPtr<KAction> action3 = new KRadioAction("test",0, &coll);
- QGuardedPtr<KAction> action4 = new KRadioAction("test",0, &coll);
- QGuardedPtr<KAction> action5 = new KRadioAction("test",0, &coll);
- QGuardedPtr<KAction> action6 = new KRadioAction("test",0, &coll);
- QGuardedPtr<KAction> action7 = new KRadioAction("test",0, &coll);
+ 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);
coll.clear();
assert( coll.isEmpty() );
diff --git a/kdeui/tests/kalphaicontest.h b/kdeui/tests/kalphaicontest.h
index 66d26e6f3..6143b569d 100644
--- a/kdeui/tests/kalphaicontest.h
+++ b/kdeui/tests/kalphaicontest.h
@@ -1,7 +1,7 @@
#include <kdebug.h>
-#include <qwidget.h>
-#include <qimage.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
#include <kimageeffect.h>
#include <kalphapainter.h>
@@ -10,11 +10,11 @@ class KAlphaTest : public QWidget
public:
KAlphaTest();
protected:
- void paintEvent(QPaintEvent *);
+ void paintEvent(TQPaintEvent *);
private:
- QImage m_image;
- QPixmap m_pixmap;
- QImage m_bg;
+ TQImage m_image;
+ TQPixmap m_pixmap;
+ TQImage m_bg;
public:
static bool m_useDblBuffer;
diff --git a/kdeui/tests/kblendtest.cpp b/kdeui/tests/kblendtest.cpp
index f12d65b2b..e2d36a575 100644
--- a/kdeui/tests/kblendtest.cpp
+++ b/kdeui/tests/kblendtest.cpp
@@ -1,33 +1,33 @@
#include "kblendtest.h"
#include <kapplication.h>
#include <kimageeffect.h>
-#include <qpainter.h>
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqpainter.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
int cols = 3, rows = 3; // how many
-KBlendWidget::KBlendWidget(QWidget *parent, const char *name)
- :QWidget(parent, name)
+KBlendWidget::KBlendWidget(TQWidget *parent, const char *name)
+ :TQWidget(parent, name)
{
bgnd = qRgb(255, 255, 255);
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
resize(image.width()*2+60, image.height()*3+80);
setBackgroundColor(bgnd);
}
-void KBlendWidget::paintEvent(QPaintEvent */*ev*/)
+void KBlendWidget::paintEvent(TQPaintEvent */*ev*/)
{
- QTime time;
+ TQTime time;
int it, ft;
- QString say;
+ TQString say;
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
- QPainter p(this);
+ TQPainter p(this);
p.setPen(Qt::black);
// you see here use of anti_dir param (blend from down to up, here)
@@ -39,7 +39,7 @@ void KBlendWidget::paintEvent(QPaintEvent */*ev*/)
p.drawImage(20, 20, image);
p.drawText(5 , 15, say);
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
// here a negative initial intensity is used (1/2 of image is unaffected)
it = time.elapsed();
@@ -49,7 +49,7 @@ void KBlendWidget::paintEvent(QPaintEvent */*ev*/)
p.drawImage(40+image.width(), 20, image);
p.drawText(15+image.width() , 15, say);
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
it = time.elapsed();
KImageEffect::blend(image, 0., bgnd, KImageEffect::DiagonalGradient,true);
@@ -58,7 +58,7 @@ void KBlendWidget::paintEvent(QPaintEvent */*ev*/)
p.drawImage(20, 40+image.height(), image);
p.drawText(5 , 35+image.height(), say);
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
it = time.elapsed();
KImageEffect::blend(image, 0.1, bgnd, KImageEffect::CrossDiagonalGradient);
@@ -67,7 +67,7 @@ void KBlendWidget::paintEvent(QPaintEvent */*ev*/)
p.drawImage(40+image.width(), 40+image.height(), image);
p.drawText(25+image.width() , 35 + image.height(), say);
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
it = time.elapsed();
KImageEffect::blend(image, -0.6, bgnd, KImageEffect::RectangleGradient);
@@ -76,7 +76,7 @@ void KBlendWidget::paintEvent(QPaintEvent */*ev*/)
p.drawImage(20, 60+2*image.height(), image);
p.drawText(5 , 55+2*image.height(), say);
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
it = time.elapsed();
KImageEffect::blend(image, 0.2, bgnd, KImageEffect::EllipticGradient);
diff --git a/kdeui/tests/kblendtest.h b/kdeui/tests/kblendtest.h
index 800f2d562..b0f4485dd 100644
--- a/kdeui/tests/kblendtest.h
+++ b/kdeui/tests/kblendtest.h
@@ -7,18 +7,18 @@
#ifndef __KBLEND_TEST_H
#define __KBLEND_TEST_H
-#include <qwidget.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqimage.h>
class KBlendWidget : public QWidget
{
public:
- KBlendWidget(QWidget *parent=0, const char *name=0);
+ KBlendWidget(TQWidget *parent=0, const char *name=0);
protected:
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
private:
- QImage image, original;
- QColor bgnd;
+ TQImage image, original;
+ TQColor bgnd;
};
#endif
diff --git a/kdeui/tests/kbuttonboxtest.cpp b/kdeui/tests/kbuttonboxtest.cpp
index d9b070bc0..1773c47f9 100644
--- a/kdeui/tests/kbuttonboxtest.cpp
+++ b/kdeui/tests/kbuttonboxtest.cpp
@@ -18,20 +18,20 @@
*/
#include <kapplication.h>
#include "kbuttonbox.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qdialog.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqdialog.h>
+#include <tqpushbutton.h>
int main(int argc, char **argv) {
KApplication a(argc, argv, "dummy");
// example 1
{
- QDialog *w = new QDialog(0, "A common dialog", true);
+ TQDialog *w = new TQDialog(0, "A common dialog", true);
w->setCaption("Example 1");
- QVBoxLayout *tl = new QVBoxLayout(w, 5);
- QLabel *l = new QLabel("A very common dialog\n\n"\
+ TQVBoxLayout *tl = new TQVBoxLayout(w, 5);
+ TQLabel *l = new TQLabel("A very common dialog\n\n"\
"OK and Cancel are left aligned, Help\n"\
"is right aligned. Try resizing\n"\
"the window!\n"
@@ -41,12 +41,12 @@ int main(int argc, char **argv) {
l->setMinimumSize(l->sizeHint());
tl->addWidget(l,1);
KButtonBox *bbox = new KButtonBox(w);
- QPushButton *b = bbox->addButton("OK");
+ TQPushButton *b = bbox->addButton("OK");
b->setDefault(true);
- w->connect(b, SIGNAL(clicked()),
- w, SLOT(accept()));
- w->connect(bbox->addButton("Cancel"), SIGNAL(clicked()),
- w, SLOT(accept()));
+ w->connect(b, TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
+ w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
bbox->addStretch(1);
bbox->addButton("Help");
@@ -59,10 +59,10 @@ int main(int argc, char **argv) {
// example 2
{
- QDialog *w = new QDialog(0, "Right aligned buttons", true);
+ TQDialog *w = new TQDialog(0, "Right aligned buttons", true);
w->setCaption("Example 2");
- QVBoxLayout *tl = new QVBoxLayout(w, 5);
- QLabel *l = new QLabel("Another common dialog\n\n"\
+ TQVBoxLayout *tl = new TQVBoxLayout(w, 5);
+ TQLabel *l = new TQLabel("Another common dialog\n\n"\
"OK and Cancel are right aligned\n"\
"Try resizing the window!", w);
l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak);
@@ -70,12 +70,12 @@ int main(int argc, char **argv) {
tl->addWidget(l,1);
KButtonBox *bbox = new KButtonBox(w);
bbox->addStretch(1);
- QPushButton *b = bbox->addButton("OK");
+ TQPushButton *b = bbox->addButton("OK");
b->setDefault(true);
- w->connect(b, SIGNAL(clicked()),
- w, SLOT(accept()));
- w->connect(bbox->addButton("Cancel"), SIGNAL(clicked()),
- w, SLOT(accept()));
+ w->connect(b, TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
+ w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
bbox->layout();
tl->addWidget(bbox,0);
tl->activate();
@@ -85,10 +85,10 @@ int main(int argc, char **argv) {
// example 3
{
- QDialog *w = new QDialog(0, "Middle aligned buttons", true);
+ TQDialog *w = new TQDialog(0, "Middle aligned buttons", true);
w->setCaption("Example 3");
- QVBoxLayout *tl = new QVBoxLayout(w, 5);
- QLabel *l = new QLabel("Another common dialog\n\n"\
+ TQVBoxLayout *tl = new TQVBoxLayout(w, 5);
+ TQLabel *l = new TQLabel("Another common dialog\n\n"\
"OK and Cancel are middle aligned\n"\
"Try resizing the window!", w);
l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak);
@@ -96,12 +96,12 @@ int main(int argc, char **argv) {
tl->addWidget(l,1);
KButtonBox *bbox = new KButtonBox(w);
bbox->addStretch(1);
- QPushButton *b = bbox->addButton("OK");
+ TQPushButton *b = bbox->addButton("OK");
b->setDefault(true);
- w->connect(b, SIGNAL(clicked()),
- w, SLOT(accept()));
- w->connect(bbox->addButton("Cancel"), SIGNAL(clicked()),
- w, SLOT(accept()));
+ w->connect(b, TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
+ w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
bbox->addStretch(1);
bbox->layout();
tl->addWidget(bbox,0);
@@ -112,10 +112,10 @@ int main(int argc, char **argv) {
// example 4
{
- QDialog *w = new QDialog(0, "Bad example", true);
+ TQDialog *w = new TQDialog(0, "Bad example", true);
w->setCaption("Example 4");
- QVBoxLayout *tl = new QVBoxLayout(w, 5);
- QLabel *l = new QLabel("A very bad example\n\n"\
+ TQVBoxLayout *tl = new TQVBoxLayout(w, 5);
+ TQLabel *l = new TQLabel("A very bad example\n\n"\
"Sometimes it's a bad idea to take\n"
"the maximum width for all buttons\n"
"since it will look ugly -- "
@@ -125,12 +125,12 @@ int main(int argc, char **argv) {
tl->addWidget(l,1);
KButtonBox *bbox = new KButtonBox(w);
bbox->addStretch(1);
- QPushButton *b = bbox->addButton("OK");
+ TQPushButton *b = bbox->addButton("OK");
b->setDefault(true);
- w->connect(b, SIGNAL(clicked()),
- w, SLOT(accept()));
- w->connect(bbox->addButton("Cancel"), SIGNAL(clicked()),
- w, SLOT(accept()));
+ w->connect(b, TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
+ w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
bbox->addButton("Push me and I give you a banana");
bbox->addStretch(1);
@@ -143,10 +143,10 @@ int main(int argc, char **argv) {
// example 5
{
- QDialog *w = new QDialog(0, "Bad example", true);
+ TQDialog *w = new TQDialog(0, "Bad example", true);
w->setCaption("Example 5");
- QVBoxLayout *tl = new QVBoxLayout(w, 5);
- QLabel *l = new QLabel("A better solution for the bad example\n\n"\
+ TQVBoxLayout *tl = new TQVBoxLayout(w, 5);
+ TQLabel *l = new TQLabel("A better solution for the bad example\n\n"\
"Use \"addButton(\"Push me and I give"
"you a banana\", true);\" to\n"
"prevent this strange effect as seen\n"
@@ -157,12 +157,12 @@ int main(int argc, char **argv) {
tl->addWidget(l,1);
KButtonBox *bbox = new KButtonBox(w);
bbox->addStretch(1);
- QPushButton *b = bbox->addButton("OK");
+ TQPushButton *b = bbox->addButton("OK");
b->setDefault(true);
- w->connect(b, SIGNAL(clicked()),
- w, SLOT(accept()));
- w->connect(bbox->addButton("Cancel"), SIGNAL(clicked()),
- w, SLOT(accept()));
+ w->connect(b, TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
+ w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
bbox->addButton("Push me and I give you a banana", true);
bbox->addStretch(1);
@@ -175,10 +175,10 @@ int main(int argc, char **argv) {
// example 6
{
- QDialog *w = new QDialog(0, "Vertical", true);
+ TQDialog *w = new TQDialog(0, "Vertical", true);
w->setCaption("Example 6 (last)");
- QHBoxLayout *tl = new QHBoxLayout(w, 5);
- QLabel *l = new QLabel("Did I mention that it's possible\n"
+ TQHBoxLayout *tl = new TQHBoxLayout(w, 5);
+ TQLabel *l = new TQLabel("Did I mention that it's possible\n"
"to make vertically aligned buttons\n"
"too?"
,w);
@@ -186,12 +186,12 @@ int main(int argc, char **argv) {
l->setMinimumSize(l->sizeHint());
tl->addWidget(l,1);
KButtonBox *bbox = new KButtonBox(w, KButtonBox::Vertical);
- QPushButton *b = bbox->addButton("OK");
+ TQPushButton *b = bbox->addButton("OK");
b->setDefault(true);
- w->connect(b, SIGNAL(clicked()),
- w, SLOT(accept()));
- w->connect(bbox->addButton("Cancel"), SIGNAL(clicked()),
- w, SLOT(accept()));
+ w->connect(b, TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
+ w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()),
+ w, TQT_SLOT(accept()));
bbox->addStretch(1);
bbox->layout();
diff --git a/kdeui/tests/kcolordlgtest.cpp b/kdeui/tests/kcolordlgtest.cpp
index b5ba68393..a7e64928d 100644
--- a/kdeui/tests/kcolordlgtest.cpp
+++ b/kdeui/tests/kcolordlgtest.cpp
@@ -24,10 +24,10 @@
int main( int argc, char *argv[] )
{
- QColor color;
+ TQColor color;
KLocale::setMainCatalogue("kdelibs");
- QApplication::setColorMode( QApplication::CustomColors );
+ TQApplication::setColorMode( TQApplication::CustomColors );
KApplication a( argc, argv, "KColorDialogTest" );
KConfig aConfig;
aConfig.setGroup( "KColorDialog-test" );
diff --git a/kdeui/tests/kcolortest.cpp b/kdeui/tests/kcolortest.cpp
index c4dd5892b..d4a5c2625 100644
--- a/kdeui/tests/kcolortest.cpp
+++ b/kdeui/tests/kcolortest.cpp
@@ -3,25 +3,25 @@
#include <kapplication.h>
#include <kimageeffect.h>
#include <stdio.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
bool fullscreen = false, oldway = false, intvsfade = false;
int max = 20; // how many steps
-KColorWidget::KColorWidget(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KColorWidget::KColorWidget(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
if (fullscreen || intvsfade) {
- QPixmap shot = QPixmap::grabWindow(QApplication::desktop()->winId());
+ TQPixmap shot = TQPixmap::grabWindow(TQApplication::desktop()->winId());
original = shot.convertToImage();
}
else
- original = QImage("testimage.png");
+ original = TQImage("testimage.png");
resize(original.width(), original.height());
}
-void KColorWidget::paintEvent(QPaintEvent *)
+void KColorWidget::paintEvent(TQPaintEvent *)
{
if(!pixmap.isNull())
bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(),
@@ -33,7 +33,7 @@ void KColorWidget::doIntensityLoop()
int count;
int start, stop;
- QTime t;
+ TQTime t;
t.start();
diff --git a/kdeui/tests/kcolortest.h b/kdeui/tests/kcolortest.h
index 52cce12cc..ac8716d59 100644
--- a/kdeui/tests/kcolortest.h
+++ b/kdeui/tests/kcolortest.h
@@ -1,19 +1,19 @@
#ifndef __KCOLORTEST_H
#define __KCOLORTEST_H
-#include <qwidget.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqimage.h>
#include <kpixmap.h>
class KColorWidget : public QWidget
{
public:
- KColorWidget(QWidget *parent=0, const char *name=0);
+ KColorWidget(TQWidget *parent=0, const char *name=0);
void doIntensityLoop();
protected:
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
private:
- QImage image, original;
+ TQImage image, original;
KPixmap pixmap;
};
diff --git a/kdeui/tests/kcomboboxtest.cpp b/kdeui/tests/kcomboboxtest.cpp
index 2eb1f73e0..44b849b44 100644
--- a/kdeui/tests/kcomboboxtest.cpp
+++ b/kdeui/tests/kcomboboxtest.cpp
@@ -13,18 +13,18 @@
#include <kiconloader.h>
#include <ksimpleconfig.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qtimer.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqtimer.h>
-KComboBoxTest::KComboBoxTest(QWidget* widget, const char* name )
- :QWidget(widget, name)
+KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name )
+ :TQWidget(widget, name)
{
- QVBoxLayout *vbox = new QVBoxLayout (this, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout *vbox = new TQVBoxLayout (this, KDialog::marginHint(), KDialog::spacingHint());
// Test for KCombo's KLineEdit destruction
KComboBox *testCombo = new KComboBox( true, this ); // rw, with KLineEdit
@@ -33,90 +33,90 @@ KComboBoxTest::KComboBoxTest(QWidget* widget, const char* name )
delete testCombo; // not needed anymore
// Qt combobox
- QHBox* hbox = new QHBox(this);
+ TQHBox* hbox = new TQHBox(this);
hbox->setSpacing (KDialog::spacingHint());
- QLabel* lbl = new QLabel("&QCombobox:", hbox);
- lbl->setSizePolicy (QSizePolicy::Maximum, QSizePolicy::Preferred);
+ TQLabel* lbl = new TQLabel("&QCombobox:", hbox);
+ lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred);
- m_qc = new QComboBox(hbox, "QtReadOnlyCombo" );
+ m_qc = new TQComboBox(hbox, "QtReadOnlyCombo" );
lbl->setBuddy (m_qc);
- QObject::connect (m_qc, SIGNAL(activated(int)), SLOT(slotActivated(int)));
- QObject::connect (m_qc, SIGNAL(activated(const QString&)), SLOT (slotActivated(const QString&)));
+ TQObject::connect (m_qc, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
+ TQObject::connect (m_qc, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT (slotActivated(const TQString&)));
vbox->addWidget (hbox);
// Read-only combobox
- hbox = new QHBox(this);
+ hbox = new TQHBox(this);
hbox->setSpacing (KDialog::spacingHint());
- lbl = new QLabel("&Read-Only Combo:", hbox);
- lbl->setSizePolicy (QSizePolicy::Maximum, QSizePolicy::Preferred);
+ lbl = new TQLabel("&Read-Only Combo:", hbox);
+ lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred);
m_ro = new KComboBox(hbox, "ReadOnlyCombo" );
lbl->setBuddy (m_ro);
m_ro->setCompletionMode( KGlobalSettings::CompletionAuto );
- QObject::connect (m_ro, SIGNAL(activated(int)), SLOT(slotActivated(int)));
- QObject::connect (m_ro, SIGNAL(activated(const QString&)), SLOT (slotActivated(const QString&)));
+ TQObject::connect (m_ro, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
+ TQObject::connect (m_ro, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT (slotActivated(const TQString&)));
vbox->addWidget (hbox);
// Read-write combobox
- hbox = new QHBox(this);
+ hbox = new TQHBox(this);
hbox->setSpacing (KDialog::spacingHint());
- lbl = new QLabel("&Editable Combo:", hbox);
- lbl->setSizePolicy (QSizePolicy::Maximum, QSizePolicy::Preferred);
+ lbl = new TQLabel("&Editable Combo:", hbox);
+ lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred);
m_rw = new KComboBox( true, hbox, "ReadWriteCombo" );
lbl->setBuddy (m_rw);
m_rw->setDuplicatesEnabled( true );
- m_rw->setInsertionPolicy( QComboBox::NoInsertion );
+ m_rw->setInsertionPolicy( TQComboBox::NoInsertion );
m_rw->setTrapReturnKey( true );
- QObject::connect (m_rw, SIGNAL(activated(int)), SLOT(slotActivated(int)));
- QObject::connect (m_rw, SIGNAL(activated(const QString&)), SLOT(slotActivated(const QString&)));
- QObject::connect (m_rw, SIGNAL(returnPressed()), SLOT(slotReturnPressed()));
- QObject::connect (m_rw, SIGNAL(returnPressed(const QString&)), SLOT(slotReturnPressed(const QString&)));
+ TQObject::connect (m_rw, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
+ TQObject::connect (m_rw, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotActivated(const TQString&)));
+ TQObject::connect (m_rw, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed()));
+ TQObject::connect (m_rw, TQT_SIGNAL(returnPressed(const TQString&)), TQT_SLOT(slotReturnPressed(const TQString&)));
vbox->addWidget (hbox);
// History combobox...
- hbox = new QHBox(this);
+ hbox = new TQHBox(this);
hbox->setSpacing (KDialog::spacingHint());
- lbl = new QLabel("&History Combo:", hbox);
- lbl->setSizePolicy (QSizePolicy::Maximum, QSizePolicy::Preferred);
+ lbl = new TQLabel("&History Combo:", hbox);
+ lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred);
m_hc = new KHistoryCombo( true, hbox, "HistoryCombo" );
lbl->setBuddy (m_hc);
m_hc->setDuplicatesEnabled( true );
- m_hc->setInsertionPolicy( QComboBox::NoInsertion );
- QObject::connect (m_hc, SIGNAL(activated(int)), SLOT(slotActivated(int)));
- QObject::connect (m_hc, SIGNAL(activated(const QString&)), SLOT(slotActivated(const QString&)));
- QObject::connect (m_hc, SIGNAL(returnPressed()), SLOT(slotReturnPressed()));
+ m_hc->setInsertionPolicy( TQComboBox::NoInsertion );
+ TQObject::connect (m_hc, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
+ TQObject::connect (m_hc, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotActivated(const TQString&)));
+ TQObject::connect (m_hc, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed()));
vbox->addWidget (hbox);
m_hc->setTrapReturnKey(true);
// Read-write combobox that is a replica of code in konqueror...
- hbox = new QHBox(this);
+ hbox = new TQHBox(this);
hbox->setSpacing (KDialog::spacingHint());
- lbl = new QLabel( "&Konq's Combo:", hbox);
- lbl->setSizePolicy (QSizePolicy::Maximum, QSizePolicy::Preferred);
+ lbl = new TQLabel( "&Konq's Combo:", hbox);
+ lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred);
m_konqc = new KComboBox( true, hbox, "KonqyCombo" );
lbl->setBuddy (m_konqc);
m_konqc->setMaxCount( 10 );
- QObject::connect (m_konqc, SIGNAL(activated(int)), SLOT(slotActivated(int)));
- QObject::connect (m_konqc, SIGNAL(activated(const QString&)), SLOT (slotActivated(const QString&)));
- QObject::connect (m_konqc, SIGNAL(returnPressed()), SLOT(slotReturnPressed()));
+ TQObject::connect (m_konqc, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
+ TQObject::connect (m_konqc, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT (slotActivated(const TQString&)));
+ TQObject::connect (m_konqc, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed()));
vbox->addWidget (hbox);
// Create an exit button
- hbox = new QHBox (this);
- m_btnExit = new QPushButton( "E&xit", hbox );
- QObject::connect( m_btnExit, SIGNAL(clicked()), SLOT(quitApp()) );
+ hbox = new TQHBox (this);
+ m_btnExit = new TQPushButton( "E&xit", hbox );
+ TQObject::connect( m_btnExit, TQT_SIGNAL(clicked()), TQT_SLOT(quitApp()) );
// Create a disable button...
- m_btnEnable = new QPushButton( "Disa&ble", hbox );
- QObject::connect (m_btnEnable, SIGNAL(clicked()), SLOT(slotDisable()));
+ m_btnEnable = new TQPushButton( "Disa&ble", hbox );
+ TQObject::connect (m_btnEnable, TQT_SIGNAL(clicked()), TQT_SLOT(slotDisable()));
vbox->addWidget (hbox);
// Popuplate the select-only list box
- QStringList list;
+ TQStringList list;
list << "Stone" << "Tree" << "Peables" << "Ocean" << "Sand" << "Chips"
<< "Computer" << "Mankind";
list.sort();
@@ -145,12 +145,12 @@ KComboBoxTest::KComboBoxTest(QWidget* widget, const char* name )
s_pCompletion->setCompletionMode( KGlobalSettings::completionMode() );
m_konqc->setCompletionObject( s_pCompletion );
- QPixmap pix = SmallIcon("www");
+ TQPixmap pix = SmallIcon("www");
m_konqc->insertItem( pix, "http://www.kde.org" );
m_konqc->setCurrentItem( m_konqc->count()-1 );
- m_timer = new QTimer (this);
- connect (m_timer, SIGNAL (timeout()), SLOT (slotTimeout()));
+ m_timer = new TQTimer (this);
+ connect (m_timer, TQT_SIGNAL (timeout()), TQT_SLOT (slotTimeout()));
}
KComboBoxTest::~KComboBoxTest()
@@ -195,7 +195,7 @@ void KComboBoxTest::slotActivated( int index )
kdDebug() << "Activated Combo: " << sender()->name() << ", index:" << index << endl;
}
-void KComboBoxTest::slotActivated (const QString& item)
+void KComboBoxTest::slotActivated (const TQString& item)
{
kdDebug() << "Activated Combo: " << sender()->name() << ", item: " << item << endl;
}
@@ -205,7 +205,7 @@ void KComboBoxTest::slotReturnPressed ()
kdDebug() << "Return Pressed: " << sender()->name() << endl;
}
-void KComboBoxTest::slotReturnPressed(const QString& item)
+void KComboBoxTest::slotReturnPressed(const TQString& item)
{
kdDebug() << "Return Pressed, value = " << item << endl;
}
diff --git a/kdeui/tests/kcomboboxtest.h b/kdeui/tests/kcomboboxtest.h
index 8c2a463b6..3321b7f43 100644
--- a/kdeui/tests/kcomboboxtest.h
+++ b/kdeui/tests/kcomboboxtest.h
@@ -1,7 +1,7 @@
#ifndef _KCOMBOBOXTEST_H
#define _KCOMBOBOXTEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QTimer;
class QComboBox;
@@ -14,7 +14,7 @@ class KComboBoxTest : public QWidget
Q_OBJECT
public:
- KComboBoxTest ( QWidget *parent=0, const char *name=0 );
+ KComboBoxTest ( TQWidget *parent=0, const char *name=0 );
~KComboBoxTest();
private slots:
@@ -22,12 +22,12 @@ private slots:
void slotTimeout();
void slotDisable();
void slotReturnPressed();
- void slotReturnPressed(const QString&);
+ void slotReturnPressed(const TQString&);
void slotActivated( int );
- void slotActivated( const QString& );
+ void slotActivated( const TQString& );
protected:
- QComboBox* m_qc;
+ TQComboBox* m_qc;
KComboBox* m_ro;
KComboBox* m_rw;
@@ -35,10 +35,10 @@ protected:
KComboBox* m_konqc;
- QPushButton* m_btnExit;
- QPushButton* m_btnEnable;
+ TQPushButton* m_btnExit;
+ TQPushButton* m_btnEnable;
- QTimer* m_timer;
+ TQTimer* m_timer;
};
#endif
diff --git a/kdeui/tests/kcompletiontest.cpp b/kdeui/tests/kcompletiontest.cpp
index e04fdfc22..a0eba1bfd 100644
--- a/kdeui/tests/kcompletiontest.cpp
+++ b/kdeui/tests/kcompletiontest.cpp
@@ -9,14 +9,14 @@
****************************************************************************/
#include "kcompletiontest.h"
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <klineedit.h>
@@ -25,23 +25,23 @@
* Constructs a Form1 which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-Form1::Form1( QWidget* parent, const char* name )
- : QWidget( parent, name, WDestructiveClose )
+Form1::Form1( TQWidget* parent, const char* name )
+ : TQWidget( parent, name, WDestructiveClose )
{
if ( !name )
setName( "Form1" );
resize( 559, 465 );
setCaption( "Form1" );
- Form1Layout = new QVBoxLayout( this );
+ Form1Layout = new TQVBoxLayout( this );
Form1Layout->setSpacing( 6 );
Form1Layout->setMargin( 11 );
- GroupBox1 = new QGroupBox( this, "GroupBox1" );
+ GroupBox1 = new TQGroupBox( this, "GroupBox1" );
GroupBox1->setTitle( "Completion Test" );
GroupBox1->setColumnLayout(0, Qt::Vertical );
GroupBox1->layout()->setSpacing( 0 );
GroupBox1->layout()->setMargin( 0 );
- GroupBox1Layout = new QVBoxLayout( GroupBox1->layout() );
+ GroupBox1Layout = new TQVBoxLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
GroupBox1Layout->setSpacing( 6 );
GroupBox1Layout->setMargin( 11 );
@@ -54,7 +54,7 @@ Form1::Form1( QWidget* parent, const char* name )
Layout1->setSpacing( 6 );
Layout1->setMargin( 0 );
- TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
+ TextLabel1 = new TQLabel( GroupBox1, "TextLabel1" );
TextLabel1->setText( "Completion" );
Layout1->addWidget( TextLabel1 );
@@ -64,7 +64,7 @@ Form1::Form1( QWidget* parent, const char* name )
edit->completionObject()->setItems( defaultItems() );
edit->completionObject()->setIgnoreCase( true );
edit->setFocus();
- QToolTip::add( edit, "right-click to change completion mode" );
+ TQToolTip::add( edit, "right-click to change completion mode" );
Layout2 = new QHBoxLayout;
Layout2->setSpacing( 6 );
@@ -74,29 +74,29 @@ Form1::Form1( QWidget* parent, const char* name )
combo->setCompletionObject( edit->completionObject() );
// combo->setMaxCount( 5 );
combo->setHistoryItems( defaultItems(), true );
- connect( combo, SIGNAL( activated( const QString& )),
- combo, SLOT( addToHistory( const QString& )));
- QToolTip::add( combo, "KHistoryCombo" );
+ connect( combo, TQT_SIGNAL( activated( const TQString& )),
+ combo, TQT_SLOT( addToHistory( const TQString& )));
+ TQToolTip::add( combo, "KHistoryCombo" );
Layout2->addWidget( combo );
LineEdit1 = new KLineEdit( GroupBox1, "LineEdit1" );
Layout2->addWidget( LineEdit1 );
- PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
+ PushButton1 = new TQPushButton( GroupBox1, "PushButton1" );
PushButton1->setText( "Add" );
- connect( PushButton1, SIGNAL( clicked() ), SLOT( slotAdd() ));
+ connect( PushButton1, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAdd() ));
Layout2->addWidget( PushButton1 );
Layout9->addLayout( Layout2 );
Layout3 = new QHBoxLayout;
Layout3->setSpacing( 6 );
Layout3->setMargin( 0 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
Layout3->addItem( spacer );
- PushButton1_4 = new QPushButton( GroupBox1, "PushButton1_4" );
+ PushButton1_4 = new TQPushButton( GroupBox1, "PushButton1_4" );
PushButton1_4->setText( "Remove" );
- connect( PushButton1_4, SIGNAL( clicked() ), SLOT( slotRemove() ));
+ connect( PushButton1_4, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemove() ));
Layout3->addWidget( PushButton1_4 );
Layout9->addLayout( Layout3 );
@@ -104,25 +104,25 @@ Form1::Form1( QWidget* parent, const char* name )
Layout8->setSpacing( 6 );
Layout8->setMargin( 0 );
- ListBox1 = new QListBox( GroupBox1, "ListBox1" );
+ ListBox1 = new TQListBox( GroupBox1, "ListBox1" );
Layout8->addWidget( ListBox1 );
- connect( ListBox1, SIGNAL( highlighted( const QString& )),
- SLOT( slotHighlighted( const QString& )));
- QToolTip::add( ListBox1, "Contains the contents of the completion object.\n:x is the weighting, i.e. how often an item has been inserted");
+ connect( ListBox1, TQT_SIGNAL( highlighted( const TQString& )),
+ TQT_SLOT( slotHighlighted( const TQString& )));
+ TQToolTip::add( ListBox1, "Contains the contents of the completion object.\n:x is the weighting, i.e. how often an item has been inserted");
Layout7 = new QVBoxLayout;
Layout7->setSpacing( 6 );
Layout7->setMargin( 0 );
- PushButton1_3 = new QPushButton( GroupBox1, "PushButton1_3" );
+ PushButton1_3 = new TQPushButton( GroupBox1, "PushButton1_3" );
PushButton1_3->setText( "Completion items" );
- connect( PushButton1_3, SIGNAL( clicked() ), SLOT( slotList() ));
+ connect( PushButton1_3, TQT_SIGNAL( clicked() ), TQT_SLOT( slotList() ));
Layout7->addWidget( PushButton1_3 );
- PushButton1_2 = new QPushButton( GroupBox1, "PushButton1_2" );
+ PushButton1_2 = new TQPushButton( GroupBox1, "PushButton1_2" );
PushButton1_2->setText( "Clear" );
- connect( PushButton1_2, SIGNAL( clicked() ),
- edit->completionObject(), SLOT( clear() ));
+ connect( PushButton1_2, TQT_SIGNAL( clicked() ),
+ edit->completionObject(), TQT_SLOT( clear() ));
Layout7->addWidget( PushButton1_2 );
Layout8->addLayout( Layout7 );
Layout9->addLayout( Layout8 );
@@ -145,8 +145,8 @@ void Form1::slotAdd()
qDebug("** adding: %s", LineEdit1->text().latin1() );
edit->completionObject()->addItem( LineEdit1->text() );
- QStringList matches = edit->completionObject()->allMatches("S");
- QStringList::ConstIterator it = matches.begin();
+ TQStringList matches = edit->completionObject()->allMatches("S");
+ TQStringList::ConstIterator it = matches.begin();
for ( ; it != matches.end(); ++it )
qDebug("-- %s", (*it).latin1());
}
@@ -159,11 +159,11 @@ void Form1::slotRemove()
void Form1::slotList()
{
ListBox1->clear();
- QStringList items = edit->completionObject()->items();
+ TQStringList items = edit->completionObject()->items();
ListBox1->insertStringList( items );
}
-void Form1::slotHighlighted( const QString& text )
+void Form1::slotHighlighted( const TQString& text )
{
// remove any "weighting"
int index = text.findRev( ':' );
@@ -174,9 +174,9 @@ void Form1::slotHighlighted( const QString& text )
}
-QStringList Form1::defaultItems() const
+TQStringList Form1::defaultItems() const
{
- QStringList items;
+ TQStringList items;
items << "Super" << "Sushi" << "Samson" << "Sucks" << "Sumo" << "Schumi";
items << "Slashdot" << "sUpEr" << "SUshi" << "sUshi" << "sUShi";
items << "sushI" << "SushI";
diff --git a/kdeui/tests/kcompletiontest.h b/kdeui/tests/kcompletiontest.h
index e2f5a2bee..f40a6292d 100644
--- a/kdeui/tests/kcompletiontest.h
+++ b/kdeui/tests/kcompletiontest.h
@@ -9,9 +9,9 @@
#ifndef FORM1_H
#define FORM1_H
-#include <qstringlist.h>
-#include <qvariant.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqvariant.h>
+#include <tqwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
@@ -30,17 +30,17 @@ class Form1 : public QWidget
Q_OBJECT
public:
- Form1( QWidget* parent = 0, const char* name = 0 );
+ Form1( TQWidget* parent = 0, const char* name = 0 );
~Form1();
- QGroupBox* GroupBox1;
- QLabel* TextLabel1;
+ TQGroupBox* GroupBox1;
+ TQLabel* TextLabel1;
KLineEdit* LineEdit1;
- QPushButton* PushButton1;
- QPushButton* PushButton1_4;
- QListBox* ListBox1;
- QPushButton* PushButton1_3;
- QPushButton* PushButton1_2;
+ TQPushButton* PushButton1;
+ TQPushButton* PushButton1_4;
+ TQListBox* ListBox1;
+ TQPushButton* PushButton1_3;
+ TQPushButton* PushButton1_2;
KLineEdit* edit;
KHistoryCombo *combo;
@@ -49,19 +49,19 @@ protected slots:
void slotList();
void slotAdd();
void slotRemove();
- void slotHighlighted( const QString& );
+ void slotHighlighted( const TQString& );
protected:
- QStringList defaultItems() const;
+ TQStringList defaultItems() const;
- QVBoxLayout* Form1Layout;
- QVBoxLayout* GroupBox1Layout;
- QVBoxLayout* Layout9;
- QHBoxLayout* Layout1;
- QHBoxLayout* Layout2;
- QHBoxLayout* Layout3;
- QHBoxLayout* Layout8;
- QVBoxLayout* Layout7;
+ TQVBoxLayout* Form1Layout;
+ TQVBoxLayout* GroupBox1Layout;
+ TQVBoxLayout* Layout9;
+ TQHBoxLayout* Layout1;
+ TQHBoxLayout* Layout2;
+ TQHBoxLayout* Layout3;
+ TQHBoxLayout* Layout8;
+ TQVBoxLayout* Layout7;
};
#endif // FORM1_H
diff --git a/kdeui/tests/kdatepicktest.cpp b/kdeui/tests/kdatepicktest.cpp
index eeef5945f..c982dbe91 100644
--- a/kdeui/tests/kdatepicktest.cpp
+++ b/kdeui/tests/kdatepicktest.cpp
@@ -1,5 +1,5 @@
#include "kdatepicker.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <klocale.h>
diff --git a/kdeui/tests/kdatewidgettest.cpp b/kdeui/tests/kdatewidgettest.cpp
index d58037960..8550ab363 100644
--- a/kdeui/tests/kdatewidgettest.cpp
+++ b/kdeui/tests/kdatewidgettest.cpp
@@ -1,5 +1,5 @@
#include "kdatewidget.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <klocale.h>
diff --git a/kdeui/tests/kdesattest.cpp b/kdeui/tests/kdesattest.cpp
index 803e2e0ee..28f7d4cf2 100644
--- a/kdeui/tests/kdesattest.cpp
+++ b/kdeui/tests/kdesattest.cpp
@@ -1,21 +1,21 @@
#include "kdesattest.h"
#include <kapplication.h>
#include <kimageeffect.h>
-#include <qpainter.h>
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqpainter.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
int cols = 3, rows = 3; // how many
-KDesatWidget::KDesatWidget(QWidget *parent, const char *name)
- :QWidget(parent, name)
+KDesatWidget::KDesatWidget(TQWidget *parent, const char *name)
+ :TQWidget(parent, name)
{
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
slide = new KDoubleNumInput(700, this, "desat");
slide->setRange(0, 1, 0.001);
slide->setLabel("Desaturate: ", AlignVCenter | AlignLeft);
- connect(slide,SIGNAL(valueChanged(double)), this, SLOT(change(double)));
+ connect(slide,TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(change(double)));
resize(image.width()*2, image.height() + slide->height());
slide->setGeometry(0, image.height(), image.width()*2, slide->height());
@@ -26,19 +26,19 @@ void KDesatWidget::change(double) {
repaint(false);
}
-void KDesatWidget::paintEvent(QPaintEvent */*ev*/)
+void KDesatWidget::paintEvent(TQPaintEvent */*ev*/)
{
- QTime time;
+ TQTime time;
int it, ft;
- QString say;
+ TQString say;
- QPainter p(this);
+ TQPainter p(this);
p.setPen(Qt::black);
// original image
time.start();
it = time.elapsed();
- image = QImage("testimage.png");
+ image = TQImage("testimage.png");
p.drawImage(0, 0, image);
ft = time.elapsed();
say.setNum( ft - it); say += " ms, Vertical";
diff --git a/kdeui/tests/kdesattest.h b/kdeui/tests/kdesattest.h
index 71a51c0be..67329d578 100644
--- a/kdeui/tests/kdesattest.h
+++ b/kdeui/tests/kdesattest.h
@@ -7,24 +7,24 @@
#ifndef __KBLEND_TEST_H
#define __KBLEND_TEST_H
-#include <qwidget.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqimage.h>
#include <knuminput.h>
class KDesatWidget : public QWidget
{
Q_OBJECT
public:
- KDesatWidget(QWidget *parent=0, const char *name=0);
+ KDesatWidget(TQWidget *parent=0, const char *name=0);
public slots:
void change(double);
protected:
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
private:
float desat_value;
- QImage image;
+ TQImage image;
KDoubleNumInput *slide;
};
diff --git a/kdeui/tests/kdialogbasetest.cpp b/kdeui/tests/kdialogbasetest.cpp
index 998e10d02..5e62115fa 100644
--- a/kdeui/tests/kdialogbasetest.cpp
+++ b/kdeui/tests/kdialogbasetest.cpp
@@ -1,14 +1,14 @@
#include <kapplication.h>
#include <kdialogbase.h>
-#include <qstring.h>
-#include <qtextview.h>
+#include <tqstring.h>
+#include <tqtextview.h>
int main(int argc, char** argv)
{
KApplication app(argc, argv, "DialogBaseTest");
// -----
- QString text= // the explanation shown by the example dialog
+ TQString text= // the explanation shown by the example dialog
"<center><h1>DialogBase Example</h1></center><hr><br>"
"This example shows the usage of the <i>DialogBase</i> class. "
"<i>DialogBase</i> is the KDE user interface class used to create "
@@ -34,7 +34,7 @@ int main(int argc, char** argv)
"not have to take care about launching the help viewer, just set the "
"help file and topic and of course copy it to your documentation "
"directory during the program installation.";
- /* Create the dialog object. DialogBase is derived from QDialog, but
+ /* Create the dialog object. DialogBase is derived from TQDialog, but
you do not need to derive it to create a nice-looking dialog. Mostly,
you already have a widget class representing the core of your dialog,
and you only need to add a frame around it and the default buttons.
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
"will of course only pop up if you correctly installed kdebase. */
// I disabled it, as khcclient did not run for me.
// dialog.setHelp("kdehelp/intro.html", "", "");
- /* This QTextView is intended to be the main widget of our dialog. The
+ /* This TQTextView is intended to be the main widget of our dialog. The
main widget is placed inside the dialogs frame, with the buttons below
it. You do not have to take care about the size handling, but it is a
good idea to set the main wigdets minimum size, since the sizes Qt and
@@ -55,7 +55,7 @@ int main(int argc, char** argv)
It is important that your main widget is created with the dialog object
as its parent! */
- QTextView view(text, QString::null, &dialog);
+ TQTextView view(text, TQString::null, &dialog);
//view.setMinimumSize(400, view.heightForWidth(400)+20);
view.setMinimumSize( 250, 300 );
dialog.setMainWidget(&view);
@@ -65,7 +65,7 @@ int main(int argc, char** argv)
help chapter may cause a need for adjustment since it modifies the height
of the upper frame. */
dialog.resize(dialog.minimumSize());
- /* The dialog object is used just as any other QDialog: */
+ /* The dialog object is used just as any other TQDialog: */
if(dialog.exec())
{
qDebug("Accepted.");
diff --git a/kdeui/tests/kdocktest.cpp b/kdeui/tests/kdocktest.cpp
index c6df63ddb..84895c414 100644
--- a/kdeui/tests/kdocktest.cpp
+++ b/kdeui/tests/kdocktest.cpp
@@ -3,10 +3,10 @@
#include <kapplication.h>
#include <kiconloader.h>
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
-DockTest::DockTest( QWidget* parent )
+DockTest::DockTest( TQWidget* parent )
: KDockArea( parent )
{
m_blueDock = createDockWidget( "Blue Widget", SmallIcon("mail") );
@@ -17,7 +17,7 @@ DockTest::DockTest( QWidget* parent )
m_blueDock->setHeader( header );
m_blueDock->setCaption( "Blue" );
m_blueDock->setGeometry( 50, 50, 100, 100 );
- QWidget *l = new QWidget( m_blueDock );
+ TQWidget *l = new TQWidget( m_blueDock );
l->setBackgroundColor( Qt::blue );
l->setMinimumSize( 100,100 );
m_blueDock->setWidget( l );
@@ -31,7 +31,7 @@ DockTest::DockTest( QWidget* parent )
m_redDock->setHeader( header );
m_redDock->setCaption( "Red" );
m_redDock->setGeometry( 50, 50, 100, 100 );
- l = new QWidget( m_redDock );
+ l = new TQWidget( m_redDock );
l->setBackgroundColor( Qt::red );
l->setMinimumSize( 100,100 );
m_redDock->setWidget( l );
@@ -44,7 +44,7 @@ DockTest::DockTest( QWidget* parent )
// m_yellowDock->setHeader( header );
m_yellowDock->setCaption( "Yellow" );
m_yellowDock->setGeometry( 50, 50, 100, 100 );
- l = new QWidget( m_yellowDock );
+ l = new TQWidget( m_yellowDock );
l->setBackgroundColor( Qt::yellow );
l->setMinimumSize( 100,100 );
m_yellowDock->setWidget( l );
diff --git a/kdeui/tests/kdocktest.h b/kdeui/tests/kdocktest.h
index 906e3bd22..6efbeed57 100644
--- a/kdeui/tests/kdocktest.h
+++ b/kdeui/tests/kdocktest.h
@@ -8,7 +8,7 @@ class DockTest : public KDockArea
{
Q_OBJECT
public:
- DockTest( QWidget* parent=0 );
+ DockTest( TQWidget* parent=0 );
private:
KDockWidget* m_blueDock;
diff --git a/kdeui/tests/kdockwidgetdemo.cpp b/kdeui/tests/kdockwidgetdemo.cpp
index e0ff60897..15b83d14e 100644
--- a/kdeui/tests/kdockwidgetdemo.cpp
+++ b/kdeui/tests/kdockwidgetdemo.cpp
@@ -1,23 +1,23 @@
#include "kdockwidgetdemo.h"
-#include <qheader.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qtextview.h>
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qmultilineedit.h>
-#include <qevent.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qpoint.h>
-#include <qmessagebox.h>
-#include <qmime.h>
-#include <qstrlist.h>
-#include <qpainter.h>
+#include <tqheader.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqtextview.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqmultilineedit.h>
+#include <tqevent.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqpoint.h>
+#include <tqmessagebox.h>
+#include <tqmime.h>
+#include <tqstrlist.h>
+#include <tqpainter.h>
#include <kconfig.h>
#include <kapplication.h>
@@ -78,21 +78,21 @@ static const char *preview_xpm[] = {
"OOOOOOOOOOOOOOOO"
};
-SFileDialog::SFileDialog( QString initially, const QStringList& filter, const char* name )
-:QDialog(0L,name,true)
+SFileDialog::SFileDialog( TQString initially, const TQStringList& filter, const char* name )
+:TQDialog(0L,name,true)
{
KConfig* config = kapp->config();
- config->setGroup( QString::fromLatin1("SFileDialogData:") + name );
+ config->setGroup( TQString::fromLatin1("SFileDialogData:") + name );
if ( initially.isNull() ){
- initially = config->readPathEntry( "InitiallyDir", QDir::currentDirPath() );
+ initially = config->readPathEntry( "InitiallyDir", TQDir::currentDirPath() );
}
- QStringList bookmark;
+ TQStringList bookmark;
bookmark = config->readListEntry( "Bookmarks" );
dockManager = new KDockManager(this);
- d_dirView = new KDockWidget( dockManager, "Dock_DirView", QPixmap(dir_tree_xpm) );
+ d_dirView = new KDockWidget( dockManager, "Dock_DirView", TQPixmap(dir_tree_xpm) );
d_dirView->setCaption("Tree");
dirView = new DirectoryView( d_dirView, 0 );
@@ -103,21 +103,21 @@ SFileDialog::SFileDialog( QString initially, const QStringList& filter, const ch
Directory* root = new Directory( dirView, "/" );
root->setOpen(true);
- d_preview = new KDockWidget( dockManager, "Dock_Preview", QPixmap(preview_xpm) );
+ d_preview = new KDockWidget( dockManager, "Dock_Preview", TQPixmap(preview_xpm) );
d_preview->setCaption("Preview");
preview = new Preview( d_preview );
d_preview->setWidget( preview );
- d_fd = new KDockWidget( dockManager, "Dock_QFileDialog", QPixmap(), this );
+ d_fd = new KDockWidget( dockManager, "Dock_QFileDialog", TQPixmap(), this );
fd = new CustomFileDialog( d_fd );
fd->setDir( initially );
fd->setFilters( filter );
fd->setBookmark( bookmark );
- fd->reparent(d_fd, QPoint(0,0));
+ fd->reparent(d_fd, TQPoint(0,0));
d_fd->setWidget( fd );
- connect( dirView, SIGNAL( folderSelected( const QString & ) ), fd, SLOT( setDir2( const QString & ) ) );
- connect( fd, SIGNAL( dirEntered( const QString & ) ), dirView, SLOT( setDir( const QString & ) ) );
+ connect( dirView, TQT_SIGNAL( folderSelected( const TQString & ) ), fd, TQT_SLOT( setDir2( const TQString & ) ) );
+ connect( fd, TQT_SIGNAL( dirEntered( const TQString & ) ), dirView, TQT_SLOT( setDir( const TQString & ) ) );
d_fd->setDockSite( KDockWidget::DockTop|KDockWidget::DockLeft|KDockWidget::DockRight|KDockWidget::DockBottom );
d_fd->setEnableDocking(KDockWidget::DockNone);
@@ -128,30 +128,30 @@ SFileDialog::SFileDialog( QString initially, const QStringList& filter, const ch
d_dirView->manualDock( d_fd, KDockWidget::DockLeft, 20 );
d_preview->manualDock( d_fd, KDockWidget::DockBottom, 70 );
- connect(fd, SIGNAL(fileHighlighted(const QString&)), preview, SLOT(showPreview(const QString&)));
- connect(fd, SIGNAL(signalDone(int)), this, SLOT(done(int)));
+ connect(fd, TQT_SIGNAL(fileHighlighted(const TQString&)), preview, TQT_SLOT(showPreview(const TQString&)));
+ connect(fd, TQT_SIGNAL(signalDone(int)), this, TQT_SLOT(done(int)));
- connect(fd, SIGNAL(dirEntered(const QString&)), this, SLOT(changeDir(const QString&)));
- connect(dirView, SIGNAL(folderSelected(const QString&)), this, SLOT(changeDir(const QString&)));
+ connect(fd, TQT_SIGNAL(dirEntered(const TQString&)), this, TQT_SLOT(changeDir(const TQString&)));
+ connect(dirView, TQT_SIGNAL(folderSelected(const TQString&)), this, TQT_SLOT(changeDir(const TQString&)));
- b_tree = new QToolButton( fd );
- QToolTip::add( b_tree, "Show/Hide Tree" );
- b_tree->setPixmap( QPixmap( dir_tree_xpm ) );
- connect( b_tree, SIGNAL(clicked()), d_dirView, SLOT(changeHideShowState()) );
+ b_tree = new TQToolButton( fd );
+ TQToolTip::add( b_tree, "Show/Hide Tree" );
+ b_tree->setPixmap( TQPixmap( dir_tree_xpm ) );
+ connect( b_tree, TQT_SIGNAL(clicked()), d_dirView, TQT_SLOT(changeHideShowState()) );
b_tree->setToggleButton(true);
b_tree->setOn(true);
fd->addToolButton( b_tree, true );
- b_preview = new QToolButton( fd );
- QToolTip::add( b_preview, "Show/Hide Preview" );
- b_preview->setPixmap( QPixmap( preview_xpm ) );
- connect( b_preview, SIGNAL(clicked()), d_preview, SLOT(changeHideShowState()) );
+ b_preview = new TQToolButton( fd );
+ TQToolTip::add( b_preview, "Show/Hide Preview" );
+ b_preview->setPixmap( TQPixmap( preview_xpm ) );
+ connect( b_preview, TQT_SIGNAL(clicked()), d_preview, TQT_SLOT(changeHideShowState()) );
b_preview->setToggleButton(true);
b_preview->setOn(true);
fd->addToolButton( b_preview );
- connect( dockManager, SIGNAL(change()), this, SLOT(dockChange()));
- connect( dockManager, SIGNAL(setDockDefaultPos(KDockWidget*)), this, SLOT(setDockDefaultPos(KDockWidget*)));
+ connect( dockManager, TQT_SIGNAL(change()), this, TQT_SLOT(dockChange()));
+ connect( dockManager, TQT_SIGNAL(setDockDefaultPos(KDockWidget*)), this, TQT_SLOT(setDockDefaultPos(KDockWidget*)));
setCaption("Open File");
resize(550,450);
qDebug("read config");
@@ -167,7 +167,7 @@ void SFileDialog::dockChange()
SFileDialog::~SFileDialog()
{
KConfig* config = kapp->config();
- config->setGroup( QString("SFileDialogData:") + name() );
+ config->setGroup( TQString("SFileDialogData:") + name() );
config->writeEntry( "Bookmarks", fd->getBookmark() );
qDebug("write config");
@@ -185,103 +185,103 @@ void SFileDialog::setDockDefaultPos( KDockWidget* d )
}
}
-void SFileDialog::changeDir( const QString& f )
+void SFileDialog::changeDir( const TQString& f )
{
if ( !f.isEmpty() ){
KConfig* config = kapp->config();
- config->setGroup( QString("SFileDialogData:") + name() );
+ config->setGroup( TQString("SFileDialogData:") + name() );
config->writePathEntry( "InitiallyDir", f );
}
}
-QString SFileDialog::getOpenFileName( QString initially,
- const QStringList& filter,
- const QString caption, const char* name )
+TQString SFileDialog::getOpenFileName( TQString initially,
+ const TQStringList& filter,
+ const TQString caption, const char* name )
{
SFileDialog* fd = new SFileDialog( initially, filter, name );
if ( !caption.isNull() ) fd->setCaption( caption );
- QString result = ( fd->exec() == QDialog::Accepted ) ? fd->fd->selectedFile():QString::null;
+ TQString result = ( fd->exec() == TQDialog::Accepted ) ? fd->fd->selectedFile():TQString::null;
delete fd;
return result;
}
-QStringList SFileDialog::getOpenFileNames( QString initially,
- const QStringList& filter,
- const QString caption, const char* name )
+TQStringList SFileDialog::getOpenFileNames( TQString initially,
+ const TQStringList& filter,
+ const TQString caption, const char* name )
{
SFileDialog* fd = new SFileDialog( initially, filter, name );
if ( !caption.isNull() ) fd->setCaption( caption );
- fd->fd->setMode( QFileDialog::ExistingFiles );
+ fd->fd->setMode( TQFileDialog::ExistingFiles );
fd->d_preview->undock();
fd->b_preview->hide();
fd->exec();
- QStringList result = fd->fd->selectedFiles();
+ TQStringList result = fd->fd->selectedFiles();
delete fd;
return result;
}
-void SFileDialog::showEvent( QShowEvent *e )
+void SFileDialog::showEvent( TQShowEvent *e )
{
- QDialog::showEvent( e );
+ TQDialog::showEvent( e );
dirView->setDir( fd->dirPath() );
}
/******************************************************************************************************/
-PixmapView::PixmapView( QWidget *parent )
-:QScrollView( parent )
+PixmapView::PixmapView( TQWidget *parent )
+:TQScrollView( parent )
{
// kimgioRegister();
viewport()->setBackgroundMode( PaletteBase );
}
-void PixmapView::setPixmap( const QPixmap &pix )
+void PixmapView::setPixmap( const TQPixmap &pix )
{
pixmap = pix;
resizeContents( pixmap.size().width(), pixmap.size().height() );
viewport()->repaint( true );
}
-void PixmapView::drawContents( QPainter *p, int, int, int, int )
+void PixmapView::drawContents( TQPainter *p, int, int, int, int )
{
p->drawPixmap( 0, 0, pixmap );
}
-Preview::Preview( QWidget *parent )
-:QWidgetStack( parent )
+Preview::Preview( TQWidget *parent )
+:TQWidgetStack( parent )
{
- normalText = new QMultiLineEdit( this );
+ normalText = new TQMultiLineEdit( this );
normalText->setReadOnly( true );
- html = new QTextView( this );
+ html = new TQTextView( this );
pixmap = new PixmapView( this );
raiseWidget( normalText );
}
-void Preview::showPreview( const QString &str )
+void Preview::showPreview( const TQString &str )
{
- QUrl u(str);
+ TQUrl u(str);
if ( u.isLocalFile() ){
- QString path = u.path();
- QFileInfo fi( path );
+ TQString path = u.path();
+ TQFileInfo fi( path );
if ( fi.isFile() && (int)fi.size() > 400 * 1024 ) {
normalText->setText( tr( "The File\n%1\nis too large, so I don't show it!" ).arg( path ) );
raiseWidget( normalText );
return;
}
- QPixmap pix( path );
+ TQPixmap pix( path );
if ( pix.isNull() ) {
if ( fi.isFile() ) {
- QFile f( path );
+ TQFile f( path );
if ( f.open( IO_ReadOnly ) ) {
- QTextStream ts( &f );
- QString text = ts.read();
+ TQTextStream ts( &f );
+ TQString text = ts.read();
f.close();
if ( fi.extension().lower().contains( "htm" ) ) {
- QString url = html->mimeSourceFactory()->makeAbsolute( path, html->context() );
+ TQString url = html->mimeSourceFactory()->makeAbsolute( path, html->context() );
html->setText( text, url );
raiseWidget( html );
return;
@@ -292,7 +292,7 @@ void Preview::showPreview( const QString &str )
}
}
}
- normalText->setText( QString::null );
+ normalText->setText( TQString::null );
raiseWidget( normalText );
} else {
pixmap->setPixmap( pix );
@@ -394,37 +394,37 @@ static const char* globalbookmark_xpm[]={
"............",
"............"};
-CustomFileDialog::CustomFileDialog( QWidget* parent )
-: QFileDialog( parent, 0, false )
+CustomFileDialog::CustomFileDialog( TQWidget* parent )
+: TQFileDialog( parent, 0, false )
{
- QToolButton *p = new QToolButton( this );
+ TQToolButton *p = new TQToolButton( this );
- p->setPixmap( QPixmap( globalbookmark_xpm ) );
- QToolTip::add( p, tr( "Bookmarks" ) );
+ p->setPixmap( TQPixmap( globalbookmark_xpm ) );
+ TQToolTip::add( p, tr( "Bookmarks" ) );
- bookmarkMenu = new QPopupMenu( this );
- connect( bookmarkMenu, SIGNAL( activated( int ) ), this, SLOT( bookmarkChosen( int ) ) );
+ bookmarkMenu = new TQPopupMenu( this );
+ connect( bookmarkMenu, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( bookmarkChosen( int ) ) );
addId = bookmarkMenu->insertItem( "Add bookmark" );
- clearId = bookmarkMenu->insertItem( QPixmap(folder_trash), "Clear bookmarks" );
+ clearId = bookmarkMenu->insertItem( TQPixmap(folder_trash), "Clear bookmarks" );
bookmarkMenu->insertSeparator();
p->setPopup( bookmarkMenu );
p->setPopupDelay(0);
addToolButton( p, true );
- QToolButton *b = new QToolButton( this );
- QToolTip::add( b, tr( "Go Home!" ) );
+ TQToolButton *b = new TQToolButton( this );
+ TQToolTip::add( b, tr( "Go Home!" ) );
- b->setPixmap( QPixmap( homepage_xpm ) );
- connect( b, SIGNAL( clicked() ), this, SLOT( goHome() ) );
+ b->setPixmap( TQPixmap( homepage_xpm ) );
+ connect( b, TQT_SIGNAL( clicked() ), this, TQT_SLOT( goHome() ) );
addToolButton( b );
}
-void CustomFileDialog::setBookmark( QStringList &s )
+void CustomFileDialog::setBookmark( TQStringList &s )
{
- QStringList::Iterator it = s.begin();
+ TQStringList::Iterator it = s.begin();
for ( ; it != s.end(); ++it ){
bookmarkList << (*it);
@@ -449,7 +449,7 @@ void CustomFileDialog::setBookmark( QStringList &s )
"............",
"............",
"............"};
- bookmarkMenu->insertItem( QIconSet( book_pix ), (*it) );
+ bookmarkMenu->insertItem( TQIconSet( book_pix ), (*it) );
}
}
@@ -457,7 +457,7 @@ CustomFileDialog::~CustomFileDialog()
{
}
-void CustomFileDialog::setDir2( const QString &s )
+void CustomFileDialog::setDir2( const TQString &s )
{
blockSignals( true );
setDir( s );
@@ -499,7 +499,7 @@ void CustomFileDialog::bookmarkChosen( int i )
"............",
"............",
"............"};
- bookmarkMenu->insertItem( QIconSet( book_pix ), dirPath() );
+ bookmarkMenu->insertItem( TQIconSet( book_pix ), dirPath() );
return;
}
@@ -606,37 +606,37 @@ static const char* folder_locked_xpm[] = {
"################"
};
-Directory::Directory( Directory * parent, const QString& filename )
-:QListViewItem( parent ), f(filename)
+Directory::Directory( Directory * parent, const TQString& filename )
+:TQListViewItem( parent ), f(filename)
{
p = parent;
- readable = QDir( fullName() ).isReadable();
+ readable = TQDir( fullName() ).isReadable();
if ( !readable )
- setPixmap( 0, QPixmap( folder_locked_xpm ) );
+ setPixmap( 0, TQPixmap( folder_locked_xpm ) );
else
- setPixmap( 0, QPixmap( folder_closed_xpm ) );
+ setPixmap( 0, TQPixmap( folder_closed_xpm ) );
}
-Directory::Directory( QListView * parent, const QString& filename )
-:QListViewItem( parent ), f(filename)
+Directory::Directory( TQListView * parent, const TQString& filename )
+:TQListViewItem( parent ), f(filename)
{
p = 0;
- readable = QDir( fullName() ).isReadable();
+ readable = TQDir( fullName() ).isReadable();
}
void Directory::setOpen( bool o )
{
if ( o )
- setPixmap( 0, QPixmap( folder_open_xpm ) );
+ setPixmap( 0, TQPixmap( folder_open_xpm ) );
else
- setPixmap( 0, QPixmap( folder_closed_xpm ) );
+ setPixmap( 0, TQPixmap( folder_closed_xpm ) );
if ( o && !childCount() ){
- QString s( fullName() );
- QDir thisDir( s );
+ TQString s( fullName() );
+ TQDir thisDir( s );
if ( !thisDir.isReadable() ) {
readable = false;
setExpandable( false );
@@ -647,7 +647,7 @@ void Directory::setOpen( bool o )
const QFileInfoList * files = thisDir.entryInfoList();
if ( files ){
QFileInfoListIterator it( *files );
- QFileInfo * f;
+ TQFileInfo * f;
while( (f=it.current()) != 0 ){
++it;
if ( f->fileName() != "." && f->fileName() != ".." && f->isDir() )
@@ -656,20 +656,20 @@ void Directory::setOpen( bool o )
}
listView()->setUpdatesEnabled( true );
}
- QListViewItem::setOpen( o );
+ TQListViewItem::setOpen( o );
}
void Directory::setup()
{
setExpandable( true );
- QListViewItem::setup();
+ TQListViewItem::setup();
}
-QString Directory::fullName()
+TQString Directory::fullName()
{
- QString s;
+ TQString s;
if ( p ) {
s = p->fullName();
s.append( f.name() );
@@ -681,7 +681,7 @@ QString Directory::fullName()
}
-QString Directory::text( int column ) const
+TQString Directory::text( int column ) const
{
if ( column == 0 )
return f.name();
@@ -692,28 +692,28 @@ QString Directory::text( int column ) const
return "Unreadable Directory";
}
-DirectoryView::DirectoryView( QWidget *parent, const char *name )
-:QListView( parent, name )
+DirectoryView::DirectoryView( TQWidget *parent, const char *name )
+:TQListView( parent, name )
{
- connect( this, SIGNAL( clicked( QListViewItem * ) ),
- this, SLOT( slotFolderSelected( QListViewItem * ) ) );
- connect( this, SIGNAL( doubleClicked( QListViewItem * ) ),
- this, SLOT( slotFolderSelected( QListViewItem * ) ) );
- connect( this, SIGNAL( returnPressed( QListViewItem * ) ),
- this, SLOT( slotFolderSelected( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( clicked( TQListViewItem * ) ),
+ this, TQT_SLOT( slotFolderSelected( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ this, TQT_SLOT( slotFolderSelected( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
+ this, TQT_SLOT( slotFolderSelected( TQListViewItem * ) ) );
setAcceptDrops( true );
viewport()->setAcceptDrops( true );
}
-void DirectoryView::setOpen( QListViewItem* i, bool b )
+void DirectoryView::setOpen( TQListViewItem* i, bool b )
{
- QListView::setOpen(i,b);
+ TQListView::setOpen(i,b);
setCurrentItem(i);
slotFolderSelected(i);
}
-void DirectoryView::slotFolderSelected( QListViewItem *i )
+void DirectoryView::slotFolderSelected( TQListViewItem *i )
{
if ( !i ) return;
@@ -721,9 +721,9 @@ void DirectoryView::slotFolderSelected( QListViewItem *i )
emit folderSelected( dir->fullName() );
}
-QString DirectoryView::fullPath(QListViewItem* item)
+TQString DirectoryView::fullPath(TQListViewItem* item)
{
- QString fullpath = item->text(0);
+ TQString fullpath = item->text(0);
while ( (item=item->parent()) ) {
if ( item->parent() )
fullpath = item->text(0) + "/" + fullpath;
@@ -733,17 +733,17 @@ QString DirectoryView::fullPath(QListViewItem* item)
return fullpath;
}
-void DirectoryView::setDir( const QString &s )
+void DirectoryView::setDir( const TQString &s )
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
++it;
for ( ; it.current(); ++it ) {
it.current()->setOpen( false );
}
- QStringList lst( QStringList::split( "/", s ) );
- QListViewItem *item = firstChild();
- QStringList::Iterator it2 = lst.begin();
+ TQStringList lst( TQStringList::split( "/", s ) );
+ TQListViewItem *item = firstChild();
+ TQStringList::Iterator it2 = lst.begin();
for ( ; it2 != lst.end(); ++it2 ) {
while ( item ) {
if ( item->text( 0 ) == *it2 ) {
@@ -760,7 +760,7 @@ void DirectoryView::setDir( const QString &s )
}
}
-QString DirectoryView::selectedDir()
+TQString DirectoryView::selectedDir()
{
Directory *dir = (Directory*)currentItem();
return dir->fullName();
@@ -777,14 +777,14 @@ int main(int argc, char* argv[]) {
#endif
#if 0
- qDebug ( SFileDialog::getOpenFileName( QString::null, QString::fromLatin1("All (*)"),
- QString::fromLatin1("DockWidget Demo"), "dialog1" ) );
+ qDebug ( SFileDialog::getOpenFileName( TQString::null, TQString::fromLatin1("All (*)"),
+ TQString::fromLatin1("DockWidget Demo"), "dialog1" ) );
#endif
#if 1
- QStringList s = SFileDialog::getOpenFileNames( QString::null, QString::fromLatin1("All (*)"),
- QString::fromLatin1("DockWidget Demo"), "dialog1" );
- QStringList::Iterator it = s.begin();
+ TQStringList s = SFileDialog::getOpenFileNames( TQString::null, TQString::fromLatin1("All (*)"),
+ TQString::fromLatin1("DockWidget Demo"), "dialog1" );
+ TQStringList::Iterator it = s.begin();
for ( ; it != s.end(); ++it ){
qDebug( "%s", (*it).local8Bit().data() );
}
diff --git a/kdeui/tests/kdockwidgetdemo.h b/kdeui/tests/kdockwidgetdemo.h
index e81162eb0..37d31b137 100644
--- a/kdeui/tests/kdockwidgetdemo.h
+++ b/kdeui/tests/kdockwidgetdemo.h
@@ -3,18 +3,18 @@
#include <kdockwidget.h>
-#include <qdialog.h>
-#include <qlistview.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
-#include <qscrollview.h>
-#include <qfiledialog.h>
-#include <qwidgetstack.h>
-#include <qvbox.h>
-#include <qurl.h>
-#include <qpixmap.h>
+#include <tqdialog.h>
+#include <tqlistview.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
+#include <tqscrollview.h>
+#include <tqfiledialog.h>
+#include <tqwidgetstack.h>
+#include <tqvbox.h>
+#include <tqurl.h>
+#include <tqpixmap.h>
class QMultiLineEdit;
class QTextView;
@@ -32,26 +32,26 @@ class SFileDialog : public QDialog
{Q_OBJECT
public:
- SFileDialog( QString initially = QString::null,
- const QStringList& filter = "All Files ( * )", const char* name = 0 );
+ SFileDialog( TQString initially = TQString::null,
+ const TQStringList& filter = "All Files ( * )", const char* name = 0 );
~SFileDialog();
- static QString getOpenFileName( QString initially = QString::null,
- const QStringList& filter = "All Files ( * )",
- const QString caption = QString::null, const char* name = 0 );
+ static TQString getOpenFileName( TQString initially = TQString::null,
+ const TQStringList& filter = "All Files ( * )",
+ const TQString caption = TQString::null, const char* name = 0 );
- static QStringList getOpenFileNames( QString initially = QString::null,
- const QStringList& filter = "All Files ( * )",
- const QString caption = QString::null, const char* name = 0 );
+ static TQStringList getOpenFileNames( TQString initially = TQString::null,
+ const TQStringList& filter = "All Files ( * )",
+ const TQString caption = TQString::null, const char* name = 0 );
protected:
- void showEvent( QShowEvent *e );
+ void showEvent( TQShowEvent *e );
protected slots:
void dockChange();
void setDockDefaultPos( KDockWidget* );
- void changeDir( const QString& );
+ void changeDir( const TQString& );
private:
DirectoryView* dirView;
@@ -63,25 +63,25 @@ private:
KDockWidget* d_preview;
KDockWidget* d_fd;
- QToolButton *b_tree;
- QToolButton *b_preview;
+ TQToolButton *b_tree;
+ TQToolButton *b_preview;
};
/******************************************************************************************************/
class Directory : public QListViewItem
{
public:
- Directory( QListView * parent, const QString& filename );
- Directory( Directory * parent, const QString& filename );
+ Directory( TQListView * parent, const TQString& filename );
+ Directory( Directory * parent, const TQString& filename );
- QString text( int column ) const;
+ TQString text( int column ) const;
- QString fullName();
+ TQString fullName();
void setOpen( bool );
void setup();
private:
- QFile f;
+ TQFile f;
Directory * p;
bool readable;
};
@@ -89,61 +89,61 @@ private:
class DirectoryView : public QListView
{Q_OBJECT
public:
- DirectoryView( QWidget *parent = 0, const char *name = 0 );
- virtual void setOpen ( QListViewItem *, bool );
+ DirectoryView( TQWidget *parent = 0, const char *name = 0 );
+ virtual void setOpen ( TQListViewItem *, bool );
- QString selectedDir();
+ TQString selectedDir();
public slots:
- void setDir( const QString & );
+ void setDir( const TQString & );
signals:
- void folderSelected( const QString & );
+ void folderSelected( const TQString & );
protected slots:
- void slotFolderSelected( QListViewItem * );
+ void slotFolderSelected( TQListViewItem * );
private:
- QString fullPath(QListViewItem* item);
+ TQString fullPath(TQListViewItem* item);
};
/******************************************************************************************************/
class PixmapView : public QScrollView
{Q_OBJECT
public:
- PixmapView( QWidget *parent );
- void setPixmap( const QPixmap &pix );
- void drawContents( QPainter *p, int, int, int, int );
+ PixmapView( TQWidget *parent );
+ void setPixmap( const TQPixmap &pix );
+ void drawContents( TQPainter *p, int, int, int, int );
private:
- QPixmap pixmap;
+ TQPixmap pixmap;
};
class Preview : public QWidgetStack
{Q_OBJECT
public:
- Preview( QWidget *parent );
+ Preview( TQWidget *parent );
public slots:
- void showPreview( const QString& );
+ void showPreview( const TQString& );
private:
- QMultiLineEdit *normalText;
- QTextView *html;
+ TQMultiLineEdit *normalText;
+ TQTextView *html;
PixmapView *pixmap;
};
class CustomFileDialog : public QFileDialog
{Q_OBJECT
public:
- CustomFileDialog( QWidget* parent );
+ CustomFileDialog( TQWidget* parent );
~CustomFileDialog();
- void addToolButton( QButton * b, bool separator = false ){ QFileDialog::addToolButton(b,separator); }
- void setBookmark( QStringList& );
- QStringList getBookmark(){ return bookmarkList; }
+ void addToolButton( TQButton * b, bool separator = false ){ TQFileDialog::addToolButton(b,separator); }
+ void setBookmark( TQStringList& );
+ TQStringList getBookmark(){ return bookmarkList; }
public slots:
- void setDir2( const QString & );
+ void setDir2( const TQString & );
signals:
void signalDone( int );
@@ -154,8 +154,8 @@ protected slots:
virtual void done( int );
private:
- QPopupMenu *bookmarkMenu;
- QStringList bookmarkList;
+ TQPopupMenu *bookmarkMenu;
+ TQStringList bookmarkList;
int addId, clearId;
};
diff --git a/kdeui/tests/kdockwidgettest.cpp b/kdeui/tests/kdockwidgettest.cpp
index bf1fb272d..08a7e42b3 100644
--- a/kdeui/tests/kdockwidgettest.cpp
+++ b/kdeui/tests/kdockwidgettest.cpp
@@ -14,13 +14,13 @@
#include "kdockwidgettest.h"
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kiconloader.h>
#include <kstatusbar.h>
#include <kmenubar.h>
#include <ktoolbar.h>
-#include <qvbox.h>
+#include <tqvbox.h>
static const char*folder[]={
"16 16 9 1",
@@ -54,7 +54,7 @@ static const char*folder[]={
DockApplication::DockApplication( const char* name )
: KDockMainWindow( 0L, name )
{
- QPixmap p(folder);
+ TQPixmap p(folder);
initMenuBar();
initToolBars();
@@ -64,7 +64,7 @@ DockApplication::DockApplication( const char* name )
dock = createDockWidget( "Green Widget", p );
dock->setCaption("Green");
dock->setGeometry(50, 50, 100, 100);
- l = new QWidget(dock);
+ l = new TQWidget(dock);
l->setBackgroundColor(green);
l->setMinimumSize(100,100);
dock->setWidget(l);
@@ -75,7 +75,7 @@ DockApplication::DockApplication( const char* name )
setView( dock1 );
setMainDockWidget( dock1 );
- mainW = new QWidget( dock1, "createdOnBlueDock" );
+ mainW = new TQWidget( dock1, "createdOnBlueDock" );
mainW->setBackgroundColor(blue);
mainW->setMinimumSize(300,150);
dock1->setWidget( mainW );
@@ -88,7 +88,7 @@ DockApplication::DockApplication( const char* name )
/* test set new header widget...*/
// dock2->setHeader( new KDockWidgetHeader(dock2) );
- QWidget* l2 = new QWidget(dock2);
+ TQWidget* l2 = new TQWidget(dock2);
l2->setBackgroundColor(yellow);
dock2->setWidget( l2 );
/*****************************************************/
@@ -117,29 +117,29 @@ DockApplication::DockApplication( const char* name )
- QPushButton* b1 = new QPushButton(mainW);
+ TQPushButton* b1 = new TQPushButton(mainW);
b1->setGeometry(10, 10, 250, 25);
b1->setText("write dock config");
- connect(b1, SIGNAL(clicked()), SLOT(wConfig()));
+ connect(b1, TQT_SIGNAL(clicked()), TQT_SLOT(wConfig()));
- QPushButton* b2 = new QPushButton(mainW);
+ TQPushButton* b2 = new TQPushButton(mainW);
b2->setGeometry(10, 35, 250, 25);
b2->setText("read dock config");
- connect(b2, SIGNAL(clicked()), SLOT(rConfig()));
+ connect(b2, TQT_SIGNAL(clicked()), TQT_SLOT(rConfig()));
- m_bname = new QPushButton(mainW);
+ m_bname = new TQPushButton(mainW);
m_bname->setGeometry(10, 60, 250, 25);
m_bname->setEnabled( false );
- QPushButton *b3 = new QPushButton(mainW);
+ TQPushButton *b3 = new TQPushButton(mainW);
b3->setGeometry(10,95,250,25);
b3->setText("change the icon of the green widget");
- connect(b3,SIGNAL(clicked()), SLOT(gSetPix1()));
+ connect(b3,TQT_SIGNAL(clicked()), TQT_SLOT(gSetPix1()));
- QPushButton *b4 = new QPushButton(mainW);
+ TQPushButton *b4 = new TQPushButton(mainW);
b4->setGeometry(10,130,250,25);
b4->setText("remove icon ");
- connect(b4,SIGNAL(clicked()), SLOT(gSetPix2()));
+ connect(b4,TQT_SIGNAL(clicked()), TQT_SLOT(gSetPix2()));
setGeometry(200, 100, 500, 300);
@@ -167,14 +167,14 @@ void DockApplication::wConfig()
void DockApplication::initMenuBar()
{
- QPixmap p(folder);
- QPopupMenu *file_menu = new QPopupMenu();
+ TQPixmap p(folder);
+ TQPopupMenu *file_menu = new TQPopupMenu();
- file_menu->insertItem(p, "Change Green Widget Caption", this, SLOT(cap()) );
+ file_menu->insertItem(p, "Change Green Widget Caption", this, TQT_SLOT(cap()) );
file_menu->insertSeparator();
- file_menu->insertItem(p, "Set Green Widget as MainDockWidget", this, SLOT(greenMain()) );
- file_menu->insertItem(p, "Set Blue Widget as MainDockWidget", this, SLOT(blueMain()) );
- file_menu->insertItem(p, "Set NULL as MainDockWidget", this, SLOT(nullMain()) );
+ file_menu->insertItem(p, "Set Green Widget as MainDockWidget", this, TQT_SLOT(greenMain()) );
+ file_menu->insertItem(p, "Set Blue Widget as MainDockWidget", this, TQT_SLOT(blueMain()) );
+ file_menu->insertItem(p, "Set NULL as MainDockWidget", this, TQT_SLOT(nullMain()) );
KMenuBar* menu_bar = menuBar();
menu_bar->insertItem( "&Test", file_menu );
@@ -183,7 +183,7 @@ void DockApplication::initMenuBar()
void DockApplication::initToolBars()
{
- QPixmap p(folder);
+ TQPixmap p(folder);
KToolBar* tool_bar_0 = toolBar(0);
tool_bar_0->setFullSize(false);
tool_bar_0->insertButton( p, 1 );
@@ -226,7 +226,7 @@ void DockApplication::nullMain()
void DockApplication::updateButton()
{
if ( getMainDockWidget() )
- m_bname->setText(QString("MainDockWidget is %1").arg(getMainDockWidget()->name()));
+ m_bname->setText(TQString("MainDockWidget is %1").arg(getMainDockWidget()->name()));
else
m_bname->setText("MainDockWidget is NULL");
}
diff --git a/kdeui/tests/kdockwidgettest.h b/kdeui/tests/kdockwidgettest.h
index 70d75877c..f5905262f 100644
--- a/kdeui/tests/kdockwidgettest.h
+++ b/kdeui/tests/kdockwidgettest.h
@@ -17,8 +17,8 @@
#include <kdockwidget.h>
#include <kdockwidget_p.h>
-#include <qtabwidget.h>
-#include <qlabel.h>
+#include <tqtabwidget.h>
+#include <tqlabel.h>
class QPushButton;
class DockApplication : public KDockMainWindow
@@ -50,20 +50,20 @@ private:
KDockWidget* dock5;
KDockWidget* dock6;
- QWidget* mainW;
- QWidget* l;
- QPushButton* m_bname;
+ TQWidget* mainW;
+ TQWidget* l;
+ TQPushButton* m_bname;
};
-class CTW:public QTabWidget,public KDockContainer
+class CTW:public TQTabWidget,public KDockContainer
{
Q_OBJECT
public:
- CTW(QWidget *parent):QTabWidget(parent,"MyDockContainer"),KDockContainer(){insertTab(new QLabel("BLAH",this),"BLUP");}
+ CTW(TQWidget *parent):TQTabWidget(parent,"MyDockContainer"),KDockContainer(){insertTab(new TQLabel("BLAH",this),"BLUP");}
virtual ~CTW(){;}
KDockWidget *parentDockWidget(){return ((KDockWidget*)parent());}
- void insertWidget (KDockWidget *w, QPixmap, const QString &, int &){qDebug("widget inserted"); insertTab(w,"NO");}
- void setToolTip (KDockWidget *, QString &){qDebug("Tooltip set");}
+ void insertWidget (KDockWidget *w, TQPixmap, const TQString &, int &){qDebug("widget inserted"); insertTab(w,"NO");}
+ void setToolTip (KDockWidget *, TQString &){qDebug("Tooltip set");}
};
diff --git a/kdeui/tests/kdualcolortest.cpp b/kdeui/tests/kdualcolortest.cpp
index 9022634f1..2060a9842 100644
--- a/kdeui/tests/kdualcolortest.cpp
+++ b/kdeui/tests/kdualcolortest.cpp
@@ -2,42 +2,42 @@
#include <kdualcolorbutton.h>
#include <kapplication.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qpalette.h>
+#include <tqlayout.h>
+#include <tqpalette.h>
-KDualColorWidget::KDualColorWidget(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KDualColorWidget::KDualColorWidget(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- lbl = new QLabel("Testing, testing, 1, 2, 3...", this);
+ lbl = new TQLabel("Testing, testing, 1, 2, 3...", this);
KDualColorButton *colorBtn =
new KDualColorButton(lbl->colorGroup().text(),
lbl->colorGroup().background(), this);
- connect(colorBtn, SIGNAL(fgChanged(const QColor &)),
- SLOT(slotFgChanged(const QColor &)));
- connect(colorBtn, SIGNAL(bgChanged(const QColor &)),
- SLOT(slotBgChanged(const QColor &)));
- connect(colorBtn, SIGNAL(currentChanged(KDualColorButton::DualColor)),
- SLOT(slotCurrentChanged(KDualColorButton::DualColor)));
+ connect(colorBtn, TQT_SIGNAL(fgChanged(const TQColor &)),
+ TQT_SLOT(slotFgChanged(const TQColor &)));
+ connect(colorBtn, TQT_SIGNAL(bgChanged(const TQColor &)),
+ TQT_SLOT(slotBgChanged(const TQColor &)));
+ connect(colorBtn, TQT_SIGNAL(currentChanged(KDualColorButton::DualColor)),
+ TQT_SLOT(slotCurrentChanged(KDualColorButton::DualColor)));
- QHBoxLayout *layout = new QHBoxLayout(this, 5);
+ TQHBoxLayout *layout = new TQHBoxLayout(this, 5);
layout->addWidget(colorBtn, 0);
layout->addWidget(lbl, 1);
layout->activate();
resize(sizeHint());
}
-void KDualColorWidget::slotFgChanged(const QColor &c)
+void KDualColorWidget::slotFgChanged(const TQColor &c)
{
- QPalette p = lbl->palette();
- p.setColor(QColorGroup::Text, c);
+ TQPalette p = lbl->palette();
+ p.setColor(TQColorGroup::Text, c);
lbl->setPalette(p);
}
-void KDualColorWidget::slotBgChanged(const QColor &c)
+void KDualColorWidget::slotBgChanged(const TQColor &c)
{
- QPalette p = lbl->palette();
- QBrush b(c, SolidPattern);
- p.setBrush(QColorGroup::Background, b);
+ TQPalette p = lbl->palette();
+ TQBrush b(c, SolidPattern);
+ p.setBrush(TQColorGroup::Background, b);
setPalette(p);
}
diff --git a/kdeui/tests/kdualcolortest.h b/kdeui/tests/kdualcolortest.h
index 6a0c49452..bcd9b271e 100644
--- a/kdeui/tests/kdualcolortest.h
+++ b/kdeui/tests/kdualcolortest.h
@@ -1,20 +1,20 @@
#ifndef __KDUALCOLORTEST_H
#define __KDUALCOLORTEST_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdualcolorbutton.h>
class KDualColorWidget : public QWidget
{
Q_OBJECT
public:
- KDualColorWidget(QWidget *parent=0, const char *name=0);
+ KDualColorWidget(TQWidget *parent=0, const char *name=0);
protected slots:
- void slotFgChanged(const QColor &c);
- void slotBgChanged(const QColor &c);
+ void slotFgChanged(const TQColor &c);
+ void slotBgChanged(const TQColor &c);
void slotCurrentChanged(KDualColorButton::DualColor current);
protected:
- QLabel *lbl;
+ TQLabel *lbl;
};
#endif
diff --git a/kdeui/tests/keditlistboxtest.cpp b/kdeui/tests/keditlistboxtest.cpp
index 0cbbece8a..90dbb74d0 100644
--- a/kdeui/tests/keditlistboxtest.cpp
+++ b/kdeui/tests/keditlistboxtest.cpp
@@ -7,14 +7,14 @@ int main( int argc, char **argv )
KApplication app( argc, argv, "keditlistboxtest" );
KEditListBox::CustomEditor editor( new KComboBox( true, 0L, "test" ) );
- KEditListBox *box = new KEditListBox( QString::fromLatin1("KEditListBox"),
+ KEditListBox *box = new KEditListBox( TQString::fromLatin1("KEditListBox"),
editor );
- box->insertItem( QString::fromLatin1("Test") );
- box->insertItem( QString::fromLatin1("for") );
- box->insertItem( QString::fromLatin1("this") );
- box->insertItem( QString::fromLatin1("KEditListBox") );
- box->insertItem( QString::fromLatin1("Widget") );
+ box->insertItem( TQString::fromLatin1("Test") );
+ box->insertItem( TQString::fromLatin1("for") );
+ box->insertItem( TQString::fromLatin1("this") );
+ box->insertItem( TQString::fromLatin1("KEditListBox") );
+ box->insertItem( TQString::fromLatin1("Widget") );
box->show();
return app.exec();
diff --git a/kdeui/tests/kedittest.cpp b/kdeui/tests/kedittest.cpp
index 271923e18..17a593e74 100644
--- a/kdeui/tests/kedittest.cpp
+++ b/kdeui/tests/kedittest.cpp
@@ -1,12 +1,12 @@
#include <kapplication.h>
#include <keditcl.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
int main( int argc, char **argv )
{
KApplication app( argc, argv, "kedittest" );
KEdit *edit = new KEdit( 0L );
- QPopupMenu *pop = new QPopupMenu( 0L );
+ TQPopupMenu *pop = new TQPopupMenu( 0L );
pop->insertItem( "Popupmenu item" );
edit->installRBPopup( pop );
edit->show();
diff --git a/kdeui/tests/kfontdialogtest.cpp b/kdeui/tests/kfontdialogtest.cpp
index f1aa74804..205fd48f7 100644
--- a/kdeui/tests/kfontdialogtest.cpp
+++ b/kdeui/tests/kfontdialogtest.cpp
@@ -36,11 +36,11 @@
KConfig aConfig;
aConfig.setGroup( "KFontDialog-test" );
- app.setFont(QFont("Helvetica",12));
+ app.setFont(TQFont("Helvetica",12));
- // QFont font = QFont("Times",18,QFont::Bold);
+ // TQFont font = TQFont("Times",18,TQFont::Bold);
- QFont font = aConfig.readFontEntry( "Chosen" );
+ TQFont font = aConfig.readFontEntry( "Chosen" );
int nRet = KFontDialog::getFont(font);
int flags;
nRet = KFontDialog::getFontDiff(font, flags);
diff --git a/kdeui/tests/kgradienttest.cpp b/kdeui/tests/kgradienttest.cpp
index 9fad0bb46..6942ca55d 100644
--- a/kdeui/tests/kgradienttest.cpp
+++ b/kdeui/tests/kgradienttest.cpp
@@ -1,24 +1,24 @@
#include "kgradienttest.h"
#include <kapplication.h>
#include <kpixmapeffect.h>
-#include <qpainter.h>
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqpainter.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
int cols = 3, rows = 3; // how many
-void KGradientWidget::paintEvent(QPaintEvent */*ev*/)
+void KGradientWidget::paintEvent(TQPaintEvent */*ev*/)
{
- QTime time;
+ TQTime time;
int it, ft;
- QString say;
+ TQString say;
- QColor ca = Qt::black, cb = Qt::blue;
+ TQColor ca = Qt::black, cb = Qt::blue;
int x = 0, y = 0;
pix.resize(width()/cols, height()/rows);
- QPainter p(this);
+ TQPainter p(this);
p.setPen(Qt::white);
// draw once, so that the benchmarking be fair :-)
diff --git a/kdeui/tests/kgradienttest.h b/kdeui/tests/kgradienttest.h
index 09b17ffc7..a793bfa5c 100644
--- a/kdeui/tests/kgradienttest.h
+++ b/kdeui/tests/kgradienttest.h
@@ -7,16 +7,16 @@
#ifndef __KGRADIENT_TEST_H
#define __KGRADIENT_TEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kpixmap.h>
class KGradientWidget : public QWidget
{
public:
- KGradientWidget(QWidget *parent=0, const char *name=0)
- : QWidget(parent, name){;}
+ KGradientWidget(TQWidget *parent=0, const char *name=0)
+ : TQWidget(parent, name){;}
protected:
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
private:
KPixmap pix;
};
diff --git a/kdeui/tests/khashtest.cpp b/kdeui/tests/khashtest.cpp
index 1065bef1a..2f00c9296 100644
--- a/kdeui/tests/khashtest.cpp
+++ b/kdeui/tests/khashtest.cpp
@@ -2,25 +2,25 @@
#include <kapplication.h>
#include <kpixmapeffect.h>
#include <kimageeffect.h>
-#include <qpainter.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqimage.h>
int cols = 3, rows = 3; // how many
-void KHashWidget::paintEvent(QPaintEvent * /*ev*/)
+void KHashWidget::paintEvent(TQPaintEvent * /*ev*/)
{
- QTime time;
+ TQTime time;
int it, ft;
- QString say;
+ TQString say;
- QColor cb = QColor(0,70,70), ca = QColor(80,200,200);
+ TQColor cb = TQColor(0,70,70), ca = TQColor(80,200,200);
int x = 0, y = 0;
pix.resize(width()/cols, height()/rows);
- QPainter p(this);
+ TQPainter p(this);
p.setPen(Qt::white);
// draw once, so that the benchmarking be fair :-)
@@ -77,7 +77,7 @@ void KHashWidget::paintEvent(QPaintEvent * /*ev*/)
p.drawText(5+(x++)*width()/cols, 15+y*height()/rows, say);
- QImage image = QImage("testimage.png");
+ TQImage image = TQImage("testimage.png");
it = time.elapsed();
KImageEffect::hash(image, KImageEffect::WestLite, 2);
ft = time.elapsed();
diff --git a/kdeui/tests/khashtest.h b/kdeui/tests/khashtest.h
index 24a01c4f1..3d4e8a3fa 100644
--- a/kdeui/tests/khashtest.h
+++ b/kdeui/tests/khashtest.h
@@ -7,7 +7,7 @@
#ifndef __KHASH_TEST_H
#define __KHASH_TEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kpixmap.h>
class KHashWidget : public QWidget
@@ -15,10 +15,10 @@ class KHashWidget : public QWidget
Q_OBJECT
public:
- KHashWidget(QWidget *parent=0, const char *name=0)
- : QWidget(parent, name){;}
+ KHashWidget(TQWidget *parent=0, const char *name=0)
+ : TQWidget(parent, name){;}
protected:
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
private:
KPixmap pix;
};
diff --git a/kdeui/tests/kinputdialogtest.cpp b/kdeui/tests/kinputdialogtest.cpp
index 3f9509a40..66db4617a 100644
--- a/kdeui/tests/kinputdialogtest.cpp
+++ b/kdeui/tests/kinputdialogtest.cpp
@@ -7,15 +7,15 @@
#include <kinputdialog.h>
#include <kdebug.h>
-#include <qstring.h>
-#include <qvalidator.h>
+#include <tqstring.h>
+#include <tqvalidator.h>
int main( int argc, char *argv[] )
{
KApplication app( argc, argv, "kinputdialogtest" );
bool ok;
- QString svalue;
+ TQString svalue;
int ivalue;
double dvalue;
@@ -23,7 +23,7 @@ int main( int argc, char *argv[] )
kdDebug() << "value1: " << svalue << ", ok: " << ok << endl;
svalue = KInputDialog::getText( "_caption", "_label:", "_value", &ok, 0L, 0L,
- &QRegExpValidator( QRegExp( "[0-9]{3}\\-[0-9]{3}\\-[0-9]{4}" ), 0L ) );
+ &TQRegExpValidator( TQRegExp( "[0-9]{3}\\-[0-9]{3}\\-[0-9]{4}" ), 0L ) );
kdDebug() << "value2: " << svalue << ", ok: " << ok << endl;
svalue = KInputDialog::getText( "_caption", "_label:", "_value", &ok, 0L, 0L,
@@ -45,7 +45,7 @@ int main( int argc, char *argv[] )
dvalue = KInputDialog::getDouble( "_caption", "_label:", 10, 0, 100, 2, &ok );
kdDebug() << "value6: " << dvalue << ", ok: " << ok << endl;
- QStringList list, slvalue;
+ TQStringList list, slvalue;
list << "Item 1" << "Item 2" << "Item 3" << "Item 4" << "Item 5";
svalue = KInputDialog::getItem( "_caption", "_label:", list, 1, false, &ok );
kdDebug() << "value7: " << svalue << ", ok: " << ok << endl;
@@ -53,7 +53,7 @@ int main( int argc, char *argv[] )
svalue = KInputDialog::getItem( "_caption", "_label:", list, 1, true, &ok );
kdDebug() << "value8: " << svalue << ", ok: " << ok << endl;
- QStringList select;
+ TQStringList select;
select << "Item 3";
list << "Item 6" << "Item 7" << "Item 8" << "Item 9" << "Item 10";
slvalue = KInputDialog::getItemList( "_caption", "_label:", list, select,
diff --git a/kdeui/tests/kjanuswidgettest.cpp b/kdeui/tests/kjanuswidgettest.cpp
index 5788f3638..59db252e2 100644
--- a/kdeui/tests/kjanuswidgettest.cpp
+++ b/kdeui/tests/kjanuswidgettest.cpp
@@ -1,9 +1,9 @@
#include <kapplication.h>
#include <kjanuswidget.h>
-#include <qstring.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
+#include <tqstring.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
int main(int argc, char** argv)
{
@@ -11,14 +11,14 @@ int main(int argc, char** argv)
// -----
KJanusWidget* janus = new KJanusWidget( 0, 0, KJanusWidget::IconList );
- QVBox* page1 = janus->addVBoxPage( QString( "Page1" ) ); // use i18n in real apps
- QCheckBox* cb1 = new QCheckBox( "a", page1 );
+ TQVBox* page1 = janus->addVBoxPage( TQString( "Page1" ) ); // use i18n in real apps
+ TQCheckBox* cb1 = new TQCheckBox( "a", page1 );
- QVBox* page2 = janus->addVBoxPage( QString( "Page2" ) );
- QCheckBox* cb2 = new QCheckBox( "a", page2 );
+ TQVBox* page2 = janus->addVBoxPage( TQString( "Page2" ) );
+ TQCheckBox* cb2 = new TQCheckBox( "a", page2 );
janus->show();
- QObject::connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
+ TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) );
return app.exec();
}
diff --git a/kdeui/tests/kledtest.cpp b/kdeui/tests/kledtest.cpp
index 8fc082420..d68f1e366 100644
--- a/kdeui/tests/kledtest.cpp
+++ b/kdeui/tests/kledtest.cpp
@@ -1,22 +1,22 @@
#include <kapplication.h>
-#include <qwidget.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
#include <stdlib.h>
#include "kled.h"
#include "kledtest.h"
-KLedTest::KLedTest(QWidget* parent)
- : QWidget(parent, 0),
+KLedTest::KLedTest(TQWidget* parent)
+ : TQWidget(parent, 0),
LedWidth(16),
LedHeight(10),
Grid(3),
ledcolor(0),
- red(QColor("red")),
- blue(QColor("blue")),
- green(QColor("green")),
- yellow(QColor("yellow")),
+ red(TQColor("red")),
+ blue(TQColor("blue")),
+ green(TQColor("green")),
+ yellow(TQColor("yellow")),
kled_round(true) // Switch HERE between rectangle and circular leds
{
if (kled_round) {
@@ -42,9 +42,9 @@ KLedTest::KLedTest(QWidget* parent)
t_toggle.start(1000, false);
t_color.start(3500, false);
t_look.start(3500, false);
- QObject::connect(&t_toggle, SIGNAL(timeout()), l, SLOT(toggle()));
- QObject::connect(&t_color, SIGNAL(timeout()), this, SLOT(nextColor()));
- QObject::connect(&t_look, SIGNAL(timeout()), this, SLOT(nextLook()));
+ TQObject::connect(&t_toggle, TQT_SIGNAL(timeout()), l, TQT_SLOT(toggle()));
+ TQObject::connect(&t_color, TQT_SIGNAL(timeout()), this, TQT_SLOT(nextColor()));
+ TQObject::connect(&t_look, TQT_SIGNAL(timeout()), this, TQT_SLOT(nextLook()));
l->show();
resize(240,140);
}
@@ -66,7 +66,7 @@ KLedTest::KLedTest(QWidget* parent)
y+=Grid+LedHeight;
}
setFixedSize(x+Grid, y+Grid);
- connect(&timer, SIGNAL(timeout()), SLOT(timeout()));
+ connect(&timer, TQT_SIGNAL(timeout()), TQT_SLOT(timeout()));
timer.start(500);
}
}
diff --git a/kdeui/tests/kledtest.h b/kdeui/tests/kledtest.h
index ad9ad3ffb..33c70fe83 100644
--- a/kdeui/tests/kledtest.h
+++ b/kdeui/tests/kledtest.h
@@ -1,8 +1,8 @@
#ifndef kledtest_h
#define kledtest_h
-#include <qwidget.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
#include <stdlib.h>
#include <kled.h>
@@ -10,7 +10,7 @@ class KLedTest : public QWidget
{
Q_OBJECT
protected:
- QTimer timer;
+ TQTimer timer;
KLed *leds[/*KLed::NoOfShapes*/2* /*KLed::NoOfLooks*/3* /*KLed::NoOfStates*/2];
const int LedWidth;
const int LedHeight;
@@ -21,7 +21,7 @@ protected:
int x, y, index;
- QTimer t_toggle, t_color, t_look;
+ TQTimer t_toggle, t_color, t_look;
//KLed *l; // create lamp
//KLed *l; // create lamp
KLed *l; // create lamp
@@ -30,14 +30,14 @@ protected:
int ledcolor;
KLed::Look ledlook;
- const QColor red;
- const QColor blue;
- const QColor green;
- const QColor yellow;
+ const TQColor red;
+ const TQColor blue;
+ const TQColor green;
+ const TQColor yellow;
public:
- KLedTest(QWidget* parent=0);
+ KLedTest(TQWidget* parent=0);
~KLedTest();
bool kled_round;
diff --git a/kdeui/tests/klineeditdlgtest.cpp b/kdeui/tests/klineeditdlgtest.cpp
index 2c9dc5248..e43085c0c 100644
--- a/kdeui/tests/klineeditdlgtest.cpp
+++ b/kdeui/tests/klineeditdlgtest.cpp
@@ -1,8 +1,8 @@
#include <kapplication.h>
#include <klineeditdlg.h>
-#include <qstring.h>
-#include <qtextview.h>
+#include <tqstring.h>
+#include <tqtextview.h>
int main(int argc, char** argv)
{
diff --git a/kdeui/tests/klineedittest.cpp b/kdeui/tests/klineedittest.cpp
index 2b40163a1..3508982fa 100644
--- a/kdeui/tests/klineedittest.cpp
+++ b/kdeui/tests/klineedittest.cpp
@@ -1,8 +1,8 @@
-#include <qstring.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqtimer.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
@@ -16,12 +16,12 @@
#include "klineedittest.h"
-KLineEditTest::KLineEditTest (QWidget* widget, const char* name )
- :QWidget( widget, name )
+KLineEditTest::KLineEditTest (TQWidget* widget, const char* name )
+ :TQWidget( widget, name )
{
- QVBoxLayout* layout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ TQVBoxLayout* layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- QStringList list;
+ TQStringList list;
list << "Tree" << "Suuupa" << "Stroustrup" << "Stone" << "Slick"
<< "Slashdot" << "Send" << "Peables" << "Mankind" << "Ocean"
<< "Chips" << "Computer" << "Sandworm" << "Sandstorm" << "Chops";
@@ -31,28 +31,28 @@ KLineEditTest::KLineEditTest (QWidget* widget, const char* name )
m_lineedit->completionObject()->setItems( list );
m_lineedit->setFixedSize(500,30);
m_lineedit->setEnableSqueezedText( true );
- connect( m_lineedit, SIGNAL( returnPressed() ), SLOT( slotReturnPressed() ) );
- connect( m_lineedit, SIGNAL( returnPressed(const QString&) ),
- SLOT( slotReturnPressed(const QString&) ) );
+ connect( m_lineedit, TQT_SIGNAL( returnPressed() ), TQT_SLOT( slotReturnPressed() ) );
+ connect( m_lineedit, TQT_SIGNAL( returnPressed(const TQString&) ),
+ TQT_SLOT( slotReturnPressed(const TQString&) ) );
- QHBox *hbox = new QHBox (this);
- m_btnExit = new QPushButton( "E&xit", hbox );
+ TQHBox *hbox = new TQHBox (this);
+ m_btnExit = new TQPushButton( "E&xit", hbox );
m_btnExit->setFixedSize(100,30);
- connect( m_btnExit, SIGNAL( clicked() ), SLOT( quitApp() ) );
+ connect( m_btnExit, TQT_SIGNAL( clicked() ), TQT_SLOT( quitApp() ) );
- m_btnReadOnly = new QPushButton( "&Read Only", hbox );
+ m_btnReadOnly = new TQPushButton( "&Read Only", hbox );
m_btnReadOnly->setToggleButton (true);
m_btnReadOnly->setFixedSize(100,30);
- connect( m_btnReadOnly, SIGNAL( toggled(bool) ), SLOT( slotReadOnly(bool) ) );
+ connect( m_btnReadOnly, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotReadOnly(bool) ) );
- m_btnEnable = new QPushButton( "Dis&able", hbox );
+ m_btnEnable = new TQPushButton( "Dis&able", hbox );
m_btnEnable->setToggleButton (true);
m_btnEnable->setFixedSize(100,30);
- connect( m_btnEnable, SIGNAL( toggled(bool) ), SLOT( slotEnable(bool) ) );
+ connect( m_btnEnable, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotEnable(bool) ) );
- m_btnHide = new QPushButton( "Hi&de", hbox );
+ m_btnHide = new TQPushButton( "Hi&de", hbox );
m_btnHide->setFixedSize(100,30);
- connect( m_btnHide, SIGNAL( clicked() ), SLOT( slotHide() ) );
+ connect( m_btnHide, TQT_SIGNAL( clicked() ), TQT_SLOT( slotHide() ) );
layout->addWidget( m_lineedit );
layout->addWidget( hbox );
@@ -75,7 +75,7 @@ void KLineEditTest::show()
m_btnHide->setEnabled( true );
- QWidget::show();
+ TQWidget::show();
}
void KLineEditTest::slotReturnPressed()
@@ -83,12 +83,12 @@ void KLineEditTest::slotReturnPressed()
kdDebug() << "Return pressed" << endl;
}
-void KLineEditTest::slotReturnPressed( const QString& text )
+void KLineEditTest::slotReturnPressed( const TQString& text )
{
kdDebug() << "Return pressed: " << text << endl;
}
-void KLineEditTest::resultOutput( const QString& text )
+void KLineEditTest::resultOutput( const TQString& text )
{
kdDebug() << "KlineEditTest Debug: " << text << endl;
}
@@ -96,14 +96,14 @@ void KLineEditTest::resultOutput( const QString& text )
void KLineEditTest::slotReadOnly( bool ro )
{
m_lineedit->setReadOnly (ro);
- QString text = (ro) ? "&Read Write" : "&Read Only";
+ TQString text = (ro) ? "&Read Write" : "&Read Only";
m_btnReadOnly->setText (text);
}
void KLineEditTest::slotEnable (bool enable)
{
m_lineedit->setEnabled (!enable);
- QString text = (enable) ? "En&able":"Dis&able";
+ TQString text = (enable) ? "En&able":"Dis&able";
m_btnEnable->setText (text);
}
@@ -113,7 +113,7 @@ void KLineEditTest::slotHide()
m_btnHide->setEnabled( false );
m_lineedit->setText( "My dog ate the homework, whaaaaaaaaaaaaaaaaaaaaaaa"
"aaaaaaaaaaaaaaaaaaaaaaaaa! I want my mommy!" );
- QTimer::singleShot( 1000, this, SLOT(show()) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT(show()) );
}
int main ( int argc, char **argv)
diff --git a/kdeui/tests/klineedittest.h b/kdeui/tests/klineedittest.h
index e3b87c30e..4a07dc812 100644
--- a/kdeui/tests/klineedittest.h
+++ b/kdeui/tests/klineedittest.h
@@ -1,8 +1,8 @@
#ifndef _KLINEEDITTEST_H
#define _KLINEEDITTEST_H
-#include <qwidget.h>
-#include <qguardedptr.h>
+#include <tqwidget.h>
+#include <tqguardedptr.h>
class QString;
class QPushButton;
@@ -14,7 +14,7 @@ class KLineEditTest : public QWidget
Q_OBJECT
public:
- KLineEditTest( QWidget *parent=0, const char *name=0 );
+ KLineEditTest( TQWidget *parent=0, const char *name=0 );
~KLineEditTest();
KLineEdit* lineEdit() const { return m_lineedit; }
@@ -27,15 +27,15 @@ private slots:
void slotEnable( bool );
void slotReadOnly( bool );
void slotReturnPressed();
- void resultOutput( const QString& );
- void slotReturnPressed( const QString& );
+ void resultOutput( const TQString& );
+ void slotReturnPressed( const TQString& );
protected:
- QGuardedPtr<KLineEdit> m_lineedit;
- QPushButton* m_btnExit;
- QPushButton* m_btnReadOnly;
- QPushButton* m_btnEnable;
- QPushButton* m_btnHide;
+ TQGuardedPtr<KLineEdit> m_lineedit;
+ TQPushButton* m_btnExit;
+ TQPushButton* m_btnReadOnly;
+ TQPushButton* m_btnEnable;
+ TQPushButton* m_btnHide;
};
#endif
diff --git a/kdeui/tests/klistviewtest.cpp b/kdeui/tests/klistviewtest.cpp
index 75c01e439..6189c76e9 100644
--- a/kdeui/tests/klistviewtest.cpp
+++ b/kdeui/tests/klistviewtest.cpp
@@ -1,7 +1,7 @@
#include <klistview.h>
#include <kapplication.h>
#include <kdialogbase.h>
-#include <qvbox.h>
+#include <tqvbox.h>
int main( int argc, char **argv )
diff --git a/kdeui/tests/kmainwindowrestoretest.cpp b/kdeui/tests/kmainwindowrestoretest.cpp
index 35198a6c2..7415085ac 100644
--- a/kdeui/tests/kmainwindowrestoretest.cpp
+++ b/kdeui/tests/kmainwindowrestoretest.cpp
@@ -3,12 +3,12 @@
#include <kapplication.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#define MAKE_WINDOW( kind, title ) do { \
MainWin##kind * m = new MainWin##kind; \
m->setCaption( title ); \
- m->setCentralWidget( new QLabel( title, m ) ); \
+ m->setCentralWidget( new TQLabel( title, m ) ); \
m->show(); \
} while ( false )
diff --git a/kdeui/tests/kmainwindowtest.cpp b/kdeui/tests/kmainwindowtest.cpp
index 6ab8d33a0..5b7afd36f 100644
--- a/kdeui/tests/kmainwindowtest.cpp
+++ b/kdeui/tests/kmainwindowtest.cpp
@@ -1,5 +1,5 @@
-#include <qtimer.h>
-#include <qlabel.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <kstatusbar.h>
@@ -9,9 +9,9 @@
MainWindow::MainWindow()
{
- QTimer::singleShot( 2*1000, this, SLOT( showMessage() ) );
+ TQTimer::singleShot( 2*1000, this, TQT_SLOT( showMessage() ) );
- setCentralWidget( new QLabel( "foo", this ) );
+ setCentralWidget( new TQLabel( "foo", this ) );
menuBar()->insertItem( "hi" );
}
diff --git a/kdeui/tests/kmessageboxtest.cpp b/kdeui/tests/kmessageboxtest.cpp
index 372bef16a..1b926739f 100644
--- a/kdeui/tests/kmessageboxtest.cpp
+++ b/kdeui/tests/kmessageboxtest.cpp
@@ -1,7 +1,7 @@
#include "kmessagebox.h"
-#include <qdialog.h>
-#include <qlayout.h>
+#include <tqdialog.h>
+#include <tqlayout.h>
#include <stdlib.h>
@@ -15,15 +15,15 @@
class ExampleWidget : public QLabel
{
public:
- ExampleWidget( QWidget *parent = 0, const char *name = 0 );
+ ExampleWidget( TQWidget *parent = 0, const char *name = 0 );
};
-ExampleWidget::ExampleWidget( QWidget *parent, const char *name )
- : QLabel(parent, name )
+ExampleWidget::ExampleWidget( TQWidget *parent, const char *name )
+ : TQLabel(parent, name )
{
// Make the top-level layout; a vertical box to contain all widgets
// and sub-layouts.
- QSize sh;
+ TQSize sh;
setText("<p>Hello.</p>");
sh = sizeHint();
qWarning("SizeHint = %d x %d", sh.width(), sh.height());
@@ -43,7 +43,7 @@ ExampleWidget::ExampleWidget( QWidget *parent, const char *name )
class Foo: public QDialog
{
public:
- Foo() : QDialog(0, "foo", true) { resize(200,200); new QLabel("Hello World", this); show(); }
+ Foo() : TQDialog(0, "foo", true) { resize(200,200); new TQLabel("Hello World", this); show(); }
};
void showResult(int test, int i)
@@ -69,7 +69,7 @@ int main( int argc, char *argv[] )
w->show();
w->deleteLater();
- QStringList list; list.append("Hello"); list.append("World");
+ TQStringList list; list.append("Hello"); list.append("World");
for( test = 1; true; test++)
{
@@ -79,24 +79,24 @@ case 1:
i = KMessageBox::warningContinueCancel(w,
"You are about to <Print>.\n"
"Are you sure?",
- "Print", QString::fromLatin1("&Print"), "dontask", false);
+ "Print", TQString::fromLatin1("&Print"), "dontask", false);
i = KMessageBox::warningContinueCancel(0,
"You are about to <Print>.\n"
"Are you sure?",
- "Print", QString::fromLatin1("&Print"), "dontask", KMessageBox::AllowLink);
+ "Print", TQString::fromLatin1("&Print"), "dontask", KMessageBox::AllowLink);
i = KMessageBox::questionYesNo(0, "<p>Do you have a printer? thisisaverylongdkldhklghklghklashgkllasghkdlsghkldfghklsabla bla bbla bla. It also has <a href=http://www.kde.org>this URL</a>.</p>",
- QString("Bla"), QString("Yes"), QString("No"), "bla", KMessageBox::AllowLink);
+ TQString("Bla"), TQString("Yes"), TQString("No"), "bla", KMessageBox::AllowLink);
break;
case 2:
i = KMessageBox::questionYesNo(0, "Do you have a printer?",
- QString("Printer setup"), QString::null);
+ TQString("Printer setup"), TQString::null);
break;
case 3:
i = KMessageBox::questionYesNo(0,
"Does your printer support color or only black and white?",
- "Printer setup", QString::fromLatin1("&Color"), QString::fromLatin1("&Black & White"));
+ "Printer setup", TQString::fromLatin1("&Color"), TQString::fromLatin1("&Black & White"));
break;
case 4:
@@ -123,13 +123,13 @@ case 6:
i = KMessageBox::warningContinueCancel(0,
"You are about to print.\n"
"Are you sure?",
- "Print", QString::fromLatin1("&Print"));
+ "Print", TQString::fromLatin1("&Print"));
break;
case 7:
i = KMessageBox::warningContinueCancel(0,
"You are about to <Print>.\n"
"Are you sure?",
- "Print", QString::fromLatin1("&Print"), "dontask", false);
+ "Print", TQString::fromLatin1("&Print"), "dontask", false);
break;
case 8:
@@ -142,14 +142,14 @@ case 9:
i = KMessageBox::warningYesNoCancel(0,
"Your document contains unsaved changes.\n"
"Do you want to save your changes?\n",
- QString::fromLatin1("Close"));
+ TQString::fromLatin1("Close"));
break;
case 10:
i = KMessageBox::warningYesNoCancel(0,
"Your document contains unsaved changes.\n"
"Do you want to save or discard your changes?\n",
- "Close", QString::fromLatin1("&Save"), QString::fromLatin1("&Discard") );
+ "Close", TQString::fromLatin1("&Save"), TQString::fromLatin1("&Discard") );
break;
case 11:
@@ -186,7 +186,7 @@ case 16:
case 17:
i = KMessageBox::Ok;
- KMessageBox::information(0, "You can enable the menubar again\nwith the right mouse button menu.", QString::null, "Enable_Menubar");
+ KMessageBox::information(0, "You can enable the menubar again\nwith the right mouse button menu.", TQString::null, "Enable_Menubar");
break;
case 18:
@@ -196,11 +196,11 @@ case 18:
case 19:
i = KMessageBox::Ok;
- KMessageBox::information(0, "Return of the annoying popup message.", QString::null, "Enable_Menubar");
+ KMessageBox::information(0, "Return of the annoying popup message.", TQString::null, "Enable_Menubar");
break;
case 20:
{
- QStringList strlist;
+ TQStringList strlist;
strlist << "/dev/hda" << "/etc/inittab" << "/usr/somefile" << "/some/really/"
"long/file/name/which/is/in/a/really/deep/directory/in/a/really/large/"
"hard/disk/of/your/system" << "/and/another/one" ;
@@ -209,9 +209,9 @@ case 20:
break;
case 21:
{
- QStringList strlist;
+ TQStringList strlist;
printf("Filling StringList...\n");
- for (int j=1;j<=6000;j++) strlist.append(QString("/tmp/tmp.%1").arg(j));
+ for (int j=1;j<=6000;j++) strlist.append(TQString("/tmp/tmp.%1").arg(j));
printf("Completed...\n");
i = KMessageBox::questionYesNoList(0, "Do you want to delete the following files ?",strlist);
}
@@ -229,7 +229,7 @@ case 23:
case 24:
i = KMessageBox::Ok;
- KMessageBox::informationList(0, "The follwoing words have been found:", list, QString::null, "Search_Words");
+ KMessageBox::informationList(0, "The follwoing words have been found:", list, TQString::null, "Search_Words");
break;
default:
diff --git a/kdeui/tests/knuminputtest.cpp b/kdeui/tests/knuminputtest.cpp
index b3d8e9067..fdf8697e9 100644
--- a/kdeui/tests/knuminputtest.cpp
+++ b/kdeui/tests/knuminputtest.cpp
@@ -8,8 +8,8 @@
*
*/
-#include <qlayout.h>
-#include <qvgroupbox.h>
+#include <tqlayout.h>
+#include <tqvgroupbox.h>
#include <kapplication.h>
#include <knuminput.h>
@@ -26,15 +26,15 @@ void TopLevel::slotPrint( double n ) {
kdDebug() << "slotPrint( " << n << " )" << endl;
}
-#define conn(x,y) connect( x, SIGNAL(valueChanged(y)), SLOT(slotPrint(y)))
-TopLevel::TopLevel(QWidget *parent, const char *name)
- : QWidget(parent, name)
+#define conn(x,y) connect( x, TQT_SIGNAL(valueChanged(y)), TQT_SLOT(slotPrint(y)))
+TopLevel::TopLevel(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
setCaption("KNumInput test application");
- QBoxLayout* l = new QHBoxLayout(this, 10);
+ TQBoxLayout* l = new TQHBoxLayout(this, 10);
- QGroupBox* b1 = new QVGroupBox("KIntNumInput", this);
+ TQGroupBox* b1 = new TQVGroupBox("KIntNumInput", this);
i1 = new KIntNumInput(42, b1, 10, "perc_no_slider");
i1->setLabel("percent of usage (no slider)");
@@ -67,10 +67,10 @@ TopLevel::TopLevel(QWidget *parent, const char *name)
i6->setLabel("Height (should be 2xWidth):");
i6->setRange(0, 200, 1, false);
i6->setReferencePoint( 10 );
- connect( i5, SIGNAL(relativeValueChanged(double)),
- i6, SLOT(setRelativeValue(double)) );
- connect( i6, SIGNAL(relativeValueChanged(double)),
- i5, SLOT(setRelativeValue(double)) );
+ connect( i5, TQT_SIGNAL(relativeValueChanged(double)),
+ i6, TQT_SLOT(setRelativeValue(double)) );
+ connect( i6, TQT_SIGNAL(relativeValueChanged(double)),
+ i5, TQT_SLOT(setRelativeValue(double)) );
i7 = new KIntNumInput(i6, 0, b1, 10);
i7->setLabel("math test:", AlignVCenter|AlignLeft );
@@ -79,7 +79,7 @@ TopLevel::TopLevel(QWidget *parent, const char *name)
l->addWidget(b1);
- QGroupBox* b2 = new QVGroupBox("KDoubleNumInput", this);
+ TQGroupBox* b2 = new TQVGroupBox("KDoubleNumInput", this);
d1 = new KDoubleNumInput(4.0, b2, "perc_double_no_slider");
d1->setLabel("percent of usage (no slider)", AlignTop | AlignRight);
@@ -119,10 +119,10 @@ TopLevel::TopLevel(QWidget *parent, const char *name)
d7 = new KDoubleNumInput(d6, -30, 30, 0, 0.001, 3, b2, "d7");
d7->setReferencePoint( -3 );
- connect( d6, SIGNAL(relativeValueChanged(double)),
- d7, SLOT(setRelativeValue(double)) );
- connect( d7, SIGNAL(relativeValueChanged(double)),
- d6, SLOT(setRelativeValue(double)) );
+ connect( d6, TQT_SIGNAL(relativeValueChanged(double)),
+ d7, TQT_SLOT(setRelativeValue(double)) );
+ connect( d7, TQT_SIGNAL(relativeValueChanged(double)),
+ d6, TQT_SLOT(setRelativeValue(double)) );
l->addWidget(b2);
}
diff --git a/kdeui/tests/knuminputtest.h b/kdeui/tests/knuminputtest.h
index e4a979e48..f32e1c4b4 100644
--- a/kdeui/tests/knuminputtest.h
+++ b/kdeui/tests/knuminputtest.h
@@ -1,7 +1,7 @@
#ifndef _KNUMINPUTTEST_H
#define _KNUMINPUTTEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KIntNumInput;
class KDoubleNumInput;
@@ -11,7 +11,7 @@ class TopLevel : public QWidget
Q_OBJECT
public:
- TopLevel( QWidget *parent=0, const char *name=0 );
+ TopLevel( TQWidget *parent=0, const char *name=0 );
protected:
KIntNumInput* i1, *i2, *i3, *i4, *i5, *i6, *i7;
KDoubleNumInput* d1, *d2, *d3, *d4, *d5, *d6, *d7;
diff --git a/kdeui/tests/kpalettetest.cpp b/kdeui/tests/kpalettetest.cpp
index d75563ec5..32b91ff96 100644
--- a/kdeui/tests/kpalettetest.cpp
+++ b/kdeui/tests/kpalettetest.cpp
@@ -1,21 +1,21 @@
#include <kapplication.h>
-#include <qwidget.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
#include <stdlib.h>
#include "kpalette.h"
#include "kledtest.h"
#include <stdio.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
int main( int argc, char **argv )
{
KApplication a( argc, argv, "KPalettetest" );
- QStringList palettes = KPalette::getPaletteList();
- for(QStringList::ConstIterator it = palettes.begin();
+ TQStringList palettes = KPalette::getPaletteList();
+ for(TQStringList::ConstIterator it = palettes.begin();
it != palettes.end(); it++)
{
printf("Palette = %s\n", (*it).ascii());
diff --git a/kdeui/tests/kpanelmenutest.cpp b/kdeui/tests/kpanelmenutest.cpp
index 4ff13b89c..6f2d8f2be 100644
--- a/kdeui/tests/kpanelmenutest.cpp
+++ b/kdeui/tests/kpanelmenutest.cpp
@@ -3,8 +3,8 @@
#include <kstandarddirs.h>
#include <dcopclient.h>
-TestWidget::TestWidget(QWidget *parent, const char *name)
- : QLabel(parent, name)
+TestWidget::TestWidget(TQWidget *parent, const char *name)
+ : TQLabel(parent, name)
{
testMenu = new KPanelAppMenu(locate("mini", "x.png"), "Client Test", this,
"menu1");
@@ -15,8 +15,8 @@ TestWidget::TestWidget(QWidget *parent, const char *name)
KPanelAppMenu *ssub = subMenu->insertMenu(locate("mini", "x.png"), "One more");
- connect(testMenu, SIGNAL(activated(int)), SLOT(slotMenuCalled(int)));
- connect(subMenu, SIGNAL(activated(int)), SLOT(slotSubMenuCalled(int)));
+ connect(testMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotMenuCalled(int)));
+ connect(subMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSubMenuCalled(int)));
init();
setText("We added \"Client Test\" to kicker. Click the K Menu to check.");
@@ -50,7 +50,7 @@ void TestWidget::slotMenuCalled(int id)
void TestWidget::slotSubMenuCalled(int id)
{
- QString msg("Called with id=%1");
+ TQString msg("Called with id=%1");
setText(msg.arg(id));
}
diff --git a/kdeui/tests/kpanelmenutest.h b/kdeui/tests/kpanelmenutest.h
index 0e0e4a728..ec76a4498 100644
--- a/kdeui/tests/kpanelmenutest.h
+++ b/kdeui/tests/kpanelmenutest.h
@@ -2,13 +2,13 @@
#define __KPANELMENUTEST_H
#include <kpanelappmenu.h>
-#include <qlabel.h>
+#include <tqlabel.h>
class TestWidget : public QLabel
{
Q_OBJECT
public:
- TestWidget(QWidget *parent=0, const char *name=0);
+ TestWidget(TQWidget *parent=0, const char *name=0);
~TestWidget(){delete testMenu;}
public slots:
void slotMenuCalled(int id);
diff --git a/kdeui/tests/kpixmapregionselectordialogtest.cpp b/kdeui/tests/kpixmapregionselectordialogtest.cpp
index 7d57c4234..c698c66f2 100644
--- a/kdeui/tests/kpixmapregionselectordialogtest.cpp
+++ b/kdeui/tests/kpixmapregionselectordialogtest.cpp
@@ -1,6 +1,6 @@
#include "kpixmapregionselectordialog.h"
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <iostream>
@@ -24,8 +24,8 @@ int main(int argc, char**argv)
return 1;
}
- QImage image=
- KPixmapRegionSelectorDialog::getSelectedImage(QPixmap(args->arg(0)),100,100);
+ TQImage image=
+ KPixmapRegionSelectorDialog::getSelectedImage(TQPixmap(args->arg(0)),100,100);
image.save("output.png", "PNG");
diff --git a/kdeui/tests/kpopuptest.cpp b/kdeui/tests/kpopuptest.cpp
index 43e3c0958..96f4b3d32 100644
--- a/kdeui/tests/kpopuptest.cpp
+++ b/kdeui/tests/kpopuptest.cpp
@@ -1,30 +1,30 @@
#include <kapplication.h>
-#include <qwidget.h>
-#include <qcursor.h>
+#include <tqwidget.h>
+#include <tqcursor.h>
#include "kpopupmenu.h"
-class DemoWidget : public QWidget {
+class DemoWidget : public TQWidget {
private:
KPopupMenu *menu;
-void mousePressEvent(QMouseEvent *)
+void mousePressEvent(TQMouseEvent *)
{
- menu->popup(QCursor::pos());
+ menu->popup(TQCursor::pos());
}
-void paintEvent(QPaintEvent *)
+void paintEvent(TQPaintEvent *)
{
drawText(32, 32, "Press a Mouse Button!");
}
public:
- DemoWidget() : QWidget()
+ DemoWidget() : TQWidget()
{
menu = new KPopupMenu("Popup Menu:");
menu->insertItem("Item1");
menu->insertItem("Item2");
menu->insertSeparator();
- menu->insertItem("Quit", qApp, SLOT(quit()));
+ menu->insertItem("Quit", qApp, TQT_SLOT(quit()));
}
};
@@ -33,7 +33,7 @@ int main(int argc, char **argv)
KApplication app(argc, argv, "kpopupmenutest");
DemoWidget w;
app.setMainWidget(&w);
- w.setFont(QFont("helvetica", 12, QFont::Bold), true);
+ w.setFont(TQFont("helvetica", 12, TQFont::Bold), true);
w.show();
return app.exec();
}
diff --git a/kdeui/tests/kprogresstest.cpp b/kdeui/tests/kprogresstest.cpp
index d748fcb0f..7b7024135 100644
--- a/kdeui/tests/kprogresstest.cpp
+++ b/kdeui/tests/kprogresstest.cpp
@@ -1,11 +1,11 @@
#include <kapplication.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kprogress.h"
-class MyWidget : public QWidget {
+class MyWidget : public TQWidget {
public:
- MyWidget() : QWidget()
+ MyWidget() : TQWidget()
{
setFixedSize(440, 80);
Progress = new KProgress(this);
@@ -17,10 +17,10 @@ public:
private:
KProgress *Progress;
- void timerEvent(QTimerEvent *);
+ void timerEvent(TQTimerEvent *);
};
-void MyWidget::timerEvent(QTimerEvent *)
+void MyWidget::timerEvent(TQTimerEvent *)
{
static enum { fwd, back } direction = fwd;
//static KProgress::BarStyle style = KProgress::Solid;
diff --git a/kdeui/tests/krulertest.cpp b/kdeui/tests/krulertest.cpp
index 1efe57643..ad2f5630a 100644
--- a/kdeui/tests/krulertest.cpp
+++ b/kdeui/tests/krulertest.cpp
@@ -3,26 +3,26 @@
#include "krulertest.h"
#include "kruler.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
/*
void
MyCheckBox::mouseReleaseEvent(QMouseEvent *e )
{
- QButton::mouseReleaseEvent(e);
+ TQButton::mouseReleaseEvent(e);
if ();
}
*/
-MouseWidget::MouseWidget( QWidget *parent, const char *name, WFlags f )
- : QFrame(parent, name, f)
+MouseWidget::MouseWidget( TQWidget *parent, const char *name, WFlags f )
+ : TQFrame(parent, name, f)
{
}
void
-MouseWidget::mousePressEvent( QMouseEvent *e )
+MouseWidget::mousePressEvent( TQMouseEvent *e )
{
mouseButtonDown = true;
emit newXPos(e->x());
@@ -30,11 +30,11 @@ MouseWidget::mousePressEvent( QMouseEvent *e )
}
void
-MouseWidget::mouseReleaseEvent( QMouseEvent * )
+MouseWidget::mouseReleaseEvent( TQMouseEvent * )
{ mouseButtonDown = false; }
void
-MouseWidget::mouseMoveEvent( QMouseEvent *e )
+MouseWidget::mouseMoveEvent( TQMouseEvent *e )
{
if (mouseButtonDown) {
emit newXPos(e->x());
@@ -43,7 +43,7 @@ MouseWidget::mouseMoveEvent( QMouseEvent *e )
}
void
-MouseWidget::resizeEvent( QResizeEvent *r )
+MouseWidget::resizeEvent( TQResizeEvent *r )
{
emit newWidth(r->size().width());
emit newHeight(r->size().height());
@@ -53,16 +53,16 @@ MouseWidget::resizeEvent( QResizeEvent *r )
KRulerTest::KRulerTest( const char *name )
: KMainWindow(0, name)
{
- mainframe = new QFrame(this);
+ mainframe = new TQFrame(this);
- layout = new QGridLayout(mainframe, 2, 2);
+ layout = new TQGridLayout(mainframe, 2, 2);
- miniwidget = new QFrame(mainframe);
- miniwidget->setFrameStyle(QFrame::WinPanel | QFrame::Raised);
+ miniwidget = new TQFrame(mainframe);
+ miniwidget->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised);
bigwidget = new MouseWidget(mainframe);
- bigwidget->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ bigwidget->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
- // QRect bwrect = bigwidget->frameRect();
+ // TQRect bwrect = bigwidget->frameRect();
// qDebug("big rect: top%i left%i bottom%i right%i",
// bwrect.top(), bwrect.left(), bwrect.bottom(), bwrect.right());
hruler = new KRuler(Horizontal, mainframe);
@@ -72,98 +72,98 @@ KRulerTest::KRulerTest( const char *name )
hruler->setOffset( 0 );
vruler = new KRuler(Vertical, mainframe);
- vruler->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ vruler->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
vruler->setOffset( 0 );
vruler->setRange( 0, 1000 );
- connect( bigwidget, SIGNAL(newXPos(int)),
- hruler, SLOT(slotNewValue(int)) );
- connect( bigwidget, SIGNAL(newYPos(int)),
- vruler, SLOT(slotNewValue(int)) );
- connect( bigwidget, SIGNAL(newWidth(int)),
- SLOT(slotNewWidth(int)) );
- connect( bigwidget, SIGNAL(newHeight(int)),
- SLOT(slotNewHeight(int)) );
+ connect( bigwidget, TQT_SIGNAL(newXPos(int)),
+ hruler, TQT_SLOT(slotNewValue(int)) );
+ connect( bigwidget, TQT_SIGNAL(newYPos(int)),
+ vruler, TQT_SLOT(slotNewValue(int)) );
+ connect( bigwidget, TQT_SIGNAL(newWidth(int)),
+ TQT_SLOT(slotNewWidth(int)) );
+ connect( bigwidget, TQT_SIGNAL(newHeight(int)),
+ TQT_SLOT(slotNewHeight(int)) );
layout->addWidget(miniwidget, 0, 0);
layout->addWidget(hruler, 0, 1);
layout->addWidget(vruler, 1, 0);
layout->addWidget(bigwidget, 1, 1);
- mouse_message = new QLabel("Press and hold mouse button\nfor pointer movement", bigwidget);
+ mouse_message = new TQLabel("Press and hold mouse button\nfor pointer movement", bigwidget);
mouse_message->adjustSize();
mouse_message->move(4,4);
- showMarks = new QGroupBox("Show which marks ?", bigwidget);
+ showMarks = new TQGroupBox("Show which marks ?", bigwidget);
showMarks->setFixedSize(140, 160);
showMarks->move(330,4);
- showTM = new QCheckBox("show tiny marks", showMarks);
+ showTM = new TQCheckBox("show tiny marks", showMarks);
showTM->adjustSize();
showTM->move(5,15);
showTM->setChecked(true);
- connect(showTM, SIGNAL(toggled(bool)), SLOT(slotSetTinyMarks(bool)) );
- showLM = new QCheckBox("show little marks", showMarks);
+ connect(showTM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetTinyMarks(bool)) );
+ showLM = new TQCheckBox("show little marks", showMarks);
showLM->adjustSize();
showLM->move(5,35);
showLM->setChecked(true);
- connect(showLM, SIGNAL(toggled(bool)), SLOT(slotSetLittleMarks(bool)) );
- showMM = new QCheckBox("show medium marks", showMarks);
+ connect(showLM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetLittleMarks(bool)) );
+ showMM = new TQCheckBox("show medium marks", showMarks);
showMM->adjustSize();
showMM->move(5,55);
showMM->setChecked(true);
- connect(showMM, SIGNAL(toggled(bool)), SLOT(slotSetMediumMarks(bool)) );
- showBM = new QCheckBox("show big marks", showMarks);
+ connect(showMM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetMediumMarks(bool)) );
+ showBM = new TQCheckBox("show big marks", showMarks);
showBM->adjustSize();
showBM->move(5,75);
showBM->setChecked(true);
- connect(showBM, SIGNAL(toggled(bool)), SLOT(slotSetBigMarks(bool)) );
- showEM = new QCheckBox("show end marks", showMarks);
+ connect(showBM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetBigMarks(bool)) );
+ showEM = new TQCheckBox("show end marks", showMarks);
showEM->adjustSize();
showEM->move(5,95);
showEM->setChecked(true);
- connect(showEM, SIGNAL(toggled(bool)), SLOT(slotSetEndMarks(bool)) );
- showPT = new QCheckBox("show ruler pointer", showMarks);
+ connect(showEM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetEndMarks(bool)) );
+ showPT = new TQCheckBox("show ruler pointer", showMarks);
showPT->adjustSize();
showPT->move(5,115);
showPT->setChecked(true);
- connect(showPT, SIGNAL(toggled(bool)), SLOT(slotSetRulerPointer(bool)) );
- fixLen = new QCheckBox("fix ruler length", showMarks);
+ connect(showPT, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetRulerPointer(bool)) );
+ fixLen = new TQCheckBox("fix ruler length", showMarks);
fixLen->adjustSize();
fixLen->move(5,135);
fixLen->setChecked(true);
- connect(fixLen, SIGNAL(toggled(bool)), SLOT(slotFixRulerLength(bool)) );
- connect(fixLen, SIGNAL(toggled(bool)), SLOT(slotCheckLength(bool)) );
+ connect(fixLen, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotFixRulerLength(bool)) );
+ connect(fixLen, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotCheckLength(bool)) );
- lineEdit = new QGroupBox("Value of begin/end", bigwidget);
+ lineEdit = new TQGroupBox("Value of begin/end", bigwidget);
lineEdit->setFixedSize(140, 80);
lineEdit->move(330,4+160);
beginMark = new KIntNumInput(0, lineEdit);
beginMark->setRange(-1000, 1000, 1, false);
beginMark->move(5, 15);
beginMark->setFixedSize(beginMark->sizeHint());
- connect(beginMark, SIGNAL(valueChanged(int)),
- hruler, SLOT(slotNewOffset(int)) );
- connect(beginMark, SIGNAL(valueChanged(int)),
- vruler, SLOT(slotNewOffset(int)) );
+ connect(beginMark, TQT_SIGNAL(valueChanged(int)),
+ hruler, TQT_SLOT(slotNewOffset(int)) );
+ connect(beginMark, TQT_SIGNAL(valueChanged(int)),
+ vruler, TQT_SLOT(slotNewOffset(int)) );
endMark = new KIntNumInput(0, lineEdit);
endMark->setRange(-1000, 1000, 1, false);
endMark->move(5, 35);
endMark->setFixedSize(endMark->sizeHint());
- connect(endMark, SIGNAL(valueChanged(int)),
- hruler, SLOT(slotEndOffset(int)) );
- connect(endMark, SIGNAL(valueChanged(int)),
- vruler, SLOT(slotEndOffset(int)) );
+ connect(endMark, TQT_SIGNAL(valueChanged(int)),
+ hruler, TQT_SLOT(slotEndOffset(int)) );
+ connect(endMark, TQT_SIGNAL(valueChanged(int)),
+ vruler, TQT_SLOT(slotEndOffset(int)) );
lengthInput = new KIntNumInput(0, lineEdit);
lengthInput->setRange(-1000, 1000, 1, false);
lengthInput->move(5, 55);
lengthInput->setFixedSize(lengthInput->sizeHint());
- connect(lengthInput, SIGNAL(valueChanged(int)),
- hruler, SLOT(slotEndOffset(int)) );
- connect(lengthInput, SIGNAL(valueChanged(int)),
- vruler, SLOT(slotEndOffset(int)) );
+ connect(lengthInput, TQT_SIGNAL(valueChanged(int)),
+ hruler, TQT_SLOT(slotEndOffset(int)) );
+ connect(lengthInput, TQT_SIGNAL(valueChanged(int)),
+ vruler, TQT_SLOT(slotEndOffset(int)) );
- vertrot = new QGroupBox("Value of rotate translate for Vert.", bigwidget);
+ vertrot = new TQGroupBox("Value of rotate translate for Vert.", bigwidget);
vertrot->setFixedSize(140, 80);
vertrot->move(330,4+160+80+4);
transX = new KDoubleNumInput(0.0, vertrot);
@@ -171,48 +171,48 @@ KRulerTest::KRulerTest( const char *name )
transX->move(5, 15);
transX->setFixedSize(transX->sizeHint());
//transX->setLabel("transx", AlignLeft);
- connect(transX, SIGNAL(valueChanged(double)),
- SLOT(slotSetXTrans(double)) );
+ connect(transX, TQT_SIGNAL(valueChanged(double)),
+ TQT_SLOT(slotSetXTrans(double)) );
transY = new KDoubleNumInput(-12.0, vertrot);
transY->setRange(-1000, 1000, 1, false);
transY->move(5, 35);
transY->setFixedSize(transY->sizeHint());
//transY->setLabel("transy", AlignLeft);
- connect(transY, SIGNAL(valueChanged(double)),
- SLOT(slotSetYTrans(double)) );
+ connect(transY, TQT_SIGNAL(valueChanged(double)),
+ TQT_SLOT(slotSetYTrans(double)) );
rotV = new KDoubleNumInput(90.0, vertrot);
rotV->setRange(-1000, 1000, 1, false);
rotV->move(5, 55);
rotV->setFixedSize(rotV->sizeHint());
//rotV->setLabel("rot", AlignLeft);
- connect(rotV, SIGNAL(valueChanged(double)),
- SLOT(slotSetRotate(double)) );
+ connect(rotV, TQT_SIGNAL(valueChanged(double)),
+ TQT_SLOT(slotSetRotate(double)) );
- metricstyle = new QButtonGroup("metric styles", bigwidget);
+ metricstyle = new TQButtonGroup("metric styles", bigwidget);
metricstyle->setFixedSize(100, 120);
metricstyle->move(330-110,4);
- pixelmetric = new QRadioButton("pixel", metricstyle);
+ pixelmetric = new TQRadioButton("pixel", metricstyle);
pixelmetric->adjustSize();
pixelmetric->move(5,15);
metricstyle->insert(pixelmetric, (int)KRuler::Pixel);
- inchmetric = new QRadioButton("inch", metricstyle);
+ inchmetric = new TQRadioButton("inch", metricstyle);
inchmetric->adjustSize();
inchmetric->move(5,35);
metricstyle->insert(inchmetric, (int)KRuler::Inch);
- mmmetric = new QRadioButton("millimeter", metricstyle);
+ mmmetric = new TQRadioButton("millimeter", metricstyle);
mmmetric->adjustSize();
mmmetric->move(5,55);
metricstyle->insert(mmmetric, (int)KRuler::Millimetres);
- cmmetric = new QRadioButton("centimeter", metricstyle);
+ cmmetric = new TQRadioButton("centimeter", metricstyle);
cmmetric->adjustSize();
cmmetric->move(5,75);
metricstyle->insert(cmmetric, (int)KRuler::Centimetres);
- mmetric = new QRadioButton("meter", metricstyle);
+ mmetric = new TQRadioButton("meter", metricstyle);
mmetric->adjustSize();
mmetric->move(5,95);
metricstyle->insert(mmetric, (int)KRuler::Metres);
- connect ( metricstyle, SIGNAL(clicked(int)), SLOT(slotSetMStyle(int)) );
+ connect ( metricstyle, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotSetMStyle(int)) );
setCentralWidget(mainframe);
@@ -362,7 +362,7 @@ int main(int argc, char **argv)
KRulerTest *window;
testapp = new KApplication(argc, argv,"krulertest");
- testapp->setFont(QFont("Helvetica",12),true);
+ testapp->setFont(TQFont("Helvetica",12),true);
window = new KRulerTest("main");
testapp->setMainWidget(window);
diff --git a/kdeui/tests/krulertest.h b/kdeui/tests/krulertest.h
index ba9938deb..20ee8d372 100644
--- a/kdeui/tests/krulertest.h
+++ b/kdeui/tests/krulertest.h
@@ -5,10 +5,10 @@
#include <kapplication.h>
#include <kmainwindow.h>
-#include <qwidget.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqwidget.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#include <knuminput.h>
class KRuler;
@@ -23,7 +23,7 @@ class MouseWidget : public QFrame
{
Q_OBJECT
public:
-MouseWidget( QWidget *parent=0, const char *name=0, WFlags f=0 );
+MouseWidget( TQWidget *parent=0, const char *name=0, WFlags f=0 );
signals:
void newXPos(int);
@@ -32,10 +32,10 @@ signals:
void newHeight(int);
protected:
- virtual void mousePressEvent ( QMouseEvent * );
- virtual void mouseReleaseEvent ( QMouseEvent * );
- virtual void mouseMoveEvent ( QMouseEvent * );
- virtual void resizeEvent ( QResizeEvent * );
+ virtual void mousePressEvent ( TQMouseEvent * );
+ virtual void mouseReleaseEvent ( TQMouseEvent * );
+ virtual void mouseMoveEvent ( TQMouseEvent * );
+ virtual void resizeEvent ( TQResizeEvent * );
private:
bool mouseButtonDown;
@@ -74,17 +74,17 @@ private slots:
private:
KRuler *hruler, *vruler;
- QGridLayout *layout;
- QFrame *miniwidget, *bigwidget;
- QFrame *mainframe;
+ TQGridLayout *layout;
+ TQFrame *miniwidget, *bigwidget;
+ TQFrame *mainframe;
- QLabel *mouse_message;
- QGroupBox *showMarks, *lineEdit, *vertrot;
- QCheckBox *showTM, *showLM, *showMM, *showBM, *showEM, *showPT, *fixLen;
+ TQLabel *mouse_message;
+ TQGroupBox *showMarks, *lineEdit, *vertrot;
+ TQCheckBox *showTM, *showLM, *showMM, *showBM, *showEM, *showPT, *fixLen;
KIntNumInput *beginMark, *endMark, *lengthInput;
KDoubleNumInput *transX, *transY, *rotV;
- QButtonGroup *metricstyle;
- QRadioButton *pixelmetric, *inchmetric, *mmmetric, *cmmetric, *mmetric;
+ TQButtonGroup *metricstyle;
+ TQRadioButton *pixelmetric, *inchmetric, *mmmetric, *cmmetric, *mmetric;
};
#endif
diff --git a/kdeui/tests/kseparatortest.cpp b/kdeui/tests/kseparatortest.cpp
index 2abd84448..17e965ca8 100644
--- a/kdeui/tests/kseparatortest.cpp
+++ b/kdeui/tests/kseparatortest.cpp
@@ -19,19 +19,19 @@
#include <kapplication.h>
-#include <qlayout.h>
-#include <qwidget.h>
+#include <tqlayout.h>
+#include <tqwidget.h>
#include "kseparator.h"
int main(int argc, char **argv)
{
- QApplication app(argc, argv);
+ TQApplication app(argc, argv);
- QWidget *toplevel = new QWidget();
+ TQWidget *toplevel = new TQWidget();
- QBoxLayout *mainbox = new QBoxLayout(toplevel, QBoxLayout::TopToBottom, 10);
+ TQBoxLayout *mainbox = new TQBoxLayout(toplevel, TQBoxLayout::TopToBottom, 10);
KSeparator *sep1 = new KSeparator( KSeparator::VLine, toplevel );
mainbox->addWidget(sep1);
diff --git a/kdeui/tests/kspelltest.cpp b/kdeui/tests/kspelltest.cpp
index 4511edd6c..9180ed376 100644
--- a/kdeui/tests/kspelltest.cpp
+++ b/kdeui/tests/kspelltest.cpp
@@ -20,26 +20,26 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqtextcodec.h>
int main(int argc, char **argv)
{
KApplication *app = new KApplication(argc, argv, "KSpellTest");
// test ASCII
- //QString text( "I have noo idee of how to wride englisch or englisch" );
+ //TQString text( "I have noo idee of how to wride englisch or englisch" );
// test Latin-3 (need dictionary "esperanto" and "Latin3" in config)
- //QCString ctext( "sed jen: e¶oþanø' æiu¼aýde; e¶uþunøo øiun fendredon - kaj dimanøon...");
- //QTextCodec *codec = QTextCodec::codecForName("ISO 8859-3");
+ //TQCString ctext( "sed jen: e¶oþanø' æiu¼aýde; e¶uþunøo øiun fendredon - kaj dimanøon...");
+ //TQTextCodec *codec = TQTextCodec::codecForName("ISO 8859-3");
// test UTF-8 (need dictionary "esperanto" and "UTF-8" in config)
- QCString ctext( "sed jen: e\304\245oÅanÄo ĉiuĵaÅ­de e\304\245uÅunÄo Äiun fendredon kaj dimanÄon");
- QTextCodec *codec = QTextCodec::codecForName("UTF-8");
+ TQCString ctext( "sed jen: e\304\245oÅanÄo ĉiuĵaÅ­de e\304\245uÅunÄo Äiun fendredon kaj dimanÄon");
+ TQTextCodec *codec = TQTextCodec::codecForName("UTF-8");
- QString text = codec->toUnicode(ctext.data());
+ TQString text = codec->toUnicode(ctext.data());
KSpell::modalCheck( text );
diff --git a/kdeui/tests/kstatusbartest.cpp b/kdeui/tests/kstatusbartest.cpp
index 80b92c446..a85689494 100644
--- a/kdeui/tests/kstatusbartest.cpp
+++ b/kdeui/tests/kstatusbartest.cpp
@@ -1,11 +1,11 @@
-#include <qpopupmenu.h>
-#include <qwidget.h>
-#include <qstring.h>
-#include <qmessagebox.h>
-#include <qmultilineedit.h>
-#include <qkeycode.h>
-#include <qpixmap.h>
-#include <qcursor.h>
+#include <tqpopupmenu.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqmessagebox.h>
+#include <tqmultilineedit.h>
+#include <tqkeycode.h>
+#include <tqpixmap.h>
+#include <tqcursor.h>
#include <stdlib.h>
@@ -15,7 +15,7 @@
#include <kmenubar.h>
#include "kstatusbartest.h"
-testWindow::testWindow (QWidget *, const char *name)
+testWindow::testWindow (TQWidget *, const char *name)
: KMainWindow (0, name)
{
// Setup Menus
@@ -23,7 +23,7 @@ testWindow::testWindow (QWidget *, const char *name)
fileMenu = new QPopupMenu;
menuBar->insertItem ("&File", fileMenu);
fileMenu->insertItem ("&Exit", KApplication::kApplication(),
- SLOT( quit() ), ALT + Key_Q );
+ TQT_SLOT( quit() ), ALT + Key_Q );
statusbar = new KStatusBar (this);
statusbar->insertItem("Zoom: XXXX", 0);
statusbar->insertItem("XXX", 1);
@@ -34,10 +34,10 @@ testWindow::testWindow (QWidget *, const char *name)
insert = true;
statusbar->changeItem("Line: 13567", 2);
- connect (statusbar, SIGNAL(pressed(int)), this, SLOT(slotPress(int)));
- connect (statusbar, SIGNAL(released(int)), this, SLOT(slotClick(int)));
+ connect (statusbar, TQT_SIGNAL(pressed(int)), this, TQT_SLOT(slotPress(int)));
+ connect (statusbar, TQT_SIGNAL(released(int)), this, TQT_SLOT(slotClick(int)));
- widget = new QMultiLineEdit (this);
+ widget = new TQMultiLineEdit (this);
setCentralWidget(widget);
@@ -53,7 +53,7 @@ testWindow::testWindow (QWidget *, const char *name)
smenu->insertItem("400%");
smenu->insertItem("oo%");
- connect (smenu, SIGNAL(activated(int)), this, SLOT(slotMenu(int)));
+ connect (smenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenu(int)));
}
void testWindow::slotClick(int id)
@@ -77,7 +77,7 @@ void testWindow::slotClick(int id)
break;
case 2:
- QMessageBox::information(0, "Go to line", "Enter line number:", "where?");
+ TQMessageBox::information(0, "Go to line", "Enter line number:", "where?");
statusbar->changeItem("16543", 2);
break;
}
@@ -86,12 +86,12 @@ void testWindow::slotClick(int id)
void testWindow::slotPress(int id)
{
if (id == 0)
- smenu->popup(QCursor::pos()); // This popup should understand keys up and down
+ smenu->popup(TQCursor::pos()); // This popup should understand keys up and down
}
void testWindow::slotMenu(int id)
{
- QString s = "Zoom: ";
+ TQString s = "Zoom: ";
s.append (smenu->text(id));
statusbar->changeItem(s,0);
}
diff --git a/kdeui/tests/kstatusbartest.h b/kdeui/tests/kstatusbartest.h
index ea59073b6..aa9aded27 100644
--- a/kdeui/tests/kstatusbartest.h
+++ b/kdeui/tests/kstatusbartest.h
@@ -2,7 +2,7 @@
#define test_kstatusbar_h
#include <kmenubar.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kstatusbar.h>
#include <kmainwindow.h>
@@ -13,7 +13,7 @@ class testWindow : public KMainWindow
Q_OBJECT
public:
- testWindow (QWidget *parent=0, const char *name=0);
+ testWindow (TQWidget *parent=0, const char *name=0);
~testWindow ();
public slots:
@@ -22,12 +22,12 @@ public slots:
void slotMenu(int i);
protected:
- QPopupMenu *fileMenu;
- QPopupMenu *smenu;
+ TQPopupMenu *fileMenu;
+ TQPopupMenu *smenu;
KMenuBar *menuBar;
KStatusBar *statusbar;
bool insert;
- QMultiLineEdit *widget;
+ TQMultiLineEdit *widget;
};
#endif
diff --git a/kdeui/tests/ksystemtraytest.cpp b/kdeui/tests/ksystemtraytest.cpp
index 746246132..dcee78346 100644
--- a/kdeui/tests/ksystemtraytest.cpp
+++ b/kdeui/tests/ksystemtraytest.cpp
@@ -4,7 +4,7 @@
int main(int argc, char **argv)
{
KApplication app( argc, argv, "ksystemtraytest" );
- QLabel *l = new QLabel("System Tray Main Window", 0L);
+ TQLabel *l = new TQLabel("System Tray Main Window", 0L);
KSystemTray *tray = new KSystemTray( l );
tray->setText("Test");
l->show();
diff --git a/kdeui/tests/ktabctltest.cpp b/kdeui/tests/ktabctltest.cpp
index 20b7246c1..33e7fc5b7 100644
--- a/kdeui/tests/ktabctltest.cpp
+++ b/kdeui/tests/ktabctltest.cpp
@@ -3,22 +3,22 @@
*/
#include <kapplication.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qobject.h>
-#include <qlistbox.h>
-#include <qgroupbox.h>
-#include <qevent.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qtabdialog.h>
-#include <qtooltip.h>
-#include <qmessagebox.h>
-#include <qtabbar.h>
-#include <qpalette.h>
-#include <qmultilineedit.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqobject.h>
+#include <tqlistbox.h>
+#include <tqgroupbox.h>
+#include <tqevent.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqtabdialog.h>
+#include <tqtooltip.h>
+#include <tqmessagebox.h>
+#include <tqtabbar.h>
+#include <tqpalette.h>
+#include <tqmultilineedit.h>
#include <stdio.h>
#include <stdlib.h>
@@ -28,12 +28,12 @@
#include "ktabctl.h"
#include "ktabctltest.h"
-QFont default_font("Helvetica", 12);
+TQFont default_font("Helvetica", 12);
KApplication *a;
-TopLevel::TopLevel(QWidget *parent, const char *name)
- : QWidget(parent, name)
+TopLevel::TopLevel(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
setCaption("KTabCtl test application");
setMinimumSize(300, 200);
@@ -43,22 +43,22 @@ TopLevel::TopLevel(QWidget *parent, const char *name)
*/
test = new KTabCtl(this, "test");
- connect(test, SIGNAL(tabSelected(int)), this, SLOT(tabChanged(int)));
- QWidget *w = new QWidget(test, "_page1");
- QPushButton *bt = new QPushButton("Click me to quit", w, "_bt1");
- connect(bt, SIGNAL(clicked()), this, SLOT(okPressed()));
+ connect(test, TQT_SIGNAL(tabSelected(int)), this, TQT_SLOT(tabChanged(int)));
+ TQWidget *w = new TQWidget(test, "_page1");
+ TQPushButton *bt = new TQPushButton("Click me to quit", w, "_bt1");
+ connect(bt, TQT_SIGNAL(clicked()), this, TQT_SLOT(okPressed()));
bt->adjustSize();
bt->move(20, 20);
test->addTab(w, "Seite 1");
pages[0] = w;
- w = new QWidget(test, "_page2");
- e = new QMultiLineEdit(w, "_editor");
+ w = new TQWidget(test, "_page2");
+ e = new TQMultiLineEdit(w, "_editor");
e->setText("Write some usesless stuff here :-)");
w->resize(width(), height());
test->addTab(w, "Seite 2");
pages[1] = w;
- w = new QWidget(test, "_page3");
- bt = new QPushButton("This button does absolutely nothing", w, "_bt3");
+ w = new TQWidget(test, "_page3");
+ bt = new TQPushButton("This button does absolutely nothing", w, "_bt3");
bt->adjustSize();
bt->move(20, 20);
test->addTab(w, "Seite 3");
@@ -70,7 +70,7 @@ TopLevel::TopLevel(QWidget *parent, const char *name)
adjustSize();
}
-void TopLevel::resizeEvent( QResizeEvent * )
+void TopLevel::resizeEvent( TQResizeEvent * )
{
test->resize(width(), height());
e->setGeometry(10, 10, pages[1]->width() - 20, pages[1]->height() - 20);
diff --git a/kdeui/tests/ktabctltest.h b/kdeui/tests/ktabctltest.h
index c010c993f..0090de1c9 100644
--- a/kdeui/tests/ktabctltest.h
+++ b/kdeui/tests/ktabctltest.h
@@ -5,7 +5,7 @@
#ifndef _KTABCTLTEST_H
#define _KTABCTLTEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KTabCtl;
class QPushButton;
class QMultiLineEdit;
@@ -15,13 +15,13 @@ class TopLevel : public QWidget
Q_OBJECT
public:
- TopLevel( QWidget *parent=0, const char *name=0 );
+ TopLevel( TQWidget *parent=0, const char *name=0 );
protected:
- void resizeEvent(QResizeEvent *);
+ void resizeEvent(TQResizeEvent *);
KTabCtl *test;
- QPushButton *ok, *cancel;
- QMultiLineEdit *e;
- QWidget *pages[3];
+ TQPushButton *ok, *cancel;
+ TQMultiLineEdit *e;
+ TQWidget *pages[3];
public slots:
void okPressed();
void tabChanged(int);
diff --git a/kdeui/tests/ktabwidgettest.cpp b/kdeui/tests/ktabwidgettest.cpp
index 82db9109c..32ed5c89f 100644
--- a/kdeui/tests/ktabwidgettest.cpp
+++ b/kdeui/tests/ktabwidgettest.cpp
@@ -1,6 +1,6 @@
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qdragobject.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqdragobject.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
@@ -9,119 +9,119 @@
#include "ktabwidgettest.h"
-Test::Test( QWidget* parent, const char *name )
- :QVBox( parent, name ), mChange(0), mLeftWidget(0), mRightWidget(0),
+Test::Test( TQWidget* parent, const char *name )
+ :TQVBox( parent, name ), mChange(0), mLeftWidget(0), mRightWidget(0),
mLeftPopup( false ), mRightPopup( false ), mTabbarContextPopup( false ), mContextPopup( false )
{
resize( 600,300 );
mWidget = new KTabWidget( this );
- mWidget->addTab( new QLabel( "Testlabel 1", mWidget ), "One" );
- mWidget->addTab( new QLabel( "Testlabel 2", mWidget ), "Two" );
- mWidget->addTab( new QWidget( mWidget), SmallIcon( "konsole" ), "Three" );
- mWidget->addTab( new QWidget( mWidget), "Four" );
+ mWidget->addTab( new TQLabel( "Testlabel 1", mWidget ), "One" );
+ mWidget->addTab( new TQLabel( "Testlabel 2", mWidget ), "Two" );
+ mWidget->addTab( new TQWidget( mWidget), SmallIcon( "konsole" ), "Three" );
+ mWidget->addTab( new TQWidget( mWidget), "Four" );
mWidget->setTabColor( mWidget->page(0), Qt::red );
mWidget->setTabColor( mWidget->page(1), Qt::blue );
- connect( mWidget, SIGNAL( currentChanged( QWidget * ) ), SLOT( currentChanged( QWidget * ) ) );
- connect( mWidget, SIGNAL( contextMenu( QWidget *, const QPoint & )), SLOT(contextMenu( QWidget *, const QPoint & )));
- connect( mWidget, SIGNAL( contextMenu( const QPoint & )), SLOT(tabbarContextMenu( const QPoint & )));
- connect( mWidget, SIGNAL( mouseDoubleClick( QWidget * )), SLOT(mouseDoubleClick( QWidget * )));
- connect( mWidget, SIGNAL( mouseMiddleClick() ), SLOT(addTab() ));
- connect( mWidget, SIGNAL( mouseMiddleClick( QWidget * )), SLOT(mouseMiddleClick( QWidget * )));
- connect( mWidget, SIGNAL( closeRequest( QWidget * )), SLOT(mouseMiddleClick( QWidget * )));
- connect( mWidget, SIGNAL( testCanDecode(const QDragMoveEvent *, bool & )), SLOT(testCanDecode(const QDragMoveEvent *, bool & )));
- connect( mWidget, SIGNAL( receivedDropEvent( QDropEvent * )), SLOT(receivedDropEvent( QDropEvent * )));
- connect( mWidget, SIGNAL( receivedDropEvent( QWidget *, QDropEvent * )), SLOT(receivedDropEvent( QWidget *, QDropEvent * )));
- connect( mWidget, SIGNAL( initiateDrag( QWidget * )), SLOT(initiateDrag( QWidget * )));
- connect( mWidget, SIGNAL( movedTab( int, int )), SLOT(movedTab( int, int )));
+ connect( mWidget, TQT_SIGNAL( currentChanged( TQWidget * ) ), TQT_SLOT( currentChanged( TQWidget * ) ) );
+ connect( mWidget, TQT_SIGNAL( contextMenu( TQWidget *, const TQPoint & )), TQT_SLOT(contextMenu( TQWidget *, const TQPoint & )));
+ connect( mWidget, TQT_SIGNAL( contextMenu( const TQPoint & )), TQT_SLOT(tabbarContextMenu( const TQPoint & )));
+ connect( mWidget, TQT_SIGNAL( mouseDoubleClick( TQWidget * )), TQT_SLOT(mouseDoubleClick( TQWidget * )));
+ connect( mWidget, TQT_SIGNAL( mouseMiddleClick() ), TQT_SLOT(addTab() ));
+ connect( mWidget, TQT_SIGNAL( mouseMiddleClick( TQWidget * )), TQT_SLOT(mouseMiddleClick( TQWidget * )));
+ connect( mWidget, TQT_SIGNAL( closeRequest( TQWidget * )), TQT_SLOT(mouseMiddleClick( TQWidget * )));
+ connect( mWidget, TQT_SIGNAL( testCanDecode(const TQDragMoveEvent *, bool & )), TQT_SLOT(testCanDecode(const TQDragMoveEvent *, bool & )));
+ connect( mWidget, TQT_SIGNAL( receivedDropEvent( TQDropEvent * )), TQT_SLOT(receivedDropEvent( TQDropEvent * )));
+ connect( mWidget, TQT_SIGNAL( receivedDropEvent( TQWidget *, TQDropEvent * )), TQT_SLOT(receivedDropEvent( TQWidget *, TQDropEvent * )));
+ connect( mWidget, TQT_SIGNAL( initiateDrag( TQWidget * )), TQT_SLOT(initiateDrag( TQWidget * )));
+ connect( mWidget, TQT_SIGNAL( movedTab( int, int )), TQT_SLOT(movedTab( int, int )));
mWidget->setTabReorderingEnabled( true );
- QWidget * grid = new QWidget(this);
- QGridLayout * gridlayout = new QGridLayout( grid, 5, 2 );
+ TQWidget * grid = new TQWidget(this);
+ TQGridLayout * gridlayout = new TQGridLayout( grid, 5, 2 );
- QPushButton * addTab = new QPushButton( "Add Tab", grid );
+ TQPushButton * addTab = new TQPushButton( "Add Tab", grid );
gridlayout->addWidget( addTab, 0, 0 );
- connect( addTab, SIGNAL( clicked() ), SLOT( addTab() ) );
+ connect( addTab, TQT_SIGNAL( clicked() ), TQT_SLOT( addTab() ) );
- QPushButton * removeTab = new QPushButton( "Remove Current Tab", grid );
+ TQPushButton * removeTab = new TQPushButton( "Remove Current Tab", grid );
gridlayout->addWidget( removeTab, 0, 1 );
- connect( removeTab, SIGNAL( clicked() ), SLOT( removeCurrentTab() ) );
+ connect( removeTab, TQT_SIGNAL( clicked() ), TQT_SLOT( removeCurrentTab() ) );
- mLeftButton = new QCheckBox( "Show left button", grid );
+ mLeftButton = new TQCheckBox( "Show left button", grid );
gridlayout->addWidget( mLeftButton, 1, 0 );
- connect( mLeftButton, SIGNAL( toggled(bool) ), SLOT( toggleLeftButton(bool) ) );
+ connect( mLeftButton, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleLeftButton(bool) ) );
mLeftButton->setChecked(true);
- QCheckBox * leftPopup = new QCheckBox( "Enable left popup", grid );
+ TQCheckBox * leftPopup = new TQCheckBox( "Enable left popup", grid );
gridlayout->addWidget( leftPopup, 2, 0 );
- connect( leftPopup, SIGNAL( toggled(bool) ), SLOT( toggleLeftPopup(bool) ) );
+ connect( leftPopup, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleLeftPopup(bool) ) );
leftPopup->setChecked(true);
- mRightButton = new QCheckBox( "Show right button", grid );
+ mRightButton = new TQCheckBox( "Show right button", grid );
gridlayout->addWidget( mRightButton, 1, 1 );
- connect( mRightButton, SIGNAL( toggled(bool) ), SLOT( toggleRightButton(bool) ) );
+ connect( mRightButton, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleRightButton(bool) ) );
mRightButton->setChecked(true);
- QCheckBox * rightPopup = new QCheckBox( "Enable right popup", grid );
+ TQCheckBox * rightPopup = new TQCheckBox( "Enable right popup", grid );
gridlayout->addWidget( rightPopup, 2, 1 );
- connect( rightPopup, SIGNAL( toggled(bool) ), SLOT( toggleRightPopup(bool) ) );
+ connect( rightPopup, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleRightPopup(bool) ) );
rightPopup->setChecked(true);
- mTabsBottom = new QCheckBox( "Show tabs at bottom", grid );
+ mTabsBottom = new TQCheckBox( "Show tabs at bottom", grid );
gridlayout->addWidget( mTabsBottom, 3, 0 );
- connect( mTabsBottom, SIGNAL( toggled(bool) ), SLOT( toggleTabPosition(bool) ) );
+ connect( mTabsBottom, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleTabPosition(bool) ) );
- QCheckBox * tabshape = new QCheckBox( "Triangular tab shape", grid );
+ TQCheckBox * tabshape = new TQCheckBox( "Triangular tab shape", grid );
gridlayout->addWidget( tabshape, 3, 1 );
- connect( tabshape, SIGNAL( toggled(bool) ), SLOT( toggleTabShape(bool) ) );
+ connect( tabshape, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleTabShape(bool) ) );
- QCheckBox *tabClose = new QCheckBox( "Close button on icon hover", grid );
+ TQCheckBox *tabClose = new TQCheckBox( "Close button on icon hover", grid );
gridlayout->addWidget( tabClose, 4, 0 );
- connect( tabClose, SIGNAL( toggled(bool) ), SLOT( toggleCloseButtons(bool) ) );
+ connect( tabClose, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleCloseButtons(bool) ) );
tabClose->setChecked(true);
- QCheckBox * showlabels = new QCheckBox( "Show labels", grid );
+ TQCheckBox * showlabels = new TQCheckBox( "Show labels", grid );
gridlayout->addWidget( showlabels, 4, 1 );
- connect( showlabels, SIGNAL( toggled(bool) ), this, SLOT( toggleLabels(bool) ) );
+ connect( showlabels, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( toggleLabels(bool) ) );
}
-void Test::currentChanged(QWidget* w)
+void Test::currentChanged(TQWidget* w)
{
mWidget->setTabColor( w, Qt::black );
}
void Test::addTab()
{
- mWidget->addTab( new QWidget( mWidget ), SmallIcon( "konsole" ), QString("Tab %1").arg( mWidget->count()+1 ) );
+ mWidget->addTab( new TQWidget( mWidget ), SmallIcon( "konsole" ), TQString("Tab %1").arg( mWidget->count()+1 ) );
}
-void Test::testCanDecode(const QDragMoveEvent *e, bool &accept /* result */)
+void Test::testCanDecode(const TQDragMoveEvent *e, bool &accept /* result */)
{
- if ( QTextDrag::canDecode(e) ) // don't accept=false if it cannot be decoded!
+ if ( TQTextDrag::canDecode(e) ) // don't accept=false if it cannot be decoded!
accept = true;
}
-void Test::receivedDropEvent( QDropEvent *e )
+void Test::receivedDropEvent( TQDropEvent *e )
{
- QString dropText;
- if (QTextDrag::decode(e, dropText)) {
- mWidget->addTab( new QWidget( mWidget), dropText );
+ TQString dropText;
+ if (TQTextDrag::decode(e, dropText)) {
+ mWidget->addTab( new TQWidget( mWidget), dropText );
}
}
-void Test::receivedDropEvent( QWidget *w, QDropEvent *e )
+void Test::receivedDropEvent( TQWidget *w, TQDropEvent *e )
{
- QString dropText;
- if (QTextDrag::decode(e, dropText)) {
+ TQString dropText;
+ if (TQTextDrag::decode(e, dropText)) {
mWidget->changeTab( w, dropText );
}
}
-void Test::initiateDrag( QWidget *w )
+void Test::initiateDrag( TQWidget *w )
{
- QDragObject *d = new QTextDrag( mWidget->label( mWidget->indexOf( w ) ), this );
+ TQDragObject *d = new TQTextDrag( mWidget->label( mWidget->indexOf( w ) ), this );
d->dragCopy(); // do NOT delete d.
}
@@ -136,11 +136,11 @@ void Test::toggleLeftButton(bool state)
{
if (state) {
if (!mLeftWidget) {
- mLeftWidget = new QToolButton( mWidget );
- connect( mLeftWidget, SIGNAL( clicked() ), SLOT( addTab() ) );
+ mLeftWidget = new TQToolButton( mWidget );
+ connect( mLeftWidget, TQT_SIGNAL( clicked() ), TQT_SLOT( addTab() ) );
mLeftWidget->setIconSet( SmallIcon( "tab_new" ) );
mLeftWidget->setTextLabel("New");
- mLeftWidget->setTextPosition(QToolButton::Right);
+ mLeftWidget->setTextPosition(TQToolButton::Right);
mLeftWidget->adjustSize();
//mLeftWidget->setGeometry( 0, 0, h, h );
mLeftWidget->setPopup(mLeftPopup);
@@ -156,13 +156,13 @@ void Test::toggleLeftPopup(bool state)
{
if (state) {
if (!mLeftPopup) {
- mLeftPopup = new QPopupMenu(this);
+ mLeftPopup = new TQPopupMenu(this);
mLeftPopup->insertItem(SmallIcon( "tab_new" ), "Empty Tab", 0);
mLeftPopup->insertItem(SmallIcon( "tab_new" ), "Empty Tab After First", 3);
mLeftPopup->insertSeparator();
mLeftPopup->insertItem(SmallIcon( "tab_new" ), "Button Tab", 1);
mLeftPopup->insertItem(SmallIcon( "tab_new" ), "Label Tab", 2);
- connect(mLeftPopup, SIGNAL(activated(int)), SLOT(leftPopupActivated(int)));
+ connect(mLeftPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(leftPopupActivated(int)));
}
mLeftWidget->setPopup(mLeftPopup);
}
@@ -173,13 +173,13 @@ void Test::toggleLeftPopup(bool state)
void Test::leftPopupActivated(int item)
{
switch (item) {
- case 0: mWidget->addTab( new QWidget( mWidget), QString("Tab %1").arg( mWidget->count()+1 ) );
+ case 0: mWidget->addTab( new TQWidget( mWidget), TQString("Tab %1").arg( mWidget->count()+1 ) );
break;
- case 1: mWidget->addTab( new QPushButton( "Testbutton", mWidget ), QString("Tab %1").arg( mWidget->count()+1 ) );
+ case 1: mWidget->addTab( new TQPushButton( "Testbutton", mWidget ), TQString("Tab %1").arg( mWidget->count()+1 ) );
break;
- case 2: mWidget->addTab( new QLabel( "Testlabel", mWidget ), QString("Tab %1").arg( mWidget->count()+1 ) );
+ case 2: mWidget->addTab( new TQLabel( "Testlabel", mWidget ), TQString("Tab %1").arg( mWidget->count()+1 ) );
break;
- case 3: mWidget->insertTab( new QWidget( mWidget), QString("Tab %1").arg( mWidget->count()+1 ), 1 );
+ case 3: mWidget->insertTab( new TQWidget( mWidget), TQString("Tab %1").arg( mWidget->count()+1 ), 1 );
}
}
@@ -187,11 +187,11 @@ void Test::toggleRightButton(bool state)
{
if (state) {
if ( !mRightWidget) {
- mRightWidget = new QToolButton( mWidget );
- QObject::connect( mRightWidget, SIGNAL( clicked() ), SLOT( removeCurrentTab() ) );
+ mRightWidget = new TQToolButton( mWidget );
+ TQObject::connect( mRightWidget, TQT_SIGNAL( clicked() ), TQT_SLOT( removeCurrentTab() ) );
mRightWidget->setIconSet( SmallIcon( "tab_remove" ) );
mRightWidget->setTextLabel("Close");
- mRightWidget->setTextPosition(QToolButton::Right);
+ mRightWidget->setTextPosition(TQToolButton::Right);
mRightWidget->adjustSize();
//mRightButton->setGeometry( 0, 0, h, h );
mRightWidget->setPopup(mRightPopup);
@@ -207,12 +207,12 @@ void Test::toggleRightPopup(bool state)
{
if (state) {
if (!mRightPopup) {
- mRightPopup = new QPopupMenu(this);
+ mRightPopup = new TQPopupMenu(this);
mRightPopup->insertItem(SmallIcon( "tab_remove" ), "Current Tab", 1);
mRightPopup->insertSeparator();
mRightPopup->insertItem(SmallIcon( "tab_remove" ), "Most Left Tab", 0);
mRightPopup->insertItem(SmallIcon( "tab_remove" ), "Most Right Tab", 2);
- connect(mRightPopup, SIGNAL(activated(int)), SLOT(rightPopupActivated(int)));
+ connect(mRightPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(rightPopupActivated(int)));
}
mRightWidget->setPopup(mRightPopup);
}
@@ -238,12 +238,12 @@ void Test::rightPopupActivated(int item)
void Test::toggleTabPosition(bool state)
{
- mWidget->setTabPosition(state ? QTabWidget::Bottom : QTabWidget::Top);
+ mWidget->setTabPosition(state ? TQTabWidget::Bottom : TQTabWidget::Top);
}
void Test::toggleTabShape(bool state)
{
- mWidget->setTabShape(state ? QTabWidget::Triangular : QTabWidget::Rounded);
+ mWidget->setTabShape(state ? TQTabWidget::Triangular : TQTabWidget::Rounded);
}
void Test::toggleCloseButtons(bool state)
@@ -251,12 +251,12 @@ void Test::toggleCloseButtons(bool state)
mWidget->setHoverCloseButton( state );
}
-void Test::contextMenu(QWidget *w, const QPoint &p)
+void Test::contextMenu(TQWidget *w, const TQPoint &p)
{
if (mContextPopup)
delete mContextPopup;
- mContextPopup = new QPopupMenu(this);
+ mContextPopup = new TQPopupMenu(this);
mContextPopup->insertItem( "Activate Tab", 4);
mContextPopup->insertSeparator();
mContextPopup->insertItem(SmallIcon( "konsole" ), "Set This Icon", 0);
@@ -264,7 +264,7 @@ void Test::contextMenu(QWidget *w, const QPoint &p)
mContextPopup->insertSeparator();
mContextPopup->insertItem( mWidget->isTabEnabled(w) ? "Disable Tab" : "Enable Tab", 2);
mContextPopup->insertItem( mWidget->tabToolTip(w).isEmpty() ? "Set Tooltip" : "Remove Tooltip", 3);
- connect(mContextPopup, SIGNAL(activated(int)), SLOT(contextMenuActivated(int)));
+ connect(mContextPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int)));
mContextWidget = w;
mContextPopup->popup(p);
@@ -290,17 +290,17 @@ void Test::contextMenuActivated(int item)
mContextPopup = 0;
}
-void Test::tabbarContextMenu(const QPoint &p)
+void Test::tabbarContextMenu(const TQPoint &p)
{
if (mTabbarContextPopup)
delete mTabbarContextPopup;
- mTabbarContextPopup = new QPopupMenu(this);
+ mTabbarContextPopup = new TQPopupMenu(this);
mTabbarContextPopup->insertItem(SmallIcon( "tab_new" ), mLeftWidget->isVisible() ? "Hide \"Add\" Button" : "Show \"Add\" Button", 0);
mTabbarContextPopup->insertItem(SmallIcon( "tab_remove" ), mRightWidget->isVisible() ? "Hide \"Remove\" Button" : "Show \"Remove\" Button", 1);
mTabbarContextPopup->insertSeparator();
- mTabbarContextPopup->insertItem(mWidget->tabPosition()==QTabWidget::Top ? "Put Tabbar to Bottom" : "Put Tabbar to Top", 2);
- connect(mTabbarContextPopup, SIGNAL(activated(int)), SLOT(tabbarContextMenuActivated(int)));
+ mTabbarContextPopup->insertItem(mWidget->tabPosition()==TQTabWidget::Top ? "Put Tabbar to Bottom" : "Put Tabbar to Top", 2);
+ connect(mTabbarContextPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(tabbarContextMenuActivated(int)));
mTabbarContextPopup->popup(p);
}
@@ -318,10 +318,10 @@ void Test::tabbarContextMenuActivated(int item)
mTabbarContextPopup = 0;
}
-void Test::mouseDoubleClick(QWidget *w)
+void Test::mouseDoubleClick(TQWidget *w)
{
bool ok;
- QString text = KInputDialog::getText(
+ TQString text = KInputDialog::getText(
"Rename Tab", "Enter new name:",
mWidget->label( mWidget->indexOf( w ) ), &ok, this );
if ( ok && !text.isEmpty() ) {
@@ -330,7 +330,7 @@ void Test::mouseDoubleClick(QWidget *w)
}
}
-void Test::mouseMiddleClick(QWidget *w)
+void Test::mouseMiddleClick(TQWidget *w)
{
if ( mWidget->count()==1 ) return;
diff --git a/kdeui/tests/ktabwidgettest.h b/kdeui/tests/ktabwidgettest.h
index cc96a24c6..2bd056cf8 100644
--- a/kdeui/tests/ktabwidgettest.h
+++ b/kdeui/tests/ktabwidgettest.h
@@ -2,22 +2,22 @@
#define KTABWIDGETTEST_H
#include <kiconloader.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include <ktabwidget.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
#include <stdlib.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <time.h>
-#include <qcheckbox.h>
-#include <qtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqtoolbutton.h>
class Test : public QVBox
{
Q_OBJECT
public:
- Test( QWidget* parent=0, const char *name =0 );
+ Test( TQWidget* parent=0, const char *name =0 );
private slots:
void addTab();
@@ -31,15 +31,15 @@ private slots:
void toggleCloseButtons(bool);
void toggleLabels(bool);
- void currentChanged(QWidget*);
- void contextMenu(QWidget*, const QPoint&);
- void tabbarContextMenu(const QPoint&);
- void testCanDecode(const QDragMoveEvent *, bool & /* result */);
- void receivedDropEvent( QDropEvent* );
- void initiateDrag( QWidget * );
- void receivedDropEvent( QWidget *, QDropEvent * );
- void mouseDoubleClick(QWidget*);
- void mouseMiddleClick(QWidget*);
+ void currentChanged(TQWidget*);
+ void contextMenu(TQWidget*, const TQPoint&);
+ void tabbarContextMenu(const TQPoint&);
+ void testCanDecode(const TQDragMoveEvent *, bool & /* result */);
+ void receivedDropEvent( TQDropEvent* );
+ void initiateDrag( TQWidget * );
+ void receivedDropEvent( TQWidget *, TQDropEvent * );
+ void mouseDoubleClick(TQWidget*);
+ void mouseMiddleClick(TQWidget*);
void movedTab( int, int );
void leftPopupActivated(int);
@@ -51,18 +51,18 @@ private:
KTabWidget* mWidget;
int mChange;
- QCheckBox * mLeftButton;
- QCheckBox * mRightButton;
- QCheckBox * mTabsBottom;
+ TQCheckBox * mLeftButton;
+ TQCheckBox * mRightButton;
+ TQCheckBox * mTabsBottom;
- QToolButton* mLeftWidget;
- QToolButton* mRightWidget;
+ TQToolButton* mLeftWidget;
+ TQToolButton* mRightWidget;
- QPopupMenu* mLeftPopup;
- QPopupMenu* mRightPopup;
- QPopupMenu* mTabbarContextPopup;
- QPopupMenu* mContextPopup;
- QWidget* mContextWidget;
+ TQPopupMenu* mLeftPopup;
+ TQPopupMenu* mRightPopup;
+ TQPopupMenu* mTabbarContextPopup;
+ TQPopupMenu* mContextPopup;
+ TQWidget* mContextWidget;
};
diff --git a/kdeui/tests/ktextedittest.cpp b/kdeui/tests/ktextedittest.cpp
index d37afab30..d43f77260 100644
--- a/kdeui/tests/ktextedittest.cpp
+++ b/kdeui/tests/ktextedittest.cpp
@@ -20,7 +20,7 @@
#include <kapplication.h>
#include <ktextedit.h>
-#include <qfile.h>
+#include <tqfile.h>
int main( int argc, char **argv )
{
@@ -29,7 +29,7 @@ int main( int argc, char **argv )
edit->setReadOnly( true );
edit->setCheckSpellingEnabled( true );
- QFile file( "ktextedittest.cpp" );
+ TQFile file( "ktextedittest.cpp" );
if ( file.open( IO_ReadOnly ) )
{
edit->setText( file.readAll() );
diff --git a/kdeui/tests/ktoolbarlabelactiontest.cpp b/kdeui/tests/ktoolbarlabelactiontest.cpp
index 8ff2ccb74..020834605 100644
--- a/kdeui/tests/ktoolbarlabelactiontest.cpp
+++ b/kdeui/tests/ktoolbarlabelactiontest.cpp
@@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kapplication.h>
#include <kmainwindow.h>
@@ -26,7 +26,7 @@
#include <ktoolbarlabelaction.h>
#include <ksqueezedtextlabel.h>
#include <kdebug.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <assert.h>
@@ -35,7 +35,7 @@ class MainWindow : public KMainWindow
public:
MainWindow()
{
- QVBox* main = new QVBox(this);
+ TQVBox* main = new TQVBox(this);
setCentralWidget(main);
KSqueezedTextLabel* accel = new KSqueezedTextLabel
@@ -65,7 +65,7 @@ public:
accel->setBuddy(lineEdit);
// third constructor
- QLabel* customLabel = new KSqueezedTextLabel
+ TQLabel* customLabel = new KSqueezedTextLabel
("&Really long, long, long and boring text goes here", this,
"kde toolbar widget");
diff --git a/kdeui/tests/kunbalancedgrdtest.cpp b/kdeui/tests/kunbalancedgrdtest.cpp
index ec3ce967b..7f5b2cc78 100644
--- a/kdeui/tests/kunbalancedgrdtest.cpp
+++ b/kdeui/tests/kunbalancedgrdtest.cpp
@@ -1,31 +1,31 @@
#include "kunbalancedgrdtest.h"
#include <kapplication.h>
#include <kpixmapeffect.h>
-#include <qpainter.h>
-#include <qstring.h>
-#include <qlayout.h>
+#include <tqpainter.h>
+#include <tqstring.h>
+#include <tqlayout.h>
int cols = 3, rows = 3; // how many
-KGradientWidget::KGradientWidget(QWidget *parent, const char *name)
- :QWidget(parent, name)
+KGradientWidget::KGradientWidget(TQWidget *parent, const char *name)
+ :TQWidget(parent, name)
{
time.start();
setMinimumSize(250 * cols, 250 * rows);
}
-void KGradientWidget::paintEvent(QPaintEvent *)
+void KGradientWidget::paintEvent(TQPaintEvent *)
{
int it, ft;
- QString say;
+ TQString say;
- QColor ca = Qt::black, cb = Qt::cyan;
+ TQColor ca = Qt::black, cb = Qt::cyan;
int x = 0, y = 0;
pix.resize(width()/cols, height()/rows);
- QPainter p(this);
+ TQPainter p(this);
p.setPen(Qt::white);
// draw once, so that the benchmarking be fair :-)
@@ -121,25 +121,25 @@ void KGradientWidget::paintEvent(QPaintEvent *)
p.drawText(5+(x++)*width()/rows, 15+y*height()/rows, say);
}
-myTopWidget::myTopWidget (QWidget *parent, const char *name)
- :QWidget(parent, name)
+myTopWidget::myTopWidget (TQWidget *parent, const char *name)
+ :TQWidget(parent, name)
{
- QGridLayout *lay = new QGridLayout (this, 2, 3, 0);
+ TQGridLayout *lay = new TQGridLayout (this, 2, 3, 0);
grds = new KGradientWidget(this);
lay->addMultiCellWidget(grds, 0, 0 ,0, 2);
- bLabel = new QLabel("Balance: X = 000; Y = 000", this);
+ bLabel = new TQLabel("Balance: X = 000; Y = 000", this);
lay->addWidget(bLabel, 1, 0);
- xSlider = new QSlider ( -200, 200, 1, 100, QSlider::Horizontal, this);
+ xSlider = new TQSlider ( -200, 200, 1, 100, TQSlider::Horizontal, this);
lay->addWidget(xSlider, 1, 1);
- ySlider = new QSlider ( -200, 200, 1, 100, QSlider::Horizontal, this);
+ ySlider = new TQSlider ( -200, 200, 1, 100, TQSlider::Horizontal, this);
lay->addWidget(ySlider, 1, 2);
- connect(xSlider, SIGNAL(valueChanged(int)), this, SLOT(rebalance()));
- connect(ySlider, SIGNAL(valueChanged(int)), this, SLOT(rebalance()));
+ connect(xSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(rebalance()));
+ connect(ySlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(rebalance()));
rebalance();
@@ -151,7 +151,7 @@ void myTopWidget::rebalance()
{
otime = time.elapsed();
- QString val; val.sprintf("Balance: X = %3d; Y = %3d",
+ TQString val; val.sprintf("Balance: X = %3d; Y = %3d",
xSlider->value(), ySlider->value());
bLabel->setText(val);
diff --git a/kdeui/tests/kunbalancedgrdtest.h b/kdeui/tests/kunbalancedgrdtest.h
index 6af7e4e92..bc282b1ce 100644
--- a/kdeui/tests/kunbalancedgrdtest.h
+++ b/kdeui/tests/kunbalancedgrdtest.h
@@ -7,24 +7,24 @@
#ifndef __KGRADIENT_TEST_H
#define __KGRADIENT_TEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kpixmap.h>
-#include <qslider.h>
-#include <qlabel.h>
-#include <qdatetime.h>
+#include <tqslider.h>
+#include <tqlabel.h>
+#include <tqdatetime.h>
class KGradientWidget : public QWidget
{
public:
- KGradientWidget(QWidget *parent=0, const char *name=0);
+ KGradientWidget(TQWidget *parent=0, const char *name=0);
void setBalance(int a, int b) { xbalance = a; ybalance = b; }
protected:
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
private:
KPixmap pix;
int xbalance, ybalance;
- QTime time;
+ TQTime time;
};
@@ -32,14 +32,14 @@ class myTopWidget: public QWidget
{
Q_OBJECT
public:
- myTopWidget(QWidget *parent=0, const char *name=0);
+ myTopWidget(TQWidget *parent=0, const char *name=0);
private:
- QLabel *bLabel;
- QSlider *xSlider, *ySlider;
+ TQLabel *bLabel;
+ TQSlider *xSlider, *ySlider;
KGradientWidget *grds;
- QTime time;
+ TQTime time;
int itime, otime;
diff --git a/kdeui/tests/kwindowtest.cpp b/kdeui/tests/kwindowtest.cpp
index ae19dd7e3..288ab554f 100644
--- a/kdeui/tests/kwindowtest.cpp
+++ b/kdeui/tests/kwindowtest.cpp
@@ -1,10 +1,10 @@
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qpixmap.h>
-#include <qkeycode.h>
-#include <qwidget.h>
-#include <qstring.h>
-#include <qcursor.h>
+#include <tqmessagebox.h>
+#include <tqpopupmenu.h>
+#include <tqpixmap.h>
+#include <tqkeycode.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqcursor.h>
#include <stdlib.h>
@@ -17,7 +17,7 @@
#include <ktoolbarradiogroup.h>
#include <kiconloader.h>
#include <kpopupmenu.h>
-#include <qmultilineedit.h>
+#include <tqmultilineedit.h>
#include "kwindowtest.h"
#include <kglobal.h>
@@ -37,7 +37,7 @@
static int itemId = 0;
-testWindow::testWindow (QWidget *parent, const char *name)
+testWindow::testWindow (TQWidget *parent, const char *name)
: KMainWindow (parent,name)
{
ena=false;
@@ -56,13 +56,13 @@ setAutoSaveSettings();
// We insert item "Exit" with accelerator ALT-Q, and connect
// it to application's exit-slot.
fileMenu->insertItem ("&Exit", KApplication::kApplication(),
- SLOT( quit() ), ALT + Key_Q );
+ TQT_SLOT( quit() ), ALT + Key_Q );
// Another popup...
toolBarMenu = new QPopupMenu;
menuBar->insertItem ("&Toolbars", toolBarMenu);
- toolBarMenu->insertItem ("(Un)Hide tollbar 1", this, SLOT(slotHide1()));
- toolBarMenu->insertItem ("(Un)Hide tollbar 2", this, SLOT(slotHide2()));
+ toolBarMenu->insertItem ("(Un)Hide tollbar 1", this, TQT_SLOT(slotHide1()));
+ toolBarMenu->insertItem ("(Un)Hide tollbar 2", this, TQT_SLOT(slotHide2()));
itemsMenu = new QPopupMenu;
menuBar->insertItem ("&Items", itemsMenu);
@@ -71,15 +71,15 @@ setAutoSaveSettings();
lineL = true; // Lined is enabled
greenF = false; // Frame not inserted
- itemsMenu->insertItem ("delete/insert exit button", this, SLOT(slotExit()));
- itemsMenu->insertItem ("insert/delete green frame!", this, SLOT(slotFrame()));
- itemsMenu->insertItem ("enable/disable Lined", this, SLOT(slotLined()));
- itemsMenu->insertItem ("Toggle fileNew", this, SLOT(slotNew()));
- itemsMenu->insertItem ("Clear comboBox", this, SLOT(slotClearCombo()));
- itemsMenu->insertItem ("Insert List in Combo", this, SLOT(slotInsertListInCombo()));
- itemsMenu->insertItem ("Make item 3 curent", this, SLOT(slotMakeItem3Current()));
- //itemsMenu->insertItem ("Insert clock!", this, SLOT(slotInsertClock()));
- itemsMenu->insertItem ("Important!", this, SLOT(slotImportant()));
+ itemsMenu->insertItem ("delete/insert exit button", this, TQT_SLOT(slotExit()));
+ itemsMenu->insertItem ("insert/delete green frame!", this, TQT_SLOT(slotFrame()));
+ itemsMenu->insertItem ("enable/disable Lined", this, TQT_SLOT(slotLined()));
+ itemsMenu->insertItem ("Toggle fileNew", this, TQT_SLOT(slotNew()));
+ itemsMenu->insertItem ("Clear comboBox", this, TQT_SLOT(slotClearCombo()));
+ itemsMenu->insertItem ("Insert List in Combo", this, TQT_SLOT(slotInsertListInCombo()));
+ itemsMenu->insertItem ("Make item 3 curent", this, TQT_SLOT(slotMakeItem3Current()));
+ //itemsMenu->insertItem ("Insert clock!", this, TQT_SLOT(slotInsertClock()));
+ itemsMenu->insertItem ("Important!", this, TQT_SLOT(slotImportant()));
menuBar->insertSeparator();
helpMenu = new KHelpMenu(this, "KWindowTest was programmed by Sven Radej");
@@ -93,7 +93,7 @@ setAutoSaveSettings();
statusBar->insertItem("Look for tooltips to see functions", 1);
//DigitalClock *clk = new DigitalClock (statusBar);
- //clk->setFrameStyle(QFrame::NoFrame);
+ //clk->setFrameStyle(TQFrame::NoFrame);
//statusBar->insertWidget(clk, 70, 2);
/***********************/
@@ -101,7 +101,7 @@ setAutoSaveSettings();
/***********************/
// pixmap which we will use
- QPixmap pix;
+ TQPixmap pix;
// Create toolbar...
tb = toolBar();
@@ -113,30 +113,30 @@ setAutoSaveSettings();
// First four buttons
pix = BarIcon("filenew");
- itemId = tb->insertButton(pix, 0, SIGNAL(clicked()), this, SLOT(slotNew()),
+ itemId = tb->insertButton(pix, 0, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNew()),
true, "Create.. (toggles upper button)", 50);
pix = BarIcon("fileopen");
- tb->insertButton(pix, 1, SIGNAL(clicked()), this, SLOT(slotOpen()),
+ tb->insertButton(pix, 1, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpen()),
false, "Open");
pix = BarIcon("filefloppy");
- tb->insertButton(pix, 2, SIGNAL(clicked()), this, SLOT(slotSave()),
+ tb->insertButton(pix, 2, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSave()),
true, "Save (beep or delayed popup)");
tb->setDelayedPopup(2, itemsMenu);
pix = BarIcon("fileprint");
- tb->insertButton(pix, 3, SIGNAL(clicked()), this, SLOT(slotPrint()),
+ tb->insertButton(pix, 3, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPrint()),
true, "Print (enables/disables open)");
// And a combobox
// arguments: text (or strList), ID, writable, signal, object, slot, enabled,
// tooltiptext, size
- tb->insertCombo (QString("one"), 4, true, SIGNAL(activated(const QString&)), this,
- SLOT(slotList(const QString&)), true, "ComboBox", 150);
+ tb->insertCombo (TQString("one"), 4, true, TQT_SIGNAL(activated(const TQString&)), this,
+ TQT_SLOT(slotList(const TQString&)), true, "ComboBox", 150);
// Then one line editor
// arguments: text, id, signal, object (this), slot, enabled, tooltiptext, size
- tb->insertLined ("ftp://ftp.kde.org/pub/kde", 5, SIGNAL(returnPressed()), this,
- SLOT(slotReturn()), true, "Location", 200);
+ tb->insertLined ("ftp://ftp.kde.org/pub/kde", 5, TQT_SIGNAL(returnPressed()), this,
+ TQT_SLOT(slotReturn()), true, "Location", 200);
// Set this Lined to auto size itself. Note that only one item (Lined or Combo)
// Can be set to autosize; If you specify more of them only last (according to
@@ -148,27 +148,27 @@ setAutoSaveSettings();
// Now add another button and align it right
pix = BarIcon("exit");
- tb->insertButton(pix, 6, SIGNAL(clicked()), KApplication::kApplication(),
- SLOT( quit() ), true, "Exit");
+ tb->insertButton(pix, 6, TQT_SIGNAL(clicked()), KApplication::kApplication(),
+ TQT_SLOT( quit() ), true, "Exit");
tb->alignItemRight (6);
// Another toolbar
- tb1 = new KToolBar(this, QMainWindow::DockTop); // this one is normal and has separators
+ tb1 = new KToolBar(this, TQMainWindow::DockTop); // this one is normal and has separators
pix = BarIcon("filenew");
tb1->insertButton(pix, 0, true, "Create new file2 (Toggle)");
tb1->setToggle(0);
- tb1->addConnection (0, SIGNAL(toggled(bool)), this, SLOT(slotToggle(bool)));
+ tb1->addConnection (0, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggle(bool)));
pix = BarIcon("fileopen");
- tb1->insertButton(pix, 1, SIGNAL(clicked()), this, SLOT(slotOpen()),
+ tb1->insertButton(pix, 1, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpen()),
true, "Open (starts progres in sb)");
tb1->insertSeparator ();
pix = BarIcon("filefloppy");
- tb1->insertButton(pix, 2, SIGNAL(clicked()), this, SLOT(slotSave()),
+ tb1->insertButton(pix, 2, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSave()),
true, "Save file2 (autorepeat)");
tb1->setAutoRepeat(2);
@@ -201,14 +201,14 @@ setAutoSaveSettings();
rg->addButton(6);
rg->addButton(7);
- connect (tb1, SIGNAL(toggled(int)), this, SLOT(slotToggled(int)));
+ connect (tb1, TQT_SIGNAL(toggled(int)), this, TQT_SLOT(slotToggled(int)));
// Set caption for floating toolbars
tb->setTitle ("Toolbar 1");
tb1->setTitle ("Toolbar 2");
// Set main widget. In this example it is Qt's multiline editor.
- widget = new QMultiLineEdit (this);
+ widget = new TQMultiLineEdit (this);
// Setup is now complete
@@ -216,8 +216,8 @@ setAutoSaveSettings();
//addToolBar (tb1);
//addToolBar (tb);
- connect (tb, SIGNAL(highlighted(int,bool)), this, SLOT(slotMessage(int, bool)));
- connect (tb1, SIGNAL(highlighted(int, bool)), this, SLOT(slotMessage(int, bool)));
+ connect (tb, TQT_SIGNAL(highlighted(int,bool)), this, TQT_SLOT(slotMessage(int, bool)));
+ connect (tb1, TQT_SIGNAL(highlighted(int, bool)), this, TQT_SLOT(slotMessage(int, bool)));
// Floating is enabled by default, so you don't need this.
// tb->enableFloating(true);
@@ -243,7 +243,7 @@ setAutoSaveSettings();
completions->insertItem("/home/");
completions->insertItem("/vmlinuz :-)");
- connect (completions, SIGNAL(activated(int)), this, SLOT(slotCompletionsMenu(int)));
+ connect (completions, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotCompletionsMenu(int)));
pr = 0;
}
/***********************************/
@@ -257,7 +257,7 @@ void testWindow::slotToggled(int)
void testWindow::slotInsertClock()
{
//DigitalClock *clock = new DigitalClock(tb1);
- //clock->setFrameStyle(QFrame::NoFrame);
+ //clock->setFrameStyle(TQFrame::NoFrame);
//tb1->insertWidget(8, 70, clock);
}
@@ -269,11 +269,11 @@ void testWindow::slotNew()
void testWindow::slotOpen()
{
if (pr == 0)
- pr = new QProgressBar (statusBar);
+ pr = new TQProgressBar (statusBar);
// statusBar->message(pr);
- timer = new QTimer (pr);
+ timer = new TQTimer (pr);
- connect (timer, SIGNAL(timeout()), this, SLOT(slotGoGoGoo()));
+ connect (timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotGoGoGoo()));
timer->start(100);
}
@@ -303,14 +303,14 @@ void testWindow::slotPrint()
}
void testWindow::slotReturn()
{
- QString s = "You entered ";
+ TQString s = "You entered ";
s = s + tb->getLinedText(5);
statusBar->changeItem(s, 0);
}
-void testWindow::slotList(const QString &str)
+void testWindow::slotList(const TQString &str)
{
- QString s = "You chose ";
+ TQString s = "You chose ";
s = s + str;
statusBar->changeItem(s, 0);
}
@@ -319,13 +319,13 @@ void testWindow::slotCompletion()
{
// Now do a completion
// Call your completing function and set that text in klined
- // QString s = tb->getLinedText(/* ID */ 4)
- // QString completed = complete (s);
+ // TQString s = tb->getLinedText(/* ID */ 4)
+ // TQString completed = complete (s);
// tb->setLinedText(/* ID */ 4, completed.data())
// for now this:
- completions->popup(QCursor::pos()); // This popup should understunf keys up and down
+ 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
@@ -340,7 +340,7 @@ void testWindow::slotListCompletion()
Combo is not behaving good and it is ugly. I will see how it behaves in Qt-1.3,
and then decide should I make a new combobox.
*/
- QString s(tb->getComboItem(4)); // get text in combo
+ TQString s(tb->getComboItem(4)); // get text in combo
s+= "(completing)";
//tb->getCombo(4)->changeItem(s.data()); // setTextIncombo
@@ -349,7 +349,7 @@ void testWindow::slotListCompletion()
void testWindow::slotCompletionsMenu(int id)
{
// Now set text in lined
- QString s =completions->text(id);
+ TQString s =completions->text(id);
tb->setLinedText(5, s); // Cursor is automatically at the end of string after this
}
@@ -406,10 +406,10 @@ void testWindow::slotExit ()
}
else
{
- QPixmap pix;
+ TQPixmap pix;
pix = BarIcon("exit");
- tb->insertButton(pix, 6, SIGNAL(clicked()), KApplication::kApplication(),
- SLOT( quit() ), true, "Exit");
+ tb->insertButton(pix, 6, TQT_SIGNAL(clicked()), KApplication::kApplication(),
+ TQT_SLOT( quit() ), true, "Exit");
tb->alignItemRight (6);
exitB = true;
}
@@ -437,7 +437,7 @@ void testWindow::slotFrame()
tb1->insertFrame(10, 100);
tb1->alignItemRight (10); // this is pointless 'cause tb1 is not fullwidth
- QFrame *myFrame = tb1->getFrame(10); // get frame pointer
+ TQFrame *myFrame = tb1->getFrame(10); // get frame pointer
if (myFrame == 0)
{
@@ -450,7 +450,7 @@ void testWindow::slotFrame()
// And don't move it
// If you want to have something right from your toolbar you can reduce its
// max_width with setMaxWidth()
- myFrame->setBackgroundColor (QColor("green"));
+ myFrame->setBackgroundColor (TQColor("green"));
greenF = true;
}
@@ -478,7 +478,7 @@ void testWindow::slotClearCombo()
void testWindow::slotInsertListInCombo()
{
- QStringList list;
+ TQStringList list;
list.append("ListOne");
list.append("ListTwo");
list.append("ListThree");
@@ -509,7 +509,7 @@ int main( int argc, char *argv[] )
myApp->setMainWidget(test);
- i = QMessageBox::information(0, "Select", "Select type of mainwidget",
+ i = TQMessageBox::information(0, "Select", "Select type of mainwidget",
"Fixed", "Y-fixed", "Resizable");
if (i == 0)
test->beFixed();
diff --git a/kdeui/tests/kwindowtest.h b/kdeui/tests/kwindowtest.h
index c041d7723..4441b6caa 100644
--- a/kdeui/tests/kwindowtest.h
+++ b/kdeui/tests/kwindowtest.h
@@ -1,9 +1,9 @@
#ifndef testwindow_h
#define testwindow_h
-#include <qpopupmenu.h>
-#include <qtimer.h>
-#include <qprogressbar.h>
+#include <tqpopupmenu.h>
+#include <tqtimer.h>
+#include <tqprogressbar.h>
#include <kmenubar.h>
#include <kstatusbar.h>
#include <ktoolbar.h>
@@ -18,7 +18,7 @@ class testWindow : public KMainWindow
Q_OBJECT
public:
- testWindow (QWidget *parent=0, const char *name=0);
+ testWindow (TQWidget *parent=0, const char *name=0);
~testWindow ();
public slots:
@@ -29,7 +29,7 @@ public slots:
void slotPrint();
void slotReturn();
void slotSave();
- void slotList(const QString &str);
+ void slotList(const TQString &str);
void slotOpen();
void slotCompletion();
void slotCompletionsMenu(int id);
@@ -50,10 +50,10 @@ public slots:
void slotToggled(int);
protected:
KMenuBar *menuBar;
- QPopupMenu *fileMenu;
- QPopupMenu *itemsMenu;
- QPopupMenu *completions;
- QPopupMenu *toolBarMenu;
+ TQPopupMenu *fileMenu;
+ TQPopupMenu *itemsMenu;
+ TQPopupMenu *completions;
+ TQPopupMenu *toolBarMenu;
KStatusBar *statusBar;
KHelpMenu *helpMenu;
KToolBar *tb;
@@ -62,9 +62,9 @@ protected:
bool exitB;
bool greenF;
bool ena;
- QMultiLineEdit *widget;
- QTimer *timer;
- QProgressBar *pr;
+ TQMultiLineEdit *widget;
+ TQTimer *timer;
+ TQProgressBar *pr;
KToolBarRadioGroup *rg;
};
#endif
diff --git a/kdeui/tests/kwizardtest.cpp b/kdeui/tests/kwizardtest.cpp
index 2d5f7e288..960929f8c 100644
--- a/kdeui/tests/kwizardtest.cpp
+++ b/kdeui/tests/kwizardtest.cpp
@@ -18,8 +18,8 @@
*
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kwizard.h>
@@ -27,20 +27,20 @@ int main(int argc, char **argv)
{
KApplication a(argc,argv,"kwizardtest");
KWizard *wiz = new KWizard(0, "kwizardtest", false);
- QObject::connect((QObject*) wiz->cancelButton(), SIGNAL(clicked()),
- &a, SLOT(quit()));
- QObject::connect((QObject*) wiz->finishButton(), SIGNAL(clicked()),
- &a, SLOT(quit()));
+ TQObject::connect((TQObject*) wiz->cancelButton(), TQT_SIGNAL(clicked()),
+ &a, TQT_SLOT(quit()));
+ TQObject::connect((TQObject*) wiz->finishButton(), TQT_SIGNAL(clicked()),
+ &a, TQT_SLOT(quit()));
for(int i = 1; i < 11; i++)
{
- QWidget *p = new QWidget;
- QString msg = QString("This is page %1 out of 10").arg(i);
- QLabel *label = new QLabel(msg, p);
- QHBoxLayout *layout = new QHBoxLayout(p, 5);
+ TQWidget *p = new QWidget;
+ TQString msg = TQString("This is page %1 out of 10").arg(i);
+ TQLabel *label = new TQLabel(msg, p);
+ TQHBoxLayout *layout = new TQHBoxLayout(p, 5);
label->setAlignment(Qt::AlignCenter);
label->setFixedSize(300, 200);
layout->addWidget(label);
- QString title = QString("%1. page").arg(i);
+ TQString title = TQString("%1. page").arg(i);
wiz->addPage(p, title);
wiz->setFinishEnabled(p, (i==10));
}
diff --git a/kdeui/tests/kwordwraptest.cpp b/kdeui/tests/kwordwraptest.cpp
index 60a35b394..ad60bd897 100644
--- a/kdeui/tests/kwordwraptest.cpp
+++ b/kdeui/tests/kwordwraptest.cpp
@@ -18,17 +18,17 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kwordwrap.h"
int main(int argc, char *argv[])
{
KApplication app(argc, argv, "KWordWrapTest");
- QFont font( "helvetica", 12 ); // let's hope we all have the same...
- QFontMetrics fm( font );
- QRect r( 0, 0, 100, -1 );
- QString str = "test wadabada [/foo/bar/waba]";
+ TQFont font( "helvetica", 12 ); // let's hope we all have the same...
+ TQFontMetrics fm( font );
+ TQRect r( 0, 0, 100, -1 );
+ TQString str = "test wadabada [/foo/bar/waba]";
KWordWrap* ww = KWordWrap::formatText( fm, r, 0, str );
kdDebug() << str << " => " << ww->truncatedString() << endl;
delete ww;
diff --git a/kdeui/tests/kxmlguitest.cpp b/kdeui/tests/kxmlguitest.cpp
index 949eb03c4..a903aeb3f 100644
--- a/kdeui/tests/kxmlguitest.cpp
+++ b/kdeui/tests/kxmlguitest.cpp
@@ -8,8 +8,8 @@
#include <kdebug.h>
#include <kstdaction.h>
#include <kstandarddirs.h>
-#include <qlineedit.h>
-#include <qdir.h>
+#include <tqlineedit.h>
+#include <tqdir.h>
void Client::slotSec()
{
@@ -22,11 +22,11 @@ int main( int argc, char **argv )
// KXMLGUIClient looks in the "data" resource for the .rc files
// Let's add $PWD (ideally $srcdir instead...) to it
- KGlobal::dirs()->addResourceDir( "data", QDir::currentDirPath() );
+ KGlobal::dirs()->addResourceDir( "data", TQDir::currentDirPath() );
KMainWindow *mainwindow = new KMainWindow;
- QLineEdit* line = new QLineEdit( mainwindow );
+ TQLineEdit* line = new TQLineEdit( mainwindow );
mainwindow->setCentralWidget( line );
mainwindow->show();
@@ -37,7 +37,7 @@ int main( int argc, char **argv )
Client *shell = new Client;
shell->setInstance( new KInstance( "konqueror" ) );
- shell->instance()->dirs()->addResourceDir( "data", QDir::currentDirPath() );
+ shell->instance()->dirs()->addResourceDir( "data", TQDir::currentDirPath() );
(void)new KAction( "Split", "view_left_right", 0, 0, 0, shell->actionCollection(), "splitviewh" );
@@ -48,7 +48,7 @@ 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, SLOT( slotSec() ), part->actionCollection(), "security" );
+ (void)new KAction( "sec", "unlock", Qt::ALT + Qt::Key_1, part, TQT_SLOT( slotSec() ), part->actionCollection(), "security" );
part->setXMLFile( "./kxmlguitest_part.rc" );
diff --git a/kdeui/tests/kxmlguitest.h b/kdeui/tests/kxmlguitest.h
index de651e8a9..1adb1a14b 100644
--- a/kdeui/tests/kxmlguitest.h
+++ b/kdeui/tests/kxmlguitest.h
@@ -2,15 +2,15 @@
#define KXMLGUITEST_H
#include <kxmlguiclient.h>
-#include <qobject.h>
+#include <tqobject.h>
-class Client : public QObject, public KXMLGUIClient
+class Client : public TQObject, public KXMLGUIClient
{
Q_OBJECT
public:
Client() {}
- void setXMLFile( const QString &f, bool merge = true ) { KXMLGUIClient::setXMLFile( f, merge ); }
+ void setXMLFile( const TQString &f, bool merge = true ) { KXMLGUIClient::setXMLFile( f, merge ); }
void setInstance( KInstance *inst ) { KXMLGUIClient::setInstance( inst ); }
public slots:
diff --git a/kdeui/tests/qxembedtest.cpp b/kdeui/tests/qxembedtest.cpp
index 513231051..5e870ba8f 100644
--- a/kdeui/tests/qxembedtest.cpp
+++ b/kdeui/tests/qxembedtest.cpp
@@ -1,11 +1,11 @@
#include <stdlib.h>
#include <stdio.h>
-#include "qapplication.h"
-#include "qpushbutton.h"
-#include "qlineedit.h"
-#include "qhbox.h"
-#include "qvbox.h"
+#include "tqapplication.h"
+#include "tqpushbutton.h"
+#include "tqlineedit.h"
+#include "tqhbox.h"
+#include "tqvbox.h"
#include "qxembed.h"
WId windowWithName(const char *);
@@ -23,13 +23,13 @@ main(int argc, char**argv)
}
- QApplication a(argc,argv);
+ TQApplication a(argc,argv);
- QWidget *main = new QVBox(NULL,"main",Qt::WDestructiveClose);
- QWidget *top = new QHBox(main);
- QPushButton *quit = new QPushButton("Quit", top);
- QObject::connect( quit, SIGNAL(clicked()), main, SLOT(close()) );
- QLineEdit *edit = new QLineEdit(top);
+ TQWidget *main = new TQVBox(NULL,"main",Qt::WDestructiveClose);
+ TQWidget *top = new TQHBox(main);
+ TQPushButton *quit = new TQPushButton("Quit", top);
+ TQObject::connect( quit, TQT_SIGNAL(clicked()), main, TQT_SLOT(close()) );
+ TQLineEdit *edit = new TQLineEdit(top);
edit->setText( "Just to see focus changes");
QXEmbed *embed = new QXEmbed(main);
embed->setProtocol(QXEmbed::XPLAIN);
@@ -57,7 +57,7 @@ main(int argc, char**argv)
#include <X11/Xlib.h>
-#include <qpaintdevice.h>
+#include <tqpaintdevice.h>
// This is lifted from X11 xprop.