diff options
Diffstat (limited to 'tdeui')
272 files changed, 5874 insertions, 5871 deletions
diff --git a/tdeui/AUTHORS b/tdeui/AUTHORS index 9e7ce9592..812999b79 100644 --- a/tdeui/AUTHORS +++ b/tdeui/AUTHORS @@ -2,15 +2,15 @@ Dawit Alemayehu <adawit@earthlink.net> KLineEdit, KComboBox Espen Sand <espen@kde.org>: -KDialogBase, KAboutDialog (based on work by Mirko), KHelpMenu, KTextBrowser +KDialogBase, TDEAboutDialog (based on work by Mirko), KHelpMenu, KTextBrowser and various adjustments here and there. Daniel M. Duley <mosfet@kde.org> -Maintainer of KPixmapEffect, KStyle, KThemeStyle, and KThemeBase - as well as +Maintainer of KPixmapEffect, TDEStyle, KThemeStyle, and KThemeBase - as well as general misc coding here and there. Matthias Kalle Dalheimer <kalle@kde.org>: -classes KApplication, KConfig, KTextStream, KColorSet, +classes TDEApplication, TDEConfig, KTextStream, KColorSet, automake, autoconf, maintenance Richard Moore <moorer@cs.man.ac.uk>: @@ -23,21 +23,21 @@ Steffen Hansen <stefh@dit.ou.dk>: KURL class Torben Weis <weis@stud.uni-frankfurt.de> -DnD stuff, KSocket and KServerSocket classes, KPixmap +DnD stuff, TDESocket and TDEServerSocket classes, KPixmap Alexander Sanda <alex@darkstar.ping.at> Read and write numerical config entries, KPanner, KTabControl, -KPopupMenu, KMessageBox, KEdit widgets. +TDEPopupMenu, KMessageBox, KEdit widgets. Martin Jones <mjones@powerup.com.au> -Bugfixes in KPixmap and KURL, KColorDialog, KSelector +Bugfixes in KPixmap and KURL, KColorDialog, TDESelector KColorButton Keith Brown <kbrown@pdq.net> KTreeList class Bernd Johannes Wuebben <wuebben@math.cornell.edu> -KFontDialog class +TDEFontDialog class Tim D. Gilman <tdgilman@best.com> KDatePicker, KDateTable class @@ -46,10 +46,10 @@ Nicolas Hadacek <hadacek@kde.org> Key configuration classes, bug fixes Christoph Neerfeld <Christoph.Neerfeld@mail.bonn.netsurf.de> -KIconLoader class +TDEIconLoader class Sven Radej <sven.radej@iname.com> -KLineEdit, KCombo, KToolbar, KStatusBar +KLineEdit, KCombo, TDEToolbar, KStatusBar Rainer Bawidamann <Rainer.Bawidamann@wohnheim.uni-ulm.de> Rubberbanding in KTreeList @@ -61,11 +61,11 @@ Michael Wiedmann <mw@miwie.in-berlin.de> KRestrictedLine, KIntegerLine Matthias Ettrich <ettrich@kde.org> -KWMModuleApplication, tearing/docking of ktoolbar and kmenubar, heavy +KWMModuleApplication, tearing/docking of tdetoolbar and kmenubar, heavy modifications to kbutton Stephan Kulow <coolo@kde.org> -first versions of KTopLevelWidget and KToolBar, heavy modifications to +first versions of KTopLevelWidget and TDEToolBar, heavy modifications to automake and autoconf Joerg Habenicht <j.habenicht@europemail.com> @@ -93,5 +93,5 @@ Falk Brettschneider <gigafalk@yahoo.com> contributes for the Dockwidget class set Holger Freyther <freyther@yahoo.com> -KDialogBase, KGuiItem, KStdGuiItem, KAction, +KDialogBase, KGuiItem, KStdGuiItem, TDEAction, added KMessageBox::questionYesNoCancel( ) diff --git a/tdeui/CMakeLists.txt b/tdeui/CMakeLists.txt index 9ff7efc91..8cff8df1c 100644 --- a/tdeui/CMakeLists.txt +++ b/tdeui/CMakeLists.txt @@ -25,9 +25,9 @@ include_directories( ${CMAKE_SOURCE_DIR}/dcop ${CMAKE_SOURCE_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdefx - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kio/kfile + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefile ${FREETYPE_INCLUDE_DIRS} ) @@ -40,10 +40,10 @@ link_directories( install( FILES kprogressbox.h kprogress.h kcolordlg.h - kcolordialog.h kselect.h - kdatepik.h kdatepicker.h kdatetbl.h kfontdialog.h kpopupmenu.h - kfontrequester.h ktabctl.h kstatusbar.h - kmainwindow.h kmainwindowiface.h ktoolbar.h kmenubar.h + kcolordialog.h tdeselect.h + kdatepik.h kdatepicker.h kdatetbl.h tdefontdialog.h tdepopupmenu.h + tdefontrequester.h ktabctl.h kstatusbar.h + tdemainwindow.h tdemainwindowiface.h tdetoolbar.h tdemenubar.h knuminput.h kseparator.h klineedit.h krestrictedline.h kcolorbutton.h kcolorbtn.h ksystemtray.h kdockwindow.h kbuttonbox.h @@ -53,30 +53,30 @@ install( FILES klineeditdlg.h kinputdialog.h kactivelabel.h kcharselect.h kcolordrag.h qxembed.h knumvalidator.h kdialog.h kdialogbase.h - kjanuswidget.h kaboutdialog.h - kauthicon.h kmessagebox.h ksharedpixmap.h - kdualcolorbtn.h kdualcolorbutton.h ktoolbarbutton.h - ktoolbarradiogroup.h ktextbrowser.h - kaction.h kactioncollection.h kactionclasses.h khelpmenu.h kswitchlanguagedialog.h - kcmodule.h kcmenumngr.h kpanelmenu.h kpanelappmenu.h - kactionshortcutlist.h kstdaction.h kcombobox.h - kiconview.h klistview.h klistbox.h kbugreport.h kpassdlg.h + kjanuswidget.h tdeaboutdialog.h + kauthicon.h tdemessagebox.h ksharedpixmap.h + kdualcolorbtn.h kdualcolorbutton.h tdetoolbarbutton.h + tdetoolbarradiogroup.h ktextbrowser.h + tdeaction.h tdeactioncollection.h tdeactionclasses.h khelpmenu.h kswitchlanguagedialog.h + tdecmodule.h kcmenumngr.h kpanelmenu.h kpanelappmenu.h + tdeactionshortcutlist.h kstdaction.h kcombobox.h + kiconview.h tdelistview.h tdelistbox.h kbugreport.h kpassdlg.h kxmlguiclient.h kxmlgui.h kxmlguibuilder.h kxmlguifactory.h kpixmapio.h kwordwrap.h kedittoolbar.h kdockwidget.h kanimwidget.h - krootpixmap.h kaboutkde.h kaboutapplication.h + krootpixmap.h tdeabouttde.h tdeaboutapplication.h kpanelapplet.h kpushbutton.h kdcopactionproxy.h kcolorcombo.h - kpanelextension.h kcompletionbox.h ksqueezedtextlabel.h - kcommand.h twindowlistmenu.h kfontcombo.h kaccelgen.h ktip.h + kpanelextension.h tdecompletionbox.h ksqueezedtextlabel.h + kcommand.h twindowlistmenu.h tdefontcombo.h tdeaccelgen.h ktip.h kdatewidget.h karrowbutton.h kguiitem.h kstdguiitem.h kstringvalidator.h twindowinfo.h ktextedit.h kpassivepopup.h kdatetimewidget.h ktimewidget.h ktimezonewidget.h kscrollview.h - kspell.h ksconfig.h kspelldlg.h ksyntaxhighlighter.h - ktabbar.h ktabwidget.h ksplashscreen.h kconfigdialog.h - kactionselector.h klanguagebutton.h klistviewsearchline.h + tdespell.h ksconfig.h tdespelldlg.h ksyntaxhighlighter.h + ktabbar.h ktabwidget.h ksplashscreen.h tdeconfigdialog.h + tdeactionselector.h klanguagebutton.h tdelistviewsearchline.h kpixmapregionselectorwidget.h kpixmapregionselectordialog.h - kiconviewsearchline.h ktoolbarlabelaction.h kshortcutdialog.h + kiconviewsearchline.h tdetoolbarlabelaction.h tdeshortcutdialog.h DESTINATION ${INCLUDE_INSTALL_DIR} ) @@ -101,48 +101,48 @@ set( target tdeui ) set( ${target}_SRCS qxembed.cpp ksharedpixmap.cpp kpixmapio.cpp - kpopupmenu.cpp ktoolbar.cpp kaction.cpp kstdaction.cpp - kactioncollection.cpp kactionclasses.cpp - kurllabel.cpp kmenubar.cpp kinputdialog.cpp - knuminput.cpp klineedit.cpp klistview.cpp kprogress.cpp - kprogressbox.cpp kcolordialog.cpp kselect.cpp kdatepicker.cpp - kdatetbl.cpp kfontrequester.cpp kfontdialog.cpp ktabctl.cpp - kstatusbar.cpp kmainwindow.cpp + tdepopupmenu.cpp tdetoolbar.cpp tdeaction.cpp kstdaction.cpp + tdeactioncollection.cpp tdeactionclasses.cpp + kurllabel.cpp tdemenubar.cpp kinputdialog.cpp + knuminput.cpp klineedit.cpp tdelistview.cpp kprogress.cpp + kprogressbox.cpp kcolordialog.cpp tdeselect.cpp kdatepicker.cpp + kdatetbl.cpp tdefontrequester.cpp tdefontdialog.cpp ktabctl.cpp + kstatusbar.cpp tdemainwindow.cpp keditlistbox.cpp kscrollview.cpp kseparator.cpp krestrictedline.cpp kcolorbutton.cpp ksystemtray.cpp kbuttonbox.cpp keditcl1.cpp keditcl2.cpp kled.cpp - kshortcutdialog_simple.ui kshortcutdialog_advanced.ui - kshortcutdialog.cpp kkeybutton.cpp kkeydialog.cpp + tdeshortcutdialog_simple.ui tdeshortcutdialog_advanced.ui + tdeshortcutdialog.cpp kkeybutton.cpp kkeydialog.cpp kruler.cpp kcursor.cpp klineeditdlg.cpp kcharselect.cpp kcolordrag.cpp knumvalidator.cpp kdialog.cpp kdialogbase.cpp - kjanuswidget.cpp kaboutdialog.cpp - kauthicon.cpp kmessagebox.cpp kdualcolorbutton.cpp - ktoolbarradiogroup.cpp ktoolbarbutton.cpp + kjanuswidget.cpp tdeaboutdialog.cpp + kauthicon.cpp tdemessagebox.cpp kdualcolorbutton.cpp + tdetoolbarradiogroup.cpp tdetoolbarbutton.cpp ktextbrowser.cpp khelpmenu.cpp kswitchlanguagedialog.cpp kcmenumngr.cpp kpanelmenu.cpp - kiconview.cpp klistbox.cpp kwordwrap.cpp kbugreport.cpp + kiconview.cpp tdelistbox.cpp kwordwrap.cpp kbugreport.cpp kcombobox.cpp kpassdlg.cpp kxmlguiclient.cpp kxmlguifactory.cpp kxmlguifactory_p.cpp kxmlguibuilder.cpp kedittoolbar.cpp kpanelappmenu.cpp kdockwidget.cpp kdockwidget_private.cpp - kanimwidget.cpp krootpixmap.cpp kaboutkde.cpp - kaboutapplication.cpp kpanelapplet.cpp kdcopactionproxy.cpp + kanimwidget.cpp krootpixmap.cpp tdeabouttde.cpp + tdeaboutapplication.cpp kpanelapplet.cpp kdcopactionproxy.cpp kcolorcombo.cpp kpushbutton.cpp kpanelextension.cpp - kcompletionbox.cpp ksqueezedtextlabel.cpp kcmodule.cpp - kcommand.cpp twindowlistmenu.cpp kfontcombo.cpp ktip.cpp - kdatewidget.cpp karrowbutton.cpp kmainwindowiface.cpp - kmainwindowiface.skel kguiitem.cpp kstdguiitem.cpp + tdecompletionbox.cpp ksqueezedtextlabel.cpp tdecmodule.cpp + kcommand.cpp twindowlistmenu.cpp tdefontcombo.cpp ktip.cpp + kdatewidget.cpp karrowbutton.cpp tdemainwindowiface.cpp + tdemainwindowiface.skel kguiitem.cpp kstdguiitem.cpp kstringvalidator.cpp kactivelabel.cpp twindowinfo.cpp ktextedit.cpp kwizard.cpp kpassivepopup.cpp - ktoolbarhandler.cpp kdatetimewidget.cpp ktimewidget.cpp ktimezonewidget.cpp - ksconfig.cpp kspelldlg.cpp - kspell.cpp ksyntaxhighlighter.cpp ktabbar.cpp ktabwidget.cpp - ksplashscreen.cpp kspellui.ui kconfigdialog.cpp - kactionselector.cpp klanguagebutton.cpp klistviewsearchline.cpp + tdetoolbarhandler.cpp kdatetimewidget.cpp ktimewidget.cpp ktimezonewidget.cpp + ksconfig.cpp tdespelldlg.cpp + tdespell.cpp ksyntaxhighlighter.cpp ktabbar.cpp ktabwidget.cpp + ksplashscreen.cpp tdespellui.ui tdeconfigdialog.cpp + tdeactionselector.cpp klanguagebutton.cpp tdelistviewsearchline.cpp kpixmapregionselectorwidget.cpp kpixmapregionselectordialog.cpp kwhatsthismanager.cpp kiconviewsearchline.cpp - ktoolbarlabelaction.cpp + tdetoolbarlabelaction.cpp ) tde_add_library( ${target} SHARED AUTOMOC @@ -154,9 +154,9 @@ tde_add_library( ${target} SHARED AUTOMOC ) -##### libkspell ################################# +##### libtdespell ################################# -set( target kspell ) +set( target tdespell ) configure_file( ${CMAKE_SOURCE_DIR}/cmake/modules/template_dummy_cpp.cmake dummy.cpp COPYONLY ) diff --git a/tdeui/MAINTAINERS b/tdeui/MAINTAINERS index f666536cb..2caa911a2 100644 --- a/tdeui/MAINTAINERS +++ b/tdeui/MAINTAINERS @@ -5,10 +5,10 @@ that class. When adding yourself as a maintainer, don't be afraid to reorder the files to a more logical grouping. -kaboutapplication.cpp -kaboutdialog.cpp -kaboutkde.cpp -kaction.cpp Holger Freyther <freyther@kde.org>, Martijn Klingens <klingens@kde.org> +tdeaboutapplication.cpp +tdeaboutdialog.cpp +tdeabouttde.cpp +tdeaction.cpp Holger Freyther <freyther@kde.org>, Martijn Klingens <klingens@kde.org> kanimwidget.cpp Waldo Bastian <bastian@kde.org> karrowbutton.cpp Frerich Raabe <raabe@kde.org> kauthicon.cpp @@ -16,14 +16,14 @@ kbugreport.cpp kbuttonbox.cpp kcharselect.cpp kcmenumngr.cpp -kcmodule.cpp +tdecmodule.cpp kcolorbutton.cpp kcolorcombo.cpp kcolordialog.cpp Waldo Bastian <bastian@kde.org> kcolordrag.cpp kcombobox.cpp Dawit Alemayehu <adawit@kde.org>, Carsten Pfeiffer <pfeiffer@kde.org> kcommand.cpp Werner Trobin <trobin@kde.org> -kcompletionbox.cpp Carsten Pfeiffer <pfeiffer@kde.org> +tdecompletionbox.cpp Carsten Pfeiffer <pfeiffer@kde.org> kcursor.cpp Carsten Pfeiffer <pfeiffer@kde.org> kdatepicker.cpp kdatetbl.cpp @@ -39,8 +39,8 @@ keditcl1.cpp Waldo Bastian <bastian@kde.org> keditcl2.cpp Waldo Bastian <bastian@kde.org> keditlistbox.cpp kedittoolbar.cpp -kfontcombo.cpp -kfontdialog.cpp +tdefontcombo.cpp +tdefontdialog.cpp kguiitem.cpp Holger Freyther <freyther@kde.org>, Martijn Klingens <klingens@kde.org> khelpmenu.cpp kiconview.cpp @@ -50,12 +50,12 @@ kkeydialog.cpp Ellis Whitehead <ellis@kde.org> kled.cpp klineedit.cpp Dawit Alemayehu <adawit@kde.org>, Carsten Pfeiffer <pfeiffer@kde.org> klineeditdlg.cpp -klistbox.cpp -klistview.cpp -kmainwindow.cpp -kmainwindowiface.cpp -kmenubar.cpp -kmessagebox.cpp Waldo Bastian <bastian@kde.org> +tdelistbox.cpp +tdelistview.cpp +tdemainwindow.cpp +tdemainwindowiface.cpp +tdemenubar.cpp +tdemessagebox.cpp Waldo Bastian <bastian@kde.org> knuminput.cpp Dirk Mueller <mueller@kde.org> knumvalidator.cpp kpanelapplet.cpp @@ -64,16 +64,16 @@ kpanelextension.cpp kpanelmenu.cpp kpassdlg.cpp Waldo Bastian <bastian@kde.org> kpixmapio.cpp -kpopupmenu.cpp Holger Freyther <freyther@kde.org> +tdepopupmenu.cpp Holger Freyther <freyther@kde.org> kprogress.cpp kpushbutton.cpp Carsten Pfeiffer <pfeiffer@kde.org>, Martijn Klingens <klingens@kde.org> krestrictedline.cpp krootpixmap.cpp kruler.cpp -kselect.cpp +tdeselect.cpp kseparator.cpp Waldo Bastian <bastian@kde.org> ksharedpixmap.cpp -kshortcutdialog.cpp Ellis Whitehead <ellis@kde.org> +tdeshortcutdialog.cpp Ellis Whitehead <ellis@kde.org> ksqueezedtextlabel.cpp kstatusbar.cpp kstdaction.cpp @@ -84,9 +84,9 @@ ktabctl.cpp ktextbrowser.cpp ktimewidget Hans Petter Bieker <bieker@kde.org> ktip.cpp -ktoolbar.cpp Waldo Bastian <bastian@kde.org> -ktoolbarbutton.cpp Waldo Bastian <bastian@kde.org> -ktoolbarradiogroup.cpp +tdetoolbar.cpp Waldo Bastian <bastian@kde.org> +tdetoolbarbutton.cpp Waldo Bastian <bastian@kde.org> +tdetoolbarradiogroup.cpp kurllabel.cpp twindowlistmenu.cpp kwizard.cpp diff --git a/tdeui/Mainpage.dox b/tdeui/Mainpage.dox index 778c962f1..cf656363e 100644 --- a/tdeui/Mainpage.dox +++ b/tdeui/Mainpage.dox @@ -13,7 +13,7 @@ * certainly link to libtdeui. * * Most applications with single or multiple toplevel widgets -* should use the KMainWindow class in this library, which +* should use the TDEMainWindow class in this library, which * automatically provides features like session management and simplified * toolbar/menubar/statusbar creation. * diff --git a/tdeui/Makefile.am b/tdeui/Makefile.am index 821e2e682..eac8cde0e 100644 --- a/tdeui/Makefile.am +++ b/tdeui/Makefile.am @@ -26,21 +26,21 @@ INCLUDES= -I/usr/include/freetype2/ -I$(top_srcdir)/tdefx -I$(top_srcdir)/interf # into $(all_libraries) isn't better AM_LDFLAGS = $(LDFLAGS_AS_NEEDED) $(LDFLAGS_NEW_DTAGS) -lib_LTLIBRARIES = libtdeui.la libkspell.la +lib_LTLIBRARIES = libtdeui.la libtdespell.la libtdeui_la_LDFLAGS = $(KDE_MT_LDFLAGS) -no-undefined -version-info 6:0:2 libtdeui_la_LIBADD = ../tdecore/libtdecore.la $(LIB_QT) $(top_builddir)/dcop/libDCOP.la $(LIB_X11) $(top_builddir)/tdefx/libtdefx.la $(LIB_XEXT) -libkspell_la_LDFLAGS = $(KDE_MT_LDFLAGS) -version-info 6:0:2 -no-undefined -libkspell_la_SOURCES = dummy.cpp +libtdespell_la_LDFLAGS = $(KDE_MT_LDFLAGS) -version-info 6:0:2 -no-undefined +libtdespell_la_SOURCES = dummy.cpp picsdir = $(kde_datadir)/tdeui/pics pics_DATA = aboutkde.png ktip-bulb.png ktip-background.png include_HEADERS = kprogressbox.h kprogress.h kcolordlg.h \ - kcolordialog.h kselect.h \ - kdatepik.h kdatepicker.h kdatetbl.h kfontdialog.h kpopupmenu.h \ - kfontrequester.h ktabctl.h kstatusbar.h \ - kmainwindow.h kmainwindowiface.h ktoolbar.h kmenubar.h \ + kcolordialog.h tdeselect.h \ + kdatepik.h kdatepicker.h kdatetbl.h tdefontdialog.h tdepopupmenu.h \ + tdefontrequester.h ktabctl.h kstatusbar.h \ + tdemainwindow.h tdemainwindowiface.h tdetoolbar.h tdemenubar.h \ knuminput.h kseparator.h klineedit.h \ krestrictedline.h kcolorbutton.h kcolorbtn.h \ ksystemtray.h kdockwindow.h kbuttonbox.h \ @@ -50,30 +50,30 @@ include_HEADERS = kprogressbox.h kprogress.h kcolordlg.h \ klineeditdlg.h kinputdialog.h kactivelabel.h \ kcharselect.h kcolordrag.h qxembed.h \ knumvalidator.h kdialog.h kdialogbase.h \ - kjanuswidget.h kaboutdialog.h \ - kauthicon.h kmessagebox.h ksharedpixmap.h \ - kdualcolorbtn.h kdualcolorbutton.h ktoolbarbutton.h \ - ktoolbarradiogroup.h ktextbrowser.h \ - kaction.h kactioncollection.h kactionclasses.h khelpmenu.h kswitchlanguagedialog.h \ - kcmodule.h kcmenumngr.h kpanelmenu.h kpanelappmenu.h \ - kactionshortcutlist.h kstdaction.h kcombobox.h \ - kiconview.h klistview.h klistbox.h kbugreport.h kpassdlg.h \ + kjanuswidget.h tdeaboutdialog.h \ + kauthicon.h tdemessagebox.h ksharedpixmap.h \ + kdualcolorbtn.h kdualcolorbutton.h tdetoolbarbutton.h \ + tdetoolbarradiogroup.h ktextbrowser.h \ + tdeaction.h tdeactioncollection.h tdeactionclasses.h khelpmenu.h kswitchlanguagedialog.h \ + tdecmodule.h kcmenumngr.h kpanelmenu.h kpanelappmenu.h \ + tdeactionshortcutlist.h kstdaction.h kcombobox.h \ + kiconview.h tdelistview.h tdelistbox.h kbugreport.h kpassdlg.h \ kxmlguiclient.h kxmlgui.h kxmlguibuilder.h kxmlguifactory.h \ kpixmapio.h kwordwrap.h \ kedittoolbar.h kdockwidget.h kanimwidget.h \ - krootpixmap.h kaboutkde.h kaboutapplication.h \ + krootpixmap.h tdeabouttde.h tdeaboutapplication.h \ kpanelapplet.h kpushbutton.h kdcopactionproxy.h kcolorcombo.h \ - kpanelextension.h kcompletionbox.h ksqueezedtextlabel.h \ - kcommand.h twindowlistmenu.h kfontcombo.h kaccelgen.h ktip.h \ + kpanelextension.h tdecompletionbox.h ksqueezedtextlabel.h \ + kcommand.h twindowlistmenu.h tdefontcombo.h tdeaccelgen.h ktip.h \ kdatewidget.h karrowbutton.h kguiitem.h kstdguiitem.h \ kstringvalidator.h twindowinfo.h \ ktextedit.h kpassivepopup.h \ kdatetimewidget.h ktimewidget.h ktimezonewidget.h kscrollview.h \ - kspell.h ksconfig.h kspelldlg.h ksyntaxhighlighter.h \ - ktabbar.h ktabwidget.h ksplashscreen.h kconfigdialog.h \ - kactionselector.h klanguagebutton.h klistviewsearchline.h \ + tdespell.h ksconfig.h tdespelldlg.h ksyntaxhighlighter.h \ + ktabbar.h ktabwidget.h ksplashscreen.h tdeconfigdialog.h \ + tdeactionselector.h klanguagebutton.h tdelistviewsearchline.h \ kpixmapregionselectorwidget.h kpixmapregionselectordialog.h \ - kiconviewsearchline.h ktoolbarlabelaction.h kshortcutdialog.h + kiconviewsearchline.h tdetoolbarlabelaction.h tdeshortcutdialog.h # the order of the sources isn't randomly (at least not completely). # the order is predictated by the use of X11 header files @@ -82,50 +82,50 @@ include_HEADERS = kprogressbox.h kprogress.h kcolordlg.h \ # in ksharedpixmap.cpp libtdeui_la_SOURCES = \ qxembed.cpp ksharedpixmap.cpp kpixmapio.cpp \ - kpopupmenu.cpp ktoolbar.cpp kaction.cpp kstdaction.cpp \ - kactioncollection.cpp kactionclasses.cpp \ - kurllabel.cpp kmenubar.cpp kinputdialog.cpp \ - knuminput.cpp klineedit.cpp klistview.cpp kprogress.cpp \ - kprogressbox.cpp kcolordialog.cpp kselect.cpp kdatepicker.cpp \ - kdatetbl.cpp kfontrequester.cpp kfontdialog.cpp ktabctl.cpp \ - kstatusbar.cpp kmainwindow.cpp \ + tdepopupmenu.cpp tdetoolbar.cpp tdeaction.cpp kstdaction.cpp \ + tdeactioncollection.cpp tdeactionclasses.cpp \ + kurllabel.cpp tdemenubar.cpp kinputdialog.cpp \ + knuminput.cpp klineedit.cpp tdelistview.cpp kprogress.cpp \ + kprogressbox.cpp kcolordialog.cpp tdeselect.cpp kdatepicker.cpp \ + kdatetbl.cpp tdefontrequester.cpp tdefontdialog.cpp ktabctl.cpp \ + kstatusbar.cpp tdemainwindow.cpp \ keditlistbox.cpp kscrollview.cpp \ kseparator.cpp krestrictedline.cpp \ kcolorbutton.cpp ksystemtray.cpp \ kbuttonbox.cpp keditcl1.cpp keditcl2.cpp kled.cpp \ - kshortcutdialog_simple.ui kshortcutdialog_advanced.ui \ - kshortcutdialog.cpp kkeybutton.cpp kkeydialog.cpp \ + tdeshortcutdialog_simple.ui tdeshortcutdialog_advanced.ui \ + tdeshortcutdialog.cpp kkeybutton.cpp kkeydialog.cpp \ kruler.cpp kcursor.cpp klineeditdlg.cpp \ kcharselect.cpp kcolordrag.cpp \ knumvalidator.cpp kdialog.cpp kdialogbase.cpp \ - kjanuswidget.cpp kaboutdialog.cpp \ - kauthicon.cpp kmessagebox.cpp kdualcolorbutton.cpp \ - ktoolbarradiogroup.cpp ktoolbarbutton.cpp \ + kjanuswidget.cpp tdeaboutdialog.cpp \ + kauthicon.cpp tdemessagebox.cpp kdualcolorbutton.cpp \ + tdetoolbarradiogroup.cpp tdetoolbarbutton.cpp \ ktextbrowser.cpp khelpmenu.cpp kswitchlanguagedialog.cpp \ kcmenumngr.cpp kpanelmenu.cpp \ - kiconview.cpp klistbox.cpp kwordwrap.cpp kbugreport.cpp \ + kiconview.cpp tdelistbox.cpp kwordwrap.cpp kbugreport.cpp \ kcombobox.cpp kpassdlg.cpp kxmlguiclient.cpp kxmlguifactory.cpp \ kxmlguifactory_p.cpp kxmlguibuilder.cpp kedittoolbar.cpp \ kpanelappmenu.cpp kdockwidget.cpp kdockwidget_private.cpp \ - kanimwidget.cpp krootpixmap.cpp kaboutkde.cpp \ - kaboutapplication.cpp kpanelapplet.cpp kdcopactionproxy.cpp \ + kanimwidget.cpp krootpixmap.cpp tdeabouttde.cpp \ + tdeaboutapplication.cpp kpanelapplet.cpp kdcopactionproxy.cpp \ kcolorcombo.cpp kpushbutton.cpp kpanelextension.cpp \ - kcompletionbox.cpp ksqueezedtextlabel.cpp kcmodule.cpp \ - kcommand.cpp twindowlistmenu.cpp kfontcombo.cpp ktip.cpp \ - kdatewidget.cpp karrowbutton.cpp kmainwindowiface.cpp \ - kmainwindowiface.skel kguiitem.cpp kstdguiitem.cpp \ + tdecompletionbox.cpp ksqueezedtextlabel.cpp tdecmodule.cpp \ + kcommand.cpp twindowlistmenu.cpp tdefontcombo.cpp ktip.cpp \ + kdatewidget.cpp karrowbutton.cpp tdemainwindowiface.cpp \ + tdemainwindowiface.skel kguiitem.cpp kstdguiitem.cpp \ kstringvalidator.cpp kactivelabel.cpp \ twindowinfo.cpp ktextedit.cpp kwizard.cpp kpassivepopup.cpp \ - ktoolbarhandler.cpp kdatetimewidget.cpp ktimewidget.cpp ktimezonewidget.cpp \ - ksconfig.cpp kspelldlg.cpp \ - kspell.cpp ksyntaxhighlighter.cpp ktabbar.cpp ktabwidget.cpp \ - ksplashscreen.cpp kspellui.ui kconfigdialog.cpp \ - kactionselector.cpp klanguagebutton.cpp klistviewsearchline.cpp \ + tdetoolbarhandler.cpp kdatetimewidget.cpp ktimewidget.cpp ktimezonewidget.cpp \ + ksconfig.cpp tdespelldlg.cpp \ + tdespell.cpp ksyntaxhighlighter.cpp ktabbar.cpp ktabwidget.cpp \ + ksplashscreen.cpp tdespellui.ui tdeconfigdialog.cpp \ + tdeactionselector.cpp klanguagebutton.cpp tdelistviewsearchline.cpp \ kpixmapregionselectorwidget.cpp kpixmapregionselectordialog.cpp \ kwhatsthismanager.cpp kiconviewsearchline.cpp \ - ktoolbarlabelaction.cpp + tdetoolbarlabelaction.cpp -noinst_HEADERS = kdockwidget_private.h kdockwidget_p.h klistviewlineedit.h \ +noinst_HEADERS = kdockwidget_private.h kdockwidget_p.h tdelistviewlineedit.h \ kdialogbase_priv.h kaboutdialog_private.h kcursor_private.h \ kdepackages.h kxmlguifactory_p.h \ kstdaction_p.h kwhatsthismanager_p.h @@ -166,6 +166,6 @@ dummy.cpp: echo "}" >> dummy.cpp echo "#endif" >> dummy.cpp -DOXYGEN_REFERENCES = tdecore tdefx dcop kio kutils +DOXYGEN_REFERENCES = tdecore tdefx dcop kio tdeutils DOXYGEN_SET_INTERNAL_DOCS = YES include ../admin/Doxyfile.am diff --git a/tdeui/README.kspell b/tdeui/README.tdespell index 9ae1afe84..e5262f057 100644 --- a/tdeui/README.kspell +++ b/tdeui/README.tdespell @@ -2,7 +2,7 @@ KSpell, by David Sweet ---------------------- KSpell provides an interface to ASpell and International ISpell 3.1. You should use it like a UI widget to provide spellchecking in your application. -See kspell.h and http://www.chaos.umd.edu/~dsweet/KDE/KSpell for +See tdespell.h and http://www.chaos.umd.edu/~dsweet/KDE/KSpell for documentation. Settings @@ -12,6 +12,6 @@ not only as a widget allowing the user to set KSpell preferences, but also as a data abstraction class allowing you to get and set the preferences from within your program. You can pass an instance of KSpellConfig to KSpell and the spellchecker will run with the appropriate preference settings. The -preferences, when saved (see kspelldlg.h) are saved globally. If needed, +preferences, when saved (see tdespelldlg.h) are saved globally. If needed, you can read them with KSpellDlg and set and use application-specific spellchecking settings. diff --git a/tdeui/TODO.kspell b/tdeui/TODO.tdespell index 99c9df408..99c9df408 100644 --- a/tdeui/TODO.kspell +++ b/tdeui/TODO.tdespell diff --git a/tdeui/TODO.xmlgui b/tdeui/TODO.xmlgui index 3c3d4f8a4..0c0753685 100644 --- a/tdeui/TODO.xmlgui +++ b/tdeui/TODO.xmlgui @@ -4,15 +4,15 @@ When removing an xmlgui-client involves destroying toolbars, we need to save the whole set of toolbar positions of the mainwindow, into the xmlgui-client. Data structure: -struct KToolBarPos { +struct TDEToolBarPos { short int index; short int offset; bool newLine; }; -typedef QValueVector<KToolBarPos> KToolBarPosList; +typedef QValueVector<TDEToolBarPos> TDEToolBarPosList; API: -KToolBarPosList KMainWindow::toolBarPositionList() const; +TDEToolBarPosList TDEMainWindow::toolBarPositionList() const; The remaining problem is to know when to call it: * when we know in advance that we'll be able to remove toolbars? @@ -74,7 +74,7 @@ which would forward the action() and domElement() calls - because a client can be in only one factory at a time. This custom builder needs to know about action plugging too, we don't really want -to call KAction::plug here. So this would be 'virtualized' (new virtual, in a new +to call TDEAction::plug here. So this would be 'virtualized' (new virtual, in a new interface to keep BC, that by default calls plug, but does something else in kedittoolbar's builder). diff --git a/tdeui/kaboutdialog_private.h b/tdeui/kaboutdialog_private.h index 6eb4cc312..12d3e18a6 100644 --- a/tdeui/kaboutdialog_private.h +++ b/tdeui/kaboutdialog_private.h @@ -29,7 +29,7 @@ class TQTabWidget; class TQVBoxLayout; /** - * Used internally by KAboutContainerBase + * Used internally by TDEAboutContainerBase * @internal */ class KImageTrackLabel : public TQLabel @@ -58,15 +58,15 @@ class KImageTrackLabel : public TQLabel virtual void mouseMoveEvent ( TQMouseEvent *e ); }; -class KAboutContainer; +class TDEAboutContainer; -class KAboutContainerBasePrivate; +class TDEAboutContainerBasePrivate; /** - * Used internally by KAboutDialog + * Used internally by TDEAboutDialog * @internal */ -class KAboutContainerBase : public TQWidget +class TDEAboutContainerBase : public TQWidget { Q_OBJECT @@ -86,7 +86,7 @@ class KAboutContainerBase : public TQWidget }; public: - KAboutContainerBase( int layoutType, TQWidget *parent = 0, char *name = 0 ); + TDEAboutContainerBase( int layoutType, TQWidget *parent = 0, char *name = 0 ); virtual void show( void ); virtual TQSize sizeHint( void ) const; @@ -103,14 +103,14 @@ class KAboutContainerBase : public TQWidget bool richText=false, int numLines=10 ); TQFrame *addLicensePage( const TQString &title, const TQString &text, int numLines=10 ); - KAboutContainer *addContainerPage( const TQString &title, + TDEAboutContainer *addContainerPage( const TQString &title, int childAlignment = AlignCenter, int innerAlignment = AlignCenter ); - KAboutContainer *addScrolledContainerPage( const TQString &title, + TDEAboutContainer *addScrolledContainerPage( const TQString &title, int childAlignment = AlignCenter, int innerAlignment = AlignCenter ); TQFrame *addEmptyPage( const TQString &title ); - KAboutContainer *addContainer( int childAlignment, int innerAlignment ); + TDEAboutContainer *addContainer( int childAlignment, int innerAlignment ); public slots: virtual void slotMouseTrack( int mode, const TQMouseEvent *e ); @@ -136,7 +136,7 @@ class KAboutContainerBase : public TQWidget TQTabWidget *mPageTab; TQFrame *mPlainSpace; - KAboutContainerBasePrivate* const d; + TDEAboutContainerBasePrivate* const d; }; diff --git a/tdeui/kactivelabel.cpp b/tdeui/kactivelabel.cpp index 72e72b677..0e5abc5ad 100644 --- a/tdeui/kactivelabel.cpp +++ b/tdeui/kactivelabel.cpp @@ -19,7 +19,7 @@ #include "kactivelabel.h" -#include <kapplication.h> +#include <tdeapplication.h> #include <tqregexp.h> #include <tqwhatsthis.h> #include <tqsimplerichtext.h> @@ -51,7 +51,7 @@ void KActiveLabel::init() this, TQT_SLOT(openLink(const TQString &))); if (kapp) { - connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), + connect(kapp, TQT_SIGNAL(tdedisplayPaletteChanged()), this, TQT_SLOT(paletteChanged())); } } diff --git a/tdeui/kanimwidget.cpp b/tdeui/kanimwidget.cpp index 899ba7bd3..664117ce3 100644 --- a/tdeui/kanimwidget.cpp +++ b/tdeui/kanimwidget.cpp @@ -22,7 +22,7 @@ #include <tqtimer.h> #include <tqpainter.h> #include <tqimage.h> -#include <ktoolbar.h> +#include <tdetoolbar.h> #include <kdebug.h> #include <kiconloader.h> @@ -47,7 +47,7 @@ KAnimWidget::KAnimWidget( const TQString& icons, int size, TQWidget *parent, { connect( &d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimerUpdate())); - if (parent && parent->inherits( "KToolBar" )) + if (parent && parent->inherits( "TDEToolBar" )) connect(parent, TQT_SIGNAL(modechange()), this, TQT_SLOT(updateIcons())); d->loadingCompleted = false; @@ -182,12 +182,12 @@ void KAnimWidget::updateIcons() if (!d->initDone) return; - if (parent()->inherits( "KToolBar" )) - d->size = ((KToolBar*)parent())->iconSize(); + if (parent()->inherits( "TDEToolBar" )) + d->size = ((TDEToolBar*)parent())->iconSize(); if (!d->size) - d->size = KGlobal::iconLoader()->currentSize(KIcon::MainToolbar); + d->size = TDEGlobal::iconLoader()->currentSize(TDEIcon::MainToolbar); - TQString path = KGlobal::iconLoader()->iconPath(d->icon_name, -d->size); + TQString path = TDEGlobal::iconLoader()->iconPath(d->icon_name, -d->size); TQImage img(path); if (img.isNull()) diff --git a/tdeui/kanimwidget.h b/tdeui/kanimwidget.h index 74f663463..77abf837a 100644 --- a/tdeui/kanimwidget.h +++ b/tdeui/kanimwidget.h @@ -68,7 +68,7 @@ public: * @param icons The icons name (e.g., "kde") to use for the animation * @param size The size to load * You don't have to set it if the parent is a - * KToolBar; in this case it will use the toolbar's + * TDEToolBar; in this case it will use the toolbar's * size. * @param parent The standard parent * @param name The standard internal name @@ -102,7 +102,7 @@ public: /** * Sets the name of the animated icons to load. This will use the - * KIconLoader::loadAnimated method for the actual loading. + * TDEIconLoader::loadAnimated method for the actual loading. * * @param icons The name of the icons to use for the animation */ diff --git a/tdeui/karrowbutton.h b/tdeui/karrowbutton.h index df25c69eb..c490c8aab 100644 --- a/tdeui/karrowbutton.h +++ b/tdeui/karrowbutton.h @@ -30,7 +30,7 @@ class KArrowButtonPrivate; * Draws a button which shows an arrow pointing into a certain direction. The * arrow's alignment on the button depends on the direction it's pointing to, * e.g. a left arrow is aligned at the left border, a upwards arrow at the top - * border. This class honors the currently configured KStyle when drawing + * border. This class honors the currently configured TDEStyle when drawing * the arrow. * * @author Frerich Raabe diff --git a/tdeui/kauthicon.cpp b/tdeui/kauthicon.cpp index d4c18a114..d45217d9b 100644 --- a/tdeui/kauthicon.cpp +++ b/tdeui/kauthicon.cpp @@ -25,7 +25,7 @@ #include <tqlabel.h> #include <tqtimer.h> -#include <klocale.h> +#include <tdelocale.h> #include "kauthicon.h" diff --git a/tdeui/kbugreport.cpp b/tdeui/kbugreport.cpp index c3cf0b518..3e49e112c 100644 --- a/tdeui/kbugreport.cpp +++ b/tdeui/kbugreport.cpp @@ -26,13 +26,13 @@ #include <tqwhatsthis.h> #include <tqregexp.h> -#include <kaboutdata.h> -#include <kapplication.h> -#include <kconfig.h> +#include <tdeaboutdata.h> +#include <tdeapplication.h> +#include <tdeconfig.h> #include <kdebug.h> #include <klineedit.h> -#include <klocale.h> -#include <kmessagebox.h> +#include <tdelocale.h> +#include <tdemessagebox.h> #include <kprocess.h> #include <kstandarddirs.h> #include <kstdguiitem.h> @@ -50,7 +50,7 @@ #include "kdepackages.h" #include <kcombobox.h> #include <config.h> -#include <ktempfile.h> +#include <tdetempfile.h> #include <tqtextstream.h> #include <tqfile.h> @@ -65,7 +65,7 @@ public: KURL url; }; -KBugReport::KBugReport( TQWidget * parentw, bool modal, const KAboutData *aboutData ) +KBugReport::KBugReport( TQWidget * parentw, bool modal, const TDEAboutData *aboutData ) : KDialogBase( Plain, i18n("Submit Bug Report"), Ok | Cancel, @@ -79,11 +79,11 @@ KBugReport::KBugReport( TQWidget * parentw, bool modal, const KAboutData *aboutD d = new KBugReportPrivate; // Use supplied aboutdata, otherwise the one from the active instance - // otherwise the KGlobal one. _activeInstance should neved be 0L in theory. + // otherwise the TDEGlobal one. _activeInstance should neved be 0L in theory. m_aboutData = aboutData ? aboutData - : ( KGlobal::_activeInstance ? KGlobal::_activeInstance->aboutData() - : KGlobal::instance()->aboutData() ); + : ( TDEGlobal::_activeInstance ? TDEGlobal::_activeInstance->aboutData() + : TDEGlobal::instance()->aboutData() ); m_process = 0; TQWidget * parent = plainPage(); d->submitBugButton = 0; @@ -318,12 +318,12 @@ void KBugReport::appChanged(int i) void KBugReport::slotConfigureEmail() { if (m_process) return; - m_process = new KProcess; - *m_process << TQString::fromLatin1("kcmshell") << TQString::fromLatin1("kcm_useraccount"); - connect(m_process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(slotSetFrom())); + m_process = new TDEProcess; + *m_process << TQString::fromLatin1("tdecmshell") << TQString::fromLatin1("kcm_useraccount"); + connect(m_process, TQT_SIGNAL(processExited(TDEProcess *)), TQT_SLOT(slotSetFrom())); if (!m_process->start()) { - kdDebug() << "Couldn't start kcmshell.." << endl; + kdDebug() << "Couldn't start tdecmshell.." << endl; delete m_process; m_process = 0; return; @@ -338,7 +338,7 @@ void KBugReport::slotSetFrom() m_configureEmail->setEnabled(true); // ### KDE4: why oh why is KEmailSettings in kio? - KConfig emailConf( TQString::fromLatin1("emaildefaults") ); + TDEConfig emailConf( TQString::fromLatin1("emaildefaults") ); // find out the default profile emailConf.setGroup( TQString::fromLatin1("Defaults") ); @@ -460,9 +460,9 @@ TQString KBugReport::text() const bodyText += line; } - if (severity == TQString::fromLatin1("i18n") && KGlobal::locale()->language() != KLocale::defaultLanguage()) { + if (severity == TQString::fromLatin1("i18n") && TDEGlobal::locale()->language() != TDELocale::defaultLanguage()) { // Case 1 : i18n bug - TQString package = TQString::fromLatin1("i18n_%1").arg(KGlobal::locale()->language()); + TQString package = TQString::fromLatin1("i18n_%1").arg(TDEGlobal::locale()->language()); package = package.replace(TQString::fromLatin1("_"), TQString::fromLatin1("-")); return TQString::fromLatin1("Package: %1").arg(package) + TQString::fromLatin1("\n" @@ -489,20 +489,20 @@ bool KBugReport::sendBugReport() TQString::fromLatin1("submit@bugs.pearsoncomputing.net") ); TQString command; - command = locate("exe", "ksendbugmail"); + command = locate("exe", "tdesendbugmail"); if (command.isEmpty()) - command = KStandardDirs::findExe( TQString::fromLatin1("ksendbugmail") ); + command = TDEStandardDirs::findExe( TQString::fromLatin1("tdesendbugmail") ); KTempFile outputfile; outputfile.close(); TQString subject = m_subject->text(); command += " --subject "; - command += KProcess::quote(subject); + command += TDEProcess::quote(subject); command += " --recipient "; - command += KProcess::quote(recipient); + command += TDEProcess::quote(recipient); command += " > "; - command += KProcess::quote(outputfile.name()); + command += TDEProcess::quote(outputfile.name()); fflush(stdin); fflush(stderr); diff --git a/tdeui/kbugreport.h b/tdeui/kbugreport.h index cff575dad..aec61d668 100644 --- a/tdeui/kbugreport.h +++ b/tdeui/kbugreport.h @@ -24,8 +24,8 @@ class TQMultiLineEdit; class TQLineEdit; class TQHButtonGroup; -class KProcess; -class KAboutData; +class TDEProcess; +class TDEAboutData; class KBugReportPrivate; /** @@ -33,9 +33,9 @@ class KBugReportPrivate; * * All the information needed by the dialog box * (program name, version, bug-report address, etc.) - * comes from the KAboutData class. - * Make sure you create an instance of KAboutData and pass it - * to KCmdLineArgs. + * comes from the TDEAboutData class. + * Make sure you create an instance of TDEAboutData and pass it + * to TDECmdLineArgs. * * @author David Faure <faure@kde.org> */ @@ -49,7 +49,7 @@ public: * since KHelpMenu takes care of the menu item * for "Report Bug..." and of creating a KBugReport dialog. */ - KBugReport( TQWidget * parent = 0L, bool modal=true, const KAboutData *aboutData = 0L ); + KBugReport( TQWidget * parent = 0L, bool modal=true, const TDEAboutData *aboutData = 0L ); /** * Destructor */ @@ -57,7 +57,7 @@ public: protected slots: /** - * "Configure email" has been clicked - this calls kcmshell System/email + * "Configure email" has been clicked - this calls tdecmshell System/email */ virtual void slotConfigureEmail(); /** @@ -100,8 +100,8 @@ protected: */ bool sendBugReport(); - KProcess * m_process; - const KAboutData * m_aboutData; + TDEProcess * m_process; + const TDEAboutData * m_aboutData; TQMultiLineEdit * m_lineedit; TQLineEdit * m_subject; diff --git a/tdeui/kbuttonbox.cpp b/tdeui/kbuttonbox.cpp index 6351c512d..faa26e95e 100644 --- a/tdeui/kbuttonbox.cpp +++ b/tdeui/kbuttonbox.cpp @@ -50,7 +50,7 @@ */ #include "kbuttonbox.moc" -#include <kglobalsettings.h> +#include <tdeglobalsettings.h> #include <kguiitem.h> #include <kpushbutton.h> #include <tqptrlist.h> diff --git a/tdeui/kcharselect.cpp b/tdeui/kcharselect.cpp index ace147496..5561e5883 100644 --- a/tdeui/kcharselect.cpp +++ b/tdeui/kcharselect.cpp @@ -36,11 +36,11 @@ #include <tqtooltip.h> #include <tqvalidator.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kdebug.h> #include <kdialog.h> #include <klineedit.h> -#include <klocale.h> +#include <tdelocale.h> class KCharSelect::KCharSelectPrivate { diff --git a/tdeui/kcmenumngr.cpp b/tdeui/kcmenumngr.cpp index 640b9c7ac..60e250575 100644 --- a/tdeui/kcmenumngr.cpp +++ b/tdeui/kcmenumngr.cpp @@ -21,9 +21,9 @@ #include <tqwidget.h> #include <tqpopupmenu.h> #include "kcmenumngr.h" -#include "kglobal.h" -#include "kconfig.h" -#include "kshortcut.h" +#include "tdeglobal.h" +#include "tdeconfig.h" +#include "tdeshortcut.h" #undef KeyPress #undef None @@ -35,8 +35,8 @@ KContextMenuManager* KContextMenuManager::manager = 0; KContextMenuManager::KContextMenuManager( TQObject* parent, const char* name ) : TQObject( parent, name) { - KConfigGroupSaver saver ( KGlobal::config(), TQString::fromLatin1("Shortcuts") ) ; - menuKey = KShortcut( saver.config()->readEntry(TQString::fromLatin1("PopupContextMenu"), TQString::fromLatin1("Menu") ) ).keyCodeQt(); + TDEConfigGroupSaver saver ( TDEGlobal::config(), TQString::fromLatin1("Shortcuts") ) ; + menuKey = TDEShortcut( saver.config()->readEntry(TQString::fromLatin1("PopupContextMenu"), TQString::fromLatin1("Menu") ) ).keyCodeQt(); saver.config()->setGroup( TQString::fromLatin1("ContextMenus") ) ; showOnPress = saver.config()->readBoolEntry(TQString::fromLatin1("ShowOnPress"), true ); } diff --git a/tdeui/kcolorbutton.cpp b/tdeui/kcolorbutton.cpp index ceded0f58..5a42406a0 100644 --- a/tdeui/kcolorbutton.cpp +++ b/tdeui/kcolorbutton.cpp @@ -25,8 +25,8 @@ #include <tqapplication.h> #include <tqclipboard.h> #include <tqstyle.h> -#include <kglobalsettings.h> -#include <kstdaccel.h> +#include <tdeglobalsettings.h> +#include <tdestdaccel.h> #include "kcolordialog.h" #include "kcolorbutton.h" #include "kcolordrag.h" @@ -153,11 +153,11 @@ void KColorButton::keyPressEvent( TQKeyEvent *e ) { KKey key( e ); - if ( KStdAccel::copy().contains( key ) ) { + if ( TDEStdAccel::copy().contains( key ) ) { TQMimeSource* mime = new KColorDrag( color() ); TQApplication::clipboard()->setData( mime, TQClipboard::Clipboard ); } - else if ( KStdAccel::paste().contains( key ) ) { + else if ( TDEStdAccel::paste().contains( key ) ) { TQColor color; KColorDrag::decode( TQApplication::clipboard()->data( TQClipboard::Clipboard ), color ); setColor( color ); @@ -175,7 +175,7 @@ void KColorButton::mousePressEvent( TQMouseEvent *e) void KColorButton::mouseMoveEvent( TQMouseEvent *e) { if( (e->state() & Qt::LeftButton) && - (e->pos()-mPos).manhattanLength() > KGlobalSettings::dndEventDelay() ) + (e->pos()-mPos).manhattanLength() > TDEGlobalSettings::dndEventDelay() ) { // Drag color object KColorDrag *dg = new KColorDrag( color(), this); diff --git a/tdeui/kcolorcombo.cpp b/tdeui/kcolorcombo.cpp index a7dd90ac7..87d5de32a 100644 --- a/tdeui/kcolorcombo.cpp +++ b/tdeui/kcolorcombo.cpp @@ -44,14 +44,14 @@ #include <tqpushbutton.h> #include <tqtimer.h> -#include <kapplication.h> -#include <kconfig.h> -#include <kglobal.h> -#include <kglobalsettings.h> +#include <tdeapplication.h> +#include <tdeconfig.h> +#include <tdeglobal.h> +#include <tdeglobalsettings.h> #include <kiconloader.h> -#include <klistbox.h> -#include <klocale.h> -#include <kmessagebox.h> +#include <tdelistbox.h> +#include <tdelocale.h> +#include <tdemessagebox.h> #include <kseparator.h> #include <kpalette.h> #include <kimageeffect.h> diff --git a/tdeui/kcolorcombo.h b/tdeui/kcolorcombo.h index 07127a3f9..bade8efcb 100644 --- a/tdeui/kcolorcombo.h +++ b/tdeui/kcolorcombo.h @@ -28,7 +28,7 @@ #include <tqcombobox.h> #include <kcolordialog.h> -#include "kselect.h" +#include "tdeselect.h" class KColorComboInternal; diff --git a/tdeui/kcolordialog.cpp b/tdeui/kcolordialog.cpp index ec3930fa3..458fb50a8 100644 --- a/tdeui/kcolordialog.cpp +++ b/tdeui/kcolordialog.cpp @@ -45,15 +45,15 @@ #include <tqspinbox.h> #include <tqtimer.h> -#include <kapplication.h> -#include <kconfig.h> -#include <kglobal.h> -#include <kglobalsettings.h> +#include <tdeapplication.h> +#include <tdeconfig.h> +#include <tdeglobal.h> +#include <tdeglobalsettings.h> #include <kiconloader.h> #include <klineedit.h> -#include <klistbox.h> -#include <klocale.h> -#include <kmessagebox.h> +#include <tdelistbox.h> +#include <tdelocale.h> +#include <tdemessagebox.h> #include <kseparator.h> #include <kpalette.h> #include <kimageeffect.h> @@ -260,7 +260,7 @@ void KHSSelector::drawPalette( TQPixmap *pixmap ) //----------------------------------------------------------------------------- KValueSelector::KValueSelector( TQWidget *parent, const char *name ) - : KSelector( Qt::Vertical, parent, name ), _hue(0), _sat(0) + : TDESelector( Qt::Vertical, parent, name ), _hue(0), _sat(0) { setRange( 0, 255 ); pixmap.setOptimization( TQPixmap::BestOptim ); @@ -268,7 +268,7 @@ KValueSelector::KValueSelector( TQWidget *parent, const char *name ) KValueSelector::KValueSelector(Orientation o, TQWidget *parent, const char *name ) - : KSelector( o, parent, name), _hue(0), _sat(0) + : TDESelector( o, parent, name), _hue(0), _sat(0) { setRange( 0, 255 ); pixmap.setOptimization( TQPixmap::BestOptim ); @@ -429,7 +429,7 @@ void KColorCells::mouseMoveEvent( TQMouseEvent *e ) if( !(e->state() & Qt::LeftButton)) return; if(inMouse) { - int delay = KGlobalSettings::dndEventDelay(); + int delay = TDEGlobalSettings::dndEventDelay(); if(e->x() > mPos.x()+delay || e->x() < mPos.x()-delay || e->y() > mPos.y()+delay || e->y() < mPos.y()-delay){ // Drag color object @@ -590,7 +590,7 @@ KPaletteTable::KPaletteTable( TQWidget *parent, int minWidth, int cols) sv->setFixedSize(minSize); layout->addWidget(sv); - mNamedColorList = new KListBox( this, "namedColorList", 0 ); + mNamedColorList = new TDEListBox( this, "namedColorList", 0 ); mNamedColorList->setFixedSize(minSize); mNamedColorList->hide(); layout->addWidget(mNamedColorList); @@ -645,7 +645,7 @@ KPaletteTable::readNamedColor( void ) return; // Strings already present } - KGlobal::locale()->insertCatalogue("tdelibs_colors"); + TDEGlobal::locale()->insertCatalogue("tdelibs_colors"); // // Code somewhat inspired by KPalette. @@ -1254,7 +1254,7 @@ void KColorDialog::slotDefaultColorClicked() void KColorDialog::readSettings() { - KConfigGroup group( KGlobal::config(), "Colors" ); + TDEConfigGroup group( TDEGlobal::config(), "Colors" ); TQString palette = group.readEntry("CurrentPalette"); d->table->setPalette(palette); @@ -1263,7 +1263,7 @@ KColorDialog::readSettings() void KColorDialog::slotWriteSettings() { - KConfigGroup group( KGlobal::config(), "Colors" ); + TDEConfigGroup group( TDEGlobal::config(), "Colors" ); TQString palette = d->table->palette(); if (!group.hasDefault("CurrentPalette") && @@ -1597,7 +1597,7 @@ void KHSSelector::virtual_hook( int id, void* data ) { KXYSelector::virtual_hook( id, data ); } void KValueSelector::virtual_hook( int id, void* data ) -{ KSelector::virtual_hook( id, data ); } +{ TDESelector::virtual_hook( id, data ); } void KPaletteTable::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } diff --git a/tdeui/kcolordialog.h b/tdeui/kcolordialog.h index 20c9f799d..e580ad582 100644 --- a/tdeui/kcolordialog.h +++ b/tdeui/kcolordialog.h @@ -35,11 +35,11 @@ #include <tqpixmap.h> #include <tqgridview.h> -#include "kselect.h" +#include "tdeselect.h" class TQComboBox; class TQLineEdit; -class KListBox; +class TDEListBox; class KPalette; class KColorCells; @@ -99,7 +99,7 @@ class KValueSelectorPrivate; * @see KHSSelector, KColorDialog * @author Martin Jones (mjones@kde.org) */ -class TDEUI_EXPORT KValueSelector : public KSelector +class TDEUI_EXPORT KValueSelector : public TDESelector { Q_OBJECT @@ -132,7 +132,7 @@ protected: virtual void resizeEvent( TQResizeEvent * ); /** - * Reimplemented from KSelector. The drawing is + * Reimplemented from TDESelector. The drawing is * buffered in a pixmap here. As real drawing * routine, drawPalette() is used. */ @@ -229,7 +229,7 @@ protected: TQComboBox *combo; KColorCells *cells; TQScrollView *sv; - KListBox *mNamedColorList; + TDEListBox *mNamedColorList; KPalette *mPalette; int mMinWidth; int mCols; diff --git a/tdeui/kcombobox.cpp b/tdeui/kcombobox.cpp index 198a1e200..cfef5fd5b 100644 --- a/tdeui/kcombobox.cpp +++ b/tdeui/kcombobox.cpp @@ -25,16 +25,16 @@ #include <tqpopupmenu.h> #include <tqapplication.h> -#include <kcompletionbox.h> +#include <tdecompletionbox.h> #include <kcursor.h> #include <kiconloader.h> #include <kicontheme.h> -#include <klistviewsearchline.h> +#include <tdelistviewsearchline.h> #include <klineedit.h> -#include <klocale.h> +#include <tdelocale.h> #include <knotifyclient.h> #include <kpixmapprovider.h> -#include <kstdaccel.h> +#include <tdestdaccel.h> #include <kurl.h> #include <kurldrag.h> @@ -111,13 +111,13 @@ void KComboBox::setAutoCompletion( bool autocomplete ) { if ( autocomplete ) { - d->klineEdit->setCompletionMode( KGlobalSettings::CompletionAuto ); - setCompletionMode( KGlobalSettings::CompletionAuto ); + d->klineEdit->setCompletionMode( TDEGlobalSettings::CompletionAuto ); + setCompletionMode( TDEGlobalSettings::CompletionAuto ); } else { - d->klineEdit->setCompletionMode( KGlobalSettings::completionMode() ); - setCompletionMode( KGlobalSettings::completionMode() ); + d->klineEdit->setCompletionMode( TDEGlobalSettings::completionMode() ); + setCompletionMode( TDEGlobalSettings::completionMode() ); } } } @@ -169,7 +169,7 @@ void KComboBox::makeCompletion( const TQString& text ) } } -void KComboBox::rotateText( KCompletionBase::KeyBindingType type ) +void KComboBox::rotateText( TDECompletionBase::KeyBindingType type ) { if ( d->klineEdit ) d->klineEdit->rotateText( type ); @@ -226,7 +226,7 @@ void KComboBox::setCompletedItems( const TQStringList& items ) d->klineEdit->setCompletedItems( items ); } -KCompletionBox * KComboBox::completionBox( bool create ) +TDECompletionBox * KComboBox::completionBox( bool create ) { if ( d->klineEdit ) return d->klineEdit->completionBox( create ); @@ -271,7 +271,7 @@ void KComboBox::setLineEdit( TQLineEdit *edit ) if ( d->klineEdit ) { // someone calling KComboBox::setEditable( false ) destroys our - // lineedit without us noticing. And KCompletionBase::delegate would + // lineedit without us noticing. And TDECompletionBase::delegate would // be a dangling pointer then, so prevent that. Note: only do this // when it is a KLineEdit! connect( edit, TQT_SIGNAL( destroyed() ), TQT_SLOT( lineEditDeleted() )); @@ -286,12 +286,12 @@ void KComboBox::setLineEdit( TQLineEdit *edit ) TQT_SIGNAL( substringCompletion( const TQString& )) ); connect( d->klineEdit, - TQT_SIGNAL( textRotation( KCompletionBase::KeyBindingType )), - TQT_SIGNAL( textRotation( KCompletionBase::KeyBindingType )) ); + TQT_SIGNAL( textRotation( TDECompletionBase::KeyBindingType )), + TQT_SIGNAL( textRotation( TDECompletionBase::KeyBindingType )) ); connect( d->klineEdit, - TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion )), - TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion))); + TQT_SIGNAL( completionModeChanged( TDEGlobalSettings::Completion )), + TQT_SIGNAL( completionModeChanged( TDEGlobalSettings::Completion))); connect( d->klineEdit, TQT_SIGNAL( aboutToShowContextMenu( TQPopupMenu * )), @@ -333,7 +333,7 @@ void KComboBox::lineEditDeleted() // yes, we need those ugly casts due to the multiple inheritance // sender() is guaranteed to be a KLineEdit (see the connect() to the // destroyed() signal - const KCompletionBase *base = static_cast<const KCompletionBase*>( static_cast<const KLineEdit*>( sender() )); + const TDECompletionBase *base = static_cast<const TDECompletionBase*>( static_cast<const KLineEdit*>( sender() )); // is it our delegate, that is destroyed? if ( base == delegate() ) @@ -378,7 +378,7 @@ void KHistoryCombo::init( bool useCompletion ) setMaxCount( 50 ); if ( useCompletion ) - completionObject()->setOrder( KCompletion::Weighted ); + completionObject()->setOrder( TDECompletion::Weighted ); setInsertionPolicy( NoInsertion ); myIterateIndex = -1; @@ -421,10 +421,10 @@ void KHistoryCombo::setHistoryItems( TQStringList items, if ( setCompletionList && useCompletion() ) { // we don't have any weighting information here ;( - KCompletion *comp = completionObject(); - comp->setOrder( KCompletion::Insertion ); + TDECompletion *comp = completionObject(); + comp->setOrder( TDECompletion::Insertion ); comp->setItems( items ); - comp->setOrder( KCompletion::Weighted ); + comp->setOrder( TDECompletion::Weighted ); } clearEdit(); @@ -489,7 +489,7 @@ void KHistoryCombo::addToHistory( const TQString& item ) // now add the item if ( myPixProvider ) - insertItem( myPixProvider->pixmapFor(item, KIcon::SizeSmall), item, 0); + insertItem( myPixProvider->pixmapFor(item, TDEIcon::SizeSmall), item, 0); else insertItem( item, 0 ); @@ -616,12 +616,12 @@ void KHistoryCombo::keyPressEvent( TQKeyEvent *e ) KKey event_key( e ); // going up in the history, rotating when reaching TQListBox::count() - if ( KStdAccel::rotateUp().contains(event_key) ) + if ( TDEStdAccel::rotateUp().contains(event_key) ) rotateUp(); // going down in the history, no rotation possible. Last item will be // the text that was in the lineedit before Up was called. - else if ( KStdAccel::rotateDown().contains(event_key) ) + else if ( TDEStdAccel::rotateDown().contains(event_key) ) rotateDown(); else KComboBox::keyPressEvent( e ); @@ -679,7 +679,7 @@ void KHistoryCombo::insertItems( const TQStringList& items ) const TQString item = *it; if ( !item.isEmpty() ) { // only insert non-empty items if ( myPixProvider ) - insertItem( myPixProvider->pixmapFor(item, KIcon::SizeSmall), + insertItem( myPixProvider->pixmapFor(item, TDEIcon::SizeSmall), item ); else insertItem( item ); @@ -718,7 +718,7 @@ bool KHistoryCombo::isHistoryEditorEnabled() const } void KComboBox::virtual_hook( int id, void* data ) -{ KCompletionBase::virtual_hook( id, data ); } +{ TDECompletionBase::virtual_hook( id, data ); } void KHistoryCombo::virtual_hook( int id, void* data ) { KComboBox::virtual_hook( id, data ); } @@ -745,12 +745,12 @@ KHistoryComboEditor::KHistoryComboEditor( const TQStringList& entries, TQWidget clearSearch->setTextLabel(i18n("Clear Search"), true); clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); TQLabel* slbl = new TQLabel(i18n("&Search:"), searchbox); - KListViewSearchLine* listViewSearch = new KListViewSearchLine(searchbox); + TDEListViewSearchLine* listViewSearch = new TDEListViewSearchLine(searchbox); slbl->setBuddy(listViewSearch); connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear())); // Add ListView - m_pListView = new KListView( box ); + m_pListView = new TDEListView( box ); listViewSearch->setListView(m_pListView); m_pListView->setAllColumnsShowFocus(true); m_pListView->header()->hide(); diff --git a/tdeui/kcombobox.h b/tdeui/kcombobox.h index de3b07aab..e0c2e2704 100644 --- a/tdeui/kcombobox.h +++ b/tdeui/kcombobox.h @@ -32,13 +32,13 @@ #include <kcompletion.h> #include <kdialogbase.h> -#include <klistview.h> +#include <tdelistview.h> class TQListBoxItem; class TQPopupMenu; class TQLineEdit; -class KCompletionBox; +class TDECompletionBox; class KURL; /** @@ -64,7 +64,7 @@ class KURL; * * KCombobox by default creates a completion object when you invoke the * completionObject( bool ) member function for the first time or - * explicitly use setCompletionObject( KCompletion*, bool ) to assign your + * explicitly use setCompletionObject( TDECompletion*, bool ) to assign your * own completion object. Additionally, to make this widget more functional, * KComboBox will by default handle text rotation and completion events * internally whenever a completion object is created through either one of the @@ -74,11 +74,11 @@ 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 TQGuardedPtr<KCompletion>. + * and consider using TQGuardedPtr<TDECompletion>. * * The default key-bindings for completion and rotation is determined from the - * global settings in KStdAccel. These values, however, can be overridden - * locally by invoking KCompletionBase::setKeyBinding(). The values can + * global settings in TDEStdAccel. These values, however, can be overridden + * locally by invoking TDECompletionBase::setKeyBinding(). The values can * easily be reverted back to the default setting, by simply calling * useGlobalSettings(). An alternate method would be to default individual * key-bindings by usning setKeyBinding() with the default second argument. @@ -93,8 +93,8 @@ class KURL; * words do not do the following: * * \code - * KComboBox* combo = new KCompletionBox(true, this, "mywidget"); - * KCompletion* comp = combo->completionObject(); + * KComboBox* combo = new TDECompletionBox(true, this, "mywidget"); + * TDECompletion* comp = combo->completionObject(); * combo->setEditable( false ); * comp->clear(); // CRASH: completion object does not exist anymore. * \endcode @@ -112,7 +112,7 @@ class KURL; * * \code * KComboBox *combo = new KComboBox( true, this, "mywidget" ); - * KCompletion *comp = combo->completionObject(); + * TDECompletion *comp = combo->completionObject(); * // Connect to the return pressed signal - optional * connect(combo,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&))); * @@ -141,14 +141,14 @@ class KURL; * // Tell the widget not to handle completion and rotation * combo->setHandleSignals( false ); * // Set your own completion key for manual completions. - * combo->setKeyBinding( KCompletionBase::TextCompletion, Qt::End ); + * combo->setKeyBinding( TDECompletionBase::TextCompletion, Qt::End ); * // Hide the context (popup) menu * combo->setContextMenuEnabled( false ); * \endcode * * @author Dawit Alemayehu <adawit@kde.org> */ -class TDEUI_EXPORT KComboBox : public TQComboBox, public KCompletionBase +class TDEUI_EXPORT KComboBox : public TQComboBox, public TDECompletionBase { Q_OBJECT TQ_PROPERTY( bool autoCompletion READ autoCompletion WRITE setAutoCompletion ) @@ -251,7 +251,7 @@ public: * @return @p true when completion mode is automatic. */ bool autoCompletion() const { - return completionMode() == KGlobalSettings::CompletionAuto; + return completionMode() == TDEGlobalSettings::CompletionAuto; } /** @@ -331,14 +331,14 @@ public: /** * @returns the completion-box, that is used in completion mode - * KGlobalSettings::CompletionPopup and KGlobalSettings::CompletionPopupAuto. + * TDEGlobalSettings::CompletionPopup and TDEGlobalSettings::CompletionPopupAuto. * This method will create a completion-box by calling * KLineEdit::completionBox, if none is there, yet. * * @param create Set this to false if you don't want the box to be created * i.e. to test if it is available. */ - KCompletionBox * completionBox( bool create = true ); + TDECompletionBox * completionBox( bool create = true ); /** * Re-implemented for internal reasons. API remains unaffected. @@ -373,7 +373,7 @@ signals: * The argument is the current text being edited. * * Note that this signal is @em not available when the widget is non-editable - * or the completion mode is set to @p KGlobalSettings::CompletionNone. + * or the completion mode is set to @p TDEGlobalSettings::CompletionNone. */ void completion( const TQString& ); @@ -393,13 +393,13 @@ signals: * Note that this signal is @em NOT emitted if the completion * mode is set to CompletionNone. */ - void textRotation( KCompletionBase::KeyBindingType ); + void textRotation( TDECompletionBase::KeyBindingType ); /** * Emitted whenever the completion mode is changed by the user * through the context menu. */ - void completionModeChanged( KGlobalSettings::Completion ); + void completionModeChanged( TDEGlobalSettings::Completion ); /** * Emitted before the context menu is displayed. @@ -431,7 +431,7 @@ public slots: * * @param type The key-binding invoked. */ - void rotateText( KCompletionBase::KeyBindingType type ); + void rotateText( TDECompletionBase::KeyBindingType type ); /** * Sets the completed text in the line-edit appropriately. @@ -599,7 +599,7 @@ public: * You won't have the benefit of weighted completion though, so normally * you should do something like * \code - * KConfig *config = kapp->config(); + * TDEConfig *config = kapp->config(); * TQStringList list; * * // load the history and completion list after creating the history combo @@ -618,17 +618,17 @@ public: * config->writeEntry( "History list", list ); * \endcode * - * Be sure to use different names for saving with KConfig if you have more + * Be sure to use different names for saving with TDEConfig if you have more * than one KHistoryCombo. * * Note: When @p setCompletionList is true, the items are inserted into the - * KCompletion object with mode KCompletion::Insertion and the mode is set - * to KCompletion::Weighted afterwards. + * TDECompletion object with mode TDECompletion::Insertion and the mode is set + * to TDECompletion::Weighted afterwards. * * @see historyItems * @see KComboBox::completionObject - * @see KCompletion::setItems - * @see KCompletion::items + * @see TDECompletion::setItems + * @see TDECompletion::items */ void setHistoryItems( TQStringList items, bool setCompletionList ); @@ -654,7 +654,7 @@ public: * KPixmapProvider is just an abstract class with the one pure virtual * method KPixmapProvider::pixmapFor(). This method is called whenever * an item is added to the KHistoryComboBox. Implement it to return your - * own custom pixmaps, or use the KURLPixmapProvider from libkio, + * own custom pixmaps, or use the KURLPixmapProvider from libtdeio, * which uses KMimeType::pixmapForURL to resolve icons. * * Set @p prov to 0L if you want to disable pixmaps. Default no pixmaps. @@ -815,7 +815,7 @@ protected: virtual void virtual_hook( int id, void* data ); private: - KListView *m_pListView; + TDEListView *m_pListView; class KHistoryComboEditorPrivate; KHistoryComboEditorPrivate* const d; diff --git a/tdeui/kcommand.cpp b/tdeui/kcommand.cpp index 2c76b21cd..994d1262e 100644 --- a/tdeui/kcommand.cpp +++ b/tdeui/kcommand.cpp @@ -19,12 +19,12 @@ */ #include "kcommand.h" -#include <kaction.h> -#include <kstdaccel.h> +#include <tdeaction.h> +#include <tdestdaccel.h> #include <kstdaction.h> #include <kdebug.h> -#include <klocale.h> -#include <kpopupmenu.h> +#include <tdelocale.h> +#include <tdepopupmenu.h> KCommand::~KCommand() { @@ -77,22 +77,22 @@ KCommandHistory::KCommandHistory() : clear(); } -KCommandHistory::KCommandHistory(KActionCollection * actionCollection, bool withMenus) : +KCommandHistory::KCommandHistory(TDEActionCollection * actionCollection, bool withMenus) : m_undoLimit(50), m_redoLimit(30), m_first(false) { d=new KCommandHistoryPrivate(); if (withMenus) { - KToolBarPopupAction * undo = new KToolBarPopupAction( i18n("&Undo"), "undo", - KStdAccel::shortcut(KStdAccel::Undo), this, TQT_SLOT( undo() ), + TDEToolBarPopupAction * undo = new TDEToolBarPopupAction( i18n("&Undo"), "undo", + TDEStdAccel::shortcut(TDEStdAccel::Undo), this, TQT_SLOT( undo() ), actionCollection, KStdAction::stdName( KStdAction::Undo ) ); connect( undo->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotUndoAboutToShow() ) ); connect( undo->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotUndoActivated( int ) ) ); m_undo = undo; m_undoPopup = undo->popupMenu(); - KToolBarPopupAction * redo = new KToolBarPopupAction( i18n("&Redo"), "redo", - KStdAccel::shortcut(KStdAccel::Redo), this, TQT_SLOT( redo() ), + TDEToolBarPopupAction * redo = new TDEToolBarPopupAction( i18n("&Redo"), "redo", + TDEStdAccel::shortcut(TDEStdAccel::Redo), this, TQT_SLOT( redo() ), actionCollection, KStdAction::stdName( KStdAction::Redo ) ); connect( redo->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotRedoAboutToShow() ) ); connect( redo->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotRedoActivated( int ) ) ); diff --git a/tdeui/kcommand.h b/tdeui/kcommand.h index f802f8d64..e27e5178b 100644 --- a/tdeui/kcommand.h +++ b/tdeui/kcommand.h @@ -26,8 +26,8 @@ #include <tqobject.h> #include <tdelibs_export.h> -class KAction; -class KActionCollection; +class TDEAction; +class TDEActionCollection; class TQPopupMenu; /** @@ -171,7 +171,7 @@ public: * into a toolbar. * @param actionCollection the parent collection */ - KCommandHistory(KActionCollection *actionCollection, bool withMenus = true); + KCommandHistory(TDEActionCollection *actionCollection, bool withMenus = true); /** * Destructs the command history object. @@ -222,12 +222,12 @@ public: public slots: /** * Undoes the last action. - * Call this if you don't use the builtin KActions. + * Call this if you don't use the builtin TDEActions. */ virtual void undo(); /** * Redoes the last undone action. - * Call this if you don't use the builtin KActions. + * Call this if you don't use the builtin TDEActions. */ virtual void redo(); /** @@ -275,7 +275,7 @@ private: void clipCommands(); // ensures that the limits are kept TQPtrList<KCommand> m_commands; - KAction *m_undo, *m_redo; + TDEAction *m_undo, *m_redo; TQPopupMenu *m_undoPopup, *m_redoPopup; int m_undoLimit, m_redoLimit; bool m_first; // attention: it's the first command in the list! diff --git a/tdeui/kcursor.cpp b/tdeui/kcursor.cpp index 1458f88dc..17f523d86 100644 --- a/tdeui/kcursor.cpp +++ b/tdeui/kcursor.cpp @@ -30,8 +30,8 @@ #include <tqtimer.h> #include <tqwidget.h> -#include <kglobal.h> -#include <kconfig.h> +#include <tdeglobal.h> +#include <tdeconfig.h> #include <tqscrollview.h> #include "kcursor_private.h" @@ -46,8 +46,8 @@ TQCursor KCursor::handCursor() if (!hand_cursor) { - KConfig *config = KGlobal::config(); - KConfigGroupSaver saver( config, "General" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "General" ); #ifndef Q_WS_WIN // this mask doesn't work too well on win32 if ( config->readEntry("handCursorStyle", "Windows") == "Windows" ) @@ -369,8 +369,8 @@ KCursorPrivate::KCursorPrivate() { hideCursorDelay = 5000; // 5s default value - KConfig *kc = KGlobal::config(); - KConfigGroupSaver ks( kc, TQString::fromLatin1("KDE") ); + TDEConfig *kc = TDEGlobal::config(); + TDEConfigGroupSaver ks( kc, TQString::fromLatin1("KDE") ); enabled = kc->readBoolEntry( TQString::fromLatin1("Autohiding cursor enabled"), true ); } diff --git a/tdeui/kdatepicker.cpp b/tdeui/kdatepicker.cpp index ded20474a..99f1ce4af 100644 --- a/tdeui/kdatepicker.cpp +++ b/tdeui/kdatepicker.cpp @@ -32,12 +32,12 @@ #include <tqtimer.h> #include "kdatepicker.h" -#include <kglobal.h> -#include <kapplication.h> +#include <tdeglobal.h> +#include <tdeapplication.h> #include <kdialog.h> -#include <klocale.h> +#include <tdelocale.h> #include <kiconloader.h> -#include <ktoolbar.h> +#include <tdetoolbar.h> #include <klineedit.h> #include <kdebug.h> #include <knotifyclient.h> @@ -65,7 +65,7 @@ public: void KDatePicker::fillWeeksCombo(const TQDate &date) { // every year can have a different number of weeks - const KCalendarSystem * calendar = KGlobal::locale()->calendar(); + const KCalendarSystem * calendar = TDEGlobal::locale()->calendar(); // it could be that we had 53,1..52 and now 1..53 which is the same number but different // so always fill with new values @@ -150,9 +150,9 @@ void KDatePicker::init( const TQDate &dt ) line = new KLineEdit(this); val = new KDateValidator(this); table = new KDateTable(this); - fontsize = KGlobalSettings::generalFont().pointSize(); + fontsize = TDEGlobalSettings::generalFont().pointSize(); if (fontsize == -1) - fontsize = TQFontInfo(KGlobalSettings::generalFont()).pointSize(); + fontsize = TQFontInfo(TDEGlobalSettings::generalFont()).pointSize(); fontsize++; // Make a little bigger @@ -247,9 +247,9 @@ KDatePicker::dateChangedSlot(TQDate date) { kdDebug(298) << "KDatePicker::dateChangedSlot: date changed (" << date.year() << "/" << date.month() << "/" << date.day() << ")." << endl; - const KCalendarSystem * calendar = KGlobal::locale()->calendar(); + const KCalendarSystem * calendar = TDEGlobal::locale()->calendar(); - line->setText(KGlobal::locale()->formatDate(date, true)); + line->setText(TDEGlobal::locale()->formatDate(date, true)); selectMonth->setText(calendar->monthName(date, false)); fillWeeksCombo(date); @@ -301,7 +301,7 @@ void KDatePicker::monthForwardClicked() { TQDate temp; - temp = KGlobal::locale()->calendar()->addMonths( table->getDate(), 1 ); + temp = TDEGlobal::locale()->calendar()->addMonths( table->getDate(), 1 ); setDate( temp ); } @@ -310,7 +310,7 @@ void KDatePicker::monthBackwardClicked() { TQDate temp; - temp = KGlobal::locale()->calendar()->addMonths( table->getDate(), -1 ); + temp = TDEGlobal::locale()->calendar()->addMonths( table->getDate(), -1 ); setDate( temp ); } @@ -319,7 +319,7 @@ void KDatePicker::yearForwardClicked() { TQDate temp; - temp = KGlobal::locale()->calendar()->addYears( table->getDate(), 1 ); + temp = TDEGlobal::locale()->calendar()->addYears( table->getDate(), 1 ); setDate( temp ); } @@ -328,7 +328,7 @@ void KDatePicker::yearBackwardClicked() { TQDate temp; - temp = KGlobal::locale()->calendar()->addYears( table->getDate(), -1 ); + temp = TDEGlobal::locale()->calendar()->addYears( table->getDate(), -1 ); setDate( temp ); } @@ -338,7 +338,7 @@ void KDatePicker::selectWeekClicked() {} // ### in 3.2 obsolete; kept for binar void KDatePicker::weekSelected(int week) { - const KCalendarSystem * calendar = KGlobal::locale()->calendar(); + const KCalendarSystem * calendar = TDEGlobal::locale()->calendar(); TQDate date = table->getDate(); int year = calendar->year(date); @@ -355,7 +355,7 @@ void KDatePicker::selectMonthClicked() { // every year can have different month names (in some calendar systems) - const KCalendarSystem * calendar = KGlobal::locale()->calendar(); + const KCalendarSystem * calendar = TDEGlobal::locale()->calendar(); TQDate date = table->getDate(); int i, month, months = calendar->monthsInYear(date); @@ -379,7 +379,7 @@ KDatePicker::selectMonthClicked() void KDatePicker::selectYearClicked() { - const KCalendarSystem * calendar = KGlobal::locale()->calendar(); + const KCalendarSystem * calendar = TDEGlobal::locale()->calendar(); if (selectYear->state() == TQButton::Off) { @@ -387,7 +387,7 @@ KDatePicker::selectYearClicked() } int year; - KPopupFrame* popup = new KPopupFrame(this); + TDEPopupFrame* popup = new TDEPopupFrame(this); KDateInternalYearSelector* picker = new KDateInternalYearSelector(popup); // ----- picker->resize(picker->sizeHint()); @@ -499,8 +499,8 @@ KDatePicker::setFontSize(int s) for (int i = 1; ; ++i) { - TQString str = KGlobal::locale()->calendar()->monthName(i, - KGlobal::locale()->calendar()->year(table->getDate()), false); + TQString str = TDEGlobal::locale()->calendar()->monthName(i, + TDEGlobal::locale()->calendar()->year(table->getDate()), false); if (str.isNull()) break; r=metrics.boundingRect(str); maxMonthRect.setWidth(QMAX(r.width(), maxMonthRect.width())); diff --git a/tdeui/kdatetbl.cpp b/tdeui/kdatetbl.cpp index 9387a6322..56edf9a5c 100644 --- a/tdeui/kdatetbl.cpp +++ b/tdeui/kdatetbl.cpp @@ -32,20 +32,20 @@ // When a date is selected by the user, it emits a signal: // dateSelected(TQDate) -#include <kconfig.h> -#include <kglobal.h> -#include <kglobalsettings.h> -#include <kapplication.h> -#include <kaccel.h> -#include <klocale.h> +#include <tdeconfig.h> +#include <tdeglobal.h> +#include <tdeglobalsettings.h> +#include <tdeapplication.h> +#include <tdeaccel.h> +#include <tdelocale.h> #include <kdebug.h> #include <knotifyclient.h> #include <kcalendarsystem.h> -#include <kshortcut.h> -#include <kstdaccel.h> +#include <tdeshortcut.h> +#include <tdestdaccel.h> #include "kdatepicker.h" #include "kdatetbl.h" -#include "kpopupmenu.h" +#include "tdepopupmenu.h" #include <tqdatetime.h> #include <tqguardedptr.h> #include <tqstring.h> @@ -99,7 +99,7 @@ KDateValidator::validate(TQString& text, int&) const TQValidator::State KDateValidator::date(const TQString& text, TQDate& d) const { - TQDate tmp = KGlobal::locale()->readDate(text); + TQDate tmp = TDEGlobal::locale()->readDate(text); if (!tmp.isNull()) { d = tmp; @@ -129,7 +129,7 @@ KDateTable::KDateTable(TQWidget *parent, TQDate date_, const char* name, WFlags setNumCols(7); // 7 days a week setHScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff); - viewport()->setEraseColor(KGlobalSettings::baseColor()); + viewport()->setEraseColor(TDEGlobalSettings::baseColor()); setDate(date_); // this initializes firstday, numdays, numDaysPrevMonth initAccels(); @@ -145,7 +145,7 @@ KDateTable::KDateTable(TQWidget *parent, const char* name, WFlags f) setNumCols(7); // 7 days a week setHScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff); - viewport()->setEraseColor(KGlobalSettings::baseColor()); + viewport()->setEraseColor(TDEGlobalSettings::baseColor()); setDate(TQDate::currentDate()); // this initializes firstday, numdays, numDaysPrevMonth initAccels(); } @@ -157,20 +157,20 @@ KDateTable::~KDateTable() void KDateTable::initAccels() { - KAccel* accel = new KAccel(this, "date table accel"); - accel->insert(KStdAccel::Next, TQT_TQOBJECT(this), TQT_SLOT(nextMonth())); - accel->insert(KStdAccel::Prior, TQT_TQOBJECT(this), TQT_SLOT(previousMonth())); - accel->insert(KStdAccel::Home, TQT_TQOBJECT(this), TQT_SLOT(beginningOfMonth())); - accel->insert(KStdAccel::End, TQT_TQOBJECT(this), TQT_SLOT(endOfMonth())); - accel->insert(KStdAccel::BeginningOfLine, TQT_TQOBJECT(this), TQT_SLOT(beginningOfWeek())); - accel->insert(KStdAccel::EndOfLine, TQT_TQOBJECT(this), TQT_SLOT(endOfWeek())); + TDEAccel* accel = new TDEAccel(this, "date table accel"); + accel->insert(TDEStdAccel::Next, TQT_TQOBJECT(this), TQT_SLOT(nextMonth())); + accel->insert(TDEStdAccel::Prior, TQT_TQOBJECT(this), TQT_SLOT(previousMonth())); + accel->insert(TDEStdAccel::Home, TQT_TQOBJECT(this), TQT_SLOT(beginningOfMonth())); + accel->insert(TDEStdAccel::End, TQT_TQOBJECT(this), TQT_SLOT(endOfMonth())); + accel->insert(TDEStdAccel::BeginningOfLine, TQT_TQOBJECT(this), TQT_SLOT(beginningOfWeek())); + accel->insert(TDEStdAccel::EndOfLine, TQT_TQOBJECT(this), TQT_SLOT(endOfWeek())); accel->readSettings(); } int KDateTable::posFromDate( const TQDate &dt ) { - const KCalendarSystem * calendar = KGlobal::locale()->calendar(); - const int firstWeekDay = KGlobal::locale()->weekStartDay(); + const KCalendarSystem * calendar = TDEGlobal::locale()->calendar(); + const int firstWeekDay = TDEGlobal::locale()->weekStartDay(); int pos = calendar->day( dt ); int offset = (firstday - firstWeekDay + 7) % 7; // make sure at least one day of the previous month is visible. @@ -182,10 +182,10 @@ int KDateTable::posFromDate( const TQDate &dt ) TQDate KDateTable::dateFromPos( int pos ) { TQDate pCellDate; - const KCalendarSystem * calendar = KGlobal::locale()->calendar(); + const KCalendarSystem * calendar = TDEGlobal::locale()->calendar(); calendar->setYMD(pCellDate, calendar->year(date), calendar->month(date), 1); - int firstWeekDay = KGlobal::locale()->weekStartDay(); + int firstWeekDay = TDEGlobal::locale()->weekStartDay(); int offset = (firstday - firstWeekDay + 7) % 7; // make sure at least one day of the previous month is visible. // adjust this <1 if more days should be forced visible: @@ -211,14 +211,14 @@ KDateTable::paintEmptyArea(TQPainter *paint, int, int, int, int) void KDateTable::paintCell(TQPainter *painter, int row, int col) { - const KCalendarSystem * calendar = KGlobal::locale()->calendar(); + const KCalendarSystem * calendar = TDEGlobal::locale()->calendar(); TQRect rect; TQString text; TQPen pen; int w=cellWidth(); int h=cellHeight(); - TQFont font=KGlobalSettings::generalFont(); + TQFont font=TDEGlobalSettings::generalFont(); // ----- if(row == 0) @@ -226,7 +226,7 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) font.setBold(true); painter->setFont(font); bool normalday = true; - int firstWeekDay = KGlobal::locale()->weekStartDay(); + int firstWeekDay = TDEGlobal::locale()->weekStartDay(); int daynum = ( col+firstWeekDay < 8 ) ? col+firstWeekDay : col+firstWeekDay-7; if ( daynum == calendar->weekDayOfPray() || @@ -234,8 +234,8 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) normalday=false; TQBrush brushInvertTitle(colorGroup().base()); - TQColor titleColor(isEnabled()?( KGlobalSettings::activeTitleColor() ):( KGlobalSettings::inactiveTitleColor() ) ); - TQColor textColor(isEnabled()?( KGlobalSettings::activeTextColor() ):( KGlobalSettings::inactiveTextColor() ) ); + TQColor titleColor(isEnabled()?( TDEGlobalSettings::activeTitleColor() ):( TDEGlobalSettings::inactiveTitleColor() ) ); + TQColor textColor(isEnabled()?( TDEGlobalSettings::activeTextColor() ):( TDEGlobalSettings::inactiveTextColor() ) ); if (!normalday) { painter->setPen(textColor); @@ -298,7 +298,7 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) } pen=painter->pen(); - int firstWeekDay=KGlobal::locale()->weekStartDay(); + int firstWeekDay=TDEGlobal::locale()->weekStartDay(); int offset=firstday-firstWeekDay; if(offset<1) offset+=7; @@ -339,13 +339,13 @@ KDateTable::paintCell(TQPainter *painter, int row, int col) void KDateTable::nextMonth() { - const KCalendarSystem * calendar = KGlobal::locale()->calendar(); + const KCalendarSystem * calendar = TDEGlobal::locale()->calendar(); setDate(calendar->addMonths( date, 1 )); } void KDateTable::previousMonth() { - const KCalendarSystem * calendar = KGlobal::locale()->calendar(); + const KCalendarSystem * calendar = TDEGlobal::locale()->calendar(); setDate(calendar->addMonths( date, -1 )); } @@ -433,7 +433,7 @@ KDateTable::setFontSize(int size) maxCell.setHeight(0); for(count=0; count<7; ++count) { - rect=metrics.boundingRect(KGlobal::locale()->calendar() + rect=metrics.boundingRect(TDEGlobal::locale()->calendar() ->weekDayName(count+1, true)); maxCell.setWidth(QMAX(maxCell.width(), rect.width())); maxCell.setHeight(QMAX(maxCell.height(), rect.height())); @@ -499,8 +499,8 @@ KDateTable::contentsMousePressEvent(TQMouseEvent *e) if ( e->button() == Qt::RightButton && d->popupMenuEnabled ) { - KPopupMenu *menu = new KPopupMenu(); - menu->insertTitle( KGlobal::locale()->formatDate(clickedDate) ); + TDEPopupMenu *menu = new TDEPopupMenu(); + menu->insertTitle( TDEGlobal::locale()->formatDate(clickedDate) ); emit aboutToShowContextMenu( menu, clickedDate ); menu->popup(e->globalPos()); } @@ -524,7 +524,7 @@ KDateTable::setDate(const TQDate& date_) emit(dateChanged(date)); changed=true; } - const KCalendarSystem * calendar = KGlobal::locale()->calendar(); + const KCalendarSystem * calendar = TDEGlobal::locale()->calendar(); calendar->setYMD(temp, calendar->year(date), calendar->month(date), 1); //temp.setYMD(date.year(), date.month(), 1); @@ -614,7 +614,7 @@ KDateInternalWeekSelector::KDateInternalWeekSelector { TQFont font; // ----- - font=KGlobalSettings::generalFont(); + font=TDEGlobalSettings::generalFont(); setFont(font); setFrameStyle(TQFrame::NoFrame); setValidator(val); @@ -686,7 +686,7 @@ KDateInternalMonthPicker::KDateInternalMonthPicker // ----- activeCol = -1; activeRow = -1; - font=KGlobalSettings::generalFont(); + font=TDEGlobalSettings::generalFont(); setFont(font); setHScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff); @@ -694,17 +694,17 @@ KDateInternalMonthPicker::KDateInternalMonthPicker setNumCols(3); d = new KDateInternalMonthPrivate(date.year(), date.month(), date.day()); // For monthsInYear != 12 - setNumRows( (KGlobal::locale()->calendar()->monthsInYear(date) + 2) / 3); + setNumRows( (TDEGlobal::locale()->calendar()->monthsInYear(date) + 2) / 3); // enable to find drawing failures: // setTableFlags(Tbl_clipCellPainting); - viewport()->setEraseColor(KGlobalSettings::baseColor()); // for consistency with the datepicker + viewport()->setEraseColor(TDEGlobalSettings::baseColor()); // for consistency with the datepicker // ----- find the preferred size // (this is slow, possibly, but unfortunately it is needed here): TQFontMetrics metrics(font); for(int i = 1; ; ++i) { - TQString str = KGlobal::locale()->calendar()->monthName(i, - KGlobal::locale()->calendar()->year(date), false); + TQString str = TDEGlobal::locale()->calendar()->monthName(i, + TDEGlobal::locale()->calendar()->year(date), false); if (str.isNull()) break; rect=metrics.boundingRect(str); if(max.width()<rect.width()) max.setWidth(rect.width()); @@ -728,7 +728,7 @@ KDateInternalMonthPicker::getResult() const void KDateInternalMonthPicker::setupPainter(TQPainter *p) { - p->setPen(KGlobalSettings::textColor()); + p->setPen(TDEGlobalSettings::textColor()); } void @@ -745,8 +745,8 @@ KDateInternalMonthPicker::paintCell(TQPainter* painter, int row, int col) TQString text; // ----- find the number of the cell: index=3*row+col+1; - text=KGlobal::locale()->calendar()->monthName(index, - KGlobal::locale()->calendar()->year(TQDate(d->year, d->month, + text=TDEGlobal::locale()->calendar()->monthName(index, + TDEGlobal::locale()->calendar()->year(TQDate(d->year, d->month, d->day)), false); painter->drawText(0, 0, cellWidth(), cellHeight(), AlignCenter, text); if ( activeCol == col && activeRow == row ) @@ -855,7 +855,7 @@ KDateInternalYearSelector::KDateInternalYearSelector { TQFont font; // ----- - font=KGlobalSettings::generalFont(); + font=TDEGlobalSettings::generalFont(); setFont(font); setFrameStyle(TQFrame::NoFrame); // we have to respect the limits of TQDate here, I fear: @@ -879,7 +879,7 @@ KDateInternalYearSelector::yearEnteredSlot() return; } //date.setYMD(year, 1, 1); - KGlobal::locale()->calendar()->setYMD(date, year, 1, 1); + TDEGlobal::locale()->calendar()->setYMD(date, year, 1, 1); if(!date.isValid()) { KNotifyClient::beep(); @@ -905,31 +905,31 @@ KDateInternalYearSelector::setYear(int year) setText(temp); } -class KPopupFrame::KPopupFramePrivate +class TDEPopupFrame::TDEPopupFramePrivate { public: - KPopupFramePrivate() : exec(false) {} + TDEPopupFramePrivate() : exec(false) {} bool exec; }; -KPopupFrame::KPopupFrame(TQWidget* parent, const char* name) +TDEPopupFrame::TDEPopupFrame(TQWidget* parent, const char* name) : TQFrame(parent, name, (WFlags)WType_Popup), result(0), // rejected main(0), - d(new KPopupFramePrivate) + d(new TDEPopupFramePrivate) { setFrameStyle(TQFrame::Box|TQFrame::Raised); setMidLineWidth(2); } -KPopupFrame::~KPopupFrame() +TDEPopupFrame::~TDEPopupFrame() { delete d; } void -KPopupFrame::keyPressEvent(TQKeyEvent* e) +TDEPopupFrame::keyPressEvent(TQKeyEvent* e) { if(e->key()==Key_Escape) { @@ -940,7 +940,7 @@ KPopupFrame::keyPressEvent(TQKeyEvent* e) } void -KPopupFrame::close(int r) +TDEPopupFrame::close(int r) { result=r; d->exec = false; @@ -948,7 +948,7 @@ KPopupFrame::close(int r) } void -KPopupFrame::hide() +TDEPopupFrame::hide() { TQFrame::hide(); if (d->exec) @@ -959,7 +959,7 @@ KPopupFrame::hide() } void -KPopupFrame::setMainWidget(TQWidget* m) +TDEPopupFrame::setMainWidget(TQWidget* m) { main=m; if(main) @@ -969,7 +969,7 @@ KPopupFrame::setMainWidget(TQWidget* m) } void -KPopupFrame::resizeEvent(TQResizeEvent*) +TDEPopupFrame::resizeEvent(TQResizeEvent*) { if(main) { @@ -979,10 +979,10 @@ KPopupFrame::resizeEvent(TQResizeEvent*) } void -KPopupFrame::popup(const TQPoint &pos) +TDEPopupFrame::popup(const TQPoint &pos) { // Make sure the whole popup is visible. - TQRect d = KGlobalSettings::desktopGeometry(pos); + TQRect d = TDEGlobalSettings::desktopGeometry(pos); int x = pos.x(); int y = pos.y(); @@ -1003,7 +1003,7 @@ KPopupFrame::popup(const TQPoint &pos) } int -KPopupFrame::exec(TQPoint pos) +TDEPopupFrame::exec(TQPoint pos) { popup(pos); repaint(); @@ -1017,12 +1017,12 @@ KPopupFrame::exec(TQPoint pos) } int -KPopupFrame::exec(int x, int y) +TDEPopupFrame::exec(int x, int y) { return exec(TQPoint(x, y)); } -void KPopupFrame::virtual_hook( int, void* ) +void TDEPopupFrame::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void KDateTable::virtual_hook( int, void* ) diff --git a/tdeui/kdatetbl.h b/tdeui/kdatetbl.h index 5e9adbd15..649dae73c 100644 --- a/tdeui/kdatetbl.h +++ b/tdeui/kdatetbl.h @@ -30,7 +30,7 @@ #include <tdelibs_export.h> -class KPopupMenu; +class TDEPopupMenu; /** Week selection widget. * @internal @@ -163,7 +163,7 @@ private: * @author Tim Gilman, Mirko Boehm * @version $Id$ */ -class TDEUI_EXPORT KPopupFrame : public TQFrame +class TDEUI_EXPORT TDEPopupFrame : public TQFrame { Q_OBJECT protected: @@ -194,11 +194,11 @@ public: /** * The contructor. Creates a dialog without buttons. */ - KPopupFrame(TQWidget* parent=0, const char* name=0); + TDEPopupFrame(TQWidget* parent=0, const char* name=0); /** * The destructor. */ - ~KPopupFrame(); + ~TDEPopupFrame(); /** * Set the main widget. You cannot set the main widget from the constructor, * since it must be a child of the frame itselfes. @@ -231,8 +231,8 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KPopupFramePrivate; - KPopupFramePrivate *d; + class TDEPopupFramePrivate; + TDEPopupFramePrivate *d; }; /** @@ -425,7 +425,7 @@ signals: * * @since 3.2 */ - void aboutToShowContextMenu( KPopupMenu * menu, const TQDate &date); + void aboutToShowContextMenu( TDEPopupMenu * menu, const TQDate &date); private slots: void nextMonth(); diff --git a/tdeui/kdatewidget.cpp b/tdeui/kdatewidget.cpp index ba46a599b..e9185a9c1 100644 --- a/tdeui/kdatewidget.cpp +++ b/tdeui/kdatewidget.cpp @@ -23,8 +23,8 @@ #include <tqlineedit.h> #include "knuminput.h" -#include "kglobal.h" -#include "klocale.h" +#include "tdeglobal.h" +#include "tdelocale.h" #include "kcalendarsystem.h" //#include "kdatepicker.h" #include "kdialog.h" @@ -72,7 +72,7 @@ KDateWidget::KDateWidget( TQDate date, TQWidget *parent, void KDateWidget::init() { d = new KDateWidgetPrivate; - KLocale *locale = KGlobal::locale(); + TDELocale *locale = TDEGlobal::locale(); TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint()); layout->setAutoAdd(true); d->m_day = new KDateWidgetSpinBox(1, 1, this); @@ -96,7 +96,7 @@ void KDateWidget::init() void KDateWidget::init(const TQDate& date) { d = new KDateWidgetPrivate; - KLocale *locale = KGlobal::locale(); + TDELocale *locale = TDEGlobal::locale(); TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint()); layout->setAutoAdd(true); d->m_day = new KDateWidgetSpinBox(1, 1, this); @@ -125,7 +125,7 @@ KDateWidget::~KDateWidget() // ### HPB change TQDate to const TQDate & in KDE 4.0 void KDateWidget::setDate( TQDate date ) { - const KCalendarSystem * calendar = KGlobal::locale()->calendar(); + const KCalendarSystem * calendar = TDEGlobal::locale()->calendar(); d->m_day->blockSignals(true); d->m_month->blockSignals(true); @@ -151,7 +151,7 @@ TQDate KDateWidget::date() const void KDateWidget::slotDateChanged( ) { - const KCalendarSystem * calendar = KGlobal::locale()->calendar(); + const KCalendarSystem * calendar = TDEGlobal::locale()->calendar(); TQDate date; int y,m,day; diff --git a/tdeui/kdcopactionproxy.cpp b/tdeui/kdcopactionproxy.cpp index 2b20e8bd3..028c90883 100644 --- a/tdeui/kdcopactionproxy.cpp +++ b/tdeui/kdcopactionproxy.cpp @@ -20,8 +20,8 @@ #include "kdcopactionproxy.h" #include <dcopclient.h> -#include <kapplication.h> -#include <kaction.h> +#include <tdeapplication.h> +#include <tdeaction.h> #include <kdebug.h> #include <kdcoppropertyproxy.h> @@ -37,13 +37,13 @@ public: { } - KActionCollection *m_actionCollection; + TDEActionCollection *m_actionCollection; DCOPObject *m_parent; TQCString m_prefix; int m_pos; }; -KDCOPActionProxy::KDCOPActionProxy( KActionCollection *actionCollection, DCOPObject *parent ) +KDCOPActionProxy::KDCOPActionProxy( TDEActionCollection *actionCollection, DCOPObject *parent ) { init( actionCollection, parent ); } @@ -53,7 +53,7 @@ KDCOPActionProxy::KDCOPActionProxy( DCOPObject *parent ) init( 0, parent ); } -void KDCOPActionProxy::init( KActionCollection *collection, DCOPObject *parent ) +void KDCOPActionProxy::init( TDEActionCollection *collection, DCOPObject *parent ) { d = new KDCOPActionProxyPrivate; d->m_actionCollection = collection; @@ -67,15 +67,15 @@ KDCOPActionProxy::~KDCOPActionProxy() delete d; } -TQValueList<KAction *>KDCOPActionProxy::actions() const +TQValueList<TDEAction *>KDCOPActionProxy::actions() const { if ( !d->m_actionCollection ) - return TQValueList<KAction *>(); + return TQValueList<TDEAction *>(); return d->m_actionCollection->actions(); } -KAction *KDCOPActionProxy::action( const char *name ) const +TDEAction *KDCOPActionProxy::action( const char *name ) const { if ( !d->m_actionCollection ) return 0; @@ -96,9 +96,9 @@ TQMap<TQCString,DCOPRef> KDCOPActionProxy::actionMap( const TQCString &appId ) c if ( id.isEmpty() ) id = kapp->dcopClient()->appId(); - TQValueList<KAction *> lst = actions(); - TQValueList<KAction *>::ConstIterator it = lst.begin(); - TQValueList<KAction *>::ConstIterator end = lst.end(); + TQValueList<TDEAction *> lst = actions(); + TQValueList<TDEAction *>::ConstIterator it = lst.begin(); + TQValueList<TDEAction *>::ConstIterator end = lst.end(); for (; it != end; ++it ) res.insert( (*it)->name(), DCOPRef( id, actionObjectId( (*it)->name() ) ) ); @@ -111,7 +111,7 @@ bool KDCOPActionProxy::process( const TQCString &obj, const TQCString &fun, cons if ( obj.left( d->m_pos ) != d->m_prefix ) return false; - KAction *act = action( obj.mid( d->m_pos ) ); + TDEAction *act = action( obj.mid( d->m_pos ) ); if ( !act ) return false; @@ -119,7 +119,7 @@ bool KDCOPActionProxy::process( const TQCString &obj, const TQCString &fun, cons } bool KDCOPActionProxy::processAction( const TQCString &, const TQCString &fun, const TQByteArray &data, - TQCString &replyType, TQByteArray &replyData, KAction *action ) + TQCString &replyType, TQByteArray &replyData, TDEAction *action ) { if ( fun == "activate()" ) { diff --git a/tdeui/kdcopactionproxy.h b/tdeui/kdcopactionproxy.h index 429264899..0bb80fec1 100644 --- a/tdeui/kdcopactionproxy.h +++ b/tdeui/kdcopactionproxy.h @@ -23,15 +23,15 @@ #include <dcopref.h> #include <tdelibs_export.h> -class KActionCollection; -class KAction; +class TDEActionCollection; +class TDEAction; /** * @short A proxy class publishing a DCOP interface for actions. * - * The KDCOPActionProxy class provides an easy way to publish a collection of KAction objects + * The KDCOPActionProxy class provides an easy way to publish a collection of TDEAction objects * through DCOP. For the DCOP client the exported actions behave like full-fledged DCOP objects, - * providing full access to the KAction object functionality in the server. + * providing full access to the TDEAction object functionality in the server. * * This class can generate DCOP object ids for given action objects, which it automatically * processes, as being a DCOPObjectProxy . @@ -41,13 +41,13 @@ class TDEUI_EXPORT KDCOPActionProxy : public DCOPObjectProxy public: /** * Constructs a dcop action proxy, being able to export the actions of the provided - * KActionCollection through DCOP, using the parent DCOPObject's object id to + * TDEActionCollection through DCOP, using the parent DCOPObject's object id to * generate unique object ids for the actions. */ - KDCOPActionProxy( KActionCollection *actionCollection, DCOPObject *parent ); + KDCOPActionProxy( TDEActionCollection *actionCollection, DCOPObject *parent ); /** * Use this constructor if do not want to provide the exportable actions through a - * KActionCollection . You have to reimplement the virtual actions() and + * TDEActionCollection . You have to reimplement the virtual actions() and * action() methods if you use this constructor. */ KDCOPActionProxy( DCOPObject *parent ); @@ -58,14 +58,14 @@ public: /** * Returns a list of exportable actions. The default implementation returns a list of actions - * provided by a KActionCollection, if the first constructor has been used. + * provided by a TDEActionCollection, if the first constructor has been used. */ - virtual TQValueList<KAction *> actions() const; + virtual TQValueList<TDEAction *> actions() const; /** * Returns an action object with the given name. The default implementation queries the action object - * from the KActionCollection, if the first constructor has been used. + * from the TDEActionCollection, if the first constructor has been used. */ - virtual KAction *action( const char *name ) const; + virtual TDEAction *action( const char *name ) const; /** * Use this method to retrieve a DCOP object id for an action with the given name. @@ -98,9 +98,9 @@ public: * action object. */ virtual bool processAction( const TQCString &obj, const TQCString &fun, const TQByteArray &data, - TQCString &replyType, TQByteArray &replyData, KAction *action ); + TQCString &replyType, TQByteArray &replyData, TDEAction *action ); private: - void init( KActionCollection *collection, DCOPObject *parent ); + void init( TDEActionCollection *collection, DCOPObject *parent ); protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdeui/kdepackages.h b/tdeui/kdepackages.h index 92907a4bc..e4bc551aa 100644 --- a/tdeui/kdepackages.h +++ b/tdeui/kdepackages.h @@ -306,8 +306,8 @@ const char * const packages[] = { "kchart/usability", "kchat", "kcoloredit", -"kconfigeditor", -"kconfigure", +"tdeconfigeditor", +"tdeconfigure", "kcontrol", "kcontrol/kcmaccess", "kcontrol/kcmaccessibility", @@ -341,7 +341,7 @@ const char * const packages[] = { "kcontrol/kcmknotify", "kcontrol/kcmkonq", "kcontrol/kcmkonqhtml", -"kcontrol/kcmkresources", +"kcontrol/kcmtderesources", "kcontrol/kcmksplash", "kcontrol/kcmkurifilt", "kcontrol/kcmkvaio", @@ -362,7 +362,7 @@ const char * const packages[] = { "kcontrol/kcmproxy", "kcontrol/kcmsamba", "kcontrol/kcmscreensaver", -"kcontrol/kcmshell", +"kcontrol/tdecmshell", "kcontrol/kcmsmserver", "kcontrol/kcmspellchecking", "kcontrol/kcmstyle", @@ -388,9 +388,9 @@ const char * const packages[] = { "kde-bluetooth/kbtserialchat", "kde-bluetooth/khciconfig", "kde-bluetooth/kinputwizard", -"kde-bluetooth/kio_bluetooth", -"kde-bluetooth/kio_obex", -"kde-bluetooth/kio_sdp", +"kde-bluetooth/tdeio_bluetooth", +"kde-bluetooth/tdeio_obex", +"kde-bluetooth/tdeio_sdp", "kde-windows", "kde-windows/buildsystem", "kde-windows/gui", @@ -408,12 +408,12 @@ const char * const packages[] = { "tdeaddons/kate-filetemplates", "tdeaddons/kate-insertcommand", "tdeaddons/kate-xmltools", -"tdeaddons/khtmlsettings-plugin", +"tdeaddons/tdehtmlsettings-plugin", "tdeaddons/useragent-plugin", "kdebugdialog", "tdelibs", "tdelibs/kbugreport", -"tdelibs/kcertpart", +"tdelibs/tdecertpart", "tdelibs/tdecore", "tdelibs/kded", "tdelibs/tdeinit", @@ -421,16 +421,16 @@ const char * const packages[] = { "tdelibs/tdeui", "tdelibs/kedittoolbar", "tdelibs/kimgio", -"tdelibs/klauncher", +"tdelibs/tdelauncher", "tdelibs/klocale", -"tdelibs/kmdi", +"tdelibs/tdemdi", "tdelibs/knetwork", "tdelibs/knewstuff", "tdelibs/knotify", -"tdelibs/kspell", +"tdelibs/tdespell", "tdelibs/kstyle", -"tdelibs/ksycoca", -"tdelibs/kwallet", +"tdelibs/tdesycoca", +"tdelibs/tdewallet", "tdelibs/qt", "kdelirc", "kdelirc/irkick", @@ -439,7 +439,7 @@ const char * const packages[] = { "kdepasswd", "tdepimlibs", "tdepimlibs/gpgme++", -"tdepimlibs/kabc", +"tdepimlibs/tdeabc", "tdepimlibs/kblog", "tdepimlibs/kcal", "tdepimlibs/kldap", @@ -572,21 +572,21 @@ const char * const packages[] = { "kexi/Usability", "keystone", "kfax", -"kfile-plugins", -"kfile-plugins/OOo", -"kfile-plugins/PNG", -"kfile-plugins/avi", -"kfile-plugins/exr", -"kfile-plugins/jpeg", -"kfile-plugins/mp3", -"kfile-plugins/mpeg", -"kfile-plugins/ogg", -"kfile-plugins/pdf", -"kfile-plugins/ps", -"kfile-plugins/wav", -"kfile", -"kfile/kfileplacesview", -"kfilereplace", +"tdefile-plugins", +"tdefile-plugins/OOo", +"tdefile-plugins/PNG", +"tdefile-plugins/avi", +"tdefile-plugins/exr", +"tdefile-plugins/jpeg", +"tdefile-plugins/mp3", +"tdefile-plugins/mpeg", +"tdefile-plugins/ogg", +"tdefile-plugins/pdf", +"tdefile-plugins/ps", +"tdefile-plugins/wav", +"tdefile", +"tdefile/tdefileplacesview", +"tdefilereplace", "kfind", "kfinger", "kfloppy", @@ -654,44 +654,44 @@ const char * const packages[] = { "kimdaba", "kinkatta", "kio", -"kio/audiocd", -"kio/cgi", -"kio/devices", -"kio/file", -"kio/fish", -"kio/floppy", -"kio/ftp", -"kio/gopher", -"kio/help", -"kio/home", -"kio/http", -"kio/imap", -"kio/info", -"kio/kamera", -"kio/kfile", -"kio/kioslave", -"kio/kssl", -"kio/man", -"kio/media", -"kio/nfs", -"kio/nntp", -"kio/pop3", -"kio/remote", -"kio/settings", -"kio/sftp", -"kio/sieve", -"kio/smb", -"kio/smbro", -"kio/smtp", -"kio/svn", -"kio/system", -"kio/tar", -"kio/thumbnail", -"kio/trash", -"kio/uiserver", -"kio/webdav", -"kio/zeroconf", -"kio/zip", +"tdeio/audiocd", +"tdeio/cgi", +"tdeio/devices", +"tdeio/file", +"tdeio/fish", +"tdeio/floppy", +"tdeio/ftp", +"tdeio/gopher", +"tdeio/help", +"tdeio/home", +"tdeio/http", +"tdeio/imap", +"tdeio/info", +"tdeio/kamera", +"tdeio/tdefile", +"tdeio/tdeioslave", +"tdeio/kssl", +"tdeio/man", +"tdeio/media", +"tdeio/nfs", +"tdeio/nntp", +"tdeio/pop3", +"tdeio/remote", +"tdeio/settings", +"tdeio/sftp", +"tdeio/sieve", +"tdeio/smb", +"tdeio/smbro", +"tdeio/smtp", +"tdeio/svn", +"tdeio/system", +"tdeio/tar", +"tdeio/thumbnail", +"tdeio/trash", +"tdeio/uiserver", +"tdeio/webdav", +"tdeio/zeroconf", +"tdeio/zip", "kiosk", "kiosk/kiosktool", "kipiplugins", @@ -782,8 +782,8 @@ const char * const packages[] = { "kmenuedit", "kmerlin", "kmessedwords", -"kmid", -"kmidi", +"tdemid", +"tdemidi", "kmilo", "kmilo/Asus", "kmilo/Dell i8k", @@ -859,17 +859,17 @@ const char * const packages[] = { "konqueror/fsview", "konqueror/imagerotation", "konqueror/kcookiejar", -"konqueror/khtml adblock", -"konqueror/khtml ecma", -"konqueror/khtml event", -"konqueror/khtml forms", -"konqueror/khtml image part", -"konqueror/khtml parsing", -"konqueror/khtml part", -"konqueror/khtml printing", -"konqueror/khtml renderer", -"konqueror/khtml xml", -"konqueror/khtml", +"konqueror/tdehtml adblock", +"konqueror/tdehtml ecma", +"konqueror/tdehtml event", +"konqueror/tdehtml forms", +"konqueror/tdehtml image part", +"konqueror/tdehtml parsing", +"konqueror/tdehtml part", +"konqueror/tdehtml printing", +"konqueror/tdehtml renderer", +"konqueror/tdehtml xml", +"konqueror/tdehtml", "konqueror/kimgalleryplugin", "konqueror/kjava", "konqueror/kjs", @@ -1005,9 +1005,9 @@ const char * const packages[] = { "kpresenter/usability", "kqf", "kquick", -"krandr", -"krandr/control center", -"krandr/krandrtray", +"tderandr", +"tderandr/control center", +"tderandr/tderandrtray", "krdc", "kreatecd", "krec", @@ -1016,22 +1016,22 @@ const char * const packages[] = { "krec/wave_export", "krecord", "kregexpeditor", -"kresources", -"kresources/SLOX", -"kresources/birthdays", -"kresources/blogging", -"kresources/bugzilla", -"kresources/egroupware", -"kresources/exchange", -"kresources/featureplan", -"kresources/framework", -"kresources/groupdav", -"kresources/groupwise", -"kresources/imap", -"kresources/ldap", -"kresources/local", -"kresources/newexchange", -"kresources/remote", +"tderesources", +"tderesources/SLOX", +"tderesources/birthdays", +"tderesources/blogging", +"tderesources/bugzilla", +"tderesources/egroupware", +"tderesources/exchange", +"tderesources/featureplan", +"tderesources/framework", +"tderesources/groupdav", +"tderesources/groupwise", +"tderesources/imap", +"tderesources/ldap", +"tderesources/local", +"tderesources/newexchange", +"tderesources/remote", "kreversi", "krfb", "krichtexteditor", @@ -1051,12 +1051,12 @@ const char * const packages[] = { "ksame", "ksayit", "kscd", -"kscreensaver", -"kscreensaver/kcheckpass", -"kscreensaver/kpartsaver", -"kscreensaver/ktux", -"kscreensaver/kxsrun", -"kscreensaver/screensavers", +"tdescreensaver", +"tdescreensaver/kcheckpass", +"tdescreensaver/tdepartsaver", +"tdescreensaver/ktux", +"tdescreensaver/kxsrun", +"tdescreensaver/screensavers", "kshisen", "ksim", "ksirc", @@ -1145,7 +1145,7 @@ const char * const packages[] = { "kvim", "kvim/Vim KPart", "kvoctrain", -"kwalletmanager", +"tdewalletmanager", "kweather", "kwebget", "kwifimanager", @@ -1271,7 +1271,7 @@ const char * const packages[] = { "systemsettings/joystick", "systemsettings/kcm_useraccount", "systemsettings/kcmkded", -"systemsettings/kcmkdnssd", +"systemsettings/kcmtdednssd", "systemsettings/kcmknotify", "systemsettings/kcmlaunch", "systemsettings/tdm", diff --git a/tdeui/kdetrayproxy/kdetrayproxy.cpp b/tdeui/kdetrayproxy/kdetrayproxy.cpp index c6302a3cc..d0e7a84cf 100644 --- a/tdeui/kdetrayproxy/kdetrayproxy.cpp +++ b/tdeui/kdetrayproxy/kdetrayproxy.cpp @@ -19,7 +19,7 @@ #include "kdetrayproxy.h" -#include <kapplication.h> +#include <tdeapplication.h> #include <kdebug.h> #include <netwm.h> #include <X11/Xlib.h> @@ -182,11 +182,11 @@ void KDETrayProxy::withdrawWindow( Window w ) #include "kdetrayproxy.moc" #if 0 -#include <kcmdlineargs.h> +#include <tdecmdlineargs.h> int main( int argc, char* argv[] ) { - KCmdLineArgs::init( argc, argv, "a", "b", "c", "d" ); - KApplication app( false ); // no styles + TDECmdLineArgs::init( argc, argv, "a", "b", "c", "d" ); + TDEApplication app( false ); // no styles app.disableSessionManagement(); KDETrayProxy proxy; return app.exec(); diff --git a/tdeui/kdetrayproxy/kdetrayproxy.h b/tdeui/kdetrayproxy/kdetrayproxy.h index 640ae322b..9331aad5c 100644 --- a/tdeui/kdetrayproxy/kdetrayproxy.h +++ b/tdeui/kdetrayproxy/kdetrayproxy.h @@ -40,7 +40,7 @@ class KDETrayProxy void dockWindow( Window w, Window owner ); void withdrawWindow( Window w ); static Atom makeSelectionAtom(); - KSelectionWatcher selection; + TDESelectionWatcher selection; KWinModule module; TQValueList< Window > pending_windows; TQValueList< Window > tray_windows; diff --git a/tdeui/kdialog.cpp b/tdeui/kdialog.cpp index 868eb3b44..86f7f7476 100644 --- a/tdeui/kdialog.cpp +++ b/tdeui/kdialog.cpp @@ -18,15 +18,15 @@ * Boston, MA 02110-1301, USA. */ -#include <kconfig.h> -#include <kapplication.h> +#include <tdeconfig.h> +#include <tdeapplication.h> #include <kdialog.h> #include <kwhatsthismanager_p.h> #include <kdebug.h> #include <kstaticdeleter.h> #include <kiconloader.h> -#include <kglobalsettings.h> -#include <klocale.h> +#include <tdeglobalsettings.h> +#include <tdelocale.h> #include <tqlayout.h> #include <tqobjectlist.h> @@ -178,7 +178,7 @@ void KDialog::resizeLayout( TQLayoutItem *lay, int margin, int spacing ) static TQRect screenRect( TQWidget *w, int screen ) { TQDesktopWidget *desktop = TQApplication::desktop(); - KConfig gc("kdeglobals", false, false); + TDEConfig gc("kdeglobals", false, false); gc.setGroup("Windows"); if (desktop->isVirtualDesktop() && gc.readBoolEntry("XineramaEnabled", true) && @@ -342,8 +342,8 @@ KSMModalDialogHeader::KSMModalDialogHeader(TQWidget* parent) seperatorbox->setMargin(0); TQWidget* ticon = new TQWidget( frame ); - KIconLoader * ldr = KGlobal::iconLoader(); - TQPixmap trinityPixmap = ldr->loadIcon("kmenu", KIcon::Panel, KIcon::SizeLarge, KIcon::DefaultState, 0L, true); + TDEIconLoader * ldr = TDEGlobal::iconLoader(); + TQPixmap trinityPixmap = ldr->loadIcon("kmenu", TDEIcon::Panel, TDEIcon::SizeLarge, TDEIcon::DefaultState, 0L, true); // Manually draw the alpha portions of the icon onto the widget background color... TQRgb backgroundRgb = ticon->paletteBackgroundColor().rgb(); @@ -431,7 +431,7 @@ KSMModalDialog::KSMModalDialog(TQWidget* parent) // Center the dialog TQSize sh = sizeHint(); - TQRect rect = KGlobalSettings::desktopGeometry(TQCursor::pos()); + TQRect rect = TDEGlobalSettings::desktopGeometry(TQCursor::pos()); move(rect.x() + (rect.width() - sh.width())/2, rect.y() + (rect.height() - sh.height())/2); show(); diff --git a/tdeui/kdialogbase.cpp b/tdeui/kdialogbase.cpp index 1fb00aa6d..890f79179 100644 --- a/tdeui/kdialogbase.cpp +++ b/tdeui/kdialogbase.cpp @@ -33,12 +33,12 @@ #include <tqtimer.h> #include <tqfocusdata.h> -#include <kapplication.h> -#include <klocale.h> -#include <kconfig.h> +#include <tdeapplication.h> +#include <tdelocale.h> +#include <tdeconfig.h> #include <kiconloader.h> -#include <kglobal.h> -#include <kglobalsettings.h> +#include <tdeglobal.h> +#include <tdeglobalsettings.h> #include <kseparator.h> #include <kurllabel.h> #include <kdebug.h> @@ -656,7 +656,7 @@ void KDialogBase::makeButtonBox( int buttonMask, ButtonCode defaultButton, } } - setButtonStyle( KGlobalSettings::buttonLayout() ); + setButtonStyle( TDEGlobalSettings::buttonLayout() ); } @@ -1740,11 +1740,11 @@ void KDialogBase::showTile( bool state ) TQSize KDialogBase::configDialogSize( const TQString& groupName ) const { - return configDialogSize( *KGlobal::config(), groupName ); + return configDialogSize( *TDEGlobal::config(), groupName ); } -TQSize KDialogBase::configDialogSize( KConfig& config, +TQSize KDialogBase::configDialogSize( TDEConfig& config, const TQString& groupName ) const { int w, h; @@ -1754,7 +1754,7 @@ TQSize KDialogBase::configDialogSize( KConfig& config, w = sizeHint().width(); h = sizeHint().height(); - KConfigGroupSaver cs(&config, groupName); + TDEConfigGroupSaver cs(&config, groupName); w = config.readNumEntry( TQString::fromLatin1("Width %1").arg( desk.width()), w ); h = config.readNumEntry( TQString::fromLatin1("Height %1").arg( desk.height()), h ); @@ -1764,17 +1764,17 @@ TQSize KDialogBase::configDialogSize( KConfig& config, void KDialogBase::saveDialogSize( const TQString& groupName, bool global ) { - saveDialogSize( *KGlobal::config(), groupName, global ); + saveDialogSize( *TDEGlobal::config(), groupName, global ); } -void KDialogBase::saveDialogSize( KConfig& config, const TQString& groupName, +void KDialogBase::saveDialogSize( TDEConfig& config, const TQString& groupName, bool global ) const { int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); - KConfigGroupSaver cs(&config, groupName); + TDEConfigGroupSaver cs(&config, groupName); TQSize sizeToSave = size(); config.writeEntry( TQString::fromLatin1("Width %1").arg( desk.width()), diff --git a/tdeui/kdialogbase.h b/tdeui/kdialogbase.h index c47a6a2e9..1bc910fd6 100644 --- a/tdeui/kdialogbase.h +++ b/tdeui/kdialogbase.h @@ -831,7 +831,7 @@ class TDEUI_EXPORT KDialogBase : public KDialog * If no size is saved for one dimension of the screen, sizeHint() is returned. * * @param groupName Name of the group to read from. The old group - * of KGlobal::config is preserved. + * of TDEGlobal::config is preserved. */ TQSize configDialogSize( const TQString& groupName ) const; @@ -839,12 +839,12 @@ class TDEUI_EXPORT KDialogBase : public KDialog * read the dialogs size from the configuration according to the screen size. * If no size is saved for one dimension of the screen, sizeHint() is returned. * - * @param config The KConfig object to read from + * @param config The TDEConfig object to read from * @param groupName Name of the group to read from. The old group - * of KGlobal::config is preserved. + * of TDEGlobal::config is preserved. * @since 3.2 */ - TQSize configDialogSize( KConfig& config, const TQString& groupName ) const; + TQSize configDialogSize( TDEConfig& config, const TQString& groupName ) const; /** * save the dialogs size dependant on the screen dimension either to the @@ -860,14 +860,14 @@ class TDEUI_EXPORT KDialogBase : public KDialog /** * save the dialogs size dependant on the screen dimension. * - * @param config The KConfig object to write to. + * @param config The TDEConfig object to write to. * @param groupName The group to which the dialogs size is saved. See * configDialogSize to read the size. * @param global Set to true if the entry should go to the global config. * Default is false. * @since 3.2 */ - void saveDialogSize( KConfig& config, const TQString& groupName, + void saveDialogSize( TDEConfig& config, const TQString& groupName, bool global=false ) const; /** diff --git a/tdeui/kdockwidget.cpp b/tdeui/kdockwidget.cpp index 95ceb33dd..bf99c6801 100644 --- a/tdeui/kdockwidget.cpp +++ b/tdeui/kdockwidget.cpp @@ -33,14 +33,14 @@ #include <tqstyle.h> #ifndef NO_KDE2 -#include <kconfig.h> -#include <kglobal.h> -#include <klocale.h> -#include <ktoolbar.h> -#include <kpopupmenu.h> +#include <tdeconfig.h> +#include <tdeglobal.h> +#include <tdelocale.h> +#include <tdetoolbar.h> +#include <tdepopupmenu.h> #include <twin.h> #include <kdebug.h> -#include <kglobalsettings.h> +#include <tdeglobalsettings.h> #include "config.h" #ifdef Q_WS_X11 @@ -91,7 +91,7 @@ static const char* const not_close_xpm[]={ "#####"}; /** - * A special kind of KMainWindow that is able to have dockwidget child widgets. + * A special kind of TDEMainWindow that is able to have dockwidget child widgets. * * The main widget should be a dockwidget where other dockwidgets can be docked to * the left, right, top, bottom or to the middle. @@ -100,7 +100,7 @@ static const char* const not_close_xpm[]={ * @author Max Judin. */ KDockMainWindow::KDockMainWindow( TQWidget* parent, const char *name, WFlags f) -:KMainWindow( parent, name, f ) +:TDEMainWindow( parent, name, f ) { TQString new_name = TQString(name) + TQString("_DockManager"); dockManager = new KDockManager( this, new_name.latin1() ); @@ -126,7 +126,7 @@ void KDockMainWindow::setView( TQWidget *view ) } #ifndef NO_KDE2 - KMainWindow::setCentralWidget(view); + TDEMainWindow::setCentralWidget(view); #else TQMainWindow::setCentralWidget(view); #endif @@ -165,12 +165,12 @@ void KDockMainWindow::readDockConfig(TQDomElement &base) } #ifndef NO_KDE2 -void KDockMainWindow::writeDockConfig( KConfig* c, TQString group ) +void KDockMainWindow::writeDockConfig( TDEConfig* c, TQString group ) { dockManager->writeConfig( c, group ); } -void KDockMainWindow::readDockConfig( KConfig* c, TQString group ) +void KDockMainWindow::readDockConfig( TDEConfig* c, TQString group ) { dockManager->readConfig( c, group ); } @@ -420,12 +420,12 @@ void KDockWidgetHeader::setDragEnabled(bool b) } #ifndef NO_KDE2 -void KDockWidgetHeader::saveConfig( KConfig* c ) +void KDockWidgetHeader::saveConfig( TDEConfig* c ) { c->writeEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() ); } -void KDockWidgetHeader::loadConfig( KConfig* c ) +void KDockWidgetHeader::loadConfig( TDEConfig* c ) { setDragEnabled( !c->readBoolEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) ); } @@ -1635,7 +1635,7 @@ KDockManager::KDockManager( TQWidget* mainWindow , const char* name ) d->mainDockWidget=0; #ifndef NO_KDE2 - d->splitterOpaqueResize = KGlobalSettings::opaqueResize(); + d->splitterOpaqueResize = TDEGlobalSettings::opaqueResize(); #else d->splitterOpaqueResize = false; #endif @@ -1653,7 +1653,7 @@ KDockManager::KDockManager( TQWidget* mainWindow , const char* name ) menuData->setAutoDelete( true ); #ifndef NO_KDE2 - menu = new KPopupMenu(); + menu = new TDEPopupMenu(); #else menu = new TQPopupMenu(); #endif @@ -2528,10 +2528,10 @@ void KDockManager::setReadDockConfigMode(int mode) } #ifndef NO_KDE2 -void KDockManager::writeConfig( KConfig* c, TQString group ) +void KDockManager::writeConfig( TDEConfig* c, TQString group ) { //debug("BEGIN Write Config"); - if ( !c ) c = KGlobal::config(); + if ( !c ) c = TDEGlobal::config(); if ( group.isEmpty() ) group = "dock_setting_default"; c->setGroup( group ); @@ -2670,9 +2670,9 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) //debug("END Write Config"); } #include <tqmessagebox.h> -void KDockManager::readConfig( KConfig* c, TQString group ) +void KDockManager::readConfig( TDEConfig* c, TQString group ) { - if ( !c ) c = KGlobal::config(); + if ( !c ) c = TDEGlobal::config(); if ( group.isEmpty() ) group = "dock_setting_default"; c->setGroup( group ); @@ -3134,12 +3134,12 @@ void KDockArea::resizeEvent(TQResizeEvent *rsize) } #ifndef NO_KDE2 -void KDockArea::writeDockConfig( KConfig* c, TQString group ) +void KDockArea::writeDockConfig( TDEConfig* c, TQString group ) { dockManager->writeConfig( c, group ); } -void KDockArea::readDockConfig( KConfig* c, TQString group ) +void KDockArea::readDockConfig( TDEConfig* c, TQString group ) { dockManager->readConfig( c, group ); } @@ -3261,8 +3261,8 @@ void KDockContainer::removeWidget (KDockWidget *dw){ void KDockContainer::undockWidget (KDockWidget *){;} 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 (TDEConfig*, const TQString&){;} +void KDockContainer::save (TDEConfig*, const TQString&){;} void KDockContainer::load (TQDomElement&){;} void KDockContainer::save (TQDomElement&){;} void KDockContainer::prepareSave(TQStringList &names) @@ -3320,10 +3320,10 @@ void KDockManager::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void KDockMainWindow::virtual_hook( int id, void* data ) -{ KMainWindow::virtual_hook( id, data ); } +{ TDEMainWindow::virtual_hook( id, data ); } void KDockArea::virtual_hook( int, void* ) -{ /*KMainWindow::virtual_hook( id, data );*/ } +{ /*TDEMainWindow::virtual_hook( id, data );*/ } #ifndef NO_INCLUDE_MOCFILES // for Qt-only projects, because tmake doesn't take this name diff --git a/tdeui/kdockwidget.h b/tdeui/kdockwidget.h index 4f54e5f13..df06ed8f1 100644 --- a/tdeui/kdockwidget.h +++ b/tdeui/kdockwidget.h @@ -36,7 +36,7 @@ - KDockTabGroup - minor helper class - KDockWidget - IMPORTANT CLASS: the one and only dockwidget class - KDockManager - helper class - - KDockMainWindow - IMPORTANT CLASS: a special KMainWindow that can have dockwidgets + - KDockMainWindow - IMPORTANT CLASS: a special TDEMainWindow that can have dockwidgets - KDockArea - like KDockMainWindow but inherits just QWidget IMPORTANT Note: This file compiles also in Qt-only mode by using the NO_KDE2 precompiler definition! @@ -55,13 +55,13 @@ #include <tqtabwidget.h> #ifndef NO_KDE2 -#include <kmainwindow.h> +#include <tdemainwindow.h> #include <netwm_def.h> #else #include <tqmainwindow.h> #include "exportdockclass.h" -#include "dummykmainwindow.h" +#include "dummytdemainwindow.h" #endif class KDockSplitter; @@ -80,8 +80,8 @@ class TQHBoxLayout; class TQPixmap; #ifndef NO_KDE2 -class KToolBar; -class KConfig; +class TDEToolBar; +class TDEConfig; #else class TQToolBar; #endif @@ -128,12 +128,12 @@ public: /** * Provides saving the current configuration. Must be overridden by an inheriting class. */ - virtual void saveConfig( KConfig* ){} + virtual void saveConfig( TDEConfig* ){} /** * Provides loading the current configuration. Must be overridden by an inheriting class */ - virtual void loadConfig( KConfig* ){} + virtual void loadConfig( TDEConfig* ){} #endif protected: @@ -291,14 +291,14 @@ public: * * @param c the configuration safe */ - virtual void saveConfig( KConfig* c); + virtual void saveConfig( TDEConfig* c); /** * Loads the current button state from a KDE config container object. * * @param c the configuration safe */ - virtual void loadConfig( KConfig* c); + virtual void loadConfig( TDEConfig* c); #endif /*@since 3.2 @@ -906,7 +906,7 @@ private: * that can be called within a KDockMainWindow or a KDockWidget . * * An important feature is the ability to read or save the current state of all things concerning to - * dockwidgets to KConfig . + * dockwidgets to TDEConfig . * * The dockmanager is also often used when a certain dockwidget or a child of such dockwidget must be found. * @@ -954,9 +954,9 @@ public: * last but not least some necessary things for recovering the dockmainwindow state. * * @param c the KDE configuration saver - * @param group the name of the section in KConfig + * @param group the name of the section in TDEConfig */ - void writeConfig( KConfig* c = 0L, TQString group = TQString::null ); + void writeConfig( TDEConfig* c = 0L, TQString group = TQString::null ); /** * Like writeConfig but reads the whole stuff in. @@ -972,9 +972,9 @@ public: * to work, each widget must have a unique name. * * @param c the KDE configuration saver - * @param group the name of the section in KConfig + * @param group the name of the section in TDEConfig */ - void readConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void readConfig ( TDEConfig* c = 0L, TQString group = TQString::null ); #endif /// @since 3.1 @@ -1033,7 +1033,7 @@ public: KDockWidget* getDockWidgetFromName( const TQString& dockName ); /** - * Enables opaque resizing. Opaque resizing defaults to KGlobalSettings::opaqueResize(). + * Enables opaque resizing. Opaque resizing defaults to TDEGlobalSettings::opaqueResize(). * Call this method before you create any dock widgets! */ void setSplitterOpaqueResize(bool b=true); @@ -1269,7 +1269,7 @@ private: }; /** - * A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwidget class set). + * A special kind of TDEMainWindow that is able to have dockwidget child widgets (and member of the dockwidget class set). * * The main widget should be a KDockWidget where other KDockWidget can be docked to * the left, right, top, bottom or to the middle. @@ -1311,7 +1311,7 @@ private: * * @author Max Judin (documentation: Falk Brettschneider). */ -class TDEUI_EXPORT KDockMainWindow : public KMainWindow +class TDEUI_EXPORT KDockMainWindow : public TDEMainWindow { Q_OBJECT @@ -1390,20 +1390,20 @@ public: #ifndef NO_KDE2 /** - * It writes the current dock state in the given section of KConfig. + * It writes the current dock state in the given section of TDEConfig. * * @param c KDE class for saving configurations * @param group name of section to write to */ - void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); + void writeDockConfig( TDEConfig* c = 0L, TQString group = TQString::null ); /** - * It reads the current dock state from the given section of KConfig. + * It reads the current dock state from the given section of TDEConfig. * * @param c KDE class for saving configurations * @param group name of section to read from */ - void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void readDockConfig ( TDEConfig* c = 0L, TQString group = TQString::null ); #endif /** @@ -1509,8 +1509,8 @@ public: void readDockConfig(TQDomElement &base); #ifndef NO_KDE2 - void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); - void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void writeDockConfig( TDEConfig* c = 0L, TQString group = TQString::null ); + void readDockConfig ( TDEConfig* c = 0L, TQString group = TQString::null ); #endif diff --git a/tdeui/kdockwidget_p.h b/tdeui/kdockwidget_p.h index 9ee9e8e73..471c4d9b2 100644 --- a/tdeui/kdockwidget_p.h +++ b/tdeui/kdockwidget_p.h @@ -50,9 +50,9 @@ public: virtual void showWidget(KDockWidget *); virtual void removeWidget(KDockWidget*); virtual void undockWidget(KDockWidget*); - virtual void save(KConfig *cfg,const TQString& group_or_prefix); + virtual void save(TDEConfig *cfg,const TQString& group_or_prefix); virtual void save(TQDomElement& dockElement); - virtual void load(KConfig *cfg,const TQString& group_or_prefix); + virtual void load(TDEConfig *cfg,const TQString& group_or_prefix); virtual void load(TQDomElement& dockElement); virtual void setToolTip (KDockWidget *, TQString &); virtual void setPixmap(KDockWidget*,const TQPixmap&); diff --git a/tdeui/kdockwidget_private.h b/tdeui/kdockwidget_private.h index e97a5affd..a72532e3d 100644 --- a/tdeui/kdockwidget_private.h +++ b/tdeui/kdockwidget_private.h @@ -241,7 +241,7 @@ private: /** * A mini-button usually placed in the dockpanel. - * @internal (but used by kmdi/dockcontainer.cpp) + * @internal (but used by tdemdi/dockcontainer.cpp) * * @author Max Judin. */ diff --git a/tdeui/kdualcolorbutton.cpp b/tdeui/kdualcolorbutton.cpp index f6d49a97e..532e4aaaa 100644 --- a/tdeui/kdualcolorbutton.cpp +++ b/tdeui/kdualcolorbutton.cpp @@ -21,7 +21,7 @@ #include "kcolordrag.h" #include "dcolorarrow.xbm" #include "dcolorreset.xpm" -#include <kglobalsettings.h> +#include <tdeglobalsettings.h> #include <tqpainter.h> #include <tqbitmap.h> #include <tqdrawutil.h> @@ -224,7 +224,7 @@ void KDualColorButton::mousePressEvent(TQMouseEvent *ev) void KDualColorButton::mouseMoveEvent(TQMouseEvent *ev) { if(!miniCtlFlag){ - int delay = KGlobalSettings::dndEventDelay(); + int delay = TDEGlobalSettings::dndEventDelay(); if(ev->x() >= mPos.x()+delay || ev->x() <= mPos.x()-delay || ev->y() >= mPos.y()+delay || ev->y() <= mPos.y()-delay) { KColorDrag *d = new KColorDrag( curColor == Foreground ? diff --git a/tdeui/keditcl1.cpp b/tdeui/keditcl1.cpp index 5b4c21883..a550a7af1 100644 --- a/tdeui/keditcl1.cpp +++ b/tdeui/keditcl1.cpp @@ -24,14 +24,14 @@ #include <tqtextstream.h> #include <tqtimer.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kcursor.h> #include <kdebug.h> #include <kcmenumngr.h> -#include <kfontdialog.h> -#include <klocale.h> -#include <kmessagebox.h> -#include <kstdaccel.h> +#include <tdefontdialog.h> +#include <tdelocale.h> +#include <tdemessagebox.h> +#include <tdestdaccel.h> #include <kurldrag.h> #include "keditcl.h" @@ -466,48 +466,48 @@ void KEdit::keyPressEvent ( TQKeyEvent *e) killing = false; - if ( KStdAccel::copy().contains( key ) ) + if ( TDEStdAccel::copy().contains( key ) ) copy(); else if ( isReadOnly() ) TQMultiLineEdit::keyPressEvent( e ); // If this is an unmodified printable key, send it directly to TQMultiLineEdit. else if ( !(key.keyCodeQt() & (CTRL | ALT)) && !e->text().isEmpty() && TQString(e->text()).unicode()->isPrint() ) TQMultiLineEdit::keyPressEvent( e ); - else if ( KStdAccel::paste().contains( key ) ) { + else if ( TDEStdAccel::paste().contains( key ) ) { paste(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::cut().contains( key ) ) { + else if ( TDEStdAccel::cut().contains( key ) ) { cut(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::undo().contains( key ) ) { + else if ( TDEStdAccel::undo().contains( key ) ) { undo(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::redo().contains( key ) ) { + else if ( TDEStdAccel::redo().contains( key ) ) { redo(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::deleteWordBack().contains( key ) ) { + else if ( TDEStdAccel::deleteWordBack().contains( key ) ) { moveCursor(MoveWordBackward, true); if (hasSelectedText()) del(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::deleteWordForward().contains( key ) ) { + else if ( TDEStdAccel::deleteWordForward().contains( key ) ) { moveCursor(MoveWordForward, true); if (hasSelectedText()) del(); setModified(true); slotCursorPositionChanged(); } - else if ( KStdAccel::backwardWord().contains( key ) ) { + else if ( TDEStdAccel::backwardWord().contains( key ) ) { CursorAction action = MoveWordBackward; int para, index; getCursorPosition( ¶, & index ); @@ -516,7 +516,7 @@ void KEdit::keyPressEvent ( TQKeyEvent *e) moveCursor(action, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::forwardWord().contains( key ) ) { + else if ( TDEStdAccel::forwardWord().contains( key ) ) { CursorAction action = MoveWordForward; int para, index; getCursorPosition( ¶, & index ); @@ -525,27 +525,27 @@ void KEdit::keyPressEvent ( TQKeyEvent *e) moveCursor( action, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::next().contains( key ) ) { + else if ( TDEStdAccel::next().contains( key ) ) { moveCursor( MovePgDown, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::prior().contains( key ) ) { + else if ( TDEStdAccel::prior().contains( key ) ) { moveCursor( MovePgUp, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::home().contains( key ) ) { + else if ( TDEStdAccel::home().contains( key ) ) { moveCursor( MoveHome, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::end().contains( key ) ) { + else if ( TDEStdAccel::end().contains( key ) ) { moveCursor( MoveEnd, false ); slotCursorPositionChanged(); } - else if ( KStdAccel::beginningOfLine().contains( key ) ) { + else if ( TDEStdAccel::beginningOfLine().contains( key ) ) { moveCursor( MoveLineStart, false); slotCursorPositionChanged(); } - else if ( KStdAccel::endOfLine().contains( key ) ) { + else if ( TDEStdAccel::endOfLine().contains( key ) ) { moveCursor( MoveLineEnd, false); slotCursorPositionChanged(); } @@ -567,7 +567,7 @@ void KEdit::installRBPopup(TQPopupMenu *p) { void KEdit::selectFont(){ TQFont font = this->font(); - KFontDialog::getFont(font); + TDEFontDialog::getFont(font); this->setFont(font); } diff --git a/tdeui/keditcl2.cpp b/tdeui/keditcl2.cpp index 4bbc12c30..4749a471f 100644 --- a/tdeui/keditcl2.cpp +++ b/tdeui/keditcl2.cpp @@ -31,12 +31,12 @@ #include <tqhbox.h> #include <tqpopupmenu.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kcombobox.h> #include <knuminput.h> -#include <kmessagebox.h> +#include <tdemessagebox.h> #include <knotifyclient.h> -#include <klocale.h> +#include <tdelocale.h> #include <kdebug.h> #include <kiconloader.h> @@ -1023,9 +1023,9 @@ void KEdit::misspelling (const TQString &word, const TQStringList &, unsigned in /* if (cursorPoint().y()>height()/2) - kspell->moveDlg (10, height()/2-kspell->heightDlg()-15); + tdespell->moveDlg (10, height()/2-tdespell->heightDlg()-15); else - kspell->moveDlg (10, height()/2 + 15); + tdespell->moveDlg (10, height()/2 + 15); */ } diff --git a/tdeui/keditlistbox.cpp b/tdeui/keditlistbox.cpp index 040e77c70..6f22b091a 100644 --- a/tdeui/keditlistbox.cpp +++ b/tdeui/keditlistbox.cpp @@ -30,8 +30,8 @@ #include <kdebug.h> #include <kdialog.h> #include <klineedit.h> -#include <klocale.h> -#include <kapplication.h> +#include <tdelocale.h> +#include <tdeapplication.h> #include <knotifyclient.h> #include "keditlistbox.h" diff --git a/tdeui/kedittoolbar.cpp b/tdeui/kedittoolbar.cpp index 418fb755d..639b22926 100644 --- a/tdeui/kedittoolbar.cpp +++ b/tdeui/kedittoolbar.cpp @@ -31,17 +31,17 @@ #include <tqapplication.h> #include <tqtextstream.h> -#include <kaction.h> +#include <tdeaction.h> #include <kstandarddirs.h> -#include <klocale.h> +#include <tdelocale.h> #include <kicontheme.h> #include <kiconloader.h> #include <kinstance.h> -#include <kmessagebox.h> +#include <tdemessagebox.h> #include <kxmlguifactory.h> #include <kseparator.h> -#include <kconfig.h> -#include <klistview.h> +#include <tdeconfig.h> +#include <tdelistview.h> #include <kdebug.h> #include <kpushbutton.h> #include <kprocio.h> @@ -78,7 +78,7 @@ public: TQDomDocument m_document; XmlType m_type; bool m_isModified; - KActionCollection* m_actionCollection; + TDEActionCollection* m_actionCollection; ToolbarList m_barList; }; @@ -88,7 +88,7 @@ typedef TQValueList<XmlData> XmlDataList; class ToolbarItem : public TQListViewItem { public: - ToolbarItem(KListView *parent, const TQString& tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null) + ToolbarItem(TDEListView *parent, const TQString& tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null) : TQListViewItem(parent), m_tag(tag), m_name(name), @@ -96,7 +96,7 @@ public: { } - ToolbarItem(KListView *parent, TQListViewItem *item, const TQString &tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null) + ToolbarItem(TDEListView *parent, TQListViewItem *item, const TQString &tag = TQString::null, const TQString& name = TQString::null, const TQString& statusText = TQString::null) : TQListViewItem(parent, item), m_tag(tag), m_name(name), @@ -175,11 +175,11 @@ public: } }; -class ToolbarListView : public KListView +class ToolbarListView : public TDEListView { public: ToolbarListView(TQWidget *parent=0, const char *name=0) - : KListView(parent, name) + : TDEListView(parent, name) { } protected: @@ -214,7 +214,7 @@ public: * In a KParts application we let create a KXMLGUIClient create a dummy one, * but it probably isn't used. */ - KEditToolbarWidgetPrivate(KInstance *instance, KActionCollection* collection) + KEditToolbarWidgetPrivate(TDEInstance *instance, TDEActionCollection* collection) : m_collection( collection ) { m_instance = instance; @@ -254,8 +254,8 @@ public: */ ToolbarList findToolbars(TQDomNode n) { - static const TQString &tagToolbar = KGlobal::staticQString( "ToolBar" ); - static const TQString &attrNoEdit = KGlobal::staticQString( "noEdit" ); + static const TQString &tagToolbar = TDEGlobal::staticQString( "ToolBar" ); + static const TQString &attrNoEdit = TDEGlobal::staticQString( "noEdit" ); ToolbarList list; for( ; !n.isNull(); n = n.nextSibling() ) @@ -278,9 +278,9 @@ public: */ TQString toolbarName( const XmlData& xmlData, const TQDomElement& it ) const { - static const TQString &tagText = KGlobal::staticQString( "text" ); - static const TQString &tagText2 = KGlobal::staticQString( "Text" ); - static const TQString &attrName = KGlobal::staticQString( "name" ); + static const TQString &tagText = TDEGlobal::staticQString( "text" ); + static const TQString &tagText2 = TDEGlobal::staticQString( "Text" ); + static const TQString &attrName = TDEGlobal::staticQString( "name" ); TQString name; TQCString txt( it.namedItem( tagText ).toElement().text().utf8() ); @@ -292,7 +292,7 @@ public: name = i18n( txt ); // the name of the toolbar might depend on whether or not - // it is in kparts + // it is in tdeparts if ( ( xmlData.m_type == XmlData::Shell ) || ( xmlData.m_type == XmlData::Part ) ) { @@ -306,7 +306,7 @@ public: */ TQDomElement findElementForToolbarItem( const ToolbarItem* item ) const { - static const TQString &attrName = KGlobal::staticQString( "name" ); + static const TQString &attrName = TDEGlobal::staticQString( "name" ); for(TQDomNode n = m_currentToolbarElem.firstChild(); !n.isNull(); n = n.nextSibling()) { TQDomElement elem = n.toElement(); @@ -337,9 +337,9 @@ public: } #endif - //TQValueList<KAction*> m_actionList; - KActionCollection* m_collection; - KInstance *m_instance; + //TQValueList<TDEAction*> m_actionList; + TDEActionCollection* m_collection; + TDEInstance *m_instance; XmlData* m_currentXmlData; TQDomElement m_currentToolbarElem; @@ -368,14 +368,14 @@ public: // Save parameters for recreating widget after resetting toolbar bool m_global; - KActionCollection* m_collection; + TDEActionCollection* m_collection; TQString m_file; KXMLGUIFactory* m_factory; }; const char *KEditToolbar::s_defaultToolbar = 0L; -KEditToolbar::KEditToolbar(KActionCollection *collection, const TQString& file, +KEditToolbar::KEditToolbar(TDEActionCollection *collection, const TQString& file, bool global, TQWidget* parent, const char* name) : KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name), m_widget(new KEditToolbarWidget(TQString::fromLatin1(s_defaultToolbar), collection, file, global, this)) @@ -386,7 +386,7 @@ KEditToolbar::KEditToolbar(KActionCollection *collection, const TQString& file, d->m_file = file; } -KEditToolbar::KEditToolbar(const TQString& defaultToolbar, KActionCollection *collection, +KEditToolbar::KEditToolbar(const TQString& defaultToolbar, TDEActionCollection *collection, const TQString& file, bool global, TQWidget* parent, const char* name) : KDialogBase(Swallow, i18n("Configure Toolbars"), Default|Ok|Apply|Cancel, Ok, parent, name), @@ -466,7 +466,7 @@ void KEditToolbar::slotDefault() if (TQDir::isRelativePath(file)) { - const KInstance *instance = client->instance() ? client->instance() : KGlobal::instance(); + const TDEInstance *instance = client->instance() ? client->instance() : TDEGlobal::instance(); file = locateLocal("data", TQString::fromLatin1( instance->instanceName() + '/' ) + file); } else @@ -488,7 +488,7 @@ void KEditToolbar::slotDefault() int slash = d->m_file.findRev('/')+1; if (slash) d->m_file = d->m_file.mid(slash); - TQString xml_file = locateLocal("data", TQString::fromLatin1( KGlobal::instance()->instanceName() + '/' ) + d->m_file); + TQString xml_file = locateLocal("data", TQString::fromLatin1( TDEGlobal::instance()->instanceName() + '/' ) + d->m_file); if ( TQFile::exists( xml_file ) ) if ( !TQFile::remove( xml_file ) ) @@ -537,7 +537,7 @@ void KEditToolbar::setDefaultToolbar(const char *toolbarName) s_defaultToolbar = toolbarName; } -KEditToolbarWidget::KEditToolbarWidget(KActionCollection *collection, +KEditToolbarWidget::KEditToolbarWidget(TDEActionCollection *collection, const TQString& file, bool global, TQWidget *parent) : TQWidget(parent), @@ -551,7 +551,7 @@ KEditToolbarWidget::KEditToolbarWidget(KActionCollection *collection, } KEditToolbarWidget::KEditToolbarWidget(const TQString& defaultToolbar, - KActionCollection *collection, + TDEActionCollection *collection, const TQString& file, bool global, TQWidget *parent) : TQWidget(parent), @@ -594,7 +594,7 @@ KEditToolbarWidget::~KEditToolbarWidget() delete d; } -void KEditToolbarWidget::initNonKPart(KActionCollection *collection, +void KEditToolbarWidget::initNonKPart(TDEActionCollection *collection, const TQString& file, bool global) { //d->m_actionList = collection->actions(); @@ -767,10 +767,10 @@ void KEditToolbarWidget::setupLayout() this, TQT_SLOT(slotToolbarSelected(const TQString&))); // TQPushButton *new_toolbar = new TQPushButton(i18n("&New"), this); -// new_toolbar->setPixmap(BarIcon("filenew", KIcon::SizeSmall)); +// new_toolbar->setPixmap(BarIcon("filenew", TDEIcon::SizeSmall)); // new_toolbar->setEnabled(false); // disabled until implemented // TQPushButton *del_toolbar = new TQPushButton(i18n("&Delete"), this); -// del_toolbar->setPixmap(BarIcon("editdelete", KIcon::SizeSmall)); +// del_toolbar->setPixmap(BarIcon("editdelete", TDEIcon::SizeSmall)); // del_toolbar->setEnabled(false); // disabled until implemented // our list of inactive actions @@ -805,10 +805,10 @@ void KEditToolbarWidget::setupLayout() m_activeList->setSorting(-1); active_label->setBuddy(m_activeList); - connect(m_inactiveList, TQT_SIGNAL(dropped(KListView*,TQDropEvent*,TQListViewItem*)), - this, TQT_SLOT(slotDropped(KListView*,TQDropEvent*,TQListViewItem*))); - connect(m_activeList, TQT_SIGNAL(dropped(KListView*,TQDropEvent*,TQListViewItem*)), - this, TQT_SLOT(slotDropped(KListView*,TQDropEvent*,TQListViewItem*))); + connect(m_inactiveList, TQT_SIGNAL(dropped(TDEListView*,TQDropEvent*,TQListViewItem*)), + this, TQT_SLOT(slotDropped(TDEListView*,TQDropEvent*,TQListViewItem*))); + connect(m_activeList, TQT_SIGNAL(dropped(TDEListView*,TQDropEvent*,TQListViewItem*)), + this, TQT_SLOT(slotDropped(TDEListView*,TQDropEvent*,TQListViewItem*))); connect(m_activeList, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(slotActiveSelected(TQListViewItem *))); connect(m_activeList, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int )), @@ -816,7 +816,7 @@ void KEditToolbarWidget::setupLayout() // "change icon" button d->m_changeIcon = new KPushButton( i18n( "Change &Icon..." ), this ); - TQString kdialogExe = KStandardDirs::findExe(TQString::fromLatin1("kdialog")); + TQString kdialogExe = TDEStandardDirs::findExe(TQString::fromLatin1("kdialog")); d->m_hasKDialog = !kdialogExe.isEmpty(); d->m_changeIcon->setEnabled( d->m_hasKDialog ); @@ -903,7 +903,7 @@ void KEditToolbarWidget::setupLayout() void KEditToolbarWidget::loadToolbarCombo(const TQString& defaultToolbar) { - static const TQString &attrName = KGlobal::staticQString( "name" ); + static const TQString &attrName = TDEGlobal::staticQString( "name" ); // just in case, we clear our combo m_toolbarCombo->clear(); @@ -942,11 +942,11 @@ void KEditToolbarWidget::loadToolbarCombo(const TQString& defaultToolbar) void KEditToolbarWidget::loadActionList(TQDomElement& elem) { - 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" ); + static const TQString &tagSeparator = TDEGlobal::staticQString( "Separator" ); + static const TQString &tagMerge = TDEGlobal::staticQString( "Merge" ); + static const TQString &tagActionList= TDEGlobal::staticQString( "ActionList" ); + static const TQString &attrName = TDEGlobal::staticQString( "name" ); + static const TQString &attrLineSeparator = TDEGlobal::staticQString( "lineSeparator" ); int sep_num = 0; TQString sep_name("separator_%1"); @@ -960,13 +960,13 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) m_downAction->setEnabled(false); // We'll use this action collection - KActionCollection* actionCollection = d->m_currentXmlData->m_actionCollection; + TDEActionCollection* actionCollection = d->m_currentXmlData->m_actionCollection; // store the names of our active actions TQMap<TQString, bool> active_list; // see if our current action is in this toolbar - KIconLoader *loader = KGlobal::instance()->iconLoader(); + TDEIconLoader *loader = TDEGlobal::instance()->iconLoader(); TQDomNode n = elem.lastChild(); for( ; !n.isNull(); n = n.previousSibling() ) { @@ -1008,7 +1008,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) // putting any action into any client... for (unsigned int i = 0; i < actionCollection->count(); i++) { - KAction *action = actionCollection->action( i ); + TDEAction *action = actionCollection->action( i ); // do we have a match? if (it.attribute( attrName ) == action->name()) @@ -1018,9 +1018,9 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) act->setText(1, action->plainText()); if (action->hasIcon()) if (!action->icon().isEmpty()) - act->setPixmap(0, loader->loadIcon(action->icon(), KIcon::Toolbar, 16, KIcon::DefaultState, 0, true) ); + act->setPixmap(0, loader->loadIcon(action->icon(), TDEIcon::Toolbar, 16, TDEIcon::DefaultState, 0, true) ); else // Has iconset - act->setPixmap(0, action->iconSet(KIcon::Toolbar).pixmap()); + act->setPixmap(0, action->iconSet(TDEIcon::Toolbar).pixmap()); active_list.insert(action->name(), true); break; @@ -1031,7 +1031,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) // go through the rest of the collection for (int i = actionCollection->count() - 1; i > -1; --i) { - KAction *action = actionCollection->action( i ); + TDEAction *action = actionCollection->action( i ); // skip our active ones if (active_list.contains(action->name())) @@ -1041,9 +1041,9 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) act->setText(1, action->plainText()); if (action->hasIcon()) if (!action->icon().isEmpty()) - act->setPixmap(0, loader->loadIcon(action->icon(), KIcon::Toolbar, 16, KIcon::DefaultState, 0, true) ); + act->setPixmap(0, loader->loadIcon(action->icon(), TDEIcon::Toolbar, 16, TDEIcon::DefaultState, 0, true) ); else // Has iconset - act->setPixmap(0, action->iconSet(KIcon::Toolbar).pixmap()); + act->setPixmap(0, action->iconSet(TDEIcon::Toolbar).pixmap()); } // finally, add default separators to the inactive list @@ -1053,7 +1053,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) act->setText(1, SEPARATORSTRING); } -KActionCollection *KEditToolbarWidget::actionCollection() const +TDEActionCollection *KEditToolbarWidget::actionCollection() const { return d->m_collection; } @@ -1108,7 +1108,7 @@ void KEditToolbarWidget::slotActiveSelected(TQListViewItem *item) ToolbarItem* toolitem = static_cast<ToolbarItem *>(item); m_removeAction->setEnabled( item ); - static const TQString &tagAction = KGlobal::staticQString( "Action" ); + static const TQString &tagAction = TDEGlobal::staticQString( "Action" ); d->m_changeIcon->setEnabled( item && d->m_hasKDialog && toolitem->internalTag() == tagAction ); @@ -1135,7 +1135,7 @@ void KEditToolbarWidget::slotActiveSelected(TQListViewItem *item) } } -void KEditToolbarWidget::slotDropped(KListView *list, TQDropEvent *e, TQListViewItem *after) +void KEditToolbarWidget::slotDropped(TDEListView *list, TQDropEvent *e, TQListViewItem *after) { ToolbarItem *item = new ToolbarItem(m_inactiveList); // needs parent, use inactiveList temporarily if(!ToolbarItemDrag::decode(e, *item)) { @@ -1191,11 +1191,11 @@ void KEditToolbarWidget::insertActive(ToolbarItem *item, TQListViewItem *before, if (!item) return; - 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" ); + static const TQString &tagAction = TDEGlobal::staticQString( "Action" ); + static const TQString &tagSeparator = TDEGlobal::staticQString( "Separator" ); + static const TQString &attrName = TDEGlobal::staticQString( "name" ); + static const TQString &attrLineSeparator = TDEGlobal::staticQString( "lineSeparator" ); + static const TQString &attrNoMerge = TDEGlobal::staticQString( "noMerge" ); TQDomElement new_item; // let's handle the separator specially @@ -1238,7 +1238,7 @@ void KEditToolbarWidget::removeActive(ToolbarItem *item) if (!item) return; - static const TQString &attrNoMerge = KGlobal::staticQString( "noMerge" ); + static const TQString &attrNoMerge = TDEGlobal::staticQString( "noMerge" ); // we're modified, so let this change emit enableOk(true); @@ -1306,7 +1306,7 @@ void KEditToolbarWidget::moveActive( ToolbarItem* item, TQListViewItem* before ) d->m_currentToolbarElem.insertAfter(e, d->findElementForToolbarItem( (ToolbarItem*)before )); // and set this container as a noMerge - static const TQString &attrNoMerge = KGlobal::staticQString( "noMerge" ); + static const TQString &attrNoMerge = TDEGlobal::staticQString( "noMerge" ); d->m_currentToolbarElem.setAttribute( attrNoMerge, "1"); // update the local doc @@ -1330,7 +1330,7 @@ void KEditToolbarWidget::slotDownButton() void KEditToolbarWidget::updateLocal(TQDomElement& elem) { - static const TQString &attrName = KGlobal::staticQString( "name" ); + static const TQString &attrName = TDEGlobal::staticQString( "name" ); XmlDataList::Iterator xit = d->m_xmlFiles.begin(); for ( ; xit != d->m_xmlFiles.end(); ++xit) @@ -1373,8 +1373,8 @@ void KEditToolbarWidget::updateLocal(TQDomElement& elem) void KEditToolbarWidget::slotChangeIcon() { - // We can't use KIconChooser here, since it's in libkio - // ##### KDE4: reconsider this, e.g. move KEditToolbar to libkio + // We can't use TDEIconChooser here, since it's in libtdeio + // ##### KDE4: reconsider this, e.g. move KEditToolbar to libtdeio //if the process is already running (e.g. when somebody clicked the change button twice (see #127149)) - do nothing... //otherwise m_kdialogProcess will be overwritten and set to zero in slotProcessExited()...crash! @@ -1382,14 +1382,14 @@ void KEditToolbarWidget::slotChangeIcon() return; d->m_kdialogProcess = new KProcIO; - TQString kdialogExe = KStandardDirs::findExe(TQString::fromLatin1("kdialog")); + TQString kdialogExe = TDEStandardDirs::findExe(TQString::fromLatin1("kdialog")); (*d->m_kdialogProcess) << kdialogExe; (*d->m_kdialogProcess) << "--embed"; (*d->m_kdialogProcess) << TQString::number( (ulong)topLevelWidget()->winId() ); (*d->m_kdialogProcess) << "--geticon"; (*d->m_kdialogProcess) << "Toolbar"; (*d->m_kdialogProcess) << "Actions"; - if ( !d->m_kdialogProcess->start( KProcess::NotifyOnExit ) ) { + if ( !d->m_kdialogProcess->start( TDEProcess::NotifyOnExit ) ) { kdError(240) << "Can't run " << kdialogExe << endl; delete d->m_kdialogProcess; d->m_kdialogProcess = 0; @@ -1399,11 +1399,11 @@ 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, TQT_SIGNAL( processExited( KProcess* ) ), - this, TQT_SLOT( slotProcessExited( KProcess* ) ) ); + connect( d->m_kdialogProcess, TQT_SIGNAL( processExited( TDEProcess* ) ), + this, TQT_SLOT( slotProcessExited( TDEProcess* ) ) ); } -void KEditToolbarWidget::slotProcessExited( KProcess* ) +void KEditToolbarWidget::slotProcessExited( TDEProcess* ) { m_activeList->setEnabled( true ); m_toolbarCombo->setEnabled( true ); diff --git a/tdeui/kedittoolbar.h b/tdeui/kedittoolbar.h index 60a15d5de..829cdd347 100644 --- a/tdeui/kedittoolbar.h +++ b/tdeui/kedittoolbar.h @@ -23,11 +23,11 @@ #include <kxmlguiclient.h> #include <kdialogbase.h> -class KProcess; -class KActionCollection; +class TDEProcess; +class TDEActionCollection; class TQComboBox; class TQToolButton; -class KListView; +class TDEListView; class TQListViewItem; class KEditToolbarWidget; @@ -61,12 +61,12 @@ namespace * That code snippet also takes care of redrawing the menu and * toolbars if you have made any changes. * - * If you are using KMainWindow's settings methods (either save/apply manually + * If you are using TDEMainWindow's settings methods (either save/apply manually * or autoSaveSettings), you should write something like: * \code * void MyClass::slotConfigureToolbars() * { - * saveMainWindowSettings( KGlobal::config(), "MainWindow" ); + * saveMainWindowSettings( TDEGlobal::config(), "MainWindow" ); * KEditToolbar dlg(actionCollection()); * connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig())); * dlg.exec(); @@ -76,7 +76,7 @@ namespace * { * ...if you use any action list, use plugActionList on each here... * createGUI(); - * applyMainWindowSettings( KGlobal::config(), "MainWindow" ); + * applyMainWindowSettings( TDEGlobal::config(), "MainWindow" ); * } * \endcode * @@ -91,7 +91,7 @@ namespace * An example would be: * * \code - * saveMainWindowSettings( KGlobal::config(), "MainWindow" ); + * saveMainWindowSettings( TDEGlobal::config(), "MainWindow" ); * KEditToolbar dlg(factory()); * connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig())); * dlg.exec(); @@ -100,7 +100,7 @@ namespace * { * ...if you use any action list, use plugActionList on each here... * // Do NOT call createGUI()! - * applyMainWindowSettings( KGlobal::config(), "MainWindow" ); + * applyMainWindowSettings( TDEGlobal::config(), "MainWindow" ); * } * \endcode * @@ -123,7 +123,7 @@ public: * relative) of your application's UI resource file. If it is * left blank, then the resource file: share/apps/appname/appnameui.rc * is used. This is the same resource file that is used by the - * default createGUI() function in KMainWindow so you're usually + * default createGUI() function in TDEMainWindow so you're usually * pretty safe in leaving it blank. * * The third parameter, global(), controls whether or not the @@ -141,7 +141,7 @@ public: * @param parent The parent of the dialog. * @param name An internal name. */ - KEditToolbar(KActionCollection *collection, + KEditToolbar(TDEActionCollection *collection, const TQString& xmlfile = TQString::null, bool global = true, TQWidget* parent = 0, const char* name = 0); @@ -157,7 +157,7 @@ public: * @param name An internal name. * @since 3.2 */ - KEditToolbar(const TQString& defaultToolbar, KActionCollection *collection, + KEditToolbar(const TQString& defaultToolbar, TDEActionCollection *collection, const TQString& xmlfile = TQString::null, bool global = true, TQWidget* parent = 0, const char* name = 0); /** @@ -179,9 +179,9 @@ public: * @param parent The usual parent for the dialog. * @param name An internal name. * - * Some people seem tempted to use this also in non-KParts apps, using KMainWindow::guiFactory(). + * Some people seem tempted to use this also in non-KParts apps, using TDEMainWindow::guiFactory(). * This works, but only _if_ setting conserveMemory to false when calling - * KMainWindow::createGUI()! If not, use the other KEditToolbar constructor. + * TDEMainWindow::createGUI()! If not, use the other KEditToolbar constructor. */ KEditToolbar(KXMLGUIFactory* factory, TQWidget* parent = 0, const char* name = 0); @@ -281,7 +281,7 @@ public: * relative) of your application's UI resource file. If it is * left blank, then the resource file: share/apps/appname/appnameui.rc * is used. This is the same resource file that is used by the - * default createGUI function in KMainWindow so you're usually + * default createGUI function in TDEMainWindow so you're usually * pretty safe in leaving it blank. * * The third parameter, global, controls whether or not the @@ -300,7 +300,7 @@ public: * be parsed * @param parent This widget's parent */ - KEditToolbarWidget(KActionCollection *collection, + KEditToolbarWidget(TDEActionCollection *collection, const TQString& xmlfile = TQString::null, bool global = true, TQWidget *parent = 0L); @@ -316,7 +316,7 @@ public: * @since 3.2 */ KEditToolbarWidget(const TQString& defaultToolbar, - KActionCollection *collection, + TDEActionCollection *collection, const TQString& file = TQString::null, bool global = true, TQWidget *parent = 0L); @@ -366,7 +366,7 @@ public: /** * @internal Reimplemented for internal purposes. */ - virtual KActionCollection *actionCollection() const; + virtual TDEActionCollection *actionCollection() const; /** * Save any changes the user made. The file will be in the user's @@ -396,7 +396,7 @@ protected slots: void slotInactiveSelected(TQListViewItem *item); void slotActiveSelected(TQListViewItem *item); - void slotDropped(KListView *list, TQDropEvent *e, TQListViewItem *after); + void slotDropped(TDEListView *list, TQDropEvent *e, TQListViewItem *after); void slotInsertButton(); void slotRemoveButton(); @@ -406,7 +406,7 @@ protected slots: void slotChangeIcon(); private slots: - void slotProcessExited( KProcess* ); + void slotProcessExited( TDEProcess* ); protected: // KDE4: make private void setupLayout(); @@ -414,7 +414,7 @@ protected: // KDE4: make private void insertActive(ToolbarItem *item, TQListViewItem *before, bool prepend = false); void removeActive(ToolbarItem *item); void moveActive(ToolbarItem *item, TQListViewItem *before); - void initNonKPart(KActionCollection *collection, const TQString& file, bool global); + void initNonKPart(TDEActionCollection *collection, const TQString& file, bool global); void initKPart(KXMLGUIFactory* factory); void loadToolbarCombo(const TQString& defaultToolbar = TQString::null); void loadActionList(TQDomElement& elem); diff --git a/tdeui/kguiitem.cpp b/tdeui/kguiitem.cpp index 7b73c7401..dd30e1fe8 100644 --- a/tdeui/kguiitem.cpp +++ b/tdeui/kguiitem.cpp @@ -149,7 +149,7 @@ TQString KGuiItem::plainText() const return stripped; } -TQIconSet KGuiItem::iconSet( KIcon::Group group, int size, KInstance* instance ) const +TQIconSet KGuiItem::iconSet( TDEIcon::Group group, int size, TDEInstance* instance ) const { if( d->m_hasIcon ) { diff --git a/tdeui/kguiitem.h b/tdeui/kguiitem.h index 586998d48..538275f3d 100644 --- a/tdeui/kguiitem.h +++ b/tdeui/kguiitem.h @@ -27,7 +27,7 @@ #include <tqpixmap.h> #include <tqvaluelist.h> #include <kicontheme.h> -#include <kglobal.h> +#include <tdeglobal.h> /** * @short An abstract class for GUI data such as ToolTip and Icon. @@ -61,10 +61,10 @@ public: TQString text() const; TQString plainText() const; #ifndef KDE_NO_COMPAT - TQIconSet iconSet( KIcon::Group, int size = 0, KInstance* instance = KGlobal::instance()) const; - TQIconSet iconSet() const { return iconSet( KIcon::Small ); } + TQIconSet iconSet( TDEIcon::Group, int size = 0, TDEInstance* instance = TDEGlobal::instance()) const; + TQIconSet iconSet() const { return iconSet( TDEIcon::Small ); } #else - TQIconSet iconSet( KIcon::Group=KIcon::Small, int size = 0, KInstance* instance = KGlobal::instance()) const; + TQIconSet iconSet( TDEIcon::Group=TDEIcon::Small, int size = 0, TDEInstance* instance = TDEGlobal::instance()) const; #endif TQString iconName() const; diff --git a/tdeui/khelpmenu.cpp b/tdeui/khelpmenu.cpp index 071db1248..08755b860 100644 --- a/tdeui/khelpmenu.cpp +++ b/tdeui/khelpmenu.cpp @@ -27,19 +27,19 @@ #include <tqwhatsthis.h> #include <tqwidget.h> -#include <kaboutapplication.h> -#include <kaboutdata.h> -#include <kaboutkde.h> -#include <kaction.h> -#include <kapplication.h> +#include <tdeaboutapplication.h> +#include <tdeaboutdata.h> +#include <tdeabouttde.h> +#include <tdeaction.h> +#include <tdeapplication.h> #include <kbugreport.h> #include <kdialogbase.h> #include <khelpmenu.h> #include <kiconloader.h> -#include <klocale.h> -#include <kmessagebox.h> -#include <kpopupmenu.h> -#include <kstdaccel.h> +#include <tdelocale.h> +#include <tdemessagebox.h> +#include <tdepopupmenu.h> +#include <tdestdaccel.h> #include <kstdaction.h> #include <kstandarddirs.h> @@ -59,7 +59,7 @@ public: delete mSwitchApplicationLanguage; } - const KAboutData *mAboutData; + const TDEAboutData *mAboutData; KSwitchLanguageDialog *mSwitchApplicationLanguage; }; @@ -74,8 +74,8 @@ KHelpMenu::KHelpMenu( TQWidget *parent, const TQString &aboutAppText, d->mAboutData = 0; } -KHelpMenu::KHelpMenu( TQWidget *parent, const KAboutData *aboutData, - bool showWhatsThis, KActionCollection *actions ) +KHelpMenu::KHelpMenu( TQWidget *parent, const TDEAboutData *aboutData, + bool showWhatsThis, TDEActionCollection *actions ) : TQObject(parent), mMenu(0), mAboutApp(0), mAboutKDE(0), mBugReport(0), d(new KHelpMenuPrivate) { @@ -109,7 +109,7 @@ KHelpMenu::~KHelpMenu() } -KPopupMenu* KHelpMenu::menu() +TDEPopupMenu* KHelpMenu::menu() { if( !mMenu ) { @@ -118,23 +118,23 @@ KPopupMenu* KHelpMenu::menu() // I use hardcoded menu id's here. Reason is to stay backward // compatible. // - const KAboutData *aboutData = d->mAboutData ? d->mAboutData : KGlobal::instance()->aboutData(); + const TDEAboutData *aboutData = d->mAboutData ? d->mAboutData : TDEGlobal::instance()->aboutData(); TQString appName = (aboutData)? aboutData->programName() : TQString::fromLatin1(tqApp->name()); - mMenu = new KPopupMenu(); + mMenu = new TDEPopupMenu(); connect( mMenu, TQT_SIGNAL(destroyed()), this, TQT_SLOT(menuDestroyed())); bool need_separator = false; - if (kapp->authorizeKAction("help_contents")) + if (kapp->authorizeTDEAction("help_contents")) { - mMenu->insertItem( BarIcon( "contents", KIcon::SizeSmall), + mMenu->insertItem( BarIcon( "contents", TDEIcon::SizeSmall), TQString(i18n( "%1 &Handbook" ).arg( appName)) ,menuHelpContents ); mMenu->connectItem( menuHelpContents, this, TQT_SLOT(appHelpActivated()) ); - mMenu->setAccel( KStdAccel::shortcut(KStdAccel::Help), menuHelpContents ); + mMenu->setAccel( TDEStdAccel::shortcut(TDEStdAccel::Help), menuHelpContents ); need_separator = true; } - if( mShowWhatsThis && kapp->authorizeKAction("help_whats_this") ) + if( mShowWhatsThis && kapp->authorizeTDEAction("help_whats_this") ) { TQToolButton* wtb = TQWhatsThis::whatsThisButton(0); mMenu->insertItem( wtb->iconSet(),i18n( "What's &This" ), menuWhatsThis); @@ -144,7 +144,7 @@ KPopupMenu* KHelpMenu::menu() need_separator = true; } - if (kapp->authorizeKAction("help_report_bug") && aboutData && !aboutData->bugAddress().isEmpty() ) + if (kapp->authorizeTDEAction("help_report_bug") && aboutData && !aboutData->bugAddress().isEmpty() ) { if (need_separator) mMenu->insertSeparator(); @@ -153,7 +153,7 @@ KPopupMenu* KHelpMenu::menu() need_separator = true; } - if (kapp->authorizeKAction("switch_application_language")) + if (kapp->authorizeTDEAction("switch_application_language")) { if (need_separator) mMenu->insertSeparator(); @@ -165,14 +165,14 @@ KPopupMenu* KHelpMenu::menu() if (need_separator) mMenu->insertSeparator(); - if (kapp->authorizeKAction("help_about_app")) + if (kapp->authorizeTDEAction("help_about_app")) { mMenu->insertItem( kapp->miniIcon(), TQString(i18n( "&About %1" ).arg(appName)), menuAboutApp ); mMenu->connectItem( menuAboutApp, this, TQT_SLOT( aboutApplication() ) ); } - if (kapp->authorizeKAction("help_about_kde")) + if (kapp->authorizeTDEAction("help_about_kde")) { mMenu->insertItem( SmallIcon("about_kde"), i18n( "About &Trinity" ), menuAboutKDE ); mMenu->connectItem( menuAboutKDE, this, TQT_SLOT( aboutKDE() ) ); @@ -196,7 +196,7 @@ void KHelpMenu::aboutApplication() { if( !mAboutApp ) { - mAboutApp = new KAboutApplication( d->mAboutData, mParent, "about", false ); + mAboutApp = new TDEAboutApplication( d->mAboutData, mParent, "about", false ); connect( mAboutApp, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) ); } mAboutApp->show(); @@ -238,7 +238,7 @@ void KHelpMenu::aboutKDE() { if( !mAboutKDE ) { - mAboutKDE = new KAboutKDE( mParent, "aboutkde", false ); + mAboutKDE = new TDEAboutKDE( mParent, "aboutkde", false ); connect( mAboutKDE, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) ); } mAboutKDE->show(); diff --git a/tdeui/khelpmenu.h b/tdeui/khelpmenu.h index e58569bf6..25e118b5b 100644 --- a/tdeui/khelpmenu.h +++ b/tdeui/khelpmenu.h @@ -27,12 +27,12 @@ #include <tdelibs_export.h> -class KActionCollection; -class KPopupMenu; +class TDEActionCollection; +class TDEPopupMenu; class TQWidget; -class KAboutData; -class KAboutKDE; +class TDEAboutData; +class TDEAboutKDE; class KBugReport; class KDialogBase; class KHelpMenuPrivate; @@ -44,10 +44,10 @@ class KHelpMenuPrivate; * This class provides the standard %KDE help menu with the default "about" * dialog boxes and help entry. * - * This class is used in KMainWindow so + * This class is used in TDEMainWindow so * normally you don't need to use this class yourself. However, if you * need the help menu or any of its dialog boxes in your code that is - * not subclassed from KMainWindow you should use this class. + * not subclassed from TDEMainWindow you should use this class. * * The usage is simple: * @@ -64,7 +64,7 @@ class KHelpMenuPrivate; * \endcode * * IMPORTANT: - * The first time you use KHelpMenu::menu(), a KPopupMenu object is + * The first time you use KHelpMenu::menu(), a TDEPopupMenu object is * allocated. Only one object is created by the class so if you call * KHelpMenu::menu() twice or more, the same pointer is returned. The class * will destroy the popupmenu in the destructor so do not delete this @@ -115,7 +115,7 @@ class KHelpMenuPrivate; * void MyClass::myFunc() * { * KHelpMenu *helpMenu = new KHelpMenu( this ); - * KPopupMenu *help = mHelpMenu->menu(); + * TDEPopupMenu *help = mHelpMenu->menu(); * help->connectItem( KHelpMenu::menuAboutApp, this, TQT_SLOT(myDialogSlot()) ); * } * @@ -171,12 +171,12 @@ class TDEUI_EXPORT KHelpMenu : public TQObject * @param aboutData User and app data used in the About app dialog * @param showWhatsThis Decides whether a "Whats this" entry will be * added to the dialog. - * @param actions KActionCollection that is used instead of the + * @param actions TDEActionCollection that is used instead of the * standard actions. * */ - KHelpMenu( TQWidget *parent, const KAboutData *aboutData, - bool showWhatsThis=true, KActionCollection *actions = 0 ); + KHelpMenu( TQWidget *parent, const TDEAboutData *aboutData, + bool showWhatsThis=true, TDEActionCollection *actions = 0 ); /** * Destructor @@ -192,7 +192,7 @@ class TDEUI_EXPORT KHelpMenu : public TQObject * Note: This method will only create one instance of the menu. If * you call this method twice or more the same pointer is returned */ - KPopupMenu *menu(); + TDEPopupMenu *menu(); public slots: /** @@ -261,9 +261,9 @@ class TDEUI_EXPORT KHelpMenu : public TQObject void showAboutApplication(); private: - KPopupMenu *mMenu; + TDEPopupMenu *mMenu; KDialogBase *mAboutApp; - KAboutKDE *mAboutKDE; + TDEAboutKDE *mAboutKDE; KBugReport *mBugReport; TQString mAboutAppText; diff --git a/tdeui/kiconview.cpp b/tdeui/kiconview.cpp index a26519729..7273cbe13 100644 --- a/tdeui/kiconview.cpp +++ b/tdeui/kiconview.cpp @@ -25,28 +25,28 @@ #include "kiconview.h" #include "kwordwrap.h" -#include <kconfig.h> +#include <tdeconfig.h> #include <kdebug.h> -#include <kglobal.h> -#include <kglobalsettings.h> -#include <kapplication.h> +#include <tdeglobal.h> +#include <tdeglobalsettings.h> +#include <tdeapplication.h> #include <kipc.h> #include <kcursor.h> #include <kpixmap.h> #include <kpixmapeffect.h> -class KIconView::KIconViewPrivate +class TDEIconView::TDEIconViewPrivate { public: - KIconViewPrivate() { - mode = KIconView::Execute; + TDEIconViewPrivate() { + mode = TDEIconView::Execute; fm = 0L; doAutoSelect = true; textHeight = 0; dragHoldItem = 0L; } - KIconView::Mode mode; + TDEIconView::Mode mode; bool doAutoSelect; TQFontMetrics *fm; TQPixmapCache maskCache; @@ -56,16 +56,16 @@ public: TQTimer doubleClickIgnoreTimer; }; -KIconView::KIconView( TQWidget *parent, const char *name, WFlags f ) +TDEIconView::TDEIconView( TQWidget *parent, const char *name, WFlags f ) : TQIconView( parent, name, f ) { - d = new KIconViewPrivate; + d = new TDEIconViewPrivate; connect( this, TQT_SIGNAL( onViewport() ), this, TQT_SLOT( slotOnViewport() ) ); connect( this, TQT_SIGNAL( onItem( TQIconViewItem * ) ), this, TQT_SLOT( slotOnItem( TQIconViewItem * ) ) ); - slotSettingsChanged( KApplication::SETTINGS_MOUSE ); + slotSettingsChanged( TDEApplication::SETTINGS_MOUSE ); if ( kapp ) { // maybe null when used inside designer connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) ); kapp->addKipcEventMask( KIPC::SettingsChanged ); @@ -80,24 +80,24 @@ KIconView::KIconView( TQWidget *parent, const char *name, WFlags f ) connect( &d->dragHoldTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDragHoldTimeout()) ); } -KIconView::~KIconView() +TDEIconView::~TDEIconView() { delete d->fm; delete d; } -void KIconView::setMode( KIconView::Mode mode ) +void TDEIconView::setMode( TDEIconView::Mode mode ) { d->mode = mode; } -KIconView::Mode KIconView::mode() const +TDEIconView::Mode TDEIconView::mode() const { return d->mode; } -void KIconView::slotOnItem( TQIconViewItem *item ) +void TDEIconView::slotOnItem( TQIconViewItem *item ) { if ( item ) { if ( m_bUseSingle ) { @@ -112,7 +112,7 @@ void KIconView::slotOnItem( TQIconViewItem *item ) } } -void KIconView::slotOnViewport() +void TDEIconView::slotOnViewport() { if ( m_bUseSingle && m_bChangeCursorOverItem ) viewport()->unsetCursor(); @@ -121,12 +121,12 @@ void KIconView::slotOnViewport() m_pCurrentItem = 0L; } -void KIconView::slotSettingsChanged(int category) +void TDEIconView::slotSettingsChanged(int category) { - if ( category != KApplication::SETTINGS_MOUSE ) + if ( category != TDEApplication::SETTINGS_MOUSE ) return; - m_bUseSingle = KGlobalSettings::singleClick(); - //kdDebug() << "KIconView::slotSettingsChanged for mouse, usesingle=" << m_bUseSingle << endl; + m_bUseSingle = TDEGlobalSettings::singleClick(); + //kdDebug() << "TDEIconView::slotSettingsChanged for mouse, usesingle=" << m_bUseSingle << endl; disconnect( this, TQT_SIGNAL( mouseButtonClicked( int, TQIconViewItem *, const TQPoint & ) ), @@ -150,14 +150,14 @@ void KIconView::slotSettingsChanged(int category) // const TQPoint & ) ) ); } - m_bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon(); - m_autoSelectDelay = m_bUseSingle ? KGlobalSettings::autoSelectDelay() : -1; + m_bChangeCursorOverItem = TDEGlobalSettings::changeCursorOverIcon(); + m_autoSelectDelay = m_bUseSingle ? TDEGlobalSettings::autoSelectDelay() : -1; if( !m_bUseSingle || !m_bChangeCursorOverItem ) viewport()->unsetCursor(); } -void KIconView::slotAutoSelect() +void TDEIconView::slotAutoSelect() { // check that the item still exists if( index( m_pCurrentItem ) == -1 || !d->doAutoSelect ) @@ -167,7 +167,7 @@ void KIconView::slotAutoSelect() if( !hasFocus() ) setFocus(); - ButtonState keybstate = KApplication::keyboardMouseState(); + ButtonState keybstate = TDEApplication::keyboardMouseState(); TQIconViewItem* previousItem = currentItem(); setCurrentItem( m_pCurrentItem ); @@ -232,18 +232,18 @@ void KIconView::slotAutoSelect() setSelected( m_pCurrentItem, true ); } else - kdDebug() << "KIconView: That's not supposed to happen!!!!" << endl; + kdDebug() << "TDEIconView: That's not supposed to happen!!!!" << endl; } -void KIconView::emitExecute( TQIconViewItem *item, const TQPoint &pos ) +void TDEIconView::emitExecute( TQIconViewItem *item, const TQPoint &pos ) { if ( d->mode != Execute ) { - // kdDebug() << "KIconView::emitExecute : not in execute mode !" << endl; + // kdDebug() << "TDEIconView::emitExecute : not in execute mode !" << endl; return; } - ButtonState keybstate = KApplication::keyboardMouseState(); + ButtonState keybstate = TDEApplication::keyboardMouseState(); m_pAutoSelect->stop(); @@ -256,7 +256,7 @@ void KIconView::emitExecute( TQIconViewItem *item, const TQPoint &pos ) } } -void KIconView::updateDragHoldItem( TQDropEvent *e ) +void TDEIconView::updateDragHoldItem( TQDropEvent *e ) { TQIconViewItem *item = findItem( e->pos() ); @@ -274,21 +274,21 @@ void KIconView::updateDragHoldItem( TQDropEvent *e ) } } -void KIconView::focusOutEvent( TQFocusEvent *fe ) +void TDEIconView::focusOutEvent( TQFocusEvent *fe ) { m_pAutoSelect->stop(); TQIconView::focusOutEvent( fe ); } -void KIconView::leaveEvent( TQEvent *e ) +void TDEIconView::leaveEvent( TQEvent *e ) { m_pAutoSelect->stop(); TQIconView::leaveEvent( e ); } -void KIconView::contentsMousePressEvent( TQMouseEvent *e ) +void TDEIconView::contentsMousePressEvent( TQMouseEvent *e ) { if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) { bool block = signalsBlocked(); @@ -303,7 +303,7 @@ void KIconView::contentsMousePressEvent( TQMouseEvent *e ) d->doAutoSelect = false; } -void KIconView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) +void TDEIconView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) { TQIconView::contentsMouseDoubleClickEvent( e ); @@ -318,9 +318,9 @@ void KIconView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) d->doubleClickIgnoreTimer.start(0, true); } -void KIconView::slotMouseButtonClicked( int btn, TQIconViewItem *item, const TQPoint &pos ) +void TDEIconView::slotMouseButtonClicked( int btn, TQIconViewItem *item, const TQPoint &pos ) { - //kdDebug() << " KIconView::slotMouseButtonClicked() item=" << item << endl; + //kdDebug() << " TDEIconView::slotMouseButtonClicked() item=" << item << endl; if( d->doubleClickIgnoreTimer.isActive() ) return; // Ignore double click @@ -328,19 +328,19 @@ void KIconView::slotMouseButtonClicked( int btn, TQIconViewItem *item, const TQP emitExecute( item, pos ); } -void KIconView::contentsMouseReleaseEvent( TQMouseEvent *e ) +void TDEIconView::contentsMouseReleaseEvent( TQMouseEvent *e ) { d->doAutoSelect = true; TQIconView::contentsMouseReleaseEvent( e ); } -void KIconView::contentsDragEnterEvent( TQDragEnterEvent *e ) +void TDEIconView::contentsDragEnterEvent( TQDragEnterEvent *e ) { updateDragHoldItem( e ); TQIconView::contentsDragEnterEvent( e ); } -void KIconView::contentsDragLeaveEvent( TQDragLeaveEvent *e ) +void TDEIconView::contentsDragLeaveEvent( TQDragLeaveEvent *e ) { d->dragHoldTimer.stop(); d->dragHoldItem = 0L; @@ -348,19 +348,19 @@ void KIconView::contentsDragLeaveEvent( TQDragLeaveEvent *e ) } -void KIconView::contentsDragMoveEvent( TQDragMoveEvent *e ) +void TDEIconView::contentsDragMoveEvent( TQDragMoveEvent *e ) { updateDragHoldItem( e ); TQIconView::contentsDragMoveEvent( e ); } -void KIconView::contentsDropEvent( TQDropEvent* e ) +void TDEIconView::contentsDropEvent( TQDropEvent* e ) { d->dragHoldTimer.stop(); TQIconView::contentsDropEvent( e ); } -void KIconView::slotDragHoldTimeout() +void TDEIconView::slotDragHoldTimeout() { TQIconViewItem *tmp = d->dragHoldItem; d->dragHoldItem = 0L; @@ -368,7 +368,7 @@ void KIconView::slotDragHoldTimeout() emit held( tmp ); } -void KIconView::takeItem( TQIconViewItem * item ) +void TDEIconView::takeItem( TQIconViewItem * item ) { if ( item == d->dragHoldItem ) { @@ -379,13 +379,13 @@ void KIconView::takeItem( TQIconViewItem * item ) TQIconView::takeItem( item ); } -void KIconView::cancelPendingHeldSignal() +void TDEIconView::cancelPendingHeldSignal() { d->dragHoldTimer.stop(); d->dragHoldItem = 0L; } -void KIconView::wheelEvent( TQWheelEvent *e ) +void TDEIconView::wheelEvent( TQWheelEvent *e ) { if (horizontalScrollBar() && (arrangement() == TQIconView::TopToBottom)) { TQWheelEvent ce(e->pos(), e->delta(), e->state(), Qt::Horizontal); @@ -398,14 +398,14 @@ void KIconView::wheelEvent( TQWheelEvent *e ) TQIconView::wheelEvent(e); } -void KIconView::setFont( const TQFont &font ) +void TDEIconView::setFont( const TQFont &font ) { delete d->fm; d->fm = 0L; TQIconView::setFont( font ); } -TQFontMetrics *KIconView::itemFontMetrics() const +TQFontMetrics *TDEIconView::itemFontMetrics() const { if (!d->fm) { // TQIconView creates one too, but we can't access it @@ -414,7 +414,7 @@ TQFontMetrics *KIconView::itemFontMetrics() const return d->fm; } -TQPixmap KIconView::selectedIconPixmap( TQPixmap *pix, const TQColor &col ) const +TQPixmap TDEIconView::selectedIconPixmap( TQPixmap *pix, const TQColor &col ) const { TQPixmap m; if ( d->maskCache.find( TQString::number( pix->serialNumber() ), m ) ) @@ -424,12 +424,12 @@ TQPixmap KIconView::selectedIconPixmap( TQPixmap *pix, const TQColor &col ) cons return m; } -int KIconView::iconTextHeight() const +int TDEIconView::iconTextHeight() const { return d->textHeight > 0 ? d->textHeight : ( wordWrapIconText() ? 99 : 1 ); } -void KIconView::setIconTextHeight( int n ) +void TDEIconView::setIconTextHeight( int n ) { int oldHeight = iconTextHeight(); if ( n > 1 ) @@ -447,27 +447,27 @@ void KIconView::setIconTextHeight( int n ) ///////////// -struct KIconViewItem::KIconViewItemPrivate +struct TDEIconViewItem::TDEIconViewItemPrivate { TQSize m_pixmapSize; }; -void KIconViewItem::init() +void TDEIconViewItem::init() { m_wordWrap = 0L; d = 0L; calcRect(); } -KIconViewItem::~KIconViewItem() +TDEIconViewItem::~TDEIconViewItem() { delete m_wordWrap; delete d; } -void KIconViewItem::calcRect( const TQString& text_ ) +void TDEIconViewItem::calcRect( const TQString& text_ ) { - bool drawRoundedRect = KGlobalSettings::iconUseRoundedRect(); + bool drawRoundedRect = TDEGlobalSettings::iconUseRoundedRect(); Q_ASSERT( iconView() ); if ( !iconView() ) @@ -475,14 +475,14 @@ void KIconViewItem::calcRect( const TQString& text_ ) delete m_wordWrap; m_wordWrap = 0L; #ifndef NDEBUG // be faster for the end-user, such a bug will have been fixed before hand :) - if ( !iconView()->inherits("KIconView") ) + if ( !iconView()->inherits("TDEIconView") ) { - kdWarning() << "KIconViewItem used in a " << iconView()->className() << " !!" << endl; + kdWarning() << "TDEIconViewItem used in a " << iconView()->className() << " !!" << endl; return; } #endif - //kdDebug() << "KIconViewItem::calcRect - " << text() << endl; - KIconView *view = static_cast<KIconView *>(iconView()); + //kdDebug() << "TDEIconViewItem::calcRect - " << text() << endl; + TDEIconView *view = static_cast<TDEIconView *>(iconView()); TQRect itemIconRect = pixmapRect(); TQRect itemTextRect = textRect(); TQRect itemRect = rect(); @@ -532,7 +532,7 @@ void KIconViewItem::calcRect( const TQString& text_ ) t = text_.isEmpty() ? text() : text_; // Max text height - int nbLines = static_cast<KIconView*>( iconView() )->iconTextHeight(); + int nbLines = static_cast<TDEIconView*>( iconView() )->iconTextHeight(); int height = nbLines > 0 ? fm->height() * nbLines : 0xFFFFFFFF; // Should not be higher than pixmap if text is alongside icons @@ -629,16 +629,16 @@ void KIconViewItem::calcRect( const TQString& text_ ) } -void KIconViewItem::paintItem( TQPainter *p, const TQColorGroup &cg ) +void TDEIconViewItem::paintItem( TQPainter *p, const TQColorGroup &cg ) { TQIconView* view = iconView(); Q_ASSERT( view ); if ( !view ) return; #ifndef NDEBUG // be faster for the end-user, such a bug will have been fixed before hand :) - if ( !view->inherits("KIconView") ) + if ( !view->inherits("TDEIconView") ) { - kdWarning() << "KIconViewItem used in a " << view->className() << " !!" << endl; + kdWarning() << "TDEIconViewItem used in a " << view->className() << " !!" << endl; return; } #endif @@ -651,14 +651,14 @@ void KIconViewItem::paintItem( TQPainter *p, const TQColorGroup &cg ) p->restore(); } -KWordWrap * KIconViewItem::wordWrap() +KWordWrap * TDEIconViewItem::wordWrap() { return m_wordWrap; } -void KIconViewItem::paintPixmap( TQPainter *p, const TQColorGroup &cg ) +void TDEIconViewItem::paintPixmap( TQPainter *p, const TQColorGroup &cg ) { - KIconView *kview = static_cast<KIconView *>(iconView()); + TDEIconView *kview = static_cast<TDEIconView *>(iconView()); #ifndef QT_NO_PICTURE if ( picture() ) { @@ -702,9 +702,9 @@ void KIconViewItem::paintPixmap( TQPainter *p, const TQColorGroup &cg ) } } -void KIconViewItem::paintText( TQPainter *p, const TQColorGroup &cg ) +void TDEIconViewItem::paintText( TQPainter *p, const TQColorGroup &cg ) { - bool drawRoundedRect = KGlobalSettings::iconUseRoundedRect(); + bool drawRoundedRect = TDEGlobalSettings::iconUseRoundedRect(); int textX; if (drawRoundedRect == true) textX = textRect( false ).x() + 4; @@ -732,20 +732,20 @@ void KIconViewItem::paintText( TQPainter *p, const TQColorGroup &cg ) m_wordWrap->drawText( p, textX, textY, align | KWordWrap::Truncate ); } -TQSize KIconViewItem::pixmapSize() const +TQSize TDEIconViewItem::pixmapSize() const { return d ? d->m_pixmapSize : TQSize( 0, 0 ); } -void KIconViewItem::setPixmapSize( const TQSize& size ) +void TDEIconViewItem::setPixmapSize( const TQSize& size ) { if ( !d ) - d = new KIconViewItemPrivate; + d = new TDEIconViewItemPrivate; d->m_pixmapSize = size; } -void KIconView::virtual_hook( int, void* ) +void TDEIconView::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "kiconview.moc" diff --git a/tdeui/kiconview.h b/tdeui/kiconview.h index 5b1149f7b..8c0cd5a24 100644 --- a/tdeui/kiconview.h +++ b/tdeui/kiconview.h @@ -33,26 +33,26 @@ * There is a new signal executed(). It gets connected to either * 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 + * 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 * TQIconView::selectionChanged() signal. * **/ -class TDEUI_EXPORT KIconView : public TQIconView +class TDEUI_EXPORT TDEIconView : public TQIconView { - friend class KIconViewItem; + friend class TDEIconViewItem; Q_OBJECT TQ_ENUMS( Mode ) TQ_PROPERTY( Mode mode READ mode WRITE setMode ) public: - KIconView( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); + TDEIconView( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); - ~KIconView(); + ~TDEIconView(); /** - * KIconView has two different operating modes. Execute mode is depending + * TDEIconView has two different operating modes. Execute mode is depending * on the configuration of single-click or double-click where the signal * executed() will be emitted upon click/double-click. * In Select mode, this signal will not be emitted. @@ -180,7 +180,7 @@ protected: /** * 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 + * a TDEIconView::contentsDrag*Event() method (which have side effects * because they forward to TQIconView). */ void cancelPendingHeldSignal(); @@ -191,11 +191,11 @@ private slots: private: /** - * @internal. For use by KIconViewItem. + * @internal. For use by TDEIconViewItem. */ TQFontMetrics *itemFontMetrics() const; /** - * @internal. For use by KIconViewItem. + * @internal. For use by TDEIconViewItem. */ TQPixmap selectedIconPixmap( TQPixmap *pix, const TQColor &col ) const; @@ -210,40 +210,40 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KIconViewPrivate; - KIconViewPrivate *d; + class TDEIconViewPrivate; + TDEIconViewPrivate *d; }; class KWordWrap; /** * @short A variant of TQIconViewItem that wraps words better. * - * KIconViewItem exists to improve the word-wrap functionality of QIconViewItem - * Use KIconViewItem instead of TQIconViewItem for any iconview item you might have :) + * TDEIconViewItem exists to improve the word-wrap functionality of QIconViewItem + * Use TDEIconViewItem instead of TQIconViewItem for any iconview item you might have :) * * @author David Faure <david@mandrakesoft.com> */ -class TDEUI_EXPORT KIconViewItem : public TQIconViewItem +class TDEUI_EXPORT TDEIconViewItem : public TQIconViewItem { public: // Need to redefine all the constructors - I want Java ! - KIconViewItem( TQIconView *parent ) + TDEIconViewItem( TQIconView *parent ) : TQIconViewItem( parent ) { init(); } // We need to call it because the parent ctor won't call our reimplementation :((( - KIconViewItem( TQIconView *parent, TQIconViewItem *after ) + TDEIconViewItem( TQIconView *parent, TQIconViewItem *after ) : TQIconViewItem( parent, after ) { init(); } - KIconViewItem( TQIconView *parent, const TQString &text ) + TDEIconViewItem( TQIconView *parent, const TQString &text ) : TQIconViewItem( parent, text ) { init(); } - KIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text ) + TDEIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text ) : TQIconViewItem( parent, after, text ) { init(); } - KIconViewItem( TQIconView *parent, const TQString &text, const TQPixmap &icon ) + TDEIconViewItem( TQIconView *parent, const TQString &text, const TQPixmap &icon ) : TQIconViewItem( parent, text, icon ) { init(); } - KIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text, const TQPixmap &icon ) + TDEIconViewItem( 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 ) + TDEIconViewItem( TQIconView *parent, const TQString &text, const TQPicture &picture ) : TQIconViewItem( parent, text, picture ) { init(); } - KIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text, const TQPicture &picture ) + TDEIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text, const TQPicture &picture ) : TQIconViewItem( parent, after, text, picture ) { init(); } - virtual ~KIconViewItem(); + virtual ~TDEIconViewItem(); /** * Using this function, you can specify a custom size for the pixmap. The @@ -274,8 +274,8 @@ protected: private: KWordWrap* m_wordWrap; - struct KIconViewItemPrivate; - KIconViewItemPrivate *d; + struct TDEIconViewItemPrivate; + TDEIconViewItemPrivate *d; }; #endif diff --git a/tdeui/kiconviewsearchline.cpp b/tdeui/kiconviewsearchline.cpp index aa97dc923..7082fc910 100644 --- a/tdeui/kiconviewsearchline.cpp +++ b/tdeui/kiconviewsearchline.cpp @@ -20,14 +20,14 @@ /** * \todo * Maybe we should have a common interface for SearchLines, this file - * is so close (it's actually based on) klistviewsearchline! Only few methods + * is so close (it's actually based on) tdelistviewsearchline! Only few methods * would be reimplemented. */ #include "kiconviewsearchline.h" #include <tqiconview.h> -#include <klocale.h> +#include <tdelocale.h> #include <tqtimer.h> #include <kdebug.h> @@ -35,10 +35,10 @@ typedef TQValueList <TQIconViewItem *> QIconViewItemList; -class KIconViewSearchLine::KIconViewSearchLinePrivate +class TDEIconViewSearchLine::TDEIconViewSearchLinePrivate { public: - KIconViewSearchLinePrivate() : + TDEIconViewSearchLinePrivate() : iconView( 0 ), caseSensitive( DEFAULT_CASESENSITIVE ), activeSearch( false ), @@ -54,7 +54,7 @@ public: /****************************************************************************** * Public Methods * *****************************************************************************/ -KIconViewSearchLine::KIconViewSearchLine( TQWidget *parent, +TDEIconViewSearchLine::TDEIconViewSearchLine( TQWidget *parent, TQIconView *iconView, const char *name ) : KLineEdit( parent, name ) @@ -63,25 +63,25 @@ KIconViewSearchLine::KIconViewSearchLine( TQWidget *parent, init( iconView ); } -KIconViewSearchLine::KIconViewSearchLine( TQWidget *parent, const char *name ) : +TDEIconViewSearchLine::TDEIconViewSearchLine( TQWidget *parent, const char *name ) : KLineEdit( parent, name ) { d = NULL; init( NULL ); } -KIconViewSearchLine::~KIconViewSearchLine() +TDEIconViewSearchLine::~TDEIconViewSearchLine() { clear(); // empty hiddenItems, returning items back to iconView delete d; } -bool KIconViewSearchLine::caseSensitive() const +bool TDEIconViewSearchLine::caseSensitive() const { return d->caseSensitive; } -TQIconView *KIconViewSearchLine::iconView() const +TQIconView *TDEIconViewSearchLine::iconView() const { return d->iconView; } @@ -89,7 +89,7 @@ TQIconView *KIconViewSearchLine::iconView() const /****************************************************************************** * Public Slots * *****************************************************************************/ -void KIconViewSearchLine::updateSearch( const TQString &s ) +void TDEIconViewSearchLine::updateSearch( const TQString &s ) { long original_count; int original_hiddenListChanged; @@ -125,7 +125,7 @@ void KIconViewSearchLine::updateSearch( const TQString &s ) d->iconView->ensureItemVisible( currentItem ); } -void KIconViewSearchLine::clear() +void TDEIconViewSearchLine::clear() { // Clear hidden list, give items back to TQIconView, if it still exists TQIconViewItem *item = NULL; @@ -142,16 +142,16 @@ void KIconViewSearchLine::clear() KLineEdit::clear(); } -void KIconViewSearchLine::iconDeleted(const TQString &filename) { +void TDEIconViewSearchLine::iconDeleted(const TQString &filename) { // Do nothing... } -void KIconViewSearchLine::setCaseSensitive( bool cs ) +void TDEIconViewSearchLine::setCaseSensitive( bool cs ) { d->caseSensitive = cs; } -void KIconViewSearchLine::setIconView( TQIconView *iv ) +void TDEIconViewSearchLine::setIconView( TQIconView *iv ) { if ( d->iconView != NULL ) disconnect( d->iconView, TQT_SIGNAL( destroyed() ), @@ -172,7 +172,7 @@ void KIconViewSearchLine::setIconView( TQIconView *iv ) /****************************************************************************** * Protected Methods * *****************************************************************************/ -bool KIconViewSearchLine::itemMatches( const TQIconViewItem *item, +bool TDEIconViewSearchLine::itemMatches( const TQIconViewItem *item, const TQString &s ) const { if ( s.isEmpty() ) @@ -185,10 +185,10 @@ bool KIconViewSearchLine::itemMatches( const TQIconViewItem *item, return ( itemtext.find( s, 0, caseSensitive() ) >= 0 ); } -void KIconViewSearchLine::init( TQIconView *iconView ) +void TDEIconViewSearchLine::init( TQIconView *iconView ) { delete d; - d = new KIconViewSearchLinePrivate; + d = new TDEIconViewSearchLinePrivate; d->iconView = iconView; @@ -205,7 +205,7 @@ void KIconViewSearchLine::init( TQIconView *iconView ) setEnabled( false ); } -void KIconViewSearchLine::hideItem( TQIconViewItem *item ) +void TDEIconViewSearchLine::hideItem( TQIconViewItem *item ) { if ( ( item == NULL ) || ( d->iconView == NULL ) ) return; @@ -213,7 +213,7 @@ void KIconViewSearchLine::hideItem( TQIconViewItem *item ) item->setVisible(false); } -void KIconViewSearchLine::showItem( TQIconViewItem *item ) +void TDEIconViewSearchLine::showItem( TQIconViewItem *item ) { if ( d->iconView == NULL ) { @@ -229,14 +229,14 @@ void KIconViewSearchLine::showItem( TQIconViewItem *item ) /****************************************************************************** * Protected Slots * *****************************************************************************/ -void KIconViewSearchLine::queueSearch( const TQString &s ) +void TDEIconViewSearchLine::queueSearch( const TQString &s ) { d->queuedSearches++; d->search = s; TQTimer::singleShot( 200, this, TQT_SLOT( activateSearch() ) ); } -void KIconViewSearchLine::activateSearch() +void TDEIconViewSearchLine::activateSearch() { d->queuedSearches--; @@ -253,7 +253,7 @@ void KIconViewSearchLine::activateSearch() /****************************************************************************** * Private Slots * *****************************************************************************/ -void KIconViewSearchLine::iconViewDeleted() +void TDEIconViewSearchLine::iconViewDeleted() { d->iconView = NULL; setEnabled( false ); diff --git a/tdeui/kiconviewsearchline.h b/tdeui/kiconviewsearchline.h index cb28d04cd..cef09b3ea 100644 --- a/tdeui/kiconviewsearchline.h +++ b/tdeui/kiconviewsearchline.h @@ -35,33 +35,33 @@ class TQIconViewItem; * * @since 3.3 */ -class TDEUI_EXPORT KIconViewSearchLine : public KLineEdit +class TDEUI_EXPORT TDEIconViewSearchLine : public KLineEdit { Q_OBJECT public: /** - * Constructs a KIconViewSearchLine with \a iconView being the TQIconView to + * Constructs a TDEIconViewSearchLine 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( TQWidget *parent = 0, + TDEIconViewSearchLine( TQWidget *parent = 0, TQIconView *iconView = 0, const char *name = 0 ); /** - * Constructs a KIconViewSearchLine without any TQIconView to filter. The + * Constructs a TDEIconViewSearchLine without any TQIconView to filter. The * TQIconView object has to be set later with setIconView(). */ - KIconViewSearchLine( TQWidget *parent, const char *name ); + TDEIconViewSearchLine( TQWidget *parent, const char *name ); /** - * Destroys the KIconViewSearchLine. + * Destroys the TDEIconViewSearchLine. */ - virtual ~KIconViewSearchLine(); + virtual ~TDEIconViewSearchLine(); /** * Returns true if the search is case sensitive. This defaults to false. @@ -175,8 +175,8 @@ private slots: private: - class KIconViewSearchLinePrivate; - KIconViewSearchLinePrivate *d; + class TDEIconViewSearchLinePrivate; + TDEIconViewSearchLinePrivate *d; }; diff --git a/tdeui/kinputdialog.cpp b/tdeui/kinputdialog.cpp index 61b30cce1..a5a338422 100644 --- a/tdeui/kinputdialog.cpp +++ b/tdeui/kinputdialog.cpp @@ -29,7 +29,7 @@ #include <klineedit.h> #include <knuminput.h> #include <kcombobox.h> -#include <klistbox.h> +#include <tdelistbox.h> #include <ktextedit.h> #include "kinputdialog.h" @@ -44,7 +44,7 @@ class KInputDialogPrivate KIntSpinBox *m_intSpinBox; KDoubleSpinBox *m_doubleSpinBox; KComboBox *m_comboBox; - KListBox *m_listBox; + TDEListBox *m_listBox; KTextEdit *m_textEdit; }; @@ -187,7 +187,7 @@ KInputDialog::KInputDialog( const TQString &caption, const TQString &label, slotUpdateButtons( d->m_comboBox->currentText() ); d->m_comboBox->setFocus(); } else { - d->m_listBox = new KListBox( frame ); + d->m_listBox = new TDEListBox( frame ); d->m_listBox->insertStringList( list ); d->m_listBox->setSelected( current, true ); d->m_listBox->ensureCurrentVisible(); @@ -217,7 +217,7 @@ KInputDialog::KInputDialog( const TQString &caption, const TQString &label, d->m_label = new TQLabel( label, frame ); layout->addWidget( d->m_label ); - d->m_listBox = new KListBox( frame ); + d->m_listBox = new TDEListBox( frame ); d->m_listBox->insertStringList( list ); layout->addWidget( d->m_listBox ); @@ -456,7 +456,7 @@ KComboBox *KInputDialog::comboBox() const return d->m_comboBox; } -KListBox *KInputDialog::listBox() const +TDEListBox *KInputDialog::listBox() const { return d->m_listBox; } diff --git a/tdeui/kinputdialog.h b/tdeui/kinputdialog.h index f7326460d..7a039ac45 100644 --- a/tdeui/kinputdialog.h +++ b/tdeui/kinputdialog.h @@ -79,7 +79,7 @@ class TDEUI_EXPORT KInputDialog : public KDialogBase KIntSpinBox *intSpinBox() const; KDoubleSpinBox *doubleSpinBox() const; KComboBox *comboBox() const; - KListBox *listBox() const; + TDEListBox *listBox() const; KTextEdit *textEdit() const; private slots: diff --git a/tdeui/kjanuswidget.cpp b/tdeui/kjanuswidget.cpp index 4c291eda4..c3a8838e9 100644 --- a/tdeui/kjanuswidget.cpp +++ b/tdeui/kjanuswidget.cpp @@ -33,15 +33,15 @@ #include <tqpainter.h> #include <tqstyle.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kdialog.h> // Access to some static members -#include <klocale.h> -#include <kglobal.h> -#include <kglobalsettings.h> +#include <tdelocale.h> +#include <tdeglobal.h> +#include <tdeglobalsettings.h> #include <kseparator.h> #include <kdebug.h> #include "kjanuswidget.h" -#include <klistview.h> +#include <tdelistview.h> #include "kpushbutton.h" #include "kguiitem.h" @@ -110,7 +110,7 @@ KJanusWidget::KJanusWidget( TQWidget *parent, const char *name, int face ) d->mListFrame = new TQWidget( d->mSplitter ); TQVBoxLayout *dummy = new TQVBoxLayout( d->mListFrame, 0, KDialog::spacingHint() ); dummy->setAutoAdd( true ); - mTreeList = new KListView( d->mListFrame ); + mTreeList = new TDEListView( d->mListFrame ); mTreeList->addColumn( TQString::null ); mTreeList->header()->hide(); mTreeList->setRootIsDecorated(true); @@ -197,7 +197,7 @@ KJanusWidget::KJanusWidget( TQWidget *parent, const char *name, int face ) } if ( kapp ) - connect(kapp,TQT_SIGNAL(kdisplayFontChanged()),TQT_SLOT(slotFontChanged())); + connect(kapp,TQT_SIGNAL(tdedisplayFontChanged()),TQT_SLOT(slotFontChanged())); mValid = true; setSwallowedWidget(0); // Set default size if 'mFace' is Swallow. @@ -703,7 +703,7 @@ void KJanusWidget::slotFontChanged() { if( mTitleLabel ) { - mTitleLabel->setFont( KGlobalSettings::generalFont() ); + mTitleLabel->setFont( TDEGlobalSettings::generalFont() ); TQFont titleFont( mTitleLabel->font() ); titleFont.setBold( true ); mTitleLabel->setFont( titleFont ); @@ -939,7 +939,7 @@ bool KJanusWidget::eventFilter( TQObject *o, TQEvent *e ) KJanusWidget::IconListBox::IconListBox( TQWidget *parent, const char *name, WFlags f ) - :KListBox( parent, name, f ), mShowAll(false), mHeightValid(false), + :TDEListBox( parent, name, f ), mShowAll(false), mHeightValid(false), mWidthValid(false), mOldItem(0) { @@ -1008,7 +1008,7 @@ void KJanusWidget::IconListBox::setShowAll( bool showAll ) void KJanusWidget::IconListBox::leaveEvent( TQEvent *ev ) { - KListBox::leaveEvent( ev ); + TDEListBox::leaveEvent( ev ); if ( mOldItem && !mOldItem->isSelected() ) { @@ -1020,7 +1020,7 @@ void KJanusWidget::IconListBox::leaveEvent( TQEvent *ev ) // hack because qt does not support Q_OBJECT in nested classes void KJanusWidget::IconListBox::slotOnItem(TQListBoxItem *qitem) { - KListBox::slotOnItem( qitem ); + TDEListBox::slotOnItem( qitem ); if ( qitem == mOldItem ) { diff --git a/tdeui/kjanuswidget.h b/tdeui/kjanuswidget.h index 8cc0c667c..604765029 100644 --- a/tdeui/kjanuswidget.h +++ b/tdeui/kjanuswidget.h @@ -24,11 +24,11 @@ #include <tqpixmap.h> #include <tqsplitter.h> -#include <klistbox.h> +#include <tdelistbox.h> #include <tqstringlist.h> #include <tqmap.h> -class KListView; +class TDEListView; class TQGrid; class TQHBox; @@ -69,7 +69,7 @@ class TDEUI_EXPORT KJanusWidget : public TQWidget Q_OBJECT private: - class IconListBox : public KListBox + class IconListBox : public TDEListBox { friend class KJanusWidget; @@ -586,7 +586,7 @@ class TDEUI_EXPORT KJanusWidget : public TQWidget TQStringList *mTitleList; int mFace; - KListView *mTreeList; + TDEListView *mTreeList; IconListBox *mIconList; TQWidgetStack *mPageStack; TQLabel *mTitleLabel; diff --git a/tdeui/kkeybutton.cpp b/tdeui/kkeybutton.cpp index 6626a9a46..9b530b751 100644 --- a/tdeui/kkeybutton.cpp +++ b/tdeui/kkeybutton.cpp @@ -19,15 +19,15 @@ */ #include "kkeybutton.h" -#include "kshortcutdialog.h" +#include "tdeshortcutdialog.h" #include <tqcursor.h> #include <tqdrawutil.h> #include <tqpainter.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kdebug.h> #include <kglobalaccel.h> -#include <klocale.h> +#include <tdelocale.h> #include "config.h" #ifdef Q_WS_X11 @@ -72,7 +72,7 @@ KKeyButton::KKeyButton(TQWidget *parent, const char *name) setFocusPolicy( TQ_StrongFocus ); m_bEditing = false; connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(captureShortcut()) ); - setShortcut( KShortcut(), true ); + setShortcut( TDEShortcut(), true ); } KKeyButton::~KKeyButton () @@ -80,7 +80,7 @@ KKeyButton::~KKeyButton () delete d; } -void KKeyButton::setShortcut( const KShortcut& cut, bool bQtShortcut ) +void KKeyButton::setShortcut( const TDEShortcut& cut, bool bQtShortcut ) { d->bQtShortcut = bQtShortcut; m_cut = cut; @@ -90,7 +90,7 @@ void KKeyButton::setShortcut( const KShortcut& cut, bool bQtShortcut ) } // deprecated // -void KKeyButton::setShortcut( const KShortcut& cut ) +void KKeyButton::setShortcut( const TDEShortcut& cut ) { setShortcut( cut, false ); } @@ -103,13 +103,13 @@ void KKeyButton::setText( const TQString& text ) void KKeyButton::captureShortcut() { - KShortcut cut; + TDEShortcut cut; m_bEditing = true; repaint(); { - KShortcutDialog dlg( m_cut, d->bQtShortcut, this ); + TDEShortcutDialog dlg( m_cut, d->bQtShortcut, this ); if( dlg.exec() == KDialog::Accepted ) cut = dlg.shortcut(); } // emit the signal after the dialog is destroyed, otherwise it still has grab diff --git a/tdeui/kkeybutton.h b/tdeui/kkeybutton.h index 34f5f1ac9..889319884 100644 --- a/tdeui/kkeybutton.h +++ b/tdeui/kkeybutton.h @@ -21,7 +21,7 @@ #define _KKEYBUTTON_H_ #include <tqpushbutton.h> -#include <kshortcut.h> +#include <tdeshortcut.h> /** * @short A push button that looks like a keyboard key. @@ -52,10 +52,10 @@ class TDEUI_EXPORT KKeyButton: public TQPushButton virtual ~KKeyButton(); /** @deprecated Use setShortcut( cut, false ) instead */ - void setShortcut( const KShortcut& cut ) KDE_DEPRECATED; + void setShortcut( const TDEShortcut& cut ) KDE_DEPRECATED; /// @since 3.1 - void setShortcut( const KShortcut& cut, bool bQtShortcut ); - const KShortcut& shortcut() const + void setShortcut( const TDEShortcut& cut, bool bQtShortcut ); + const TDEShortcut& shortcut() const { return m_cut; } /** @@ -64,7 +64,7 @@ class TDEUI_EXPORT KKeyButton: public TQPushButton void setText( const TQString& text ); signals: - void capturedShortcut( const KShortcut& ); + void capturedShortcut( const TDEShortcut& ); public slots: /** @@ -74,7 +74,7 @@ class TDEUI_EXPORT KKeyButton: public TQPushButton void captureShortcut(); protected: - KShortcut m_cut; + TDEShortcut m_cut; bool m_bEditing; /** diff --git a/tdeui/kkeydialog.cpp b/tdeui/kkeydialog.cpp index 0518d870c..35fe0e45f 100644 --- a/tdeui/kkeydialog.cpp +++ b/tdeui/kkeydialog.cpp @@ -35,23 +35,23 @@ #include <tqtoolbutton.h> #include <tqwhatsthis.h> -#include <kaccel.h> -#include <kaction.h> -#include <kaccelaction.h> -#include <kactionshortcutlist.h> -#include <kapplication.h> -#include <kconfig.h> +#include <tdeaccel.h> +#include <tdeaction.h> +#include <tdeaccelaction.h> +#include <tdeactionshortcutlist.h> +#include <tdeapplication.h> +#include <tdeconfig.h> #include <kdebug.h> -#include <kglobal.h> +#include <tdeglobal.h> #include <kglobalaccel.h> #include <kiconloader.h> -#include <klistviewsearchline.h> -#include <klocale.h> -#include <kmessagebox.h> -#include <kshortcut.h> -#include <kshortcutlist.h> +#include <tdelistviewsearchline.h> +#include <tdelocale.h> +#include <tdemessagebox.h> +#include <tdeshortcut.h> +#include <tdeshortcutlist.h> #include <kxmlguifactory.h> -#include <kaboutdata.h> +#include <tdeaboutdata.h> #include <kstaticdeleter.h> #ifdef Q_WS_X11 @@ -77,32 +77,32 @@ const int XKeyRelease = KeyRelease; // KKeyChooserItem //--------------------------------------------------------------------- -class KKeyChooserItem : public KListViewItem +class KKeyChooserItem : public TDEListViewItem { public: - KKeyChooserItem( KListView* parent, TQListViewItem* after, KShortcutList* pList, uint iAction ); - KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, KShortcutList* pList, uint iAction ); + KKeyChooserItem( TDEListView* parent, TQListViewItem* after, TDEShortcutList* pList, uint iAction ); + KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, TDEShortcutList* pList, uint iAction ); TQString actionName() const; - const KShortcut& shortcut() const; + const TDEShortcut& shortcut() const; bool isConfigurable() const { return m_pList->isConfigurable( m_iAction ); } - const KShortcut& shortcutDefault() const + const TDEShortcut& shortcutDefault() const { return m_pList->shortcutDefault( m_iAction ); } TQString whatsThis() const { return m_pList->whatsThis( m_iAction ); } - void setShortcut( const KShortcut& cut ); + void setShortcut( const TDEShortcut& cut ); void commitChanges(); virtual TQString text( int iCol ) const; virtual int compare( TQListViewItem*, int iCol, bool bAscending ) const; protected: - KShortcutList* m_pList; + TDEShortcutList* m_pList; uint m_iAction; bool m_bModified; - KShortcut m_cut; + TDEShortcut m_cut; }; // WhatsThis on KKeyChooserItems @@ -126,16 +126,16 @@ private: class KKeyChooserPrivate { public: - TQValueList<KShortcutList*> rgpLists; - TQValueList<KShortcutList*> rgpListsAllocated; + TQValueList<TDEShortcutList*> rgpLists; + TQValueList<TDEShortcutList*> rgpListsAllocated; - KListView *pList; + TDEListView *pList; TQLabel *lInfo; KKeyButton *pbtnShortcut; TQGroupBox *fCArea; TQButtonGroup *kbGroup; - TQMap<TQString, KShortcut> mapGlobals; + TQMap<TQString, TDEShortcut> mapGlobals; // If this is set, then shortcuts require a modifier: // so 'A' would not be valid, whereas 'Ctrl+A' would be. @@ -157,35 +157,35 @@ KKeyChooser::KKeyChooser( TQWidget* parent, ActionType type, bool bAllowLetterSh initGUI( type, bAllowLetterShortcuts ); } -KKeyChooser::KKeyChooser( KActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts ) +KKeyChooser::KKeyChooser( TDEActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts ) : TQWidget( parent ) { initGUI( Application, bAllowLetterShortcuts ); insert( coll ); } -KKeyChooser::KKeyChooser( KAccel* pAccel, TQWidget* parent, bool bAllowLetterShortcuts ) +KKeyChooser::KKeyChooser( TDEAccel* pAccel, TQWidget* parent, bool bAllowLetterShortcuts ) : TQWidget( parent ) { initGUI( Application, bAllowLetterShortcuts ); insert( pAccel ); } -KKeyChooser::KKeyChooser( KGlobalAccel* pAccel, TQWidget* parent ) +KKeyChooser::KKeyChooser( TDEGlobalAccel* pAccel, TQWidget* parent ) : TQWidget( parent ) { initGUI( ApplicationGlobal, false ); insert( pAccel ); } -KKeyChooser::KKeyChooser( KShortcutList* pList, TQWidget* parent, ActionType type, bool bAllowLetterShortcuts ) +KKeyChooser::KKeyChooser( TDEShortcutList* pList, TQWidget* parent, ActionType type, bool bAllowLetterShortcuts ) : TQWidget( parent ) { initGUI( type, bAllowLetterShortcuts ); insert( pList ); } -KKeyChooser::KKeyChooser( KAccel* actions, TQWidget* parent, +KKeyChooser::KKeyChooser( TDEAccel* actions, TQWidget* parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey ) @@ -201,7 +201,7 @@ KKeyChooser::KKeyChooser( KAccel* actions, TQWidget* parent, insert( actions ); } -KKeyChooser::KKeyChooser( KGlobalAccel* actions, TQWidget* parent, +KKeyChooser::KKeyChooser( TDEGlobalAccel* actions, TQWidget* parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool /*bAllowWinKey*/ ) @@ -224,46 +224,46 @@ static KStaticDeleter< TQValueList< KKeyChooser* > > allChoosersDeleter; KKeyChooser::~KKeyChooser() { allChoosers->remove( this ); - // Delete allocated KShortcutLists + // Delete allocated TDEShortcutLists for( uint i = 0; i < d->rgpListsAllocated.count(); i++ ) delete d->rgpListsAllocated[i]; delete d; } -bool KKeyChooser::insert( KActionCollection *pColl) +bool KKeyChooser::insert( TDEActionCollection *pColl) { return insert(pColl, TQString::null); } -bool KKeyChooser::insert( KActionCollection* pColl, const TQString &title ) +bool KKeyChooser::insert( TDEActionCollection* pColl, const TQString &title ) { TQString str = title; if ( title.isEmpty() && pColl->instance() && pColl->instance()->aboutData() ) str = pColl->instance()->aboutData()->programName(); - KShortcutList* pList = new KActionShortcutList( pColl ); + TDEShortcutList* pList = new TDEActionShortcutList( pColl ); d->rgpListsAllocated.append( pList ); d->rgpLists.append( pList ); buildListView(d->rgpLists.count() - 1, str); return true; } -bool KKeyChooser::insert( KAccel* pAccel ) +bool KKeyChooser::insert( TDEAccel* pAccel ) { - KShortcutList* pList = new KAccelShortcutList( pAccel ); + TDEShortcutList* pList = new TDEAccelShortcutList( pAccel ); d->rgpListsAllocated.append( pList ); return insert( pList ); } -bool KKeyChooser::insert( KGlobalAccel* pAccel ) +bool KKeyChooser::insert( TDEGlobalAccel* pAccel ) { - KShortcutList* pList = new KAccelShortcutList( pAccel ); + TDEShortcutList* pList = new TDEAccelShortcutList( pAccel ); d->rgpListsAllocated.append( pList ); return insert( pList ); } -bool KKeyChooser::insert( KShortcutList* pList ) +bool KKeyChooser::insert( TDEShortcutList* pList ) { d->rgpLists.append( pList ); buildListView( d->rgpLists.count() - 1, TQString::null ); @@ -296,7 +296,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) m_type = type; d->bAllowLetterShortcuts = bAllowLetterShortcuts; - d->bPreferFourModifierKeys = KGlobalAccel::useFourModifierKeys(); + d->bPreferFourModifierKeys = TDEGlobalAccel::useFourModifierKeys(); // // TOP LAYOUT MANAGER @@ -323,7 +323,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) searchLayout->addWidget(clearSearch); TQLabel* slbl = new TQLabel(i18n("&Search:"), this); searchLayout->addWidget(slbl); - KListViewSearchLine* listViewSearch = new KListViewSearchLine(this); + TDEListViewSearchLine* listViewSearch = new TDEListViewSearchLine(this); searchLayout->addWidget(listViewSearch); slbl->setBuddy(listViewSearch); connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear())); @@ -343,7 +343,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) topLayout->addLayout( TQT_TQLAYOUT(stackLayout), 10 ); stackLayout->setRowStretch( 1, 10 ); // Only list will stretch - d->pList = new KListView( this ); + d->pList = new TDEListView( this ); listViewSearch->setListView(d->pList); // Plug into search line TQValueList<int> columns; columns.append(0); @@ -422,7 +422,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) d->pbtnShortcut = new KKeyButton(d->fCArea, "key"); d->pbtnShortcut->setEnabled( false ); - connect( d->pbtnShortcut, TQT_SIGNAL(capturedShortcut(const KShortcut&)), TQT_SLOT(capturedShortcut(const KShortcut&)) ); + connect( d->pbtnShortcut, TQT_SIGNAL(capturedShortcut(const TDEShortcut&)), TQT_SLOT(capturedShortcut(const TDEShortcut&)) ); grid->addRowSpacing( 1, d->pbtnShortcut->sizeHint().height() + 5 ); wtstr = i18n("Use this button to choose a new shortcut key. Once you click it, " @@ -460,15 +460,15 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) // Add all shortcuts to the list void KKeyChooser::buildListView( uint iList, const TQString &title ) { - KShortcutList* pList = d->rgpLists[iList]; - KActionShortcutList *pAList = dynamic_cast<KActionShortcutList*>(pList); + TDEShortcutList* pList = d->rgpLists[iList]; + TDEActionShortcutList *pAList = dynamic_cast<TDEActionShortcutList*>(pList); if( m_type == Global || m_type == ApplicationGlobal ) d->pList->setSorting( -1 ); - KListViewItem *pProgramItem, *pGroupItem = 0, *pParentItem, *pItem; + TDEListViewItem *pProgramItem, *pGroupItem = 0, *pParentItem, *pItem; TQString str = (title.isEmpty() ? i18n("Shortcuts") : title); - pParentItem = pProgramItem = pItem = new KListViewItem( d->pList, str ); + pParentItem = pProgramItem = pItem = new TDEListViewItem( d->pList, str ); pParentItem->setExpandable( true ); pParentItem->setOpen( true ); pParentItem->setSelectable( false ); @@ -477,7 +477,7 @@ void KKeyChooser::buildListView( uint iList, const TQString &title ) TQString sName = pList->name(iAction); kdDebug(125) << "Key: " << sName << endl; if( sName.startsWith( "Program:" ) ) { - pItem = new KListViewItem( d->pList, pProgramItem, pList->label(iAction) ); + pItem = new TDEListViewItem( d->pList, pProgramItem, pList->label(iAction) ); pItem->setSelectable( false ); pItem->setExpandable( true ); pItem->setOpen( true ); @@ -485,7 +485,7 @@ void KKeyChooser::buildListView( uint iList, const TQString &title ) delete pProgramItem; pProgramItem = pParentItem = pItem; } else if( sName.startsWith( "Group:" ) ) { - pItem = new KListViewItem( pProgramItem, pParentItem, pList->label(iAction) ); + pItem = new TDEListViewItem( pProgramItem, pParentItem, pList->label(iAction) ); pItem->setSelectable( false ); pItem->setExpandable( true ); pItem->setOpen( true ); @@ -520,11 +520,11 @@ void KKeyChooser::updateButtons() m_prbDef->setEnabled( false ); m_prbCustom->setEnabled( false ); d->pbtnShortcut->setEnabled( false ); - d->pbtnShortcut->setShortcut( KShortcut(), false ); + d->pbtnShortcut->setShortcut( TDEShortcut(), false ); } else { bool bConfigurable = pItem->isConfigurable(); bool bQtShortcut = (m_type == Application || m_type == Standard); - const KShortcut& cutDef = pItem->shortcutDefault(); + const TDEShortcut& cutDef = pItem->shortcutDefault(); // Set key strings TQString keyStrCfg = pItem->shortcut().toString(); @@ -558,7 +558,7 @@ void KKeyChooser::slotNoKey() KKeyChooserItem* pItem = dynamic_cast<KKeyChooserItem*>( d->pList->currentItem() ); if( pItem ) { //kdDebug(125) << "no Key" << d->pList->currentItem()->text(0) << endl; - pItem->setShortcut( KShortcut() ); + pItem->setShortcut( TDEShortcut() ); updateButtons(); emit keyChange(); } @@ -585,17 +585,17 @@ void KKeyChooser::readGlobalKeys() readGlobalKeys( d->mapGlobals ); } -void KKeyChooser::readGlobalKeys( TQMap< TQString, KShortcut >& map ) +void KKeyChooser::readGlobalKeys( TQMap< TQString, TDEShortcut >& map ) { - TQMap<TQString, TQString> mapEntry = KGlobal::config()->entryMap( "Global Shortcuts" ); + TQMap<TQString, TQString> mapEntry = TDEGlobal::config()->entryMap( "Global Shortcuts" ); TQMap<TQString, TQString>::Iterator it( mapEntry.begin() ); for( uint i = 0; it != mapEntry.end(); ++it, i++ ) - map[it.key()] = KShortcut(*it); + map[it.key()] = TDEShortcut(*it); } void KKeyChooser::slotSettingsChanged( int category ) { - if( category == KApplication::SETTINGS_SHORTCUTS ) + if( category == TDEApplication::SETTINGS_SHORTCUTS ) readGlobalKeys(); // reread } @@ -649,7 +649,7 @@ void KKeyChooser::setPreferFourModifierKeys( bool bPreferFourModifierKeys ) d->bPreferFourModifierKeys = bPreferFourModifierKeys; } -void KKeyChooser::capturedShortcut( const KShortcut& cut ) +void KKeyChooser::capturedShortcut( const TDEShortcut& cut ) { if( cut.isNull() ) slotNoKey(); @@ -665,7 +665,7 @@ void KKeyChooser::listSync() if( d->pColl ) { // TODO: This is very inefficient. Come up with something better. - KAccelActions aa; + TDEAccelActions aa; d->pColl->createKeyMap( aa ); d->actionsNew.updateShortcuts( aa ); } else if( d->pActionsOrig ) { @@ -675,12 +675,12 @@ void KKeyChooser::listSync() }*/ } -void KKeyChooser::syncToConfig( const TQString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset ) +void KKeyChooser::syncToConfig( const TQString& sConfigGroup, TDEConfigBase* pConfig, bool bClearUnset ) { kdDebug(125) << "KKeyChooser::syncToConfig( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl; if( !pConfig ) - pConfig = KGlobal::config(); - KConfigGroupSaver cgs( pConfig, sConfigGroup ); + pConfig = TDEGlobal::config(); + TDEConfigGroupSaver cgs( pConfig, sConfigGroup ); TQListViewItemIterator it( d->pList ); for( ; it.current(); ++it ) { @@ -699,7 +699,7 @@ void KKeyChooser::syncToConfig( const TQString& sConfigGroup, KConfigBase* pConf kdDebug(125) << "KKeyChooser::syncToConfig() done" << endl; } -void KKeyChooser::setShortcut( const KShortcut& cut ) +void KKeyChooser::setShortcut( const TDEShortcut& cut ) { kdDebug(125) << "KKeyChooser::setShortcut( " << cut.toString() << " )" << endl; KKeyChooserItem* pItem = dynamic_cast<KKeyChooserItem*>(d->pList->currentItem()); @@ -732,7 +732,7 @@ void KKeyChooser::setShortcut( const KShortcut& cut ) // Returns iSeq index if cut2 has a sequence of equal or higher priority to a sequence in cut. // else -1 -static int keyConflict( const KShortcut& cut, const KShortcut& cut2 ) +static int keyConflict( const TDEShortcut& cut, const TDEShortcut& cut2 ) { for( uint iSeq = 0; iSeq < cut.count(); iSeq++ ) { for( uint iSeq2 = 0; iSeq2 < cut2.count(); iSeq2++ ) { @@ -744,13 +744,13 @@ static int keyConflict( const KShortcut& cut, const KShortcut& cut2 ) } // Removes the sequences in cut2 from cut1 -static void removeFromShortcut( KShortcut & cut1, const KShortcut &cut2) +static void removeFromShortcut( TDEShortcut & cut1, const TDEShortcut &cut2) { for( uint iSeq2 = 0; iSeq2 < cut2.count(); iSeq2++ ) cut1.remove(cut2.seq(iSeq2)); } -bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser ) +bool KKeyChooser::isKeyPresent( const TDEShortcut& cut, bool bWarnUser ) { KKeyChooserItem* pItem = dynamic_cast<KKeyChooserItem*>(d->pList->currentItem()); @@ -796,12 +796,12 @@ bool KKeyChooser::isKeyPresent( const KShortcut& cut, bool bWarnUser ) } // KDE4 remove -bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText ) +bool KKeyChooser::isKeyPresentLocally( const TDEShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText ) { return isKeyPresentLocally( cut, ignoreItem, !warnText.isNull()); } -bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser ) +bool KKeyChooser::isKeyPresentLocally( const TDEShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser ) { if ( cut.toString().isEmpty()) return false; @@ -816,7 +816,7 @@ bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ig if( !promptForReassign( cut.seq(iSeq), pItem2->text(0), Application, this )) return true; // else remove the shortcut from it - KShortcut cut2 = pItem2->shortcut(); + TDEShortcut cut2 = pItem2->shortcut(); removeFromShortcut(cut2, cut); pItem2->setShortcut(cut2); updateButtons(); @@ -828,35 +828,35 @@ bool KKeyChooser::isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ig return false; } -bool KKeyChooser::checkStandardShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent ) +bool KKeyChooser::checkStandardShortcutsConflict( const TDEShortcut& cut, bool bWarnUser, TQWidget* parent ) { // For each key sequence in the shortcut, for( uint i = 0; i < cut.count(); i++ ) { const KKeySequence& seq = cut.seq(i); - KStdAccel::StdAccel id = KStdAccel::findStdAccel( seq ); - if( id != KStdAccel::AccelNone - && keyConflict( cut, KStdAccel::shortcut( id ) ) > -1 ) { + TDEStdAccel::StdAccel id = TDEStdAccel::findStdAccel( seq ); + if( id != TDEStdAccel::AccelNone + && keyConflict( cut, TDEStdAccel::shortcut( id ) ) > -1 ) { if( bWarnUser ) { - if( !promptForReassign( seq, KStdAccel::label(id), Standard, parent )) + if( !promptForReassign( seq, TDEStdAccel::label(id), Standard, parent )) return true; - removeStandardShortcut( KStdAccel::label(id), dynamic_cast< KKeyChooser* > ( parent ), KStdAccel::shortcut( id ), cut); + removeStandardShortcut( TDEStdAccel::label(id), dynamic_cast< KKeyChooser* > ( parent ), TDEStdAccel::shortcut( id ), cut); } } } return false; } -bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent ) +bool KKeyChooser::checkGlobalShortcutsConflict( const TDEShortcut& cut, bool bWarnUser, TQWidget* parent ) { - TQMap< TQString, KShortcut > map; + TQMap< TQString, TDEShortcut > map; readGlobalKeys( map ); return checkGlobalShortcutsConflict( cut, bWarnUser, parent, map, TQString::null ); } -bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent, - const TQMap< TQString, KShortcut >& map, const TQString& ignoreAction ) +bool KKeyChooser::checkGlobalShortcutsConflict( const TDEShortcut& cut, bool bWarnUser, TQWidget* parent, + const TQMap< TQString, TDEShortcut >& map, const TQString& ignoreAction ) { - TQMap<TQString, KShortcut>::ConstIterator it; + TQMap<TQString, TDEShortcut>::ConstIterator it; for( it = map.begin(); it != map.end(); ++it ) { int iSeq = keyConflict( cut, (*it) ); if( iSeq > -1 ) { @@ -872,7 +872,7 @@ bool KKeyChooser::checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarn return false; } -void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut ) +void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const TDEShortcut &origCut, const TDEShortcut &cut ) { bool was_in_choosers = false; if( allChoosers != NULL ) { @@ -885,8 +885,8 @@ void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* cho } } if( !was_in_choosers ) { // not edited, needs to be changed in config file - KStdAccel::ShortcutList std_list; - KShortcut newCut = origCut; + TDEStdAccel::ShortcutList std_list; + TDEShortcut newCut = origCut; removeFromShortcut(newCut, cut); int index = std_list.index( name ); if ( index >= 0 ) { @@ -896,7 +896,7 @@ void KKeyChooser::removeStandardShortcut( const TQString& name, KKeyChooser* cho } } -void KKeyChooser::removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut ) +void KKeyChooser::removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const TDEShortcut &origCut, const TDEShortcut &cut ) { bool was_in_choosers = false; if( allChoosers != NULL ) { @@ -909,21 +909,21 @@ void KKeyChooser::removeGlobalShortcut( const TQString& name, KKeyChooser* choos } } if( !was_in_choosers ) { // not edited, needs to be changed in config file - KAccelActions actions; - KShortcut newCut = origCut; + TDEAccelActions actions; + TDEShortcut newCut = origCut; removeFromShortcut(newCut, cut); actions.insert( name, "", "", newCut, newCut); actions.writeActions( "Global Shortcuts", 0, true, true ); } } -bool KKeyChooser::removeShortcut( const TQString& name, const KShortcut &cut ) +bool KKeyChooser::removeShortcut( const TQString& name, const TDEShortcut &cut ) { for( TQListViewItemIterator it( d->pList ); it.current(); ++it ) { KKeyChooserItem* pItem2 = dynamic_cast<KKeyChooserItem*>(it.current()); if( pItem2 && pItem2->actionName() == name ) { // remove the shortcut from it - KShortcut cut2 = pItem2->shortcut(); + TDEShortcut cut2 = pItem2->shortcut(); removeFromShortcut(cut2, cut); pItem2->setShortcut(cut2); updateButtons(); @@ -978,8 +978,8 @@ bool KKeyChooser::promptForReassign( const KKeySequence& cut, const TQString& sA } //--------------------------------------------------- -KKeyChooserItem::KKeyChooserItem( KListView* parent, TQListViewItem* after, KShortcutList* pList, uint iAction ) -: KListViewItem( parent, after ) +KKeyChooserItem::KKeyChooserItem( TDEListView* parent, TQListViewItem* after, TDEShortcutList* pList, uint iAction ) +: TDEListViewItem( parent, after ) { m_pList = pList; m_iAction = iAction; @@ -987,8 +987,8 @@ KKeyChooserItem::KKeyChooserItem( KListView* parent, TQListViewItem* after, KSho m_cut = m_pList->shortcut(m_iAction); } -KKeyChooserItem::KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, KShortcutList* pList, uint iAction ) -: KListViewItem( parent, after ) +KKeyChooserItem::KKeyChooserItem( TQListViewItem* parent, TQListViewItem* after, TDEShortcutList* pList, uint iAction ) +: TDEListViewItem( parent, after ) { m_pList = pList; m_iAction = iAction; @@ -1001,12 +1001,12 @@ TQString KKeyChooserItem::actionName() const return m_pList->name(m_iAction); } -const KShortcut& KKeyChooserItem::shortcut() const +const TDEShortcut& KKeyChooserItem::shortcut() const { return m_cut; } -void KKeyChooserItem::setShortcut( const KShortcut& cut ) +void KKeyChooserItem::setShortcut( const TDEShortcut& cut ) { m_cut = cut; m_bModified = (m_cut != m_pList->shortcut(m_iAction)); @@ -1094,7 +1094,7 @@ KKeyDialog::KKeyDialog( KKeyChooser::ActionType type, bool bAllowLetterShortcuts setMainWidget( m_pKeyChooser ); connect( this, TQT_SIGNAL(defaultClicked()), m_pKeyChooser, TQT_SLOT(allDefault()) ); - KConfigGroup group( KGlobal::config(), "KKeyDialog Settings" ); + TDEConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); TQSize sz = size(); resize( group.readSizeEntry( "Dialog Size", &sz ) ); } @@ -1106,23 +1106,23 @@ KKeyDialog::KKeyDialog( bool bAllowLetterShortcuts, TQWidget *parent, const char setMainWidget( m_pKeyChooser ); connect( this, TQT_SIGNAL(defaultClicked()), m_pKeyChooser, TQT_SLOT(allDefault()) ); - KConfigGroup group( KGlobal::config(), "KKeyDialog Settings" ); + TDEConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); TQSize sz = size(); resize( group.readSizeEntry( "Dialog Size", &sz ) ); } KKeyDialog::~KKeyDialog() { - KConfigGroup group( KGlobal::config(), "KKeyDialog Settings" ); + TDEConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); group.writeEntry( "Dialog Size", size(), true, true ); } -bool KKeyDialog::insert( KActionCollection* pColl ) +bool KKeyDialog::insert( TDEActionCollection* pColl ) { return m_pKeyChooser->insert( pColl ); } -bool KKeyDialog::insert(KActionCollection *pColl, const TQString &title) +bool KKeyDialog::insert(TDEActionCollection *pColl, const TQString &title) { return m_pKeyChooser->insert(pColl, title); } @@ -1144,22 +1144,22 @@ void KKeyDialog::commitChanges() m_pKeyChooser->commitChanges(); } -int KKeyDialog::configure( KActionCollection* coll, TQWidget* parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEActionCollection* coll, TQWidget* parent, bool bSaveSettings ) { return configure( coll, true, parent, bSaveSettings); } -int KKeyDialog::configure( KAccel* keys, TQWidget* parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEAccel* keys, TQWidget* parent, bool bSaveSettings ) { return configure( keys, true, parent, bSaveSettings); } -int KKeyDialog::configure( KGlobalAccel* keys, TQWidget* parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEGlobalAccel* keys, TQWidget* parent, bool bSaveSettings ) { return configure( keys, true, parent, bSaveSettings); } -int KKeyDialog::configure( KAccel* keys, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEAccel* keys, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) { KKeyDialog dlg( bAllowLetterShortcuts, parent ); dlg.m_pKeyChooser->insert( keys ); @@ -1169,7 +1169,7 @@ int KKeyDialog::configure( KAccel* keys, bool bAllowLetterShortcuts, TQWidget *p return b; } -int KKeyDialog::configure( KGlobalAccel* keys, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEGlobalAccel* keys, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) { KKeyDialog dlg( KKeyChooser::ApplicationGlobal, bAllowLetterShortcuts, parent ); dlg.m_pKeyChooser->insert( keys ); @@ -1179,18 +1179,18 @@ int KKeyDialog::configure( KGlobalAccel* keys, bool bAllowLetterShortcuts, TQWid return b; } -int KKeyDialog::configure( KActionCollection* coll, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) +int KKeyDialog::configure( TDEActionCollection* coll, bool bAllowLetterShortcuts, TQWidget *parent, bool bSaveSettings ) { - kdDebug(125) << "KKeyDialog::configureKeys( KActionCollection*, " << bSaveSettings << " )" << endl; + kdDebug(125) << "KKeyDialog::configureKeys( TDEActionCollection*, " << bSaveSettings << " )" << endl; KKeyDialog dlg( bAllowLetterShortcuts, parent ); dlg.m_pKeyChooser->insert( coll ); return dlg.configure( bSaveSettings ); } -/*int KKeyDialog::configure( KActionPtrList* coll, const TQString& file, TQWidget *parent, bool bSaveSettings ) +/*int KKeyDialog::configure( TDEActionPtrList* coll, const TQString& file, TQWidget *parent, bool bSaveSettings ) { - kdDebug(125) << "KKeyDialog::configureKeys( KActionCollection*, " << file << ", " << bSaveSettings << " )" << endl; - KAccelActions actions; + kdDebug(125) << "KKeyDialog::configureKeys( TDEActionCollection*, " << file << ", " << bSaveSettings << " )" << endl; + TDEAccelActions actions; coll->createKeyMap( actions ); int retcode = configure( actions, file, parent, bSaveSettings ); diff --git a/tdeui/kkeydialog.h b/tdeui/kkeydialog.h index 4df3e2ecd..af395682e 100644 --- a/tdeui/kkeydialog.h +++ b/tdeui/kkeydialog.h @@ -23,7 +23,7 @@ #include <tqdict.h> #include <kdialogbase.h> -#include <klistview.h> +#include <tdelistview.h> class TQButtonGroup; class TQCheckBox; @@ -31,21 +31,21 @@ class TQGroupBox; class TQLabel; class TQLineEdit; class TQRadioButton; -class KAccel; -class KAccelActions; -class KActionCollection; -class KConfigBase; -class KGlobalAccel; +class TDEAccel; +class TDEAccelActions; +class TDEActionCollection; +class TDEConfigBase; +class TDEGlobalAccel; class KKeySequence; -class KShortcut; -class KShortcutList; +class TDEShortcut; +class TDEShortcutList; class KKeyChooserItem; /** - * @short Widget for configuration of KAccel and KGlobalAccel. + * @short Widget for configuration of TDEAccel and TDEGlobalAccel. * - * Configure dictionaries of key/action associations for KAccel and - * KGlobalAccel. + * Configure dictionaries of key/action associations for TDEAccel and + * TDEGlobalAccel. * * The class takes care of all aspects of configuration, including * handling key conflicts internally. Connect to the allDefault() @@ -73,15 +73,15 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget /** * \overload * @param parent parent widget - * @param coll the KActionCollection to configure + * @param coll the TDEActionCollection to configure * @param bAllowLetterShortcuts Set to false if unmodified alphanumeric * keys ('A', '1', etc.) are not permissible shortcuts. */ - KKeyChooser( KActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts = true ); + KKeyChooser( TDEActionCollection* coll, TQWidget* parent, bool bAllowLetterShortcuts = true ); - KKeyChooser( KAccel* actions, TQWidget* parent, bool bAllowLetterShortcuts = true ); - KKeyChooser( KGlobalAccel* actions, TQWidget* parent ); - KKeyChooser( KShortcutList*, TQWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true ); + KKeyChooser( TDEAccel* actions, TQWidget* parent, bool bAllowLetterShortcuts = true ); + KKeyChooser( TDEGlobalAccel* actions, TQWidget* parent ); + KKeyChooser( TDEShortcutList*, TQWidget* parent, ActionType type = Application, bool bAllowLetterShortcuts = true ); virtual ~KKeyChooser(); @@ -89,16 +89,16 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget * Insert an action collection, i.e. add all its actions to the ones * already associated with the KKeyChooser object. */ - bool insert( KActionCollection* ); // #### KDE4 : remove me + bool insert( TDEActionCollection* ); // #### KDE4 : remove me /** * Insert an action collection, i.e. add all its actions to the ones * already associated with the KKeyChooser object. * @param title subtree title of this collection of shortcut. * @since 3.1 */ - bool insert( KActionCollection *, const TQString &title); + bool insert( TDEActionCollection *, const TQString &title); - void syncToConfig( const TQString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset ); + void syncToConfig( const TQString& sConfigGroup, TDEConfigBase* pConfig, bool bClearUnset ); /** * This function writes any shortcut changes back to the original @@ -108,7 +108,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget /** * This commits and then saves the actions to disk. - * Any KActionCollection objects with the xmlFile() value set + * Any TDEActionCollection objects with the xmlFile() value set * will be written to an XML file. All other will be written * to the application's rc file. */ @@ -127,7 +127,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget * * @since 3.2 */ - static bool checkGlobalShortcutsConflict( const KShortcut& cut, bool warnUser, TQWidget* parent ); + static bool checkGlobalShortcutsConflict( const TDEShortcut& cut, bool warnUser, TQWidget* parent ); /** * Checks whether the given shortcut conflicts with standard keyboard shortcuts. @@ -142,7 +142,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget * * @since 3.2 */ - static bool checkStandardShortcutsConflict( const KShortcut& cut, bool warnUser, TQWidget* parent ); + static bool checkStandardShortcutsConflict( const TDEShortcut& cut, bool warnUser, TQWidget* parent ); signals: /** @@ -168,9 +168,9 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget enum { NoKey = 1, DefaultKey, CustomKey }; void initGUI( ActionType type, bool bAllowLetterShortcuts ); - bool insert( KAccel* ); - bool insert( KGlobalAccel* ); - bool insert( KShortcutList* ); + bool insert( TDEAccel* ); + bool insert( TDEGlobalAccel* ); + bool insert( TDEShortcutList* ); /// @since 3.1 void buildListView( uint iList, const TQString &title = TQString::null ); @@ -178,9 +178,9 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget void updateButtons(); void fontChange( const TQFont& _font ); - void setShortcut( const KShortcut& cut ); - bool isKeyPresent( const KShortcut& cut, bool warnuser = true ); - bool isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText ); + void setShortcut( const TDEShortcut& cut ); + bool isKeyPresent( const TDEShortcut& cut, bool warnuser = true ); + bool isKeyPresentLocally( const TDEShortcut& cut, KKeyChooserItem* ignoreItem, const TQString& warnText ); void _warning( const KKeySequence& seq, TQString sAction, TQString sTitle ); protected slots: @@ -188,7 +188,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget void slotDefaultKey(); void slotCustomKey(); void slotListItemSelected( TQListViewItem *item ); - void capturedShortcut( const KShortcut& cut ); + void capturedShortcut( const TDEShortcut& cut ); void slotSettingsChanged( int ); void slotListItemDoubleClicked ( TQListViewItem * ipoQListViewItem, const TQPoint & ipoQPoint, int c ); @@ -205,19 +205,19 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget TQRadioButton* m_prbCustom; private: - bool isKeyPresentLocally( const KShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser ); + bool isKeyPresentLocally( const TDEShortcut& cut, KKeyChooserItem* ignoreItem, bool bWarnUser ); static bool promptForReassign( const KKeySequence& cut, const TQString& sAction, ActionType action, TQWidget* parent ); // Remove the key sequences contained in cut from the standard shortcut @p name // which currently has @p origCut as shortcut. - static void removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut ); + static void removeStandardShortcut( const TQString& name, KKeyChooser* chooser, const TDEShortcut &origCut, const TDEShortcut &cut ); // Remove the key sequences contained in cut from the global shortcut @p name // which currently has @p origCut as shortcut. - static void removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const KShortcut &origCut, const KShortcut &cut ); - static void readGlobalKeys( TQMap< TQString, KShortcut >& map ); - static bool checkGlobalShortcutsConflict( const KShortcut& cut, bool bWarnUser, TQWidget* parent, - const TQMap< TQString, KShortcut >& map, const TQString& ignoreAction ); + static void removeGlobalShortcut( const TQString& name, KKeyChooser* chooser, const TDEShortcut &origCut, const TDEShortcut &cut ); + static void readGlobalKeys( TQMap< TQString, TDEShortcut >& map ); + static bool checkGlobalShortcutsConflict( const TDEShortcut& cut, bool bWarnUser, TQWidget* parent, + const TQMap< TQString, TDEShortcut >& map, const TQString& ignoreAction ); // Remove the key sequences contained in cut from this item - bool removeShortcut( const TQString& name, const KShortcut &cut ); + bool removeShortcut( const TQString& name, const TDEShortcut &cut ); private slots: void captureCurrentItem(); @@ -227,14 +227,14 @@ private slots: /** * @obsolete */ - KKeyChooser( KAccel* actions, TQWidget* parent, + KKeyChooser( TDEAccel* actions, TQWidget* parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey = false ); /** * @obsolete */ - KKeyChooser( KGlobalAccel* actions, TQWidget* parent, + KKeyChooser( TDEGlobalAccel* actions, TQWidget* parent, bool bCheckAgainstStdKeys, bool bAllowLetterShortcuts, bool bAllowWinKey = false ); @@ -256,14 +256,14 @@ private slots: typedef KKeyChooser KKeyChooser; /** - * @short Dialog for configuration of KActionCollection, KAccel, and KGlobalAccel. + * @short Dialog for configuration of TDEActionCollection, TDEAccel, and TDEGlobalAccel. * * The KKeyDialog class is used for configuring dictionaries of key/action - * associations for KActionCollection, KAccel, and KGlobalAccel. It uses the KKeyChooser widget + * associations for TDEActionCollection, TDEAccel, and TDEGlobalAccel. It uses the KKeyChooser widget * and offers buttons to set all keys to defaults and invoke on-line help. * * Several static methods are supplied which provide the most convenient interface - * to the dialog. The most common and most encouraged use is with KActionCollection. + * to the dialog. The most common and most encouraged use is with TDEActionCollection. * * \code * KKeyDialog::configure( actionCollection() ); @@ -296,7 +296,7 @@ public: * Simply call insert with the action collections of each one in turn. * @return true :) */ - bool insert( KActionCollection* ); // #### KDE4: remove me + bool insert( TDEActionCollection* ); // #### KDE4: remove me /** * Insert an action collection, i.e. add all its actions to the ones @@ -306,11 +306,11 @@ public: * Simply call insert with the action collections of each one in turn. * * @param title the title associated with the collection (if null, the - * KAboutData::progName() of the collection's instance is used) + * TDEAboutData::progName() of the collection's instance is used) * @return true :) * @since 3.1 */ - bool insert(KActionCollection *, const TQString &title); + bool insert(TDEActionCollection *, const TQString &title); /** * Run the dialog and call commitChanges() if @p bSaveSettings @@ -332,64 +332,64 @@ public: * the *uirc file which they were intially read from. * @return Accept if the dialog was closed with OK, Reject otherwise. */ - static int configure( KActionCollection* coll, TQWidget* parent = 0, bool bSaveSettings = true ); + static int configure( TDEActionCollection* coll, TQWidget* parent = 0, bool bSaveSettings = true ); /** * This is an overloaded member function, provided for convenience. * It behaves essentially like the above function, except that settings - * are saved to a *.rc file using KConfig. + * are saved to a *.rc file using TDEConfig. */ - static int configure( KAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true ); + static int configure( TDEAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true ); /** * This is an overloaded member function, provided for convenience. * It behaves essentially like the above function. */ - static int configure( KGlobalAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true ); + static int configure( TDEGlobalAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true ); /** * This is an overloaded member function, provided for convenience. * It behaves essentially like the above function. * - * @param coll the KActionCollection to configure + * @param coll the TDEActionCollection to configure * @param bAllowLetterShortcuts Set to false if unmodified alphanumeric * keys ('A', '1', etc.) are not permissible shortcuts. * @param parent the parent widget to attach to * @param bSaveSettings if true, the settings will also be saved back to * the *uirc file which they were intially read from. */ - static int configure( KActionCollection* coll, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true + static int configure( TDEActionCollection* coll, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true /** * This is an overloaded member function, provided for convenience. * It behaves essentially like the above function. **/ - static int configure( KAccel* keys, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true + static int configure( TDEAccel* keys, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true /** * This is an overloaded member function, provided for convenience. * It behaves essentially like the above function. **/ - static int configure( KGlobalAccel* keys, bool bAllowLetterShortcuts, TQWidget* parent = 0, bool bSaveSettings = true ); // BCI: merge with bAllowLetterShortcuts = true + static int configure( TDEGlobalAccel* 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, TQWidget* parent = 0 ) + static KDE_DEPRECATED int configureKeys( TDEAccel* keys, bool save_settings = true, TQWidget* parent = 0 ) { return configure( keys, parent, save_settings ); } /** * @deprecated Obsolete. * Please use KKeyDialog::configure instead */ - static KDE_DEPRECATED int configureKeys( KGlobalAccel* keys, bool save_settings = true, TQWidget* parent = 0 ) + static KDE_DEPRECATED int configureKeys( TDEGlobalAccel* 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 TQString& /*xmlfile*/, + static KDE_DEPRECATED int configureKeys( TDEActionCollection* coll, const TQString& /*xmlfile*/, bool save_settings = true, TQWidget* parent = 0 ) { return configure( coll, parent, save_settings ); } diff --git a/tdeui/kled.cpp b/tdeui/kled.cpp index dc245cd6f..6b29ac0ca 100644 --- a/tdeui/kled.cpp +++ b/tdeui/kled.cpp @@ -30,7 +30,7 @@ #include <tqpainter.h> #include <tqimage.h> #include <tqcolor.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kpixmapeffect.h> #include "kled.h" diff --git a/tdeui/klineedit.cpp b/tdeui/klineedit.cpp index bc667aaf0..588746ec1 100644 --- a/tdeui/klineedit.cpp +++ b/tdeui/klineedit.cpp @@ -29,18 +29,18 @@ #include <tqpainter.h> #include <tqtimer.h> -#include <kconfig.h> +#include <tdeconfig.h> #include <tqtooltip.h> #include <kcursor.h> -#include <klocale.h> -#include <kstdaccel.h> -#include <kpopupmenu.h> +#include <tdelocale.h> +#include <tdestdaccel.h> +#include <tdepopupmenu.h> #include <kdebug.h> -#include <kcompletionbox.h> +#include <tdecompletionbox.h> #include <kurl.h> #include <kurldrag.h> #include <kiconloader.h> -#include <kapplication.h> +#include <tdeapplication.h> #include "klineedit.h" #include "klineedit.moc" @@ -62,7 +62,7 @@ public: if ( !initialized ) { - KConfigGroup config( KGlobal::config(), "General" ); + TDEConfigGroup config( TDEGlobal::config(), "General" ); backspacePerformsCompletion = config.readBoolEntry( "Backspace performs completion", false ); initialized = true; @@ -93,7 +93,7 @@ public: int squeezedStart; BackgroundMode bgMode; TQString squeezedText; - KCompletionBox *completionBox; + TDECompletionBox *completionBox; TQString clickMessage; bool drawClickMsg:1; @@ -132,10 +132,10 @@ void KLineEdit::init() KCursor::setAutoHideCursor( this, true, true ); installEventFilter( this ); - KGlobalSettings::Completion mode = completionMode(); - d->autoSuggest = (mode == KGlobalSettings::CompletionMan || - mode == KGlobalSettings::CompletionPopupAuto || - mode == KGlobalSettings::CompletionAuto); + TDEGlobalSettings::Completion mode = completionMode(); + d->autoSuggest = (mode == TDEGlobalSettings::CompletionMan || + mode == TDEGlobalSettings::CompletionPopupAuto || + mode == TDEGlobalSettings::CompletionAuto); connect( this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotRestoreSelectionColors())); TQPalette p = palette(); @@ -147,31 +147,31 @@ void KLineEdit::init() d->drawClickMsg = false; } -void KLineEdit::setCompletionMode( KGlobalSettings::Completion mode ) +void KLineEdit::setCompletionMode( TDEGlobalSettings::Completion mode ) { - KGlobalSettings::Completion oldMode = completionMode(); + TDEGlobalSettings::Completion oldMode = completionMode(); - if ( oldMode != mode && (oldMode == KGlobalSettings::CompletionPopup || - oldMode == KGlobalSettings::CompletionPopupAuto ) && + if ( oldMode != mode && (oldMode == TDEGlobalSettings::CompletionPopup || + oldMode == TDEGlobalSettings::CompletionPopupAuto ) && d->completionBox && d->completionBox->isVisible() ) d->completionBox->hide(); // If the widgets echo mode is not Normal, no completion // feature will be enabled even if one is requested. if ( echoMode() != TQLineEdit::Normal ) - mode = KGlobalSettings::CompletionNone; // Override the request. + mode = TDEGlobalSettings::CompletionNone; // Override the request. if ( kapp && !kapp->authorize("lineedit_text_completion") ) - mode = KGlobalSettings::CompletionNone; + mode = TDEGlobalSettings::CompletionNone; - if ( mode == KGlobalSettings::CompletionPopupAuto || - mode == KGlobalSettings::CompletionAuto || - mode == KGlobalSettings::CompletionMan ) + if ( mode == TDEGlobalSettings::CompletionPopupAuto || + mode == TDEGlobalSettings::CompletionAuto || + mode == TDEGlobalSettings::CompletionMan ) d->autoSuggest = true; else d->autoSuggest = false; - KCompletionBase::setCompletionMode( mode ); + TDECompletionBase::setCompletionMode( mode ); } void KLineEdit::setCompletedText( const TQString& t, bool marked ) @@ -194,24 +194,24 @@ void KLineEdit::setCompletedText( const TQString& t, bool marked ) void KLineEdit::setCompletedText( const TQString& text ) { - KGlobalSettings::Completion mode = completionMode(); - bool marked = ( mode == KGlobalSettings::CompletionAuto || - mode == KGlobalSettings::CompletionMan || - mode == KGlobalSettings::CompletionPopup || - mode == KGlobalSettings::CompletionPopupAuto ); + TDEGlobalSettings::Completion mode = completionMode(); + bool marked = ( mode == TDEGlobalSettings::CompletionAuto || + mode == TDEGlobalSettings::CompletionMan || + mode == TDEGlobalSettings::CompletionPopup || + mode == TDEGlobalSettings::CompletionPopupAuto ); setCompletedText( text, marked ); } -void KLineEdit::rotateText( KCompletionBase::KeyBindingType type ) +void KLineEdit::rotateText( TDECompletionBase::KeyBindingType type ) { - KCompletion* comp = compObj(); + TDECompletion* comp = compObj(); if ( comp && - (type == KCompletionBase::PrevCompletionMatch || - type == KCompletionBase::NextCompletionMatch ) ) + (type == TDECompletionBase::PrevCompletionMatch || + type == TDECompletionBase::NextCompletionMatch ) ) { TQString input; - if (type == KCompletionBase::PrevCompletionMatch) + if (type == TDECompletionBase::PrevCompletionMatch) comp->previousMatch(); else comp->nextMatch(); @@ -225,16 +225,16 @@ void KLineEdit::rotateText( KCompletionBase::KeyBindingType type ) void KLineEdit::makeCompletion( const TQString& text ) { - KCompletion *comp = compObj(); - KGlobalSettings::Completion mode = completionMode(); + TDECompletion *comp = compObj(); + TDEGlobalSettings::Completion mode = completionMode(); - if ( !comp || mode == KGlobalSettings::CompletionNone ) + if ( !comp || mode == TDEGlobalSettings::CompletionNone ) return; // No completion object... TQString match = comp->makeCompletion( text ); - if ( mode == KGlobalSettings::CompletionPopup || - mode == KGlobalSettings::CompletionPopupAuto ) + if ( mode == TDEGlobalSettings::CompletionPopup || + mode == TDEGlobalSettings::CompletionPopupAuto ) { if ( match.isNull() ) { @@ -254,7 +254,7 @@ void KLineEdit::makeCompletion( const TQString& text ) if ( match.isNull() || match == text ) return; - if ( mode != KGlobalSettings::CompletionShell ) + if ( mode != TDEGlobalSettings::CompletionShell ) setUserSelection(false); if ( d->autoSuggest ) @@ -441,17 +441,17 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) { KKey key( e ); - if ( KStdAccel::copy().contains( key ) ) + if ( TDEStdAccel::copy().contains( key ) ) { copy(); return; } - else if ( KStdAccel::paste().contains( key ) ) + else if ( TDEStdAccel::paste().contains( key ) ) { paste(); return; } - else if ( KStdAccel::pasteSelection().contains( key ) ) + else if ( TDEStdAccel::pasteSelection().contains( key ) ) { TQString text = TQApplication::clipboard()->text( TQClipboard::Selection); insert( text ); @@ -459,22 +459,22 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) return; } - else if ( KStdAccel::cut().contains( key ) ) + else if ( TDEStdAccel::cut().contains( key ) ) { cut(); return; } - else if ( KStdAccel::undo().contains( key ) ) + else if ( TDEStdAccel::undo().contains( key ) ) { undo(); return; } - else if ( KStdAccel::redo().contains( key ) ) + else if ( TDEStdAccel::redo().contains( key ) ) { redo(); return; } - else if ( KStdAccel::deleteWordBack().contains( key ) ) + else if ( TDEStdAccel::deleteWordBack().contains( key ) ) { cursorWordBackward(true); if ( hasSelectedText() ) @@ -483,7 +483,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) e->accept(); return; } - else if ( KStdAccel::deleteWordForward().contains( key ) ) + else if ( TDEStdAccel::deleteWordForward().contains( key ) ) { // Workaround for QT bug where cursorWordForward(true); @@ -493,25 +493,25 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) e->accept(); return; } - else if ( KStdAccel::backwardWord().contains( key ) ) + else if ( TDEStdAccel::backwardWord().contains( key ) ) { cursorWordBackward(false); e->accept(); return; } - else if ( KStdAccel::forwardWord().contains( key ) ) + else if ( TDEStdAccel::forwardWord().contains( key ) ) { cursorWordForward(false); e->accept(); return; } - else if ( KStdAccel::beginningOfLine().contains( key ) ) + else if ( TDEStdAccel::beginningOfLine().contains( key ) ) { home(false); e->accept(); return; } - else if ( KStdAccel::endOfLine().contains( key ) ) + else if ( TDEStdAccel::endOfLine().contains( key ) ) { end(false); e->accept(); @@ -522,17 +522,17 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) // Filter key-events if EchoMode is normal and // completion mode is not set to CompletionNone if ( echoMode() == TQLineEdit::Normal && - completionMode() != KGlobalSettings::CompletionNone ) + completionMode() != TDEGlobalSettings::CompletionNone ) { KeyBindingMap keys = getKeyBindings(); - KGlobalSettings::Completion mode = completionMode(); + TDEGlobalSettings::Completion mode = completionMode(); bool noModifier = (e->state() == Qt::NoButton || e->state() == TQt::ShiftButton || e->state() == TQt::Keypad); - if ( (mode == KGlobalSettings::CompletionAuto || - mode == KGlobalSettings::CompletionPopupAuto || - mode == KGlobalSettings::CompletionMan) && noModifier ) + if ( (mode == TDEGlobalSettings::CompletionAuto || + mode == TDEGlobalSettings::CompletionPopupAuto || + mode == TDEGlobalSettings::CompletionMan) && noModifier ) { if ( !d->userSelection && hasSelectedText() && ( e->key() == Key_Right || e->key() == Key_Left ) && @@ -571,8 +571,8 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) } - if ( (mode == KGlobalSettings::CompletionAuto || - mode == KGlobalSettings::CompletionMan) && noModifier ) + if ( (mode == TDEGlobalSettings::CompletionAuto || + mode == TDEGlobalSettings::CompletionMan) && noModifier ) { TQString keycode = e->text(); if ( !keycode.isEmpty() && (keycode.unicode()->isPrint() || @@ -639,8 +639,8 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) } - else if (( mode == KGlobalSettings::CompletionPopup || - mode == KGlobalSettings::CompletionPopupAuto ) && + else if (( mode == TDEGlobalSettings::CompletionPopup || + mode == TDEGlobalSettings::CompletionPopupAuto ) && noModifier && !e->text().isEmpty() ) { TQString old_txt = text(); @@ -709,7 +709,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) } if ( (e->key() == Key_Backspace || e->key() == Key_Delete ) && - mode == KGlobalSettings::CompletionPopupAuto ) + mode == TDEGlobalSettings::CompletionPopupAuto ) d->autoSuggest=true; e->accept(); @@ -720,12 +720,12 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) return; } - else if ( mode == KGlobalSettings::CompletionShell ) + else if ( mode == TDEGlobalSettings::CompletionShell ) { // Handles completion. - KShortcut cut; + TDEShortcut cut; if ( keys[TextCompletion].isNull() ) - cut = KStdAccel::shortcut(KStdAccel::TextCompletion); + cut = TDEStdAccel::shortcut(TDEStdAccel::TextCompletion); else cut = keys[TextCompletion]; @@ -749,36 +749,36 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) } // handle rotation - if ( mode != KGlobalSettings::CompletionNone ) + if ( mode != TDEGlobalSettings::CompletionNone ) { // Handles previous match - KShortcut cut; + TDEShortcut cut; if ( keys[PrevCompletionMatch].isNull() ) - cut = KStdAccel::shortcut(KStdAccel::PrevCompletion); + cut = TDEStdAccel::shortcut(TDEStdAccel::PrevCompletion); else cut = keys[PrevCompletionMatch]; if ( cut.contains( key ) ) { if ( emitSignals() ) - emit textRotation( KCompletionBase::PrevCompletionMatch ); + emit textRotation( TDECompletionBase::PrevCompletionMatch ); if ( handleSignals() ) - rotateText( KCompletionBase::PrevCompletionMatch ); + rotateText( TDECompletionBase::PrevCompletionMatch ); return; } // Handles next match if ( keys[NextCompletionMatch].isNull() ) - cut = KStdAccel::shortcut(KStdAccel::NextCompletion); + cut = TDEStdAccel::shortcut(TDEStdAccel::NextCompletion); else cut = keys[NextCompletionMatch]; if ( cut.contains( key ) ) { if ( emitSignals() ) - emit textRotation( KCompletionBase::NextCompletionMatch ); + emit textRotation( TDECompletionBase::NextCompletionMatch ); if ( handleSignals() ) - rotateText( KCompletionBase::NextCompletionMatch ); + rotateText( TDECompletionBase::NextCompletionMatch ); return; } } @@ -786,9 +786,9 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) // substring completion if ( compObj() ) { - KShortcut cut; + TDEShortcut cut; if ( keys[SubstringCompletion].isNull() ) - cut = KStdAccel::shortcut(KStdAccel::SubstringCompletion); + cut = TDEStdAccel::shortcut(TDEStdAccel::SubstringCompletion); else cut = keys[SubstringCompletion]; @@ -893,22 +893,22 @@ TQPopupMenu *KLineEdit::createPopupMenu() subMenu->insertItem( i18n("Short Automatic"), ShortAutoCompletion ); subMenu->insertItem( i18n("Dropdown List && Automatic"), PopupAutoCompletion ); - subMenu->setAccel( KStdAccel::completion(), ShellCompletion ); + subMenu->setAccel( TDEStdAccel::completion(), ShellCompletion ); - KGlobalSettings::Completion mode = completionMode(); + TDEGlobalSettings::Completion mode = completionMode(); subMenu->setItemChecked( NoCompletion, - mode == KGlobalSettings::CompletionNone ); + mode == TDEGlobalSettings::CompletionNone ); subMenu->setItemChecked( ShellCompletion, - mode == KGlobalSettings::CompletionShell ); + mode == TDEGlobalSettings::CompletionShell ); subMenu->setItemChecked( PopupCompletion, - mode == KGlobalSettings::CompletionPopup ); + mode == TDEGlobalSettings::CompletionPopup ); subMenu->setItemChecked( AutoCompletion, - mode == KGlobalSettings::CompletionAuto ); + mode == TDEGlobalSettings::CompletionAuto ); subMenu->setItemChecked( ShortAutoCompletion, - mode == KGlobalSettings::CompletionMan ); + mode == TDEGlobalSettings::CompletionMan ); subMenu->setItemChecked( PopupAutoCompletion, - mode == KGlobalSettings::CompletionPopupAuto ); - if ( mode != KGlobalSettings::completionMode() ) + mode == TDEGlobalSettings::CompletionPopupAuto ); + if ( mode != TDEGlobalSettings::completionMode() ) { subMenu->insertSeparator(); subMenu->insertItem( i18n("Default"), Default ); @@ -925,30 +925,30 @@ TQPopupMenu *KLineEdit::createPopupMenu() void KLineEdit::completionMenuActivated( int id ) { - KGlobalSettings::Completion oldMode = completionMode(); + TDEGlobalSettings::Completion oldMode = completionMode(); switch ( id ) { case Default: - setCompletionMode( KGlobalSettings::completionMode() ); + setCompletionMode( TDEGlobalSettings::completionMode() ); break; case NoCompletion: - setCompletionMode( KGlobalSettings::CompletionNone ); + setCompletionMode( TDEGlobalSettings::CompletionNone ); break; case AutoCompletion: - setCompletionMode( KGlobalSettings::CompletionAuto ); + setCompletionMode( TDEGlobalSettings::CompletionAuto ); break; case ShortAutoCompletion: - setCompletionMode( KGlobalSettings::CompletionMan ); + setCompletionMode( TDEGlobalSettings::CompletionMan ); break; case ShellCompletion: - setCompletionMode( KGlobalSettings::CompletionShell ); + setCompletionMode( TDEGlobalSettings::CompletionShell ); break; case PopupCompletion: - setCompletionMode( KGlobalSettings::CompletionPopup ); + setCompletionMode( TDEGlobalSettings::CompletionPopup ); break; case PopupAutoCompletion: - setCompletionMode( KGlobalSettings::CompletionPopupAuto ); + setCompletionMode( TDEGlobalSettings::CompletionPopupAuto ); break; default: return; @@ -956,8 +956,8 @@ void KLineEdit::completionMenuActivated( int id ) if ( oldMode != completionMode() ) { - if ( (oldMode == KGlobalSettings::CompletionPopup || - oldMode == KGlobalSettings::CompletionPopupAuto ) && + if ( (oldMode == TDEGlobalSettings::CompletionPopup || + oldMode == TDEGlobalSettings::CompletionPopupAuto ) && d->completionBox && d->completionBox->isVisible() ) d->completionBox->hide(); emit completionModeChanged( completionMode() ); @@ -1080,7 +1080,7 @@ void KLineEdit::setURL( const KURL& url ) setText( url.prettyURL() ); } -void KLineEdit::setCompletionBox( KCompletionBox *box ) +void KLineEdit::setCompletionBox( TDECompletionBox *box ) { if ( d->completionBox ) return; @@ -1101,7 +1101,7 @@ void KLineEdit::setCompletionBox( KCompletionBox *box ) void KLineEdit::userCancelled(const TQString & cancelText) { - if ( completionMode() != KGlobalSettings::CompletionPopupAuto ) + if ( completionMode() != TDEGlobalSettings::CompletionPopupAuto ) { // TODO: this sets modified==false. But maybe it was true before... setText(cancelText); @@ -1124,13 +1124,13 @@ void KLineEdit::userCancelled(const TQString & cancelText) bool KLineEdit::overrideAccel (const TQKeyEvent* e) { - KShortcut scKey; + TDEShortcut scKey; KKey key( e ); KeyBindingMap keys = getKeyBindings(); if (keys[TextCompletion].isNull()) - scKey = KStdAccel::shortcut(KStdAccel::TextCompletion); + scKey = TDEStdAccel::shortcut(TDEStdAccel::TextCompletion); else scKey = keys[TextCompletion]; @@ -1138,7 +1138,7 @@ bool KLineEdit::overrideAccel (const TQKeyEvent* e) return true; if (keys[NextCompletionMatch].isNull()) - scKey = KStdAccel::shortcut(KStdAccel::NextCompletion); + scKey = TDEStdAccel::shortcut(TDEStdAccel::NextCompletion); else scKey = keys[NextCompletionMatch]; @@ -1146,7 +1146,7 @@ bool KLineEdit::overrideAccel (const TQKeyEvent* e) return true; if (keys[PrevCompletionMatch].isNull()) - scKey = KStdAccel::shortcut(KStdAccel::PrevCompletion); + scKey = TDEStdAccel::shortcut(TDEStdAccel::PrevCompletion); else scKey = keys[PrevCompletionMatch]; @@ -1154,27 +1154,27 @@ bool KLineEdit::overrideAccel (const TQKeyEvent* e) return true; // Override all the text manupilation accelerators... - if ( KStdAccel::copy().contains( key ) ) + if ( TDEStdAccel::copy().contains( key ) ) return true; - else if ( KStdAccel::paste().contains( key ) ) + else if ( TDEStdAccel::paste().contains( key ) ) return true; - else if ( KStdAccel::cut().contains( key ) ) + else if ( TDEStdAccel::cut().contains( key ) ) return true; - else if ( KStdAccel::undo().contains( key ) ) + else if ( TDEStdAccel::undo().contains( key ) ) return true; - else if ( KStdAccel::redo().contains( key ) ) + else if ( TDEStdAccel::redo().contains( key ) ) return true; - else if (KStdAccel::deleteWordBack().contains( key )) + else if (TDEStdAccel::deleteWordBack().contains( key )) return true; - else if (KStdAccel::deleteWordForward().contains( key )) + else if (TDEStdAccel::deleteWordForward().contains( key )) return true; - else if (KStdAccel::forwardWord().contains( key )) + else if (TDEStdAccel::forwardWord().contains( key )) return true; - else if (KStdAccel::backwardWord().contains( key )) + else if (TDEStdAccel::backwardWord().contains( key )) return true; - else if (KStdAccel::beginningOfLine().contains( key )) + else if (TDEStdAccel::beginningOfLine().contains( key )) return true; - else if (KStdAccel::endOfLine().contains( key )) + else if (TDEStdAccel::endOfLine().contains( key )) return true; if (d->completionBox && d->completionBox->isVisible ()) @@ -1259,19 +1259,19 @@ void KLineEdit::setCompletedItems( const TQStringList& items, bool autoSuggest ) } } -KCompletionBox * KLineEdit::completionBox( bool create ) +TDECompletionBox * KLineEdit::completionBox( bool create ) { if ( create && !d->completionBox ) { - setCompletionBox( new KCompletionBox( this, "completion box" ) ); + setCompletionBox( new TDECompletionBox( this, "completion box" ) ); d->completionBox->setFont(font()); } return d->completionBox; } -void KLineEdit::setCompletionObject( KCompletion* comp, bool hsig ) +void KLineEdit::setCompletionObject( TDECompletion* comp, bool hsig ) { - KCompletion *oldComp = compObj(); + TDECompletion *oldComp = compObj(); if ( oldComp && handleSignals() ) disconnect( oldComp, TQT_SIGNAL( matches( const TQStringList& )), this, TQT_SLOT( setCompletedItems( const TQStringList& ))); @@ -1280,7 +1280,7 @@ void KLineEdit::setCompletionObject( KCompletion* comp, bool hsig ) connect( comp, TQT_SIGNAL( matches( const TQStringList& )), this, TQT_SLOT( setCompletedItems( const TQStringList& ))); - KCompletionBase::setCompletionObject( comp, hsig ); + TDECompletionBase::setCompletionObject( comp, hsig ); } // TQWidget::create() turns off mouse-Tracking which would break auto-hiding @@ -1379,4 +1379,4 @@ TQString KLineEdit::clickMessage() const void KLineEdit::virtual_hook( int id, void* data ) -{ KCompletionBase::virtual_hook( id, data ); } +{ TDECompletionBase::virtual_hook( id, data ); } diff --git a/tdeui/klineedit.h b/tdeui/klineedit.h index fc1f4ba4a..82179fa05 100644 --- a/tdeui/klineedit.h +++ b/tdeui/klineedit.h @@ -35,7 +35,7 @@ class TQPopupMenu; -class KCompletionBox; +class TDECompletionBox; class KURL; /** @@ -63,7 +63,7 @@ class KURL; * * This widget by default creates a completion object when you invoke * the completionObject( bool ) member function for the first time or - * use setCompletionObject( KCompletion*, bool ) to assign your own + * use setCompletionObject( TDECompletion*, bool ) to assign your own * completion object. Additionally, to make this widget more functional, * KLineEdit will by default handle the text rotation and completion * events internally when a completion object is created through either one @@ -72,7 +72,7 @@ class KURL; * the above functions to false. * * The default key-bindings for completion and rotation is determined - * from the global settings in KStdAccel. These values, however, can + * from the global settings in TDEStdAccel. These values, however, can * be overridden locally by invoking @p setKeyBinding(). You can easily * revert these settings back to the default by simply calling * @p useGlobalSettings(). An alternate method would be to default @@ -80,9 +80,9 @@ class KURL; * second argument. * * 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. + * the completion mode will always be defaulted to TDEGlobalSettings::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 TQLineEdit::Normal, the + * cached in TDECompletion'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 @@ -97,7 +97,7 @@ class KURL; * * \code * KLineEdit *edit = new KLineEdit( this, "mywidget" ); - * KCompletion *comp = edit->completionObject(); + * TDECompletion *comp = edit->completionObject(); * // Connect to the return pressed signal - optional * connect(edit,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&))); * \endcode @@ -127,7 +127,7 @@ class KURL; * edit->setHandleSignals( false ); * * // Set your own key-bindings for a text completion mode. - * edit->setKeyBinding( KCompletionBase::TextCompletion, Qt::End ); + * edit->setKeyBinding( TDECompletionBase::TextCompletion, Qt::End ); * * // Hide the context (popup) menu * edit->setContextMenuEnabled( false ); @@ -142,7 +142,7 @@ class KURL; * @author Dawit Alemayehu <adawit@kde.org> */ -class TDEUI_EXPORT KLineEdit : public TQLineEdit, public KCompletionBase +class TDEUI_EXPORT KLineEdit : public TQLineEdit, public TDECompletionBase { friend class KComboBox; @@ -197,14 +197,14 @@ public: void cursorAtEnd() { end( false ); } /** - * Re-implemented from KCompletionBase for internal reasons. + * Re-implemented from TDECompletionBase for internal reasons. * * This function is re-implemented in order to make sure that * the EchoMode is acceptable before we set the completion mode. * - * See KCompletionBase::setCompletionMode + * See TDECompletionBase::setCompletionMode */ - virtual void setCompletionMode( KGlobalSettings::Completion mode ); + virtual void setCompletionMode( TDEGlobalSettings::Completion mode ); /** * Enables/disables the popup (context) menu. @@ -269,18 +269,18 @@ public: /** * @returns the completion-box, that is used in completion mode - * KGlobalSettings::CompletionPopup. + * TDEGlobalSettings::CompletionPopup. * This method will create a completion-box if none is there, yet. * * @param create Set this to false if you don't want the box to be created * i.e. to test if it is available. */ - KCompletionBox * completionBox( bool create = true ); + TDECompletionBox * completionBox( bool create = true ); /** * Reimplemented for internal reasons, the API is not affected. */ - virtual void setCompletionObject( KCompletion *, bool hsig = true ); + virtual void setCompletionObject( TDECompletion *, bool hsig = true ); /** * Reimplemented for internal reasons, the API is not affected. @@ -320,13 +320,13 @@ public: /** * Set the completion-box to be used in completion mode - * KGlobalSettings::CompletionPopup. + * TDEGlobalSettings::CompletionPopup. * This will do nothing if a completion-box already exists. * - * @param box The KCompletionBox to set + * @param box The TDECompletionBox to set * @since 3.4 */ - void setCompletionBox( KCompletionBox *box ); + void setCompletionBox( TDECompletionBox *box ); /** * This makes the line edit display a grayed-out hinting text as long as @@ -382,16 +382,16 @@ signals: * @p setKeyBinding for details. * * Note that this signal is @em not emitted if the completion - * mode is set to @p KGlobalSettings::CompletionNone or + * mode is set to @p TDEGlobalSettings::CompletionNone or * @p echoMode() is @em not normal. */ - void textRotation( KCompletionBase::KeyBindingType ); + void textRotation( TDECompletionBase::KeyBindingType ); /** * Emitted when the user changed the completion mode by using the * popupmenu. */ - void completionModeChanged( KGlobalSettings::Completion ); + void completionModeChanged( TDEGlobalSettings::Completion ); /** * Emitted before the context menu is displayed. @@ -424,10 +424,10 @@ public slots: * * @param type The key-binding invoked. */ - void rotateText( KCompletionBase::KeyBindingType type ); + void rotateText( TDECompletionBase::KeyBindingType type ); /** - * See KCompletionBase::setCompletedText. + * See TDECompletionBase::setCompletedText. */ virtual void setCompletedText( const TQString& ); diff --git a/tdeui/klineeditdlg.cpp b/tdeui/klineeditdlg.cpp index 9551fc1f6..8fc0a9a4f 100644 --- a/tdeui/klineeditdlg.cpp +++ b/tdeui/klineeditdlg.cpp @@ -27,8 +27,8 @@ #include <tqfiledialog.h> #include <kbuttonbox.h> -#include <klocale.h> -#include <kapplication.h> +#include <tdelocale.h> +#include <tdeapplication.h> #include <klineedit.h> #include <kstdguiitem.h> diff --git a/tdeui/knuminput.cpp b/tdeui/knuminput.cpp index 238eeee7a..40f87da29 100644 --- a/tdeui/knuminput.cpp +++ b/tdeui/knuminput.cpp @@ -44,8 +44,8 @@ #include <tqspinbox.h> #include <tqstyle.h> -#include <kglobal.h> -#include <klocale.h> +#include <tdeglobal.h> +#include <tdelocale.h> #include <kdebug.h> #include "kdialog.h" @@ -1129,7 +1129,7 @@ void KDoubleSpinBox::setLineStep( double step ) { TQString KDoubleSpinBox::mapValueToText( int value ) { if ( acceptLocalizedNumbers() ) - return KGlobal::locale() + return TDEGlobal::locale() ->formatNumber( d->mapToDouble( value ), d->mPrecision ); else return TQString().setNum( d->mapToDouble( value ), 'f', d->mPrecision ); @@ -1138,7 +1138,7 @@ TQString KDoubleSpinBox::mapValueToText( int value ) { int KDoubleSpinBox::mapTextToValue( bool * ok ) { double value; if ( acceptLocalizedNumbers() ) - value = KGlobal::locale()->readNumber( cleanText(), ok ); + value = TDEGlobal::locale()->readNumber( cleanText(), ok ); else value = cleanText().toDouble( ok ); if ( !*ok ) return 0; diff --git a/tdeui/knuminput.h b/tdeui/knuminput.h index 9b7121e79..4716d8051 100644 --- a/tdeui/knuminput.h +++ b/tdeui/knuminput.h @@ -863,7 +863,7 @@ public: bool acceptLocalizedNumbers() const; /** Sets whether to use and accept localized numbers as returned by - KLocale::formatNumber() */ + TDELocale::formatNumber() */ virtual void setAcceptLocalizedNumbers( bool accept ); /** Sets a new range for the spin box values. Note that @p lower, @p diff --git a/tdeui/knumvalidator.cpp b/tdeui/knumvalidator.cpp index fdc51022c..6cf486ad1 100644 --- a/tdeui/knumvalidator.cpp +++ b/tdeui/knumvalidator.cpp @@ -26,8 +26,8 @@ #include <tqstring.h> #include "knumvalidator.h" -#include <klocale.h> -#include <kglobal.h> +#include <tdelocale.h> +#include <tdeglobal.h> #include <kdebug.h> /////////////////////////////////////////////////////////////// @@ -214,13 +214,13 @@ TQValidator::State KFloatValidator::validate ( TQString &str, int & ) const ok = false; else return TQValidator::Acceptable; - else if (newStr == TQString::fromLatin1(".") || (d->acceptLocalizedNumbers && newStr==KGlobal::locale()->decimalSymbol())) // another special case + else if (newStr == TQString::fromLatin1(".") || (d->acceptLocalizedNumbers && newStr==TDEGlobal::locale()->decimalSymbol())) // another special case return TQValidator::Acceptable; else if (newStr.length()) { val = newStr.toDouble(&ok); if(!ok && d->acceptLocalizedNumbers) - val= KGlobal::locale()->readNumber(newStr,&ok); + val= TDEGlobal::locale()->readNumber(newStr,&ok); } else { val = 0; @@ -326,7 +326,7 @@ void KDoubleValidator::setAcceptLocalizedNumbers( bool accept ) { TQValidator::State KDoubleValidator::validate( TQString & input, int & p ) const { TQString s = input; if ( acceptLocalizedNumbers() ) { - KLocale * l = KGlobal::locale(); + TDELocale * l = TDEGlobal::locale(); // ok, we have to re-format the number to have: // 1. decimalSymbol == '.' // 2. negativeSign == '-' diff --git a/tdeui/knumvalidator.h b/tdeui/knumvalidator.h index 8fa2ea76e..5c7b31484 100644 --- a/tdeui/knumvalidator.h +++ b/tdeui/knumvalidator.h @@ -147,7 +147,7 @@ class TDEUI_EXPORT KFloatValidator : public TQValidator { virtual double top () const; /** * Sets the validator to be locale aware if @p is true. In this case, the - * character KLocale::decimalSymbol() from the global locale is recognized + * character TDELocale::decimalSymbol() from the global locale is recognized * as decimal separator. */ void setAcceptLocalizedNumbers(bool b); @@ -169,8 +169,8 @@ class TDEUI_EXPORT KFloatValidator : public TQValidator { 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() + TDELocale::decimalSymbol(), TDELocale::thousandsSeparator() + and TDELocale::positiveSign() and TDELocale::negativeSign() are respected. @author Marc Mutz <mutz@kde.org> diff --git a/tdeui/kpanelapplet.cpp b/tdeui/kpanelapplet.cpp index 7ca2999f1..f88cb5a8a 100644 --- a/tdeui/kpanelapplet.cpp +++ b/tdeui/kpanelapplet.cpp @@ -25,8 +25,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "kpanelapplet.h" #include "kpanelapplet.moc" -#include <kapplication.h> -#include <kconfig.h> +#include <tdeapplication.h> +#include <tdeconfig.h> class KPanelApplet::KPanelAppletPrivate { @@ -37,7 +37,7 @@ public: {} const TQPopupMenu* customMenu; - KSharedConfig::Ptr sharedConfig; + TDESharedConfig::Ptr sharedConfig; TQPtrList<TQObject> watchedForFocus; bool hasFocus; }; @@ -60,7 +60,7 @@ KPanelApplet::KPanelApplet(const TQString& configFile, Type type, } setBackgroundOrigin( AncestorOrigin ); - d->sharedConfig = KSharedConfig::openConfig(configFile, kapp && kapp->config()->isImmutable()); + d->sharedConfig = TDESharedConfig::openConfig(configFile, kapp && kapp->config()->isImmutable()); _config = d->sharedConfig; } @@ -188,7 +188,7 @@ bool KPanelApplet::eventFilter(TQObject *o, TQEvent * e) return TQFrame::eventFilter(o, e); } -KSharedConfig::Ptr KPanelApplet::sharedConfig() const +TDESharedConfig::Ptr KPanelApplet::sharedConfig() const { return d->sharedConfig; } diff --git a/tdeui/kpanelapplet.h b/tdeui/kpanelapplet.h index 11af50f43..a8729e331 100644 --- a/tdeui/kpanelapplet.h +++ b/tdeui/kpanelapplet.h @@ -25,9 +25,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define __kpanelapplet_h__ #include <tqframe.h> -#include <kconfig.h> +#include <tdeconfig.h> -class KConfig; +class TDEConfig; class TQPopupMenu; /** @@ -55,7 +55,7 @@ class TQPopupMenu; * * \b X-TDE-UniqueApplet \n * - * Similar to KApplication and KUniqueApplication there are + * Similar to TDEApplication and KUniqueApplication there are * two types of panel applets. Use unique applets when it makes no * sence to run more than one instance of a applet in the panel. A * good example for unique applets is the taskbar applet. Use normal @@ -80,7 +80,7 @@ class TQPopupMenu; * { * KPanelApplet* init(TQWidget *parent, const TQString& configFile) * { - * KGlobal::locale()->insertCatalogue("exampleapplet"); + * TDEGlobal::locale()->insertCatalogue("exampleapplet"); * return new ExampleApplet(configFile, KPanelApplet::Normal, * KPanelApplet::About | KPanelApplet::Help | KPanelApplet::Preferences, * parent, "exampleapplet"); @@ -176,7 +176,7 @@ public: virtual int heightForWidth(int width) const { return width; } /** - * Always use this KConfig object to save/load your applet's configuration. + * Always use this TDEConfig object to save/load your applet's configuration. * * For unique applets this config object will write to a config file called * \<appletname\>rc in the user's local %KDE directory. @@ -184,8 +184,8 @@ public: * For normal applets this config object will write to a instance specific config file * called \<appletname\>\<instanceid\>rc in the user's local %KDE directory. **/ - KConfig* config() const { return _config; } - KSharedConfig::Ptr sharedConfig() const; + TDEConfig* config() const { return _config; } + TDESharedConfig::Ptr sharedConfig() const; /** * @return Type indicating the applet's type. @@ -384,7 +384,7 @@ private: Type _type; Position _position; Alignment _alignment; - KConfig* _config; + TDEConfig* _config; int _actions; protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdeui/kpanelappmenu.cpp b/tdeui/kpanelappmenu.cpp index 4cc77b5fe..247d844de 100644 --- a/tdeui/kpanelappmenu.cpp +++ b/tdeui/kpanelappmenu.cpp @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "kpanelappmenu.h" #include <tqstringlist.h> #include <dcopclient.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kdebug.h> static int panelmenu_get_seq_id() diff --git a/tdeui/kpanelextension.cpp b/tdeui/kpanelextension.cpp index 47ddd7d95..31fbd4343 100644 --- a/tdeui/kpanelextension.cpp +++ b/tdeui/kpanelextension.cpp @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqpopupmenu.h> -#include <kconfig.h> +#include <tdeconfig.h> #include "kpanelextension.h" #include "kpanelextension.moc" @@ -55,7 +55,7 @@ KPanelExtension::KPanelExtension(const TQString& configFile, Type type, { d = new KPanelExtensionPrivate; setFrameStyle(NoFrame); - _config = new KConfig(configFile); + _config = new TDEConfig(configFile); } KPanelExtension::~KPanelExtension() diff --git a/tdeui/kpanelextension.h b/tdeui/kpanelextension.h index fec6bd2ee..f97e85482 100644 --- a/tdeui/kpanelextension.h +++ b/tdeui/kpanelextension.h @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tdelibs_export.h> class TQPopupMenu; -class KConfig; +class TDEConfig; class KPanelExtensionPrivate; /** @@ -56,7 +56,7 @@ class KPanelExtensionPrivate; * * \b X-TDE-UniqueExtension \n * - * Similar to KApplication and KUniqueApplication there are + * Similar to TDEApplication and KUniqueApplication there are * two types of panel extensions. Use unique extensions when it makes no * sence to run more than one instance of an extension in the panel. A * good example for unique extensions is the taskbar extension. Use normal @@ -80,7 +80,7 @@ class KPanelExtensionPrivate; * { * KPanelExtension* init(TQWidget *parent, const TQString& configFile) * { - * KGlobal::locale()->insertCatalogue("exampleextension"); + * TDEGlobal::locale()->insertCatalogue("exampleextension"); * return new ExampleExtension(configFile, KPanelExtension::Normal, * KPanelExtension::About | KPanelExtension::Help | KPanelExtension::Preferences, * parent, "exampleextension"); @@ -139,7 +139,7 @@ public: virtual TQSize sizeHint(Position /*p*/, TQSize maxsize) const { return maxsize; } /** - * Always use this KConfig object to save/load your extensions configuration. + * Always use this TDEConfig object to save/load your extensions configuration. * * For unique extensions this config object will write to a config file called * \<extensionname\>rc in the users local KDE directory. @@ -147,7 +147,7 @@ public: * For normal extensions this config object will write to a instance specific config file * called \<extensionname\>\<instanceid\>rc in the users local KDE directory. **/ - KConfig* config() const { return _config; } + TDEConfig* config() const { return _config; } /** * @return Type indicating the extensions type. @@ -334,7 +334,7 @@ private: Type _type; Position _position; Alignment _alignment; - KConfig* _config; + TDEConfig* _config; int _actions; protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdeui/kpanelmenu.cpp b/tdeui/kpanelmenu.cpp index ed13502a4..287208b66 100644 --- a/tdeui/kpanelmenu.cpp +++ b/tdeui/kpanelmenu.cpp @@ -22,13 +22,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include <kglobal.h> -#include <kconfig.h> +#include <tdeglobal.h> +#include <tdeconfig.h> #include <tqtimer.h> #include "kpanelmenu.h" #include "kpanelmenu.moc" -//#include "kaccelmanager.h" +//#include "tdeaccelmanager.h" class KPanelMenuPrivate @@ -41,13 +41,13 @@ public: }; KPanelMenu::KPanelMenu(const TQString &startDir, TQWidget *parent, const char *name) - : KPopupMenu(parent, name) + : TDEPopupMenu(parent, name) { init(startDir); } KPanelMenu::KPanelMenu(TQWidget *parent, const char *name) - : KPopupMenu(parent, name) + : TDEPopupMenu(parent, name) { init(); } @@ -63,11 +63,11 @@ void KPanelMenu::init(const TQString& path) connect(this, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow())); // setup cache timer - KConfig *config = KGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->setGroup("menus"); d->clearDelay = config->readNumEntry("MenuCacheTime", 60000); // 1 minute - //KAcceleratorManager::manage(this); + //TDEAcceleratorManager::manage(this); setKeyboardShortcutsEnabled(true); } @@ -154,5 +154,5 @@ void KPanelMenu::internalInitialize() } void KPanelMenu::virtual_hook( int id, void* data ) -{ KPopupMenu::virtual_hook( id, data ); } +{ TDEPopupMenu::virtual_hook( id, data ); } diff --git a/tdeui/kpanelmenu.h b/tdeui/kpanelmenu.h index 2e28010fb..03b700b82 100644 --- a/tdeui/kpanelmenu.h +++ b/tdeui/kpanelmenu.h @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define __KPANELMENU_H__ #include <tqstring.h> -#include <kpopupmenu.h> +#include <tdepopupmenu.h> #include <kgenericfactory.h> class KPanelMenuPrivate; @@ -50,7 +50,7 @@ class KPanelMenuPrivate; * * @author The kicker maintainers, Michael Goffioul <tdeprint@swing.be> */ -class TDEUI_EXPORT KPanelMenu : public KPopupMenu +class TDEUI_EXPORT KPanelMenu : public TDEPopupMenu { Q_OBJECT diff --git a/tdeui/kpartgui.dtd b/tdeui/kpartgui.dtd index a3cbb8121..4b36929e2 100644 --- a/tdeui/kpartgui.dtd +++ b/tdeui/kpartgui.dtd @@ -83,17 +83,17 @@ <!-- Defines both Standard and app-specific actions. An action can appear in a menu, a toolbar or in a menubar. Attributes: - - name of the action: this is matched with the KAction name. + - name of the action: this is matched with the TDEAction name. - group: this is used to control the placement of the action when merging e.g. a part, it matches the name of a DefineGroup in the mainwindow's rc file. - append: this is used to control the placement of the action during the merging with ui_standards.rc. This is mapped to MergeLocal tags there. Note that this feature is currently only available for the mainwindow, not for parts/plugins. - text, whatsThis, toolTip, shortText, shortcut, icon: all those are mapped - to KAction properties. + to TDEAction properties. --> <!ELEMENT Action EMPTY> -<!-- We defined only a few standard KAction properties here. Theoritically we can have +<!-- We defined only a few standard TDEAction properties here. Theoritically we can have any property here --> <!ATTLIST Action name CDATA #REQUIRED diff --git a/tdeui/kpassdlg.cpp b/tdeui/kpassdlg.cpp index 489e14d8f..64904c581 100644 --- a/tdeui/kpassdlg.cpp +++ b/tdeui/kpassdlg.cpp @@ -34,14 +34,14 @@ #include <tqptrdict.h> #include <tqtimer.h> -#include <kglobal.h> +#include <tdeglobal.h> #include <kdebug.h> -#include <kapplication.h> -#include <klocale.h> +#include <tdeapplication.h> +#include <tdelocale.h> #include <kiconloader.h> -#include <kmessagebox.h> -#include <kaboutdialog.h> -#include <kconfig.h> +#include <tdemessagebox.h> +#include <tdeaboutdialog.h> +#include <tdeconfig.h> #include <kstandarddirs.h> #include <kprogress.h> @@ -110,8 +110,8 @@ KPasswordEdit::KPasswordEdit(TQWidget *parent, const char *name) { init(); - KConfig* const cfg = KGlobal::config(); - KConfigGroupSaver saver(cfg, "Passwords"); + TDEConfig* const cfg = TDEGlobal::config(); + TDEConfigGroupSaver saver(cfg, "Passwords"); const TQString val = cfg->readEntry("EchoMode", "OneStar"); if (val == "ThreeStars") @@ -338,8 +338,8 @@ void KPasswordDialog::init() { m_Row = 0; - KConfig* const cfg = KGlobal::config(); - const KConfigGroupSaver saver(cfg, "Passwords"); + TDEConfig* const cfg = TDEGlobal::config(); + const TDEConfigGroupSaver saver(cfg, "Passwords"); bool def = ( qstrcmp( tqAppName(), "tdesu" ) == 0 ? defKeep : false ); if (m_Keep && cfg->readBoolEntry("Keep", def)) ++m_Keep; @@ -351,7 +351,7 @@ void KPasswordDialog::init() // Row 1: pixmap + prompt TQLabel *lbl; - const TQPixmap pix( KGlobal::iconLoader()->loadIcon( d->iconName, KIcon::NoGroup, KIcon::SizeHuge, 0, 0, true)); + const TQPixmap pix( TDEGlobal::iconLoader()->loadIcon( d->iconName, TDEIcon::NoGroup, TDEIcon::SizeHuge, 0, 0, true)); if (!pix.isNull()) { lbl = new TQLabel(m_pMain); lbl->setPixmap(pix); diff --git a/tdeui/kpassivepopup.cpp b/tdeui/kpassivepopup.cpp index 1e86bc57f..ba3459b45 100644 --- a/tdeui/kpassivepopup.cpp +++ b/tdeui/kpassivepopup.cpp @@ -6,7 +6,7 @@ * email : sascha.cunz@tiscali.de */ -#include <kconfig.h> +#include <tdeconfig.h> #include <tqapplication.h> #include <tqlabel.h> @@ -22,7 +22,7 @@ #include <kdialog.h> #include <kpixmap.h> #include <kpixmapeffect.h> -#include <kglobalsettings.h> +#include <tdeglobalsettings.h> #include "config.h" #ifdef Q_WS_X11 @@ -300,7 +300,7 @@ void KPassivePopup::moveNear( TQRect target ) int w = width(); int h = height(); - TQRect r = KGlobalSettings::desktopGeometry(TQPoint(x+w/2,y+h/2)); + TQRect r = TDEGlobalSettings::desktopGeometry(TQPoint(x+w/2,y+h/2)); if( d->popupStyle == Balloon ) { @@ -359,7 +359,7 @@ void KPassivePopup::updateMask() { // get screen-geometry for screen our anchor is on // (geometry can differ from screen to screen! - TQRect deskRect = KGlobalSettings::desktopGeometry(d->anchor); + TQRect deskRect = TDEGlobalSettings::desktopGeometry(d->anchor); int xh = 70, xl = 40; if( width() < 80 ) diff --git a/tdeui/kpixmapio.cpp b/tdeui/kpixmapio.cpp index aafb7f3c2..02054aad3 100644 --- a/tdeui/kpixmapio.cpp +++ b/tdeui/kpixmapio.cpp @@ -18,8 +18,8 @@ #include <tqcolor.h> #include <tqglobal.h> -#include <kglobal.h> -#include <kconfig.h> +#include <tdeglobal.h> +#include <tdeconfig.h> #include <kdebug.h> #include <sys/types.h> @@ -87,7 +87,7 @@ KPixmapIO::KPixmapIO() #ifdef HAVE_MITSHM setShmPolicy(ShmDontKeep); - KConfig *config = KGlobal::config(); + TDEConfig *config = TDEGlobal::config(); if (!config->readBoolEntry("UseMitShm", true)) return; diff --git a/tdeui/kpixmapregionselectordialog.cpp b/tdeui/kpixmapregionselectordialog.cpp index c394af0f3..8228cd2f1 100644 --- a/tdeui/kpixmapregionselectordialog.cpp +++ b/tdeui/kpixmapregionselectordialog.cpp @@ -21,7 +21,7 @@ #include <kdialogbase.h> #include <tqdialog.h> #include <tqdesktopwidget.h> -#include <klocale.h> +#include <tdelocale.h> #include <kdialog.h> KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(TQWidget *parent, diff --git a/tdeui/kpixmapregionselectorwidget.cpp b/tdeui/kpixmapregionselectorwidget.cpp index 615b50a23..21ac875db 100644 --- a/tdeui/kpixmapregionselectorwidget.cpp +++ b/tdeui/kpixmapregionselectorwidget.cpp @@ -30,9 +30,9 @@ #include <tqlayout.h> #include <kimageeffect.h> #include <kdebug.h> -#include <klocale.h> -#include <kpopupmenu.h> -#include <kaction.h> +#include <tdelocale.h> +#include <tdepopupmenu.h> +#include <tdeaction.h> #include <stdlib.h> #include <tqcursor.h> #include <tqapplication.h> @@ -135,17 +135,17 @@ void KPixmapRegionSelectorWidget::updatePixmap() } -KPopupMenu *KPixmapRegionSelectorWidget::createPopupMenu() +TDEPopupMenu *KPixmapRegionSelectorWidget::createPopupMenu() { - KPopupMenu *popup=new KPopupMenu(this, "PixmapRegionSelectorPopup"); + TDEPopupMenu *popup=new TDEPopupMenu(this, "PixmapRegionSelectorPopup"); popup->insertTitle(i18n("Image Operations")); - KAction *action = new KAction(i18n("&Rotate Clockwise"), "rotate_cw", + TDEAction *action = new TDEAction(i18n("&Rotate Clockwise"), "rotate_cw", 0, TQT_TQOBJECT(this), TQT_SLOT(rotateClockwise()), TQT_TQOBJECT(popup), "rotateclockwise"); action->plug(popup); - action = new KAction(i18n("Rotate &Counterclockwise"), "rotate_ccw", + action = new TDEAction(i18n("Rotate &Counterclockwise"), "rotate_ccw", 0, TQT_TQOBJECT(this), TQT_SLOT(rotateCounterclockwise()), TQT_TQOBJECT(popup), "rotatecounterclockwise"); action->plug(popup); @@ -215,7 +215,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev) if ( mev->button() == Qt::RightButton ) { - KPopupMenu *popup = createPopupMenu( ); + TDEPopupMenu *popup = createPopupMenu( ); popup->exec( mev->globalPos() ); delete popup; return TRUE; diff --git a/tdeui/kpixmapregionselectorwidget.h b/tdeui/kpixmapregionselectorwidget.h index 344580ff4..0277a0d10 100644 --- a/tdeui/kpixmapregionselectorwidget.h +++ b/tdeui/kpixmapregionselectorwidget.h @@ -25,7 +25,7 @@ #include <tqlabel.h> #include <kimageeffect.h> -class KPopupMenu; +class TDEPopupMenu; #include <tdelibs_export.h> @@ -135,9 +135,9 @@ public slots: protected: /** - * Creates a KPopupMenu with the menu that appears when clicking with the right button on the label + * Creates a TDEPopupMenu with the menu that appears when clicking with the right button on the label */ - virtual KPopupMenu *createPopupMenu(); + virtual TDEPopupMenu *createPopupMenu(); private: bool eventFilter(TQObject *obj, TQEvent *ev); diff --git a/tdeui/kprogress.cpp b/tdeui/kprogress.cpp index 9b72dcf2c..8fb050a11 100644 --- a/tdeui/kprogress.cpp +++ b/tdeui/kprogress.cpp @@ -34,8 +34,8 @@ #include "kprogress.h" -#include <kapplication.h> -#include <klocale.h> +#include <tdeapplication.h> +#include <tdelocale.h> #include <twin.h> KProgress::KProgress(TQWidget *parent, const char *name, WFlags f) diff --git a/tdeui/kprogressbox.cpp b/tdeui/kprogressbox.cpp index 4638f78fb..2472207f4 100644 --- a/tdeui/kprogressbox.cpp +++ b/tdeui/kprogressbox.cpp @@ -37,8 +37,8 @@ #include "ktextedit.h" #include "kprogressbox.h" -#include <kapplication.h> -#include <klocale.h> +#include <tdeapplication.h> +#include <tdelocale.h> #include <twin.h> struct KProgressBoxDialog::KProgressBoxDialogPrivate diff --git a/tdeui/kpushbutton.cpp b/tdeui/kpushbutton.cpp index 07127cdc8..6f994dbe3 100644 --- a/tdeui/kpushbutton.cpp +++ b/tdeui/kpushbutton.cpp @@ -25,11 +25,11 @@ #include "config.h" -#include <kglobalsettings.h> -#include <kconfig.h> -#include <kglobal.h> +#include <tdeglobalsettings.h> +#include <tdeconfig.h> +#include <tdeglobal.h> #include <kipc.h> -#include <kapplication.h> +#include <tdeapplication.h> class KPushButton::KPushButtonPrivate { @@ -114,7 +114,7 @@ void KPushButton::init( const KGuiItem &item ) void KPushButton::readSettings() { - s_useIcons = KGlobalSettings::showIconsOnPushButtons(); + s_useIcons = TDEGlobalSettings::showIconsOnPushButtons(); } void KPushButton::setGuiItem( const KGuiItem& item ) @@ -195,7 +195,7 @@ void KPushButton::mouseMoveEvent( TQMouseEvent *e ) if ( (e->state() & Qt::LeftButton) && (e->pos() - startPos).manhattanLength() > - KGlobalSettings::dndEventDelay() ) + TDEGlobalSettings::dndEventDelay() ) { startDrag(); setDown( false ); diff --git a/tdeui/kpushbutton.h b/tdeui/kpushbutton.h index 2beed9e52..ee7bb3b52 100644 --- a/tdeui/kpushbutton.h +++ b/tdeui/kpushbutton.h @@ -102,7 +102,7 @@ public: /** * Sets the Icon Set for this button. It also takes into account hte - * KGlobalSettings::showIconsOnPushButtons() setting. + * TDEGlobalSettings::showIconsOnPushButtons() setting. */ void setIconSet( const TQIconSet &iconSet ); diff --git a/tdeui/krootpixmap.cpp b/tdeui/krootpixmap.cpp index 3530b5d45..6be62d157 100644 --- a/tdeui/krootpixmap.cpp +++ b/tdeui/krootpixmap.cpp @@ -14,7 +14,7 @@ #include <tqrect.h> #include <tqimage.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kimageeffect.h> #include <kpixmapio.h> #include <twinmodule.h> @@ -61,7 +61,7 @@ void KRootPixmap::init() m_Fade = 0; m_BlurRadius = 0; m_BlurSigma = 0; - m_pPixmap = new KSharedPixmap; //ordinary KPixmap on win32 + m_pPixmap = new TDESharedPixmap; //ordinary KPixmap on win32 m_pTimer = new TQTimer( this ); m_bInit = false; m_bActive = false; @@ -238,7 +238,7 @@ void KRootPixmap::repaint(bool force) m_Desk = currentDesktop(); } - // KSharedPixmap will correctly generate a tile for us. + // TDESharedPixmap will correctly generate a tile for us. m_pPixmap->loadFromShared(pixmapName(m_Desk), m_Rect); #else m_Desk = currentDesktop(); @@ -308,7 +308,7 @@ void KRootPixmap::slotDone(bool success) updateBackground( m_pPixmap ); } -void KRootPixmap::updateBackground( KSharedPixmap *spm ) +void KRootPixmap::updateBackground( TDESharedPixmap *spm ) { TQPixmap pm = *spm; diff --git a/tdeui/krootpixmap.h b/tdeui/krootpixmap.h index 776863c46..bc5518221 100644 --- a/tdeui/krootpixmap.h +++ b/tdeui/krootpixmap.h @@ -20,7 +20,7 @@ class TQRect; class TQWidget; class TQTimer; -class KSharedPixmap; +class TDESharedPixmap; class KRootPixmapData; /** @@ -37,7 +37,7 @@ class KRootPixmapData; * Instead of using the default behavior, you can ask KRootPixmap * to emit a backgroundUpdated(const TQPixmap &) signal whenever * the background needs updating by using setCustomPainting(bool). - * Alternatively by reimplementing updateBackground(KSharedPixmap*) + * Alternatively by reimplementing updateBackground(TDESharedPixmap*) * you can take complete control of the behavior. * * @author Geert Jansen <jansen@kde.org> @@ -179,7 +179,7 @@ public slots: void setCustomPainting( bool enable ) { m_bCustomPaint = enable; } /** - * Asks KDesktop to export the desktop background as a KSharedPixmap. + * Asks KDesktop to export the desktop background as a TDESharedPixmap. * This method uses DCOP to call KBackgroundIface/setExport(int). */ void enableExports(); @@ -209,7 +209,7 @@ protected: * applies the fade effect, then sets the target's background, or emits * backgroundUpdated(const TQPixmap &) depending on the painting mode. */ - virtual void updateBackground( KSharedPixmap * ); + virtual void updateBackground( TDESharedPixmap * ); private slots: void slotBackgroundChanged(int); @@ -229,7 +229,7 @@ private: TQRect m_Rect; TQWidget *m_pWidget; TQTimer *m_pTimer; - KSharedPixmap *m_pPixmap; + TDESharedPixmap *m_pPixmap; KRootPixmapData *d; void init(); diff --git a/tdeui/ksconfig.cpp b/tdeui/ksconfig.cpp index 5ca0c2b85..a9958dea9 100644 --- a/tdeui/ksconfig.cpp +++ b/tdeui/ksconfig.cpp @@ -25,14 +25,14 @@ #include <tqlayout.h> #include <tqtimer.h> -#include <kapplication.h> -#include <kconfig.h> +#include <tdeapplication.h> +#include <tdeconfig.h> #include <kdebug.h> #include <kdialog.h> -#include <kfiledialog.h> -#include <kglobal.h> +#include <tdefiledialog.h> +#include <tdeglobal.h> #include <klineedit.h> -#include <klocale.h> +#include <tdelocale.h> #include <kpushbutton.h> #include <kstdguiitem.h> @@ -80,7 +80,7 @@ KSpellConfig::KSpellConfig( TQWidget *parent, const char *name, , clientcombo(0) { d = new KSpellConfigPrivate; - kc = KGlobal::config(); + kc = TDEGlobal::config(); if( !_ksc ) { @@ -181,7 +181,7 @@ KSpellConfig::dictFromList() const bool KSpellConfig::readGlobalSettings() { - KConfigGroupSaver cs( kc,"KSpell" ); + TDEConfigGroupSaver cs( kc,"KSpell" ); setNoRootAffix ( kc->readNumEntry("KSpell_NoRootAffix", 0) ); setRunTogether ( kc->readNumEntry("KSpell_RunTogether", 0) ); @@ -196,7 +196,7 @@ KSpellConfig::readGlobalSettings() bool KSpellConfig::writeGlobalSettings () { - KConfigGroupSaver cs( kc,"KSpell" ); + TDEConfigGroupSaver cs( kc,"KSpell" ); kc->writeEntry ("KSpell_NoRootAffix",(int) noRootAffix(), true, true); kc->writeEntry ("KSpell_RunTogether", (int) runTogether(), true, true); @@ -277,12 +277,12 @@ KSpellConfig::interpret( TQString &fname, TQString &lname, // but since aspell 0.6 also 3-character ISO-codes can be used if ( (dname.length() == 2) || (dname.length() == 3) ) { lname = dname; - hname = KGlobal::locale()->twoAlphaToLanguageName( lname ); + hname = TDEGlobal::locale()->twoAlphaToLanguageName( lname ); } else if ( (dname.length() == 5) && (dname[2] == '_') ) { lname = dname.left(2); - hname = KGlobal::locale()->twoAlphaToLanguageName(lname); - TQString country = KGlobal::locale()->twoAlphaToCountryName( dname.right(2) ); + hname = TDEGlobal::locale()->twoAlphaToLanguageName(lname); + TQString country = TDEGlobal::locale()->twoAlphaToCountryName( dname.right(2) ); if ( extension.isEmpty() ) extension = country; else @@ -363,9 +363,9 @@ KSpellConfig::interpret( TQString &fname, TQString &lname, } //We have explicitly chosen English as the default here. - if ( ( KGlobal::locale()->language() == TQString::fromLatin1("C") && + if ( ( TDEGlobal::locale()->language() == TQString::fromLatin1("C") && lname==TQString::fromLatin1("en") ) || - KGlobal::locale()->language() == lname ) + TDEGlobal::locale()->language() == lname ) return true; return false; @@ -965,7 +965,7 @@ void KSpellConfig::activateHelp( void ) void KSpellConfig::sHelp( void ) { - kapp->invokeHelp("configuration", "kspell"); + kapp->invokeHelp("configuration", "tdespell"); } /* diff --git a/tdeui/ksconfig.h b/tdeui/ksconfig.h index b9cabe220..b0ca46fd9 100644 --- a/tdeui/ksconfig.h +++ b/tdeui/ksconfig.h @@ -28,7 +28,7 @@ class TQCheckBox; class TQComboBox; class TQLabel; -class KConfig; +class TDEConfig; class KSpellConfigPrivate; /** @@ -238,7 +238,7 @@ class TDEUI_EXPORT KSpellConfig : public TQWidget protected slots: /** - * Invokes the help documentation for kspell + * Invokes the help documentation for tdespell */ void sHelp(); //void sBrowseDict(); @@ -264,7 +264,7 @@ class TDEUI_EXPORT KSpellConfig : public TQWidget TQString qspdict; // -p [dict] TQStringList ignorelist; enum {rdictlist=3, rencoding=4, rhelp=6}; - KConfig *kc; + TDEConfig *kc; int iclient; // defaults to ispell, may be aspell, too TQCheckBox *cb1, *cb2; diff --git a/tdeui/kscrollview.cpp b/tdeui/kscrollview.cpp index 1d37d03d3..40cbb8ee4 100644 --- a/tdeui/kscrollview.cpp +++ b/tdeui/kscrollview.cpp @@ -24,8 +24,8 @@ #include "kscrollview.h" #include <kdebug.h> -#include <kconfig.h> -#include <kglobal.h> +#include <tdeconfig.h> +#include <tdeglobal.h> struct KScrollView::KScrollViewPrivate { KScrollViewPrivate() : dx(0), dy(0), ddx(0), ddy(0), rdx(0), rdy(0), scrolling(false) {} @@ -54,7 +54,7 @@ KScrollView::~KScrollView() void KScrollView::scrollBy(int dx, int dy) { - KConfigGroup cfg( KGlobal::config(), "KDE" ); + TDEConfigGroup cfg( TDEGlobal::config(), "KDE" ); if( !cfg.readBoolEntry( "SmoothScrolling", true )) { TQScrollView::scrollBy( dx, dy ); return; diff --git a/tdeui/kseparator.cpp b/tdeui/kseparator.cpp index 9e860f3cf..c5a4879d8 100644 --- a/tdeui/kseparator.cpp +++ b/tdeui/kseparator.cpp @@ -20,7 +20,7 @@ #include <tqstyle.h> #include <kdebug.h> -#include <kapplication.h> +#include <tdeapplication.h> #include "kseparator.moc" diff --git a/tdeui/ksharedpixmap.cpp b/tdeui/ksharedpixmap.cpp index 6789e0a64..33eca17e4 100644 --- a/tdeui/ksharedpixmap.cpp +++ b/tdeui/ksharedpixmap.cpp @@ -22,7 +22,7 @@ #ifdef Q_WS_X11 -#include <kapplication.h> +#include <tdeapplication.h> #include <krootprop.h> #include <ksharedpixmap.h> #include <kdebug.h> @@ -49,10 +49,10 @@ #undef FocusOut /** - * KSharedPixmap + * TDESharedPixmap */ -class KSharedPixmapPrivate +class TDESharedPixmapPrivate { public: Atom pixmap; @@ -61,21 +61,21 @@ public: TQRect rect; }; -KSharedPixmap::KSharedPixmap() +TDESharedPixmap::TDESharedPixmap() : TQWidget(0L, "shpixmap comm window") { - d = new KSharedPixmapPrivate; + d = new TDESharedPixmapPrivate; init(); } -KSharedPixmap::~KSharedPixmap() +TDESharedPixmap::~TDESharedPixmap() { delete d; } -void KSharedPixmap::init() +void TDESharedPixmap::init() { d->pixmap = XInternAtom(tqt_xdisplay(), "PIXMAP", false); TQCString atom; @@ -85,7 +85,7 @@ void KSharedPixmap::init() } -bool KSharedPixmap::isAvailable(const TQString & name) const +bool TDESharedPixmap::isAvailable(const TQString & name) const { TQString str = TQString("KDESHPIXMAP:%1").arg(name); Atom sel = XInternAtom(tqt_xdisplay(), str.latin1(), true); @@ -95,7 +95,7 @@ bool KSharedPixmap::isAvailable(const TQString & name) const } -bool KSharedPixmap::loadFromShared(const TQString & name, const TQRect & rect) +bool TDESharedPixmap::loadFromShared(const TQString & name, const TQRect & rect) { d->rect = rect; if (d->selection != None) @@ -120,7 +120,7 @@ bool KSharedPixmap::loadFromShared(const TQString & name, const TQRect & rect) } -bool KSharedPixmap::x11Event(XEvent *event) +bool TDESharedPixmap::x11Event(XEvent *event) { if (event->type != SelectionNotify) return false; diff --git a/tdeui/ksharedpixmap.h b/tdeui/ksharedpixmap.h index 3295b38d1..7873be6e5 100644 --- a/tdeui/ksharedpixmap.h +++ b/tdeui/ksharedpixmap.h @@ -11,8 +11,8 @@ * version 2 of the License, or (at your option) any later version. */ -#ifndef __KSharedPixmap_h_Included__ -#define __KSharedPixmap_h_Included__ +#ifndef __TDESharedPixmap_h_Included__ +#define __TDESharedPixmap_h_Included__ #include <kpixmap.h> @@ -26,7 +26,7 @@ #include <tqpixmap.h> #include <tqwidget.h> -class KSharedPixmapPrivate; +class TDESharedPixmapPrivate; /** * Shared pixmap client. @@ -35,7 +35,7 @@ class KSharedPixmapPrivate; * by a global id string, and can be accessed by all X clients. * * This class is a client class to shared pixmaps in KDE. You can use it - * to copy (a part of) a shared pixmap into. KSharedPixmap inherits KPixmap + * to copy (a part of) a shared pixmap into. TDESharedPixmap inherits KPixmap * for that purpose. * * The server part of shared pixmaps is not implemented here. @@ -44,7 +44,7 @@ class KSharedPixmapPrivate; * * An example: copy from a shared pixmap: * \code - * KSharedPixmap *pm = new KSharedPixmap; + * TDESharedPixmap *pm = new TDESharedPixmap; * connect(pm, TQT_SIGNAL(done(bool)), TQT_SLOT(slotDone(bool))); * pm->loadFromShared("My Pixmap"); * \endcode @@ -53,7 +53,7 @@ class KSharedPixmapPrivate; * @version $Id$ * */ -class TDEUI_EXPORT KSharedPixmap: +class TDEUI_EXPORT TDESharedPixmap: public TQWidget, public KPixmap { @@ -65,12 +65,12 @@ public: /** * Construct an empty pixmap. */ - KSharedPixmap(); + TDESharedPixmap(); /** * Destroys the pixmap. */ - ~KSharedPixmap(); + ~TDESharedPixmap(); /** * Load from a shared pixmap reference. The signal done() is emitted @@ -80,7 +80,7 @@ public: * @param rect If you pass a nonzero rectangle, a tile is generated which * is able to fill up the specified rectangle completely. This is solely * for optimization: in some cases the tile will be much smaller than the - * original pixmap. It reflects KSharedPixmap's original use: sharing + * original pixmap. It reflects TDESharedPixmap's original use: sharing * of the desktop background to achieve pseudo transparency. * @return True if the shared pixmap exists and loading has started * successfully, false otherwise. @@ -110,11 +110,11 @@ private: bool copy(const TQString & id, const TQRect & rect); void init(); - KSharedPixmapPrivate *d; + TDESharedPixmapPrivate *d; }; #else // WIN32, Qt Embedded // Let's simply assume KPixmap will do for now. Yes, I know that's broken. -#define KSharedPixmap KPixmap +#define TDESharedPixmap KPixmap #endif #endif diff --git a/tdeui/ksplashscreen.cpp b/tdeui/ksplashscreen.cpp index 6d605dcd7..82234bd94 100644 --- a/tdeui/ksplashscreen.cpp +++ b/tdeui/ksplashscreen.cpp @@ -17,9 +17,9 @@ Boston, MA 02110-1301, USA. */ -#include <kconfig.h> -#include <kglobal.h> -#include <kglobalsettings.h> +#include <tdeconfig.h> +#include <tdeglobal.h> +#include <tdeglobalsettings.h> #include <tqpixmap.h> @@ -27,7 +27,7 @@ KSplashScreen::KSplashScreen(const TQPixmap &pixmap, WFlags f): TQSplashScreen(pixmap, f) { - TQRect desk = KGlobalSettings::splashScreenDesktopGeometry(); + TQRect desk = TDEGlobalSettings::splashScreenDesktopGeometry(); resize(pixmap.width(), pixmap.height()); setGeometry( ( desk.width() / 2 ) - ( width() / 2 ) + desk.left(), ( desk.height() / 2 ) - ( height() / 2 ) + desk.top(), diff --git a/tdeui/kstatusbar.cpp b/tdeui/kstatusbar.cpp index b70c8ae9c..daa22f46b 100644 --- a/tdeui/kstatusbar.cpp +++ b/tdeui/kstatusbar.cpp @@ -20,8 +20,8 @@ #include <kdebug.h> #include <kstatusbar.h> -#include <kconfig.h> -#include <kglobal.h> +#include <tdeconfig.h> +#include <tdeglobal.h> KStatusBarLabel::KStatusBarLabel( const TQString& text, int _id, @@ -63,7 +63,7 @@ KStatusBar::KStatusBar( TQWidget *parent, const char *name ) { // make the size grip stuff configurable // ...but off by default (sven) - KConfig *config = KGlobal::config(); + TDEConfig *config = TDEGlobal::config(); TQString group(config->group()); config->setGroup(TQString::fromLatin1("StatusBar style")); bool grip_enabled = config->readBoolEntry(TQString::fromLatin1("SizeGripEnabled"), false); diff --git a/tdeui/kstatusbar.h b/tdeui/kstatusbar.h index a1b89d0a7..2c7574a79 100644 --- a/tdeui/kstatusbar.h +++ b/tdeui/kstatusbar.h @@ -64,14 +64,14 @@ signals: * * You can insert text labels or custom widgets. Their geometry is managed * internally. KStatusBar resizes itself, but positioning is left to - * KMainWindow (or to you, if you don't use KMainWindow ). + * TDEMainWindow (or to you, if you don't use TDEMainWindow ). * * A special type of item is a message which is a temporary text-message * displayed on top of other items in full-width. Messages are visible for * specified time, or until you call the slot TQStatusBar::clear(). See * TQStatusBar::message for details. * - * It is useful to connect the KActionCollection signals to the + * It is useful to connect the TDEActionCollection signals to the * TQStatusBar::message slots. * * KStatusBar inherits TQStatusBar, you can freely use all QStatusBar @@ -82,7 +82,7 @@ signals: * * @author Mark Donohoe (donohoe@kde.org) Maintained by Sven Radej <radej@kde.org> - * @see KActionCollection + * @see TDEActionCollection */ class TDEUI_EXPORT KStatusBar : public TQStatusBar { @@ -97,7 +97,7 @@ public: enum BarStatus{ Toggle, Show, Hide }; /** - * Constructs a status bar. @p parent is usually KMainWindow. + * Constructs a status bar. @p parent is usually TDEMainWindow. */ KStatusBar( TQWidget* parent = 0L, const char* name = 0L ); diff --git a/tdeui/kstdaction.cpp b/tdeui/kstdaction.cpp index e1adac16a..652534601 100644 --- a/tdeui/kstdaction.cpp +++ b/tdeui/kstdaction.cpp @@ -21,15 +21,15 @@ #include <tqtoolbutton.h> #include <tqwhatsthis.h> -#include <kaboutdata.h> -#include <kaction.h> -#include <kapplication.h> +#include <tdeaboutdata.h> +#include <tdeaction.h> +#include <tdeapplication.h> #include <kdebug.h> -#include <kglobal.h> +#include <tdeglobal.h> #include <kiconloader.h> -#include <klocale.h> -#include <kstdaccel.h> -#include <kmainwindow.h> +#include <tdelocale.h> +#include <tdestdaccel.h> +#include <tdemainwindow.h> #include "kstdaction_p.h" namespace KStdAction @@ -40,9 +40,9 @@ TQStringList stdNames() return internal_stdNames(); } -KAction* create( StdAction id, const char *name, const TQObject *recvr, const char *slot, KActionCollection* parent ) +TDEAction* create( StdAction id, const char *name, const TQObject *recvr, const char *slot, TDEActionCollection* parent ) { - KAction* pAction = 0; + TDEAction* pAction = 0; const KStdActionInfo* pInfo = infoPtr( id ); kdDebug(125) << "KStdAction::create( " << id << "=" << (pInfo ? pInfo->psName : (const char*)0) << ", " << parent << ", " << name << " )" << endl; // ellis if( pInfo ) { @@ -64,13 +64,13 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch case Preferences: case HelpContents: { - const KAboutData *aboutData = KGlobal::instance()->aboutData(); + const TDEAboutData *aboutData = TDEGlobal::instance()->aboutData(); /* TODO KDE4 - const KAboutData *aboutData; + const TDEAboutData *aboutData; if ( parent ) aboutData = parent->instance()->aboutData(); else - aboutData = KGlobal::instance()->aboutData(); + aboutData = TDEGlobal::instance()->aboutData(); */ TQString appName = (aboutData) ? aboutData->programName() : TQString::fromLatin1(tqApp->name()); sLabel = i18n(pInfo->psLabel).arg(appName); @@ -86,10 +86,10 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch if (id == LastPage) iconName = "start"; } - KShortcut cut = KStdAccel::shortcut(pInfo->idAccel); + TDEShortcut cut = TDEStdAccel::shortcut(pInfo->idAccel); switch( id ) { case OpenRecent: - pAction = new KRecentFilesAction( sLabel, pInfo->psIconName, cut, + pAction = new TDERecentFilesAction( sLabel, pInfo->psIconName, cut, recvr, slot, parent, (name) ? name : pInfo->psName ); break; @@ -97,8 +97,8 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch case ShowToolbar: case ShowStatusbar: { - KToggleAction *ret; - ret = new KToggleAction( sLabel, pInfo->psIconName, cut, + TDEToggleAction *ret; + ret = new TDEToggleAction( sLabel, pInfo->psIconName, cut, recvr, slot, parent, (name) ? name : pInfo->psName ); ret->setChecked( true ); @@ -107,8 +107,8 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch } case FullScreen: { - KToggleFullScreenAction *ret; - ret = new KToggleFullScreenAction( cut, recvr, slot, + TDEToggleFullScreenAction *ret; + ret = new TDEToggleFullScreenAction( cut, recvr, slot, parent, NULL, (name) ? name : pInfo->psName ); ret->setChecked( false ); pAction = ret; @@ -116,15 +116,15 @@ KAction* create( StdAction id, const char *name, const TQObject *recvr, const ch } case PasteText: { - KPasteTextAction *ret; - ret = new KPasteTextAction(sLabel, iconName, cut, + TDEPasteTextAction *ret; + ret = new TDEPasteTextAction(sLabel, iconName, cut, recvr, slot, parent, (name) ? name : pInfo->psName ); pAction = ret; break; } default: - pAction = new KAction( sLabel, iconName, cut, + pAction = new TDEAction( sLabel, iconName, cut, recvr, slot, parent, (name) ? name : pInfo->psName ); break; @@ -139,103 +139,103 @@ const char* name( StdAction id ) return (pInfo) ? pInfo->psName : 0; } -KAction *openNew( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *openNew( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( New, name, recvr, slot, parent ); } -KAction *open( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *open( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Open, name, recvr, slot, parent ); } -KRecentFilesAction *openRecent( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) - { return (KRecentFilesAction*) KStdAction::create( OpenRecent, name, recvr, slot, parent ); } -KAction *save( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDERecentFilesAction *openRecent( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) + { return (TDERecentFilesAction*) KStdAction::create( OpenRecent, name, recvr, slot, parent ); } +TDEAction *save( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Save, name, recvr, slot, parent ); } -KAction *saveAs( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *saveAs( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( SaveAs, name, recvr, slot, parent ); } -KAction *revert( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *revert( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Revert, name, recvr, slot, parent ); } -KAction *print( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *print( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Print, name, recvr, slot, parent ); } -KAction *printPreview( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *printPreview( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( PrintPreview, name, recvr, slot, parent ); } -KAction *close( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *close( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Close, name, recvr, slot, parent ); } -KAction *mail( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *mail( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Mail, name, recvr, slot, parent ); } -KAction *quit( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *quit( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Quit, name, recvr, slot, parent ); } -KAction *undo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *undo( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Undo, name, recvr, slot, parent ); } -KAction *redo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *redo( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Redo, name, recvr, slot, parent ); } -KAction *cut( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *cut( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Cut, name, recvr, slot, parent ); } -KAction *copy( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *copy( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Copy, name, recvr, slot, parent ); } -KAction *paste( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *paste( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Paste, name, recvr, slot, parent ); } -KAction *pasteText( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *pasteText( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( PasteText, name, recvr, slot, parent ); } -KAction *clear( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *clear( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Clear, name, recvr, slot, parent ); } -KAction *selectAll( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *selectAll( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( SelectAll, name, recvr, slot, parent ); } -KAction *deselect( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *deselect( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Deselect, name, recvr, slot, parent ); } -KAction *find( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *find( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Find, name, recvr, slot, parent ); } -KAction *findNext( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *findNext( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FindNext, name, recvr, slot, parent ); } -KAction *findPrev( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *findPrev( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FindPrev, name, recvr, slot, parent ); } -KAction *replace( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *replace( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Replace, name, recvr, slot, parent ); } -KAction *actualSize( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *actualSize( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ActualSize, name, recvr, slot, parent ); } -KAction *fitToPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *fitToPage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FitToPage, name, recvr, slot, parent ); } -KAction *fitToWidth( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *fitToWidth( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FitToWidth, name, recvr, slot, parent ); } -KAction *fitToHeight( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *fitToHeight( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FitToHeight, name, recvr, slot, parent ); } -KAction *zoomIn( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *zoomIn( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ZoomIn, name, recvr, slot, parent ); } -KAction *zoomOut( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *zoomOut( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ZoomOut, name, recvr, slot, parent ); } -KAction *zoom( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *zoom( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Zoom, name, recvr, slot, parent ); } -KAction *redisplay( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *redisplay( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Redisplay, name, recvr, slot, parent ); } -KAction *up( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *up( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Up, name, recvr, slot, parent ); } -KAction *back( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *back( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Back, name, recvr, slot, parent ); } -KAction *forward( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *forward( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Forward, name, recvr, slot, parent ); } -KAction *home( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *home( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Home, name, recvr, slot, parent ); } -KAction *prior( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *prior( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Prior, name, recvr, slot, parent ); } -KAction *next( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *next( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Next, name, recvr, slot, parent ); } -KAction *goTo( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *goTo( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Goto, name, recvr, slot, parent ); } -KAction *gotoPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *gotoPage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( GotoPage, name, recvr, slot, parent ); } -KAction *gotoLine( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *gotoLine( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( GotoLine, name, recvr, slot, parent ); } -KAction *firstPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *firstPage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( FirstPage, name, recvr, slot, parent ); } -KAction *lastPage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *lastPage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( LastPage, name, recvr, slot, parent ); } -KAction *addBookmark( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *addBookmark( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( AddBookmark, name, recvr, slot, parent ); } -KAction *editBookmarks( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *editBookmarks( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( EditBookmarks, name, recvr, slot, parent ); } -KAction *spelling( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *spelling( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Spelling, name, recvr, slot, parent ); } -KToggleAction *showMenubar( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *_name ) +TDEToggleAction *showMenubar( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *_name ) { - KToggleAction *ret; - ret = new KToggleAction(i18n("Show &Menubar"), "showmenu", KStdAccel::shortcut(KStdAccel::ShowMenubar), recvr, slot, + TDEToggleAction *ret; + ret = new TDEToggleAction(i18n("Show &Menubar"), "showmenu", TDEStdAccel::shortcut(TDEStdAccel::ShowMenubar), recvr, slot, parent, _name ? _name : name(ShowMenubar)); ret->setWhatsThis( i18n( "Show Menubar<p>" "Shows the menubar again after it has been hidden" ) ); @@ -248,10 +248,10 @@ KToggleAction *showMenubar( const TQObject *recvr, const char *slot, KActionColl } // obsolete -KToggleAction *showToolbar( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *_name ) +TDEToggleAction *showToolbar( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *_name ) { - KToggleAction *ret; - ret = new KToggleAction(i18n("Show &Toolbar"), 0, recvr, slot, parent, + TDEToggleAction *ret; + ret = new TDEToggleAction(i18n("Show &Toolbar"), 0, recvr, slot, parent, _name ? _name : name(ShowToolbar)); ret->setChecked(true); return ret; @@ -259,19 +259,19 @@ KToggleAction *showToolbar( const TQObject *recvr, const char *slot, KActionColl } // obsolete -KToggleToolBarAction *showToolbar( const char* toolBarName, KActionCollection* parent, const char *_name ) +TDEToggleToolBarAction *showToolbar( const char* toolBarName, TDEActionCollection* parent, const char *_name ) { - KToggleToolBarAction *ret; - ret = new KToggleToolBarAction(toolBarName, i18n("Show &Toolbar"), parent, + TDEToggleToolBarAction *ret; + ret = new TDEToggleToolBarAction(toolBarName, i18n("Show &Toolbar"), parent, _name ? _name : name(ShowToolbar)); return ret; } -KToggleAction *showStatusbar( const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *_name ) +TDEToggleAction *showStatusbar( const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *_name ) { - KToggleAction *ret; - ret = new KToggleAction(i18n("Show St&atusbar"), 0, recvr, slot, parent, + TDEToggleAction *ret; + ret = new TDEToggleAction(i18n("Show St&atusbar"), 0, recvr, slot, parent, _name ? _name : name(ShowStatusbar)); ret->setWhatsThis( i18n( "Show Statusbar<p>" "Shows the statusbar, which is the bar at the bottom of the window used for status information." ) ); @@ -284,40 +284,40 @@ KToggleAction *showStatusbar( const TQObject *recvr, const char *slot, return ret; } -KToggleFullScreenAction *fullScreen( const TQObject *recvr, const char *slot, KActionCollection* parent, +TDEToggleFullScreenAction *fullScreen( const TQObject *recvr, const char *slot, TDEActionCollection* parent, TQWidget* window, const char *name ) { - KToggleFullScreenAction *ret; - ret = static_cast< KToggleFullScreenAction* >( KStdAction::create( FullScreen, name, recvr, slot, parent )); + TDEToggleFullScreenAction *ret; + ret = static_cast< TDEToggleFullScreenAction* >( KStdAction::create( FullScreen, name, recvr, slot, parent )); ret->setWindow( window ); return ret; } -KAction *saveOptions( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *saveOptions( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( SaveOptions, name, recvr, slot, parent ); } -KAction *keyBindings( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *keyBindings( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( KeyBindings, name, recvr, slot, parent ); } -KAction *preferences( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *preferences( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Preferences, name, recvr, slot, parent ); } -KAction *configureToolbars( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *configureToolbars( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ConfigureToolbars, name, recvr, slot, parent ); } -KAction *configureNotifications( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *configureNotifications( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ConfigureNotifications, name, recvr, slot, parent ); } -KAction *help( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *help( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( Help, name, recvr, slot, parent ); } -KAction *helpContents( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *helpContents( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( HelpContents, name, recvr, slot, parent ); } -KAction *whatsThis( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *whatsThis( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( WhatsThis, name, recvr, slot, parent ); } -KAction *tipOfDay( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *tipOfDay( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( TipofDay, name, recvr, slot, parent ); } -KAction *reportBug( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *reportBug( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( ReportBug, name, recvr, slot, parent ); } -KAction *switchApplicationLanguage( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *switchApplicationLanguage( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( SwitchApplicationLanguage, name, recvr, slot, parent ); } -KAction *aboutApp( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *aboutApp( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( AboutApp, name, recvr, slot, parent ); } -KAction *aboutKDE( const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name ) +TDEAction *aboutKDE( const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name ) { return KStdAction::create( AboutKDE, name, recvr, slot, parent ); } } diff --git a/tdeui/kstdaction.h b/tdeui/kstdaction.h index 7fa18968d..31b80618c 100644 --- a/tdeui/kstdaction.h +++ b/tdeui/kstdaction.h @@ -21,12 +21,12 @@ class TQObject; class TQWidget; -class KAction; -class KActionCollection; -class KRecentFilesAction; -class KToggleAction; -class KToggleToolBarAction; -class KToggleFullScreenAction; +class TDEAction; +class TDEActionCollection; +class TDERecentFilesAction; +class TDEToggleAction; +class TDEToggleToolBarAction; +class TDEToggleFullScreenAction; #include <tqstringlist.h> @@ -40,8 +40,8 @@ class KToggleFullScreenAction; * conform to the KDE UI Style Guide * @see http://developer.kde.org/documentation/standards/kde/style/basics/index.html . * - * All of the documentation for KAction holds for KStdAction - * also. When in doubt on how things work, check the KAction + * All of the documentation for TDEAction holds for KStdAction + * also. When in doubt on how things work, check the TDEAction * documention first. * * <b>Simple Example:</b>\n @@ -50,15 +50,15 @@ class KToggleFullScreenAction; * for regular actions. For example, if you previously had: * * \code - * KAction *newAct = new KAction(i18n("&New"), TQIconSet(BarIcon("filenew")), - * KStdAccel::shortcut(KStdAccel::New), this, + * TDEAction *newAct = new TDEAction(i18n("&New"), TQIconSet(BarIcon("filenew")), + * TDEStdAccel::shortcut(TDEStdAccel::New), this, * TQT_SLOT(fileNew()), actionCollection()); * \endcode * * You could drop that and replace it with: * * \code - * KAction *newAct = KStdAction::openNew(this, TQT_SLOT(fileNew()), + * TDEAction *newAct = KStdAction::openNew(this, TQT_SLOT(fileNew()), * actionCollection()); * \endcode * @@ -97,7 +97,7 @@ class KToggleFullScreenAction; * could do it the hard way: * * \code - * KAction *cut = actionCollection()->action(KStdAction::stdName(KStdAction::Cut)); + * TDEAction *cut = actionCollection()->action(KStdAction::stdName(KStdAction::Cut)); * \endcode * * Another non-standard usage concerns instantiating the action in the @@ -165,22 +165,22 @@ namespace KStdAction * Creates an action corresponding to the * KStdAction::StdAction enum. */ - TDEUI_EXPORT KAction* create( StdAction id, const char *name, + TDEUI_EXPORT TDEAction* create( StdAction id, const char *name, const TQObject *recvr, const char *slot, - KActionCollection* parent ); + TDEActionCollection* parent ); - inline KAction* create( StdAction id, + inline TDEAction* create( StdAction id, const TQObject *recvr, const char *slot, - KActionCollection* parent ) + TDEActionCollection* parent ) { return KStdAction::create( id, 0, recvr, slot, parent ); } /** * @obsolete. Creates an action corresponding to the * KStdAction::StdAction enum. */ - inline KAction *action(StdAction act_enum, + inline TDEAction *action(StdAction act_enum, const TQObject *recvr, const char *slot, - KActionCollection *parent, const char *name = 0L ) + TDEActionCollection *parent, const char *name = 0L ) { return KStdAction::create( act_enum, name, recvr, slot, parent ); } /** @@ -192,7 +192,7 @@ namespace KStdAction inline const char* stdName(StdAction act_enum) { return name( act_enum ); } /** - * Returns a list of all standard names. Used by KAccelManager + * Returns a list of all standard names. Used by TDEAccelManager * to give those heigher weight. * @since 3.1 */ @@ -201,12 +201,12 @@ namespace KStdAction /** * Create a new document or window. */ - TDEUI_EXPORT KAction *openNew(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *openNew(const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name = 0 ); /** * Open an existing file. */ - TDEUI_EXPORT KAction *open(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *open(const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name = 0 ); /** * Open a recently used document. The signature of the slot being called @@ -217,87 +217,87 @@ namespace KStdAction * @param parent parent widget * @param name name of widget */ - TDEUI_EXPORT KRecentFilesAction *openRecent(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDERecentFilesAction *openRecent(const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name = 0 ); /** * Save the current document. */ - TDEUI_EXPORT KAction *save(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *save(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Save the current document under a different name. */ - TDEUI_EXPORT KAction *saveAs(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *saveAs(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Revert the current document to the last saved version * (essentially will undo all changes). */ - TDEUI_EXPORT KAction *revert(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *revert(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Close the current document. */ - TDEUI_EXPORT KAction *close(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *close(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Print the current document. */ - TDEUI_EXPORT KAction *print(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *print(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Show a print preview of the current document. */ - TDEUI_EXPORT KAction *printPreview(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *printPreview(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Mail this document. */ - TDEUI_EXPORT KAction *mail(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *mail(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Quit the program. */ - TDEUI_EXPORT KAction *quit(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *quit(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Undo the last operation. */ - TDEUI_EXPORT KAction *undo(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *undo(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Redo the last operation. */ - TDEUI_EXPORT KAction *redo(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *redo(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Cut selected area and store it in the clipboard. */ - TDEUI_EXPORT KAction *cut(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *cut(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Copy the selected area into the clipboard. */ - TDEUI_EXPORT KAction *copy(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *copy(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Paste the contents of clipboard at the current mouse or cursor * position. */ - TDEUI_EXPORT KAction *paste(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *paste(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Paste the contents of clipboard at the current mouse or cursor @@ -305,228 +305,228 @@ namespace KStdAction * menu if Klipper is running. * @since 3.2 */ - TDEUI_EXPORT KAction *pasteText(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *pasteText(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Clear the content of the focus widget * @since 3.2 */ - TDEUI_EXPORT KAction *clear(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *clear(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Select all elements in the current document. */ - TDEUI_EXPORT KAction *selectAll(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *selectAll(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Deselect any selected elements in the current document. */ - TDEUI_EXPORT KAction *deselect(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *deselect(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Initiate a 'find' request in the current document. */ - TDEUI_EXPORT KAction *find(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *find(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Find the next instance of a stored 'find'. */ - TDEUI_EXPORT KAction *findNext(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *findNext(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Find a previous instance of a stored 'find'. */ - TDEUI_EXPORT KAction *findPrev(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *findPrev(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Find and replace matches. */ - TDEUI_EXPORT KAction *replace(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *replace(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * View the document at its actual size. */ - TDEUI_EXPORT KAction *actualSize(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *actualSize(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Fit the document view to the size of the current window. */ - TDEUI_EXPORT KAction *fitToPage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *fitToPage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Fit the document view to the width of the current window. */ - TDEUI_EXPORT KAction *fitToWidth(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *fitToWidth(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Fit the document view to the height of the current window. */ - TDEUI_EXPORT KAction *fitToHeight(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *fitToHeight(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Zoom in. */ - TDEUI_EXPORT KAction *zoomIn(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *zoomIn(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Zoom out. */ - TDEUI_EXPORT KAction *zoomOut(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *zoomOut(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Popup a zoom dialog. */ - TDEUI_EXPORT KAction *zoom(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *zoom(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Redisplay or redraw the document. */ - TDEUI_EXPORT KAction *redisplay(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *redisplay(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Move up (web style menu). */ - TDEUI_EXPORT KAction *up(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *up(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Move back (web style menu). */ - TDEUI_EXPORT KAction *back(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *back(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Move forward (web style menu). */ - TDEUI_EXPORT KAction *forward(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *forward(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Go to the "Home" position or document. */ - TDEUI_EXPORT KAction *home(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *home(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Scroll up one page. */ - TDEUI_EXPORT KAction *prior(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *prior(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Scroll down one page. */ - TDEUI_EXPORT KAction *next(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *next(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Go to somewhere in general. */ - TDEUI_EXPORT KAction *goTo(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *goTo(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Go to a specific page (dialog). */ - TDEUI_EXPORT KAction *gotoPage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *gotoPage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Go to a specific line (dialog). */ - TDEUI_EXPORT KAction *gotoLine(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *gotoLine(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Jump to the first page. */ - TDEUI_EXPORT KAction *firstPage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *firstPage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Jump to the last page. */ - TDEUI_EXPORT KAction *lastPage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *lastPage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Add the current page to the bookmarks tree. */ - TDEUI_EXPORT KAction *addBookmark(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *addBookmark(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Edit the application bookmarks. */ - TDEUI_EXPORT KAction *editBookmarks(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *editBookmarks(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Pop up the spell checker. */ - TDEUI_EXPORT KAction *spelling(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *spelling(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Show/Hide the menubar. */ - TDEUI_EXPORT KToggleAction *showMenubar(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEToggleAction *showMenubar(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * @obsolete. toolbar actions are created automatically now in the * Settings menu. Don't use this anymore. - * See: KMainWindow::createStandardStatusBarAction() + * See: TDEMainWindow::createStandardStatusBarAction() * Show/Hide the primary toolbar. * @since 3.1 */ - TDEUI_EXPORT KToggleAction *showToolbar(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; + TDEUI_EXPORT TDEToggleAction *showToolbar(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; /** * @obsolete. toolbar actions are created automatically now in the * Settings menu. Don't use this anymore. - * See: KMainWindow::setStandardToolBarMenuEnabled(bool); + * See: TDEMainWindow::setStandardToolBarMenuEnabled(bool); * Show/Hide the primary toolbar. */ - TDEUI_EXPORT KToggleToolBarAction *showToolbar(const char* toolBarName, - KActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; + TDEUI_EXPORT TDEToggleToolBarAction *showToolbar(const char* toolBarName, + TDEActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; /** * Show/Hide the statusbar. */ - TDEUI_EXPORT KToggleAction *showStatusbar(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEToggleAction *showStatusbar(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Switch to/from full screen mode * @since 3.2 */ - TDEUI_EXPORT KToggleFullScreenAction *fullScreen(const TQObject *recvr, const char *slot, - KActionCollection* parent, TQWidget* window, const char *name = 0 ); + TDEUI_EXPORT TDEToggleFullScreenAction *fullScreen(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, TQWidget* window, const char *name = 0 ); /** * Display the save options dialog. */ - TDEUI_EXPORT KAction *saveOptions(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *saveOptions(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the configure key bindings dialog. @@ -534,81 +534,81 @@ namespace KStdAction * Note that you might be able to use the pre-built KXMLGUIFactory's fuction: * KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); */ - TDEUI_EXPORT KAction *keyBindings(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *keyBindings(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the preferences/options dialog. */ - TDEUI_EXPORT KAction *preferences(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *preferences(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * The Customize Toolbar dialog. */ - TDEUI_EXPORT KAction *configureToolbars(const TQObject *recvr, + TDEUI_EXPORT TDEAction *configureToolbars(const TQObject *recvr, const char *slot, - KActionCollection* parent, + TDEActionCollection* parent, const char *name = 0 ); /** * The Configure Notifications dialog. * @since 3.1 */ - TDEUI_EXPORT KAction *configureNotifications(const TQObject *recvr, + TDEUI_EXPORT TDEAction *configureNotifications(const TQObject *recvr, const char *slot, - KActionCollection *parent, + TDEActionCollection *parent, const char *name = 0); /** * Display the help. */ - TDEUI_EXPORT KAction *help(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *help(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the help contents. */ - TDEUI_EXPORT KAction *helpContents(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *helpContents(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Trigger the What's This cursor. */ - TDEUI_EXPORT KAction *whatsThis(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *whatsThis(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display "Tip of the Day" * @since 3.1 */ - TDEUI_EXPORT KAction *tipOfDay(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *tipOfDay(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Open up the Report Bug dialog. */ - TDEUI_EXPORT KAction *reportBug(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *reportBug(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the application's About box. */ - TDEUI_EXPORT KAction *aboutApp(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *aboutApp(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display the About KDE dialog. */ - TDEUI_EXPORT KAction *aboutKDE(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *aboutKDE(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); /** * Display "Switch application language" dialog. * @since 3.5.8 */ - TDEUI_EXPORT KAction *switchApplicationLanguage(const TQObject *recvr, const char *slot, - KActionCollection* parent, const char *name = 0 ); + TDEUI_EXPORT TDEAction *switchApplicationLanguage(const TQObject *recvr, const char *slot, + TDEActionCollection* parent, const char *name = 0 ); } #endif // KSTDACTION_H diff --git a/tdeui/kstdaction_p.h b/tdeui/kstdaction_p.h index f7e649fa8..4a8fee92e 100644 --- a/tdeui/kstdaction_p.h +++ b/tdeui/kstdaction_p.h @@ -19,8 +19,8 @@ #ifndef _KSTDACTION_PRIVATE_H_ #define _KSTDACTION_PRIVATE_H_ -#include <klocale.h> -#include <kstdaccel.h> +#include <tdelocale.h> +#include <tdestdaccel.h> namespace KStdAction { @@ -28,7 +28,7 @@ namespace KStdAction struct KStdActionInfo { StdAction id; - KStdAccel::StdAccel idAccel; + TDEStdAccel::StdAccel idAccel; const char* psName; const char* psLabel; const char* psWhatsThis; @@ -37,82 +37,82 @@ struct KStdActionInfo static const KStdActionInfo g_rgActionInfo[] = { - { New, KStdAccel::New, "file_new", I18N_NOOP("&New"), 0, "filenew" }, - { Open, KStdAccel::Open, "file_open", I18N_NOOP("&Open..."), 0, "fileopen" }, - { OpenRecent, KStdAccel::AccelNone, "file_open_recent", I18N_NOOP("Open &Recent"), 0, "fileopen" }, - { Save, KStdAccel::Save, "file_save", I18N_NOOP("&Save"), 0, "filesave" }, - { SaveAs, KStdAccel::AccelNone, "file_save_as", I18N_NOOP("Save &As..."), 0, "filesaveas" }, - { Revert, KStdAccel::AccelNone, "file_revert", I18N_NOOP("Re&vert"), 0, "revert" }, - { Close, KStdAccel::Close, "file_close", I18N_NOOP("&Close"), 0, "fileclose" }, - { Print, KStdAccel::Print, "file_print", I18N_NOOP("&Print..."), 0, "fileprint" }, - { PrintPreview, KStdAccel::AccelNone, "file_print_preview", I18N_NOOP("Print Previe&w..."), 0, "filequickprint" }, - { Mail, KStdAccel::AccelNone, "file_mail", I18N_NOOP("&Mail..."), 0, "mail_send" }, - { Quit, KStdAccel::Quit, "file_quit", I18N_NOOP("&Quit"), 0, "exit" }, - - { Undo, KStdAccel::Undo, "edit_undo", I18N_NOOP("&Undo"), 0, "undo" }, - { Redo, KStdAccel::Redo, "edit_redo", I18N_NOOP("Re&do"), 0, "redo" }, - { Cut, KStdAccel::Cut, "edit_cut", I18N_NOOP("Cu&t"), 0, "editcut" }, - { Copy, KStdAccel::Copy, "edit_copy", I18N_NOOP("&Copy"), 0, "editcopy" }, - { Paste, KStdAccel::Paste, "edit_paste", I18N_NOOP("&Paste"), 0, "editpaste" }, - { PasteText, KStdAccel::Paste, "edit_paste", I18N_NOOP("&Paste"), 0, "editpaste" }, - { Clear, KStdAccel::AccelNone, "edit_clear", I18N_NOOP("C&lear"), 0, "editclear" }, - { SelectAll, KStdAccel::SelectAll, "edit_select_all", I18N_NOOP("Select &All"), 0, 0 }, - { Deselect, KStdAccel::Deselect, "edit_deselect", I18N_NOOP("Dese&lect"), 0, 0 }, - { Find, KStdAccel::Find, "edit_find", I18N_NOOP("&Find..."), 0, "find" }, - { FindNext, KStdAccel::FindNext, "edit_find_next", I18N_NOOP("Find &Next"), 0, "next" }, + { New, TDEStdAccel::New, "file_new", I18N_NOOP("&New"), 0, "filenew" }, + { Open, TDEStdAccel::Open, "file_open", I18N_NOOP("&Open..."), 0, "fileopen" }, + { OpenRecent, TDEStdAccel::AccelNone, "file_open_recent", I18N_NOOP("Open &Recent"), 0, "fileopen" }, + { Save, TDEStdAccel::Save, "file_save", I18N_NOOP("&Save"), 0, "filesave" }, + { SaveAs, TDEStdAccel::AccelNone, "file_save_as", I18N_NOOP("Save &As..."), 0, "filesaveas" }, + { Revert, TDEStdAccel::AccelNone, "file_revert", I18N_NOOP("Re&vert"), 0, "revert" }, + { Close, TDEStdAccel::Close, "file_close", I18N_NOOP("&Close"), 0, "fileclose" }, + { Print, TDEStdAccel::Print, "file_print", I18N_NOOP("&Print..."), 0, "fileprint" }, + { PrintPreview, TDEStdAccel::AccelNone, "file_print_preview", I18N_NOOP("Print Previe&w..."), 0, "filequickprint" }, + { Mail, TDEStdAccel::AccelNone, "file_mail", I18N_NOOP("&Mail..."), 0, "mail_send" }, + { Quit, TDEStdAccel::Quit, "file_quit", I18N_NOOP("&Quit"), 0, "exit" }, + + { Undo, TDEStdAccel::Undo, "edit_undo", I18N_NOOP("&Undo"), 0, "undo" }, + { Redo, TDEStdAccel::Redo, "edit_redo", I18N_NOOP("Re&do"), 0, "redo" }, + { Cut, TDEStdAccel::Cut, "edit_cut", I18N_NOOP("Cu&t"), 0, "editcut" }, + { Copy, TDEStdAccel::Copy, "edit_copy", I18N_NOOP("&Copy"), 0, "editcopy" }, + { Paste, TDEStdAccel::Paste, "edit_paste", I18N_NOOP("&Paste"), 0, "editpaste" }, + { PasteText, TDEStdAccel::Paste, "edit_paste", I18N_NOOP("&Paste"), 0, "editpaste" }, + { Clear, TDEStdAccel::AccelNone, "edit_clear", I18N_NOOP("C&lear"), 0, "editclear" }, + { SelectAll, TDEStdAccel::SelectAll, "edit_select_all", I18N_NOOP("Select &All"), 0, 0 }, + { Deselect, TDEStdAccel::Deselect, "edit_deselect", I18N_NOOP("Dese&lect"), 0, 0 }, + { Find, TDEStdAccel::Find, "edit_find", I18N_NOOP("&Find..."), 0, "find" }, + { FindNext, TDEStdAccel::FindNext, "edit_find_next", I18N_NOOP("Find &Next"), 0, "next" }, // FIXME: rename edit_find_last to edit_find_prev for KDE 4 - { FindPrev, KStdAccel::FindPrev, "edit_find_last", I18N_NOOP("Find Pre&vious"), 0, "previous" }, - { Replace, KStdAccel::Replace, "edit_replace", I18N_NOOP("&Replace..."), 0, 0 }, - - { ActualSize, KStdAccel::AccelNone, "view_actual_size", I18N_NOOP("&Actual Size"), 0, "viewmag1" }, - { FitToPage, KStdAccel::AccelNone, "view_fit_to_page", I18N_NOOP("&Fit to Page"), 0, "view_fit_window" }, - { FitToWidth, KStdAccel::AccelNone, "view_fit_to_width", I18N_NOOP("Fit to Page &Width"), 0, "view_fit_width" }, - { FitToHeight, KStdAccel::AccelNone, "view_fit_to_height", I18N_NOOP("Fit to Page &Height"), 0, "view_fit_height" }, - { ZoomIn, KStdAccel::ZoomIn, "view_zoom_in", I18N_NOOP("Zoom &In"), 0, "viewmag+" }, - { ZoomOut, KStdAccel::ZoomOut, "view_zoom_out", I18N_NOOP("Zoom &Out"), 0, "viewmag-" }, - { Zoom, KStdAccel::AccelNone, "view_zoom", I18N_NOOP("&Zoom..."), 0, "viewmag" }, - // KDE4: give Redisplay the shortcut KStdAccel::AccelReload - { Redisplay, KStdAccel::AccelNone, "view_redisplay", I18N_NOOP("&Redisplay"), 0, "reload" }, - - { Up, KStdAccel::Up, "go_up", I18N_NOOP("&Up"), 0, "up" }, + { FindPrev, TDEStdAccel::FindPrev, "edit_find_last", I18N_NOOP("Find Pre&vious"), 0, "previous" }, + { Replace, TDEStdAccel::Replace, "edit_replace", I18N_NOOP("&Replace..."), 0, 0 }, + + { ActualSize, TDEStdAccel::AccelNone, "view_actual_size", I18N_NOOP("&Actual Size"), 0, "viewmag1" }, + { FitToPage, TDEStdAccel::AccelNone, "view_fit_to_page", I18N_NOOP("&Fit to Page"), 0, "view_fit_window" }, + { FitToWidth, TDEStdAccel::AccelNone, "view_fit_to_width", I18N_NOOP("Fit to Page &Width"), 0, "view_fit_width" }, + { FitToHeight, TDEStdAccel::AccelNone, "view_fit_to_height", I18N_NOOP("Fit to Page &Height"), 0, "view_fit_height" }, + { ZoomIn, TDEStdAccel::ZoomIn, "view_zoom_in", I18N_NOOP("Zoom &In"), 0, "viewmag+" }, + { ZoomOut, TDEStdAccel::ZoomOut, "view_zoom_out", I18N_NOOP("Zoom &Out"), 0, "viewmag-" }, + { Zoom, TDEStdAccel::AccelNone, "view_zoom", I18N_NOOP("&Zoom..."), 0, "viewmag" }, + // KDE4: give Redisplay the shortcut TDEStdAccel::AccelReload + { Redisplay, TDEStdAccel::AccelNone, "view_redisplay", I18N_NOOP("&Redisplay"), 0, "reload" }, + + { Up, TDEStdAccel::Up, "go_up", I18N_NOOP("&Up"), 0, "up" }, // The following three have special i18n() needs for sLabel - { Back, KStdAccel::Back, "go_back", 0, 0, "back" }, - { Forward, KStdAccel::Forward, "go_forward", 0, 0, "forward" }, - { Home, KStdAccel::Home, "go_home", 0, 0, "gohome" }, - { Prior, KStdAccel::Prior, "go_previous", I18N_NOOP("&Previous Page"), 0, "back" }, - { Next, KStdAccel::Next, "go_next", I18N_NOOP("&Next Page"), 0, "forward" }, - { Goto, KStdAccel::AccelNone, "go_goto", I18N_NOOP("&Go To..."), 0, 0 }, - { GotoPage, KStdAccel::AccelNone, "go_goto_page", I18N_NOOP("&Go to Page..."), 0, "goto" }, - { GotoLine, KStdAccel::GotoLine, "go_goto_line", I18N_NOOP("&Go to Line..."), 0, 0 }, - { FirstPage, KStdAccel::Home, "go_first", I18N_NOOP("&First Page"), 0, "start" }, - { LastPage, KStdAccel::End, "go_last", I18N_NOOP("&Last Page"), 0, "finish" }, - - { AddBookmark, KStdAccel::AddBookmark, "bookmark_add", I18N_NOOP("&Add Bookmark"), 0, "bookmark_add" }, - { EditBookmarks, KStdAccel::AccelNone, "bookmark_edit", I18N_NOOP("&Edit Bookmarks"), 0, "bookmark" }, - - { Spelling, KStdAccel::AccelNone, "tools_spelling", I18N_NOOP("&Spelling..."), 0, "spellcheck" }, - - { ShowMenubar, KStdAccel::ShowMenubar, "options_show_menubar", I18N_NOOP("Show &Menubar"), 0, "showmenu" }, - { ShowToolbar, KStdAccel::AccelNone, "options_show_toolbar", I18N_NOOP("Show &Toolbar"), 0, 0 }, - { ShowStatusbar, KStdAccel::AccelNone, "options_show_statusbar", I18N_NOOP("Show St&atusbar"), 0, 0 }, - { FullScreen, KStdAccel::FullScreen, "fullscreen", I18N_NOOP("F&ull Screen Mode"), 0, "window_fullscreen" }, - { SaveOptions, KStdAccel::AccelNone, "options_save_options", I18N_NOOP("&Save Settings"), 0, 0 }, - { KeyBindings, KStdAccel::AccelNone, "options_configure_keybinding", I18N_NOOP("Configure S&hortcuts..."), 0,"configure_shortcuts" }, - { Preferences, KStdAccel::AccelNone, "options_configure", I18N_NOOP("&Configure %1..."), 0, "configure" }, - { ConfigureToolbars, KStdAccel::AccelNone, "options_configure_toolbars", I18N_NOOP("Configure Tool&bars..."), 0,"configure_toolbars" }, - { ConfigureNotifications, KStdAccel::AccelNone, "options_configure_notifications", I18N_NOOP("Configure &Notifications..."), 0, "knotify" }, + { Back, TDEStdAccel::Back, "go_back", 0, 0, "back" }, + { Forward, TDEStdAccel::Forward, "go_forward", 0, 0, "forward" }, + { Home, TDEStdAccel::Home, "go_home", 0, 0, "gohome" }, + { Prior, TDEStdAccel::Prior, "go_previous", I18N_NOOP("&Previous Page"), 0, "back" }, + { Next, TDEStdAccel::Next, "go_next", I18N_NOOP("&Next Page"), 0, "forward" }, + { Goto, TDEStdAccel::AccelNone, "go_goto", I18N_NOOP("&Go To..."), 0, 0 }, + { GotoPage, TDEStdAccel::AccelNone, "go_goto_page", I18N_NOOP("&Go to Page..."), 0, "goto" }, + { GotoLine, TDEStdAccel::GotoLine, "go_goto_line", I18N_NOOP("&Go to Line..."), 0, 0 }, + { FirstPage, TDEStdAccel::Home, "go_first", I18N_NOOP("&First Page"), 0, "start" }, + { LastPage, TDEStdAccel::End, "go_last", I18N_NOOP("&Last Page"), 0, "finish" }, + + { AddBookmark, TDEStdAccel::AddBookmark, "bookmark_add", I18N_NOOP("&Add Bookmark"), 0, "bookmark_add" }, + { EditBookmarks, TDEStdAccel::AccelNone, "bookmark_edit", I18N_NOOP("&Edit Bookmarks"), 0, "bookmark" }, + + { Spelling, TDEStdAccel::AccelNone, "tools_spelling", I18N_NOOP("&Spelling..."), 0, "spellcheck" }, + + { ShowMenubar, TDEStdAccel::ShowMenubar, "options_show_menubar", I18N_NOOP("Show &Menubar"), 0, "showmenu" }, + { ShowToolbar, TDEStdAccel::AccelNone, "options_show_toolbar", I18N_NOOP("Show &Toolbar"), 0, 0 }, + { ShowStatusbar, TDEStdAccel::AccelNone, "options_show_statusbar", I18N_NOOP("Show St&atusbar"), 0, 0 }, + { FullScreen, TDEStdAccel::FullScreen, "fullscreen", I18N_NOOP("F&ull Screen Mode"), 0, "window_fullscreen" }, + { SaveOptions, TDEStdAccel::AccelNone, "options_save_options", I18N_NOOP("&Save Settings"), 0, 0 }, + { KeyBindings, TDEStdAccel::AccelNone, "options_configure_keybinding", I18N_NOOP("Configure S&hortcuts..."), 0,"configure_shortcuts" }, + { Preferences, TDEStdAccel::AccelNone, "options_configure", I18N_NOOP("&Configure %1..."), 0, "configure" }, + { ConfigureToolbars, TDEStdAccel::AccelNone, "options_configure_toolbars", I18N_NOOP("Configure Tool&bars..."), 0,"configure_toolbars" }, + { ConfigureNotifications, TDEStdAccel::AccelNone, "options_configure_notifications", I18N_NOOP("Configure &Notifications..."), 0, "knotify" }, // the idea here is that Contents is used in menus, and Help in dialogs, so both share the same // shortcut - { Help, KStdAccel::Help, "help", 0, 0, "help" }, - { HelpContents, KStdAccel::Help, "help_contents", I18N_NOOP("%1 &Handbook"), 0, "contents" }, - { WhatsThis, KStdAccel::WhatsThis, "help_whats_this", I18N_NOOP("What's &This?"), 0, "contexthelp" }, - { TipofDay, KStdAccel::AccelNone, "help_show_tip", I18N_NOOP("Tip of the &Day"), 0, "idea" }, - { ReportBug, KStdAccel::AccelNone, "help_report_bug", I18N_NOOP("&Report Bug/Request Enhancement..."), 0, 0 }, - { SwitchApplicationLanguage, KStdAccel::AccelNone, "switch_application_language", I18N_NOOP("Switch application &language..."), 0, 0 }, - { AboutApp, KStdAccel::AccelNone, "help_about_app", I18N_NOOP("&About %1"), 0, 0 }, - { AboutKDE, KStdAccel::AccelNone, "help_about_kde", I18N_NOOP("About &Trinity"), 0,"about_kde" }, - { ActionNone, KStdAccel::AccelNone, 0, 0, 0, 0 } + { Help, TDEStdAccel::Help, "help", 0, 0, "help" }, + { HelpContents, TDEStdAccel::Help, "help_contents", I18N_NOOP("%1 &Handbook"), 0, "contents" }, + { WhatsThis, TDEStdAccel::WhatsThis, "help_whats_this", I18N_NOOP("What's &This?"), 0, "contexthelp" }, + { TipofDay, TDEStdAccel::AccelNone, "help_show_tip", I18N_NOOP("Tip of the &Day"), 0, "idea" }, + { ReportBug, TDEStdAccel::AccelNone, "help_report_bug", I18N_NOOP("&Report Bug/Request Enhancement..."), 0, 0 }, + { SwitchApplicationLanguage, TDEStdAccel::AccelNone, "switch_application_language", I18N_NOOP("Switch application &language..."), 0, 0 }, + { AboutApp, TDEStdAccel::AccelNone, "help_about_app", I18N_NOOP("&About %1"), 0, 0 }, + { AboutKDE, TDEStdAccel::AccelNone, "help_about_kde", I18N_NOOP("About &Trinity"), 0,"about_kde" }, + { ActionNone, TDEStdAccel::AccelNone, 0, 0, 0, 0 } }; inline const KStdActionInfo* infoPtr( StdAction id ) diff --git a/tdeui/kstdguiitem.cpp b/tdeui/kstdguiitem.cpp index 2367804a8..80bf54bce 100644 --- a/tdeui/kstdguiitem.cpp +++ b/tdeui/kstdguiitem.cpp @@ -19,8 +19,8 @@ #include "kstdguiitem.h" #include <kguiitem.h> -#include <klocale.h> -#include <kapplication.h> +#include <tdelocale.h> +#include <tdeapplication.h> KGuiItem KStdGuiItem::guiItem ( StdItem ui_enum ) { diff --git a/tdeui/kstdguiitem.h b/tdeui/kstdguiitem.h index 3014737ab..0a59d5969 100644 --- a/tdeui/kstdguiitem.h +++ b/tdeui/kstdguiitem.h @@ -86,7 +86,7 @@ public: static KGuiItem overwrite(); /** * Returns a KGuiItem suiting for cases where code or functionality - * runs under root privileges. Used in conjunction with KConfig Modules. + * runs under root privileges. Used in conjunction with TDEConfig Modules. */ static KGuiItem adminMode(); diff --git a/tdeui/kswitchlanguagedialog.cpp b/tdeui/kswitchlanguagedialog.cpp index fa43dcaf2..c82ffb83d 100644 --- a/tdeui/kswitchlanguagedialog.cpp +++ b/tdeui/kswitchlanguagedialog.cpp @@ -27,9 +27,9 @@ #include <tqmap.h> #include <klanguagebutton.h> -#include <kconfig.h> -#include <klocale.h> -#include <kmessagebox.h> +#include <tdeconfig.h> +#include <tdelocale.h> +#include <tdemessagebox.h> #include <kdebug.h> #include <kpushbutton.h> @@ -114,7 +114,7 @@ KSwitchLanguageDialog::KSwitchLanguageDialog( if (defaultLanguages.count() == 0) { - d->addLanguageButton(KGlobal::locale()->defaultLanguage(), true); + d->addLanguageButton(TDEGlobal::locale()->defaultLanguage(), true); } TQHBoxLayout *addButtonHorizontalLayout = new TQHBoxLayout(); @@ -185,7 +185,7 @@ void KSwitchLanguageDialog::languageOnButtonChanged(const TQString & languageCod { //update all buttons which have matching id //might update buttons which were not changed, but well... - languageButton->setText(KGlobal::locale()->twoAlphaToLanguageName(languageCode)); + languageButton->setText(TDEGlobal::locale()->twoAlphaToLanguageName(languageCode)); } } } @@ -207,12 +207,12 @@ void KSwitchLanguageDialog::slotOk() first = false; } - KConfig *config = KGlobal::config(); + TDEConfig *config = TDEGlobal::config(); if (d->applicationLanguageList().join(":") != languageString) { //list is different from defaults or saved languages list - KConfigGroup group(config, "Locale"); + TDEConfigGroup group(config, "Locale"); group.writeEntry("Language", languageString); config->sync(); @@ -241,7 +241,7 @@ KSwitchLanguageDialogPrivate::KSwitchLanguageDialogPrivate( void KSwitchLanguageDialogPrivate::fillApplicationLanguages(KLanguageButton *button) { - KLocale *locale = KGlobal::locale(); + TDELocale *locale = TDEGlobal::locale(); TQStringList allLanguages = locale->allLanguagesTwoAlpha(); for ( TQStringList::ConstIterator it = allLanguages.begin(); it != allLanguages.end(); ++it ) { @@ -258,12 +258,12 @@ void KSwitchLanguageDialogPrivate::fillApplicationLanguages(KLanguageButton *but TQStringList KSwitchLanguageDialogPrivate::applicationLanguageList() { - KConfig *config = KGlobal::config(); + TDEConfig *config = TDEGlobal::config(); TQStringList languagesList; if (config->hasGroup("Locale")) { - KConfigGroupSaver saver(config, "Locale"); + TDEConfigGroupSaver saver(config, "Locale"); if (config->hasKey("Language")) { @@ -272,7 +272,7 @@ TQStringList KSwitchLanguageDialogPrivate::applicationLanguageList() } if (languagesList.empty()) { - languagesList = KGlobal::locale()->languageList(); + languagesList = TDEGlobal::locale()->languageList(); } return languagesList; } @@ -283,7 +283,7 @@ void KSwitchLanguageDialogPrivate::addLanguageButton(const TQString & languageCo KLanguageButton *languageButton = new KLanguageButton(page); - languageButton->setText(KGlobal::locale()->twoAlphaToLanguageName(languageCode)); + languageButton->setText(TDEGlobal::locale()->twoAlphaToLanguageName(languageCode)); fillApplicationLanguages(languageButton); diff --git a/tdeui/ksyntaxhighlighter.cpp b/tdeui/ksyntaxhighlighter.cpp index e118fcd74..f7627621c 100644 --- a/tdeui/ksyntaxhighlighter.cpp +++ b/tdeui/ksyntaxhighlighter.cpp @@ -26,12 +26,12 @@ #include <tqsyntaxhighlighter.h> #include <tqtimer.h> -#include <klocale.h> -#include <kconfig.h> +#include <tdelocale.h> +#include <tdeconfig.h> #include <kdebug.h> -#include <kglobal.h> -#include <kspell.h> -#include <kapplication.h> +#include <tdeglobal.h> +#include <tdespell.h> +#include <tdeapplication.h> #include "ksyntaxhighlighter.h" @@ -234,7 +234,7 @@ TQStringList KSpellingHighlighter::personalWords() l.append( "KMail" ); l.append( "KOrganizer" ); l.append( "KAddressBook" ); - l.append( "KHTML" ); + l.append( "TDEHTML" ); l.append( "KIO" ); l.append( "KJS" ); l.append( "Konqueror" ); @@ -290,8 +290,8 @@ KDictSpellingHighlighter::KDictSpellingHighlighter( TQTextEdit *textEdit, d->checksDone = 0; d->completeRehighlightRequired = false; - KConfig *config = KGlobal::config(); - KConfigGroupSaver cs( config, "KSpell" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver cs( config, "KSpell" ); d->disablePercentage = config->readNumEntry( "KSpell_AsYouTypeDisablePercentage", 42 ); d->disablePercentage = QMIN( d->disablePercentage, 101 ); d->disableWordCount = config->readNumEntry( "KSpell_AsYouTypeDisableWordCount", 100 ); @@ -335,7 +335,7 @@ KDictSpellingHighlighter::~KDictSpellingHighlighter() void KDictSpellingHighlighter::slotSpellReady( KSpell *spell ) { kdDebug(0) << "KDictSpellingHighlighter::slotSpellReady( " << spell << " )" << endl; - KConfigGroup cg( KGlobal::config(),"KSpell" ); + TDEConfigGroup cg( TDEGlobal::config(),"KSpell" ); if ( cg.readEntry("KSpell_DoSpellChecking") != "0" ) { if ( d->globalConfig ) { @@ -371,7 +371,7 @@ bool KDictSpellingHighlighter::isMisspelled( const TQString &word ) // This debug is expensive, only enable it locally //kdDebug(0) << "KDictSpellingHighlighter::isMisspelled( \"" << word << "\" )" << endl; // Normally isMisspelled would look up a dictionary and return - // true or false, but kspell is asynchronous and slow so things + // true or false, but tdespell is asynchronous and slow so things // get tricky... // For auto detection ignore signature and reply prefix if ( !d->autoReady ) @@ -539,8 +539,8 @@ void KDictSpellingHighlighter::slotLocalSpellConfigChanged() TQString KDictSpellingHighlighter::spellKey() { - KConfig *config = KGlobal::config(); - KConfigGroupSaver cs( config, "KSpell" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver cs( config, "KSpell" ); config->reparseConfiguration(); TQString key; key += TQString::number( config->readNumEntry( "KSpell_NoRootAffix", 0 )); diff --git a/tdeui/ksystemtray.cpp b/tdeui/ksystemtray.cpp index 1ae786d67..5004d4bf1 100644 --- a/tdeui/ksystemtray.cpp +++ b/tdeui/ksystemtray.cpp @@ -19,14 +19,14 @@ */ #include "config.h" -#include "kaction.h" -#include "kmessagebox.h" -#include "kshortcut.h" +#include "tdeaction.h" +#include "tdemessagebox.h" +#include "tdeshortcut.h" #include "ksystemtray.h" -#include "kpopupmenu.h" -#include "kapplication.h" -#include "klocale.h" -#include "kaboutdata.h" +#include "tdepopupmenu.h" +#include "tdeapplication.h" +#include "tdelocale.h" +#include "tdeaboutdata.h" #ifdef Q_WS_X11 #include <twin.h> @@ -36,7 +36,7 @@ #include <kimageeffect.h> #include <kiconloader.h> -#include <kconfig.h> +#include <tdeconfig.h> #include <tqapplication.h> #include <tqbitmap.h> @@ -54,7 +54,7 @@ public: delete actionCollection; } - KActionCollection* actionCollection; + TDEActionCollection* actionCollection; bool on_all_desktops; // valid only when the parent widget was hidden }; @@ -66,7 +66,7 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) #endif d = new KSystemTrayPrivate; - d->actionCollection = new KActionCollection(this); + d->actionCollection = new TDEActionCollection(this); #ifdef Q_WS_X11 KWin::setSystemTrayWindowFor( winId(), parent?parent->topLevelWidget()->winId(): tqt_xrootwin() ); @@ -74,14 +74,14 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) setBackgroundMode(X11ParentRelative); setBackgroundOrigin(WindowOrigin); hasQuit = 0; - menu = new KPopupMenu( this ); + menu = new TDEPopupMenu( this ); menu->insertTitle( kapp->miniIcon(), kapp->caption() ); move( -1000, -1000 ); KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(maybeQuit()), d->actionCollection); if (parentWidget()) { - new KAction(i18n("Minimize"), KShortcut(), + new TDEAction(i18n("Minimize"), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT( minimizeRestoreAction() ), d->actionCollection, "minimizeRestore"); #ifdef Q_WS_X11 @@ -95,7 +95,7 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) { d->on_all_desktops = false; } - setCaption( KGlobal::instance()->aboutData()->programName()); + setCaption( TDEGlobal::instance()->aboutData()->programName()); setAlignment( alignment() | Qt::AlignVCenter | Qt::AlignHCenter ); // Handle the possibility that the requested system tray size is something other than 22x22 pixels, per the Free Desktop specifications @@ -112,7 +112,7 @@ void KSystemTray::showEvent( TQShowEvent * ) { if ( !hasQuit ) { menu->insertSeparator(); - KAction* action = d->actionCollection->action("minimizeRestore"); + TDEAction* action = d->actionCollection->action("minimizeRestore"); if (action) { @@ -136,7 +136,7 @@ void KSystemTray::enterEvent( TQEvent* e ) TQLabel::enterEvent( e ); } -KPopupMenu* KSystemTray::contextMenu() const +TDEPopupMenu* KSystemTray::contextMenu() const { return menu; } @@ -155,7 +155,7 @@ void KSystemTray::mousePressEvent( TQMouseEvent *e ) // fall through case Qt::RightButton: if ( parentWidget() ) { - KAction* action = d->actionCollection->action("minimizeRestore"); + TDEAction* action = d->actionCollection->action("minimizeRestore"); if ( parentWidget()->isVisible() ) action->setText( i18n("&Minimize") ); else @@ -175,7 +175,7 @@ void KSystemTray::mouseReleaseEvent( TQMouseEvent * ) } -void KSystemTray::contextMenuAboutToShow( KPopupMenu* ) +void KSystemTray::contextMenuAboutToShow( TDEPopupMenu* ) { } @@ -307,22 +307,22 @@ void KSystemTray::minimizeRestore( bool restore ) #endif } -KActionCollection* KSystemTray::actionCollection() +TDEActionCollection* KSystemTray::actionCollection() { return d->actionCollection; } -TQPixmap KSystemTray::loadIcon( const TQString &icon, KInstance *instance ) +TQPixmap KSystemTray::loadIcon( const TQString &icon, TDEInstance *instance ) { - KConfig *appCfg = kapp->config(); - KConfigGroupSaver configSaver(appCfg, "System Tray"); + TDEConfig *appCfg = kapp->config(); + TDEConfigGroupSaver configSaver(appCfg, "System Tray"); int iconWidth = appCfg->readNumEntry("systrayIconWidth", 22); - return instance->iconLoader()->loadIcon( icon, KIcon::Panel, iconWidth ); + return instance->iconLoader()->loadIcon( icon, TDEIcon::Panel, iconWidth ); } -TQPixmap KSystemTray::loadSizedIcon( const TQString &icon, int iconWidth, KInstance *instance ) +TQPixmap KSystemTray::loadSizedIcon( const TQString &icon, int iconWidth, TDEInstance *instance ) { - return instance->iconLoader()->loadIcon( icon, KIcon::Panel, iconWidth ); + return instance->iconLoader()->loadIcon( icon, TDEIcon::Panel, iconWidth ); } void KSystemTray::setPixmap( const TQPixmap& p ) diff --git a/tdeui/ksystemtray.h b/tdeui/ksystemtray.h index 79d73d3e3..f7e81c9b1 100644 --- a/tdeui/ksystemtray.h +++ b/tdeui/ksystemtray.h @@ -18,11 +18,11 @@ #ifndef KSYSTEMTRAY_H #define KSYSTEMTRAY_H -#include <kglobal.h> +#include <tdeglobal.h> #include <tqlabel.h> -class KActionCollection; -class KPopupMenu; +class TDEActionCollection; +class TDEPopupMenu; class KSystemTrayPrivate; /** @@ -89,14 +89,14 @@ public: Access to the context menu. This makes it easy to add new items to it. */ - KPopupMenu* contextMenu() const; + TDEPopupMenu* contextMenu() const; /** Easy access to the actions in the context menu Currently includes KStdAction::Quit and minimizeRestore @since 3.1 */ - KActionCollection* actionCollection(); + TDEActionCollection* actionCollection(); /** * Changes the tray's icon. @@ -105,7 +105,7 @@ public: /** * Changes the tray's text description (which can be seen e.g. in the systray - * configuration dialog). The default value is KAboutData::programName(). + * configuration dialog). The default value is TDEAboutData::programName(). */ virtual void setCaption( const TQString& title ); @@ -117,7 +117,7 @@ public: * * @since 3.2 */ - static TQPixmap loadIcon( const TQString &icon, KInstance *instance=KGlobal::instance() ); + static TQPixmap loadIcon( const TQString &icon, TDEInstance *instance=TDEGlobal::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 TQPixmap loadSizedIcon( const TQString &icon, int iconWidth, KInstance *instance=KGlobal::instance() ); + static TQPixmap loadSizedIcon( const TQString &icon, int iconWidth, TDEInstance *instance=TDEGlobal::instance() ); signals: /** @@ -183,7 +183,7 @@ protected: Makes it easy to adjust some menu items right before the context menu becomes visible. */ - virtual void contextMenuAboutToShow( KPopupMenu* menu ); + virtual void contextMenuAboutToShow( TDEPopupMenu* menu ); /** Reimplemented for internal reasons. @@ -202,7 +202,7 @@ private slots: private: void activateOrHide(); void minimizeRestore( bool restore ); - KPopupMenu* menu; + TDEPopupMenu* menu; // minimizeRestoreId is no longer needed. remove in KDE 4.0 int minimizeRestoreId; uint hasQuit :1; diff --git a/tdeui/ktabbar.cpp b/tdeui/ktabbar.cpp index a2d20a505..911162f14 100644 --- a/tdeui/ktabbar.cpp +++ b/tdeui/ktabbar.cpp @@ -26,9 +26,9 @@ #include <tqpushbutton.h> #include <tqtooltip.h> -#include <kglobalsettings.h> +#include <tdeglobalsettings.h> #include <kiconloader.h> -#include <klocale.h> +#include <tdelocale.h> #include "ktabbar.h" #include "ktabwidget.h" @@ -123,7 +123,7 @@ void KTabBar::mouseMoveEvent( TQMouseEvent *e ) mDragSwitchTab = 0; } - int delay = KGlobalSettings::dndEventDelay(); + int delay = TDEGlobalSettings::dndEventDelay(); 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 ) @@ -136,7 +136,7 @@ void KTabBar::mouseMoveEvent( TQMouseEvent *e ) } else if ( e->state() == Qt::MidButton ) { if (mReorderStartTab==-1) { - int delay = KGlobalSettings::dndEventDelay(); + int delay = TDEGlobalSettings::dndEventDelay(); 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 ) @@ -191,7 +191,7 @@ void KTabBar::mouseMoveEvent( TQMouseEvent *e ) } mHoverCloseButton = new TQPushButton( this ); - mHoverCloseButton->setIconSet( KGlobal::iconLoader()->loadIconSet("fileclose", KIcon::Toolbar, KIcon::SizeSmall) ); + mHoverCloseButton->setIconSet( TDEGlobal::iconLoader()->loadIconSet("fileclose", TDEIcon::Toolbar, TDEIcon::SizeSmall) ); mHoverCloseButton->setGeometry( rect ); TQToolTip::add(mHoverCloseButton,i18n("Close this tab")); mHoverCloseButton->setFlat(true); diff --git a/tdeui/ktabwidget.cpp b/tdeui/ktabwidget.cpp index a87a677d6..5eef3dd73 100644 --- a/tdeui/ktabwidget.cpp +++ b/tdeui/ktabwidget.cpp @@ -22,7 +22,7 @@ #include <tqstyle.h> #include <tqstylesheet.h> -#include <kconfig.h> +#include <tdeconfig.h> #include <kiconloader.h> #include <kstringhandler.h> @@ -42,9 +42,9 @@ public: KTabWidgetPrivate() { m_automaticResizeTabs = false; - KConfigGroupSaver groupsaver(KGlobal::config(), "General"); - m_maxLength = KGlobal::config()->readNumEntry("MaximumTabLength", 30); - m_minLength = KGlobal::config()->readNumEntry("MinimumTabLength", 3); + TDEConfigGroupSaver groupsaver(TDEGlobal::config(), "General"); + m_maxLength = TDEGlobal::config()->readNumEntry("MaximumTabLength", 30); + m_minLength = TDEGlobal::config()->readNumEntry("MinimumTabLength", 3); m_CurrentMaxLength = m_minLength; } }; @@ -414,7 +414,7 @@ void KTabWidget::moveTab( int from, int to ) blockSignals(true); removePage( w ); - // Work-around kmdi brain damage which calls showPage() in insertTab() + // Work-around tdemdi brain damage which calls showPage() in insertTab() TQTab * t = new TQTab(); t->setText(tablabel); TQTabWidget::insertTab( w, t, to ); diff --git a/tdeui/ktextbrowser.cpp b/tdeui/ktextbrowser.cpp index 6b3685a81..a4b716db7 100644 --- a/tdeui/ktextbrowser.cpp +++ b/tdeui/ktextbrowser.cpp @@ -19,8 +19,8 @@ #include <tqpopupmenu.h> -#include <kapplication.h> -#include <kglobalsettings.h> +#include <tdeapplication.h> +#include <tdeglobalsettings.h> #include <ktextbrowser.h> #include <kcursor.h> #include <kurl.h> @@ -112,7 +112,7 @@ void KTextBrowser::viewportMouseMoveEvent( TQMouseEvent* e) void KTextBrowser::contentsWheelEvent( TQWheelEvent *e ) { - if ( KGlobalSettings::wheelMouseZooms() ) + if ( TDEGlobalSettings::wheelMouseZooms() ) TQTextBrowser::contentsWheelEvent( e ); else // thanks, we don't want to zoom, so skip QTextEdit's impl. TQScrollView::contentsWheelEvent( e ); diff --git a/tdeui/ktextedit.cpp b/tdeui/ktextedit.cpp index bc077ddb2..445540099 100644 --- a/tdeui/ktextedit.cpp +++ b/tdeui/ktextedit.cpp @@ -24,12 +24,12 @@ #include <tqpopupmenu.h> #include <ksyntaxhighlighter.h> -#include <kspell.h> +#include <tdespell.h> #include <kcursor.h> -#include <kglobalsettings.h> -#include <kstdaccel.h> +#include <tdeglobalsettings.h> +#include <tdestdaccel.h> #include <kiconloader.h> -#include <klocale.h> +#include <tdelocale.h> class KTextEdit::KTextEditPrivate { @@ -75,44 +75,44 @@ void KTextEdit::keyPressEvent( TQKeyEvent *e ) { KKey key( e ); - if ( KStdAccel::copy().contains( key ) ) { + if ( TDEStdAccel::copy().contains( key ) ) { copy(); e->accept(); return; } - else if ( KStdAccel::paste().contains( key ) ) { + else if ( TDEStdAccel::paste().contains( key ) ) { paste(); e->accept(); return; } - else if ( KStdAccel::cut().contains( key ) ) { + else if ( TDEStdAccel::cut().contains( key ) ) { cut(); e->accept(); return; } - else if ( KStdAccel::undo().contains( key ) ) { + else if ( TDEStdAccel::undo().contains( key ) ) { undo(); e->accept(); return; } - else if ( KStdAccel::redo().contains( key ) ) { + else if ( TDEStdAccel::redo().contains( key ) ) { redo(); e->accept(); return; } - else if ( KStdAccel::deleteWordBack().contains( key ) ) + else if ( TDEStdAccel::deleteWordBack().contains( key ) ) { deleteWordBack(); e->accept(); return; } - else if ( KStdAccel::deleteWordForward().contains( key ) ) + else if ( TDEStdAccel::deleteWordForward().contains( key ) ) { deleteWordForward(); e->accept(); return; } - else if ( KStdAccel::backwardWord().contains( key ) ) + else if ( TDEStdAccel::backwardWord().contains( key ) ) { CursorAction action = MoveWordBackward; int para, index; @@ -123,7 +123,7 @@ void KTextEdit::keyPressEvent( TQKeyEvent *e ) e->accept(); return; } - else if ( KStdAccel::forwardWord().contains( key ) ) + else if ( TDEStdAccel::forwardWord().contains( key ) ) { CursorAction action = MoveWordForward; int para, index; @@ -134,43 +134,43 @@ void KTextEdit::keyPressEvent( TQKeyEvent *e ) e->accept(); return; } - else if ( KStdAccel::next().contains( key ) ) + else if ( TDEStdAccel::next().contains( key ) ) { moveCursor( MovePgDown, false ); e->accept(); return; } - else if ( KStdAccel::prior().contains( key ) ) + else if ( TDEStdAccel::prior().contains( key ) ) { moveCursor( MovePgUp, false ); e->accept(); return; } - else if ( KStdAccel::home().contains( key ) ) + else if ( TDEStdAccel::home().contains( key ) ) { moveCursor( MoveHome, false ); e->accept(); return; } - else if ( KStdAccel::end().contains( key ) ) + else if ( TDEStdAccel::end().contains( key ) ) { moveCursor( MoveEnd, false ); e->accept(); return; } - else if ( KStdAccel::beginningOfLine().contains( key ) ) + else if ( TDEStdAccel::beginningOfLine().contains( key ) ) { moveCursor( MoveLineStart, false ); e->accept(); return; } - else if ( KStdAccel::endOfLine().contains( key ) ) + else if ( TDEStdAccel::endOfLine().contains( key ) ) { moveCursor(MoveLineEnd, false); e->accept(); return; } - else if ( KStdAccel::pasteSelection().contains( key ) ) + else if ( TDEStdAccel::pasteSelection().contains( key ) ) { TQString text = TQApplication::clipboard()->text( TQClipboard::Selection); if ( !text.isEmpty() ) @@ -252,7 +252,7 @@ TQPopupMenu *KTextEdit::createPopupMenu() void KTextEdit::contentsWheelEvent( TQWheelEvent *e ) { - if ( KGlobalSettings::wheelMouseZooms() ) + if ( TDEGlobalSettings::wheelMouseZooms() ) TQTextEdit::contentsWheelEvent( e ); else // thanks, we don't want to zoom, so skip QTextEdit's impl. TQScrollView::contentsWheelEvent( e ); diff --git a/tdeui/ktimezonewidget.cpp b/tdeui/ktimezonewidget.cpp index a9a73a4f5..f6488847f 100644 --- a/tdeui/ktimezonewidget.cpp +++ b/tdeui/ktimezonewidget.cpp @@ -19,9 +19,9 @@ #include <kdialog.h> #include <kdebug.h> -#include <kfile.h> -#include <klistview.h> -#include <klocale.h> +#include <tdefile.h> +#include <tdelistview.h> +#include <tdelocale.h> #include <kstandarddirs.h> #include <ktimezones.h> #include <ktimezonewidget.h> @@ -34,7 +34,7 @@ #define COLUMN_ZONE 3 KTimezoneWidget::KTimezoneWidget(TQWidget *parent, const char *name, KTimezones *db) : - KListView(parent, name), + TDEListView(parent, name), d(0) { // If the user did not provide a timezone database, we'll use the system default. @@ -115,7 +115,7 @@ void KTimezoneWidget::setSelected(const TQString &zone, bool selected) { if (listItem->text(COLUMN_ZONE) == zone) { - KListView::setSelected(listItem, selected); + TDEListView::setSelected(listItem, selected); // Ensure the selected item is visible as appropriate. listItem = selectedItem(); diff --git a/tdeui/ktimezonewidget.h b/tdeui/ktimezonewidget.h index 8e42e3a6a..70d63521e 100644 --- a/tdeui/ktimezonewidget.h +++ b/tdeui/ktimezonewidget.h @@ -21,7 +21,7 @@ #define KTIMEZONEWIDGET_H #include <tdelibs_export.h> -#include <klistview.h> +#include <tdelistview.h> #include <tqstring.h> class KTimezone; @@ -49,7 +49,7 @@ class KTimezoneWidgetPrivate; * \code * * m_timezones = new KTimezoneWidget(this, "Timezones", vcalendarTimezones); - * m_timezones->setSelectionModeExt(KListView::Multi); + * m_timezones->setSelectionModeExt(TDEListView::Multi); * ... * \endcode * @@ -57,7 +57,7 @@ class KTimezoneWidgetPrivate; * @since 3.5 */ class TDEUI_EXPORT KTimezoneWidget : - public KListView + public TDEListView { Q_OBJECT @@ -98,7 +98,7 @@ public: * transformed via an i18n lookup, so the caller should previously have * set the timezone catalogue: * \code - * KGlobal::locale()->insertCatalogue("timezones"); + * TDEGlobal::locale()->insertCatalogue("timezones"); * \endcode * * @return formatted timezone name. diff --git a/tdeui/ktip.cpp b/tdeui/ktip.cpp index 3be1d57e6..b3e7d832b 100644 --- a/tdeui/ktip.cpp +++ b/tdeui/ktip.cpp @@ -33,20 +33,20 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqtextstream.h> #include <tqimage.h> -#include <kaboutdata.h> -#include <kapplication.h> -#include <kconfig.h> +#include <tdeaboutdata.h> +#include <tdeapplication.h> +#include <tdeconfig.h> #include <kdebug.h> -#include <kglobal.h> +#include <tdeglobal.h> #include <kiconloader.h> -#include <klocale.h> +#include <tdelocale.h> #include <kpushbutton.h> #include <kseparator.h> #include <kstandarddirs.h> #include <kstdguiitem.h> #include <ktextbrowser.h> #include <kiconeffect.h> -#include <kglobalsettings.h> +#include <tdeglobalsettings.h> #ifdef Q_WS_X11 #include <twin.h> @@ -59,7 +59,7 @@ KTipDatabase::KTipDatabase(const TQString &_tipFile) { TQString tipFile = _tipFile; if (tipFile.isEmpty()) - tipFile = TQString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips"; + tipFile = TQString::fromLatin1(TDEGlobal::instance()->aboutData()->appName()) + "/tips"; loadTips(tipFile); @@ -72,7 +72,7 @@ KTipDatabase::KTipDatabase( const TQStringList& tipsFiles ) { if ( tipsFiles.isEmpty() || ( ( tipsFiles.count() == 1 ) && tipsFiles.first().isEmpty() ) ) { - addTips(TQString::fromLatin1(KGlobal::instance()->aboutData()->appName()) + "/tips"); + addTips(TQString::fromLatin1(TDEGlobal::instance()->aboutData()->appName()) + "/tips"); } else { @@ -180,7 +180,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) TQImage img; int h,s,v; - mBlendedColor = KGlobalSettings::activeTitleColor(); + mBlendedColor = TDEGlobalSettings::activeTitleColor(); mBlendedColor.hsv(&h,&s,&v); mBlendedColor.setHsv(h, int(s*(71/76.0)), int(v*(67/93.0))); @@ -188,17 +188,17 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) { img = TQImage(locate("data", "kdewizard/pics/wizard_small.png")); // colorize and check to figure the correct color - KIconEffect::colorize(img, mBlendedColor, 1.0); + TDEIconEffect::colorize(img, mBlendedColor, 1.0); QRgb colPixel( img.pixel(0,0) ); mBlendedColor = TQColor(tqRed(colPixel),tqGreen(colPixel),tqBlue(colPixel)); } - mBaseColor = KGlobalSettings::alternateBackgroundColor(); + mBaseColor = TDEGlobalSettings::alternateBackgroundColor(); mBaseColor.hsv(&h,&s,&v); mBaseColor.setHsv(h, int(s*(10/6.0)), int(v*(93/99.0))); - mTextColor = KGlobalSettings::textColor(); + mTextColor = TDEGlobalSettings::textColor(); mDatabase = db; @@ -206,8 +206,8 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) setCaption(i18n("Tip of the Day")); #ifdef Q_WS_X11 KWin::setIcons( winId(), - KGlobal::iconLoader()->loadIcon( "idea", KIcon::NoGroup, 32 ), - KGlobal::iconLoader()->loadIcon( "idea", KIcon::NoGroup, 16 ) ); + TDEGlobal::iconLoader()->loadIcon( "idea", TDEIcon::NoGroup, 32 ), + TDEGlobal::iconLoader()->loadIcon( "idea", TDEIcon::NoGroup, 16 ) ); #endif TQVBoxLayout *vbox = new TQVBoxLayout(this, marginHint(), spacingHint()); @@ -222,7 +222,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) TQLabel *titlePane = new TQLabel(this); titlePane->setBackgroundPixmap(locate("data", "tdeui/pics/ktip-background.png")); titlePane->setText(i18n("Did you know...?\n")); - titlePane->setFont(TQFont(KGlobalSettings::generalFont().family(), 20, TQFont::Bold)); + titlePane->setFont(TQFont(TDEGlobalSettings::generalFont().family(), 20, TQFont::Bold)); titlePane->setAlignment(TQLabel::AlignCenter); pl->addWidget(titlePane, 100); } @@ -244,7 +244,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) mTipText->setWrapPolicy( TQTextEdit::AtWordOrDocumentBoundary ); mTipText->mimeSourceFactory()->addFilePath( - KGlobal::dirs()->findResourceDir("data", "kdewizard/pics")+"kdewizard/pics/"); + TDEGlobal::dirs()->findResourceDir("data", "kdewizard/pics")+"kdewizard/pics/"); mTipText->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain); mTipText->setHScrollBarMode(TQScrollView::AlwaysOff); mTipText->setLinkUnderline(false); @@ -258,7 +258,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) pal.setColor( TQPalette::Inactive, TQColorGroup::Link, mBlendedColor ); mTipText->setPalette(pal); - TQStringList icons = KGlobal::dirs()->resourceDirs("icon"); + TQStringList icons = TDEGlobal::dirs()->resourceDirs("icon"); TQStringList::Iterator it; for (it = icons.begin(); it != icons.end(); ++it) mTipText->mimeSourceFactory()->addFilePath(*it); @@ -273,7 +273,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) resize(550, 230); TQSize sh = size(); - TQRect rect = KGlobalSettings::splashScreenDesktopGeometry(); + TQRect rect = TDEGlobalSettings::splashScreenDesktopGeometry(); move(rect.x() + (rect.width() - sh.width())/2, rect.y() + (rect.height() - sh.height())/2); @@ -301,7 +301,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) ok->setDefault(true); hbox2->addWidget(ok); - KConfigGroup config(kapp->config(), "TipOfDay"); + TDEConfigGroup config(kapp->config(), "TipOfDay"); mTipOnStart->setChecked(config.readBoolEntry("RunOnStart", true)); connect(next, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextTip())); @@ -332,7 +332,7 @@ void KTipDialog::showTip(TQWidget *parent, const TQString &tipFile, bool force) void KTipDialog::showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bool force) { - KConfigGroup configGroup(kapp->config(), "TipOfDay"); + TDEConfigGroup configGroup(kapp->config(), "TipOfDay"); const bool runOnStart = configGroup.readBoolEntry("RunOnStart", true); @@ -374,7 +374,7 @@ static TQString fixTip(TQString tip) if (iconRegExp.search(tip)>-1) { TQString iconName = iconRegExp.cap(1); if (!iconName.isEmpty()) - if (KGlobal::dirs()->findResource("icon", iconName).isEmpty()) + if (TDEGlobal::dirs()->findResource("icon", iconName).isEmpty()) tip.replace("crystalsvg","hicolor"); } @@ -418,7 +418,7 @@ static TQString fixTip(TQString tip) void KTipDialog::setShowOnStart(bool on) { - KConfigGroup config(kapp->config(), "TipOfDay"); + TDEConfigGroup config(kapp->config(), "TipOfDay"); config.writeEntry("RunOnStart", on); config.sync(); } diff --git a/tdeui/ktip.h b/tdeui/ktip.h index d18efd27e..a506902bf 100644 --- a/tdeui/ktip.h +++ b/tdeui/ktip.h @@ -131,7 +131,7 @@ public: * * @param parent Parent widget of TipDialog. * @param tipFile The name of the tip file. It has be relative to the "data" - * resource of KStandardDirs + * resource of TDEStandardDirs * @param force If true, the dialog is show, even when the users * disabled it. */ @@ -144,7 +144,7 @@ public: * * @param parent Parent widget of TipDialog. * @param tipFiles A List of tip files. Each has be relative to the "data" - * resource of KStandardDirs + * resource of TDEStandardDirs * @param force If true, the dialog is show, even when the users * disabled it. */ diff --git a/tdeui/kurllabel.cpp b/tdeui/kurllabel.cpp index 71f90abd9..749b4f5b5 100644 --- a/tdeui/kurllabel.cpp +++ b/tdeui/kurllabel.cpp @@ -27,7 +27,7 @@ #include <tqapplication.h> #include <kcursor.h> -#include <kglobalsettings.h> +#include <tdeglobalsettings.h> #include "kurllabel.h" @@ -36,7 +36,7 @@ class KURLLabel::Private public: Private (const TQString& url, KURLLabel* label) : URL (url), - LinkColor (KGlobalSettings::linkColor()), + LinkColor (TDEGlobalSettings::linkColor()), HighlightedLinkColor (Qt::red), Tip(url), Cursor (0L), @@ -358,7 +358,7 @@ bool KURLLabel::event (TQEvent *e) p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background)); p.setColor(TQColorGroup::Foreground, palette().active().foreground()); setPalette(p); - d->LinkColor = KGlobalSettings::linkColor(); + d->LinkColor = TDEGlobalSettings::linkColor(); setLinkColor(d->LinkColor); return true; } diff --git a/tdeui/kwhatsthismanager.cpp b/tdeui/kwhatsthismanager.cpp index 2f4d1750f..46643f6f0 100644 --- a/tdeui/kwhatsthismanager.cpp +++ b/tdeui/kwhatsthismanager.cpp @@ -21,8 +21,8 @@ #include <tqvariant.h> #include <kdebug.h> #include <tqtextedit.h> -#include <klocale.h> -#include <kapplication.h> +#include <tdelocale.h> +#include <tdeapplication.h> KWhatsThisManager *KWhatsThisManager::s_instance = 0; diff --git a/tdeui/kwhatsthismanager_p.h b/tdeui/kwhatsthismanager_p.h index cce1c8ea5..084c83641 100644 --- a/tdeui/kwhatsthismanager_p.h +++ b/tdeui/kwhatsthismanager_p.h @@ -30,7 +30,7 @@ class TQStyleSheet; class TQTextEdit; /** - * This class is used automatically by KMainWindow and KDialog to attach a + * This class is used automatically by TDEMainWindow and KDialog to attach a * What's This templates to all new widgets. If you don't use either of those * classes and want this functionality, call KWhatsThisManager::init () before * creating any widgets. diff --git a/tdeui/kwizard.cpp b/tdeui/kwizard.cpp index 21462faad..b8fa1e88a 100644 --- a/tdeui/kwizard.cpp +++ b/tdeui/kwizard.cpp @@ -22,8 +22,8 @@ #include <tqpushbutton.h> #include <kiconloader.h> -#include <klocale.h> -#include <kglobalsettings.h> +#include <tdelocale.h> +#include <tdeglobalsettings.h> #include <kstdguiitem.h> #include "kwizard.h" @@ -31,7 +31,7 @@ KWizard::KWizard( TQWidget *parent, const char *name, bool modal, WFlags f ) : TQWizard( parent, name, modal, f ) { - bool useIcons = KGlobalSettings::showIconsOnPushButtons(); + bool useIcons = TDEGlobalSettings::showIconsOnPushButtons(); if ( useIcons ) { diff --git a/tdeui/kxmlgui.xsd b/tdeui/kxmlgui.xsd index c0979cb72..dc2fad341 100644 --- a/tdeui/kxmlgui.xsd +++ b/tdeui/kxmlgui.xsd @@ -148,7 +148,7 @@ Defines both Standard and app-specific actions. An action can appear in a menu, a toolbar or in a menubar. Attributes: - - name of the action: this is matched with the KAction name. + - name of the action: this is matched with the TDEAction name. - group: this is used to control the placement of the action when merging e.g. a part, it matches the name of a DefineGroup in the mainwindow's rc file. @@ -157,7 +157,7 @@ there. Note that this feature is currently only available for the mainwindow, not for parts/plugins. - text, whatsThis, toolTip, shortText, shortcut, icon: all those are - mapped to KAction properties. + mapped to TDEAction properties. </xsd:documentation> diff --git a/tdeui/kxmlguibuilder.cpp b/tdeui/kxmlguibuilder.cpp index c31242ff1..ff4083779 100644 --- a/tdeui/kxmlguibuilder.cpp +++ b/tdeui/kxmlguibuilder.cpp @@ -18,16 +18,16 @@ Boston, MA 02110-1301, USA. */ -#include "kapplication.h" +#include "tdeapplication.h" #include "kxmlguibuilder.h" -#include "kmenubar.h" -#include "kpopupmenu.h" -#include "ktoolbar.h" +#include "tdemenubar.h" +#include "tdepopupmenu.h" +#include "tdetoolbar.h" #include "kstatusbar.h" -#include "kmainwindow.h" -#include "kaction.h" -#include "kglobalsettings.h" -#include <klocale.h> +#include "tdemainwindow.h" +#include "tdeaction.h" +#include "tdeglobalsettings.h" +#include <tdelocale.h> #include <kiconloader.h> #include <kdebug.h> #include <tqobjectlist.h> @@ -61,7 +61,7 @@ public: TQString attrIcon; - KInstance *m_instance; + TDEInstance *m_instance; KXMLGUIClient *m_client; }; @@ -116,9 +116,9 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ id = -1; if ( element.tagName().lower() == d->tagMainWindow ) { - KMainWindow *mainwindow = 0; - if ( ::tqqt_cast<KMainWindow *>( d->m_widget ) ) - mainwindow = static_cast<KMainWindow *>(d->m_widget); + TDEMainWindow *mainwindow = 0; + if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) + mainwindow = static_cast<TDEMainWindow *>(d->m_widget); return mainwindow; } @@ -127,8 +127,8 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ { KMenuBar *bar; - if ( ::tqqt_cast<KMainWindow *>( d->m_widget ) ) - bar = static_cast<KMainWindow *>(d->m_widget)->menuBar(); + if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) + bar = static_cast<TDEMainWindow *>(d->m_widget)->menuBar(); else bar = new KMenuBar( d->m_widget ); @@ -139,21 +139,21 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ if ( element.tagName().lower() == d->tagMenu ) { // Look up to see if we are inside a mainwindow. If yes, then - // use it as parent widget (to get kaction to plug itself into the + // use it as parent widget (to get tdeaction to plug itself into the // mainwindow). Don't use a popupmenu as parent widget, otherwise // 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. TQWidget* p = parent; - while ( p && !::tqqt_cast<KMainWindow *>( p ) ) + while ( p && !::tqqt_cast<TDEMainWindow *>( p ) ) p = p->parentWidget(); TQCString name = element.attribute( d->attrName ).utf8(); - if (!kapp->authorizeKAction(name)) + if (!kapp->authorizeTDEAction(name)) return 0; - KPopupMenu *popup = new KPopupMenu( p, name); + TDEPopupMenu *popup = new TDEPopupMenu( p, name); TQString i18nText; TQDomElement textElem = element.namedItem( d->attrText1 ).toElement(); @@ -174,9 +174,9 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ if ( !icon.isEmpty() ) { - KInstance *instance = d->m_instance; + TDEInstance *instance = d->m_instance; if ( !instance ) - instance = KGlobal::instance(); + instance = TDEGlobal::instance(); pix = SmallIconSet( icon, 16, instance ); } @@ -205,13 +205,13 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ TQCString name = element.attribute( d->attrName ).utf8(); - KToolBar *bar = static_cast<KToolBar*>(TQT_TQWIDGET(d->m_widget->child( name, "KToolBar" ))); + TDEToolBar *bar = static_cast<TDEToolBar*>(TQT_TQWIDGET(d->m_widget->child( name, "TDEToolBar" ))); if( !bar ) { - bar = new KToolBar( d->m_widget, name, honor, false ); + bar = new TDEToolBar( d->m_widget, name, honor, false ); } - if ( ::tqqt_cast<KMainWindow *>( d->m_widget ) ) + if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) { if ( d->m_client && !d->m_client->xmlFile().isEmpty() ) bar->setXMLGUIClient( d->m_client ); @@ -224,9 +224,9 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ if ( element.tagName().lower() == d->tagStatusBar ) { - if ( ::tqqt_cast<KMainWindow *>( d->m_widget ) ) + if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) { - KMainWindow *mainWin = static_cast<KMainWindow *>(d->m_widget); + TDEMainWindow *mainWin = static_cast<TDEMainWindow *>(d->m_widget); mainWin->statusBar()->show(); return mainWin->statusBar(); } @@ -253,9 +253,9 @@ void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQD delete container; } - else if ( ::tqqt_cast<KToolBar *>( container ) ) + else if ( ::tqqt_cast<TDEToolBar *>( container ) ) { - KToolBar *tb = static_cast<KToolBar *>( container ); + TDEToolBar *tb = static_cast<TDEToolBar *>( container ); tb->saveState( element ); delete tb; @@ -271,7 +271,7 @@ void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQD } else if ( ::tqqt_cast<KStatusBar *>( container ) ) { - if ( ::tqqt_cast<KMainWindow *>( d->m_widget ) ) + if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) container->hide(); else delete static_cast<KStatusBar *>(container); @@ -319,9 +319,9 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo } else if ( ::tqqt_cast<TQMenuBar *>( parent ) ) return static_cast<TQMenuBar *>(parent)->insertSeparator( index ); - else if ( ::tqqt_cast<KToolBar *>( parent ) ) + else if ( ::tqqt_cast<TDEToolBar *>( parent ) ) { - KToolBar *bar = static_cast<KToolBar *>( parent ); + TDEToolBar *bar = static_cast<TDEToolBar *>( parent ); bool isLineSep = true; @@ -339,7 +339,7 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo } } - int id = KAction::getToolButtonID(); + int id = TDEAction::getToolButtonID(); if ( isLineSep ) bar->insertLineSeparator( index, id ); @@ -351,12 +351,12 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo } else if ( element.tagName().lower() == d->tagTearOffHandle ) { - if ( ::tqqt_cast<TQPopupMenu *>( parent ) && KGlobalSettings::insertTearOffHandle()) + if ( ::tqqt_cast<TQPopupMenu *>( parent ) && TDEGlobalSettings::insertTearOffHandle()) return static_cast<TQPopupMenu *>(parent)->insertTearOffHandle( -1, index ); } else if ( element.tagName().lower() == d->tagMenuTitle ) { - if ( ::tqqt_cast<KPopupMenu *>( parent ) ) + if ( ::tqqt_cast<TDEPopupMenu *>( parent ) ) { TQString i18nText; TQCString text = element.text().utf8(); @@ -371,17 +371,17 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo if ( !icon.isEmpty() ) { - KInstance *instance = d->m_instance; + TDEInstance *instance = d->m_instance; if ( !instance ) - instance = KGlobal::instance(); + instance = TDEGlobal::instance(); pix = SmallIcon( icon, instance ); } if ( !icon.isEmpty() ) - return static_cast<KPopupMenu *>(parent)->insertTitle( pix, i18nText, -1, index ); + return static_cast<TDEPopupMenu *>(parent)->insertTitle( pix, i18nText, -1, index ); else - return static_cast<KPopupMenu *>(parent)->insertTitle( i18nText, -1, index ); + return static_cast<TDEPopupMenu *>(parent)->insertTitle( i18nText, -1, index ); } } return 0; @@ -393,8 +393,8 @@ void KXMLGUIBuilder::removeCustomElement( TQWidget *parent, int id ) static_cast<TQPopupMenu *>(parent)->removeItem( id ); else if ( ::tqqt_cast<TQMenuBar *>( parent ) ) static_cast<TQMenuBar *>(parent)->removeItem( id ); - else if ( ::tqqt_cast<KToolBar *>( parent ) ) - static_cast<KToolBar *>(parent)->removeItemDelayed( id ); + else if ( ::tqqt_cast<TDEToolBar *>( parent ) ) + static_cast<TDEToolBar *>(parent)->removeItemDelayed( id ); } KXMLGUIClient *KXMLGUIBuilder::builderClient() const @@ -409,30 +409,30 @@ void KXMLGUIBuilder::setBuilderClient( KXMLGUIClient *client ) setBuilderInstance( client->instance() ); } -KInstance *KXMLGUIBuilder::builderInstance() const +TDEInstance *KXMLGUIBuilder::builderInstance() const { return d->m_instance; } -void KXMLGUIBuilder::setBuilderInstance( KInstance *instance ) +void KXMLGUIBuilder::setBuilderInstance( TDEInstance *instance ) { d->m_instance = instance; } void KXMLGUIBuilder::finalizeGUI( KXMLGUIClient * ) { - if ( !d->m_widget || !::tqqt_cast<KMainWindow *>( d->m_widget ) ) + if ( !d->m_widget || !::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) return; #if 0 - KToolBar *toolbar = 0; - QListIterator<KToolBar> it( ( (KMainWindow*)d->m_widget )->toolBarIterator() ); + TDEToolBar *toolbar = 0; + QListIterator<TDEToolBar> it( ( (TDEMainWindow*)d->m_widget )->toolBarIterator() ); while ( ( toolbar = it.current() ) ) { kdDebug() << "KXMLGUIBuilder::finalizeGUI toolbar=" << (void*)toolbar << endl; ++it; toolbar->positionYourself(); } #else - static_cast<KMainWindow *>(d->m_widget)->finalizeGUI( false ); + static_cast<TDEMainWindow *>(d->m_widget)->finalizeGUI( false ); #endif } diff --git a/tdeui/kxmlguibuilder.h b/tdeui/kxmlguibuilder.h index f32c30243..885bb1058 100644 --- a/tdeui/kxmlguibuilder.h +++ b/tdeui/kxmlguibuilder.h @@ -27,13 +27,13 @@ class KXMLGUIBuilderPrivate; class TQWidget; -class KInstance; +class TDEInstance; class KXMLGUIClient; /** * Abstract interface for a "GUI builder", used by the GUIFactory - * This interface is implemented by KMainWindow for the case where - * the toplevel widget is a KMainWindow. Other implementations may appear + * This interface is implemented by TDEMainWindow for the case where + * the toplevel widget is a TDEMainWindow. Other implementations may appear * in the future (dialogs for instance) */ class TDEUI_EXPORT KXMLGUIBuilder @@ -48,9 +48,9 @@ class TDEUI_EXPORT KXMLGUIBuilder /* @internal */ void setBuilderClient( KXMLGUIClient *client ); /* @internal */ - KInstance *builderInstance() const; + TDEInstance *builderInstance() const; /* @internal */ - void setBuilderInstance( KInstance *instance ); + void setBuilderInstance( TDEInstance *instance ); /* @internal */ TQWidget *widget(); diff --git a/tdeui/kxmlguiclient.cpp b/tdeui/kxmlguiclient.cpp index ff463e45f..de015b5a4 100644 --- a/tdeui/kxmlguiclient.cpp +++ b/tdeui/kxmlguiclient.cpp @@ -31,8 +31,8 @@ #include <kinstance.h> #include <kstandarddirs.h> #include <kdebug.h> -#include <kaction.h> -#include <kapplication.h> +#include <tdeaction.h> +#include <tdeapplication.h> #include <assert.h> @@ -41,7 +41,7 @@ class KXMLGUIClientPrivate public: KXMLGUIClientPrivate() { - m_instance = KGlobal::instance(); + m_instance = TDEGlobal::instance(); m_parent = 0L; m_builder = 0L; m_actionCollection = 0; @@ -50,10 +50,10 @@ public: { } - KInstance *m_instance; + TDEInstance *m_instance; TQDomDocument m_doc; - KActionCollection *m_actionCollection; + TDEActionCollection *m_actionCollection; TQDomDocument m_buildDocument; TQGuardedPtr<KXMLGUIFactory> m_factory; KXMLGUIClient *m_parent; @@ -90,9 +90,9 @@ KXMLGUIClient::~KXMLGUIClient() delete d; } -KAction *KXMLGUIClient::action( const char *name ) const +TDEAction *KXMLGUIClient::action( const char *name ) const { - KAction* act = actionCollection()->action( name ); + TDEAction* act = actionCollection()->action( name ); if ( !act ) { TQPtrListIterator<KXMLGUIClient> childIt( d->m_children ); for (; childIt.current(); ++childIt ) { @@ -104,23 +104,23 @@ KAction *KXMLGUIClient::action( const char *name ) const return act; } -KActionCollection *KXMLGUIClient::actionCollection() const +TDEActionCollection *KXMLGUIClient::actionCollection() const { if ( !d->m_actionCollection ) { - d->m_actionCollection = new KActionCollection( - "KXMLGUIClient-KActionCollection", this ); + d->m_actionCollection = new TDEActionCollection( + "KXMLGUIClient-TDEActionCollection", this ); } return d->m_actionCollection; } -KAction *KXMLGUIClient::action( const TQDomElement &element ) const +TDEAction *KXMLGUIClient::action( const TQDomElement &element ) const { - static const TQString &attrName = KGlobal::staticQString( "name" ); + static const TQString &attrName = TDEGlobal::staticQString( "name" ); return actionCollection()->action( element.attribute( attrName ).latin1() ); } -KInstance *KXMLGUIClient::instance() const +TDEInstance *KXMLGUIClient::instance() const { return d->m_instance; } @@ -154,7 +154,7 @@ void KXMLGUIClient::reloadXML() setXMLFile( file ); } -void KXMLGUIClient::setInstance( KInstance *instance ) +void KXMLGUIClient::setInstance( TDEInstance *instance ) { d->m_instance = instance; actionCollection()->setInstance( instance ); @@ -248,19 +248,19 @@ void KXMLGUIClient::setDOMDocument( const TQDomDocument &document, bool merge ) setXMLGUIBuildDocument( TQDomDocument() ); } -bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, KActionCollection *actionCollection ) +bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, TDEActionCollection *actionCollection ) { - static const TQString &tagAction = 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" ); + static const TQString &tagAction = TDEGlobal::staticQString( "Action" ); + static const TQString &tagMerge = TDEGlobal::staticQString( "Merge" ); + static const TQString &tagSeparator = TDEGlobal::staticQString( "Separator" ); + static const TQString &attrName = TDEGlobal::staticQString( "name" ); + static const TQString &attrAppend = TDEGlobal::staticQString( "append" ); + static const TQString &attrWeakSeparator = TDEGlobal::staticQString( "weakSeparator" ); + static const TQString &tagMergeLocal = TDEGlobal::staticQString( "MergeLocal" ); + static const TQString &tagText = TDEGlobal::staticQString( "text" ); + static const TQString &attrAlreadyVisited = TDEGlobal::staticQString( "alreadyVisited" ); + static const TQString &attrNoMerge = TDEGlobal::staticQString( "noMerge" ); + static const TQString &attrOne = TDEGlobal::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 @@ -292,7 +292,7 @@ bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, { TQCString name = e.attribute( attrName ).utf8(); // WABA if ( !actionCollection->action( name.data() ) || - (kapp && !kapp->authorizeKAction(name))) + (kapp && !kapp->authorizeTDEAction(name))) { // remove this child as we aren't using it base.removeChild( e ); @@ -501,9 +501,9 @@ bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, TQDomElement KXMLGUIClient::findMatchingElement( const TQDomElement &base, const TQDomElement &additive ) { - static const TQString &tagAction = KGlobal::staticQString( "Action" ); - static const TQString &tagMergeLocal = KGlobal::staticQString( "MergeLocal" ); - static const TQString &attrName = KGlobal::staticQString( "name" ); + static const TQString &tagAction = TDEGlobal::staticQString( "Action" ); + static const TQString &tagMergeLocal = TDEGlobal::staticQString( "MergeLocal" ); + static const TQString &attrName = TDEGlobal::staticQString( "name" ); TQDomNode n = additive.firstChild(); while ( !n.isNull() ) @@ -602,7 +602,7 @@ KXMLGUIBuilder *KXMLGUIClient::clientBuilder() const return d->m_builder; } -void KXMLGUIClient::plugActionList( const TQString &name, const TQPtrList<KAction> &actionList ) +void KXMLGUIClient::plugActionList( const TQString &name, const TQPtrList<TDEAction> &actionList ) { if ( !d->m_factory ) return; @@ -908,7 +908,7 @@ void KXMLGUIClient::stateChanged(const TQString &newstate, KXMLGUIClient::Revers for ( TQStringList::Iterator it = stateChange.actionsToEnable.begin(); it != stateChange.actionsToEnable.end(); ++it ) { - KAction *action = actionCollection()->action((*it).latin1()); + TDEAction *action = actionCollection()->action((*it).latin1()); if (action) action->setEnabled(setTrue); } @@ -917,7 +917,7 @@ void KXMLGUIClient::stateChanged(const TQString &newstate, KXMLGUIClient::Revers for ( TQStringList::Iterator it = stateChange.actionsToDisable.begin(); it != stateChange.actionsToDisable.end(); ++it ) { - KAction *action = actionCollection()->action((*it).latin1()); + TDEAction *action = actionCollection()->action((*it).latin1()); if (action) action->setEnabled(setFalse); } diff --git a/tdeui/kxmlguiclient.h b/tdeui/kxmlguiclient.h index c05a1afd8..9fa3951a7 100644 --- a/tdeui/kxmlguiclient.h +++ b/tdeui/kxmlguiclient.h @@ -27,9 +27,9 @@ #include <tdelibs_export.h> class TQWidget; -class KAction; -class KActionCollection; -class KInstance; +class TDEAction; +class TDEActionCollection; +class TDEInstance; class KXMLGUIClientPrivate; class KXMLGUIFactory; class KXMLGUIBuilder; @@ -74,30 +74,30 @@ public: * This method is provided for convenience, as it uses actionCollection() * to get the action object. */ - KAction* action( const char* name ) const; + TDEAction* action( const char* name ) const; /** * Retrieves an action for a given TQDomElement. The default * implementation uses the "name" attribute to query the action * object via the other action() method. */ - virtual KAction *action( const TQDomElement &element ) const; + virtual TDEAction *action( const TQDomElement &element ) const; /** * Retrieves the entire action collection for the GUI client. If * you subclass KXMLGUIClient you should call - * KActionCollection::setWidget( TQWidget* ) with this object, or - * you will encounter subtle bugs with KAction keyboard shortcuts. - * This is not necessary if your KXMLGUIClient is a KMainWindow. + * TDEActionCollection::setWidget( TQWidget* ) with this object, or + * you will encounter subtle bugs with TDEAction keyboard shortcuts. + * This is not necessary if your KXMLGUIClient is a TDEMainWindow. * - * @see KActionCollection::setWidget( TQWidget* ) + * @see TDEActionCollection::setWidget( TQWidget* ) */ - virtual KActionCollection* actionCollection() const; + virtual TDEActionCollection* actionCollection() const; /** - * @return The instance ( KInstance ) for this GUI client. + * @return The instance ( TDEInstance ) for this GUI client. */ - virtual KInstance *instance() const; + virtual TDEInstance *instance() const; /** * @return The parsed XML in a TQDomDocument, set by @@ -218,7 +218,7 @@ public: * This tag will get expanded to a list of actions. In the example * above ( a file manager with a dynamic file menu ), you would call * \code - * TQPtrList<KAction> file_actions; + * TQPtrList<TDEAction> file_actions; * for( ... ) * if( ... ) * file_actions.append( cool_action ); @@ -234,7 +234,7 @@ public: * plugActionList() would leave the previous actions in the * menu too.. */ - void plugActionList( const TQString &name, const TQPtrList<KAction> &actionList ); + void plugActionList( const TQString &name, const TQPtrList<TDEAction> &actionList ); /** * The complement of plugActionList() ... @@ -271,12 +271,12 @@ protected: //bool addSuperClient( KXMLGUIClient * ); /** - * Sets the instance ( KInstance) for this part. + * Sets the instance ( TDEInstance) for this part. * * Call this first in the inherited class constructor. * (At least before setXMLFile().) */ - virtual void setInstance( KInstance *instance ); + virtual void setInstance( TDEInstance *instance ); /** * Sets the name of the rc file containing the XML for the part. @@ -342,7 +342,7 @@ private: }; bool mergeXML( TQDomElement &base, const TQDomElement &additive, - KActionCollection *actionCollection ); + TDEActionCollection *actionCollection ); TQDomElement findMatchingElement( const TQDomElement &base, const TQDomElement &additive ); diff --git a/tdeui/kxmlguifactory.cpp b/tdeui/kxmlguifactory.cpp index 7aa427937..87015bfd5 100644 --- a/tdeui/kxmlguifactory.cpp +++ b/tdeui/kxmlguifactory.cpp @@ -32,11 +32,11 @@ #include <tqdatetime.h> #include <tqvariant.h> -#include <kaction.h> +#include <tdeaction.h> #include <kdebug.h> #include <kinstance.h> -#include <kglobal.h> -#include <kshortcut.h> +#include <tdeglobal.h> +#include <tdeshortcut.h> #include <kstandarddirs.h> #include <kkeydialog.h> @@ -51,9 +51,9 @@ class KXMLGUIFactoryPrivate : public BuildState public: KXMLGUIFactoryPrivate() { - static const TQString &defaultMergingName = KGlobal::staticQString( "<default>" ); - static const TQString &actionList = KGlobal::staticQString( "actionlist" ); - static const TQString &name = KGlobal::staticQString( "name" ); + static const TQString &defaultMergingName = TDEGlobal::staticQString( "<default>" ); + static const TQString &actionList = TDEGlobal::staticQString( "actionlist" ); + static const TQString &name = TDEGlobal::staticQString( "name" ); m_rootNode = new ContainerNode( 0L, TQString::null, 0L ); m_defaultMergingName = defaultMergingName; @@ -96,14 +96,14 @@ public: BuildStateStack m_stateStack; }; -TQString KXMLGUIFactory::readConfigFile( const TQString &filename, const KInstance *instance ) +TQString KXMLGUIFactory::readConfigFile( const TQString &filename, const TDEInstance *instance ) { return readConfigFile( filename, false, instance ); } -TQString KXMLGUIFactory::readConfigFile( const TQString &filename, bool never_null, const KInstance *_instance ) +TQString KXMLGUIFactory::readConfigFile( const TQString &filename, bool never_null, const TDEInstance *_instance ) { - const KInstance *instance = _instance ? _instance : KGlobal::instance(); + const TDEInstance *instance = _instance ? _instance : TDEGlobal::instance(); TQString xml_file; if (!TQDir::isRelativePath(filename)) @@ -140,9 +140,9 @@ TQString KXMLGUIFactory::readConfigFile( const TQString &filename, bool never_nu } bool KXMLGUIFactory::saveConfigFile( const TQDomDocument& doc, - const TQString& filename, const KInstance *_instance ) + const TQString& filename, const TDEInstance *_instance ) { - const KInstance *instance = _instance ? _instance : KGlobal::instance(); + const TDEInstance *instance = _instance ? _instance : TDEGlobal::instance(); TQString xml_file(filename); if (TQDir::isRelativePath(xml_file)) @@ -224,7 +224,7 @@ KXMLGUIFactory::~KXMLGUIFactory() void KXMLGUIFactory::addClient( KXMLGUIClient *client ) { kdDebug(1002) << "KXMLGUIFactory::addClient( " << client << " )" << endl; // ellis - static const TQString &actionPropElementName = KGlobal::staticQString( "ActionProperties" ); + static const TQString &actionPropElementName = TDEGlobal::staticQString( "ActionProperties" ); if ( client->factory() ) { if ( client->factory() == this ) @@ -368,7 +368,7 @@ void KXMLGUIFactory::removeClient( KXMLGUIClient *client ) // reset some variables d->BuildState::reset(); - // This will destruct the KAccel object built around the given widget. + // This will destruct the TDEAccel object built around the given widget. client->prepareXMLUnplug( d->builder->widget() ); d->popState(); @@ -468,7 +468,7 @@ TQPtrList<TQWidget> KXMLGUIFactory::findRecursive( KXMLGUI::ContainerNode *node, } void KXMLGUIFactory::plugActionList( KXMLGUIClient *client, const TQString &name, - const TQPtrList<KAction> &actionList ) + const TQPtrList<TDEAction> &actionList ) { d->pushState(); d->guiClient = client; @@ -497,7 +497,7 @@ void KXMLGUIFactory::unplugActionList( KXMLGUIClient *client, const TQString &na void KXMLGUIFactory::applyActionProperties( const TQDomElement &actionPropElement ) { - static const TQString &tagAction = KGlobal::staticQString( "action" ); + static const TQString &tagAction = TDEGlobal::staticQString( "action" ); for (TQDomNode n = actionPropElement.firstChild(); !n.isNull(); n = n.nextSibling() ) @@ -506,7 +506,7 @@ void KXMLGUIFactory::applyActionProperties( const TQDomElement &actionPropElemen if ( e.tagName().lower() != tagAction ) continue; - KAction *action = d->guiClient->action( e ); + TDEAction *action = d->guiClient->action( e ); if ( !action ) continue; @@ -514,7 +514,7 @@ void KXMLGUIFactory::applyActionProperties( const TQDomElement &actionPropElemen } } -void KXMLGUIFactory::configureAction( KAction *action, const TQDomNamedNodeMap &attributes ) +void KXMLGUIFactory::configureAction( TDEAction *action, const TQDomNamedNodeMap &attributes ) { for ( uint i = 0; i < attributes.length(); i++ ) { @@ -526,9 +526,9 @@ void KXMLGUIFactory::configureAction( KAction *action, const TQDomNamedNodeMap & } } -void KXMLGUIFactory::configureAction( KAction *action, const TQDomAttr &attribute ) +void KXMLGUIFactory::configureAction( TDEAction *action, const TQDomAttr &attribute ) { - static const TQString &attrShortcut = KGlobal::staticQString( "shortcut" ); + static const TQString &attrShortcut = TDEGlobal::staticQString( "shortcut" ); TQString attrName = attribute.name(); // If the attribute is a deprecated "accel", change to "shortcut". @@ -588,8 +588,8 @@ TQDomElement KXMLGUIFactory::actionPropertiesElement( TQDomDocument& doc ) TQDomElement KXMLGUIFactory::findActionByName( TQDomElement& elem, const TQString& sName, bool create ) { - static const TQString& attrName = KGlobal::staticQString( "name" ); - static const TQString& tagAction = KGlobal::staticQString( "Action" ); + static const TQString& attrName = TDEGlobal::staticQString( "name" ); + static const TQString& tagAction = TDEGlobal::staticQString( "Action" ); for( TQDomNode it = elem.firstChild(); !it.isNull(); it = it.nextSibling() ) { TQDomElement e = it.toElement(); if( e.attribute( attrName ) == sName ) diff --git a/tdeui/kxmlguifactory.h b/tdeui/kxmlguifactory.h index 9b4733790..2f225b5ba 100644 --- a/tdeui/kxmlguifactory.h +++ b/tdeui/kxmlguifactory.h @@ -28,11 +28,11 @@ #include <tdelibs_export.h> -class KAction; +class TDEAction; class KXMLGUIFactoryPrivate; class KXMLGUIClient; class KXMLGUIBuilder; -class KInstance; +class TDEInstance; namespace KXMLGUI { @@ -52,7 +52,7 @@ class BuildHelper; * and merging the GUI from an unlimited number of clients. * * Each client provides XML through a TQDomDocument and actions through a - * KActionCollection . The XML document contains the rules for how to merge the + * TDEActionCollection . The XML document contains the rules for how to merge the * GUI. * * KXMLGUIFactory processes the DOM tree provided by a client and plugs in the client's actions, @@ -79,10 +79,10 @@ class TDEUI_EXPORT KXMLGUIFactory : public TQObject ~KXMLGUIFactory(); // XXX move to somewhere else? (Simon) - static TQString readConfigFile( const TQString &filename, bool never_null, const KInstance *instance = 0 ); - static TQString readConfigFile( const TQString &filename, const KInstance *instance = 0 ); + static TQString readConfigFile( const TQString &filename, bool never_null, const TDEInstance *instance = 0 ); + static TQString readConfigFile( const TQString &filename, const TDEInstance *instance = 0 ); static bool saveConfigFile( const TQDomDocument& doc, const TQString& filename, - const KInstance *instance = 0 ); + const TDEInstance *instance = 0 ); static TQString documentToXML( const TQDomDocument& doc ); static TQString elementToXML( const TQDomElement& elem ); @@ -124,7 +124,7 @@ class TDEUI_EXPORT KXMLGUIFactory : public TQObject */ void removeClient( KXMLGUIClient *client ); - void plugActionList( KXMLGUIClient *client, const TQString &name, const TQPtrList<KAction> &actionList ); + void plugActionList( KXMLGUIClient *client, const TQString &name, const TQPtrList<TDEAction> &actionList ); void unplugActionList( KXMLGUIClient *client, const TQString &name ); /** @@ -206,8 +206,8 @@ class TDEUI_EXPORT KXMLGUIFactory : public TQObject TQPtrList<TQWidget> findRecursive( KXMLGUI::ContainerNode *node, const TQString &tagName ); void applyActionProperties( const TQDomElement &element ); - void configureAction( KAction *action, const TQDomNamedNodeMap &attributes ); - void configureAction( KAction *action, const TQDomAttr &attribute ); + void configureAction( TDEAction *action, const TQDomNamedNodeMap &attributes ); + void configureAction( TDEAction *action, const TQDomAttr &attribute ); protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdeui/kxmlguifactory_p.cpp b/tdeui/kxmlguifactory_p.cpp index 279753277..699f9579d 100644 --- a/tdeui/kxmlguifactory_p.cpp +++ b/tdeui/kxmlguifactory_p.cpp @@ -23,7 +23,7 @@ #include <tqwidget.h> -#include <kglobal.h> +#include <tdeglobal.h> #include <kdebug.h> #include <assert.h> @@ -220,7 +220,7 @@ void ContainerNode::plugActionList( BuildState &state ) void ContainerNode::plugActionList( BuildState &state, const MergingIndexList::Iterator &mergingIdxIt ) { - static const TQString &tagActionList = KGlobal::staticQString( "actionlist" ); + static const TQString &tagActionList = TDEGlobal::staticQString( "actionlist" ); MergingIndex mergingIdx = *mergingIdxIt; @@ -262,7 +262,7 @@ void ContainerNode::unplugActionList( BuildState &state ) void ContainerNode::unplugActionList( BuildState &state, const MergingIndexList::Iterator &mergingIdxIt ) { - static const TQString &tagActionList = KGlobal::staticQString( "actionlist" ); + static const TQString &tagActionList = TDEGlobal::staticQString( "actionlist" ); MergingIndex mergingIdx = *mergingIdxIt; @@ -365,7 +365,7 @@ void ContainerNode::destructChildren( const TQDomElement &element, BuildState &s TQDomElement ContainerNode::findElementForChild( const TQDomElement &baseElement, ContainerNode *childNode ) { - static const TQString &attrName = KGlobal::staticQString( "name" ); + static const TQString &attrName = TDEGlobal::staticQString( "name" ); // ### slow for ( TQDomNode n = baseElement.firstChild(); !n.isNull(); @@ -388,7 +388,7 @@ void ContainerNode::unplugActions( BuildState &state ) ContainerClientListIt clientIt( clients ); /* - Disabled because it means in KToolBar::saveState isHidden is always true then, + Disabled because it means in TDEToolBar::saveState isHidden is always true then, which is clearly wrong. if ( clients.count() == 1 && clientIt.current()->client == client && @@ -412,7 +412,7 @@ void ContainerNode::unplugActions( BuildState &state ) void ContainerNode::unplugClient( ContainerClient *client ) { - static const TQString &tagActionList = KGlobal::staticQString( "actionlist" ); + static const TQString &tagActionList = TDEGlobal::staticQString( "actionlist" ); assert( builder ); @@ -497,7 +497,7 @@ int ContainerNode::calcMergingIndex( const TQString &mergingName, int BuildHelper::calcMergingIndex( const TQDomElement &element, MergingIndexList::Iterator &it, TQString &group ) { - static const TQString &attrGroup = KGlobal::staticQString( "group" ); + static const TQString &attrGroup = TDEGlobal::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 TQString &defaultMergingName = KGlobal::staticQString( "<default>" ); + static const TQString &defaultMergingName = TDEGlobal::staticQString( "<default>" ); // create a list of supported container and custom tags customTags = m_state.builderCustomTags; @@ -556,12 +556,12 @@ void BuildHelper::build( const TQDomElement &element ) void BuildHelper::processElement( const TQDomElement &e ) { // some often used QStrings - 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" ); + static const TQString &tagAction = TDEGlobal::staticQString( "action" ); + static const TQString &tagMerge = TDEGlobal::staticQString( "merge" ); + static const TQString &tagState = TDEGlobal::staticQString( "state" ); + static const TQString &tagDefineGroup = TDEGlobal::staticQString( "definegroup" ); + static const TQString &tagActionList = TDEGlobal::staticQString( "actionlist" ); + static const TQString &attrName = TDEGlobal::staticQString( "name" ); TQString tag( e.tagName().lower() ); TQString currName( e.attribute( attrName ) ); @@ -606,7 +606,7 @@ bool BuildHelper::processActionElement( const TQDomElement &e, int idx ) assert( m_state.guiClient ); // look up the action and plug it in - KAction *action = m_state.guiClient->action( e ); + TDEAction *action = m_state.guiClient->action( e ); //kdDebug() << "BuildHelper::processActionElement " << e.attribute( "name" ) << " -> " << action << " (in " << m_state.guiClient->actionCollection() << ")" << endl; if ( !action ) @@ -670,10 +670,10 @@ void BuildHelper::processStateElement( const TQDomElement &element ) void BuildHelper::processMergeElement( const TQString &tag, const TQString &name, const TQDomElement &e ) { - 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" ); + static const TQString &tagDefineGroup = TDEGlobal::staticQString( "definegroup" ); + static const TQString &tagActionList = TDEGlobal::staticQString( "actionlist" ); + static const TQString &defaultMergingName = TDEGlobal::staticQString( "<default>" ); + static const TQString &attrGroup = TDEGlobal::staticQString( "group" ); TQString mergingName( name ); if ( mergingName.isEmpty() ) @@ -734,7 +734,7 @@ void BuildHelper::processMergeElement( const TQString &tag, const TQString &name void BuildHelper::processContainerElement( const TQDomElement &e, const TQString &tag, const TQString &name ) { - static const TQString &defaultMergingName = KGlobal::staticQString( "<default>" ); + static const TQString &defaultMergingName = TDEGlobal::staticQString( "<default>" ); ContainerNode *containerNode = parentNode->findContainer( name, tag, &containerList, @@ -805,7 +805,7 @@ TQWidget *BuildHelper::createContainer( TQWidget *parent, int index, } } - KInstance *oldInstance = m_state.builder->builderInstance(); + TDEInstance *oldInstance = m_state.builder->builderInstance(); KXMLGUIClient *oldClient = m_state.builder->builderClient(); m_state.builder->setBuilderClient( m_state.guiClient ); diff --git a/tdeui/kxmlguifactory_p.h b/tdeui/kxmlguifactory_p.h index dc263b677..e0ad02ac9 100644 --- a/tdeui/kxmlguifactory_p.h +++ b/tdeui/kxmlguifactory_p.h @@ -24,7 +24,7 @@ #include <tqdom.h> #include <tqvaluestack.h> -#include <kaction.h> +#include <tdeaction.h> class TQWidget; class KXMLGUIClient; @@ -36,21 +36,21 @@ namespace KXMLGUI struct BuildState; -class TDEUI_EXPORT ActionList : public TQPtrList<KAction> +class TDEUI_EXPORT ActionList : public TQPtrList<TDEAction> { public: ActionList() {} - ActionList( const TQPtrList<KAction> &rhs ) - : TQPtrList<KAction>( rhs ) + ActionList( const TQPtrList<TDEAction> &rhs ) + : TQPtrList<TDEAction>( rhs ) {} - ActionList &operator=( const TQPtrList<KAction> &rhs ) - { TQPtrList<KAction>::operator=( rhs ); return *this; } + ActionList &operator=( const TQPtrList<TDEAction> &rhs ) + { TQPtrList<TDEAction>::operator=( rhs ); return *this; } void plug( TQWidget *container, int index ) const; void unplug( TQWidget *container ) const; }; -typedef TQPtrListIterator<KAction> ActionListIt; +typedef TQPtrListIterator<TDEAction> ActionListIt; typedef TQMap< TQString, ActionList > ActionListMap; /* diff --git a/tdeui/kaboutapplication.cpp b/tdeui/tdeaboutapplication.cpp index 8d5828960..ef9efb181 100644 --- a/tdeui/kaboutapplication.cpp +++ b/tdeui/tdeaboutapplication.cpp @@ -23,35 +23,35 @@ // I (espen) prefer that header files are included alphabetically #include <tqlabel.h> -#include <kaboutapplication.h> +#include <tdeaboutapplication.h> #include <kaboutdialog_private.h> -#include <kaboutdata.h> -#include <kapplication.h> -#include <kglobal.h> -#include <klocale.h> +#include <tdeaboutdata.h> +#include <tdeapplication.h> +#include <tdeglobal.h> +#include <tdelocale.h> #include <kurllabel.h> #include <kactivelabel.h> #include "ktextedit.h" -KAboutApplication::KAboutApplication( TQWidget *parent, const char *name, +TDEAboutApplication::TDEAboutApplication( TQWidget *parent, const char *name, bool modal ) - :KAboutDialog( AbtTabbed|AbtProduct, + :TDEAboutDialog( AbtTabbed|AbtProduct, kapp ? kapp->caption() : TQString::null, Close, Close, parent, name, modal ) { - buildDialog(KGlobal::instance()->aboutData()); + buildDialog(TDEGlobal::instance()->aboutData()); } -KAboutApplication::KAboutApplication( const KAboutData *aboutData, TQWidget *parent, +TDEAboutApplication::TDEAboutApplication( const TDEAboutData *aboutData, TQWidget *parent, const char *name, bool modal ) - :KAboutDialog( AbtTabbed|AbtProduct, aboutData->programName(), Close, Close, + :TDEAboutDialog( AbtTabbed|AbtProduct, aboutData->programName(), Close, Close, parent, name, modal ) { buildDialog(aboutData); } -void KAboutApplication::buildDialog( const KAboutData *aboutData ) +void TDEAboutApplication::buildDialog( const TDEAboutData *aboutData ) { if( !aboutData ) { @@ -61,11 +61,11 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData ) //i18n "??" is displayed as (pseudo-)version when no data is known about the application setProduct( kapp ? kapp->caption() : TQString::null, i18n("??"), TQString::null, TQString::null ); - KAboutContainer *appPage = addContainerPage( i18n("&About")); + TDEAboutContainer *appPage = addContainerPage( i18n("&About")); TQString appPageText = i18n("No information available.\n" - "The supplied KAboutData object does not exist."); + "The supplied TDEAboutData object does not exist."); TQLabel *appPageLabel = new TQLabel( "\n\n\n\n"+appPageText+"\n\n\n\n", 0 ); appPage->addWidget( appPageLabel ); return; @@ -85,7 +85,7 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData ) if (!aboutData->copyrightStatement().isEmpty()) appPageText += "\n" + aboutData->copyrightStatement()+"\n"; - KAboutContainer *appPage = addContainerPage( i18n("&About")); + TDEAboutContainer *appPage = addContainerPage( i18n("&About")); TQLabel *appPageLabel = new TQLabel( appPageText, 0 ); appPage->addWidget( appPageLabel ); @@ -105,7 +105,7 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData ) { TQString authorPageTitle = authorCount == 1 ? i18n("A&uthor") : i18n("A&uthors"); - KAboutContainer *authorPage = addScrolledContainerPage( authorPageTitle ); + TDEAboutContainer *authorPage = addScrolledContainerPage( authorPageTitle ); if (!aboutData->customAuthorTextEnabled() || !aboutData->customAuthorRichText().isEmpty ()) { @@ -133,7 +133,7 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData ) authorPage->addWidget( activeLabel ); } - TQValueList<KAboutPerson>::ConstIterator it; + TQValueList<TDEAboutPerson>::ConstIterator it; for (it = aboutData->authors().begin(); it != aboutData->authors().end(); ++it) { @@ -145,9 +145,9 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData ) int creditsCount = aboutData->credits().count(); if (creditsCount) { - KAboutContainer *creditsPage = + TDEAboutContainer *creditsPage = addScrolledContainerPage( i18n("&Thanks To") ); - TQValueList<KAboutPerson>::ConstIterator it; + TQValueList<TDEAboutPerson>::ConstIterator it; for (it = aboutData->credits().begin(); it != aboutData->credits().end(); ++it) { @@ -156,13 +156,13 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData ) } } - const TQValueList<KAboutTranslator> translatorList = aboutData->translators(); + const TQValueList<TDEAboutTranslator> translatorList = aboutData->translators(); if(translatorList.count() > 0) { TQString text = "<qt>"; - TQValueList<KAboutTranslator>::ConstIterator it; + TQValueList<TDEAboutTranslator>::ConstIterator it; for(it = translatorList.begin(); it != translatorList.end(); ++it) { text += TQString("<p>%1<br> " @@ -172,7 +172,7 @@ void KAboutApplication::buildDialog( const KAboutData *aboutData ) .arg((*it).emailAddress()); } - text += KAboutData::aboutTranslationTeam() + "</qt>"; + text += TDEAboutData::aboutTranslationTeam() + "</qt>"; addTextPage( i18n("T&ranslation"), text, true); } diff --git a/tdeui/kaboutapplication.h b/tdeui/tdeaboutapplication.h index 58145aa45..19fa0fe61 100644 --- a/tdeui/kaboutapplication.h +++ b/tdeui/tdeaboutapplication.h @@ -23,25 +23,25 @@ #ifndef _KABOUT_APPLICATION_H_ #define _KABOUT_APPLICATION_H_ -#include <kaboutdata.h> -#include <kaboutdialog.h> +#include <tdeaboutdata.h> +#include <tdeaboutdialog.h> /** * @short Standard "About Application" dialog box. * * This class provides the standard "About Application" dialog box * that is used by KHelpMenu. It uses the information of the global - * KAboutData that is specified at the start of your program in + * TDEAboutData that is specified at the start of your program in * main(). Normally you should not use this class directly but rather * the KHelpMenu class or even better just subclass your toplevel - * window from KMainWindow. If you do the latter, the help menu and + * window from TDEMainWindow. If you do the latter, the help menu and * thereby this dialog box is available through the - * KMainWindow::helpMenu() function. + * TDEMainWindow::helpMenu() function. * * @author Waldo Bastian (bastian@kde.org) and Espen Sand (espen@kde.org) */ -class TDEUI_EXPORT KAboutApplication : public KAboutDialog +class TDEUI_EXPORT TDEAboutApplication : public TDEAboutDialog { public: /** @@ -57,16 +57,16 @@ class TDEUI_EXPORT KAboutApplication : public KAboutDialog * made visible using TQWidget::show(). Otherwise it will be * modal and must be made visible using TQWidget::exec(). */ - KAboutApplication( TQWidget *parent=0, const char *name=0, bool modal=true ); + TDEAboutApplication( TQWidget *parent=0, const char *name=0, bool modal=true ); /** * Constructor. Mostly does the same stuff as the previous constructor, except - * that it can take a custom KAboutData object instead of the one specified + * that it can take a custom TDEAboutData object instead of the one specified * in your main() function. This is especially useful for applications * which are implemented as (dynamically loaded) libraries, e.g. panel * applets. * - * @param aboutData A pointer to a KAboutData object which data + * @param aboutData A pointer to a TDEAboutData object which data * will be used for filling the dialog. * @param parent The parent of the dialog box. You should use the * toplevel window so that the dialog becomes centered. @@ -76,17 +76,17 @@ class TDEUI_EXPORT KAboutApplication : public KAboutDialog * made visible using TQWidget::show(). Otherwise it will be * modal and must be made visible using TQWidget::exec(). */ - KAboutApplication( const KAboutData *aboutData, TQWidget *parent=0, const char *name=0, bool modal=true ); + TDEAboutApplication( const TDEAboutData *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, TQWidget *parent=0, const char *name=0, bool modal=true ); + TDEAboutApplication( const TDEAboutData *aboutData=0, TQWidget *parent=0, const char *name=0, bool modal=true ); This will make buildDialog() obsolete as well (Frerich). */ protected: - void buildDialog( const KAboutData *aboutData ); + void buildDialog( const TDEAboutData *aboutData ); }; diff --git a/tdeui/kaboutdialog.cpp b/tdeui/tdeaboutdialog.cpp index 3ed785891..895247161 100644 --- a/tdeui/kaboutdialog.cpp +++ b/tdeui/tdeaboutdialog.cpp @@ -31,18 +31,18 @@ #include <tqtabwidget.h> #include <tqtabbar.h> -#include <kapplication.h> -#include <kglobal.h> -#include <kglobalsettings.h> -#include <klocale.h> +#include <tdeapplication.h> +#include <tdeglobal.h> +#include <tdeglobalsettings.h> +#include <tdelocale.h> #include <ktextbrowser.h> #include <kurllabel.h> -#include <kaboutdialog.h> +#include <tdeaboutdialog.h> #include <kaboutdialog_private.h> #include <kdebug.h> //MOC_SKIP_BEGIN -template class TQPtrList<KAboutContributor>; +template class TQPtrList<TDEAboutContributor>; //MOC_SKIP_END #define WORKTEXT_IDENTATION 16 @@ -50,14 +50,14 @@ template class TQPtrList<KAboutContributor>; // ############################################################## // MOC OUTPUT FILES: -#include "kaboutdialog.moc" +#include "tdeaboutdialog.moc" #include "kaboutdialog_private.moc" // ############################################################## -class KAboutTabWidget : public TQTabWidget +class TDEAboutTabWidget : public TQTabWidget { public: - KAboutTabWidget( TQWidget* parent ) : TQTabWidget( parent ) {} + TDEAboutTabWidget( TQWidget* parent ) : TQTabWidget( parent ) {} TQSize sizeHint() const { return TQTabWidget::sizeHint().expandedTo( tabBar()->sizeHint() + TQSize(4,4) ); } @@ -66,7 +66,7 @@ public: -KAboutContributor::KAboutContributor( TQWidget *_parent, const char *wname, +TDEAboutContributor::TDEAboutContributor( TQWidget *_parent, const char *wname, const TQString &_name,const TQString &_email, const TQString &_url, const TQString &_work, bool showHeader, bool showFrame, @@ -113,7 +113,7 @@ KAboutContributor::KAboutContributor( TQWidget *_parent, const char *wname, } -void KAboutContributor::setName( const TQString &_text, const TQString &_header, +void TDEAboutContributor::setName( const TQString &_text, const TQString &_header, bool _update ) { mLabel[0]->setText(_header); @@ -122,7 +122,7 @@ void KAboutContributor::setName( const TQString &_text, const TQString &_header, } -void KAboutContributor::setEmail( const TQString &_text, const TQString &_header, +void TDEAboutContributor::setEmail( const TQString &_text, const TQString &_header, bool _update ) { mLabel[1]->setText(_header); @@ -133,7 +133,7 @@ void KAboutContributor::setEmail( const TQString &_text, const TQString &_header } -void KAboutContributor::setURL( const TQString &_text, const TQString &_header, +void TDEAboutContributor::setURL( const TQString &_text, const TQString &_header, bool _update ) { mLabel[2]->setText(_header); @@ -144,7 +144,7 @@ void KAboutContributor::setURL( const TQString &_text, const TQString &_header, } -void KAboutContributor::setWork( const TQString &_text, const TQString &_header, +void TDEAboutContributor::setWork( const TQString &_text, const TQString &_header, bool _update ) { mLabel[3]->setText(_header); @@ -153,32 +153,32 @@ void KAboutContributor::setWork( const TQString &_text, const TQString &_header, } -TQString KAboutContributor::getName( void ) const +TQString TDEAboutContributor::getName( void ) const { return mText[0]->text(); } -TQString KAboutContributor::getEmail( void ) const +TQString TDEAboutContributor::getEmail( void ) const { return mText[1]->text(); } -TQString KAboutContributor::getURL( void ) const +TQString TDEAboutContributor::getURL( void ) const { return mText[2]->text(); } -TQString KAboutContributor::getWork( void ) const +TQString TDEAboutContributor::getWork( void ) const { return mText[3]->text(); } -void KAboutContributor::updateLayout( void ) +void TDEAboutContributor::updateLayout( void ) { delete layout(); @@ -260,7 +260,7 @@ void KAboutContributor::updateLayout( void ) } -void KAboutContributor::fontChange( const TQFont &/*oldFont*/ ) +void TDEAboutContributor::fontChange( const TQFont &/*oldFont*/ ) { if( mShowBold ) { @@ -272,28 +272,28 @@ void KAboutContributor::fontChange( const TQFont &/*oldFont*/ ) } -TQSize KAboutContributor::sizeHint( void ) const +TQSize TDEAboutContributor::sizeHint( void ) const { return minimumSizeHint(); } -void KAboutContributor::urlClickedSlot( const TQString &u ) +void TDEAboutContributor::urlClickedSlot( const TQString &u ) { emit openURL(u); } -void KAboutContributor::emailClickedSlot( const TQString &e ) +void TDEAboutContributor::emailClickedSlot( const TQString &e ) { emit sendEmail( mText[0]->text(), e ) ; } // -// Internal widget for the KAboutDialog class. +// Internal widget for the TDEAboutDialog class. // -KAboutContainerBase::KAboutContainerBase( int layoutType, TQWidget *_parent, +TDEAboutContainerBase::TDEAboutContainerBase( int layoutType, TQWidget *_parent, char *_name ) : TQWidget( _parent, _name ), mImageLabel(0), mTitleLabel(0), mIconLabel(0),mVersionLabel(0), @@ -369,7 +369,7 @@ KAboutContainerBase::KAboutContainerBase( int layoutType, TQWidget *_parent, if( layoutType & AbtTabbed ) { - mPageTab = new KAboutTabWidget( this ); + mPageTab = new TDEAboutTabWidget( this ); if( !mPageTab ) { return; } hbox->addWidget( mPageTab, 10 ); } @@ -422,21 +422,21 @@ KAboutContainerBase::KAboutContainerBase( int layoutType, TQWidget *_parent, } -void KAboutContainerBase::show( void ) +void TDEAboutContainerBase::show( void ) { TQWidget::show(); } -TQSize KAboutContainerBase::sizeHint( void ) const +TQSize TDEAboutContainerBase::sizeHint( void ) const { return minimumSize().expandedTo( TQSize( TQWidget::sizeHint().width(), 0 ) ); } -void KAboutContainerBase::fontChange( const TQFont &/*oldFont*/ ) +void TDEAboutContainerBase::fontChange( const TQFont &/*oldFont*/ ) { if( mTitleLabel ) { - TQFont f( KGlobalSettings::generalFont() ); + TQFont f( TDEGlobalSettings::generalFont() ); f.setBold( true ); int fs = f.pointSize(); if (fs == -1) @@ -447,7 +447,7 @@ void KAboutContainerBase::fontChange( const TQFont &/*oldFont*/ ) if( mVersionLabel ) { - TQFont f( KGlobalSettings::generalFont() ); + TQFont f( TDEGlobalSettings::generalFont() ); f.setBold( true ); mVersionLabel->setFont(f); mAuthorLabel->setFont(f); @@ -457,7 +457,7 @@ void KAboutContainerBase::fontChange( const TQFont &/*oldFont*/ ) update(); } -TQFrame *KAboutContainerBase::addTextPage( const TQString &title, +TQFrame *TDEAboutContainerBase::addTextPage( const TQString &title, const TQString &text, bool richText, int numLines ) { @@ -492,7 +492,7 @@ TQFrame *KAboutContainerBase::addTextPage( const TQString &title, return page; } -TQFrame *KAboutContainerBase::addLicensePage( const TQString &title, +TQFrame *TDEAboutContainerBase::addLicensePage( const TQString &title, const TQString &text, int numLines) { TQFrame* const page = addEmptyPage( title ); @@ -502,7 +502,7 @@ TQFrame *KAboutContainerBase::addLicensePage( const TQString &title, TQVBoxLayout* const vbox = new TQVBoxLayout( page, KDialog::spacingHint() ); KTextEdit* const textEdit = new KTextEdit( page, "license" ); - textEdit->setFont( KGlobalSettings::fixedFont() ); + textEdit->setFont( TDEGlobalSettings::fixedFont() ); textEdit->setReadOnly( true ); textEdit->setWordWrap( TQTextEdit::NoWrap ); textEdit->setText( text ); @@ -512,7 +512,7 @@ TQFrame *KAboutContainerBase::addLicensePage( const TQString &title, } -KAboutContainer *KAboutContainerBase::addContainerPage( const TQString &title, +TDEAboutContainer *TDEAboutContainerBase::addContainerPage( const TQString &title, int childAlignment, int innerAlignment ) { @@ -522,7 +522,7 @@ KAboutContainer *KAboutContainerBase::addContainerPage( const TQString &title, return 0; } - KAboutContainer* const container = new KAboutContainer( mPageTab, "container", + TDEAboutContainer* const container = new TDEAboutContainer( mPageTab, "container", KDialog::spacingHint(), KDialog::spacingHint(), childAlignment, innerAlignment ); mPageTab->addTab( container, title ); @@ -536,7 +536,7 @@ KAboutContainer *KAboutContainerBase::addContainerPage( const TQString &title, } -KAboutContainer *KAboutContainerBase::addScrolledContainerPage( +TDEAboutContainer *TDEAboutContainerBase::addScrolledContainerPage( const TQString &title, int childAlignment, int innerAlignment ) @@ -553,7 +553,7 @@ KAboutContainer *KAboutContainerBase::addScrolledContainerPage( scrollView->viewport()->setBackgroundMode( PaletteBackground ); vbox->addWidget( scrollView ); - KAboutContainer* const container = new KAboutContainer( scrollView, "container", + TDEAboutContainer* const container = new TDEAboutContainer( scrollView, "container", KDialog::spacingHint(), KDialog::spacingHint(), childAlignment, innerAlignment ); scrollView->addChild( container ); @@ -568,7 +568,7 @@ KAboutContainer *KAboutContainerBase::addScrolledContainerPage( } -TQFrame *KAboutContainerBase::addEmptyPage( const TQString &title ) +TQFrame *TDEAboutContainerBase::addEmptyPage( const TQString &title ) { if( !mPageTab ) { @@ -584,10 +584,10 @@ TQFrame *KAboutContainerBase::addEmptyPage( const TQString &title ) } -KAboutContainer *KAboutContainerBase::addContainer( int childAlignment, +TDEAboutContainer *TDEAboutContainerBase::addContainer( int childAlignment, int innerAlignment ) { - KAboutContainer* const container = new KAboutContainer( this, "container", + TDEAboutContainer* const container = new TDEAboutContainer( this, "container", 0, KDialog::spacingHint(), childAlignment, innerAlignment ); mTopLayout->addWidget( container, 0, childAlignment ); @@ -601,7 +601,7 @@ KAboutContainer *KAboutContainerBase::addContainer( int childAlignment, -void KAboutContainerBase::setTitle( const TQString &title ) +void TDEAboutContainerBase::setTitle( const TQString &title ) { if( !mTitleLabel ) { @@ -612,7 +612,7 @@ void KAboutContainerBase::setTitle( const TQString &title ) } -void KAboutContainerBase::setImage( const TQString &fileName ) +void TDEAboutContainerBase::setImage( const TQString &fileName ) { if( !mImageLabel ) { @@ -631,7 +631,7 @@ void KAboutContainerBase::setImage( const TQString &fileName ) mImageFrame->layout()->activate(); } -void KAboutContainerBase::setProgramLogo( const TQString &fileName ) +void TDEAboutContainerBase::setProgramLogo( const TQString &fileName ) { if( fileName.isNull() ) { @@ -642,7 +642,7 @@ void KAboutContainerBase::setProgramLogo( const TQString &fileName ) setProgramLogo( logo ); } -void KAboutContainerBase::setProgramLogo( const TQPixmap &pixmap ) +void TDEAboutContainerBase::setProgramLogo( const TQPixmap &pixmap ) { if( !mIconLabel ) { @@ -655,7 +655,7 @@ void KAboutContainerBase::setProgramLogo( const TQPixmap &pixmap ) } } -void KAboutContainerBase::setImageBackgroundColor( const TQColor &color ) +void TDEAboutContainerBase::setImageBackgroundColor( const TQColor &color ) { if( mImageFrame ) { @@ -664,7 +664,7 @@ void KAboutContainerBase::setImageBackgroundColor( const TQColor &color ) } -void KAboutContainerBase::setImageFrame( bool state ) +void TDEAboutContainerBase::setImageFrame( bool state ) { if( mImageFrame ) { @@ -682,7 +682,7 @@ void KAboutContainerBase::setImageFrame( bool state ) } -void KAboutContainerBase::setProduct( const TQString &appName, +void TDEAboutContainerBase::setProduct( const TQString &appName, const TQString &version, const TQString &author, const TQString &year ) @@ -720,18 +720,18 @@ void KAboutContainerBase::setProduct( const TQString &appName, } -void KAboutContainerBase::slotMouseTrack( int mode, const TQMouseEvent *e ) +void TDEAboutContainerBase::slotMouseTrack( int mode, const TQMouseEvent *e ) { emit mouseTrack( mode, e ); } -void KAboutContainerBase::slotUrlClick( const TQString &url ) +void TDEAboutContainerBase::slotUrlClick( const TQString &url ) { emit urlClick( url ); } -void KAboutContainerBase::slotMailClick( const TQString &_name, +void TDEAboutContainerBase::slotMailClick( const TQString &_name, const TQString &_address ) { emit mailClick( _name, _address ); @@ -739,7 +739,7 @@ void KAboutContainerBase::slotMailClick( const TQString &_name, -KAboutContainer::KAboutContainer( TQWidget *_parent, const char *_name, +TDEAboutContainer::TDEAboutContainer( TQWidget *_parent, const char *_name, int _margin, int _spacing, int childAlignment, int innerAlignment ) : TQFrame( _parent, _name ), d(0) @@ -781,7 +781,7 @@ KAboutContainer::KAboutContainer( TQWidget *_parent, const char *_name, } -void KAboutContainer::childEvent( TQChildEvent *e ) +void TDEAboutContainer::childEvent( TQChildEvent *e ) { if( !e->inserted() || !e->child()->isWidgetType() ) { @@ -806,7 +806,7 @@ void KAboutContainer::childEvent( TQChildEvent *e ) } -TQSize KAboutContainer::sizeHint( void ) const +TQSize TDEAboutContainer::sizeHint( void ) const { // // The size is computed by adding the sizeHint().height() of all @@ -864,24 +864,24 @@ TQSize KAboutContainer::sizeHint( void ) const } -TQSize KAboutContainer::minimumSizeHint( void ) const +TQSize TDEAboutContainer::minimumSizeHint( void ) const { return sizeHint(); } -void KAboutContainer::addWidget( TQWidget *widget ) +void TDEAboutContainer::addWidget( TQWidget *widget ) { widget->reparent( this, 0, TQPoint(0,0) ); } -void KAboutContainer::addPerson( const TQString &_name, const TQString &_email, +void TDEAboutContainer::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", + TDEAboutContributor* const cont = new TDEAboutContributor( this, "pers", _name, _email, _url, _task, showHeader, showFrame, showBold ); connect( cont, TQT_SIGNAL( openURL(const TQString&)), this, TQT_SIGNAL( urlClick(const TQString &))); @@ -890,7 +890,7 @@ void KAboutContainer::addPerson( const TQString &_name, const TQString &_email, } -void KAboutContainer::addTitle( const TQString &title, int alignment, +void TDEAboutContainer::addTitle( const TQString &title, int alignment, bool showFrame, bool showBold ) { @@ -909,7 +909,7 @@ void KAboutContainer::addTitle( const TQString &title, int alignment, } -void KAboutContainer::addImage( const TQString &fileName, int alignment ) +void TDEAboutContainer::addImage( const TQString &fileName, int alignment ) { if( fileName.isNull() ) { @@ -930,19 +930,19 @@ void KAboutContainer::addImage( const TQString &fileName, int alignment ) #if 0 //MOC_SKIP_BEGIN -/** Every person displayed is stored in a KAboutContributor object. +/** Every person displayed is stored in a TDEAboutContributor object. * Every contributor, the author and/or the maintainer of the application are * stored in objects of this local class. Every single field may be empty. - * To add a contributor, create a KAboutContributor object as a child of your - * @ref KAboutDialog, set its contents and add it using add addContributor. */ -class KAboutContributor : public QFrame + * To add a contributor, create a TDEAboutContributor object as a child of your + * @ref TDEAboutDialog, set its contents and add it using add addContributor. */ +class TDEAboutContributor : public QFrame { // ############################################################################ Q_OBJECT // ---------------------------------------------------------------------------- public: /** The Qt constructor. */ - KAboutContributor(TQWidget* parent=0, const char* name=0); + TDEAboutContributor(TQWidget* parent=0, const char* name=0); /** Set the name (a literal string). */ void setName(const TQString&); /** Get the name. */ @@ -958,7 +958,7 @@ public: /** 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 TQString&); - /** The size hint. Very important here, since KAboutWidget relies on it for + /** The size hint. Very important here, since TDEAboutWidget relies on it for * geometry management. */ TQSize sizeHint(); TQSize minimumSizeHint(void); @@ -997,7 +997,7 @@ signals: -KAboutContributor::KAboutContributor(TQWidget* parent, const char* n) +TDEAboutContributor::TDEAboutContributor(TQWidget* parent, const char* n) : TQFrame(parent, n), name(new TQLabel(this)), email(new KURLLabel(this)), @@ -1006,7 +1006,7 @@ KAboutContributor::KAboutContributor(TQWidget* parent, const char* n) // ############################################################ if(name==0 || email==0) { // this will nearly never happen (out of memory in about box?) - kdDebug() << "KAboutContributor::KAboutContributor: Out of memory." << endl; + kdDebug() << "TDEAboutContributor::TDEAboutContributor: Out of memory." << endl; tqApp->quit(); } setFrameStyle(TQFrame::Panel | TQFrame::Raised); @@ -1019,7 +1019,7 @@ KAboutContributor::KAboutContributor(TQWidget* parent, const char* n) } void -KAboutContributor::setName(const TQString& n) +TDEAboutContributor::setName(const TQString& n) { // ############################################################ name->setText(n); @@ -1027,14 +1027,14 @@ KAboutContributor::setName(const TQString& n) } QString -KAboutContributor::getName() +TDEAboutContributor::getName() { // ########################################################### return name->text(); // ########################################################### } void -KAboutContributor::setURL(const TQString& u) +TDEAboutContributor::setURL(const TQString& u) { // ########################################################### url->setText(u); @@ -1042,7 +1042,7 @@ KAboutContributor::setURL(const TQString& u) } QString -KAboutContributor::getURL() +TDEAboutContributor::getURL() { // ########################################################### return url->text(); @@ -1050,7 +1050,7 @@ KAboutContributor::getURL() } void -KAboutContributor::setEmail(const TQString& e) +TDEAboutContributor::setEmail(const TQString& e) { // ########################################################### email->setText(e); @@ -1058,7 +1058,7 @@ KAboutContributor::setEmail(const TQString& e) } QString -KAboutContributor::getEmail() +TDEAboutContributor::getEmail() { // ########################################################### return email->text(); @@ -1066,25 +1066,25 @@ KAboutContributor::getEmail() } void -KAboutContributor::emailClickedSlot(const TQString& e) +TDEAboutContributor::emailClickedSlot(const TQString& e) { // ########################################################### - kdDebug() << "KAboutContributor::emailClickedSlot: called." << endl; + kdDebug() << "TDEAboutContributor::emailClickedSlot: called." << endl; emit(sendEmail(name->text(), e)); // ########################################################### } void -KAboutContributor::urlClickedSlot(const TQString& u) +TDEAboutContributor::urlClickedSlot(const TQString& u) { // ########################################################### - kdDebug() << "KAboutContributor::urlClickedSlot: called." << endl; + kdDebug() << "TDEAboutContributor::urlClickedSlot: called." << endl; emit(openURL(u)); // ########################################################### } void -KAboutContributor::setWork(const TQString& w) +TDEAboutContributor::setWork(const TQString& w) { // ########################################################### work=w; @@ -1096,7 +1096,7 @@ KAboutContributor::setWork(const TQString& w) #if 0 QSize -KAboutContributor::sizeHint() +TDEAboutContributor::sizeHint() { // ############################################################################ const int FrameWidth=frameWidth(); @@ -1128,13 +1128,13 @@ KAboutContributor::sizeHint() // ############################################################################ } -TQSize KAboutContributor::minimumSizeHint(void) +TQSize TDEAboutContributor::minimumSizeHint(void) { return( sizeHint() ); } -void KAboutContributor::show( void ) +void TDEAboutContributor::show( void ) { TQFrame::show(); setMinimumSize( sizeHint() ); @@ -1143,7 +1143,7 @@ void KAboutContributor::show( void ) void -KAboutContributor::resizeEvent(TQResizeEvent*) +TDEAboutContributor::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(TQResizeEvent*) void -KAboutContributor::paintEvent(TQPaintEvent* e) +TDEAboutContributor::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) // ############################################################################ @@ -1186,7 +1186,7 @@ KAboutContributor::paintEvent(TQPaintEvent* e) #if 0 -TQSize KAboutContributor::sizeHint( void ) +TQSize TDEAboutContributor::sizeHint( void ) { int s = KDialog::spacingHint(); int h = fontMetrics().lineSpacing()*3 + 2*s; @@ -1239,7 +1239,7 @@ TQSize 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(TQResizeEvent*) +void TDEAboutContributor::resizeEvent(TQResizeEvent*) { int x = frameWidth(); int s = KDialog::spacingHint(); @@ -1273,7 +1273,7 @@ void KAboutContributor::resizeEvent(TQResizeEvent*) -void KAboutContributor::paintEvent( TQPaintEvent *e ) +void TDEAboutContributor::paintEvent( TQPaintEvent *e ) { TQFrame::paintEvent(e); if(work.isEmpty()) return; @@ -1305,13 +1305,13 @@ void KAboutContributor::paintEvent( TQPaintEvent *e ) -KAboutWidget::KAboutWidget(TQWidget *_parent, const char *_name) +TDEAboutWidget::TDEAboutWidget(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)), + author(new TDEAboutContributor(this)), + maintainer(new TDEAboutContributor(this)), showMaintainer(false), d(0) { @@ -1319,7 +1319,7 @@ KAboutWidget::KAboutWidget(TQWidget *_parent, const char *_name) if( !version || !cont || !logo || !author || !maintainer ) { // this will nearly never happen (out of memory in about box?) - kdDebug() << "KAboutWidget::KAboutWidget: Out of memory." << endl; + kdDebug() << "TDEAboutWidget::TDEAboutWidget: Out of memory." << endl; tqApp->quit(); } // ----- @@ -1341,7 +1341,7 @@ KAboutWidget::KAboutWidget(TQWidget *_parent, const char *_name) void -KAboutWidget::adjust() +TDEAboutWidget::adjust() { // ################################################################# int cx, cy, tempx; @@ -1371,8 +1371,8 @@ KAboutWidget::adjust() { cx=QMAX(cx, cont->sizeHint().width()); cy+=cont->sizeHint().height()+Grid; - TQPtrListIterator<KAboutContributor> _pos(contributors); - KAboutContributor* currEntry; + TQPtrListIterator<TDEAboutContributor> _pos(contributors); + TDEAboutContributor* currEntry; while ( (currEntry = _pos.current()) ) { ++_pos; @@ -1385,25 +1385,25 @@ KAboutWidget::adjust() } void -KAboutWidget::setLogo(const TQPixmap& i) +TDEAboutWidget::setLogo(const TQPixmap& i) { // ############################################################################ logo->setPixmap(i); // ############################################################################ } -void KAboutWidget::sendEmailSlot(const TQString &_name, const TQString &_email) +void TDEAboutWidget::sendEmailSlot(const TQString &_name, const TQString &_email) { emit(sendEmail(_name, _email)); } -void KAboutWidget::openURLSlot(const TQString& _url) +void TDEAboutWidget::openURLSlot(const TQString& _url) { emit(openURL(_url)); } void -KAboutWidget::setAuthor(const TQString &_name, const TQString &_email, +TDEAboutWidget::setAuthor(const TQString &_name, const TQString &_email, const TQString &_url, const TQString &_w) { // ############################################################################ @@ -1415,7 +1415,7 @@ KAboutWidget::setAuthor(const TQString &_name, const TQString &_email, } void -KAboutWidget::setMaintainer(const TQString &_name, const TQString &_email, +TDEAboutWidget::setMaintainer(const TQString &_name, const TQString &_email, const TQString &_url, const TQString &_w) { // ############################################################################ @@ -1428,11 +1428,11 @@ KAboutWidget::setMaintainer(const TQString &_name, const TQString &_email, } void -KAboutWidget::addContributor(const TQString &_name, const TQString &_email, +TDEAboutWidget::addContributor(const TQString &_name, const TQString &_email, const TQString &_url, const TQString &_w) { // ############################################################################ - KAboutContributor* const c=new KAboutContributor(this); + TDEAboutContributor* const c=new TDEAboutContributor(this); // ----- c->setName(_name); c->setEmail(_email); @@ -1446,7 +1446,7 @@ KAboutWidget::addContributor(const TQString &_name, const TQString &_email, } void -KAboutWidget::setVersion(const TQString &_name) +TDEAboutWidget::setVersion(const TQString &_name) { // ############################################################################ version->setText(_name); @@ -1454,7 +1454,7 @@ KAboutWidget::setVersion(const TQString &_name) } void -KAboutWidget::resizeEvent(TQResizeEvent*) +TDEAboutWidget::resizeEvent(TQResizeEvent*) { // ############################################################################ int _x=0, _y, cx, tempx, tempy; @@ -1484,8 +1484,8 @@ KAboutWidget::resizeEvent(TQResizeEvent*) } else { cont->hide(); } - TQPtrListIterator<KAboutContributor> _pos(contributors); - KAboutContributor* currEntry; + TQPtrListIterator<TDEAboutContributor> _pos(contributors); + TDEAboutContributor* currEntry; while( (currEntry = _pos.current()) ) { ++_pos; @@ -1503,15 +1503,15 @@ KAboutWidget::resizeEvent(TQResizeEvent*) // ############################################################################ } -KAboutDialog::KAboutDialog(TQWidget *_parent, const char *_name, bool modal) +TDEAboutDialog::TDEAboutDialog(TQWidget *_parent, const char *_name, bool modal) : KDialogBase(_parent, _name, modal, TQString::null, Ok, Ok ), - about(new KAboutWidget(this)), mContainerBase(0), d(0) + about(new TDEAboutWidget(this)), mContainerBase(0), d(0) { // ################################################################# if(!about) { // this will nearly never happen (out of memory in about box?) - kdDebug() << "KAboutDialog::KAboutDialog: Out of memory." << endl; + kdDebug() << "TDEAboutDialog::TDEAboutDialog: Out of memory." << endl; tqApp->quit(); } setMainWidget(about); @@ -1523,7 +1523,7 @@ KAboutDialog::KAboutDialog(TQWidget *_parent, const char *_name, bool modal) } -KAboutDialog::KAboutDialog( int layoutType, const TQString &_caption, +TDEAboutDialog::TDEAboutDialog( int layoutType, const TQString &_caption, int buttonMask, ButtonCode defaultButton, TQWidget *_parent, const char *_name, bool modal, bool separator, const TQString &user1, @@ -1534,7 +1534,7 @@ KAboutDialog::KAboutDialog( int layoutType, const TQString &_caption, { setPlainCaption( i18n("About %1").arg(_caption) ); - mContainerBase = new KAboutContainerBase( layoutType, this ); + mContainerBase = new TDEAboutContainerBase( layoutType, this ); setMainWidget(mContainerBase); connect( mContainerBase, TQT_SIGNAL(urlClick(const TQString &)), @@ -1546,7 +1546,7 @@ KAboutDialog::KAboutDialog( int layoutType, const TQString &_caption, } -void KAboutDialog::show( void ) +void TDEAboutDialog::show( void ) { adjust(); if( mContainerBase ) { mContainerBase->show(); } @@ -1554,7 +1554,7 @@ void KAboutDialog::show( void ) } -void KAboutDialog::show( TQWidget * /*centerParent*/ ) +void TDEAboutDialog::show( TQWidget * /*centerParent*/ ) { adjust(); if( mContainerBase ) { mContainerBase->show(); } @@ -1562,7 +1562,7 @@ void KAboutDialog::show( TQWidget * /*centerParent*/ ) } -void KAboutDialog::adjust() +void TDEAboutDialog::adjust() { if( !about ) { return; } about->adjust(); @@ -1571,14 +1571,14 @@ void KAboutDialog::adjust() } -void KAboutDialog::setLogo(const TQPixmap& i) +void TDEAboutDialog::setLogo(const TQPixmap& i) { if( !about ) { return; } about->setLogo(i); } -void KAboutDialog::setMaintainer(const TQString &_name, const TQString &_email, +void TDEAboutDialog::setMaintainer(const TQString &_name, const TQString &_email, const TQString &_url, const TQString &_w) { // ################################################################# @@ -1587,7 +1587,7 @@ void KAboutDialog::setMaintainer(const TQString &_name, const TQString &_email, // ################################################################# } -void KAboutDialog::setAuthor(const TQString &_name, const TQString &_email, +void TDEAboutDialog::setAuthor(const TQString &_name, const TQString &_email, const TQString &_url, const TQString &_work) { // ################################################################# @@ -1596,7 +1596,7 @@ void KAboutDialog::setAuthor(const TQString &_name, const TQString &_email, // ################################################################# } -void KAboutDialog::addContributor(const TQString &_name, const TQString &_email, +void TDEAboutDialog::addContributor(const TQString &_name, const TQString &_email, const TQString &_url, const TQString &_w) { // ################################################################# @@ -1605,7 +1605,7 @@ void KAboutDialog::addContributor(const TQString &_name, const TQString &_email, // ################################################################# } -void KAboutDialog::setVersion(const TQString &_name) +void TDEAboutDialog::setVersion(const TQString &_name) { // ################################################################# if( !about ) { return; } @@ -1613,40 +1613,40 @@ void KAboutDialog::setVersion(const TQString &_name) // ################################################################# } -void KAboutDialog::sendEmailSlot(const TQString& /*name*/, const TQString& email) +void TDEAboutDialog::sendEmailSlot(const TQString& /*name*/, const TQString& email) { if ( kapp ) kapp->invokeMailer( email, TQString::null ); /* - kdDebug() << "KAboutDialog::sendEmailSlot: request to send an email to " + kdDebug() << "TDEAboutDialog::sendEmailSlot: request to send an email to " << name << ", " << email << endl; emit(sendEmail(name, email)); */ } -void KAboutDialog::openURLSlot(const TQString& url) +void TDEAboutDialog::openURLSlot(const TQString& url) { if ( kapp ) kapp->invokeBrowser( url ); - //kdDebug() << "KAboutDialog::openURLSlot: request to open URL " << url << endl; + //kdDebug() << "TDEAboutDialog::openURLSlot: request to open URL " << url << endl; //emit(openURL(url)); } -void KAboutDialog::mouseTrackSlot( int /*mode*/, const TQMouseEvent * /*e*/ ) +void TDEAboutDialog::mouseTrackSlot( int /*mode*/, const TQMouseEvent * /*e*/ ) { // By default we do nothing. This method must be reimplemented. } -TQFrame *KAboutDialog::addTextPage( const TQString &title, const TQString &text, +TQFrame *TDEAboutDialog::addTextPage( const TQString &title, const TQString &text, bool richText, int numLines ) { if( !mContainerBase ) { return 0; } return mContainerBase->addTextPage( title, text, richText, numLines ); } -TQFrame *KAboutDialog::addLicensePage( const TQString &title, const TQString &text, +TQFrame *TDEAboutDialog::addLicensePage( const TQString &title, const TQString &text, int numLines ) { if( !mContainerBase ) { return 0; } @@ -1654,7 +1654,7 @@ TQFrame *KAboutDialog::addLicensePage( const TQString &title, const TQString &te } -KAboutContainer *KAboutDialog::addContainerPage( const TQString &title, +TDEAboutContainer *TDEAboutDialog::addContainerPage( const TQString &title, int childAlignment, int innerAlignment ) { if( !mContainerBase ) { return 0; } @@ -1663,7 +1663,7 @@ KAboutContainer *KAboutDialog::addContainerPage( const TQString &title, } -KAboutContainer *KAboutDialog::addScrolledContainerPage( const TQString &title, +TDEAboutContainer *TDEAboutDialog::addScrolledContainerPage( const TQString &title, int childAlignment, int innerAlignment ) { if( !mContainerBase ) { return 0; } @@ -1673,14 +1673,14 @@ KAboutContainer *KAboutDialog::addScrolledContainerPage( const TQString &title, -TQFrame *KAboutDialog::addPage( const TQString &title ) +TQFrame *TDEAboutDialog::addPage( const TQString &title ) { if( !mContainerBase ) { return 0; } return mContainerBase->addEmptyPage( title ); } -KAboutContainer *KAboutDialog::addContainer( int childAlignment, +TDEAboutContainer *TDEAboutDialog::addContainer( int childAlignment, int innerAlignment ) { if( !mContainerBase ) { return 0; } @@ -1688,53 +1688,53 @@ KAboutContainer *KAboutDialog::addContainer( int childAlignment, } -void KAboutDialog::setTitle( const TQString &title ) +void TDEAboutDialog::setTitle( const TQString &title ) { if( !mContainerBase ) { return; } mContainerBase->setTitle( title ); } -void KAboutDialog::setImage( const TQString &fileName ) +void TDEAboutDialog::setImage( const TQString &fileName ) { if( !mContainerBase ) { return; } mContainerBase->setImage( fileName ); } // KDE4: remove -void KAboutDialog::setIcon( const TQString &fileName ) +void TDEAboutDialog::setIcon( const TQString &fileName ) { if( !mContainerBase ) { return; } mContainerBase->setProgramLogo( fileName ); } -void KAboutDialog::setProgramLogo( const TQString &fileName ) +void TDEAboutDialog::setProgramLogo( const TQString &fileName ) { if( !mContainerBase ) { return; } mContainerBase->setProgramLogo( fileName ); } -void KAboutDialog::setProgramLogo( const TQPixmap &pixmap ) +void TDEAboutDialog::setProgramLogo( const TQPixmap &pixmap ) { if( !mContainerBase ) { return; } mContainerBase->setProgramLogo( pixmap ); } -void KAboutDialog::setImageBackgroundColor( const TQColor &color ) +void TDEAboutDialog::setImageBackgroundColor( const TQColor &color ) { if( !mContainerBase ) { return; } mContainerBase->setImageBackgroundColor( color ); } -void KAboutDialog::setImageFrame( bool state ) +void TDEAboutDialog::setImageFrame( bool state ) { if( !mContainerBase ) { return; } mContainerBase->setImageFrame( state ); } -void KAboutDialog::setProduct( const TQString &appName, const TQString &version, +void TDEAboutDialog::setProduct( const TQString &appName, const TQString &version, const TQString &author, const TQString &year ) { if( !mContainerBase ) { return; } @@ -1743,16 +1743,16 @@ void KAboutDialog::setProduct( const TQString &appName, const TQString &version, -void KAboutDialog::imageURL( TQWidget *_parent, const TQString &_caption, +void TDEAboutDialog::imageURL( TQWidget *_parent, const TQString &_caption, const TQString &_path, const TQColor &_imageColor, const TQString &_url ) { - KAboutDialog a( AbtImageOnly, TQString::null, Close, Close, _parent, "image", true ); + TDEAboutDialog a( AbtImageOnly, TQString::null, Close, Close, _parent, "image", true ); a.setPlainCaption( _caption ); a.setImage( _path ); a.setImageBackgroundColor( _imageColor ); - KAboutContainer* const c = a.addContainer( AlignCenter, AlignCenter ); + TDEAboutContainer* const c = a.addContainer( AlignCenter, AlignCenter ); if( c ) { c->addPerson( TQString::null, TQString::null, _url, TQString::null ); @@ -1792,6 +1792,6 @@ void KImageTrackLabel::mouseMoveEvent ( TQMouseEvent *e ) emit mouseTrack( MouseDoubleClick, e ); } -void KAboutDialog::virtual_hook( int id, void* data ) +void TDEAboutDialog::virtual_hook( int id, void* data ) { KDialogBase::virtual_hook( id, data ); } diff --git a/tdeui/kaboutdialog.h b/tdeui/tdeaboutdialog.h index 6f0d80149..fbb19b98e 100644 --- a/tdeui/kaboutdialog.h +++ b/tdeui/tdeaboutdialog.h @@ -38,21 +38,21 @@ class TQLabel; class TQVBoxLayout; class TQTabWidget; class KURLLabel; -class KAboutContainer; -class KAboutContainerBase; +class TDEAboutContainer; +class TDEAboutContainerBase; -class KAboutWidgetPrivate; +class TDEAboutWidgetPrivate; -class KAboutContainerPrivate; +class TDEAboutContainerPrivate; /** - * KAboutContainer can be used to make a application specific AboutDialog. + * TDEAboutContainer can be used to make a application specific AboutDialog. */ -class TDEUI_EXPORT KAboutContainer : public TQFrame +class TDEUI_EXPORT TDEAboutContainer : public TQFrame { Q_OBJECT public: - KAboutContainer( TQWidget *parent=0, const char *name=0, + TDEAboutContainer( TQWidget *parent=0, const char *name=0, int margin=0, int spacing=0, int childAlignment = AlignCenter, int innerAlignment = AlignCenter ); @@ -80,21 +80,21 @@ class TDEUI_EXPORT KAboutContainer : public TQFrame private: TQVBoxLayout *mVbox; int mAlignment; - KAboutContainerPrivate* const d; + TDEAboutContainerPrivate* const d; }; -class KAboutContributorPrivate; +class TDEAboutContributorPrivate; /** - * Used internally by KAboutWidget + * Used internally by TDEAboutWidget * @internal */ -class TDEUI_EXPORT KAboutContributor : public TQFrame +class TDEUI_EXPORT TDEAboutContributor : public TQFrame { Q_OBJECT public: - KAboutContributor( TQWidget *parent=0, const char *name=0, + TDEAboutContributor( TQWidget *parent=0, const char *name=0, const TQString &username=TQString::null, const TQString &email=TQString::null, const TQString &url=TQString::null, @@ -137,17 +137,17 @@ class TDEUI_EXPORT KAboutContributor : public TQFrame bool mShowHeader; bool mShowBold; - KAboutContributorPrivate* const d; + TDEAboutContributorPrivate* const d; virtual void setName(const char *_name) { TQFrame::setName(_name); } }; /** - * KAboutWidget is the main widget for KAboutDialog. + * TDEAboutWidget is the main widget for TDEAboutDialog. * * It has a minimum size set. */ -class TDEUI_EXPORT KAboutWidget : public TQWidget +class TDEUI_EXPORT TDEAboutWidget : public TQWidget { Q_OBJECT @@ -156,7 +156,7 @@ public: /** * The Qt constructor. */ - KAboutWidget(TQWidget* parent=0, const char* name=0 ); + TDEAboutWidget(TQWidget* parent=0, const char* name=0 ); /** * Adjust the minimum size (after setting the properties of the image and @@ -229,11 +229,11 @@ protected: /** * The application developer. */ - KAboutContributor *author; + TDEAboutContributor *author; /** * The application maintainer. */ - KAboutContributor *maintainer; + TDEAboutContributor *maintainer; /** * Show the maintainer? */ @@ -241,21 +241,21 @@ protected: /** * A set of people who contributed to the application. */ - TQPtrList<KAboutContributor> contributors; + TQPtrList<TDEAboutContributor> contributors; // ######################################################################### // private: - KAboutWidgetPrivate* const d; + TDEAboutWidgetPrivate* const d; }; -class KAboutDialogPrivate; +class TDEAboutDialogPrivate; /** * A KDialogBase with predefined main widget. * * As a KDialogBase it uses your application wide settings * for KDialogBase * objects (base frame tiles, main frame tiles etc). - * To use it, simply create a KAboutDialog object, set all (or some) of its + * To use it, simply create a TDEAboutDialog object, set all (or some) of its * properties and show it. Do not derive it to create your own about dialog * until you need some cool features that are unsupported and you have * contacted me to add them. @@ -280,7 +280,7 @@ class KAboutDialogPrivate; * @author Mirko Boehm (mirko@kde.org) and Espen Sand (espensa@online.no) * @see KDialogBase */ -class TDEUI_EXPORT KAboutDialog : public KDialogBase +class TDEUI_EXPORT TDEAboutDialog : public KDialogBase { Q_OBJECT @@ -311,7 +311,7 @@ class TDEUI_EXPORT KAboutDialog : public KDialogBase * addContributor(), or setVersion(). * The dialog will be laid out automatically. */ - KAboutDialog( TQWidget *parent=0, const char *name=0, bool modal=true ); + TDEAboutDialog( TQWidget *parent=0, const char *name=0, bool modal=true ); /** * The extended constructor. (Constructor II). @@ -338,7 +338,7 @@ class TDEUI_EXPORT KAboutDialog : public KDialogBase * @param user3 User button3 text. * */ - KAboutDialog( int dialogLayout, const TQString &caption, int buttonMask, + TDEAboutDialog( int dialogLayout, const TQString &caption, int buttonMask, ButtonCode defaultButton, TQWidget *parent=0, const char *name=0, bool modal=false, bool separator = false, const TQString &user1 = TQString::null, @@ -394,7 +394,7 @@ class TDEUI_EXPORT KAboutDialog : public KDialogBase * (Constructor II only) * Define the program logo to be shown in the dialog. Use this to override the * default program logo. For example, use this function if the - * KAboutDialog is for a panel applet and you want to override the + * TDEAboutDialog is for a panel applet and you want to override the * appletproxy logo with your own pixmap. * * @param fileName Path to file containing logo data in a format that @@ -415,7 +415,7 @@ class TDEUI_EXPORT KAboutDialog : public KDialogBase * (Constructor II only) * Define the program logo to be shown in the dialog. Use this to override the * default program logo. For example, use this function if the - * KAboutDialog is for a panel applet and you want to override the + * TDEAboutDialog is for a panel applet and you want to override the * appletproxy logo with your own pixmap. * * @param pixmap The logo pixmap. @@ -497,7 +497,7 @@ class TDEUI_EXPORT KAboutDialog : public KDialogBase * respect to each other. * @return The new container. */ - KAboutContainer *addContainerPage( const TQString &title, + TDEAboutContainer *addContainerPage( const TQString &title, int childAlignment = AlignCenter, int innerAlignment = AlignCenter ); /** @@ -512,7 +512,7 @@ class TDEUI_EXPORT KAboutDialog : public KDialogBase * respect to each other. * @return The new container. */ - KAboutContainer *addScrolledContainerPage( const TQString &title, + TDEAboutContainer *addScrolledContainerPage( const TQString &title, int childAlignment = AlignCenter, int innerAlignment = AlignCenter ); /** @@ -525,7 +525,7 @@ class TDEUI_EXPORT KAboutDialog : public KDialogBase * respect to each other. * @return The new container. */ - KAboutContainer *addContainer( int childAlignment, int innerAlignment ); + TDEAboutContainer *addContainer( int childAlignment, int innerAlignment ); /** * (Constructor II only) @@ -596,12 +596,12 @@ protected: /** * The main widget (Constructor I) */ - KAboutWidget * about; + TDEAboutWidget * about; /** * The main widget (Constructor II) */ - KAboutContainerBase *mContainerBase; + TDEAboutContainerBase *mContainerBase; // ------------------------------------------------------------------------- protected slots: @@ -627,7 +627,7 @@ protected slots: protected: virtual void virtual_hook( int id, void* data ); private: - KAboutDialogPrivate* const d; + TDEAboutDialogPrivate* const d; }; #endif // defined KABOUTDIALOG_H diff --git a/tdeui/kaboutkde.cpp b/tdeui/tdeabouttde.cpp index f9ee7b72b..d5f45c85a 100644 --- a/tdeui/kaboutkde.cpp +++ b/tdeui/tdeabouttde.cpp @@ -20,14 +20,14 @@ */ // I (espen) prefer that header files are included alphabetically -#include <kaboutkde.h> -#include <kapplication.h> -#include <klocale.h> +#include <tdeabouttde.h> +#include <tdeapplication.h> +#include <tdelocale.h> #include <kstandarddirs.h> -KAboutKDE::KAboutKDE( TQWidget *parent, const char *name, bool modal ) - :KAboutDialog( KAboutDialog::AbtKDEStandard, TQString::fromLatin1("TDE"), +TDEAboutKDE::TDEAboutKDE( TQWidget *parent, const char *name, bool modal ) + :TDEAboutDialog( TDEAboutDialog::AbtKDEStandard, TQString::fromLatin1("TDE"), KDialogBase::Help|KDialogBase::Close, KDialogBase::Close, parent, name, modal ) { diff --git a/tdeui/kaboutkde.h b/tdeui/tdeabouttde.h index 017d0f220..a75b92904 100644 --- a/tdeui/kaboutkde.h +++ b/tdeui/tdeabouttde.h @@ -22,7 +22,7 @@ #ifndef _KABOUT_KDE_H_ #define _KABOUT_KDE_H_ -#include <kaboutdialog.h> +#include <tdeaboutdialog.h> /** * @short Standard "About KDE" dialog box, @@ -30,14 +30,14 @@ * This class provides the standard "About KDE" dialog box that is used * KHelpMenu Normally you should not use this class directly but * rather the KHelpMenu class or even better just subclass your - * toplevel window from KMainWindow. If you do the latter, the help + * toplevel window from TDEMainWindow. If you do the latter, the help * menu and thereby this dialog box is available through the - * KMainWindow::helpMenu() function. + * TDEMainWindow::helpMenu() function. * * @author Espen Sand (espen@kde.org) */ -class TDEUI_EXPORT KAboutKDE : public KAboutDialog +class TDEUI_EXPORT TDEAboutKDE : public TDEAboutDialog { public: /** @@ -53,7 +53,7 @@ class TDEUI_EXPORT KAboutKDE : public KAboutDialog * made visible using TQWidget::show(). Otherwise it will be * modal and must be made visible using TQWidget::exec() */ - KAboutKDE( TQWidget *parent=0, const char *name=0, bool modal=true ); + TDEAboutKDE( TQWidget *parent=0, const char *name=0, bool modal=true ); }; diff --git a/tdeui/kaccelgen.h b/tdeui/tdeaccelgen.h index 222d948ba..d1e761876 100644 --- a/tdeui/kaccelgen.h +++ b/tdeui/tdeaccelgen.h @@ -77,7 +77,7 @@ * + Add more Deref classes so that we can access a wider variety of * collections. * */ -namespace KAccelGen +namespace TDEAccelGen { // HELPERS @@ -274,7 +274,7 @@ generateFromKeys(const TQMap<TQString,Data>& source, TQStringList& target) } -} // end namespace KAccelGen +} // end namespace TDEAccelGen #endif diff --git a/tdeui/kaction.cpp b/tdeui/tdeaction.cpp index 270c00ec4..6f29ab848 100644 --- a/tdeui/kaction.cpp +++ b/tdeui/tdeaction.cpp @@ -23,24 +23,24 @@ Boston, MA 02110-1301, USA. */ -#include "kaction.h" +#include "tdeaction.h" #include <assert.h> #include <tqtooltip.h> #include <tqwhatsthis.h> -#include <kaccel.h> -#include <kaccelbase.h> -#include <kaccelprivate.h> -#include <kapplication.h> +#include <tdeaccel.h> +#include <tdeaccelbase.h> +#include <tdeaccelprivate.h> +#include <tdeapplication.h> #include <kdebug.h> #include <kguiitem.h> -#include <kmainwindow.h> -#include <kmenubar.h> -#include <kpopupmenu.h> -#include <ktoolbar.h> -#include <ktoolbarbutton.h> +#include <tdemainwindow.h> +#include <tdemenubar.h> +#include <tdepopupmenu.h> +#include <tdetoolbar.h> +#include <tdetoolbarbutton.h> #include <ft2build.h> #include <X11/Xdefs.h> @@ -54,52 +54,52 @@ /** * How it works. -* KActionCollection is an organizing container for KActions. -* KActionCollection keeps track of the information necessary to handle +* TDEActionCollection is an organizing container for TDEActions. +* TDEActionCollection keeps track of the information necessary to handle * configuration and shortcuts. * * Focus Widget pointer: * This is the widget which is the focus for action shortcuts. -* It is set either by passing a TQWidget* to the KActionCollection constructor +* It is set either by passing a TQWidget* to the TDEActionCollection constructor * or by calling setWidget() if the widget wasn't known when the object was * initially constructed (as in KXMLGUIClient and KParts::PartBase) * * Shortcuts: * An action's shortcut will not not be connected unless a focus widget has -* been specified in KActionCollection. +* been specified in TDEActionCollection. * * XML Filename: * This is used to save user-modified settings back to the *ui.rc file. * It is set by KXMLGUIFactory. */ -int KAction::getToolButtonID() +int TDEAction::getToolButtonID() { static int toolbutton_no = -2; return toolbutton_no--; } //--------------------------------------------------------------------- -// KAction::KActionPrivate +// TDEAction::TDEActionPrivate //--------------------------------------------------------------------- -class KAction::KActionPrivate : public KGuiItem +class TDEAction::TDEActionPrivate : public KGuiItem { public: - KActionPrivate() : KGuiItem() + TDEActionPrivate() : KGuiItem() { - m_kaccel = 0; + m_tdeaccel = 0; m_configurable = true; } - KAccel *m_kaccel; - TQValueList<KAccel*> m_kaccelList; + TDEAccel *m_tdeaccel; + TQValueList<TDEAccel*> m_tdeaccelList; TQString m_groupText; TQString m_group; - KShortcut m_cut; - KShortcut m_cutDefault; + TDEShortcut m_cut; + TDEShortcut m_cutDefault; bool m_configurable; @@ -117,39 +117,39 @@ public: }; //--------------------------------------------------------------------- -// KAction +// TDEAction //--------------------------------------------------------------------- -KAction::KAction( const TQString& text, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) + TDEActionCollection* parent, const char* name ) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); } -KAction::KAction( const TQString& text, const TQString& sIconName, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQString& sIconName, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) + TDEActionCollection* parent, const char* name ) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); d->setIconName( sIconName ); } -KAction::KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) + TDEActionCollection* parent, const char* name ) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); d->setIconSet( pix ); } -KAction::KAction( const KGuiItem& item, const KShortcut& cut, +TDEAction::TDEAction( const KGuiItem& item, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) + TDEActionCollection* parent, const char* name ) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( item.text(), cut, receiver, slot ); if( item.hasIcon() ) @@ -159,71 +159,71 @@ KAction::KAction( const KGuiItem& item, const KShortcut& cut, } #ifndef KDE_NO_COMPAT // KDE 4: remove -KAction::KAction( const TQString& text, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, 0, 0 ); } -KAction::KAction( const TQString& text, const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); } -KAction::KAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, 0, 0 ); setIconSet( pix ); } -KAction::KAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) -: TQObject( parent, name ), d(new KActionPrivate) +: TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, 0, 0 ); d->setIconName( pix ); } -KAction::KAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); setIconSet( pix ); } -KAction::KAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEAction::TDEAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) + : TQObject( parent, name ), d(new TDEActionPrivate) { initPrivate( text, cut, receiver, slot ); d->setIconName(pix); } -KAction::KAction( TQObject* parent, const char* name ) - : TQObject( parent, name ), d(new KActionPrivate) +TDEAction::TDEAction( TQObject* parent, const char* name ) + : TQObject( parent, name ), d(new TDEActionPrivate) { - initPrivate( TQString::null, KShortcut(), 0, 0 ); + initPrivate( TQString::null, TDEShortcut(), 0, 0 ); } #endif // KDE 4: remove end -KAction::~KAction() +TDEAction::~TDEAction() { - kdDebug(129) << "KAction::~KAction( this = \"" << name() << "\" )" << endl; // -- ellis + kdDebug(129) << "TDEAction::~TDEAction( this = \"" << name() << "\" )" << endl; // -- ellis #ifndef KDE_NO_COMPAT - if (d->m_kaccel) + if (d->m_tdeaccel) unplugAccel(); #endif @@ -231,9 +231,9 @@ KAction::~KAction() if ( m_parentCollection ) { m_parentCollection->take( this ); - const TQValueList<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::const_iterator itr = accelList.constBegin(); - const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd(); + const TQValueList<TDEAccel*> & accelList = d->m_tdeaccelList; + TQValueList<TDEAccel*>::const_iterator itr = accelList.constBegin(); + const TQValueList<TDEAccel*>::const_iterator itrEnd = accelList.constEnd(); const char * const namePtr = name(); for (; itr != itrEnd; ++itr ) @@ -242,7 +242,7 @@ KAction::~KAction() } // Do not call unplugAll from here, as tempting as it sounds. - // KAction is designed around the idea that you need to plug + // TDEAction is designed around the idea that you need to plug // _and_ to unplug it "manually". Unplugging leads to an important // slowdown when e.g. closing the window, in which case we simply // want to destroy everything asap, not to remove actions one by one @@ -251,13 +251,13 @@ KAction::~KAction() delete d; } -void KAction::initPrivate( const TQString& text, const KShortcut& cut, +void TDEAction::initPrivate( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot ) { d->m_cutDefault = cut; - m_parentCollection = tqt_dynamic_cast<KActionCollection *>( parent() ); - kdDebug(129) << "KAction::initPrivate(): this = " << this << " name = \"" << name() << "\" cut = " << cut.toStringInternal() << " m_parentCollection = " << m_parentCollection << endl; + m_parentCollection = tqt_dynamic_cast<TDEActionCollection *>( parent() ); + kdDebug(129) << "TDEAction::initPrivate(): this = " << this << " name = \"" << name() << "\" cut = " << cut.toStringInternal() << " m_parentCollection = " << m_parentCollection << endl; if ( m_parentCollection ) m_parentCollection->insert( this ); @@ -265,28 +265,28 @@ void KAction::initPrivate( const TQString& text, const KShortcut& cut, connect( this, TQT_SIGNAL( activated() ), receiver, slot ); if( !cut.isNull() && !qstrcmp( name(), "unnamed" ) ) - kdWarning(129) << "KAction::initPrivate(): trying to assign a shortcut (" << cut.toStringInternal() << ") to an unnamed action." << endl; + kdWarning(129) << "TDEAction::initPrivate(): trying to assign a shortcut (" << cut.toStringInternal() << ") to an unnamed action." << endl; d->setText( text ); initShortcut( cut ); } -bool KAction::isPlugged() const +bool TDEAction::isPlugged() const { - return (!d->m_containers.empty()) || d->m_kaccel; + return (!d->m_containers.empty()) || d->m_tdeaccel; } -bool KAction::isPlugged( const TQWidget *container ) const +bool TDEAction::isPlugged( const TQWidget *container ) const { return findContainer( container ) > -1; } -bool KAction::isPlugged( const TQWidget *container, int id ) const +bool TDEAction::isPlugged( const TQWidget *container, int id ) const { int i = findContainer( container ); return ( i > -1 && itemId( i ) == id ); } -bool KAction::isPlugged( const TQWidget *container, const TQWidget *_representative ) const +bool TDEAction::isPlugged( const TQWidget *container, const TQWidget *_representative ) const { int i = findContainer( container ); return ( i > -1 && representative( i ) == _representative ); @@ -295,8 +295,8 @@ bool KAction::isPlugged( const TQWidget *container, const TQWidget *_representat /* Three actionCollection conditions: - 1) Scope is known on creation and KAccel object is created (e.g. KMainWindow) - 2) Scope is unknown and no KAccel object is available (e.g. KXMLGUIClient) + 1) Scope is known on creation and TDEAccel object is created (e.g. TDEMainWindow) + 2) Scope is unknown and no TDEAccel object is available (e.g. KXMLGUIClient) a) addClient() will be called on object b) we just want to add the actions to another KXMLGUIClient object @@ -310,7 +310,7 @@ Undo and Redo should be available in both KoView objects, and calling the undo->setEnabled() should affect both KoViews When addClient is called, it needs to be able to find the undo and redo actions -When it calls plug() on them, they need to be inserted into the KAccel object of the appropriate KoView +When it calls plug() on them, they need to be inserted into the TDEAccel object of the appropriate KoView In this case, the actionCollection belongs to KoDoc and we need to let it know that its shortcuts have the same scope as the KoView actionCollection @@ -325,9 +325,9 @@ View add document actionCollection as sub-collection A parentCollection is created -Scenario 1: parentCollection has a focus widget set (e.g. via KMainWindow) - A KAccel object is created in the parentCollection - A KAction is created with parent=parentCollection +Scenario 1: parentCollection has a focus widget set (e.g. via TDEMainWindow) + A TDEAccel object is created in the parentCollection + A TDEAction is created with parent=parentCollection The shortcut is inserted into this actionCollection Scenario 1a: xml isn't used done @@ -335,13 +335,13 @@ Scenario 1: parentCollection has a focus widget set (e.g. via KMainWindow) setWidget is called -- ignore shortcuts are set Scenario 2: parentCollection has no focus widget (e.g., KParts) - A KAction is created with parent=parentCollection + A TDEAction is created with parent=parentCollection Scenario 2a: xml isn't used no shortcuts Scenario 2b: KXMLGUIBuilder::addClient() called setWidget is called - shortcuts are inserted into current KAccel - shortcuts are set in all other KAccels, if the action is present in the other KAccels + shortcuts are inserted into current TDEAccel + shortcuts are set in all other TDEAccels, if the action is present in the other TDEAccels */ /* @@ -352,95 +352,95 @@ shortcut may be set: - on plugAccel (deprecated) On Construction: [via initShortcut()] - insert into KAccel of m_parentCollection, - if kaccel() && isAutoConnectShortcuts() exists + insert into TDEAccel of m_parentCollection, + if tdeaccel() && isAutoConnectShortcuts() exists On Plug: [via plug() -> plugShortcut()] - insert into KAccel of m_parentCollection, if exists and not already inserted into + insert into TDEAccel of m_parentCollection, if exists and not already inserted into On Read XML: [via setShortcut()] - set in all current KAccels - insert into KAccel of m_parentCollection, if exists and not already inserted into + set in all current TDEAccels + insert into TDEAccel of m_parentCollection, if exists and not already inserted into */ -KAccel* KAction::kaccelCurrent() +TDEAccel* TDEAction::tdeaccelCurrent() { - if( m_parentCollection && m_parentCollection->builderKAccel() ) - return m_parentCollection->builderKAccel(); - else if( m_parentCollection && m_parentCollection->kaccel() ) - return m_parentCollection->kaccel(); + if( m_parentCollection && m_parentCollection->builderTDEAccel() ) + return m_parentCollection->builderTDEAccel(); + else if( m_parentCollection && m_parentCollection->tdeaccel() ) + return m_parentCollection->tdeaccel(); else return 0L; } // Only to be called from initPrivate() -bool KAction::initShortcut( const KShortcut& cut ) +bool TDEAction::initShortcut( const TDEShortcut& cut ) { d->m_cut = cut; - // Only insert action into KAccel if it has a valid name, + // Only insert action into TDEAccel if it has a valid name, if( qstrcmp( name(), "unnamed" ) && m_parentCollection && m_parentCollection->isAutoConnectShortcuts() && - m_parentCollection->kaccel() ) + m_parentCollection->tdeaccel() ) { - insertKAccel( m_parentCollection->kaccel() ); + insertTDEAccel( m_parentCollection->tdeaccel() ); return true; } return false; } // Only to be called from plug() -void KAction::plugShortcut() +void TDEAction::plugShortcut() { - KAccel* const kaccel = kaccelCurrent(); + TDEAccel* const tdeaccel = tdeaccelCurrent(); - //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 TQValueList<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::const_iterator itr = accelList.constBegin(); - const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd(); + //kdDebug(129) << "TDEAction::plugShortcut(): this = " << this << " tdeaccel() = " << (m_parentCollection ? m_parentCollection->tdeaccel() : 0) << endl; + if( tdeaccel && qstrcmp( name(), "unnamed" ) ) { + // Check if already plugged into current TDEAccel object + const TQValueList<TDEAccel*> & accelList = d->m_tdeaccelList; + TQValueList<TDEAccel*>::const_iterator itr = accelList.constBegin(); + const TQValueList<TDEAccel*>::const_iterator itrEnd = accelList.constEnd(); for( ; itr != itrEnd; ++itr) { - if( (*itr) == kaccel ) + if( (*itr) == tdeaccel ) return; } - insertKAccel( kaccel ); + insertTDEAccel( tdeaccel ); } } -bool KAction::setShortcut( const KShortcut& cut ) +bool TDEAction::setShortcut( const TDEShortcut& cut ) { bool bChanged = (d->m_cut != cut); d->m_cut = cut; - KAccel* const kaccel = kaccelCurrent(); + TDEAccel* const tdeaccel = tdeaccelCurrent(); bool bInsertRequired = true; - // Apply new shortcut to all existing KAccel objects + // Apply new shortcut to all existing TDEAccel objects - const TQValueList<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::const_iterator itr = accelList.constBegin(); - const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd(); + const TQValueList<TDEAccel*> & accelList = d->m_tdeaccelList; + TQValueList<TDEAccel*>::const_iterator itr = accelList.constBegin(); + const TQValueList<TDEAccel*>::const_iterator itrEnd = accelList.constEnd(); for( ; itr != itrEnd; ++itr) { // Check whether shortcut has already been plugged into - // the current kaccel object. - if( (*itr) == kaccel ) + // the current tdeaccel object. + if( (*itr) == tdeaccel ) bInsertRequired = false; if( bChanged ) - updateKAccelShortcut( *itr ); + updateTDEAccelShortcut( *itr ); } - // Only insert action into KAccel if it has a valid name, - if( kaccel && bInsertRequired && qstrcmp( name(), "unnamed" ) ) - insertKAccel( kaccel ); + // Only insert action into TDEAccel if it has a valid name, + if( tdeaccel && bInsertRequired && qstrcmp( name(), "unnamed" ) ) + insertTDEAccel( tdeaccel ); if( bChanged ) { #ifndef KDE_NO_COMPAT // KDE 4: remove - if ( d->m_kaccel ) - d->m_kaccel->setShortcut( name(), cut ); + if ( d->m_tdeaccel ) + d->m_tdeaccel->setShortcut( name(), cut ); #endif // KDE 4: remove end int len = containerCount(); for( int i = 0; i < len; ++i ) @@ -449,54 +449,54 @@ bool KAction::setShortcut( const KShortcut& cut ) return true; } -bool KAction::updateKAccelShortcut( KAccel* kaccel ) +bool TDEAction::updateTDEAccelShortcut( TDEAccel* tdeaccel ) { // Check if action is permitted - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return false; bool b = true; - if ( !kaccel->actions().actionPtr( name() ) ) { + if ( !tdeaccel->actions().actionPtr( name() ) ) { if(!d->m_cut.isNull() ) { kdDebug(129) << "Inserting " << name() << ", " << d->text() << ", " << d->plainText() << endl; - b = kaccel->insert( name(), d->plainText(), TQString::null, + b = tdeaccel->insert( name(), d->plainText(), TQString::null, d->m_cut, this, TQT_SLOT(slotActivated()), isShortcutConfigurable(), isEnabled() ); } } else - b = kaccel->setShortcut( name(), d->m_cut ); + b = tdeaccel->setShortcut( name(), d->m_cut ); return b; } -void KAction::insertKAccel( KAccel* kaccel ) +void TDEAction::insertTDEAccel( TDEAccel* tdeaccel ) { - //kdDebug(129) << "KAction::insertKAccel( " << kaccel << " ): this = " << this << endl; - if ( !kaccel->actions().actionPtr( name() ) ) { - if( updateKAccelShortcut( kaccel ) ) { - d->m_kaccelList.append( kaccel ); - connect( kaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); + //kdDebug(129) << "TDEAction::insertTDEAccel( " << tdeaccel << " ): this = " << this << endl; + if ( !tdeaccel->actions().actionPtr( name() ) ) { + if( updateTDEAccelShortcut( tdeaccel ) ) { + d->m_tdeaccelList.append( tdeaccel ); + connect( tdeaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); } } else - kdWarning(129) << "KAction::insertKAccel( kaccel = " << kaccel << " ): KAccel object already contains an action name \"" << name() << "\"" << endl; // -- ellis + kdWarning(129) << "TDEAction::insertTDEAccel( tdeaccel = " << tdeaccel << " ): TDEAccel object already contains an action name \"" << name() << "\"" << endl; // -- ellis } -void KAction::removeKAccel( KAccel* kaccel ) +void TDEAction::removeTDEAccel( TDEAccel* tdeaccel ) { - //kdDebug(129) << "KAction::removeKAccel( " << i << " ): this = " << this << endl; - TQValueList<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::iterator itr = accelList.begin(); - const TQValueList<KAccel*>::iterator itrEnd = accelList.end(); + //kdDebug(129) << "TDEAction::removeTDEAccel( " << i << " ): this = " << this << endl; + TQValueList<TDEAccel*> & accelList = d->m_tdeaccelList; + TQValueList<TDEAccel*>::iterator itr = accelList.begin(); + const TQValueList<TDEAccel*>::iterator itrEnd = accelList.end(); for( ; itr != itrEnd; ++itr) { - if( (*itr) == kaccel ) { - kaccel->remove( name() ); + if( (*itr) == tdeaccel ) { + tdeaccel->remove( name() ); accelList.remove( itr ); - disconnect( kaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); + disconnect( tdeaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); break; } } @@ -504,13 +504,13 @@ void KAction::removeKAccel( KAccel* kaccel ) #ifndef KDE_NO_COMPAT // KDE 4: remove -void KAction::setAccel( int keyQt ) +void TDEAction::setAccel( int keyQt ) { - setShortcut( KShortcut(keyQt) ); + setShortcut( TDEShortcut(keyQt) ); } #endif // KDE 4: remove end -void KAction::updateShortcut( int i ) +void TDEAction::updateShortcut( int i ) { int id = itemId( i ); @@ -523,12 +523,12 @@ void KAction::updateShortcut( int i ) static_cast<TQMenuBar*>(w)->setAccel( d->m_cut.keyCodeQt(), id ); } -void KAction::updateShortcut( TQPopupMenu* menu, int id ) +void TDEAction::updateShortcut( TQPopupMenu* menu, int id ) { - //kdDebug(129) << "KAction::updateShortcut(): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl; - // If the action has a KAccel object, + //kdDebug(129) << "TDEAction::updateShortcut(): this = " << this << " d->m_tdeaccelList.count() = " << d->m_tdeaccelList.count() << endl; + // If the action has a TDEAccel object, // show the string representation of its shortcut. - if ( d->m_kaccel || d->m_kaccelList.count() ) { + if ( d->m_tdeaccel || d->m_tdeaccelList.count() ) { TQString s = menu->text( id ); int i = s.find( '\t' ); if ( i >= 0 ) @@ -540,41 +540,41 @@ void KAction::updateShortcut( TQPopupMenu* menu, int id ) } // Otherwise insert the shortcut itself into the popup menu. else { - // This is a fall-hack in case the KAction is missing a proper parent collection. + // This is a fall-hack in case the TDEAction is missing a proper parent collection. // It should be removed eventually. --ellis menu->setAccel( d->m_cut.keyCodeQt(), id ); - kdDebug(129) << "KAction::updateShortcut(): name = \"" << name() << "\", cut = " << d->m_cut.toStringInternal() << "; No KAccel, probably missing a parent collection." << endl; + kdDebug(129) << "TDEAction::updateShortcut(): name = \"" << name() << "\", cut = " << d->m_cut.toStringInternal() << "; No TDEAccel, probably missing a parent collection." << endl; } } -const KShortcut& KAction::shortcut() const +const TDEShortcut& TDEAction::shortcut() const { return d->m_cut; } -const KShortcut& KAction::shortcutDefault() const +const TDEShortcut& TDEAction::shortcutDefault() const { return d->m_cutDefault; } -TQString KAction::shortcutText() const +TQString TDEAction::shortcutText() const { return d->m_cut.toStringInternal(); } -void KAction::setShortcutText( const TQString& s ) +void TDEAction::setShortcutText( const TQString& s ) { - setShortcut( KShortcut(s) ); + setShortcut( TDEShortcut(s) ); } #ifndef KDE_NO_COMPAT // Remove in KDE 4 -int KAction::accel() const +int TDEAction::accel() const { return d->m_cut.keyCodeQt(); } #endif -void KAction::setGroup( const TQString& grp ) +void TDEAction::setGroup( const TQString& grp ) { d->m_group = grp; @@ -583,27 +583,27 @@ void KAction::setGroup( const TQString& grp ) updateGroup( i ); } -void KAction::updateGroup( int ) +void TDEAction::updateGroup( int ) { // DO SOMETHING } -TQString KAction::group() const +TQString TDEAction::group() const { return d->m_group; } -bool KAction::isEnabled() const +bool TDEAction::isEnabled() const { return d->isEnabled(); } -bool KAction::isShortcutConfigurable() const +bool TDEAction::isShortcutConfigurable() const { return d->m_configurable; } -void KAction::setToolTip( const TQString& tt ) +void TDEAction::setToolTip( const TQString& tt ) { d->setToolTip( tt ); @@ -612,39 +612,39 @@ void KAction::setToolTip( const TQString& tt ) updateToolTip( i ); } -void KAction::updateToolTip( int i ) +void TDEAction::updateToolTip( int i ) { TQWidget *w = container( i ); - if ( ::tqqt_cast<KToolBar *>( w ) ) - TQToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() ); + if ( ::tqqt_cast<TDEToolBar *>( w ) ) + TQToolTip::add( static_cast<TDEToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() ); } -TQString KAction::toolTip() const +TQString TDEAction::toolTip() const { return d->toolTip(); } -int KAction::plug( TQWidget *w, int index ) +int TDEAction::plug( TQWidget *w, int index ) { - //kdDebug(129) << "KAction::plug( " << w << ", " << index << " )" << endl; + //kdDebug(129) << "TDEAction::plug( " << w << ", " << index << " )" << endl; if (!w ) { - kdWarning(129) << "KAction::plug called with 0 argument\n"; + kdWarning(129) << "TDEAction::plug called with 0 argument\n"; return -1; } - // Ellis: print warning if there is a shortcut, but no KAccel available (often due to no widget available in the actioncollection) + // Ellis: print warning if there is a shortcut, but no TDEAccel available (often due to no widget available in the actioncollection) // David: Well, it doesn't matter much, things still work (e.g. Undo in koffice) via TQAccel. - // We should probably re-enable the warning for things that only KAccel can do, though - e.g. WIN key (mapped to Meta). + // We should probably re-enable the warning for things that only TDEAccel can do, though - e.g. WIN key (mapped to Meta). #if 0 //ndef NDEBUG - KAccel* kaccel = kaccelCurrent(); - if( !d->m_cut.isNull() && !kaccel ) { - kdDebug(129) << "KAction::plug(): has no KAccel object; this = " << this << " name = " << name() << " parentCollection = " << m_parentCollection << endl; // ellis + TDEAccel* tdeaccel = tdeaccelCurrent(); + if( !d->m_cut.isNull() && !tdeaccel ) { + kdDebug(129) << "TDEAction::plug(): has no TDEAccel object; this = " << this << " name = " << name() << " parentCollection = " << m_parentCollection << endl; // ellis } #endif // Check if action is permitted - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; plugShortcut(); @@ -653,17 +653,17 @@ int KAction::plug( TQWidget *w, int index ) { TQPopupMenu* menu = static_cast<TQPopupMenu*>( w ); int id; - // Don't insert shortcut into menu if it's already in a KAccel object. - int keyQt = (d->m_kaccelList.count() || d->m_kaccel) ? 0 : d->m_cut.keyCodeQt(); + // Don't insert shortcut into menu if it's already in a TDEAccel object. + int keyQt = (d->m_tdeaccelList.count() || d->m_tdeaccel) ? 0 : d->m_cut.keyCodeQt(); if ( d->hasIcon() ) { - KInstance *instance; + TDEInstance *instance; if ( m_parentCollection ) instance = m_parentCollection->instance(); else - instance = KGlobal::instance(); - id = menu->insertItem( d->iconSet( KIcon::Small, 0, instance ), d->text(), this,//dsweet + instance = TDEGlobal::instance(); + id = menu->insertItem( d->iconSet( TDEIcon::Small, 0, instance ), d->text(), this,//dsweet TQT_SLOT( slotPopupActivated() ), keyQt, -1, index ); } @@ -672,9 +672,9 @@ int KAction::plug( TQWidget *w, int index ) TQT_SLOT( slotPopupActivated() ), keyQt, -1, index ); - // If the shortcut is already in a KAccel object, then + // If the shortcut is already in a TDEAccel object, then // we need to set the menu item's shortcut text. - if ( d->m_kaccelList.count() || d->m_kaccel ) + if ( d->m_tdeaccelList.count() || d->m_tdeaccel ) updateShortcut( menu, id ); // call setItemEnabled only if the item really should be disabled, @@ -693,16 +693,16 @@ int KAction::plug( TQWidget *w, int index ) return d->m_containers.count() - 1; } - else if ( ::tqqt_cast<KToolBar *>( w ) ) + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) { - KToolBar *bar = static_cast<KToolBar *>( w ); + TDEToolBar *bar = static_cast<TDEToolBar *>( w ); int id_ = getToolButtonID(); - KInstance *instance; + TDEInstance *instance; if ( m_parentCollection ) instance = m_parentCollection->instance(); else - instance = KGlobal::instance(); + instance = TDEGlobal::instance(); if ( icon().isEmpty() && !iconSet().pixmap().isNull() ) // old code using TQIconSet directly { @@ -720,7 +720,7 @@ int KAction::plug( TQWidget *w, int index ) d->isEnabled(), d->plainText(), index, instance ); } - KToolBarButton* ktb = bar->getButton(id_); + TDEToolBarButton* ktb = bar->getButton(id_); ktb->setName( TQCString("toolbutton_")+name() ); if ( !d->whatsThis().isEmpty() ) @@ -742,7 +742,7 @@ int KAction::plug( TQWidget *w, int index ) return -1; } -void KAction::unplug( TQWidget *w ) +void TDEAction::unplug( TQWidget *w ) { int i = findContainer( w ); if ( i == -1 ) @@ -754,9 +754,9 @@ void KAction::unplug( TQWidget *w ) TQPopupMenu *menu = static_cast<TQPopupMenu *>( w ); menu->removeItem( id ); } - else if ( ::tqqt_cast<KToolBar *>( w ) ) + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) { - KToolBar *bar = static_cast<KToolBar *>( w ); + TDEToolBar *bar = static_cast<TDEToolBar *>( w ); bar->removeItemDelayed( id ); } else if ( ::tqqt_cast<TQMenuBar *>( w ) ) @@ -770,45 +770,45 @@ void KAction::unplug( TQWidget *w ) m_parentCollection->disconnectHighlight( w, this ); } -void KAction::plugAccel(KAccel *kacc, bool configurable) +void TDEAction::plugAccel(TDEAccel *kacc, bool configurable) { - kdWarning(129) << "KAction::plugAccel(): call to deprecated action." << endl; + kdWarning(129) << "TDEAction::plugAccel(): call to deprecated action." << endl; kdDebug(129) << kdBacktrace() << endl; - //kdDebug(129) << "KAction::plugAccel( kacc = " << kacc << " ): name \"" << name() << "\"" << endl; - if ( d->m_kaccel ) + //kdDebug(129) << "TDEAction::plugAccel( kacc = " << kacc << " ): name \"" << name() << "\"" << endl; + if ( d->m_tdeaccel ) unplugAccel(); // If the parent collection's accel ptr isn't set yet //if ( m_parentCollection && !m_parentCollection->accel() ) // m_parentCollection->setAccel( kacc ); - // We can only plug this action into the given KAccel object + // We can only plug this action into the given TDEAccel object // if it does not already contain an action with the same name. if ( !kacc->actions().actionPtr(name()) ) { - d->m_kaccel = kacc; - d->m_kaccel->insert(name(), d->plainText(), TQString::null, - KShortcut(d->m_cut), + d->m_tdeaccel = kacc; + d->m_tdeaccel->insert(name(), d->plainText(), TQString::null, + TDEShortcut(d->m_cut), this, TQT_SLOT(slotActivated()), configurable, isEnabled()); - connect(d->m_kaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed())); - //connect(d->m_kaccel, TQT_SIGNAL(keycodeChanged()), this, TQT_SLOT(slotKeycodeChanged())); + connect(d->m_tdeaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed())); + //connect(d->m_tdeaccel, TQT_SIGNAL(keycodeChanged()), this, TQT_SLOT(slotKeycodeChanged())); } else - kdWarning(129) << "KAction::plugAccel( kacc = " << kacc << " ): KAccel object already contains an action name \"" << name() << "\"" << endl; // -- ellis + kdWarning(129) << "TDEAction::plugAccel( kacc = " << kacc << " ): TDEAccel object already contains an action name \"" << name() << "\"" << endl; // -- ellis } -void KAction::unplugAccel() +void TDEAction::unplugAccel() { - //kdDebug(129) << "KAction::unplugAccel() " << this << " " << name() << endl; - if ( d->m_kaccel ) + //kdDebug(129) << "TDEAction::unplugAccel() " << this << " " << name() << endl; + if ( d->m_tdeaccel ) { - d->m_kaccel->remove(name()); - d->m_kaccel = 0; + d->m_tdeaccel->remove(name()); + d->m_tdeaccel = 0; } } -void KAction::plugMainWindowAccel( TQWidget *w ) +void TDEAction::plugMainWindowAccel( TQWidget *w ) { // Note: topLevelWidget() stops too early, we can't use it. TQWidget * tl = w; @@ -816,28 +816,28 @@ void KAction::plugMainWindowAccel( TQWidget *w ) while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store tl = n; - KMainWindow * mw = tqt_dynamic_cast<KMainWindow *>(tl); // try to see if it's a kmainwindow + TDEMainWindow * mw = tqt_dynamic_cast<TDEMainWindow *>(tl); // try to see if it's a tdemainwindow if (mw) plugAccel( mw->accel() ); else - kdDebug(129) << "KAction::plugMainWindowAccel: Toplevel widget isn't a KMainWindow, can't plug accel. " << tl << endl; + kdDebug(129) << "TDEAction::plugMainWindowAccel: Toplevel widget isn't a TDEMainWindow, can't plug accel. " << tl << endl; } -void KAction::setEnabled(bool enable) +void TDEAction::setEnabled(bool enable) { - //kdDebug(129) << "KAction::setEnabled( " << enable << " ): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl; + //kdDebug(129) << "TDEAction::setEnabled( " << enable << " ): this = " << this << " d->m_tdeaccelList.count() = " << d->m_tdeaccelList.count() << endl; if ( enable == d->isEnabled() ) return; #ifndef KDE_NO_COMPAT // KDE 4: remove - if (d->m_kaccel) - d->m_kaccel->setEnabled(name(), enable); + if (d->m_tdeaccel) + d->m_tdeaccel->setEnabled(name(), enable); #endif // KDE 4: remove end - const TQValueList<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::const_iterator itr = accelList.constBegin(); - const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd(); + const TQValueList<TDEAccel*> & accelList = d->m_tdeaccelList; + TQValueList<TDEAccel*>::const_iterator itr = accelList.constBegin(); + const TQValueList<TDEAccel*>::const_iterator itrEnd = accelList.constEnd(); const char * const namePtr = name(); @@ -853,7 +853,7 @@ void KAction::setEnabled(bool enable) emit enabled( d->isEnabled() ); } -void KAction::updateEnabled( int i ) +void TDEAction::updateEnabled( int i ) { TQWidget *w = container( i ); @@ -861,33 +861,33 @@ void KAction::updateEnabled( int i ) static_cast<TQPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); else if ( ::tqqt_cast<TQMenuBar *>( w ) ) static_cast<TQMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); - else if ( ::tqqt_cast<KToolBar *>( w ) ) - static_cast<KToolBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) + static_cast<TDEToolBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); } -void KAction::setShortcutConfigurable( bool b ) +void TDEAction::setShortcutConfigurable( bool b ) { d->m_configurable = b; } -void KAction::setText( const TQString& text ) +void TDEAction::setText( const TQString& text ) { #ifndef KDE_NO_COMPAT // KDE 4: remove - if (d->m_kaccel) { - KAccelAction* pAction = d->m_kaccel->actions().actionPtr(name()); + if (d->m_tdeaccel) { + TDEAccelAction* pAction = d->m_tdeaccel->actions().actionPtr(name()); if (pAction) pAction->setLabel( text ); } #endif // KDE 4: remove end - const TQValueList<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::const_iterator itr = accelList.constBegin(); - const TQValueList<KAccel*>::const_iterator itrEnd = accelList.constEnd(); + const TQValueList<TDEAccel*> & accelList = d->m_tdeaccelList; + TQValueList<TDEAccel*>::const_iterator itr = accelList.constBegin(); + const TQValueList<TDEAccel*>::const_iterator itrEnd = accelList.constEnd(); const char * const namePtr = name(); for( ; itr != itrEnd; ++itr ) { - KAccelAction* const pAction = (*itr)->actions().actionPtr(namePtr); + TDEAccelAction* const pAction = (*itr)->actions().actionPtr(namePtr); if (pAction) pAction->setLabel( text ); } @@ -899,7 +899,7 @@ void KAction::setText( const TQString& text ) updateText( i ); } -void KAction::updateText( int i ) +void TDEAction::updateText( int i ) { TQWidget *w = container( i ); @@ -911,25 +911,25 @@ void KAction::updateText( int i ) } else if ( ::tqqt_cast<TQMenuBar *>( w ) ) static_cast<TQMenuBar*>(w)->changeItem( itemId( i ), d->text() ); - else if ( ::tqqt_cast<KToolBar *>( w ) ) + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) { - TQWidget *button = static_cast<KToolBar *>(w)->getWidget( itemId( i ) ); - if ( ::tqqt_cast<KToolBarButton *>( button ) ) - static_cast<KToolBarButton *>(button)->setText( d->plainText() ); + TQWidget *button = static_cast<TDEToolBar *>(w)->getWidget( itemId( i ) ); + if ( ::tqqt_cast<TDEToolBarButton *>( button ) ) + static_cast<TDEToolBarButton *>(button)->setText( d->plainText() ); } } -TQString KAction::text() const +TQString TDEAction::text() const { return d->text(); } -TQString KAction::plainText() const +TQString TDEAction::plainText() const { return d->plainText( ); } -void KAction::setIcon( const TQString &icon ) +void TDEAction::setIcon( const TQString &icon ) { d->setIconName( icon ); @@ -939,28 +939,28 @@ void KAction::setIcon( const TQString &icon ) updateIcon( i ); } -void KAction::updateIcon( int id ) +void TDEAction::updateIcon( int id ) { TQWidget* w = container( id ); if ( ::tqqt_cast<TQPopupMenu *>( w ) ) { int itemId_ = itemId( id ); - static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() ); + static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet( TDEIcon::Small ), d->text() ); if (!d->m_cut.isNull()) updateShortcut( static_cast<TQPopupMenu*>(w), itemId_ ); } else if ( ::tqqt_cast<TQMenuBar *>( w ) ) - static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( KIcon::Small ), d->text() ); - else if ( ::tqqt_cast<KToolBar *>( w ) ) - static_cast<KToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() ); + static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( TDEIcon::Small ), d->text() ); + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) + static_cast<TDEToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() ); } -TQString KAction::icon() const +TQString TDEAction::icon() const { return d->iconName( ); } -void KAction::setIconSet( const TQIconSet &iconset ) +void TDEAction::setIconSet( const TQIconSet &iconset ) { d->setIconSet( iconset ); @@ -970,7 +970,7 @@ void KAction::setIconSet( const TQIconSet &iconset ) } -void KAction::updateIconSet( int id ) +void TDEAction::updateIconSet( int id ) { TQWidget *w = container( id ); @@ -983,26 +983,26 @@ void KAction::updateIconSet( int id ) } else if ( ::tqqt_cast<TQMenuBar *>( w ) ) static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet(), d->text() ); - else if ( ::tqqt_cast<KToolBar *>( w ) ) + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) { if ( icon().isEmpty() && d->hasIcon() ) // only if there is no named icon ( scales better ) - static_cast<KToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet() ); + static_cast<TDEToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet() ); else - static_cast<KToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet( KIcon::Small ) ); + static_cast<TDEToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet( TDEIcon::Small ) ); } } -TQIconSet KAction::iconSet( KIcon::Group group, int size ) const +TQIconSet TDEAction::iconSet( TDEIcon::Group group, int size ) const { return d->iconSet( group, size ); } -bool KAction::hasIcon() const +bool TDEAction::hasIcon() const { return d->hasIcon(); } -void KAction::setWhatsThis( const TQString& text ) +void TDEAction::setWhatsThis( const TQString& text ) { d->setWhatsThis( text ); @@ -1011,7 +1011,7 @@ void KAction::setWhatsThis( const TQString& text ) updateWhatsThis( i ); } -void KAction::updateWhatsThis( int i ) +void TDEAction::updateWhatsThis( int i ) { TQPopupMenu* pm = popupMenu( i ); if ( pm ) @@ -1020,7 +1020,7 @@ void KAction::updateWhatsThis( int i ) return; } - KToolBar *tb = toolBar( i ); + TDEToolBar *tb = toolBar( i ); if ( tb ) { TQWidget *w = tb->getButton( itemId( i ) ); @@ -1030,12 +1030,12 @@ void KAction::updateWhatsThis( int i ) } } -TQString KAction::whatsThis() const +TQString TDEAction::whatsThis() const { return d->whatsThis(); } -TQString KAction::whatsThisWithIcon() const +TQString TDEAction::whatsThisWithIcon() const { TQString text = whatsThis(); if (!d->iconName().isEmpty()) @@ -1043,80 +1043,80 @@ TQString KAction::whatsThisWithIcon() const return text; } -TQWidget* KAction::container( int index ) const +TQWidget* TDEAction::container( int index ) const { assert( index < containerCount() ); return d->m_containers[ index ].m_container; } -KToolBar* KAction::toolBar( int index ) const +TDEToolBar* TDEAction::toolBar( int index ) const { - return tqt_dynamic_cast<KToolBar *>( d->m_containers[ index ].m_container ); + return tqt_dynamic_cast<TDEToolBar *>( d->m_containers[ index ].m_container ); } -TQPopupMenu* KAction::popupMenu( int index ) const +TQPopupMenu* TDEAction::popupMenu( int index ) const { return tqt_dynamic_cast<TQPopupMenu *>( d->m_containers[ index ].m_container ); } -TQWidget* KAction::representative( int index ) const +TQWidget* TDEAction::representative( int index ) const { return d->m_containers[ index ].m_representative; } -int KAction::itemId( int index ) const +int TDEAction::itemId( int index ) const { return d->m_containers[ index ].m_id; } -int KAction::containerCount() const +int TDEAction::containerCount() const { return d->m_containers.count(); } -uint KAction::kaccelCount() const +uint TDEAction::tdeaccelCount() const { - return d->m_kaccelList.count(); + return d->m_tdeaccelList.count(); } -void KAction::addContainer( TQWidget* c, int id ) +void TDEAction::addContainer( TQWidget* c, int id ) { - KActionPrivate::Container p; + TDEActionPrivate::Container p; p.m_container = c; p.m_id = id; d->m_containers.append( p ); } -void KAction::addContainer( TQWidget* c, TQWidget* w ) +void TDEAction::addContainer( TQWidget* c, TQWidget* w ) { - KActionPrivate::Container p; + TDEActionPrivate::Container p; p.m_container = c; p.m_representative = w; d->m_containers.append( p ); } -void KAction::activate() +void TDEAction::activate() { - emit activated( KAction::EmulatedActivation, Qt::NoButton ); + emit activated( TDEAction::EmulatedActivation, Qt::NoButton ); slotActivated(); } -void KAction::slotActivated() +void TDEAction::slotActivated() { const TQObject *senderObj = TQT_TQOBJECT_CONST(sender()); if ( senderObj ) { - if ( ::tqqt_cast<KAccelPrivate *>( senderObj ) ) - emit activated( KAction::AccelActivation, Qt::NoButton ); + if ( ::tqqt_cast<TDEAccelPrivate *>( senderObj ) ) + emit activated( TDEAction::AccelActivation, Qt::NoButton ); } emit activated(); } -// This catches signals emitted by KActions inserted into QPopupMenu +// This catches signals emitted by TDEActions inserted into QPopupMenu // We do crude things inside it, because we need to know which // TQPopupMenu emitted the signal. We need to be sure that it is // only called by QPopupMenus, we plugged us in. -void KAction::slotPopupActivated() +void TDEAction::slotPopupActivated() { if( ::tqqt_cast<TQSignal *>(sender())) { @@ -1127,30 +1127,30 @@ void KAction::slotPopupActivated() TQPopupMenu* qpm = tqt_dynamic_cast<TQPopupMenu *>( container(pos) ); if(qpm) { - KPopupMenu* kpm = tqt_dynamic_cast<KPopupMenu *>( qpm ); + TDEPopupMenu* kpm = tqt_dynamic_cast<TDEPopupMenu *>( qpm ); TQt::ButtonState state; - if ( kpm ) // KPopupMenu? Nice, it stores the state. + if ( kpm ) // TDEPopupMenu? Nice, it stores the state. state = kpm->state(); else { // just a QPopupMenu? We'll ask for the state now then (small race condition?) - kdDebug(129) << "KAction::slotPopupActivated not a KPopupMenu -> using keyboardMouseState()" << endl; - state = KApplication::keyboardMouseState(); + kdDebug(129) << "TDEAction::slotPopupActivated not a TDEPopupMenu -> using keyboardMouseState()" << endl; + state = TDEApplication::keyboardMouseState(); } - emit activated( KAction::PopupMenuActivation, state ); + emit activated( TDEAction::PopupMenuActivation, state ); slotActivated(); return; } } } - kdWarning(129)<<"Don't connect KAction::slotPopupActivated() to anything, expect into QPopupMenus which are in containers. Use slotActivated instead."<<endl; - emit activated( KAction::PopupMenuActivation, Qt::NoButton ); + kdWarning(129)<<"Don't connect TDEAction::slotPopupActivated() to anything, expect into QPopupMenus which are in containers. Use slotActivated instead."<<endl; + emit activated( TDEAction::PopupMenuActivation, Qt::NoButton ); slotActivated(); } -void KAction::slotButtonClicked( int, TQt::ButtonState state ) +void TDEAction::slotButtonClicked( int, TQt::ButtonState state ) { kdDebug(129) << "slotButtonClicked() state=" << state << endl; - emit activated( KAction::ToolBarActivation, state ); + emit activated( TDEAction::ToolBarActivation, state ); // RightButton isn't really an activation if ( ( state & Qt::LeftButton ) || ( state & Qt::MidButton ) ) @@ -1158,21 +1158,21 @@ void KAction::slotButtonClicked( int, TQt::ButtonState state ) } -void KAction::slotDestroyed() +void TDEAction::slotDestroyed() { - kdDebug(129) << "KAction::slotDestroyed(): this = " << this << ", name = \"" << name() << "\", sender = " << sender() << endl; + kdDebug(129) << "TDEAction::slotDestroyed(): this = " << this << ", name = \"" << name() << "\", sender = " << sender() << endl; const TQObject* const o = TQT_TQOBJECT_CONST(sender()); #ifndef KDE_NO_COMPAT // KDE 4: remove - if ( o == d->m_kaccel ) + if ( o == d->m_tdeaccel ) { - d->m_kaccel = 0; + d->m_tdeaccel = 0; return; } #endif // KDE 4: remove end - TQValueList<KAccel*> & accelList = d->m_kaccelList; - TQValueList<KAccel*>::iterator itr = accelList.begin(); - const TQValueList<KAccel*>::iterator itrEnd = accelList.end(); + TQValueList<TDEAccel*> & accelList = d->m_tdeaccelList; + TQValueList<TDEAccel*>::iterator itr = accelList.begin(); + const TQValueList<TDEAccel*>::iterator itrEnd = accelList.end(); for( ; itr != itrEnd; ++itr) { @@ -1193,14 +1193,14 @@ void KAction::slotDestroyed() } while ( i != -1 ); } -int KAction::findContainer( const TQWidget* widget ) const +int TDEAction::findContainer( const TQWidget* widget ) const { int pos = 0; - const TQValueList<KActionPrivate::Container> & containers = d->m_containers; + const TQValueList<TDEActionPrivate::Container> & containers = d->m_containers; - TQValueList<KActionPrivate::Container>::ConstIterator it = containers.constBegin(); - const TQValueList<KActionPrivate::Container>::ConstIterator itEnd = containers.constEnd(); + TQValueList<TDEActionPrivate::Container>::ConstIterator it = containers.constBegin(); + const TQValueList<TDEActionPrivate::Container>::ConstIterator itEnd = containers.constEnd(); while( it != itEnd ) { @@ -1213,14 +1213,14 @@ int KAction::findContainer( const TQWidget* widget ) const return -1; } -int KAction::findContainer( const int id ) const +int TDEAction::findContainer( const int id ) const { int pos = 0; - const TQValueList<KActionPrivate::Container> & containers = d->m_containers; + const TQValueList<TDEActionPrivate::Container> & containers = d->m_containers; - TQValueList<KActionPrivate::Container>::ConstIterator it = containers.constBegin(); - const TQValueList<KActionPrivate::Container>::ConstIterator itEnd = containers.constEnd(); + TQValueList<TDEActionPrivate::Container>::ConstIterator it = containers.constBegin(); + const TQValueList<TDEActionPrivate::Container>::ConstIterator itEnd = containers.constEnd(); while( it != itEnd ) { @@ -1233,14 +1233,14 @@ int KAction::findContainer( const int id ) const return -1; } -void KAction::removeContainer( int index ) +void TDEAction::removeContainer( int index ) { int i = 0; - TQValueList<KActionPrivate::Container> & containers = d->m_containers; + TQValueList<TDEActionPrivate::Container> & containers = d->m_containers; - TQValueList<KActionPrivate::Container>::Iterator it = containers.begin(); - const TQValueList<KActionPrivate::Container>::Iterator itEnd = containers.end(); + TQValueList<TDEActionPrivate::Container>::Iterator it = containers.begin(); + const TQValueList<TDEActionPrivate::Container>::Iterator itEnd = containers.end(); while( it != itEnd ) { @@ -1255,34 +1255,34 @@ void KAction::removeContainer( int index ) } // FIXME: Remove this (ellis) -void KAction::slotKeycodeChanged() +void TDEAction::slotKeycodeChanged() { - kdDebug(129) << "KAction::slotKeycodeChanged()" << endl; // -- ellis - KAccelAction* pAction = d->m_kaccel->actions().actionPtr(name()); + kdDebug(129) << "TDEAction::slotKeycodeChanged()" << endl; // -- ellis + TDEAccelAction* pAction = d->m_tdeaccel->actions().actionPtr(name()); if( pAction ) setShortcut(pAction->shortcut()); } -KActionCollection *KAction::parentCollection() const +TDEActionCollection *TDEAction::parentCollection() const { return m_parentCollection; } -void KAction::unplugAll() +void TDEAction::unplugAll() { while ( containerCount() != 0 ) unplug( container( 0 ) ); } -const KGuiItem& KAction::guiItem() const +const KGuiItem& TDEAction::guiItem() const { return *d; } -void KAction::virtual_hook( int, void* ) +void TDEAction::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } /* vim: et sw=2 ts=2 */ -#include "kaction.moc" +#include "tdeaction.moc" diff --git a/tdeui/kaction.h b/tdeui/tdeaction.h index dca99b4b0..5919c9641 100644 --- a/tdeui/kaction.h +++ b/tdeui/tdeaction.h @@ -23,15 +23,15 @@ */ //$Id$ -#ifndef __kaction_h__ -#define __kaction_h__ +#ifndef __tdeaction_h__ +#define __tdeaction_h__ #include <tqkeysequence.h> #include <tqobject.h> #include <tqvaluelist.h> #include <tqguardedptr.h> #include <kguiitem.h> -#include <kshortcut.h> +#include <tdeshortcut.h> #include <kstdaction.h> #include <kicontheme.h> @@ -41,39 +41,39 @@ class TQComboBox; class TQPoint; class TQIconSet; class TQString; -class KToolBar; +class TDEToolBar; -class KAccel; -class KAccelActions; -class KConfig; -class KConfigBase; +class TDEAccel; +class TDEAccelActions; +class TDEConfig; +class TDEConfigBase; class KURL; -class KInstance; -class KToolBar; -class KActionCollection; -class KPopupMenu; -class KMainWindow; +class TDEInstance; +class TDEToolBar; +class TDEActionCollection; +class TDEPopupMenu; +class TDEMainWindow; /** * @short Class to encapsulate user-driven action or event * - * The KAction class (and derived and super classes) provides a way to + * The TDEAction class (and derived and super classes) provides a way to * easily encapsulate a "real" user-selected action or event in your * program. * * For instance, a user may want to @p paste the contents of * the clipboard or @p scroll @p down a document or @p quit the * application. These are all @p actions -- events that the - * user causes to happen. The KAction class allows the developer to + * user causes to happen. The TDEAction class allows the developer to * deal with these actions in an easy and intuitive manner. * - * Specifically, the KAction class encapsulated the various attributes + * Specifically, the TDEAction class encapsulated the various attributes * to an event/action. For instance, an action might have an icon * that goes along with it (a clipboard for a "paste" action or * scissors for a "cut" action). The action might have some text to * describe the action. It will certainly have a method or function * that actually @p executes the action! All these attributes - * are contained within the KAction object. + * are contained within the TDEAction object. * * The advantage of dealing with Actions is that you can manipulate * the Action without regard to the GUI representation of it. For @@ -86,7 +86,7 @@ class KMainWindow; * similar code - but has to be done twice! * * With the Action concept, you simply "plug" the Action into whatever - * GUI element you want. The KAction class will then take care of + * GUI element you want. The TDEAction class will then take care of * correctly defining the menu item (with icons, accelerators, text, * etc) or toolbar button.. or whatever. From then on, if you * manipulate the Action at all, the effect will propogate through all @@ -99,7 +99,7 @@ class KMainWindow; * one-to-one relationship between the "real" action and @p all * GUI representations of it. * - * KAction emits the activated() signal if the user activated the + * TDEAction emits the activated() signal if the user activated the * corresponding GUI element ( menu item, toolbar button, etc. ) * * If you are in the situation of wanting to map the activated() @@ -113,7 +113,7 @@ class KMainWindow; * this, TQT_SLOT( moveWindowToDesktop( int ) ) ); * * for ( uint i = 0; i < numberOfDesktops; ++i ) { - * KAction *desktopAction = new KAction( i18n( "Move Window to Desktop %i" ).arg( i ), ... ); + * TDEAction *desktopAction = new TDEAction( i18n( "Move Window to Desktop %i" ).arg( i ), ... ); * connect( desktopAction, TQT_SIGNAL( activated() ), desktopNumberMapper, TQT_SLOT( map() ) ); * desktopNumberMapper->setMapping( desktopAction, i ); * } @@ -125,7 +125,7 @@ class KMainWindow; * * @li Decide which attributes you want to associate with a given * action (icons, text, keyboard shortcut, etc) - * @li Create the action using KAction (or derived or super class). + * @li Create the action using TDEAction (or derived or super class). * @li "Plug" the Action into whatever GUI element you want. Typically, * this will be a menu or toolbar. * @@ -133,8 +133,8 @@ class KMainWindow; * * Here is an example of enabling a "New [document]" action * \code - * KAction *newAct = new KAction(i18n("&New"), "filenew", - * KStdAccel::shortcut(KStdAccel::New), + * TDEAction *newAct = new TDEAction(i18n("&New"), "filenew", + * TDEStdAccel::shortcut(TDEStdAccel::New), * this, TQT_SLOT(fileNew()), * actionCollection(), "new"); * \endcode @@ -166,14 +166,14 @@ class KMainWindow; * and both the menuitem in File and the toolbar button will instantly * be disabled. * - * Do not delete a KAction object without unplugging it from all its + * Do not delete a TDEAction object without unplugging it from all its * containers. The simplest way to do that is to use the unplugAll() * as in the following example: * \code * newAct->unplugAll(); * delete newAct; * \endcode - * Normally you will not need to do this as KActionCollection manages + * Normally you will not need to do this as TDEActionCollection manages * everything for you. * * Note: if you are using a "standard" action like "new", "paste", @@ -183,10 +183,10 @@ class KMainWindow; * * <b>Usage Within the XML Framework:</b>\n * - * If you are using KAction within the context of the XML menu and + * If you are using TDEAction within the context of the XML menu and * toolbar building framework, then there are a few tiny changes. The * first is that you must insert your new action into an action - * collection. The action collection (a KActionCollection) is, + * collection. The action collection (a TDEActionCollection) is, * logically enough, a central collection of all of the actions * defined in your application. The XML UI framework code in KXMLGUI * classes needs access to this collection in order to build up the @@ -199,9 +199,9 @@ class KMainWindow; * * @see KStdAction */ -class TDEUI_EXPORT KAction : public TQObject +class TDEUI_EXPORT TDEAction : public TQObject { - friend class KActionCollection; + friend class TDEActionCollection; Q_OBJECT TQ_PROPERTY( int containerCount READ containerCount ) TQ_PROPERTY( TQString plainText READ plainText ) @@ -221,7 +221,7 @@ public: * If you do not want or have a keyboard shortcut, * set the @p cut param to 0. * - * This is the most common KAction used when you do not have a + * This is the most common TDEAction used when you do not have a * corresponding icon (note that it won't appear in the current version * of the "Edit ToolBar" dialog, because an action needs an icon to be * plugged in a toolbar...). @@ -233,9 +233,9 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KAction( const TQString& text, const KShortcut& cut, + TDEAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); /** * Constructs an action with text, icon, potential keyboard @@ -245,7 +245,7 @@ public: * If you do not want or have a keyboard shortcut, set the * @p cut param to 0. * - * This is the other common KAction used. Use it when you + * This is the other common TDEAction used. Use it when you * @p do have a corresponding icon. * * @param text The text that will be displayed. @@ -256,9 +256,9 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); /** * Constructs an action with text, icon, potential keyboard @@ -269,7 +269,7 @@ public: * If you do not want or have a keyboard shortcut, set the * @p cut param to 0. * - * This is the other common KAction used. Use it when you + * This is the other common TDEAction used. Use it when you * @p do have a corresponding icon. * * @param text The text that will be displayed. @@ -280,9 +280,9 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); /** * The same as the above constructor, but with a KGuiItem providing @@ -295,49 +295,49 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KAction( const KGuiItem& item, const KShortcut& cut, + TDEAction( const KGuiItem& item, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); /** * @obsolete */ - KAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 ); + TDEAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const KShortcut& cut, + TDEAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** * @obsolete */ - KAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** * @obsolete */ - KAction( TQObject* parent = 0, const char* name = 0 ); + TDEAction( TQObject* parent = 0, const char* name = 0 ); /** * Standard destructor */ - virtual ~KAction(); + virtual ~TDEAction(); /** * "Plug" or insert this action into a given widget. @@ -346,7 +346,7 @@ public: * typically be a menu or a toolbar. From this point on, you will * never need to directly manipulate the item in the menu or * toolbar. You do all enabling/disabling/manipulation directly - * with your KAction object. + * with your TDEAction object. * * @param widget The GUI element to display this action * @param index The position into which the action is plugged. If @@ -357,14 +357,14 @@ public: /** * @deprecated. Shouldn't be used. No substitute available. * - * "Plug" or insert this action into a given KAccel. + * "Plug" or insert this action into a given TDEAccel. * - * @param accel The KAccel collection which holds this accel + * @param accel The TDEAccel collection which holds this accel * @param configurable If the shortcut is configurable via - * the KAccel configuration dialog (this is somehow deprecated since - * there is now a KAction key configuration dialog). + * the TDEAccel configuration dialog (this is somehow deprecated since + * there is now a TDEAction key configuration dialog). */ - virtual void plugAccel(KAccel *accel, bool configurable = true) KDE_DEPRECATED; + virtual void plugAccel(TDEAccel *accel, bool configurable = true) KDE_DEPRECATED; /** * "Unplug" or remove this action from a given widget. @@ -382,7 +382,7 @@ public: /** * @deprecated. Complement method to plugAccel(). - * Disconnect this action from the KAccel. + * Disconnect this action from the TDEAccel. */ virtual void unplugAccel() KDE_DEPRECATED; @@ -414,7 +414,7 @@ public: TQWidget* representative( int index ) const; int containerCount() const; /// @since 3.1 - uint kaccelCount() const; + uint tdeaccelCount() const; virtual bool hasIcon() const; #ifndef KDE_NO_COMPAT @@ -430,11 +430,11 @@ public: /** * Get the keyboard shortcut associated with this action. */ - virtual const KShortcut& shortcut() const; + virtual const TDEShortcut& shortcut() const; /** * Get the default shortcut for this action. */ - virtual const KShortcut& shortcutDefault() const; + virtual const TDEShortcut& shortcutDefault() const; // These two methods are for TQ_PROPERTY TQString shortcutText() const; @@ -466,18 +466,18 @@ public: * 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 + * In KDE4 set group default to TDEIcon::Small while removing the other * iconSet() function. */ - virtual TQIconSet iconSet( KIcon::Group group, int size=0 ) const; + virtual TQIconSet iconSet( TDEIcon::Group group, int size=0 ) const; /** * Remove in KDE4 */ - TQIconSet iconSet() const { return iconSet( KIcon::Small ); } + TQIconSet iconSet() const { return iconSet( TDEIcon::Small ); } virtual TQString icon() const; - KActionCollection *parentCollection() const; + TDEActionCollection *parentCollection() const; /** * @internal @@ -503,7 +503,7 @@ public slots: /** * Sets the keyboard shortcut associated with this action. */ - virtual bool setShortcut( const KShortcut& ); + virtual bool setShortcut( const TDEShortcut& ); virtual void setGroup( const TQString& ); @@ -525,9 +525,9 @@ public slots: * For the tooltip to show up on the statusbar you will need to connect * a couple of the actionclass signals to the toolbar. * The easiest way of doing this is in your main window class, when you create - * a statusbar. See the KActionCollection class for more details. + * a statusbar. See the TDEActionCollection class for more details. * - * @see KActionCollection + * @see TDEActionCollection * */ virtual void setToolTip( const TQString& ); @@ -573,7 +573,7 @@ protected slots: void slotButtonClicked( int, TQt::ButtonState state ); // KDE4: make virtual protected: - KToolBar* toolBar( int index ) const; + TDEToolBar* toolBar( int index ) const; TQPopupMenu* popupMenu( int index ) const; void removeContainer( int index ); int findContainer( const TQWidget* widget ) const; @@ -593,7 +593,7 @@ protected: virtual void updateToolTip( int id ); virtual void updateWhatsThis( int i ); - KActionCollection *m_parentCollection; + TDEActionCollection *m_parentCollection; TQString whatsThisWithIcon() const; /** * Return the underlying KGuiItem @@ -620,19 +620,19 @@ signals: * * @since 3.4 */ - void activated( KAction::ActivationReason reason, TQt::ButtonState state ); + void activated( TDEAction::ActivationReason reason, TQt::ButtonState state ); void enabled( bool ); private: - void initPrivate( const TQString& text, const KShortcut& cut, + void initPrivate( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot ); - KAccel* kaccelCurrent(); - bool initShortcut( const KShortcut& ); + TDEAccel* tdeaccelCurrent(); + bool initShortcut( const TDEShortcut& ); void plugShortcut(); - bool updateKAccelShortcut( KAccel* kaccel ); - void insertKAccel( KAccel* ); - /** @internal To be used exclusively by KActionCollection::removeWidget(). */ - void removeKAccel( KAccel* ); + bool updateTDEAccelShortcut( TDEAccel* tdeaccel ); + void insertTDEAccel( TDEAccel* ); + /** @internal To be used exclusively by TDEActionCollection::removeWidget(). */ + void removeTDEAccel( TDEAccel* ); #ifndef KDE_NO_COMPAT public: @@ -666,11 +666,11 @@ public: protected: virtual void virtual_hook( int id, void* data ); private: - class KActionPrivate; - KActionPrivate* const d; + class TDEActionPrivate; + TDEActionPrivate* const d; }; -#include <kactioncollection.h> -#include <kactionclasses.h> +#include <tdeactioncollection.h> +#include <tdeactionclasses.h> #endif diff --git a/tdeui/kactionclasses.cpp b/tdeui/tdeactionclasses.cpp index 9e2241408..4b589f166 100644 --- a/tdeui/kactionclasses.cpp +++ b/tdeui/tdeactionclasses.cpp @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ -#include "kactionclasses.h" +#include "tdeactionclasses.h" #include <assert.h> #include <ft2build.h> @@ -41,26 +41,26 @@ #include <dcopclient.h> #include <dcopref.h> -#include <kaccel.h> -#include <kapplication.h> -#include <kconfig.h> +#include <tdeaccel.h> +#include <tdeapplication.h> +#include <tdeconfig.h> #include <kdebug.h> -#include <kfontcombo.h> -#include <kfontdialog.h> -#include <klocale.h> -#include <kmainwindow.h> -#include <kmenubar.h> -#include <kpopupmenu.h> -#include <ktoolbar.h> -#include <ktoolbarbutton.h> +#include <tdefontcombo.h> +#include <tdefontdialog.h> +#include <tdelocale.h> +#include <tdemainwindow.h> +#include <tdemenubar.h> +#include <tdepopupmenu.h> +#include <tdetoolbar.h> +#include <tdetoolbarbutton.h> #include <kurl.h> #include <kstandarddirs.h> #include <kstringhandler.h> -class KToggleAction::KToggleActionPrivate +class TDEToggleAction::TDEToggleActionPrivate { public: - KToggleActionPrivate() + TDEToggleActionPrivate() { m_checked = false; m_checkedGuiItem = 0; @@ -71,86 +71,86 @@ public: KGuiItem* m_checkedGuiItem; }; -KToggleAction::KToggleAction( const TQString& text, const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, cut, parent, name ) + : TDEAction( text, cut, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, cut, receiver, slot, parent, name ) + : TDEAction( text, cut, receiver, slot, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, pix, cut, parent, name ) + : TDEAction( text, pix, cut, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, pix, cut, parent, name ) + : TDEAction( text, pix, cut, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, pix, cut, receiver, slot, parent, name ) + : TDEAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEToggleAction::TDEToggleAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, pix, cut, receiver, slot, parent, name ) + : TDEAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::KToggleAction( TQObject* parent, const char* name ) - : KAction( parent, name ) +TDEToggleAction::TDEToggleAction( TQObject* parent, const char* name ) + : TDEAction( parent, name ) { - d = new KToggleActionPrivate; + d = new TDEToggleActionPrivate; } -KToggleAction::~KToggleAction() +TDEToggleAction::~TDEToggleAction() { delete d->m_checkedGuiItem; delete d; } -int KToggleAction::plug( TQWidget* widget, int index ) +int TDEToggleAction::plug( TQWidget* widget, int index ) { - if ( !::tqqt_cast<TQPopupMenu *>( widget ) && !::tqqt_cast<KToolBar *>( widget ) ) + if ( !::tqqt_cast<TQPopupMenu *>( widget ) && !::tqqt_cast<TDEToolBar *>( widget ) ) { - kdWarning() << "Can not plug KToggleAction in " << widget->className() << endl; + kdWarning() << "Can not plug TDEToggleAction in " << widget->className() << endl; return -1; } - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - int _index = KAction::plug( widget, index ); + int _index = TDEAction::plug( widget, index ); if ( _index == -1 ) return _index; - if ( ::tqqt_cast<KToolBar *>( widget ) ) { - KToolBar *bar = static_cast<KToolBar *>( widget ); + if ( ::tqqt_cast<TDEToolBar *>( widget ) ) { + TDEToolBar *bar = static_cast<TDEToolBar *>( widget ); bar->setToggle( itemId( _index ), true ); bar->setButton( itemId( _index ), isChecked() ); @@ -162,11 +162,11 @@ int KToggleAction::plug( TQWidget* widget, int index ) return _index; } -void KToggleAction::setChecked( bool c ) +void TDEToggleAction::setChecked( bool c ) { if ( c == d->m_checked ) return; - //kdDebug(129) << "KToggleAction::setChecked(" << c << ") " << this << " " << name() << endl; + //kdDebug(129) << "TDEToggleAction::setChecked(" << c << ") " << this << " " << name() << endl; d->m_checked = c; @@ -180,9 +180,9 @@ void KToggleAction::setChecked( bool c ) if ( !list.isEmpty() ) { TQObjectListIt it( list ); for( ; it.current(); ++it ) { - if ( ::tqqt_cast<KToggleAction *>( it.current() ) && it.current() != this && - static_cast<KToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) { - KToggleAction *a = static_cast<KToggleAction*>(it.current()); + if ( ::tqqt_cast<TDEToggleAction *>( it.current() ) && it.current() != this && + static_cast<TDEToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) { + TDEToggleAction *a = static_cast<TDEToggleAction*>(it.current()); if( a->isChecked() ) { a->setChecked( false ); emit a->toggled( false ); @@ -193,7 +193,7 @@ void KToggleAction::setChecked( bool c ) } } -void KToggleAction::updateChecked( int id ) +void TDEToggleAction::updateChecked( int id ) { TQWidget *w = container( id ); @@ -205,7 +205,7 @@ void KToggleAction::updateChecked( int id ) else { const KGuiItem* gui = d->m_checked ? d->m_checkedGuiItem : &guiItem(); if ( d->m_checkedGuiItem->hasIcon() ) - pm->changeItem( itemId_, gui->iconSet( KIcon::Small ), gui->text() ); + pm->changeItem( itemId_, gui->iconSet( TDEIcon::Small ), gui->text() ); else pm->changeItem( itemId_, gui->text() ); @@ -221,124 +221,124 @@ void KToggleAction::updateChecked( int id ) } else if ( ::tqqt_cast<TQMenuBar *>( w ) ) // not handled in plug... static_cast<TQMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked ); - else if ( ::tqqt_cast<KToolBar *>( w ) ) + else if ( ::tqqt_cast<TDEToolBar *>( w ) ) { - TQWidget* r = static_cast<KToolBar*>( w )->getButton( itemId( id ) ); - if ( r && ::tqqt_cast<KToolBarButton *>( r ) ) { - static_cast<KToolBar*>( w )->setButton( itemId( id ), d->m_checked ); + TQWidget* r = static_cast<TDEToolBar*>( w )->getButton( itemId( id ) ); + if ( r && ::tqqt_cast<TDEToolBarButton *>( r ) ) { + static_cast<TDEToolBar*>( w )->setButton( itemId( id ), d->m_checked ); if ( d->m_checkedGuiItem && d->m_checkedGuiItem->hasIcon() ) { const KGuiItem* gui = d->m_checked ? d->m_checkedGuiItem : &guiItem(); - static_cast<KToolBar*>( w )->setButtonIconSet( itemId( id ), gui->iconSet( KIcon::Toolbar ) ); + static_cast<TDEToolBar*>( w )->setButtonIconSet( itemId( id ), gui->iconSet( TDEIcon::Toolbar ) ); } } } } -void KToggleAction::slotActivated() +void TDEToggleAction::slotActivated() { setChecked( !isChecked() ); - KAction::slotActivated(); + TDEAction::slotActivated(); emit toggled( isChecked() ); } -bool KToggleAction::isChecked() const +bool TDEToggleAction::isChecked() const { return d->m_checked; } -void KToggleAction::setExclusiveGroup( const TQString& name ) +void TDEToggleAction::setExclusiveGroup( const TQString& name ) { d->m_exclusiveGroup = name; } -TQString KToggleAction::exclusiveGroup() const +TQString TDEToggleAction::exclusiveGroup() const { return d->m_exclusiveGroup; } -void KToggleAction::setCheckedState( const KGuiItem& checkedItem ) +void TDEToggleAction::setCheckedState( const KGuiItem& checkedItem ) { delete d->m_checkedGuiItem; d->m_checkedGuiItem = new KGuiItem( checkedItem ); } -TQString KToggleAction::toolTip() const +TQString TDEToggleAction::toolTip() const { if ( d->m_checkedGuiItem && d->m_checked ) return d->m_checkedGuiItem->toolTip(); else - return KAction::toolTip(); + return TDEAction::toolTip(); } -KRadioAction::KRadioAction( const TQString& text, const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) -: KToggleAction( text, cut, parent, name ) +: TDEToggleAction( text, cut, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) -: KToggleAction( text, cut, receiver, slot, parent, name ) +: TDEToggleAction( text, cut, receiver, slot, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) -: KToggleAction( text, pix, cut, parent, name ) +: TDEToggleAction( text, pix, cut, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) -: KToggleAction( text, pix, cut, parent, name ) +: TDEToggleAction( text, pix, cut, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) -: KToggleAction( text, pix, cut, receiver, slot, parent, name ) +: TDEToggleAction( text, pix, cut, receiver, slot, parent, name ) { } -KRadioAction::KRadioAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDERadioAction::TDERadioAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) -: KToggleAction( text, pix, cut, receiver, slot, parent, name ) +: TDEToggleAction( text, pix, cut, receiver, slot, parent, name ) { } -KRadioAction::KRadioAction( TQObject* parent, const char* name ) -: KToggleAction( parent, name ) +TDERadioAction::TDERadioAction( TQObject* parent, const char* name ) +: TDEToggleAction( parent, name ) { } -void KRadioAction::slotActivated() +void TDERadioAction::slotActivated() { if ( isChecked() ) { const TQObject *senderObj = TQT_TQOBJECT_CONST(sender()); - if ( !senderObj || !::tqqt_cast<const KToolBarButton *>( senderObj ) ) + if ( !senderObj || !::tqqt_cast<const TDEToolBarButton *>( senderObj ) ) return; - const_cast<KToolBarButton *>( static_cast<const KToolBarButton *>( TQT_TQWIDGET_CONST(senderObj) ) )->on( true ); + const_cast<TDEToolBarButton *>( static_cast<const TDEToolBarButton *>( TQT_TQWIDGET_CONST(senderObj) ) )->on( true ); return; } - KToggleAction::slotActivated(); + TDEToggleAction::slotActivated(); } -class KSelectAction::KSelectActionPrivate +class TDESelectAction::TDESelectActionPrivate { public: - KSelectActionPrivate() + TDESelectActionPrivate() { m_edit = false; m_menuAccelsEnabled = true; @@ -373,71 +373,71 @@ public: } }; -KSelectAction::KSelectAction( const TQString& text, const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, cut, parent, name ) + : TDEAction( text, cut, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, cut, receiver, slot, parent, name ) + : TDEAction( text, cut, receiver, slot, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, pix, cut, parent, name ) + : TDEAction( text, pix, cut, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, pix, cut, parent, name ) + : TDEAction( text, pix, cut, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, pix, cut, receiver, slot, parent, name ) + : TDEAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDESelectAction::TDESelectAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, pix, cut, receiver, slot, parent, name ) + : TDEAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::KSelectAction( TQObject* parent, const char* name ) - : KAction( parent, name ) +TDESelectAction::TDESelectAction( TQObject* parent, const char* name ) + : TDEAction( parent, name ) { - d = new KSelectActionPrivate; + d = new TDESelectActionPrivate; } -KSelectAction::~KSelectAction() +TDESelectAction::~TDESelectAction() { assert(d); delete d->m_menu; delete d; d = 0; } -void KSelectAction::setCurrentItem( int id ) +void TDESelectAction::setCurrentItem( int id ) { if ( id >= (int)d->m_list.count() ) { Q_ASSERT(id < (int)d->m_list.count()); @@ -459,12 +459,12 @@ void KSelectAction::setCurrentItem( int id ) for( int i = 0; i < len; ++i ) updateCurrentItem( i ); - // emit KAction::activated(); + // emit TDEAction::activated(); // emit activated( currentItem() ); // emit activated( currentText() ); } -void KSelectAction::setComboWidth( int width ) +void TDESelectAction::setComboWidth( int width ) { if ( width < 0 ) return; @@ -478,17 +478,17 @@ void KSelectAction::setComboWidth( int width ) } -void KSelectAction::setMaxComboViewCount( int n ) +void TDESelectAction::setMaxComboViewCount( int n ) { d->m_maxComboViewCount = n; } -TQPopupMenu* KSelectAction::popupMenu() const +TQPopupMenu* TDESelectAction::popupMenu() const { - kdDebug(129) << "KAction::popupMenu()" << endl; // remove -- ellis + kdDebug(129) << "TDEAction::popupMenu()" << endl; // remove -- ellis if ( !d->m_menu ) { - d->m_menu = new KPopupMenu(0L, "KSelectAction::popupMenu()"); + d->m_menu = new TDEPopupMenu(0L, "TDESelectAction::popupMenu()"); setupMenu(); if ( d->m_current >= 0 ) d->m_menu->setItemChecked( d->m_current, true ); @@ -497,7 +497,7 @@ TQPopupMenu* KSelectAction::popupMenu() const return d->m_menu; } -void KSelectAction::setupMenu() const +void TDESelectAction::setupMenu() const { if ( !d->m_menu ) return; @@ -513,11 +513,11 @@ void KSelectAction::setupMenu() const } } -void KSelectAction::changeItem( int index, const TQString& text ) +void TDESelectAction::changeItem( int index, const TQString& text ) { if ( index < 0 || index >= (int)d->m_list.count() ) { - kdWarning() << "KSelectAction::changeItem Index out of scope" << endl; + kdWarning() << "TDESelectAction::changeItem Index out of scope" << endl; return; } @@ -531,15 +531,15 @@ void KSelectAction::changeItem( int index, const TQString& text ) changeItem( i, index, text ); } -void KSelectAction::changeItem( int id, int index, const TQString& text) +void TDESelectAction::changeItem( int id, int index, const TQString& text) { if ( index < 0 ) return; TQWidget* w = container( id ); - if ( ::tqqt_cast<KToolBar *>( w ) ) + if ( ::tqqt_cast<TDEToolBar *>( w ) ) { - TQWidget* r = (static_cast<KToolBar*>( w ))->getWidget( itemId( id ) ); + TQWidget* r = (static_cast<TDEToolBar*>( w ))->getWidget( itemId( id ) ); if ( ::tqqt_cast<TQComboBox *>( r ) ) { TQComboBox *b = static_cast<TQComboBox*>( r ); @@ -548,7 +548,7 @@ void KSelectAction::changeItem( int id, int index, const TQString& text) } } -void KSelectAction::setItems( const TQStringList &lst ) +void TDESelectAction::setItems( const TQStringList &lst ) { d->m_list = lst; d->m_current = -1; @@ -563,12 +563,12 @@ void KSelectAction::setItems( const TQStringList &lst ) setEnabled ( lst.count() > 0 || d->m_edit ); } -TQStringList KSelectAction::items() const +TQStringList TDESelectAction::items() const { return d->m_list; } -TQString KSelectAction::currentText() const +TQString TDESelectAction::currentText() const { if ( currentItem() < 0 ) return TQString::null; @@ -576,19 +576,19 @@ TQString KSelectAction::currentText() const return d->m_list[ currentItem() ]; } -int KSelectAction::currentItem() const +int TDESelectAction::currentItem() const { return d->m_current; } -void KSelectAction::updateCurrentItem( int id ) +void TDESelectAction::updateCurrentItem( int id ) { if ( d->m_current < 0 ) return; TQWidget* w = container( id ); - if ( ::tqqt_cast<KToolBar *>( w ) ) { - TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast<TDEToolBar *>( w ) ) { + TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast<TQComboBox *>( r ) ) { TQComboBox *b = static_cast<TQComboBox*>( r ); b->setCurrentItem( d->m_current ); @@ -596,16 +596,16 @@ void KSelectAction::updateCurrentItem( int id ) } } -int KSelectAction::comboWidth() const +int TDESelectAction::comboWidth() const { return d->m_comboWidth; } -void KSelectAction::updateComboWidth( int id ) +void TDESelectAction::updateComboWidth( int id ) { TQWidget* w = container( id ); - if ( ::tqqt_cast<KToolBar *>( w ) ) { - TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast<TDEToolBar *>( w ) ) { + TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast<TQComboBox *>( r ) ) { TQComboBox *cb = static_cast<TQComboBox*>( r ); cb->setMinimumWidth( d->m_comboWidth ); @@ -614,12 +614,12 @@ void KSelectAction::updateComboWidth( int id ) } } -void KSelectAction::updateItems( int id ) +void TDESelectAction::updateItems( int id ) { - kdDebug(129) << "KAction::updateItems( " << id << ", lst )" << endl; // remove -- ellis + kdDebug(129) << "TDEAction::updateItems( " << id << ", lst )" << endl; // remove -- ellis TQWidget* w = container( id ); - if ( ::tqqt_cast<KToolBar *>( w ) ) { - TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast<TDEToolBar *>( w ) ) { + TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast<TQComboBox *>( r ) ) { TQComboBox *cb = static_cast<TQComboBox*>( r ); cb->clear(); @@ -636,11 +636,11 @@ void KSelectAction::updateItems( int id ) } } -int KSelectAction::plug( TQWidget *widget, int index ) +int TDESelectAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - kdDebug(129) << "KSelectAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis + kdDebug(129) << "TDESelectAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis if ( ::tqqt_cast<TQPopupMenu *>( widget) ) { // Create the PopupMenu and store it in m_menu @@ -665,10 +665,10 @@ int KSelectAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - else if ( ::tqqt_cast<KToolBar *>( widget ) ) + else if ( ::tqqt_cast<TDEToolBar *>( widget ) ) { - KToolBar* bar = static_cast<KToolBar*>( widget ); - int id_ = KAction::getToolButtonID(); + TDEToolBar* bar = static_cast<TDEToolBar*>( widget ); + int id_ = TDEAction::getToolButtonID(); bar->insertCombo( comboItems(), id_, isEditable(), TQT_SIGNAL( activated( const TQString & ) ), this, TQT_SLOT( slotActivated( const TQString & ) ), isEnabled(), @@ -718,11 +718,11 @@ int KSelectAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - kdWarning() << "Can not plug KAction in " << widget->className() << endl; + kdWarning() << "Can not plug TDEAction in " << widget->className() << endl; return -1; } -TQStringList KSelectAction::comboItems() const +TQStringList TDESelectAction::comboItems() const { if( d->m_menuAccelsEnabled ) { TQStringList lst; @@ -741,7 +741,7 @@ TQStringList KSelectAction::comboItems() const return d->m_list; } -void KSelectAction::clear() +void TDESelectAction::clear() { if ( d->m_menu ) d->m_menu->clear(); @@ -751,11 +751,11 @@ void KSelectAction::clear() updateClear( i ); } -void KSelectAction::updateClear( int id ) +void TDESelectAction::updateClear( int id ) { TQWidget* w = container( id ); - if ( ::tqqt_cast<KToolBar *>( w ) ) { - TQWidget* r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) ); + if ( ::tqqt_cast<TDEToolBar *>( w ) ) { + TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); if ( ::tqqt_cast<TQComboBox *>( r ) ) { TQComboBox *b = static_cast<TQComboBox*>( r ); b->clear(); @@ -763,7 +763,7 @@ void KSelectAction::updateClear( int id ) } } -void KSelectAction::slotActivated( int id ) +void TDESelectAction::slotActivated( int id ) { if ( d->m_current == id ) return; @@ -774,7 +774,7 @@ void KSelectAction::slotActivated( int id ) TQTimer::singleShot( 0, this, TQT_SLOT( slotActivated() ) ); } -void KSelectAction::slotActivated( const TQString &text ) +void TDESelectAction::slotActivated( const TQString &text ) { if ( isEditable() ) { @@ -796,175 +796,175 @@ void KSelectAction::slotActivated( const TQString &text ) TQTimer::singleShot( 0, this, TQT_SLOT( slotActivated() ) ); } -void KSelectAction::slotActivated() +void TDESelectAction::slotActivated() { - KAction::slotActivated(); - kdDebug(129) << "KSelectAction::slotActivated currentItem=" << currentItem() << " currentText=" << currentText() << endl; + TDEAction::slotActivated(); + kdDebug(129) << "TDESelectAction::slotActivated currentItem=" << currentItem() << " currentText=" << currentText() << endl; emit activated( currentItem() ); emit activated( currentText() ); } -void KSelectAction::setEditable( bool edit ) +void TDESelectAction::setEditable( bool edit ) { d->m_edit = edit; } -bool KSelectAction::isEditable() const +bool TDESelectAction::isEditable() const { return d->m_edit; } -void KSelectAction::setRemoveAmpersandsInCombo( bool b ) +void TDESelectAction::setRemoveAmpersandsInCombo( bool b ) { setMenuAccelsEnabled( b ); } -bool KSelectAction::removeAmpersandsInCombo() const +bool TDESelectAction::removeAmpersandsInCombo() const { return menuAccelsEnabled( ); } -void KSelectAction::setMenuAccelsEnabled( bool b ) +void TDESelectAction::setMenuAccelsEnabled( bool b ) { d->m_menuAccelsEnabled = b; } -bool KSelectAction::menuAccelsEnabled() const +bool TDESelectAction::menuAccelsEnabled() const { return d->m_menuAccelsEnabled; } -class KListAction::KListActionPrivate +class TDEListAction::TDEListActionPrivate { public: - KListActionPrivate() + TDEListActionPrivate() { m_current = 0; } int m_current; }; -KListAction::KListAction( const TQString& text, const KShortcut& cut, +TDEListAction::TDEListAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; } -KListAction::KListAction( const TQString& text, const KShortcut& cut, +TDEListAction::TDEListAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; if ( receiver ) connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot ); } -KListAction::KListAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEListAction::TDEListAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; } -KListAction::KListAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEListAction::TDEListAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; } -KListAction::KListAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, const TQObject* receiver, +TDEListAction::TDEListAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; if ( receiver ) connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot ); } -KListAction::KListAction( const TQString& text, const TQString& pix, - const KShortcut& cut, const TQObject* receiver, +TDEListAction::TDEListAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; if ( receiver ) connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot ); } -KListAction::KListAction( TQObject* parent, const char* name ) - : KSelectAction( parent, name ) +TDEListAction::TDEListAction( TQObject* parent, const char* name ) + : TDESelectAction( parent, name ) { - d = new KListActionPrivate; + d = new TDEListActionPrivate; } -KListAction::~KListAction() +TDEListAction::~TDEListAction() { delete d; d = 0; } -void KListAction::setCurrentItem( int index ) +void TDEListAction::setCurrentItem( int index ) { - KSelectAction::setCurrentItem( index ); + TDESelectAction::setCurrentItem( index ); d->m_current = index; - // emit KAction::activated(); + // emit TDEAction::activated(); // emit activated( currentItem() ); // emit activated( currentText() ); } -TQString KListAction::currentText() const +TQString TDEListAction::currentText() const { - return KSelectAction::currentText(); + return TDESelectAction::currentText(); } -int KListAction::currentItem() const +int TDEListAction::currentItem() const { return d->m_current; } -class KRecentFilesAction::KRecentFilesActionPrivate +class TDERecentFilesAction::TDERecentFilesActionPrivate { public: - KRecentFilesActionPrivate() + TDERecentFilesActionPrivate() { m_maxItems = 0; m_popup = 0; } uint m_maxItems; - KPopupMenu *m_popup; + TDEPopupMenu *m_popup; TQMap<TQString, TQString> m_shortNames; TQMap<TQString, KURL> m_urls; }; -KRecentFilesAction::KRecentFilesAction( const TQString& text, - const KShortcut& cut, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, + const TDEShortcut& cut, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, cut, parent, name) + : TDEListAction( text, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, - const KShortcut& cut, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, cut, parent, name) + : TDEListAction( text, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); @@ -974,42 +974,42 @@ KRecentFilesAction::KRecentFilesAction( const TQString& text, receiver, slot ); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, + const TDEShortcut& cut, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, pix, cut, parent, name) + : TDEListAction( text, pix, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, const TQString& pix, - const KShortcut& cut, + const TDEShortcut& cut, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, pix, cut, parent, name) + : TDEListAction( text, pix, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, pix, cut, parent, name) + : TDEListAction( text, pix, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); @@ -1019,16 +1019,16 @@ KRecentFilesAction::KRecentFilesAction( const TQString& text, receiver, slot ); } -KRecentFilesAction::KRecentFilesAction( const TQString& text, +TDERecentFilesAction::TDERecentFilesAction( const TQString& text, const TQString& pix, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name, uint maxItems ) - : KListAction( text, pix, cut, parent, name) + : TDEListAction( text, pix, cut, parent, name) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); @@ -1038,20 +1038,20 @@ KRecentFilesAction::KRecentFilesAction( const TQString& text, receiver, slot ); } -KRecentFilesAction::KRecentFilesAction( TQObject* parent, const char* name, +TDERecentFilesAction::TDERecentFilesAction( TQObject* parent, const char* name, uint maxItems ) - : KListAction( parent, name ) + : TDEListAction( parent, name ) { - d = new KRecentFilesActionPrivate; + d = new TDERecentFilesActionPrivate; d->m_maxItems = maxItems; init(); } -void KRecentFilesAction::init() +void TDERecentFilesAction::init() { - KRecentFilesAction *that = const_cast<KRecentFilesAction*>(this); - that->d->m_popup = new KPopupMenu; + TDERecentFilesAction *that = const_cast<TDERecentFilesAction*>(this); + that->d->m_popup = new TDEPopupMenu; connect(d->m_popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(menuAboutToShow())); connect(d->m_popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int))); connect( this, TQT_SIGNAL( activated( const TQString& ) ), @@ -1060,20 +1060,20 @@ void KRecentFilesAction::init() setMenuAccelsEnabled( false ); } -KRecentFilesAction::~KRecentFilesAction() +TDERecentFilesAction::~TDERecentFilesAction() { delete d->m_popup; delete d; d = 0; } -uint KRecentFilesAction::maxItems() const +uint TDERecentFilesAction::maxItems() const { return d->m_maxItems; } -void KRecentFilesAction::setMaxItems( uint maxItems ) +void TDERecentFilesAction::setMaxItems( uint maxItems ) { - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); uint oldCount = lst.count(); // set new maxItems @@ -1094,17 +1094,17 @@ void KRecentFilesAction::setMaxItems( uint maxItems ) setItems( lst ); } -void KRecentFilesAction::addURL( const KURL& url ) +void TDERecentFilesAction::addURL( const KURL& url ) { addURL( url, url.fileName() ); } -void KRecentFilesAction::addURL( const KURL& url, const TQString& name ) +void TDERecentFilesAction::addURL( const KURL& url, const TQString& name ) { - if ( url.isLocalFile() && !KGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/")) + if ( url.isLocalFile() && !TDEGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/")) return; const TQString file = url.pathOrURL(); - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); // remove file if already in list const TQStringList::Iterator end = lst.end(); @@ -1137,9 +1137,9 @@ void KRecentFilesAction::addURL( const KURL& url, const TQString& name ) setItems( lst ); } -void KRecentFilesAction::removeURL( const KURL& url ) +void TDERecentFilesAction::removeURL( const KURL& url ) { - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); TQString file = url.pathOrURL(); // remove url @@ -1157,14 +1157,14 @@ void KRecentFilesAction::removeURL( const KURL& url ) } } -void KRecentFilesAction::clearURLList() +void TDERecentFilesAction::clearURLList() { clear(); d->m_shortNames.clear(); d->m_urls.clear(); } -void KRecentFilesAction::loadEntries( KConfig* config, TQString groupname) +void TDERecentFilesAction::loadEntries( TDEConfig* config, TQString groupname) { TQString key; TQString value; @@ -1209,12 +1209,12 @@ void KRecentFilesAction::loadEntries( KConfig* config, TQString groupname) config->setGroup( oldGroup ); } -void KRecentFilesAction::saveEntries( KConfig* config, TQString groupname ) +void TDERecentFilesAction::saveEntries( TDEConfig* config, TQString groupname ) { TQString key; TQString value; TQString oldGroup; - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); oldGroup = config->group(); @@ -1238,7 +1238,7 @@ void KRecentFilesAction::saveEntries( KConfig* config, TQString groupname ) config->setGroup( oldGroup ); } -void KRecentFilesAction::itemSelected( const TQString& text ) +void TDERecentFilesAction::itemSelected( const TQString& text ) { //return a copy of the URL since the slot where it is connected might call //addURL or removeURL where the d->m_urls.erase( title ) could destroy the @@ -1246,7 +1246,7 @@ void KRecentFilesAction::itemSelected( const TQString& text ) emit urlSelected( KURL(d->m_urls[ text ]) ); } -void KRecentFilesAction::menuItemActivated( int id ) +void TDERecentFilesAction::menuItemActivated( int id ) { TQString text = d->m_popup->text(id); //return a copy of the URL since the slot where it is connected might call @@ -1255,34 +1255,34 @@ void KRecentFilesAction::menuItemActivated( int id ) emit urlSelected( KURL(d->m_urls[ text ]) ); } -void KRecentFilesAction::menuAboutToShow() +void TDERecentFilesAction::menuAboutToShow() { - KPopupMenu *menu = d->m_popup; + TDEPopupMenu *menu = d->m_popup; menu->clear(); - TQStringList list = KSelectAction::items(); + TQStringList list = TDESelectAction::items(); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { menu->insertItem(*it); } } -int KRecentFilesAction::plug( TQWidget *widget, int index ) +int TDERecentFilesAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - // This is very related to KActionMenu::plug. - // In fact this class could be an interesting base class for KActionMenu - if ( ::tqqt_cast<KToolBar *>( widget ) ) + // This is very related to TDEActionMenu::plug. + // In fact this class could be an interesting base class for TDEActionMenu + if ( ::tqqt_cast<TDEToolBar *>( widget ) ) { - KToolBar *bar = (KToolBar *)widget; + TDEToolBar *bar = (TDEToolBar *)widget; - int id_ = KAction::getToolButtonID(); + int id_ = TDEAction::getToolButtonID(); - KInstance * instance; + TDEInstance * instance; if ( m_parentCollection ) instance = m_parentCollection->instance(); else - instance = KGlobal::instance(); + instance = TDEGlobal::instance(); bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClicked() ), isEnabled(), plainText(), @@ -1300,36 +1300,36 @@ int KRecentFilesAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - return KListAction::plug( widget, index ); + return TDEListAction::plug( widget, index ); } -void KRecentFilesAction::slotClicked() +void TDERecentFilesAction::slotClicked() { - KAction::slotActivated(); + TDEAction::slotActivated(); } -void KRecentFilesAction::slotActivated(const TQString& text) +void TDERecentFilesAction::slotActivated(const TQString& text) { - KListAction::slotActivated(text); + TDEListAction::slotActivated(text); } -void KRecentFilesAction::slotActivated(int id) +void TDERecentFilesAction::slotActivated(int id) { - KListAction::slotActivated(id); + TDEListAction::slotActivated(id); } -void KRecentFilesAction::slotActivated() +void TDERecentFilesAction::slotActivated() { emit activated( currentItem() ); emit activated( currentText() ); } //KDE4: rename to urls() and return a KURL::List -TQStringList KRecentFilesAction::items() const +TQStringList TDERecentFilesAction::items() const { - TQStringList lst = KSelectAction::items(); + TQStringList lst = TDESelectAction::items(); TQStringList result; for( unsigned int i = 1 ; i <= lst.count() ; i++ ) @@ -1341,130 +1341,130 @@ TQStringList KRecentFilesAction::items() const } //KDE4: remove -TQStringList KRecentFilesAction::completeItems() const +TQStringList TDERecentFilesAction::completeItems() const { - return KSelectAction::items(); + return TDESelectAction::items(); } -class KFontAction::KFontActionPrivate +class TDEFontAction::TDEFontActionPrivate { public: - KFontActionPrivate() + TDEFontActionPrivate() { } TQStringList m_fonts; }; -KFontAction::KFontAction( const TQString& text, - const KShortcut& cut, TQObject* parent, +TDEFontAction::TDEFontAction( const TQString& text, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, cut, receiver, slot, parent, name ) + : TDESelectAction( text, cut, receiver, slot, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, receiver, slot, parent, name ) + : TDESelectAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, receiver, slot, parent, name ) + : TDESelectAction( text, pix, cut, receiver, slot, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( uint fontListCriteria, const TQString& text, - const KShortcut& cut, TQObject* parent, +TDEFontAction::TDEFontAction( uint fontListCriteria, const TQString& text, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, fontListCriteria ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, fontListCriteria ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( uint fontListCriteria, const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontAction::TDEFontAction( uint fontListCriteria, const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, fontListCriteria ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, fontListCriteria ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::KFontAction( TQObject* parent, const char* name ) - : KSelectAction( parent, name ) +TDEFontAction::TDEFontAction( TQObject* parent, const char* name ) + : TDESelectAction( parent, name ) { - d = new KFontActionPrivate; - KFontChooser::getFontList( d->m_fonts, 0 ); - KSelectAction::setItems( d->m_fonts ); + d = new TDEFontActionPrivate; + TDEFontChooser::getFontList( d->m_fonts, 0 ); + TDESelectAction::setItems( d->m_fonts ); setEditable( true ); } -KFontAction::~KFontAction() +TDEFontAction::~TDEFontAction() { delete d; d = 0; } /* - * Maintenance note: Keep in sync with KFontCombo::setCurrentFont() + * Maintenance note: Keep in sync with TDEFontCombo::setCurrentFont() */ -void KFontAction::setFont( const TQString &family ) +void TDEFontAction::setFont( const TQString &family ) { TQString lowerName = family.lower(); int i = 0; @@ -1521,15 +1521,15 @@ void KFontAction::setFont( const TQString &family ) kdDebug(129) << "Font not found " << family.lower() << endl; } -int KFontAction::plug( TQWidget *w, int index ) +int TDEFontAction::plug( TQWidget *w, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - if ( ::tqqt_cast<KToolBar *>( w ) ) + if ( ::tqqt_cast<TDEToolBar *>( w ) ) { - KToolBar* bar = static_cast<KToolBar*>( w ); - int id_ = KAction::getToolButtonID(); - KFontCombo *cb = new KFontCombo( items(), bar ); + TDEToolBar* bar = static_cast<TDEToolBar*>( w ); + int id_ = TDEAction::getToolButtonID(); + TDEFontCombo *cb = new TDEFontCombo( items(), bar ); connect( cb, TQT_SIGNAL( activated( const TQString & ) ), TQT_SLOT( slotActivated( const TQString & ) ) ); cb->setEnabled( isEnabled() ); @@ -1544,85 +1544,85 @@ int KFontAction::plug( TQWidget *w, int index ) return containerCount() - 1; } - else return KSelectAction::plug( w, index ); + else return TDESelectAction::plug( w, index ); } -class KFontSizeAction::KFontSizeActionPrivate +class TDEFontSizeAction::TDEFontSizeActionPrivate { public: - KFontSizeActionPrivate() + TDEFontSizeActionPrivate() { } }; -KFontSizeAction::KFontSizeAction( const TQString& text, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, cut, parent, name ) + : TDESelectAction( text, cut, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, cut, receiver, slot, parent, name ) + : TDESelectAction( text, cut, receiver, slot, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, parent, name ) + : TDESelectAction( text, pix, cut, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, const TQIconSet& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, receiver, slot, parent, name ) + : TDESelectAction( text, pix, cut, receiver, slot, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( const TQString& text, const TQString& pix, - const KShortcut& cut, +TDEFontSizeAction::TDEFontSizeAction( const TQString& text, const TQString& pix, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KSelectAction( text, pix, cut, receiver, slot, parent, name ) + : TDESelectAction( text, pix, cut, receiver, slot, parent, name ) { init(); } -KFontSizeAction::KFontSizeAction( TQObject* parent, const char* name ) - : KSelectAction( parent, name ) +TDEFontSizeAction::TDEFontSizeAction( TQObject* parent, const char* name ) + : TDESelectAction( parent, name ) { init(); } -KFontSizeAction::~KFontSizeAction() +TDEFontSizeAction::~TDEFontSizeAction() { delete d; d = 0; } -void KFontSizeAction::init() +void TDEFontSizeAction::init() { - d = new KFontSizeActionPrivate; + d = new TDEFontSizeActionPrivate; setEditable( true ); TQFontDatabase fontDB; @@ -1634,7 +1634,7 @@ void KFontSizeAction::init() setItems( lst ); } -void KFontSizeAction::setFontSize( int size ) +void TDEFontSizeAction::setFontSize( int size ) { if ( size == fontSize() ) { setCurrentItem( items().findIndex( TQString::number( size ) ) ); @@ -1642,7 +1642,7 @@ void KFontSizeAction::setFontSize( int size ) } if ( size < 1 ) { - kdWarning() << "KFontSizeAction: Size " << size << " is out of range" << endl; + kdWarning() << "TDEFontSizeAction: Size " << size << " is out of range" << endl; return; } @@ -1662,7 +1662,7 @@ void KFontSizeAction::setFontSize( int size ) TQStringList strLst; for (TQValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it) strLst.append( TQString::number(*it) ); - KSelectAction::setItems( strLst ); + TDESelectAction::setItems( strLst ); // Find new current item index = lst.findIndex( size ); setCurrentItem( index ); @@ -1671,130 +1671,130 @@ void KFontSizeAction::setFontSize( int size ) setCurrentItem( index ); - //emit KAction::activated(); + //emit TDEAction::activated(); //emit activated( index ); //emit activated( TQString::number( size ) ); //emit fontSizeChanged( size ); } -int KFontSizeAction::fontSize() const +int TDEFontSizeAction::fontSize() const { return currentText().toInt(); } -void KFontSizeAction::slotActivated( int index ) +void TDEFontSizeAction::slotActivated( int index ) { - KSelectAction::slotActivated( index ); + TDESelectAction::slotActivated( index ); emit fontSizeChanged( items()[ index ].toInt() ); } -void KFontSizeAction::slotActivated( const TQString& size ) +void TDEFontSizeAction::slotActivated( const TQString& size ) { setFontSize( size.toInt() ); // insert sorted first - KSelectAction::slotActivated( size ); + TDESelectAction::slotActivated( size ); emit fontSizeChanged( size.toInt() ); } -class KActionMenu::KActionMenuPrivate +class TDEActionMenu::TDEActionMenuPrivate { public: - KActionMenuPrivate() + TDEActionMenuPrivate() { - m_popup = new KPopupMenu(0L,"KActionMenu::KActionMenuPrivate"); + m_popup = new TDEPopupMenu(0L,"TDEActionMenu::TDEActionMenuPrivate"); m_delayed = true; m_stickyMenu = true; } - ~KActionMenuPrivate() + ~TDEActionMenuPrivate() { delete m_popup; m_popup = 0; } - KPopupMenu *m_popup; + TDEPopupMenu *m_popup; bool m_delayed; bool m_stickyMenu; }; -KActionMenu::KActionMenu( TQObject* parent, const char* name ) - : KAction( parent, name ) +TDEActionMenu::TDEActionMenu( TQObject* parent, const char* name ) + : TDEAction( parent, name ) { - d = new KActionMenuPrivate; + d = new TDEActionMenuPrivate; setShortcutConfigurable( false ); } -KActionMenu::KActionMenu( const TQString& text, TQObject* parent, +TDEActionMenu::TDEActionMenu( const TQString& text, TQObject* parent, const char* name ) - : KAction( text, 0, parent, name ) + : TDEAction( text, 0, parent, name ) { - d = new KActionMenuPrivate; + d = new TDEActionMenuPrivate; setShortcutConfigurable( false ); } -KActionMenu::KActionMenu( const TQString& text, const TQIconSet& icon, +TDEActionMenu::TDEActionMenu( const TQString& text, const TQIconSet& icon, TQObject* parent, const char* name ) - : KAction( text, icon, 0, parent, name ) + : TDEAction( text, icon, 0, parent, name ) { - d = new KActionMenuPrivate; + d = new TDEActionMenuPrivate; setShortcutConfigurable( false ); } -KActionMenu::KActionMenu( const TQString& text, const TQString& icon, +TDEActionMenu::TDEActionMenu( const TQString& text, const TQString& icon, TQObject* parent, const char* name ) - : KAction( text, icon, 0, parent, name ) + : TDEAction( text, icon, 0, parent, name ) { - d = new KActionMenuPrivate; + d = new TDEActionMenuPrivate; setShortcutConfigurable( false ); } -KActionMenu::~KActionMenu() +TDEActionMenu::~TDEActionMenu() { unplugAll(); - kdDebug(129) << "KActionMenu::~KActionMenu()" << endl; // ellis + kdDebug(129) << "TDEActionMenu::~TDEActionMenu()" << endl; // ellis delete d; d = 0; } -void KActionMenu::popup( const TQPoint& global ) +void TDEActionMenu::popup( const TQPoint& global ) { popupMenu()->popup( global ); } -KPopupMenu* KActionMenu::popupMenu() const +TDEPopupMenu* TDEActionMenu::popupMenu() const { return d->m_popup; } -void KActionMenu::insert( KAction* cmd, int index ) +void TDEActionMenu::insert( TDEAction* cmd, int index ) { if ( cmd ) cmd->plug( d->m_popup, index ); } -void KActionMenu::remove( KAction* cmd ) +void TDEActionMenu::remove( TDEAction* cmd ) { if ( cmd ) cmd->unplug( d->m_popup ); } -bool KActionMenu::delayed() const { +bool TDEActionMenu::delayed() const { return d->m_delayed; } -void KActionMenu::setDelayed(bool _delayed) { +void TDEActionMenu::setDelayed(bool _delayed) { d->m_delayed = _delayed; } -bool KActionMenu::stickyMenu() const { +bool TDEActionMenu::stickyMenu() const { return d->m_stickyMenu; } -void KActionMenu::setStickyMenu(bool sticky) { +void TDEActionMenu::setStickyMenu(bool sticky) { d->m_stickyMenu = sticky; } -int KActionMenu::plug( TQWidget* widget, int index ) +int TDEActionMenu::plug( TQWidget* widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - kdDebug(129) << "KActionMenu::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis + kdDebug(129) << "TDEActionMenu::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis if ( ::tqqt_cast<TQPopupMenu *>( widget ) ) { TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget ); @@ -1815,11 +1815,11 @@ int KActionMenu::plug( TQWidget* widget, int index ) return containerCount() - 1; } - else if ( ::tqqt_cast<KToolBar *>( widget ) ) + else if ( ::tqqt_cast<TDEToolBar *>( widget ) ) { - KToolBar *bar = static_cast<KToolBar *>( widget ); + TDEToolBar *bar = static_cast<TDEToolBar *>( widget ); - int id_ = KAction::getToolButtonID(); + int id_ = TDEAction::getToolButtonID(); if ( icon().isEmpty() && !iconSet().isNull() ) bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( clicked() ), this, @@ -1827,12 +1827,12 @@ int KActionMenu::plug( TQWidget* widget, int index ) index ); else { - KInstance *instance; + TDEInstance *instance; if ( m_parentCollection ) instance = m_parentCollection->instance(); else - instance = KGlobal::instance(); + instance = TDEGlobal::instance(); bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotActivated() ), isEnabled(), plainText(), @@ -1879,74 +1879,74 @@ int KActionMenu::plug( TQWidget* widget, int index ) //////// -KToolBarPopupAction::KToolBarPopupAction( const TQString& text, +TDEToolBarPopupAction::TDEToolBarPopupAction( const TQString& text, const TQString& icon, - const KShortcut& cut, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KAction( text, icon, cut, parent, name ) + : TDEAction( text, icon, cut, parent, name ) { m_popup = 0; m_delayed = true; m_stickyMenu = true; } -KToolBarPopupAction::KToolBarPopupAction( const TQString& text, +TDEToolBarPopupAction::TDEToolBarPopupAction( const TQString& text, const TQString& icon, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KAction( text, icon, cut, receiver, slot, parent, name ) + : TDEAction( text, icon, cut, receiver, slot, parent, name ) { m_popup = 0; m_delayed = true; m_stickyMenu = true; } -KToolBarPopupAction::KToolBarPopupAction( const KGuiItem& item, - const KShortcut& cut, +TDEToolBarPopupAction::TDEToolBarPopupAction( const KGuiItem& item, + const TDEShortcut& cut, const TQObject* receiver, - const char* slot, KActionCollection* parent, + const char* slot, TDEActionCollection* parent, const char* name ) - : KAction( item, cut, receiver, slot, parent, name ) + : TDEAction( item, cut, receiver, slot, parent, name ) { m_popup = 0; m_delayed = true; m_stickyMenu = true; } -KToolBarPopupAction::~KToolBarPopupAction() +TDEToolBarPopupAction::~TDEToolBarPopupAction() { delete m_popup; } -bool KToolBarPopupAction::delayed() const { +bool TDEToolBarPopupAction::delayed() const { return m_delayed; } -void KToolBarPopupAction::setDelayed(bool delayed) { +void TDEToolBarPopupAction::setDelayed(bool delayed) { m_delayed = delayed; } -bool KToolBarPopupAction::stickyMenu() const { +bool TDEToolBarPopupAction::stickyMenu() const { return m_stickyMenu; } -void KToolBarPopupAction::setStickyMenu(bool sticky) { +void TDEToolBarPopupAction::setStickyMenu(bool sticky) { m_stickyMenu = sticky; } -int KToolBarPopupAction::plug( TQWidget *widget, int index ) +int TDEToolBarPopupAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - // This is very related to KActionMenu::plug. - // In fact this class could be an interesting base class for KActionMenu - if ( ::tqqt_cast<KToolBar *>( widget ) ) + // This is very related to TDEActionMenu::plug. + // In fact this class could be an interesting base class for TDEActionMenu + if ( ::tqqt_cast<TDEToolBar *>( widget ) ) { - KToolBar *bar = (KToolBar *)widget; + TDEToolBar *bar = (TDEToolBar *)widget; - int id_ = KAction::getToolButtonID(); + int id_ = TDEAction::getToolButtonID(); if ( icon().isEmpty() && !iconSet().isNull() ) { bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( buttonClicked(int, TQt::ButtonState) ), this, @@ -1954,11 +1954,11 @@ int KToolBarPopupAction::plug( TQWidget *widget, int index ) isEnabled(), plainText(), index ); } else { - KInstance * instance; + TDEInstance * instance; if ( m_parentCollection ) instance = m_parentCollection->instance(); else - instance = KGlobal::instance(); + instance = TDEGlobal::instance(); bar->insertButton( icon(), id_, TQT_SIGNAL( buttonClicked(int, TQt::ButtonState) ), this, TQT_SLOT( slotButtonClicked(int, TQt::ButtonState) ), @@ -1982,42 +1982,42 @@ int KToolBarPopupAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - return KAction::plug( widget, index ); + return TDEAction::plug( widget, index ); } -KPopupMenu *KToolBarPopupAction::popupMenu() const +TDEPopupMenu *TDEToolBarPopupAction::popupMenu() const { if ( !m_popup ) { - KToolBarPopupAction *that = const_cast<KToolBarPopupAction*>(this); - that->m_popup = new KPopupMenu; + TDEToolBarPopupAction *that = const_cast<TDEToolBarPopupAction*>(this); + that->m_popup = new TDEPopupMenu; } return m_popup; } //////// -KToggleToolBarAction::KToggleToolBarAction( const char* toolBarName, - const TQString& text, KActionCollection* parent, const char* name ) - : KToggleAction( text, KShortcut(), parent, name ) +TDEToggleToolBarAction::TDEToggleToolBarAction( const char* toolBarName, + const TQString& text, TDEActionCollection* parent, const char* name ) + : TDEToggleAction( text, TDEShortcut(), parent, name ) , m_toolBarName( toolBarName ) , m_toolBar( 0L ) { } -KToggleToolBarAction::KToggleToolBarAction( KToolBar *toolBar, const TQString &text, - KActionCollection *parent, const char *name ) - : KToggleAction( text, KShortcut(), parent, name ) +TDEToggleToolBarAction::TDEToggleToolBarAction( TDEToolBar *toolBar, const TQString &text, + TDEActionCollection *parent, const char *name ) + : TDEToggleAction( text, TDEShortcut(), parent, name ) , m_toolBarName( 0 ), m_toolBar( toolBar ) { } -KToggleToolBarAction::~KToggleToolBarAction() +TDEToggleToolBarAction::~TDEToggleToolBarAction() { } -int KToggleToolBarAction::plug( TQWidget* w, int index ) +int TDEToggleToolBarAction::plug( TQWidget* w, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; if ( !m_toolBar ) { @@ -2027,7 +2027,7 @@ int KToggleToolBarAction::plug( TQWidget* w, int index ) while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store tl = n; - KMainWindow * mw = tqt_dynamic_cast<KMainWindow *>(tl); // try to see if it's a kmainwindow + TDEMainWindow * mw = tqt_dynamic_cast<TDEMainWindow *>(tl); // try to see if it's a tdemainwindow if ( mw ) m_toolBar = mw->toolBar( m_toolBarName ); @@ -2042,10 +2042,10 @@ int KToggleToolBarAction::plug( TQWidget* w, int index ) setEnabled( false ); } - return KToggleAction::plug( w, index ); + return TDEToggleAction::plug( w, index ); } -void KToggleToolBarAction::setChecked( bool c ) +void TDEToggleToolBarAction::setChecked( bool c ) { if( m_toolBar && c != m_toolBar->isVisible() ) { if( c ) { @@ -2054,29 +2054,29 @@ void KToggleToolBarAction::setChecked( bool c ) m_toolBar->hide(); } TQMainWindow* mw = m_toolBar->mainWindow(); - if ( mw && ::tqqt_cast<KMainWindow *>( mw ) ) - static_cast<KMainWindow *>( mw )->setSettingsDirty(); + if ( mw && ::tqqt_cast<TDEMainWindow *>( mw ) ) + static_cast<TDEMainWindow *>( mw )->setSettingsDirty(); } - KToggleAction::setChecked( c ); + TDEToggleAction::setChecked( c ); } //////// -KToggleFullScreenAction::KToggleFullScreenAction( const KShortcut &cut, +TDEToggleFullScreenAction::TDEToggleFullScreenAction( const TDEShortcut &cut, const TQObject* receiver, const char* slot, TQObject* parent, TQWidget* window, const char* name ) - : KToggleAction( TQString::null, cut, receiver, slot, parent, name ), + : TDEToggleAction( TQString::null, cut, receiver, slot, parent, name ), window( NULL ) { setWindow( window ); } -KToggleFullScreenAction::~KToggleFullScreenAction() +TDEToggleFullScreenAction::~TDEToggleFullScreenAction() { } -void KToggleFullScreenAction::setWindow( TQWidget* w ) +void TDEToggleFullScreenAction::setWindow( TQWidget* w ) { if( window ) window->removeEventFilter( this ); @@ -2085,7 +2085,7 @@ void KToggleFullScreenAction::setWindow( TQWidget* w ) window->installEventFilter( this ); } -void KToggleFullScreenAction::setChecked( bool c ) +void TDEToggleFullScreenAction::setChecked( bool c ) { if (c) { @@ -2097,10 +2097,10 @@ void KToggleFullScreenAction::setChecked( bool c ) setText(i18n("F&ull Screen Mode")); setIcon("window_fullscreen"); } - KToggleAction::setChecked( c ); + TDEToggleAction::setChecked( c ); } -bool KToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e ) +bool TDEToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e ) { if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(window) ) if( e->type() == TQEvent::WindowStateChange ) @@ -2114,10 +2114,10 @@ bool KToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e ) //////// KWidgetAction::KWidgetAction( TQWidget* widget, - const TQString& text, const KShortcut& cut, + const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ) - : KAction( text, cut, receiver, slot, parent, name ) + TDEActionCollection* parent, const char* name ) + : TDEAction( text, cut, receiver, slot, parent, name ) , m_widget( widget ) , m_autoSized( false ) { @@ -2138,7 +2138,7 @@ void KWidgetAction::setAutoSized( bool autoSized ) if( !m_widget || !isPlugged() ) return; - KToolBar* toolBar = (KToolBar*)m_widget->parent(); + TDEToolBar* toolBar = (TDEToolBar*)m_widget->parent(); int i = findContainer( toolBar ); if ( i == -1 ) return; @@ -2149,11 +2149,11 @@ void KWidgetAction::setAutoSized( bool autoSized ) int KWidgetAction::plug( TQWidget* w, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - if ( !::tqqt_cast<KToolBar *>( w ) ) { - kdError() << "KWidgetAction::plug: KWidgetAction must be plugged into KToolBar." << endl; + if ( !::tqqt_cast<TDEToolBar *>( w ) ) { + kdError() << "KWidgetAction::plug: KWidgetAction must be plugged into TDEToolBar." << endl; return -1; } if ( !m_widget ) { @@ -2161,9 +2161,9 @@ int KWidgetAction::plug( TQWidget* w, int index ) return -1; } - KToolBar* toolBar = static_cast<KToolBar*>( w ); + TDEToolBar* toolBar = static_cast<TDEToolBar*>( w ); - int id = KAction::getToolButtonID(); + int id = TDEAction::getToolButtonID(); m_widget->reparent( toolBar, TQPoint() ); toolBar->insertWidget( id, 0, m_widget, index ); @@ -2183,13 +2183,13 @@ void KWidgetAction::unplug( TQWidget *w ) if( !m_widget || !isPlugged() ) return; - KToolBar* toolBar = (KToolBar*)m_widget->parent(); + TDEToolBar* toolBar = (TDEToolBar*)m_widget->parent(); if ( toolBar == w ) { disconnect( toolBar, TQT_SIGNAL( toolbarDestroyed() ), this, TQT_SLOT( slotToolbarDestroyed() ) ); m_widget->reparent( 0L, TQPoint(), false /*showIt*/ ); } - KAction::unplug( w ); + TDEAction::unplug( w ); } void KWidgetAction::slotToolbarDestroyed() @@ -2205,16 +2205,16 @@ void KWidgetAction::slotToolbarDestroyed() //////// -KActionSeparator::KActionSeparator( TQObject *parent, const char *name ) - : KAction( parent, name ) +TDEActionSeparator::TDEActionSeparator( TQObject *parent, const char *name ) + : TDEAction( parent, name ) { } -KActionSeparator::~KActionSeparator() +TDEActionSeparator::~TDEActionSeparator() { } -int KActionSeparator::plug( TQWidget *widget, int index ) +int TDEActionSeparator::plug( TQWidget *widget, int index ) { if ( ::tqqt_cast<TQPopupMenu *>( widget) ) { @@ -2239,9 +2239,9 @@ int KActionSeparator::plug( TQWidget *widget, int index ) return containerCount() - 1; } - else if ( ::tqqt_cast<KToolBar *>( widget ) ) + else if ( ::tqqt_cast<TDEToolBar *>( widget ) ) { - KToolBar *toolBar = static_cast<KToolBar *>( widget ); + TDEToolBar *toolBar = static_cast<TDEToolBar *>( widget ); int id = toolBar->insertSeparator( index ); @@ -2255,46 +2255,46 @@ int KActionSeparator::plug( TQWidget *widget, int index ) return -1; } -KPasteTextAction::KPasteTextAction( const TQString& text, +TDEPasteTextAction::TDEPasteTextAction( const TQString& text, const TQString& icon, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name) - : KAction( text, icon, cut, receiver, slot, parent, name ) + : TDEAction( text, icon, cut, receiver, slot, parent, name ) { - m_popup = new KPopupMenu; + m_popup = new TDEPopupMenu; connect(m_popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(menuAboutToShow())); connect(m_popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int))); m_popup->setCheckable(true); m_mixedMode = true; } -KPasteTextAction::~KPasteTextAction() +TDEPasteTextAction::~TDEPasteTextAction() { delete m_popup; } -void KPasteTextAction::setMixedMode(bool mode) +void TDEPasteTextAction::setMixedMode(bool mode) { m_mixedMode = mode; } -int KPasteTextAction::plug( TQWidget *widget, int index ) +int TDEPasteTextAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeKAction(name())) + if (kapp && !kapp->authorizeTDEAction(name())) return -1; - if ( ::tqqt_cast<KToolBar *>( widget ) ) + if ( ::tqqt_cast<TDEToolBar *>( widget ) ) { - KToolBar *bar = (KToolBar *)widget; + TDEToolBar *bar = (TDEToolBar *)widget; - int id_ = KAction::getToolButtonID(); + int id_ = TDEAction::getToolButtonID(); - KInstance * instance; + TDEInstance * instance; if ( m_parentCollection ) instance = m_parentCollection->instance(); else - instance = KGlobal::instance(); + instance = TDEGlobal::instance(); bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotActivated() ), isEnabled(), plainText(), @@ -2312,10 +2312,10 @@ int KPasteTextAction::plug( TQWidget *widget, int index ) return containerCount() - 1; } - return KAction::plug( widget, index ); + return TDEAction::plug( widget, index ); } -void KPasteTextAction::menuAboutToShow() +void TDEPasteTextAction::menuAboutToShow() { m_popup->clear(); TQStringList list; @@ -2343,7 +2343,7 @@ void KPasteTextAction::menuAboutToShow() } } -void KPasteTextAction::menuItemActivated( int id) +void TDEPasteTextAction::menuItemActivated( int id) { DCOPClient *client = kapp->dcopClient(); if (client->isAttached() && client->isApplicationRegistered("klipper")) { @@ -2359,7 +2359,7 @@ void KPasteTextAction::menuItemActivated( int id) TQTimer::singleShot(20, this, TQT_SLOT(slotActivated())); } -void KPasteTextAction::slotActivated() +void TDEPasteTextAction::slotActivated() { if (!m_mixedMode) { TQWidget *w = tqApp->widgetAt(TQCursor::pos(), true); @@ -2367,55 +2367,55 @@ void KPasteTextAction::slotActivated() if (!data->provides("text/plain") && w) { m_popup->popup(w->mapToGlobal(TQPoint(0, w->height()))); } else - KAction::slotActivated(); + TDEAction::slotActivated(); } else - KAction::slotActivated(); + TDEAction::slotActivated(); } -void KToggleAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEToggleAction::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KRadioAction::virtual_hook( int id, void* data ) -{ KToggleAction::virtual_hook( id, data ); } +void TDERadioAction::virtual_hook( int id, void* data ) +{ TDEToggleAction::virtual_hook( id, data ); } -void KSelectAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDESelectAction::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KListAction::virtual_hook( int id, void* data ) -{ KSelectAction::virtual_hook( id, data ); } +void TDEListAction::virtual_hook( int id, void* data ) +{ TDESelectAction::virtual_hook( id, data ); } -void KRecentFilesAction::virtual_hook( int id, void* data ) -{ KListAction::virtual_hook( id, data ); } +void TDERecentFilesAction::virtual_hook( int id, void* data ) +{ TDEListAction::virtual_hook( id, data ); } -void KFontAction::virtual_hook( int id, void* data ) -{ KSelectAction::virtual_hook( id, data ); } +void TDEFontAction::virtual_hook( int id, void* data ) +{ TDESelectAction::virtual_hook( id, data ); } -void KFontSizeAction::virtual_hook( int id, void* data ) -{ KSelectAction::virtual_hook( id, data ); } +void TDEFontSizeAction::virtual_hook( int id, void* data ) +{ TDESelectAction::virtual_hook( id, data ); } -void KActionMenu::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEActionMenu::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KToolBarPopupAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEToolBarPopupAction::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KToggleToolBarAction::virtual_hook( int id, void* data ) -{ KToggleAction::virtual_hook( id, data ); } +void TDEToggleToolBarAction::virtual_hook( int id, void* data ) +{ TDEToggleAction::virtual_hook( id, data ); } -void KToggleFullScreenAction::virtual_hook( int id, void* data ) -{ KToggleAction::virtual_hook( id, data ); } +void TDEToggleFullScreenAction::virtual_hook( int id, void* data ) +{ TDEToggleAction::virtual_hook( id, data ); } void KWidgetAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +{ TDEAction::virtual_hook( id, data ); } -void KActionSeparator::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEActionSeparator::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } -void KPasteTextAction::virtual_hook( int id, void* data ) -{ KAction::virtual_hook( id, data ); } +void TDEPasteTextAction::virtual_hook( int id, void* data ) +{ TDEAction::virtual_hook( id, data ); } /* vim: et sw=2 ts=2 */ -#include "kactionclasses.moc" +#include "tdeactionclasses.moc" diff --git a/tdeui/kactionclasses.h b/tdeui/tdeactionclasses.h index 06e00d179..86594f179 100644 --- a/tdeui/kactionclasses.h +++ b/tdeui/tdeactionclasses.h @@ -24,17 +24,17 @@ */ //$Id$ -#ifndef __kactionclasses_h__ -#define __kactionclasses_h__ +#ifndef __tdeactionclasses_h__ +#define __tdeactionclasses_h__ -#include <kaction.h> +#include <tdeaction.h> #include <tqkeysequence.h> #include <tqobject.h> #include <tqvaluelist.h> #include <tqguardedptr.h> #include <kguiitem.h> -#include <kshortcut.h> +#include <tdeshortcut.h> #include <kstdaction.h> #include <kicontheme.h> @@ -44,18 +44,18 @@ class TQComboBox; class TQPoint; class TQIconSet; class TQString; -class KToolBar; +class TDEToolBar; -class KAccel; -class KAccelActions; -class KConfig; -class KConfigBase; +class TDEAccel; +class TDEAccelActions; +class TDEConfig; +class TDEConfigBase; class KURL; -class KInstance; -class KToolBar; -class KActionCollection; -class KPopupMenu; -class KMainWindow; +class TDEInstance; +class TDEToolBar; +class TDEActionCollection; +class TDEPopupMenu; +class TDEMainWindow; /** * @short Checkbox like action. @@ -65,7 +65,7 @@ class KMainWindow; * This action provides two states: checked or not. * */ -class TDEUI_EXPORT KToggleAction : public KAction +class TDEUI_EXPORT TDEToggleAction : public TDEAction { Q_OBJECT @@ -83,7 +83,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 ); + TDEToggleAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @param text The text that will be displayed. @@ -93,7 +93,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const KShortcut& cut, + TDEToggleAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -103,7 +103,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEToggleAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -113,7 +113,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEToggleAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -125,7 +125,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEToggleAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -137,7 +137,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEToggleAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -145,12 +145,12 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToggleAction( TQObject* parent = 0, const char* name = 0 ); + TDEToggleAction( TQObject* parent = 0, const char* name = 0 ); /** * Destructor */ - virtual ~KToggleAction(); + virtual ~TDEToggleAction(); /** * "Plug" or insert this action into a given widget. @@ -158,7 +158,7 @@ public: * This will typically be a menu or a toolbar. From this point * on, you will never need to directly manipulate the item in the * menu or toolbar. You do all enabling/disabling/manipulation - * directly with your KToggleAction object. + * directly with your TDEToggleAction object. * * @param widget The GUI element to display this action. * @param index The index of the item. @@ -218,8 +218,8 @@ signals: protected: virtual void virtual_hook( int id, void* data ); private: - class KToggleActionPrivate; - KToggleActionPrivate *d; + class TDEToggleActionPrivate; + TDEToggleActionPrivate *d; }; /** @@ -228,7 +228,7 @@ private: * An action that operates like a radio button. At any given time * only a single action from the group will be active. */ -class TDEUI_EXPORT KRadioAction : public KToggleAction +class TDEUI_EXPORT TDERadioAction : public TDEToggleAction { Q_OBJECT @@ -243,7 +243,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 ); + TDERadioAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @param text The text that will be displayed. @@ -253,7 +253,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const KShortcut& cut, + TDERadioAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -263,7 +263,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDERadioAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -273,7 +273,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDERadioAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -285,7 +285,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDERadioAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -297,7 +297,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDERadioAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -305,7 +305,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KRadioAction( TQObject* parent = 0, const char* name = 0 ); + TDERadioAction( TQObject* parent = 0, const char* name = 0 ); protected: virtual void slotActivated(); @@ -313,8 +313,8 @@ protected: protected: virtual void virtual_hook( int id, void* data ); private: - class KRadioActionPrivate; - KRadioActionPrivate *d; + class TDERadioActionPrivate; + TDERadioActionPrivate *d; }; /** @@ -328,7 +328,7 @@ private: * the formerly checked item becomes unchecked. * There can be only one item checked at a time. */ -class TDEUI_EXPORT KSelectAction : public KAction +class TDEUI_EXPORT TDESelectAction : public TDEAction { Q_OBJECT @@ -350,7 +350,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 ); + TDESelectAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @param text The text that will be displayed. @@ -360,7 +360,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const KShortcut& cut, + TDESelectAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -370,7 +370,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDESelectAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -380,7 +380,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDESelectAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -392,7 +392,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDESelectAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -404,7 +404,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDESelectAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -412,12 +412,12 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KSelectAction( TQObject* parent = 0, const char* name = 0 ); + TDESelectAction( TQObject* parent = 0, const char* name = 0 ); /** * Destructor */ - virtual ~KSelectAction(); + virtual ~TDESelectAction(); /** * "Plug" or insert this action into a given widget. @@ -425,7 +425,7 @@ public: * This will typically be a menu or a toolbar. * From this point on, you will never need to directly * manipulate the item in the menu or toolbar. - * You do all enabling/disabling/manipulation directly with your KSelectAction object. + * You do all enabling/disabling/manipulation directly with your TDESelectAction object. * * @param widget The GUI element to display this action. * @param index The index of the item. @@ -572,16 +572,16 @@ protected: virtual void virtual_hook( int id, void* data ); private: void setupMenu() const; - class KSelectActionPrivate; - KSelectActionPrivate *d; + class TDESelectActionPrivate; + TDESelectActionPrivate *d; }; -/// Remove this class in KDE-4.0. It doesn't add _anything_ to KSelectAction +/// Remove this class in KDE-4.0. It doesn't add _anything_ to TDESelectAction /** - * @deprecated Use KSelectAction instead. + * @deprecated Use TDESelectAction instead. */ -class TDEUI_EXPORT_DEPRECATED KListAction : public KSelectAction +class TDEUI_EXPORT_DEPRECATED TDEListAction : public TDESelectAction { Q_OBJECT @@ -596,7 +596,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, + TDEListAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -607,7 +607,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const KShortcut& cut, const TQObject* receiver, + TDEListAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -617,7 +617,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEListAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -627,7 +627,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEListAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -639,7 +639,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEListAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -652,7 +652,7 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEListAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -660,12 +660,12 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KListAction( TQObject* parent = 0, const char* name = 0 ); + TDEListAction( TQObject* parent = 0, const char* name = 0 ); /** * Destructor */ - virtual ~KListAction(); + virtual ~TDEListAction(); virtual TQString currentText() const; @@ -683,8 +683,8 @@ public slots: protected: virtual void virtual_hook( int id, void* data ); private: - class KListActionPrivate; - KListActionPrivate *d; + class TDEListActionPrivate; + TDEListActionPrivate *d; }; /** @@ -697,7 +697,7 @@ private: * * @author Michael Koch */ -class TDEUI_EXPORT KRecentFilesAction : public KListAction // TODO public KSelectAction +class TDEUI_EXPORT TDERecentFilesAction : public TDEListAction // TODO public TDESelectAction { Q_OBJECT @@ -710,7 +710,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -724,7 +724,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -737,7 +737,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -749,7 +749,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -764,7 +764,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -780,7 +780,7 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDERecentFilesAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0, uint maxItems = 10 ); @@ -790,13 +790,13 @@ public: * @param name An internal name for this action. * @param maxItems The maximum number of files to display */ - KRecentFilesAction( TQObject* parent = 0, const char* name = 0, + TDERecentFilesAction( TQObject* parent = 0, const char* name = 0, uint maxItems = 10 ); /** * Destructor. */ - virtual ~KRecentFilesAction(); + virtual ~TDERecentFilesAction(); virtual int plug( TQWidget *widget, int index = -1 ); @@ -834,22 +834,22 @@ public slots: void setMaxItems( uint maxItems ); /** - * Loads the recent files entries from a given KConfig object. + * Loads the recent files entries from a given TDEConfig object. * You can provide the name of the group used to load the entries. * If the groupname is empty, entries are load from a group called 'RecentFiles' * - * This method does not effect the active group of KConfig. + * This method does not effect the active group of TDEConfig. */ - void loadEntries( KConfig* config, TQString groupname=TQString::null ); + void loadEntries( TDEConfig* config, TQString groupname=TQString::null ); /** - * Saves the current recent files entries to a given KConfig object. + * Saves the current recent files entries to a given TDEConfig object. * You can provide the name of the group used to load the entries. * If the groupname is empty, entries are saved to a group called 'RecentFiles' * - * This method does not effect the active group of KConfig. + * This method does not effect the active group of TDEConfig. */ - void saveEntries( KConfig* config, TQString groupname=TQString::null ); + void saveEntries( TDEConfig* config, TQString groupname=TQString::null ); /** * Add URL to recent files list. @@ -903,44 +903,44 @@ protected: private: void init(); - class KRecentFilesActionPrivate; - KRecentFilesActionPrivate *d; + class TDERecentFilesActionPrivate; + TDERecentFilesActionPrivate *d; }; -class TDEUI_EXPORT KFontAction : public KSelectAction +class TDEUI_EXPORT TDEFontAction : public TDESelectAction { Q_OBJECT TQ_PROPERTY( TQString font READ font WRITE setFont ) public: - KFontAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, + TDEFontAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( const TQString& text, const KShortcut& cut, + TDEFontAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEFontAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEFontAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEFontAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEFontAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); // The ctors with fontListCriteria were added after 3.3-beta1. // This define is used in koffice. Remove when koffice has a dependency on tdelibs-3.3 or more. #define KFONTACTION_HAS_CRITERIA_ARG - KFontAction( uint fontListCriteria, const TQString& text, - const KShortcut& cut = KShortcut(), TQObject* parent = 0, + TDEFontAction( uint fontListCriteria, const TQString& text, + const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( uint fontListCriteria, const TQString& text, const TQString& pix, - const KShortcut& cut = KShortcut(), + TDEFontAction( uint fontListCriteria, const TQString& text, const TQString& pix, + const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontAction( TQObject* parent = 0, const char* name = 0 ); - ~KFontAction(); + TDEFontAction( TQObject* parent = 0, const char* name = 0 ); + ~TDEFontAction(); TQString font() const { return currentText(); @@ -954,33 +954,33 @@ public slots: protected: virtual void virtual_hook( int id, void* data ); private: - class KFontActionPrivate; - KFontActionPrivate *d; + class TDEFontActionPrivate; + TDEFontActionPrivate *d; }; -class TDEUI_EXPORT KFontSizeAction : public KSelectAction +class TDEUI_EXPORT TDEFontSizeAction : public TDESelectAction { Q_OBJECT TQ_PROPERTY( int fontSize READ fontSize WRITE setFontSize ) public: - KFontSizeAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, + TDEFontSizeAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontSizeAction( const TQString& text, const KShortcut& cut, const TQObject* receiver, + TDEFontSizeAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontSizeAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + TDEFontSizeAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontSizeAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + TDEFontSizeAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); - KFontSizeAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + TDEFontSizeAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontSizeAction( const TQString& text, const TQString& pix, const KShortcut& cut, + TDEFontSizeAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); - KFontSizeAction( TQObject* parent = 0, const char* name = 0 ); + TDEFontSizeAction( TQObject* parent = 0, const char* name = 0 ); - virtual ~KFontSizeAction(); + virtual ~TDEFontSizeAction(); virtual int fontSize() const; @@ -990,7 +990,7 @@ public slots: protected slots: virtual void slotActivated( int ); virtual void slotActivated( const TQString& ); - virtual void slotActivated() { KAction::slotActivated(); } + virtual void slotActivated() { TDEAction::slotActivated(); } signals: void fontSizeChanged( int ); @@ -1002,22 +1002,22 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KFontSizeActionPrivate; - KFontSizeActionPrivate *d; + class TDEFontSizeActionPrivate; + TDEFontSizeActionPrivate *d; }; /** - * A KActionMenu is an action that holds a sub-menu of other actions. + * A TDEActionMenu is an action that holds a sub-menu of other actions. * insert() and remove() allow to insert and remove actions into this action-menu. * Plugged in a popupmenu, it will create a submenu. * Plugged in a toolbar, it will create a button with a popup menu. * * This is the action used by the XMLGUI since it holds other actions. - * If you want a submenu for selecting one tool among many (without icons), see KSelectAction. + * If you want a submenu for selecting one tool among many (without icons), see TDESelectAction. * See also setDelayed about the main action. */ -class TDEUI_EXPORT KActionMenu : public KAction +class TDEUI_EXPORT TDEActionMenu : public TDEAction { Q_OBJECT @@ -1025,29 +1025,29 @@ class TDEUI_EXPORT KActionMenu : public KAction TQ_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu ) public: - KActionMenu( const TQString& text, TQObject* parent = 0, + TDEActionMenu( const TQString& text, TQObject* parent = 0, const char* name = 0 ); - KActionMenu( const TQString& text, const TQIconSet& icon, + TDEActionMenu( const TQString& text, const TQIconSet& icon, TQObject* parent = 0, const char* name = 0 ); - KActionMenu( const TQString& text, const TQString& icon, + TDEActionMenu( const TQString& text, const TQString& icon, TQObject* parent = 0, const char* name = 0 ); - KActionMenu( TQObject* parent = 0, const char* name = 0 ); - virtual ~KActionMenu(); + TDEActionMenu( TQObject* parent = 0, const char* name = 0 ); + virtual ~TDEActionMenu(); - virtual void insert( KAction*, int index = -1 ); - virtual void remove( KAction* ); + virtual void insert( TDEAction*, int index = -1 ); + virtual void remove( TDEAction* ); - KPopupMenu* popupMenu() const; + TDEPopupMenu* popupMenu() const; void popup( const TQPoint& global ); /** * Returns true if this action creates a delayed popup menu - * when plugged in a KToolbar. + * when plugged in a TDEToolbar. */ bool delayed() const; /** * If set to true, this action will create a delayed popup menu - * when plugged in a KToolbar. Otherwise it creates a normal popup. + * when plugged in a TDEToolbar. Otherwise it creates a normal popup. * Default: delayed * * Remember that if the "main" action (the toolbar button itself) @@ -1056,7 +1056,7 @@ public: * On the opposite, if the main action can be clicked, it can only happen * in a toolbar: in a menu, the parent of a submenu can't be activated. * To get a "normal" menu item when plugged a menu (and no submenu) - * use KToolBarPopupAction. + * use TDEToolBarPopupAction. */ void setDelayed(bool _delayed); @@ -1067,7 +1067,7 @@ public: bool stickyMenu() const; /** * If set to true, this action will create a sticky popup menu - * when plugged in a KToolbar. + * when plugged in a TDEToolbar. * "Sticky", means it's visible until a selection is made or the mouse is * clicked elsewhere. This feature allows you to make a selection without * having to press and hold down the mouse while making a selection. @@ -1080,8 +1080,8 @@ public: protected: virtual void virtual_hook( int id, void* data ); private: - class KActionMenuPrivate; - KActionMenuPrivate *d; + class TDEActionMenuPrivate; + TDEActionMenuPrivate *d; }; /** @@ -1091,7 +1091,7 @@ private: * that has more detail in a toolbar than in a menu (e.g. tool chooser * with "Other" leading to a dialog...). */ -class TDEUI_EXPORT KToolBarPopupAction : public KAction +class TDEUI_EXPORT TDEToolBarPopupAction : public TDEAction { Q_OBJECT @@ -1102,7 +1102,7 @@ public: //Not all constructors - because we need an icon, since this action only makes // sense when being plugged at least in a toolbar. /** - * Create a KToolBarPopupAction, with a text, an icon, an optional accelerator, + * Create a TDEToolBarPopupAction, with a text, an icon, an optional accelerator, * parent and name. * * @param text The text that will be displayed. @@ -1111,11 +1111,11 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarPopupAction( const TQString& text, const TQString& icon, const KShortcut& cut = KShortcut(), + TDEToolBarPopupAction( const TQString& text, const TQString& icon, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** - * Create a KToolBarPopupAction, with a text, an icon, an accelerator, + * Create a TDEToolBarPopupAction, with a text, an icon, an accelerator, * a slot connected to the action, parent and name. * * If you do not want or have a keyboard accelerator, set the @@ -1129,12 +1129,12 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarPopupAction( const TQString& text, const TQString& icon, const KShortcut& cut, + TDEToolBarPopupAction( const TQString& text, const TQString& icon, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent = 0, const char* name = 0 ); /** - * Create a KToolBarPopupAction, with a KGuiItem, an accelerator, + * Create a TDEToolBarPopupAction, with a KGuiItem, an accelerator, * a slot connected to the action, parent and name. The text and the * icon are taken from the KGuiItem. * @@ -1148,11 +1148,11 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarPopupAction( const KGuiItem& item, const KShortcut& cut, + TDEToolBarPopupAction( const KGuiItem& item, const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); - virtual ~KToolBarPopupAction(); + virtual ~TDEToolBarPopupAction(); virtual int plug( TQWidget *widget, int index = -1 ); @@ -1161,16 +1161,16 @@ public: * button. You may want to plug items into it on creation, or connect to * aboutToShow for a more dynamic menu. */ - KPopupMenu *popupMenu() const; + TDEPopupMenu *popupMenu() const; /** * Returns true if this action creates a delayed popup menu - * when plugged in a KToolbar. + * when plugged in a TDEToolbar. */ bool delayed() const; /** * If set to true, this action will create a delayed popup menu - * when plugged in a KToolbar. Otherwise it creates a normal popup. + * when plugged in a TDEToolbar. Otherwise it creates a normal popup. * Default: delayed. */ void setDelayed(bool delayed); @@ -1181,7 +1181,7 @@ public: bool stickyMenu() const; /** * If set to true, this action will create a sticky popup menu - * when plugged in a KToolbar. + * when plugged in a TDEToolbar. * "Sticky", means it's visible until a selection is made or the mouse is * clicked elsewhere. This feature allows you to make a selection without * having to press and hold down the mouse while making a selection. @@ -1191,14 +1191,14 @@ public: void setStickyMenu(bool sticky); private: - KPopupMenu *m_popup; + TDEPopupMenu *m_popup; bool m_delayed:1; bool m_stickyMenu:1; protected: virtual void virtual_hook( int id, void* data ); private: - class KToolBarPopupActionPrivate; - KToolBarPopupActionPrivate *d; + class TDEToolBarPopupActionPrivate; + TDEToolBarPopupActionPrivate *d; }; /** @@ -1214,38 +1214,38 @@ private: * visibility has changed, whenever it changes. * @since 3.1 */ -class TDEUI_EXPORT KToggleToolBarAction : public KToggleAction +class TDEUI_EXPORT TDEToggleToolBarAction : public TDEToggleAction { Q_OBJECT public: /** - * Create a KToggleToolbarAction that manages the toolbar + * Create a TDEToggleToolbarAction that manages the toolbar * named toolBarName. This can be either the name of a * toolbar in an xml ui file, or a toolbar programmatically * created with that name. */ - KToggleToolBarAction( const char* toolBarName, const TQString& text, - KActionCollection* parent, const char* name ); - KToggleToolBarAction( KToolBar *toolBar, const TQString &text, - KActionCollection *parent, const char *name ); - virtual ~KToggleToolBarAction(); + TDEToggleToolBarAction( const char* toolBarName, const TQString& text, + TDEActionCollection* parent, const char* name ); + TDEToggleToolBarAction( TDEToolBar *toolBar, const TQString &text, + TDEActionCollection *parent, const char *name ); + virtual ~TDEToggleToolBarAction(); virtual int plug( TQWidget * widget, int index = -1 ); - KToolBar *toolBar() { return m_toolBar; } + TDEToolBar *toolBar() { return m_toolBar; } public slots: virtual void setChecked( bool ); private: TQCString m_toolBarName; - TQGuardedPtr<KToolBar> m_toolBar; + TQGuardedPtr<TDEToolBar> m_toolBar; protected: virtual void virtual_hook( int id, void* data ); private: - class KToggleToolBarActionPrivate; - KToggleToolBarActionPrivate *d; + class TDEToggleToolBarActionPrivate; + TDEToggleToolBarActionPrivate *d; }; /** @@ -1261,13 +1261,13 @@ private: * still needs to explicitly set the window state though. * @since 3.2 */ -class TDEUI_EXPORT KToggleFullScreenAction : public KToggleAction +class TDEUI_EXPORT TDEToggleFullScreenAction : public TDEToggleAction { Q_OBJECT public: /** - * Create a KToggleFullScreenAction + * Create a TDEToggleFullScreenAction * @param cut The corresponding keyboard accelerator (shortcut). * @param receiver The SLOT's parent. * @param slot The TQT_SLOT to invoke to execute this action. @@ -1275,11 +1275,11 @@ public: * @param window the window that will switch to/from full screen mode * @param name An internal name for this action. */ - KToggleFullScreenAction( const KShortcut &cut, + TDEToggleFullScreenAction( const TDEShortcut &cut, const TQObject* receiver, const char* slot, TQObject* parent, TQWidget* window, const char* name ); - virtual ~KToggleFullScreenAction(); + virtual ~TDEToggleFullScreenAction(); /** * Sets the window that will be related to this action. @@ -1297,8 +1297,8 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KToggleFullScreenActionPrivate; - KToggleFullScreenActionPrivate *d; + class TDEToggleFullScreenActionPrivate; + TDEToggleFullScreenActionPrivate *d; }; @@ -1306,7 +1306,7 @@ private: * An action that automatically embeds a widget into a * toolbar. */ -class TDEUI_EXPORT KWidgetAction : public KAction +class TDEUI_EXPORT KWidgetAction : public TDEAction { Q_OBJECT @@ -1317,9 +1317,9 @@ public: * a toolbar. */ KWidgetAction( TQWidget* widget, const TQString& text, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, - KActionCollection* parent, const char* name ); + TDEActionCollection* parent, const char* name ); virtual ~KWidgetAction(); /** @@ -1331,7 +1331,7 @@ public: /** * Plug the action. The widget passed to the constructor - * will be reparented to w, which must inherit KToolBar. + * will be reparented to w, which must inherit TDEToolBar. */ virtual int plug( TQWidget* widget, int index = -1 ); /** @@ -1351,21 +1351,21 @@ private: KWidgetActionPrivate *d; }; -class TDEUI_EXPORT KActionSeparator : public KAction +class TDEUI_EXPORT TDEActionSeparator : public TDEAction { Q_OBJECT public: - KActionSeparator( TQObject* parent = 0, const char* name = 0 ); - virtual ~KActionSeparator(); + TDEActionSeparator( TQObject* parent = 0, const char* name = 0 ); + virtual ~TDEActionSeparator(); virtual int plug( TQWidget *widget, int index = -1 ); protected: virtual void virtual_hook( int id, void* data ); private: - class KActionSeparatorPrivate; - KActionSeparatorPrivate *d; + class TDEActionSeparatorPrivate; + TDEActionSeparatorPrivate *d; }; /** @@ -1378,13 +1378,13 @@ private: * * @since 3.2 */ -class TDEUI_EXPORT KPasteTextAction: public KAction +class TDEUI_EXPORT TDEPasteTextAction: public TDEAction { Q_OBJECT public: /** - * Create a KPasteTextAction, with a text, an icon, an accelerator, + * Create a TDEPasteTextAction, with a text, an icon, an accelerator, * a slot connected to the action, parent and name. * * If you do not want or have a keyboard accelerator, set the @@ -1398,11 +1398,11 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KPasteTextAction( const TQString& text, const TQString& icon, const KShortcut& cut, + TDEPasteTextAction( const TQString& text, const TQString& icon, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent = 0, const char* name = 0 ); - virtual ~KPasteTextAction(); + virtual ~TDEPasteTextAction(); /** * Controls the behavior of the clipboard history menu popup. @@ -1427,10 +1427,10 @@ protected: virtual void virtual_hook( int id, void* data ); private: - KPopupMenu *m_popup; + TDEPopupMenu *m_popup; bool m_mixedMode; - class KPasteTextActionPrivate; - KPasteTextActionPrivate *d; + class TDEPasteTextActionPrivate; + TDEPasteTextActionPrivate *d; }; #endif diff --git a/tdeui/kactioncollection.cpp b/tdeui/tdeactioncollection.cpp index ba809087c..16104e242 100644 --- a/tdeui/kactioncollection.cpp +++ b/tdeui/tdeactioncollection.cpp @@ -23,32 +23,32 @@ Boston, MA 02110-1301, USA. */ -#include "kactioncollection.h" -#include "kactionshortcutlist.h" -#include "ktoolbar.h" +#include "tdeactioncollection.h" +#include "tdeactionshortcutlist.h" +#include "tdetoolbar.h" #include "kxmlguifactory.h" #include "kxmlguiclient.h" -#include <kaccel.h> -#include <kaccelbase.h> -#include <kapplication.h> +#include <tdeaccel.h> +#include <tdeaccelbase.h> +#include <tdeapplication.h> #include <kdebug.h> #include <tqpopupmenu.h> #include <tqptrdict.h> #include <tqvariant.h> -class KActionCollection::KActionCollectionPrivate +class TDEActionCollection::TDEActionCollectionPrivate { public: - KActionCollectionPrivate() + TDEActionCollectionPrivate() { m_instance = 0; - //m_bOneKAccelOnly = false; + //m_bOneTDEAccelOnly = false; //m_iWidgetCurrent = 0; m_bAutoConnectShortcuts = true; m_widget = 0; - m_kaccel = m_builderKAccel = 0; + m_tdeaccel = m_builderTDEAccel = 0; m_dctHighlightContainers.setAutoDelete( true ); m_highlight = false; m_currentHighlightAction = 0; @@ -56,172 +56,172 @@ public: m_parentGUIClient = 0L; } - KInstance *m_instance; + TDEInstance *m_instance; TQString m_sXMLFile; bool m_bAutoConnectShortcuts; - //bool m_bOneKAccelOnly; + //bool m_bOneTDEAccelOnly; //int m_iWidgetCurrent; //TQValueList<TQWidget*> m_widgetList; - //TQValueList<KAccel*> m_kaccelList; - TQValueList<KActionCollection*> m_docList; + //TQValueList<TDEAccel*> m_tdeaccelList; + TQValueList<TDEActionCollection*> m_docList; TQWidget *m_widget; - KAccel *m_kaccel; - KAccel *m_builderKAccel; + TDEAccel *m_tdeaccel; + TDEAccel *m_builderTDEAccel; - TQAsciiDict<KAction> m_actionDict; - TQPtrDict< TQPtrList<KAction> > m_dctHighlightContainers; + TQAsciiDict<TDEAction> m_actionDict; + TQPtrDict< TQPtrList<TDEAction> > m_dctHighlightContainers; bool m_highlight; - KAction *m_currentHighlightAction; + TDEAction *m_currentHighlightAction; bool m_statusCleared; const KXMLGUIClient *m_parentGUIClient; }; -KActionCollection::KActionCollection( TQWidget *parent, const char *name, - KInstance *instance ) +TDEActionCollection::TDEActionCollection( TQWidget *parent, const char *name, + TDEInstance *instance ) : TQObject( parent, name ) { - kdDebug(129) << "KActionCollection::KActionCollection( " << parent << ", " << name << " ): this = " << this << endl; // ellis - d = new KActionCollectionPrivate; + kdDebug(129) << "TDEActionCollection::TDEActionCollection( " << parent << ", " << name << " ): this = " << this << endl; // ellis + d = new TDEActionCollectionPrivate; if( parent ) setWidget( parent ); - //d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0); + //d->m_bOneTDEAccelOnly = (d->m_tdeaccelList.count() > 0); setInstance( instance ); } -KActionCollection::KActionCollection( TQWidget *watch, TQObject* parent, const char *name, - KInstance *instance ) +TDEActionCollection::TDEActionCollection( TQWidget *watch, TQObject* parent, const char *name, + TDEInstance *instance ) : TQObject( parent, name ) { - kdDebug(129) << "KActionCollection::KActionCollection( " << watch << ", " << parent << ", " << name << " ): this = " << this << endl; //ellis - d = new KActionCollectionPrivate; + kdDebug(129) << "TDEActionCollection::TDEActionCollection( " << watch << ", " << parent << ", " << name << " ): this = " << this << endl; //ellis + d = new TDEActionCollectionPrivate; if( watch ) setWidget( watch ); - //d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0); + //d->m_bOneTDEAccelOnly = (d->m_tdeaccelList.count() > 0); setInstance( instance ); } #ifndef KDE_NO_COMPAT // KDE 4: remove -KActionCollection::KActionCollection( TQObject *parent, const char *name, - KInstance *instance ) +TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, + TDEInstance *instance ) : TQObject( parent, name ) { - kdWarning(129) << "KActionCollection::KActionCollection( TQObject *parent, const char *name, KInstance *instance )" << endl; //ellis + kdWarning(129) << "TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, TDEInstance *instance )" << endl; //ellis kdDebug(129) << kdBacktrace() << endl; - d = new KActionCollectionPrivate; + d = new TDEActionCollectionPrivate; TQWidget* w = tqt_dynamic_cast<TQWidget*>( parent ); if( w ) setWidget( w ); - //d->m_bOneKAccelOnly = (d->m_kaccelList.count() > 0); + //d->m_bOneTDEAccelOnly = (d->m_tdeaccelList.count() > 0); setInstance( instance ); } -KActionCollection::KActionCollection( const KActionCollection © ) +TDEActionCollection::TDEActionCollection( const TDEActionCollection © ) : TQObject() { - kdWarning(129) << "KActionCollection::KActionCollection( const KActionCollection & ): function is severely deprecated." << endl; - d = new KActionCollectionPrivate; + kdWarning(129) << "TDEActionCollection::TDEActionCollection( const TDEActionCollection & ): function is severely deprecated." << endl; + d = new TDEActionCollectionPrivate; *this = copy; } #endif // KDE 4: remove end -KActionCollection::KActionCollection( const char *name, const KXMLGUIClient *parent ) +TDEActionCollection::TDEActionCollection( const char *name, const KXMLGUIClient *parent ) : TQObject( 0L, name ) { - d = new KActionCollectionPrivate; + d = new TDEActionCollectionPrivate; d->m_parentGUIClient=parent; d->m_instance=parent->instance(); } -KActionCollection::~KActionCollection() +TDEActionCollection::~TDEActionCollection() { - kdDebug(129) << "KActionCollection::~KActionCollection(): this = " << this << endl; - for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); + kdDebug(129) << "TDEActionCollection::~TDEActionCollection(): this = " << this << endl; + for ( TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); it.current(); ++it ) { + TDEAction* pAction = it.current(); if ( pAction->m_parentCollection == this ) pAction->m_parentCollection = 0L; } - delete d->m_kaccel; - delete d->m_builderKAccel; + delete d->m_tdeaccel; + delete d->m_builderTDEAccel; delete d; d = 0; } -void KActionCollection::setWidget( TQWidget* w ) +void TDEActionCollection::setWidget( TQWidget* w ) { //if ( d->m_actionDict.count() > 0 ) { - // kdError(129) << "KActionCollection::setWidget(): must be called before any actions are added to collection!" << endl; + // kdError(129) << "TDEActionCollection::setWidget(): must be called before any actions are added to collection!" << endl; // kdDebug(129) << kdBacktrace() << endl; //} //else if ( !d->m_widget ) { d->m_widget = w; - d->m_kaccel = new KAccel( w, this, "KActionCollection-KAccel" ); + d->m_tdeaccel = new TDEAccel( w, this, "TDEActionCollection-TDEAccel" ); } else if ( d->m_widget != w ) - kdWarning(129) << "KActionCollection::setWidget(): tried to change widget from " << d->m_widget << " to " << w << endl; + kdWarning(129) << "TDEActionCollection::setWidget(): tried to change widget from " << d->m_widget << " to " << w << endl; } -void KActionCollection::setAutoConnectShortcuts( bool b ) +void TDEActionCollection::setAutoConnectShortcuts( bool b ) { d->m_bAutoConnectShortcuts = b; } -bool KActionCollection::isAutoConnectShortcuts() +bool TDEActionCollection::isAutoConnectShortcuts() { return d->m_bAutoConnectShortcuts; } -bool KActionCollection::addDocCollection( KActionCollection* pDoc ) +bool TDEActionCollection::addDocCollection( TDEActionCollection* pDoc ) { d->m_docList.append( pDoc ); return true; } -void KActionCollection::beginXMLPlug( TQWidget *widget ) +void TDEActionCollection::beginXMLPlug( TQWidget *widget ) { - kdDebug(129) << "KActionCollection::beginXMLPlug( buildWidget = " << widget << " ): this = " << this << " d->m_builderKAccel = " << d->m_builderKAccel << endl; + kdDebug(129) << "TDEActionCollection::beginXMLPlug( buildWidget = " << widget << " ): this = " << this << " d->m_builderTDEAccel = " << d->m_builderTDEAccel << endl; - if( widget && !d->m_builderKAccel ) { - d->m_builderKAccel = new KAccel( widget, this, "KActionCollection-BuilderKAccel" ); + if( widget && !d->m_builderTDEAccel ) { + d->m_builderTDEAccel = new TDEAccel( widget, this, "TDEActionCollection-BuilderTDEAccel" ); } } -void KActionCollection::endXMLPlug() +void TDEActionCollection::endXMLPlug() { - kdDebug(129) << "KActionCollection::endXMLPlug(): this = " << this << endl; - //s_kaccelXML = 0; + kdDebug(129) << "TDEActionCollection::endXMLPlug(): this = " << this << endl; + //s_tdeaccelXML = 0; } -void KActionCollection::prepareXMLUnplug() +void TDEActionCollection::prepareXMLUnplug() { - kdDebug(129) << "KActionCollection::prepareXMLUnplug(): this = " << this << endl; - unplugShortcuts( d->m_kaccel ); + kdDebug(129) << "TDEActionCollection::prepareXMLUnplug(): this = " << this << endl; + unplugShortcuts( d->m_tdeaccel ); - if( d->m_builderKAccel ) { - unplugShortcuts( d->m_builderKAccel ); - delete d->m_builderKAccel; - d->m_builderKAccel = 0; + if( d->m_builderTDEAccel ) { + unplugShortcuts( d->m_builderTDEAccel ); + delete d->m_builderTDEAccel; + d->m_builderTDEAccel = 0; } } -void KActionCollection::unplugShortcuts( KAccel* kaccel ) +void TDEActionCollection::unplugShortcuts( TDEAccel* tdeaccel ) { - for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); - pAction->removeKAccel( kaccel ); + for ( TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); it.current(); ++it ) { + TDEAction* pAction = it.current(); + pAction->removeTDEAccel( tdeaccel ); } for( uint i = 0; i < d->m_docList.count(); i++ ) - d->m_docList[i]->unplugShortcuts( kaccel ); + d->m_docList[i]->unplugShortcuts( tdeaccel ); } -/*void KActionCollection::addWidget( TQWidget* w ) +/*void TDEActionCollection::addWidget( TQWidget* w ) { - if( !d->m_bOneKAccelOnly ) { - kdDebug(129) << "KActionCollection::addWidget( " << w << " ): this = " << this << endl; + if( !d->m_bOneTDEAccelOnly ) { + kdDebug(129) << "TDEActionCollection::addWidget( " << w << " ): this = " << this << endl; for( uint i = 0; i < d->m_widgetList.count(); i++ ) { if( d->m_widgetList[i] == w ) { d->m_iWidgetCurrent = i; @@ -230,28 +230,28 @@ void KActionCollection::unplugShortcuts( KAccel* kaccel ) } d->m_iWidgetCurrent = d->m_widgetList.count(); d->m_widgetList.append( w ); - d->m_kaccelList.append( new KAccel( w, this, "KActionCollection-KAccel" ) ); + d->m_tdeaccelList.append( new TDEAccel( w, this, "TDEActionCollection-TDEAccel" ) ); } } -void KActionCollection::removeWidget( TQWidget* w ) +void TDEActionCollection::removeWidget( TQWidget* w ) { - if( !d->m_bOneKAccelOnly ) { - kdDebug(129) << "KActionCollection::removeWidget( " << w << " ): this = " << this << endl; + if( !d->m_bOneTDEAccelOnly ) { + kdDebug(129) << "TDEActionCollection::removeWidget( " << w << " ): this = " << this << endl; for( uint i = 0; i < d->m_widgetList.count(); i++ ) { if( d->m_widgetList[i] == w ) { - // Remove KAccel object from children. - KAccel* pKAccel = d->m_kaccelList[i]; - for ( TQAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) { - KAction* pAction = it.current(); + // Remove TDEAccel object from children. + TDEAccel* pTDEAccel = d->m_tdeaccelList[i]; + for ( TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); it.current(); ++it ) { + TDEAction* pAction = it.current(); if ( pAction->m_parentCollection == this ) { - pAction->removeKAccel( pKAccel ); + pAction->removeTDEAccel( pTDEAccel ); } } - delete pKAccel; + delete pTDEAccel; d->m_widgetList.remove( d->m_widgetList.at( i ) ); - d->m_kaccelList.remove( d->m_kaccelList.at( i ) ); + d->m_tdeaccelList.remove( d->m_tdeaccelList.at( i ) ); if( d->m_iWidgetCurrent == (int)i ) d->m_iWidgetCurrent = -1; @@ -260,46 +260,46 @@ void KActionCollection::removeWidget( TQWidget* w ) return; } } - kdWarning(129) << "KActionCollection::removeWidget( " << w << " ): widget not in list." << endl; + kdWarning(129) << "TDEActionCollection::removeWidget( " << w << " ): widget not in list." << endl; } } -bool KActionCollection::ownsKAccel() const +bool TDEActionCollection::ownsTDEAccel() const { - return d->m_bOneKAccelOnly; + return d->m_bOneTDEAccelOnly; } -uint KActionCollection::widgetCount() const +uint TDEActionCollection::widgetCount() const { return d->m_widgetList.count(); } -const KAccel* KActionCollection::widgetKAccel( uint i ) const +const TDEAccel* TDEActionCollection::widgetTDEAccel( uint i ) const { - return d->m_kaccelList[i]; + return d->m_tdeaccelList[i]; }*/ -KAccel* KActionCollection::kaccel() +TDEAccel* TDEActionCollection::tdeaccel() { - //if( d->m_kaccelList.count() > 0 ) - // return d->m_kaccelList[d->m_iWidgetCurrent]; + //if( d->m_tdeaccelList.count() > 0 ) + // return d->m_tdeaccelList[d->m_iWidgetCurrent]; //else // return 0; - return d->m_kaccel; + return d->m_tdeaccel; } -const KAccel* KActionCollection::kaccel() const +const TDEAccel* TDEActionCollection::tdeaccel() const { - //if( d->m_kaccelList.count() > 0 ) - // return d->m_kaccelList[d->m_iWidgetCurrent]; + //if( d->m_tdeaccelList.count() > 0 ) + // return d->m_tdeaccelList[d->m_iWidgetCurrent]; //else // return 0; - return d->m_kaccel; + return d->m_tdeaccel; } // Return the key to use in d->m_actionDict for the given action. // Usually name(), except when unnamed. -static const char* actionDictKey( KAction* action, char* buffer ) +static const char* actionDictKey( TDEAction* action, char* buffer ) { const char* name = action->name(); if( !qstrcmp( name, "unnamed" ) ) @@ -310,11 +310,11 @@ static const char* actionDictKey( KAction* action, char* buffer ) return name; } -void KActionCollection::_insert( KAction* action ) +void TDEActionCollection::_insert( TDEAction* action ) { char unnamed_name[100]; const char *name = actionDictKey( action, unnamed_name ); - KAction *a = d->m_actionDict[ name ]; + TDEAction *a = d->m_actionDict[ name ]; if ( a == action ) return; @@ -323,27 +323,27 @@ void KActionCollection::_insert( KAction* action ) emit inserted( action ); } -void KActionCollection::_remove( KAction* action ) +void TDEActionCollection::_remove( TDEAction* action ) { char unnamed_name[100]; const char *name = actionDictKey( action, unnamed_name ); - KAction *a = d->m_actionDict.take( name ); + TDEAction *a = d->m_actionDict.take( name ); if ( !a || a != action ) return; emit removed( action ); // note that we delete the action without its parent collection set to 0. - // This triggers kaccel::remove, to remove any shortcut. + // This triggers tdeaccel::remove, to remove any shortcut. delete a; } -KAction* KActionCollection::_take( KAction* action ) +TDEAction* TDEActionCollection::_take( TDEAction* action ) { char unnamed_name[100]; const char *name = actionDictKey( action, unnamed_name ); - KAction *a = d->m_actionDict.take( name ); + TDEAction *a = d->m_actionDict.take( name ); if ( !a || a != action ) return 0; @@ -355,30 +355,30 @@ KAction* KActionCollection::_take( KAction* action ) return a; } -void KActionCollection::_clear() +void TDEActionCollection::_clear() { - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); while ( it.current() ) _remove( it.current() ); } -void KActionCollection::insert( KAction* action ) { _insert( action ); } -void KActionCollection::remove( KAction* action ) { _remove( action ); } -KAction* KActionCollection::take( KAction* action ) { return _take( action ); } -void KActionCollection::clear() { _clear(); } -KAccel* KActionCollection::accel() { return kaccel(); } -const KAccel* KActionCollection::accel() const { return kaccel(); } -KAccel* KActionCollection::builderKAccel() const { return d->m_builderKAccel; } +void TDEActionCollection::insert( TDEAction* action ) { _insert( action ); } +void TDEActionCollection::remove( TDEAction* action ) { _remove( action ); } +TDEAction* TDEActionCollection::take( TDEAction* action ) { return _take( action ); } +void TDEActionCollection::clear() { _clear(); } +TDEAccel* TDEActionCollection::accel() { return tdeaccel(); } +const TDEAccel* TDEActionCollection::accel() const { return tdeaccel(); } +TDEAccel* TDEActionCollection::builderTDEAccel() const { return d->m_builderTDEAccel; } -KAction* KActionCollection::action( const char* name, const char* classname ) const +TDEAction* TDEActionCollection::action( const char* name, const char* classname ) const { - KAction* pAction = 0; + TDEAction* pAction = 0; if ( !classname && name ) pAction = d->m_actionDict[ name ]; else { - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); for( ; it.current(); ++it ) { if ( ( !name || !strcmp( it.current()->name(), name ) ) && @@ -397,34 +397,34 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co return pAction; } -KAction* KActionCollection::action( int index ) const +TDEAction* TDEActionCollection::action( int index ) const { - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); it += index; return it.current(); // return d->m_actions.at( index ); } -bool KActionCollection::readShortcutSettings( const TQString& sConfigGroup, KConfigBase* pConfig ) +bool TDEActionCollection::readShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) { - return KActionShortcutList(this).readSettings( sConfigGroup, pConfig ); + return TDEActionShortcutList(this).readSettings( sConfigGroup, pConfig ); } -bool KActionCollection::writeShortcutSettings( const TQString& sConfigGroup, KConfigBase* pConfig ) const +bool TDEActionCollection::writeShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) const { - return KActionShortcutList((KActionCollection*)this).writeSettings( sConfigGroup, pConfig ); + return TDEActionShortcutList((TDEActionCollection*)this).writeSettings( sConfigGroup, pConfig ); } -uint KActionCollection::count() const +uint TDEActionCollection::count() const { return d->m_actionDict.count(); } -TQStringList KActionCollection::groups() const +TQStringList TDEActionCollection::groups() const { TQStringList lst; - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); for( ; it.current(); ++it ) if ( !it.current()->group().isEmpty() && !lst.contains( it.current()->group() ) ) lst.append( it.current()->group() ); @@ -432,11 +432,11 @@ TQStringList KActionCollection::groups() const return lst; } -KActionPtrList KActionCollection::actions( const TQString& group ) const +TDEActionPtrList TDEActionCollection::actions( const TQString& group ) const { - KActionPtrList lst; + TDEActionPtrList lst; - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); for( ; it.current(); ++it ) if ( it.current()->group() == group ) lst.append( it.current() ); @@ -446,60 +446,60 @@ KActionPtrList KActionCollection::actions( const TQString& group ) const return lst; } -KActionPtrList KActionCollection::actions() const +TDEActionPtrList TDEActionCollection::actions() const { - KActionPtrList lst; + TDEActionPtrList lst; - TQAsciiDictIterator<KAction> it( d->m_actionDict ); + TQAsciiDictIterator<TDEAction> it( d->m_actionDict ); for( ; it.current(); ++it ) lst.append( it.current() ); return lst; } -void KActionCollection::setInstance( KInstance *instance ) +void TDEActionCollection::setInstance( TDEInstance *instance ) { if ( instance ) d->m_instance = instance; else - d->m_instance = KGlobal::instance(); + d->m_instance = TDEGlobal::instance(); } -KInstance *KActionCollection::instance() const +TDEInstance *TDEActionCollection::instance() const { return d->m_instance; } -void KActionCollection::setXMLFile( const TQString& sXMLFile ) +void TDEActionCollection::setXMLFile( const TQString& sXMLFile ) { d->m_sXMLFile = sXMLFile; } -const TQString& KActionCollection::xmlFile() const +const TQString& TDEActionCollection::xmlFile() const { return d->m_sXMLFile; } -void KActionCollection::setHighlightingEnabled( bool enable ) +void TDEActionCollection::setHighlightingEnabled( bool enable ) { d->m_highlight = enable; } -bool KActionCollection::highlightingEnabled() const +bool TDEActionCollection::highlightingEnabled() const { return d->m_highlight; } -void KActionCollection::connectHighlight( TQWidget *container, KAction *action ) +void TDEActionCollection::connectHighlight( TQWidget *container, TDEAction *action ) { if ( !d->m_highlight ) return; - TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; + TQPtrList<TDEAction> *actionList = d->m_dctHighlightContainers[ container ]; if ( !actionList ) { - actionList = new TQPtrList<KAction>; + actionList = new TQPtrList<TDEAction>; if ( ::tqqt_cast<TQPopupMenu *>( container ) ) { @@ -508,7 +508,7 @@ void KActionCollection::connectHighlight( TQWidget *container, KAction *action ) connect( container, TQT_SIGNAL( aboutToHide() ), this, TQT_SLOT( slotMenuAboutToHide() ) ); } - else if ( ::tqqt_cast<KToolBar *>( container ) ) + else if ( ::tqqt_cast<TDEToolBar *>( container ) ) { connect( container, TQT_SIGNAL( highlighted( int, bool ) ), this, TQT_SLOT( slotToolBarButtonHighlighted( int, bool ) ) ); @@ -523,12 +523,12 @@ void KActionCollection::connectHighlight( TQWidget *container, KAction *action ) actionList->append( action ); } -void KActionCollection::disconnectHighlight( TQWidget *container, KAction *action ) +void TDEActionCollection::disconnectHighlight( TQWidget *container, TDEAction *action ) { if ( !d->m_highlight ) return; - TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; + TQPtrList<TDEAction> *actionList = d->m_dctHighlightContainers[ container ]; if ( !actionList ) return; @@ -539,7 +539,7 @@ void KActionCollection::disconnectHighlight( TQWidget *container, KAction *actio d->m_dctHighlightContainers.remove( container ); } -void KActionCollection::slotMenuItemHighlighted( int id ) +void TDEActionCollection::slotMenuItemHighlighted( int id ) { if ( !d->m_highlight ) return; @@ -565,7 +565,7 @@ void KActionCollection::slotMenuItemHighlighted( int id ) emit actionStatusText( d->m_currentHighlightAction->toolTip() ); } -void KActionCollection::slotMenuAboutToHide() +void TDEActionCollection::slotMenuAboutToHide() { if ( d->m_currentHighlightAction ) emit actionHighlighted( d->m_currentHighlightAction, false ); @@ -576,14 +576,14 @@ void KActionCollection::slotMenuAboutToHide() d->m_statusCleared = true; } -void KActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) +void TDEActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) { if ( !d->m_highlight ) return; TQWidget *container = const_cast<TQWidget*>(TQT_TQWIDGET_CONST( sender() )); - KAction *action = findAction( container, id ); + TDEAction *action = findAction( container, id ); if ( !action ) { @@ -604,19 +604,19 @@ void KActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) } } -void KActionCollection::slotDestroyed() +void TDEActionCollection::slotDestroyed() { d->m_dctHighlightContainers.remove( reinterpret_cast<void *>( const_cast<TQObject*>(TQT_TQOBJECT_CONST(sender())) ) ); } -KAction *KActionCollection::findAction( TQWidget *container, int id ) +TDEAction *TDEActionCollection::findAction( TQWidget *container, int id ) { - TQPtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ]; + TQPtrList<TDEAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ]; if ( !actionList ) return 0; - TQPtrListIterator<KAction> it( *actionList ); + TQPtrListIterator<TDEAction> it( *actionList ); for (; it.current(); ++it ) if ( it.current()->isPlugged( container, id ) ) return it.current(); @@ -624,45 +624,45 @@ KAction *KActionCollection::findAction( TQWidget *container, int id ) return 0; } -const KXMLGUIClient *KActionCollection::parentGUIClient() const +const KXMLGUIClient *TDEActionCollection::parentGUIClient() const { return d->m_parentGUIClient; } #ifndef KDE_NO_COMPAT // KDE 4: remove -KActionCollection KActionCollection::operator+(const KActionCollection &c ) const +TDEActionCollection TDEActionCollection::operator+(const TDEActionCollection &c ) const { - kdWarning(129) << "KActionCollection::operator+(): function is severely deprecated." << endl; - KActionCollection ret( *this ); + kdWarning(129) << "TDEActionCollection::operator+(): function is severely deprecated." << endl; + TDEActionCollection ret( *this ); - TQValueList<KAction *> actions = c.actions(); - TQValueList<KAction *>::ConstIterator it = actions.begin(); - TQValueList<KAction *>::ConstIterator end = actions.end(); + TQValueList<TDEAction *> actions = c.actions(); + TQValueList<TDEAction *>::ConstIterator it = actions.begin(); + TQValueList<TDEAction *>::ConstIterator end = actions.end(); for (; it != end; ++it ) ret.insert( *it ); return ret; } -KActionCollection &KActionCollection::operator=( const KActionCollection © ) +TDEActionCollection &TDEActionCollection::operator=( const TDEActionCollection © ) { - kdWarning(129) << "KActionCollection::operator=(): function is severely deprecated." << endl; - //d->m_bOneKAccelOnly = copy.d->m_bOneKAccelOnly; + kdWarning(129) << "TDEActionCollection::operator=(): function is severely deprecated." << endl; + //d->m_bOneTDEAccelOnly = copy.d->m_bOneTDEAccelOnly; //d->m_iWidgetCurrent = copy.d->m_iWidgetCurrent; //d->m_widgetList = copy.d->m_widgetList; - //d->m_kaccelList = copy.d->m_kaccelList; + //d->m_tdeaccelList = copy.d->m_tdeaccelList; d->m_widget = copy.d->m_widget; - d->m_kaccel = copy.d->m_kaccel; + d->m_tdeaccel = copy.d->m_tdeaccel; d->m_actionDict = copy.d->m_actionDict; setInstance( copy.instance() ); return *this; } -KActionCollection &KActionCollection::operator+=( const KActionCollection &c ) +TDEActionCollection &TDEActionCollection::operator+=( const TDEActionCollection &c ) { - kdWarning(129) << "KActionCollection::operator+=(): function is severely deprecated." << endl; - TQAsciiDictIterator<KAction> it(c.d->m_actionDict); + kdWarning(129) << "TDEActionCollection::operator+=(): function is severely deprecated." << endl; + TQAsciiDictIterator<TDEAction> it(c.d->m_actionDict); for ( ; it.current(); ++it ) insert( it.current() ); @@ -671,44 +671,44 @@ KActionCollection &KActionCollection::operator+=( const KActionCollection &c ) #endif // KDE 4: remove end //--------------------------------------------------------------------- -// KActionShortcutList +// TDEActionShortcutList //--------------------------------------------------------------------- -KActionShortcutList::KActionShortcutList( KActionCollection* pColl ) +TDEActionShortcutList::TDEActionShortcutList( TDEActionCollection* pColl ) : m_actions( *pColl ) { } -KActionShortcutList::~KActionShortcutList() +TDEActionShortcutList::~TDEActionShortcutList() { } -uint KActionShortcutList::count() const +uint TDEActionShortcutList::count() const { return m_actions.count(); } -TQString KActionShortcutList::name( uint i ) const +TQString TDEActionShortcutList::name( uint i ) const { return m_actions.action(i)->name(); } -TQString KActionShortcutList::label( uint i ) const +TQString TDEActionShortcutList::label( uint i ) const { return m_actions.action(i)->text(); } -TQString KActionShortcutList::whatsThis( uint i ) const +TQString TDEActionShortcutList::whatsThis( uint i ) const { return m_actions.action(i)->whatsThis(); } -const KShortcut& KActionShortcutList::shortcut( uint i ) const +const TDEShortcut& TDEActionShortcutList::shortcut( uint i ) const { return m_actions.action(i)->shortcut(); } -const KShortcut& KActionShortcutList::shortcutDefault( uint i ) const +const TDEShortcut& TDEActionShortcutList::shortcutDefault( uint i ) const { return m_actions.action(i)->shortcutDefault(); } -bool KActionShortcutList::isConfigurable( uint i ) const +bool TDEActionShortcutList::isConfigurable( uint i ) const { return m_actions.action(i)->isShortcutConfigurable(); } -bool KActionShortcutList::setShortcut( uint i, const KShortcut& cut ) +bool TDEActionShortcutList::setShortcut( uint i, const TDEShortcut& cut ) { return m_actions.action(i)->setShortcut( cut ); } -const KInstance* KActionShortcutList::instance() const +const TDEInstance* TDEActionShortcutList::instance() const { return m_actions.instance(); } -TQVariant KActionShortcutList::getOther( Other, uint ) const +TQVariant TDEActionShortcutList::getOther( Other, uint ) const { return TQVariant(); } -bool KActionShortcutList::setOther( Other, uint, TQVariant ) +bool TDEActionShortcutList::setOther( Other, uint, TQVariant ) { return false; } -const KAction *KActionShortcutList::action( uint i) const +const TDEAction *TDEActionShortcutList::action( uint i) const { return m_actions.action(i); } -bool KActionShortcutList::save() const +bool TDEActionShortcutList::save() const { const KXMLGUIClient* guiClient=m_actions.parentGUIClient(); const TQString xmlFile=guiClient ? guiClient->xmlFile() : m_actions.xmlFile(); - kdDebug(129) << "KActionShortcutList::save(): xmlFile = " << xmlFile << endl; + kdDebug(129) << "TDEActionShortcutList::save(): xmlFile = " << xmlFile << endl; if( m_actions.xmlFile().isEmpty() ) return writeSettings(); @@ -756,47 +756,47 @@ bool KActionShortcutList::save() const } //--------------------------------------------------------------------- -// KActionPtrShortcutList +// TDEActionPtrShortcutList //--------------------------------------------------------------------- -KActionPtrShortcutList::KActionPtrShortcutList( KActionPtrList& list ) +TDEActionPtrShortcutList::TDEActionPtrShortcutList( TDEActionPtrList& list ) : m_actions( list ) { } -KActionPtrShortcutList::~KActionPtrShortcutList() +TDEActionPtrShortcutList::~TDEActionPtrShortcutList() { } -uint KActionPtrShortcutList::count() const +uint TDEActionPtrShortcutList::count() const { return m_actions.count(); } -TQString KActionPtrShortcutList::name( uint i ) const +TQString TDEActionPtrShortcutList::name( uint i ) const { return m_actions[i]->name(); } -TQString KActionPtrShortcutList::label( uint i ) const +TQString TDEActionPtrShortcutList::label( uint i ) const { return m_actions[i]->text(); } -TQString KActionPtrShortcutList::whatsThis( uint i ) const +TQString TDEActionPtrShortcutList::whatsThis( uint i ) const { return m_actions[i]->whatsThis(); } -const KShortcut& KActionPtrShortcutList::shortcut( uint i ) const +const TDEShortcut& TDEActionPtrShortcutList::shortcut( uint i ) const { return m_actions[i]->shortcut(); } -const KShortcut& KActionPtrShortcutList::shortcutDefault( uint i ) const +const TDEShortcut& TDEActionPtrShortcutList::shortcutDefault( uint i ) const { return m_actions[i]->shortcutDefault(); } -bool KActionPtrShortcutList::isConfigurable( uint i ) const +bool TDEActionPtrShortcutList::isConfigurable( uint i ) const { return m_actions[i]->isShortcutConfigurable(); } -bool KActionPtrShortcutList::setShortcut( uint i, const KShortcut& cut ) +bool TDEActionPtrShortcutList::setShortcut( uint i, const TDEShortcut& cut ) { return m_actions[i]->setShortcut( cut ); } -TQVariant KActionPtrShortcutList::getOther( Other, uint ) const +TQVariant TDEActionPtrShortcutList::getOther( Other, uint ) const { return TQVariant(); } -bool KActionPtrShortcutList::setOther( Other, uint, TQVariant ) +bool TDEActionPtrShortcutList::setOther( Other, uint, TQVariant ) { return false; } -bool KActionPtrShortcutList::save() const +bool TDEActionPtrShortcutList::save() const { return false; } -void KActionShortcutList::virtual_hook( int id, void* data ) -{ KShortcutList::virtual_hook( id, data ); } +void TDEActionShortcutList::virtual_hook( int id, void* data ) +{ TDEShortcutList::virtual_hook( id, data ); } -void KActionPtrShortcutList::virtual_hook( int id, void* data ) -{ KShortcutList::virtual_hook( id, data ); } +void TDEActionPtrShortcutList::virtual_hook( int id, void* data ) +{ TDEShortcutList::virtual_hook( id, data ); } -void KActionCollection::virtual_hook( int, void* ) +void TDEActionCollection::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } /* vim: et sw=2 ts=2 */ -#include "kactioncollection.moc" +#include "tdeactioncollection.moc" diff --git a/tdeui/kactioncollection.h b/tdeui/tdeactioncollection.h index 8111effaf..ae6fd6575 100644 --- a/tdeui/kactioncollection.h +++ b/tdeui/tdeactioncollection.h @@ -22,17 +22,17 @@ Boston, MA 02110-1301, USA. */ -#ifndef __kactioncollection_h__ -#define __kactioncollection_h__ +#ifndef __tdeactioncollection_h__ +#define __tdeactioncollection_h__ -#include <kaction.h> +#include <tdeaction.h> #include <tqkeysequence.h> #include <tqobject.h> #include <tqvaluelist.h> #include <tqguardedptr.h> #include <kguiitem.h> -#include <kshortcut.h> +#include <tdeshortcut.h> #include <kstdaction.h> #include <kicontheme.h> @@ -42,29 +42,29 @@ class TQComboBox; class TQPoint; class TQIconSet; class TQString; -class KToolBar; +class TDEToolBar; -class KAccel; -class KAccelActions; -class KConfig; -class KConfigBase; +class TDEAccel; +class TDEAccelActions; +class TDEConfig; +class TDEConfigBase; class KURL; -class KInstance; -class KToolBar; -class KActionCollection; -class KPopupMenu; -class KMainWindow; +class TDEInstance; +class TDEToolBar; +class TDEActionCollection; +class TDEPopupMenu; +class TDEMainWindow; class KXMLGUIClient; -typedef TQValueList<KAction *> KActionPtrList; +typedef TQValueList<TDEAction *> TDEActionPtrList; /** - * A managed set of KAction objects. + * A managed set of TDEAction objects. * - * If you set the tooltips on KActions and want the tooltip to show in statusbar + * If you set the tooltips on TDEActions and want the tooltip to show in statusbar * (recommended) then you will need to connect a couple of the actionclass signals * to the toolbar. - * The easiest way of doing this is in your KMainWindow subclass, where you create + * The easiest way of doing this is in your TDEMainWindow subclass, where you create * a statusbar, do: * * \code @@ -75,25 +75,25 @@ typedef TQValueList<KAction *> KActionPtrList; * statusBar(), TQT_SLOT( clear() ) ); * \endcode */ -class TDEUI_EXPORT KActionCollection : public TQObject +class TDEUI_EXPORT TDEActionCollection : public TQObject { - friend class KAction; + friend class TDEAction; friend class KXMLGUIClient; Q_OBJECT public: - KActionCollection( TQWidget *parent, const char *name = 0, KInstance *instance = 0 ); + TDEActionCollection( TQWidget *parent, const char *name = 0, TDEInstance *instance = 0 ); /** * Use this constructor if you want the collection's actions to restrict * their accelerator keys to @p watch rather than the @p parent. If * you don't require shortcuts, you can pass a null to the @p watch parameter. */ - KActionCollection( TQWidget *watch, TQObject* parent, const char *name = 0, KInstance *instance = 0 ); + TDEActionCollection( TQWidget *watch, TQObject* parent, const char *name = 0, TDEInstance *instance = 0 ); #ifndef KDE_NO_COMPAT - KActionCollection( const KActionCollection © ); + TDEActionCollection( const TDEActionCollection © ); #endif - virtual ~KActionCollection(); + virtual ~TDEActionCollection(); /** * This sets the widget to which the keyboard shortcuts should be attached. @@ -124,82 +124,82 @@ public: * would have been ScopeWidget, but that would cause some backwards * compatibility problems. */ - //void setDefaultScope( KAction::Scope ); + //void setDefaultScope( TDEAction::Scope ); /** * Doc/View model. This lets you add the action collection of a document * to a view's action collection. */ - bool addDocCollection( KActionCollection* pDoc ); + bool addDocCollection( TDEActionCollection* pDoc ); /** Returns the number of widgets which this collection is associated with. */ //uint widgetCount() const; /** - * Returns true if the collection has its own KAccel object. This will be + * Returns true if the collection has its own TDEAccel object. This will be * the case if it was constructed with a valid widget ptr or if setWidget() * was called. */ - //bool ownsKAccel() const; + //bool ownsTDEAccel() const; - /** @deprecated Deprecated because of ambiguous name. Use kaccel() */ - virtual KAccel* accel() KDE_DEPRECATED; - /** @deprecated Deprecated because of ambiguous name. Use kaccel() */ - virtual const KAccel* accel() const KDE_DEPRECATED; + /** @deprecated Deprecated because of ambiguous name. Use tdeaccel() */ + virtual TDEAccel* accel() KDE_DEPRECATED; + /** @deprecated Deprecated because of ambiguous name. Use tdeaccel() */ + virtual const TDEAccel* accel() const KDE_DEPRECATED; - /** Returns the KAccel object of the most recently set widget. */ - KAccel* kaccel(); - /** Returns the KAccel object of the most recently set widget. Const version for convenience. */ - const KAccel* kaccel() const; + /** Returns the TDEAccel object of the most recently set widget. */ + TDEAccel* tdeaccel(); + /** Returns the TDEAccel object of the most recently set widget. Const version for convenience. */ + const TDEAccel* tdeaccel() const; - /** @internal, for KAction::kaccelCurrent() */ - KAccel* builderKAccel() const; - /** Returns the KAccel object associated with widget #. */ - //KAccel* widgetKAccel( uint i ); - //const KAccel* widgetKAccel( uint i ) const; + /** @internal, for TDEAction::tdeaccelCurrent() */ + TDEAccel* builderTDEAccel() const; + /** Returns the TDEAccel object associated with widget #. */ + //TDEAccel* widgetTDEAccel( uint i ); + //const TDEAccel* widgetTDEAccel( uint i ) const; /** Returns the number of actions in the collection */ virtual uint count() const; bool isEmpty() const { return (count() == 0); } /** - * Return the KAction* at position "index" in the action collection. + * Return the TDEAction* at position "index" in the action collection. * @see count() */ - virtual KAction* action( int index ) const; + virtual TDEAction* action( int index ) const; /** - * Find an action (optionally, of a given subclass of KAction) in the action collection. - * @param name Name of the KAction. - * @param classname Name of the KAction subclass. - * @return A pointer to the first KAction in the collection which matches the parameters or + * Find an action (optionally, of a given subclass of TDEAction) in the action collection. + * @param name Name of the TDEAction. + * @param classname Name of the TDEAction subclass. + * @return A pointer to the first TDEAction in the collection which matches the parameters or * null if nothing matches. */ - virtual KAction* action( const char* name, const char* classname = 0 ) const; + virtual TDEAction* action( const char* name, const char* classname = 0 ) const; - /** Returns a list of all the groups of all the KActions in this action collection. - * @see KAction::group() - * @see KAction::setGroup() + /** Returns a list of all the groups of all the TDEActions in this action collection. + * @see TDEAction::group() + * @see TDEAction::setGroup() */ virtual TQStringList groups() const; /** * Returns the list of actions in a particular group managed by this action collection. * @param group The name of the group. */ - virtual KActionPtrList actions( const TQString& group ) const; + virtual TDEActionPtrList actions( const TQString& group ) const; /** Returns the list of actions managed by this action collection. */ - virtual KActionPtrList actions() const; + virtual TDEActionPtrList actions() const; /** * Used for reading shortcut configuration from a non-XML rc file. */ - bool readShortcutSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 ); + bool readShortcutSettings( const TQString& sConfigGroup = TQString::null, TDEConfigBase* pConfig = 0 ); /** * Used for writing shortcut configuration to a non-XML rc file. */ - bool writeShortcutSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 ) const; + bool writeShortcutSettings( const TQString& sConfigGroup = TQString::null, TDEConfigBase* pConfig = 0 ) const; - void setInstance( KInstance *instance ); + void setInstance( TDEInstance *instance ); /** The instance with which this class is associated. */ - KInstance *instance() const; + TDEInstance *instance() const; /** * @deprecated @@ -212,7 +212,7 @@ public: //TODO FOR KDE4 make this default true /** - * Enable highlighting notification for specific KActions. + * Enable highlighting notification for specific TDEActions. * This is false by default, so, by default, the highlighting * signals will not be emitted. * @@ -234,11 +234,11 @@ public: bool highlightingEnabled() const; /** - * Call this function if you want to receive a signal whenever a KAction is highlighted in a menu or a toolbar. + * Call this function if you want to receive a signal whenever a TDEAction is highlighted in a menu or a toolbar. * This is only needed if you do not add this action to this container. * You will generally not need to call this function. * - * @param container A container in which the KAction is plugged (must inherit TQPopupMenu or KToolBar) + * @param container A container in which the TDEAction is plugged (must inherit TQPopupMenu or TDEToolBar) * @param action The action you are interested in * @see disconnectHighlight() * @see actionHighlighted() @@ -246,13 +246,13 @@ public: * @see highlightingEnabled() * @see actionHighlighted() */ - void connectHighlight( TQWidget *container, KAction *action ); + void connectHighlight( TQWidget *container, TDEAction *action ); /** * Disconnect highlight notifications for a particular pair of contianer and action. * This is only needed if you do not add this action to this container. * You will generally not need to call this function. * - * @param container A container in which the KAction is plugged (must inherit TQPopupMenu or KToolBar) + * @param container A container in which the TDEAction is plugged (must inherit TQPopupMenu or TDEToolBar) * @param action The action you are interested in * @see connectHighlight() * @see actionHighlighted() @@ -260,7 +260,7 @@ public: * @see highlightingEnabled() * @see actionHighlighted() */ - void disconnectHighlight( TQWidget *container, KAction *action ); + void disconnectHighlight( TQWidget *container, TDEAction *action ); /** * The parent KXMLGUIClient, return 0L if not available. @@ -268,8 +268,8 @@ public: const KXMLGUIClient *parentGUIClient() const; signals: - void inserted( KAction* ); - void removed( KAction* ); + void inserted( TDEAction* ); + void removed( TDEAction* ); /** Emitted when @p action is highlighted. * This is only emitted if you have setHighlightingEnabled() @@ -279,7 +279,7 @@ signals: * @see setHighlightingEnabled() * @see highlightingEnabled() */ - void actionHighlighted( KAction *action ); + void actionHighlighted( TDEAction *action ); /** Emitted when @p action is highlighed or loses highlighting. * This is only emitted if you have setHighlightingEnabled() * @see connectHighlight() @@ -288,7 +288,7 @@ signals: * @see setHighlightingEnabled() * @see highlightingEnabled() */ - void actionHighlighted( KAction *action, bool highlight ); + void actionHighlighted( TDEAction *action, bool highlight ); /** Emitted when an action is highlighted, with text * being the tooltip for the action. * This is only emitted if you have setHighlightingEnabled() @@ -309,7 +309,7 @@ signals: private: /** * @internal Only to be called by KXMLGUIFactory::addClient(). - * When actions are being connected, KAction needs to know what + * When actions are being connected, TDEAction needs to know what * widget it should connect widget-scope actions to, and what * main window it should connect */ @@ -317,12 +317,12 @@ private: void endXMLPlug(); /** @internal. Only to be called by KXMLGUIFactory::removeClient() */ void prepareXMLUnplug(); - void unplugShortcuts( KAccel* kaccel ); + void unplugShortcuts( TDEAccel* tdeaccel ); void _clear(); - void _insert( KAction* ); - void _remove( KAction* ); - KAction* _take( KAction* ); + void _insert( TDEAction* ); + void _remove( TDEAction* ); + TDEAction* _take( TDEAction* ); private slots: void slotMenuItemHighlighted( int id ); @@ -331,11 +331,11 @@ private slots: void slotDestroyed(); private: - KAction *findAction( TQWidget *container, int id ); + TDEAction *findAction( TQWidget *container, int id ); #ifndef KDE_NO_COMPAT public: - KActionCollection( TQObject *parent, const char *name = 0, KInstance *instance = 0 ); + TDEActionCollection( TQObject *parent, const char *name = 0, TDEInstance *instance = 0 ); #endif public: @@ -344,34 +344,34 @@ public: * Generally you don't have to call this. The action inserts itself automatically * into its parent collection. This can be useful however for a short-lived * collection (e.g. for a popupmenu, where the signals from the collection are needed too). - * (don't forget that in the simple case, a list of actions should be a simple KActionPtrList). + * (don't forget that in the simple case, a list of actions should be a simple TDEActionPtrList). * If you manually insert actions into a 2nd collection, don't forget to take them out * again before destroying the collection. - * @param action The KAction to add. + * @param action The TDEAction to add. */ - void insert( KAction* action); + void insert( TDEAction* action); /** * Removes an action from the collection and deletes it. - * Since the KAction destructor removes the action from the collection, you generally + * Since the TDEAction destructor removes the action from the collection, you generally * don't have to call this. - * @param action The KAction to remove. + * @param action The TDEAction to remove. */ - void remove( KAction* action ); + void remove( TDEAction* action ); /** * Removes an action from the collection. - * Since the KAction destructor removes the action from the collection, you generally + * Since the TDEAction destructor removes the action from the collection, you generally * don't have to call this. * @return NULL if not found else returns action. - * @param action the KAction to remove. + * @param action the TDEAction to remove. */ - KAction* take( KAction* action ); + TDEAction* take( TDEAction* action ); #ifndef KDE_NO_COMPAT - KActionCollection operator+ ( const KActionCollection& ) const; - KActionCollection& operator= ( const KActionCollection& ); - KActionCollection& operator+= ( const KActionCollection& ); + TDEActionCollection operator+ ( const TDEActionCollection& ) const; + TDEActionCollection& operator= ( const TDEActionCollection& ); + TDEActionCollection& operator+= ( const TDEActionCollection& ); #endif // !KDE_NO_COMPAT // KDE4: clear() doesn't need to be a slot @@ -385,9 +385,9 @@ public slots: protected: virtual void virtual_hook( int id, void* data ); private: - KActionCollection( const char* name, const KXMLGUIClient* parent ); - class KActionCollectionPrivate; - KActionCollectionPrivate *d; + TDEActionCollection( const char* name, const KXMLGUIClient* parent ); + class TDEActionCollectionPrivate; + TDEActionCollectionPrivate *d; }; #endif diff --git a/tdeui/kactionselector.cpp b/tdeui/tdeactionselector.cpp index 8923cbd4f..c3c7329b8 100644 --- a/tdeui/kactionselector.cpp +++ b/tdeui/tdeactionselector.cpp @@ -17,9 +17,9 @@ */ -#include "kactionselector.h" +#include "tdeactionselector.h" -#include <klocale.h> +#include <tdelocale.h> #include <kiconloader.h> #include <kdialog.h> // for spacingHint() #include <kdebug.h> @@ -31,24 +31,24 @@ #include <tqevent.h> #include <tqwhatsthis.h> -class KActionSelectorPrivate { +class TDEActionSelectorPrivate { public: TQListBox *availableListBox, *selectedListBox; TQToolButton *btnAdd, *btnRemove, *btnUp, *btnDown; TQLabel *lAvailable, *lSelected; bool moveOnDoubleClick, keyboardEnabled; - KActionSelector::ButtonIconSize iconSize; + TDEActionSelector::ButtonIconSize iconSize; TQString addIcon, removeIcon, upIcon, downIcon; - KActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy; + TDEActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy; bool showUpDownButtons; }; //BEGIN Constructor/destructor -KActionSelector::KActionSelector( TQWidget *parent, const char *name ) +TDEActionSelector::TDEActionSelector( TQWidget *parent, const char *name ) : TQWidget( parent, name ) { - d = new KActionSelectorPrivate(); + d = new TDEActionSelectorPrivate(); d->moveOnDoubleClick = true; d->keyboardEnabled = true; d->iconSize = SmallIcon; @@ -60,7 +60,7 @@ KActionSelector::KActionSelector( TQWidget *parent, const char *name ) d->selectedInsertionPolicy = BelowCurrent; d->showUpDownButtons = true; - //int isz = IconSize( KIcon::Small ); + //int isz = IconSize( TDEIcon::Small ); TQHBoxLayout *lo = new TQHBoxLayout( this ); lo->setSpacing( KDialog::spacingHint() ); @@ -116,7 +116,7 @@ KActionSelector::KActionSelector( TQWidget *parent, const char *name ) d->selectedListBox->installEventFilter( this ); } -KActionSelector::~KActionSelector() +TDEActionSelector::~TDEActionSelector() { delete d; } @@ -125,17 +125,17 @@ KActionSelector::~KActionSelector() //BEGIN Public Methods -TQListBox *KActionSelector::availableListBox() const +TQListBox *TDEActionSelector::availableListBox() const { return d->availableListBox; } -TQListBox *KActionSelector::selectedListBox() const +TQListBox *TDEActionSelector::selectedListBox() const { return d->selectedListBox; } -void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) +void TDEActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) { switch ( button ) { @@ -156,11 +156,11 @@ void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) d->btnDown->setIconSet( SmallIconSet( icon, d->iconSize ) ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonIcon: DAINBREAD!"<<endl; + kdDebug(13001)<<"TDEActionSelector::setButtonIcon: DAINBREAD!"<<endl; } } -void KActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton button ) +void TDEActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton button ) { switch ( button ) { @@ -177,11 +177,11 @@ void KActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton but d->btnDown->setIconSet( iconset ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonIconSet: DAINBREAD!"<<endl; + kdDebug(13001)<<"TDEActionSelector::setButtonIconSet: DAINBREAD!"<<endl; } } -void KActionSelector::setButtonTooltip( const TQString &tip, MoveButton button ) +void TDEActionSelector::setButtonTooltip( const TQString &tip, MoveButton button ) { switch ( button ) { @@ -198,11 +198,11 @@ void KActionSelector::setButtonTooltip( const TQString &tip, MoveButton button ) d->btnDown->setTextLabel( tip ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonToolTip: DAINBREAD!"<<endl; + kdDebug(13001)<<"TDEActionSelector::setButtonToolTip: DAINBREAD!"<<endl; } } -void KActionSelector::setButtonWhatsThis( const TQString &text, MoveButton button ) +void TDEActionSelector::setButtonWhatsThis( const TQString &text, MoveButton button ) { switch ( button ) { @@ -219,11 +219,11 @@ void KActionSelector::setButtonWhatsThis( const TQString &text, MoveButton butto TQWhatsThis::add( d->btnDown, text ); break; default: - kdDebug(13001)<<"KActionSelector::setButtonWhatsThis: DAINBREAD!"<<endl; + kdDebug(13001)<<"TDEActionSelector::setButtonWhatsThis: DAINBREAD!"<<endl; } } -void KActionSelector::setButtonsEnabled() +void TDEActionSelector::setButtonsEnabled() { d->btnAdd->setEnabled( d->availableListBox->currentItem() > -1 ); d->btnRemove->setEnabled( d->selectedListBox->currentItem() > -1 ); @@ -236,84 +236,84 @@ void KActionSelector::setButtonsEnabled() //BEGIN Properties -bool KActionSelector::moveOnDoubleClick() const +bool TDEActionSelector::moveOnDoubleClick() const { return d->moveOnDoubleClick; } -void KActionSelector::setMoveOnDoubleClick( bool b ) +void TDEActionSelector::setMoveOnDoubleClick( bool b ) { d->moveOnDoubleClick = b; } -bool KActionSelector::keyboardEnabled() const +bool TDEActionSelector::keyboardEnabled() const { return d->keyboardEnabled; } -void KActionSelector::setKeyboardEnabled( bool b ) +void TDEActionSelector::setKeyboardEnabled( bool b ) { d->keyboardEnabled = b; } -TQString KActionSelector::availableLabel() const +TQString TDEActionSelector::availableLabel() const { return d->lAvailable->text(); } -void KActionSelector::setAvailableLabel( const TQString &text ) +void TDEActionSelector::setAvailableLabel( const TQString &text ) { d->lAvailable->setText( text ); } -TQString KActionSelector::selectedLabel() const +TQString TDEActionSelector::selectedLabel() const { return d->lSelected->text(); } -void KActionSelector::setSelectedLabel( const TQString &text ) +void TDEActionSelector::setSelectedLabel( const TQString &text ) { d->lSelected->setText( text ); } -KActionSelector::ButtonIconSize KActionSelector::buttonIconSize() const +TDEActionSelector::ButtonIconSize TDEActionSelector::buttonIconSize() const { return d->iconSize; } -void KActionSelector::setButtonIconSize( ButtonIconSize size ) +void TDEActionSelector::setButtonIconSize( ButtonIconSize size ) { d->iconSize = size; // reload icons loadIcons(); } -KActionSelector::InsertionPolicy KActionSelector::availableInsertionPolicy() const +TDEActionSelector::InsertionPolicy TDEActionSelector::availableInsertionPolicy() const { return d->availableInsertionPolicy; } -void KActionSelector::setAvailableInsertionPolicy( InsertionPolicy p ) +void TDEActionSelector::setAvailableInsertionPolicy( InsertionPolicy p ) { d->availableInsertionPolicy = p; } -KActionSelector::InsertionPolicy KActionSelector::selectedInsertionPolicy() const +TDEActionSelector::InsertionPolicy TDEActionSelector::selectedInsertionPolicy() const { return d->selectedInsertionPolicy; } -void KActionSelector::setSelectedInsertionPolicy( InsertionPolicy p ) +void TDEActionSelector::setSelectedInsertionPolicy( InsertionPolicy p ) { d->selectedInsertionPolicy = p; } -bool KActionSelector::showUpDownButtons() const +bool TDEActionSelector::showUpDownButtons() const { return d->showUpDownButtons; } -void KActionSelector::setShowUpDownButtons( bool show ) +void TDEActionSelector::setShowUpDownButtons( bool show ) { d->showUpDownButtons = show; if ( show ) @@ -332,7 +332,7 @@ void KActionSelector::setShowUpDownButtons( bool show ) //BEGIN Public Slots -void KActionSelector::polish() +void TDEActionSelector::polish() { setButtonsEnabled(); } @@ -340,7 +340,7 @@ void KActionSelector::polish() //END Public Slots //BEGIN Protected -void KActionSelector::keyPressEvent( TQKeyEvent *e ) +void TDEActionSelector::keyPressEvent( TQKeyEvent *e ) { if ( ! d->keyboardEnabled ) return; if ( (e->state() & TQt::ControlButton) ) @@ -366,7 +366,7 @@ void KActionSelector::keyPressEvent( TQKeyEvent *e ) } } -bool KActionSelector::eventFilter( TQObject *o, TQEvent *e ) +bool TDEActionSelector::eventFilter( TQObject *o, TQEvent *e ) { if ( d->keyboardEnabled && e->type() == TQEvent::KeyPress ) { @@ -413,7 +413,7 @@ bool KActionSelector::eventFilter( TQObject *o, TQEvent *e ) //BEGIN Private Slots -void KActionSelector::buttonAddClicked() +void TDEActionSelector::buttonAddClicked() { // move all selected items from available to selected listbox TQListBoxItem *item = d->availableListBox->firstItem(); @@ -423,15 +423,16 @@ void KActionSelector::buttonAddClicked() d->selectedListBox->insertItem( item, insertionIndex( d->selectedListBox, d->selectedInsertionPolicy ) ); d->selectedListBox->setCurrentItem( item ); emit added( item ); - } - item = item->next(); + item = d->availableListBox->firstItem(); + } else + item = item->next(); } if ( d->selectedInsertionPolicy == Sorted ) d->selectedListBox->sort(); d->selectedListBox->setFocus(); } -void KActionSelector::buttonRemoveClicked() +void TDEActionSelector::buttonRemoveClicked() { // move all selected items from selected to available listbox TQListBoxItem *item = d->selectedListBox->firstItem(); @@ -441,15 +442,16 @@ void KActionSelector::buttonRemoveClicked() d->availableListBox->insertItem( item, insertionIndex( d->availableListBox, d->availableInsertionPolicy ) ); d->availableListBox->setCurrentItem( item ); emit removed( item ); - } - item = item->next(); + item = d->selectedListBox->firstItem(); + } else + item = item->next(); } if ( d->availableInsertionPolicy == Sorted ) d->availableListBox->sort(); d->availableListBox->setFocus(); } -void KActionSelector::buttonUpClicked() +void TDEActionSelector::buttonUpClicked() { int c = d->selectedListBox->currentItem(); if ( c < 1 ) return; @@ -460,7 +462,7 @@ void KActionSelector::buttonUpClicked() emit movedUp( item ); } -void KActionSelector::buttonDownClicked() +void TDEActionSelector::buttonDownClicked() { int c = d->selectedListBox->currentItem(); if ( c < 0 || c == int( d->selectedListBox->count() ) - 1 ) return; @@ -471,7 +473,7 @@ void KActionSelector::buttonDownClicked() emit movedDown( item ); } -void KActionSelector::itemDoubleClicked( TQListBoxItem *item ) +void TDEActionSelector::itemDoubleClicked( TQListBoxItem *item ) { if ( d->moveOnDoubleClick ) moveItem( item ); @@ -481,7 +483,7 @@ void KActionSelector::itemDoubleClicked( TQListBoxItem *item ) //BEGIN Private Methods -void KActionSelector::loadIcons() +void TDEActionSelector::loadIcons() { d->btnAdd->setIconSet( SmallIconSet( d->addIcon, d->iconSize ) ); d->btnRemove->setIconSet( SmallIconSet( d->removeIcon, d->iconSize ) ); @@ -489,7 +491,7 @@ void KActionSelector::loadIcons() d->btnDown->setIconSet( SmallIconSet( d->downIcon, d->iconSize ) ); } -void KActionSelector::moveItem( TQListBoxItem *item ) +void TDEActionSelector::moveItem( TQListBoxItem *item ) { TQListBox *lbFrom = item->listBox(); TQListBox *lbTo; @@ -516,7 +518,7 @@ void KActionSelector::moveItem( TQListBoxItem *item ) emit removed( item ); } -int KActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy ) +int TDEActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy ) { int index; switch ( policy ) @@ -535,4 +537,4 @@ int KActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy ) } //END Private Methods -#include "kactionselector.moc" +#include "tdeactionselector.moc" diff --git a/tdeui/kactionselector.h b/tdeui/tdeactionselector.h index 5ac58b0ed..fb382e58e 100644 --- a/tdeui/kactionselector.h +++ b/tdeui/tdeactionselector.h @@ -29,7 +29,7 @@ class TQKeyEvent; class TQEvent; class TQIconSet; -class KActionSelectorPrivate; +class TDEActionSelectorPrivate; /** @short A widget for selecting and arranging actions/objects @@ -76,7 +76,7 @@ class KActionSelectorPrivate; @author Anders Lund <anders@alweb.dk> */ -class TDEUI_EXPORT KActionSelector : public TQWidget { +class TDEUI_EXPORT TDEActionSelector : public TQWidget { Q_OBJECT TQ_ENUMS( ButtonIconSize InsertionPolicy ) TQ_PROPERTY( bool moveOnDoubleClick READ moveOnDoubleClick WRITE setMoveOnDoubleClick ) @@ -89,8 +89,8 @@ class TDEUI_EXPORT KActionSelector : public TQWidget { TQ_PROPERTY( bool showUpDownButtons READ showUpDownButtons WRITE setShowUpDownButtons ) public: - KActionSelector( TQWidget *parent=0, const char *name=0 ); - ~KActionSelector(); + TDEActionSelector( TQWidget *parent=0, const char *name=0 ); + ~TDEActionSelector(); /** @return The TQListBox holding the available actions @@ -115,7 +115,7 @@ public: /** This enum identifies the icon sizes, used for the move buttons. The values correspond to the following pixel sizes: - @li SmallIcon - the return value of IconSize( KIcon::Small ), the user defined size + @li SmallIcon - the return value of IconSize( TDEIcon::Small ), the user defined size of a small icon in KDE. This is the default setting. @li Small - 16px @li Medium - 22px @@ -274,7 +274,7 @@ public: Sets the iconset for button @p button to @p iconset. You can use this method to et a costum icon set. Either created by TQIconSet, or use the application instance of - KIconLoader (recommended). + TDEIconLoader (recommended). */ void setButtonIconSet( const TQIconSet &iconset, MoveButton button ); @@ -396,7 +396,7 @@ private: /** @private Private data storage */ - KActionSelectorPrivate *d; + TDEActionSelectorPrivate *d; }; #endif // _KACTION_SELECTOR_H_ diff --git a/tdeui/kactionshortcutlist.h b/tdeui/tdeactionshortcutlist.h index c61a7e2a8..affb6bf2a 100644 --- a/tdeui/kactionshortcutlist.h +++ b/tdeui/tdeactionshortcutlist.h @@ -1,66 +1,66 @@ #ifndef _KACTIONSHORTCUTLIST_H #define _KACTIONSHORTCUTLIST_H -#include <kshortcutlist.h> -#include <kaction.h> +#include <tdeshortcutlist.h> +#include <tdeaction.h> //--------------------------------------------------------------------- -// class KActionShortcutList +// class TDEActionShortcutList //--------------------------------------------------------------------- -class KAccelShortcutListPrivate; -class TDEUI_EXPORT KActionShortcutList : public KShortcutList +class TDEAccelShortcutListPrivate; +class TDEUI_EXPORT TDEActionShortcutList : public TDEShortcutList { public: - KActionShortcutList( KActionCollection* ); - virtual ~KActionShortcutList(); + TDEActionShortcutList( TDEActionCollection* ); + virtual ~TDEActionShortcutList(); virtual uint count() const; virtual TQString name( uint index ) const; virtual TQString label( uint index ) const; virtual TQString whatsThis( uint index ) const; - virtual const KShortcut& shortcut( uint index ) const; - virtual const KShortcut& shortcutDefault( uint index ) const; + virtual const TDEShortcut& shortcut( uint index ) const; + virtual const TDEShortcut& shortcutDefault( uint index ) const; virtual bool isConfigurable( uint index ) const; - virtual bool setShortcut( uint index, const KShortcut& shortcut ); + virtual bool setShortcut( uint index, const TDEShortcut& shortcut ); - virtual const KInstance* instance() const; + virtual const TDEInstance* instance() const; virtual TQVariant getOther( Other, uint index ) const; virtual bool setOther( Other, uint index, TQVariant ); virtual bool save() const; - const KAction *action( uint ) const; + const TDEAction *action( uint ) const; protected: - KActionCollection& m_actions; + TDEActionCollection& m_actions; protected: virtual void virtual_hook( int id, void* data ); private: - KAccelShortcutListPrivate* d; + TDEAccelShortcutListPrivate* d; }; //--------------------------------------------------------------------- -// class KActionPtrShortcutList +// class TDEActionPtrShortcutList //--------------------------------------------------------------------- -class KAccelShortcutListPrivate; -class TDEUI_EXPORT KActionPtrShortcutList : public KShortcutList +class TDEAccelShortcutListPrivate; +class TDEUI_EXPORT TDEActionPtrShortcutList : public TDEShortcutList { public: - KActionPtrShortcutList( KActionPtrList& ); - virtual ~KActionPtrShortcutList(); + TDEActionPtrShortcutList( TDEActionPtrList& ); + virtual ~TDEActionPtrShortcutList(); virtual uint count() const; virtual TQString name( uint index ) const; virtual TQString label( uint index ) const; virtual TQString whatsThis( uint index ) const; - virtual const KShortcut& shortcut( uint index ) const; - virtual const KShortcut& shortcutDefault( uint index ) const; + virtual const TDEShortcut& shortcut( uint index ) const; + virtual const TDEShortcut& shortcutDefault( uint index ) const; virtual bool isConfigurable( uint index ) const; - virtual bool setShortcut( uint index, const KShortcut& shortcut); + virtual bool setShortcut( uint index, const TDEShortcut& shortcut); virtual TQVariant getOther( Other, uint index ) const; virtual bool setOther( Other, uint index, TQVariant ); @@ -68,12 +68,12 @@ class TDEUI_EXPORT KActionPtrShortcutList : public KShortcutList virtual bool save() const; protected: - KActionPtrList& m_actions; + TDEActionPtrList& m_actions; protected: virtual void virtual_hook( int id, void* data ); private: - KAccelShortcutListPrivate* d; + TDEAccelShortcutListPrivate* d; }; #endif // !_KACTIONSHORTCUTLIST_H diff --git a/tdeui/kcmodule.cpp b/tdeui/tdecmodule.cpp index 7d82d2957..c6b7d3726 100644 --- a/tdeui/kcmodule.cpp +++ b/tdeui/tdecmodule.cpp @@ -23,58 +23,58 @@ #include <tqlayout.h> -#include <kaboutdata.h> -#include <kconfigskeleton.h> -#include <kconfigdialogmanager.h> +#include <tdeaboutdata.h> +#include <tdeconfigskeleton.h> +#include <tdeconfigdialogmanager.h> #include <kdebug.h> -#include <kglobal.h> +#include <tdeglobal.h> #include <kinstance.h> -#include <klocale.h> +#include <tdelocale.h> -#include "kcmodule.h" -#include "kcmodule.moc" +#include "tdecmodule.h" +#include "tdecmodule.moc" -class KCModulePrivate +class TDECModulePrivate { public: - KCModulePrivate(): + TDECModulePrivate(): _about( 0 ), _useRootOnlyMsg( false ), _hasOwnInstance( true ), _unmanagedWidgetChangeState( false ) { } - KInstance *_instance; - KAboutData *_about; + TDEInstance *_instance; + TDEAboutData *_about; TQString _rootOnlyMsg; bool _useRootOnlyMsg; bool _hasOwnInstance; - TQPtrList<KConfigDialogManager> managers; + TQPtrList<TDEConfigDialogManager> managers; TQString _quickHelp; // this member is used to record the state on non-automatically - // managed widgets, allowing for mixed KConfigXT-drive and manual + // managed widgets, allowing for mixed TDEConfigXT-drive and manual // widgets to coexist peacefully and do the correct thing with // the changed(bool) signal bool _unmanagedWidgetChangeState; }; -KCModule::KCModule(TQWidget *parent, const char *name, const TQStringList &) +TDECModule::TDECModule(TQWidget *parent, const char *name, const TQStringList &) : TQWidget(parent, name) { init(); if (name && strlen(name)) { - d->_instance = new KInstance(name); - KGlobal::locale()->insertCatalogue(name); + d->_instance = new TDEInstance(name); + TDEGlobal::locale()->insertCatalogue(name); } else - d->_instance = new KInstance("kcmunnamed"); - KGlobal::setActiveInstance(this->instance()); + d->_instance = new TDEInstance("kcmunnamed"); + TDEGlobal::setActiveInstance(this->instance()); d->managers.setAutoDelete( true ); } -KCModule::KCModule(KInstance *instance, TQWidget *parent, const TQStringList & ) +TDECModule::TDECModule(TDEInstance *instance, TQWidget *parent, const TQStringList & ) : TQWidget(parent, instance ? instance->instanceName().data() : 0) { init(); @@ -82,28 +82,28 @@ KCModule::KCModule(KInstance *instance, TQWidget *parent, const TQStringList & ) if (instance) { - KGlobal::locale()->insertCatalogue(instance->instanceName()); + TDEGlobal::locale()->insertCatalogue(instance->instanceName()); } d->_hasOwnInstance = false; - KGlobal::setActiveInstance(this->instance()); + TDEGlobal::setActiveInstance(this->instance()); } -void KCModule::init() +void TDECModule::init() { - d = new KCModulePrivate; + d = new TDECModulePrivate; _btn = Help|Default|Apply; } -KConfigDialogManager* KCModule::addConfig( KConfigSkeleton *config, TQWidget* widget ) +TDEConfigDialogManager* TDECModule::addConfig( TDEConfigSkeleton *config, TQWidget* widget ) { - KConfigDialogManager* manager = new KConfigDialogManager( widget, config, name() ); + TDEConfigDialogManager* manager = new TDEConfigDialogManager( widget, config, name() ); connect( manager, TQT_SIGNAL( widgetModified() ), TQT_SLOT( widgetChanged() )); d->managers.append( manager ); return manager; } -KCModule::~KCModule() +TDECModule::~TDECModule() { if (d->_hasOwnInstance) delete d->_instance; @@ -111,36 +111,36 @@ KCModule::~KCModule() delete d; } -void KCModule::load() +void TDECModule::load() { - KConfigDialogManager* manager; + TDEConfigDialogManager* manager; for( manager = d->managers.first(); manager; manager = d->managers.next() ) manager->updateWidgets(); } -void KCModule::save() +void TDECModule::save() { - KConfigDialogManager* manager; + TDEConfigDialogManager* manager; for( manager = d->managers.first(); manager; manager = d->managers.next() ) manager->updateSettings(); emit( changed( false )); } -void KCModule::defaults() +void TDECModule::defaults() { - KConfigDialogManager* manager; + TDEConfigDialogManager* manager; for( manager = d->managers.first(); manager; manager = d->managers.next() ) manager->updateWidgetsDefault(); } -void KCModule::widgetChanged() +void TDECModule::widgetChanged() { emit changed(d->_unmanagedWidgetChangeState || managedWidgetChangeState()); } -bool KCModule::managedWidgetChangeState() const +bool TDECModule::managedWidgetChangeState() const { - KConfigDialogManager* manager; + TDEConfigDialogManager* manager; for( manager = d->managers.first(); manager; manager = d->managers.next() ) { if ( manager->hasChanged() ) @@ -150,71 +150,71 @@ bool KCModule::managedWidgetChangeState() const return false; } -void KCModule::unmanagedWidgetChangeState(bool changed) +void TDECModule::unmanagedWidgetChangeState(bool changed) { d->_unmanagedWidgetChangeState = changed; widgetChanged(); } -const KAboutData *KCModule::aboutData() const +const TDEAboutData *TDECModule::aboutData() const { return d->_about; } -void KCModule::setAboutData( KAboutData* about ) +void TDECModule::setAboutData( TDEAboutData* about ) { delete d->_about; d->_about = about; } -void KCModule::setRootOnlyMsg(const TQString& msg) +void TDECModule::setRootOnlyMsg(const TQString& msg) { d->_rootOnlyMsg = msg; } -TQString KCModule::rootOnlyMsg() const +TQString TDECModule::rootOnlyMsg() const { return d->_rootOnlyMsg; } -void KCModule::setUseRootOnlyMsg(bool on) +void TDECModule::setUseRootOnlyMsg(bool on) { d->_useRootOnlyMsg = on; } -bool KCModule::useRootOnlyMsg() const +bool TDECModule::useRootOnlyMsg() const { return d->_useRootOnlyMsg; } -void KCModule::changed() +void TDECModule::changed() { emit changed(true); } -KInstance *KCModule::instance() const +TDEInstance *TDECModule::instance() const { return d->_instance; } -void KCModule::setQuickHelp( const TQString& help ) +void TDECModule::setQuickHelp( const TQString& help ) { d->_quickHelp = help; emit( quickHelpChanged() ); } -TQString KCModule::quickHelp() const +TQString TDECModule::quickHelp() const { return d->_quickHelp; } -const TQPtrList<KConfigDialogManager>& KCModule::configs() const +const TQPtrList<TDEConfigDialogManager>& TDECModule::configs() const { return d->managers; } -void KCModule::virtual_hook( int, void* ) +void TDECModule::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } // vim: sw=4 et sts=4 diff --git a/tdeui/kcmodule.h b/tdeui/tdecmodule.h index bba06ae4a..12a10fac9 100644 --- a/tdeui/kcmodule.h +++ b/tdeui/tdecmodule.h @@ -29,11 +29,11 @@ class TQStringList; -class KAboutData; -class KConfigDialogManager; -class KConfigSkeleton; -class KCModulePrivate; -class KInstance; +class TDEAboutData; +class TDEConfigDialogManager; +class TDEConfigSkeleton; +class TDECModulePrivate; +class TDEInstance; /** * The base class for control center modules. @@ -54,8 +54,8 @@ class KInstance; * \code * #include <kgenericfactory.h> * - * typedef KGenericFactory<YourKCModule, TQWidget> YourKCModuleFactory; - * K_EXPORT_COMPONENT_FACTORY( yourLibName, YourKCModuleFactory("name_of_the_po_file") ); + * typedef KGenericFactory<YourTDECModule, TQWidget> YourTDECModuleFactory; + * K_EXPORT_COMPONENT_FACTORY( yourLibName, YourTDECModuleFactory("name_of_the_po_file") ); * \endcode * * The parameter "name_of_the_po_file" has to correspond with the messages target @@ -66,7 +66,7 @@ class KInstance; * * @author Matthias Hoelzer-Kluepfel <hoelzer@kde.org> */ -class TDEUI_EXPORT KCModule : public TQWidget +class TDEUI_EXPORT TDECModule : public TQWidget { Q_OBJECT @@ -76,7 +76,7 @@ public: * An enumeration type for the buttons used by this module. * You should only use Help, Default and Apply. The rest is obsolete. * - * @see KCModule::buttons @see KCModule::setButtons + * @see TDECModule::buttons @see TDECModule::setButtons */ enum Button {Help=1, Default=2, Apply=16, Reset=4, /* obsolete, do not use! */ @@ -89,14 +89,14 @@ public: * Make sure you have a TQStringList argument in your * implementation. */ - KCModule(TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList() ); + TDECModule(TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList() ); - KCModule(KInstance *instance, TQWidget *parent=0, const TQStringList &args=TQStringList() ); + TDECModule(TDEInstance *instance, TQWidget *parent=0, const TQStringList &args=TQStringList() ); /* * Destroys the module. */ - ~KCModule(); + ~TDECModule(); /** * Load the configuration data into the module. @@ -111,9 +111,9 @@ public: * center, to undo all of his changes and restore the currently valid * settings. * - * If you use KConfigXT, loading is taken care of automatically and + * If you use TDEConfigXT, loading is taken care of automatically and * you do not need to do it manually. However, if you for some reason reimplement it and - * also are using KConfigXT, you must call this function otherwise the loading of KConfigXT + * also are using TDEConfigXT, you must call this function otherwise the loading of TDEConfigXT * options will not work. * */ @@ -134,9 +134,9 @@ public: * * save is called when the user clicks "Apply" or "Ok". * - * If you use KConfigXT, saving is taken care off automatically and + * If you use TDEConfigXT, saving is taken care off automatically and * you do not need to load manually. However, if you for some reason reimplement it and - * also are using KConfigXT, you must call this function, otherwise the saving of KConfigXT + * also are using TDEConfigXT, you must call this function, otherwise the saving of TDEConfigXT * options will not work. Call it at the very end of your reimplementation, to avoid * changed() signals getting emitted when you modify widgets. */ @@ -148,9 +148,9 @@ public: * This method is called when the user clicks the "Default" * button. It should set the display to useful values. * - * If you use KConfigXT, you do not have to reimplement this function since + * If you use TDEConfigXT, you do not have to reimplement this function since * the fetching and settings of default values is done automatically. However, if you - * reimplement and also are using KConfigXT, remember to call the base function at the + * reimplement and also are using TDEConfigXT, remember to call the base function at the * very end of your reimplementation. */ virtual void defaults(); @@ -182,15 +182,15 @@ public: * If you override you should have it return a pointer to a constant. * * - * @returns the KAboutData for this module + * @returns the TDEAboutData for this module */ - virtual const KAboutData *aboutData() const; + virtual const TDEAboutData *aboutData() const; /** - * This sets the KAboutData returned by aboutData() + * This sets the TDEAboutData returned by aboutData() * @since 3.3 */ - void setAboutData( KAboutData* about ); + void setAboutData( TDEAboutData* about ); /** * Indicate which buttons will be used. @@ -198,7 +198,7 @@ public: * The return value is a value or'ed together from * the Button enumeration type. * - * @see KCModule::setButtons + * @see TDECModule::setButtons */ int buttons() const { return _btn; } @@ -212,7 +212,7 @@ public: * customized message. If none has been set, a default message * will be used. * - * @see KCModule::setRootOnlyMsg + * @see TDECModule::setRootOnlyMsg */ TQString rootOnlyMsg() const; @@ -224,30 +224,30 @@ public: * appear (for example if it has already one). This function * tells KControl if a RootOnly message should be shown * - * @see KCModule::setUseRootOnlyMsg + * @see TDECModule::setUseRootOnlyMsg */ bool useRootOnlyMsg() const; - KInstance *instance() const; + TDEInstance *instance() const; /** - * @return a list of @ref KConfigDialogManager's in use, if any. + * @return a list of @ref TDEConfigDialogManager's in use, if any. * @since 3.4 */ - const TQPtrList<KConfigDialogManager>& configs() const; + const TQPtrList<TDEConfigDialogManager>& configs() const; protected: /** - * Adds a KConfigskeleton @p config to watch the widget @p widget + * Adds a TDEConfigskeleton @p config to watch the widget @p widget * * This function is useful if you need to handle multiple configuration files. * * @since 3.3 - * @return a pointer to the KConfigDialogManager in use - * @param config the KConfigSkeleton to use + * @return a pointer to the TDEConfigDialogManager in use + * @param config the TDEConfigSkeleton to use * @param widget the widget to watch */ - KConfigDialogManager* addConfig( KConfigSkeleton *config, TQWidget* widget ); + TDEConfigDialogManager* addConfig( TDEConfigSkeleton *config, TQWidget* widget ); /** * Sets the quick help. @@ -300,11 +300,11 @@ protected: * Help: shows a "Help" button. * Default: shows a "Use Defaults" button * Apply: in kcontrol this will show an "Apply" and "Reset" button - * in kcmshell this will show an "Ok", "Apply" and "Cancel" button + * in tdecmshell this will show an "Ok", "Apply" and "Cancel" button * - * If Apply is not specified, kcmshell will show a "Close" button. + * If Apply is not specified, tdecmshell will show a "Close" button. * - * @see KCModule::buttons + * @see TDECModule::buttons */ void setButtons(int btn) { _btn = btn; } @@ -315,7 +315,7 @@ protected: * corresponding desktop file contains the line X-TDE-RootOnly=true. * If no message is set, a default one will be used. * - * @see KCModule::rootOnlyMsg + * @see TDECModule::rootOnlyMsg */ void setRootOnlyMsg(const TQString& msg); @@ -325,7 +325,7 @@ protected: * Following the value of @p on, the RootOnly message will be * shown or not. * - * @see KCModule::useRootOnlyMsg + * @see TDECModule::useRootOnlyMsg */ void setUseRootOnlyMsg(bool on); @@ -348,7 +348,7 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - KCModulePrivate *d; + TDECModulePrivate *d; /** * Internal function for initialization of the class. diff --git a/tdeui/kcompletionbox.cpp b/tdeui/tdecompletionbox.cpp index 56d52b88a..96c9c1794 100644 --- a/tdeui/kcompletionbox.cpp +++ b/tdeui/tdecompletionbox.cpp @@ -27,13 +27,13 @@ #include <tqstyle.h> #include <kdebug.h> -#include <kconfig.h> +#include <tdeconfig.h> #include <knotifyclient.h> -#include <kglobalsettings.h> +#include <tdeglobalsettings.h> -#include "kcompletionbox.h" +#include "tdecompletionbox.h" -class KCompletionBox::KCompletionBoxPrivate +class TDECompletionBox::TDECompletionBoxPrivate { public: TQWidget *m_parent; // necessary to set the focus back @@ -44,8 +44,8 @@ public: bool emitSelected; }; -KCompletionBox::KCompletionBox( TQWidget *parent, const char *name ) - :KListBox( parent, name, (WFlags)WType_Popup ), d(new KCompletionBoxPrivate) +TDECompletionBox::TDECompletionBox( TQWidget *parent, const char *name ) + :TDEListBox( parent, name, (WFlags)WType_Popup ), d(new TDECompletionBoxPrivate) { d->m_parent = parent; @@ -76,13 +76,13 @@ KCompletionBox::KCompletionBox( TQWidget *parent, const char *name ) TQT_SLOT( slotItemClicked( TQListBoxItem * )) ); } -KCompletionBox::~KCompletionBox() +TDECompletionBox::~TDECompletionBox() { d->m_parent = 0L; delete d; } -TQStringList KCompletionBox::items() const +TQStringList TDECompletionBox::items() const { TQStringList list; @@ -96,7 +96,7 @@ TQStringList KCompletionBox::items() const return list; } -void KCompletionBox::slotActivated( TQListBoxItem *item ) +void TDECompletionBox::slotActivated( TQListBoxItem *item ) { if ( !item ) return; @@ -105,7 +105,7 @@ void KCompletionBox::slotActivated( TQListBoxItem *item ) emit activated( item->text() ); } -bool KCompletionBox::eventFilter( TQObject *o, TQEvent *e ) +bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) { int type = e->type(); @@ -243,11 +243,11 @@ bool KCompletionBox::eventFilter( TQObject *o, TQEvent *e ) } } - return KListBox::eventFilter( o, e ); + return TDEListBox::eventFilter( o, e ); } -void KCompletionBox::popup() +void TDECompletionBox::popup() { if ( count() == 0 ) hide(); @@ -265,7 +265,7 @@ void KCompletionBox::popup() } } -void KCompletionBox::sizeAndPosition() +void TDECompletionBox::sizeAndPosition() { int currentGeom = height(); TQPoint currentPos = pos(); @@ -275,7 +275,7 @@ void KCompletionBox::sizeAndPosition() int x = currentPos.x(), y = currentPos.y(); if ( d->m_parent ) { if ( !isVisible() ) { - TQRect screenSize = KGlobalSettings::desktopGeometry(d->m_parent); + TQRect screenSize = TDEGlobalSettings::desktopGeometry(d->m_parent); TQPoint orig = d->m_parent->mapToGlobal( TQPoint(0, d->m_parent->height()) ); x = orig.x() + geom.x(); @@ -297,7 +297,7 @@ void KCompletionBox::sizeAndPosition() } } -void KCompletionBox::show() +void TDECompletionBox::show() { d->upwardBox = false; if ( d->m_parent ) { @@ -309,34 +309,34 @@ void KCompletionBox::show() // are pretty b0rked. //triggerUpdate( true ); - // Workaround for I'm not sure whose bug - if this KCompletionBox' parent + // Workaround for I'm not sure whose bug - if this TDECompletionBox' parent // is in a layout, that layout will detect inserting new child (posted // ChildInserted event), and will trigger relayout (post LayoutHint event). // 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 + // The problem is, TDECompletionBox::eventFilter() detects resizing // of the parent, and calls hide() - and this hide() happen in the middle // of show(), causing inconsistent state. I'll try to submit a Qt patch too. tqApp->sendPostedEvents(); - KListBox::show(); + TDEListBox::show(); } -void KCompletionBox::hide() +void TDECompletionBox::hide() { if ( d->m_parent ) tqApp->removeEventFilter( this ); d->cancelText = TQString::null; - KListBox::hide(); + TDEListBox::hide(); } -TQRect KCompletionBox::calculateGeometry() const +TQRect TDECompletionBox::calculateGeometry() const { int x = 0, y = 0; int ih = itemHeight(); int h = QMIN( 15 * ih, (int) count() * ih ) + 2*frameWidth(); - int w = (d->m_parent) ? d->m_parent->width() : KListBox::minimumSizeHint().width(); - w = QMAX( KListBox::minimumSizeHint().width(), w ); + int w = (d->m_parent) ? d->m_parent->width() : TDEListBox::minimumSizeHint().width(); + w = QMAX( TDEListBox::minimumSizeHint().width(), w ); //If we're inside a combox, Qt by default makes the dropdown // as wide as the combo, and gives the style a chance @@ -373,12 +373,12 @@ TQRect KCompletionBox::calculateGeometry() const return TQRect(x, y, w, h); } -TQSize KCompletionBox::sizeHint() const +TQSize TDECompletionBox::sizeHint() const { return calculateGeometry().size(); } -void KCompletionBox::down() +void TDECompletionBox::down() { int i = currentItem(); @@ -393,57 +393,57 @@ void KCompletionBox::down() setCurrentItem( i + 1 ); } -void KCompletionBox::up() +void TDECompletionBox::up() { if ( currentItem() > 0 ) setCurrentItem( currentItem() - 1 ); } -void KCompletionBox::pageDown() +void TDECompletionBox::pageDown() { int i = currentItem() + numItemsVisible(); i = i > (int)count() - 1 ? (int)count() - 1 : i; setCurrentItem( i ); } -void KCompletionBox::pageUp() +void TDECompletionBox::pageUp() { int i = currentItem() - numItemsVisible(); i = i < 0 ? 0 : i; setCurrentItem( i ); } -void KCompletionBox::home() +void TDECompletionBox::home() { setCurrentItem( 0 ); } -void KCompletionBox::end() +void TDECompletionBox::end() { setCurrentItem( count() -1 ); } -void KCompletionBox::setTabHandling( bool enable ) +void TDECompletionBox::setTabHandling( bool enable ) { d->tabHandling = enable; } -bool KCompletionBox::isTabHandling() const +bool TDECompletionBox::isTabHandling() const { return d->tabHandling; } -void KCompletionBox::setCancelledText( const TQString& text ) +void TDECompletionBox::setCancelledText( const TQString& text ) { d->cancelText = text; } -TQString KCompletionBox::cancelledText() const +TQString TDECompletionBox::cancelledText() const { return d->cancelText; } -void KCompletionBox::canceled() +void TDECompletionBox::canceled() { if ( !d->cancelText.isNull() ) emit userCancelled( d->cancelText ); @@ -451,7 +451,7 @@ void KCompletionBox::canceled() hide(); } -class KCompletionBoxItem : public TQListBoxItem +class TDECompletionBoxItem : public TQListBoxItem { public: //Returns true if dirty. @@ -465,7 +465,7 @@ public: }; -void KCompletionBox::insertItems( const TQStringList& items, int index ) +void TDECompletionBox::insertItems( const TQStringList& items, int index ) { bool block = signalsBlocked(); blockSignals( true ); @@ -474,7 +474,7 @@ void KCompletionBox::insertItems( const TQStringList& items, int index ) d->down_workaround = true; } -void KCompletionBox::setItems( const TQStringList& items ) +void TDECompletionBox::setItems( const TQStringList& items ) { bool block = signalsBlocked(); blockSignals( true ); @@ -494,7 +494,7 @@ void KCompletionBox::setItems( const TQStringList& items ) for ( ; it != itEnd; ++it) { if ( item ) { - const bool changed = ((KCompletionBoxItem*)item)->reuse( *it ); + const bool changed = ((TDECompletionBoxItem*)item)->reuse( *it ); dirty = dirty || changed; item = item->next(); } @@ -527,12 +527,12 @@ void KCompletionBox::setItems( const TQStringList& items ) d->down_workaround = true; } -void KCompletionBox::slotCurrentChanged() +void TDECompletionBox::slotCurrentChanged() { d->down_workaround = false; } -void KCompletionBox::slotItemClicked( TQListBoxItem *item ) +void TDECompletionBox::slotItemClicked( TQListBoxItem *item ) { if ( item ) { @@ -546,17 +546,17 @@ void KCompletionBox::slotItemClicked( TQListBoxItem *item ) } } -void KCompletionBox::setActivateOnSelect(bool state) +void TDECompletionBox::setActivateOnSelect(bool state) { d->emitSelected = state; } -bool KCompletionBox::activateOnSelect() const +bool TDECompletionBox::activateOnSelect() const { return d->emitSelected; } -void KCompletionBox::virtual_hook( int id, void* data ) -{ KListBox::virtual_hook( id, data ); } +void TDECompletionBox::virtual_hook( int id, void* data ) +{ TDEListBox::virtual_hook( id, data ); } -#include "kcompletionbox.moc" +#include "tdecompletionbox.moc" diff --git a/tdeui/kcompletionbox.h b/tdeui/tdecompletionbox.h index 8016ceab2..b874fec99 100644 --- a/tdeui/kcompletionbox.h +++ b/tdeui/tdecompletionbox.h @@ -25,22 +25,22 @@ class TQEvent; #include <tqstringlist.h> -#include <klistbox.h> +#include <tdelistbox.h> /** * @short A helper widget for "completion-widgets" (KLineEdit, KComboBox)) * * A little utility class for "completion-widgets", like KLineEdit or - * KComboBox. KCompletionBox is a listbox, displayed as a rectangle without + * KComboBox. TDECompletionBox is a listbox, displayed as a rectangle without * any window decoration, usually directly under the lineedit or combobox. * It is filled with all possible matches for a completion, so the user * can select the one he wants. * - * It is used when KGlobalSettings::Completion == CompletionPopup or CompletionPopupAuto. + * It is used when TDEGlobalSettings::Completion == CompletionPopup or CompletionPopupAuto. * * @author Carsten Pfeiffer <pfeiffer@kde.org> */ -class TDEUI_EXPORT KCompletionBox : public KListBox +class TDEUI_EXPORT TDECompletionBox : public TDEListBox { Q_OBJECT TQ_PROPERTY( bool isTabHandling READ isTabHandling WRITE setTabHandling ) @@ -49,17 +49,17 @@ class TDEUI_EXPORT KCompletionBox : public KListBox public: /** - * Constructs a KCompletionBox. + * Constructs a TDECompletionBox. * * The parent widget is used to give the focus back when pressing the * up-button on the very first item. */ - KCompletionBox( TQWidget *parent, const char *name = 0 ); + TDECompletionBox( TQWidget *parent, const char *name = 0 ); /** * Destroys the box */ - ~KCompletionBox(); + ~TDECompletionBox(); virtual TQSize sizeHint() const; @@ -216,7 +216,7 @@ protected: void sizeAndPosition(); /** - * Reimplemented from KListBox to get events from the viewport (to hide + * Reimplemented from TDEListBox to get events from the viewport (to hide * this widget on mouse-click, Escape-presses, etc. */ virtual bool eventFilter( TQObject *, TQEvent * ); @@ -238,8 +238,8 @@ protected: virtual void virtual_hook( int id, void* data ); private: - class KCompletionBoxPrivate; - KCompletionBoxPrivate* const d; + class TDECompletionBoxPrivate; + TDECompletionBoxPrivate* const d; }; diff --git a/tdeui/kconfigdialog.cpp b/tdeui/tdeconfigdialog.cpp index ccbba1cf0..df43defc5 100644 --- a/tdeui/kconfigdialog.cpp +++ b/tdeui/tdeconfigdialog.cpp @@ -19,11 +19,11 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ -#include "kconfigdialog.h" +#include "tdeconfigdialog.h" -#include <kconfigskeleton.h> -#include <kconfigdialogmanager.h> -#include <klocale.h> +#include <tdeconfigskeleton.h> +#include <tdeconfigdialogmanager.h> +#include <tdelocale.h> #include <kiconloader.h> #include <kdebug.h> @@ -31,30 +31,30 @@ #include <tqvbox.h> #include <tqmap.h> -TQAsciiDict<KConfigDialog> KConfigDialog::openDialogs; +TQAsciiDict<TDEConfigDialog> TDEConfigDialog::openDialogs; // This class is here purly so we don't break binary compatibility down the road. -class KConfigDialog::KConfigDialogPrivate +class TDEConfigDialog::TDEConfigDialogPrivate { public: - KConfigDialogPrivate(KDialogBase::DialogType t) + TDEConfigDialogPrivate(KDialogBase::DialogType t) : shown(false), type(t), manager(0) { } bool shown; KDialogBase::DialogType type; - KConfigDialogManager *manager; - TQMap<TQWidget *, KConfigDialogManager *> managerForPage; + TDEConfigDialogManager *manager; + TQMap<TQWidget *, TDEConfigDialogManager *> managerForPage; }; -KConfigDialog::KConfigDialog( TQWidget *parent, const char *name, - KConfigSkeleton *config, +TDEConfigDialog::TDEConfigDialog( TQWidget *parent, const char *name, + TDEConfigSkeleton *config, DialogType dialogType, int dialogButtons, ButtonCode defaultButton, bool modal ) : KDialogBase( dialogType, (WFlags)TQt::WStyle_DialogBorder, parent, name, modal, i18n("Configure"), dialogButtons, defaultButton ), - d(new KConfigDialogPrivate(dialogType)) + d(new TDEConfigDialogPrivate(dialogType)) { if ( name ) { openDialogs.insert(name, this); @@ -71,19 +71,19 @@ KConfigDialog::KConfigDialog( TQWidget *parent, const char *name, connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateWidgetsDefault())); connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateButtons())); - d->manager = new KConfigDialogManager(this, config); + d->manager = new TDEConfigDialogManager(this, config); setupManagerConnections(d->manager); enableButton(Apply, false); } -KConfigDialog::~KConfigDialog() +TDEConfigDialog::~TDEConfigDialog() { openDialogs.remove(name()); delete d; } -void KConfigDialog::addPage(TQWidget *page, +void TDEConfigDialog::addPage(TQWidget *page, const TQString &itemName, const TQString &pixmapName, const TQString &header, @@ -94,25 +94,25 @@ void KConfigDialog::addPage(TQWidget *page, d->manager->addWidget(page); } -void KConfigDialog::addPage(TQWidget *page, - KConfigSkeleton *config, +void TDEConfigDialog::addPage(TQWidget *page, + TDEConfigSkeleton *config, const TQString &itemName, const TQString &pixmapName, const TQString &header) { addPageInternal(page, itemName, pixmapName, header); - d->managerForPage[page] = new KConfigDialogManager(page, config); + d->managerForPage[page] = new TDEConfigDialogManager(page, config); setupManagerConnections(d->managerForPage[page]); } -void KConfigDialog::addPageInternal(TQWidget *page, +void TDEConfigDialog::addPageInternal(TQWidget *page, const TQString &itemName, const TQString &pixmapName, const TQString &header) { if(d->shown) { - kdDebug(240) << "KConfigDialog::addPage: can not add a page after the dialog has been shown."; + kdDebug(240) << "TDEConfigDialog::addPage: can not add a page after the dialog has been shown."; return; } switch(d->type) @@ -144,11 +144,11 @@ void KConfigDialog::addPageInternal(TQWidget *page, break; default: - kdDebug(240) << "KConfigDialog::addpage: unknown type."; + kdDebug(240) << "TDEConfigDialog::addpage: unknown type."; } } -void KConfigDialog::setupManagerConnections(KConfigDialogManager *manager) +void TDEConfigDialog::setupManagerConnections(TDEConfigDialogManager *manager) { connect(manager, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(settingsChangedSlot())); connect(manager, TQT_SIGNAL(widgetModified()), this, TQT_SLOT(updateButtons())); @@ -158,26 +158,26 @@ void KConfigDialog::setupManagerConnections(KConfigDialogManager *manager) connect(this, TQT_SIGNAL(defaultClicked()), manager, TQT_SLOT(updateWidgetsDefault())); } -KConfigDialog* KConfigDialog::exists(const char* name) +TDEConfigDialog* TDEConfigDialog::exists(const char* name) { return openDialogs.find(name); } -bool KConfigDialog::showDialog(const char* name) +bool TDEConfigDialog::showDialog(const char* name) { - KConfigDialog *dialog = exists(name); + TDEConfigDialog *dialog = exists(name); if(dialog) dialog->show(); return (dialog != NULL); } -void KConfigDialog::updateButtons() +void TDEConfigDialog::updateButtons() { static bool only_once = false; if (only_once) return; only_once = true; - TQMap<TQWidget *, KConfigDialogManager *>::iterator it; + TQMap<TQWidget *, TDEConfigDialogManager *>::iterator it; bool has_changed = d->manager->hasChanged() || hasChanged(); for (it = d->managerForPage.begin(); @@ -203,7 +203,7 @@ void KConfigDialog::updateButtons() only_once = false; } -void KConfigDialog::settingsChangedSlot() +void TDEConfigDialog::settingsChangedSlot() { // Update the buttons updateButtons(); @@ -211,9 +211,9 @@ void KConfigDialog::settingsChangedSlot() emit settingsChanged(name()); } -void KConfigDialog::show() +void TDEConfigDialog::show() { - TQMap<TQWidget *, KConfigDialogManager *>::iterator it; + TQMap<TQWidget *, TDEConfigDialogManager *>::iterator it; updateWidgets(); d->manager->updateWidgets(); @@ -243,17 +243,17 @@ void KConfigDialog::show() KDialogBase::show(); } -void KConfigDialog::updateSettings() +void TDEConfigDialog::updateSettings() { } -void KConfigDialog::updateWidgets() +void TDEConfigDialog::updateWidgets() { } -void KConfigDialog::updateWidgetsDefault() +void TDEConfigDialog::updateWidgetsDefault() { } -#include "kconfigdialog.moc" +#include "tdeconfigdialog.moc" diff --git a/tdeui/kconfigdialog.h b/tdeui/tdeconfigdialog.h index 9268ab1f2..f7cc10e26 100644 --- a/tdeui/kconfigdialog.h +++ b/tdeui/tdeconfigdialog.h @@ -21,35 +21,35 @@ #ifndef KCONFIGDIALOG_H #define KCONFIGDIALOG_H -class KConfig; -class KConfigSkeleton; -class KConfigDialogManager; +class TDEConfig; +class TDEConfigSkeleton; +class TDEConfigDialogManager; #include <kdialogbase.h> #include <tqasciidict.h> /** * \short Standard %KDE configuration dialog class * - * The KConfigDialog class provides an easy and uniform means of displaying - * a settings dialog using KDialogBase, KConfigDialogManager and a - * KConfigSkeleton derived settings class. + * The TDEConfigDialog class provides an easy and uniform means of displaying + * a settings dialog using KDialogBase, TDEConfigDialogManager and a + * TDEConfigSkeleton derived settings class. * - * KConfigDialog handles the enabling and disabling of buttons, creation + * TDEConfigDialog handles the enabling and disabling of buttons, creation * of the dialog, and deletion of the widgets. Because of - * KConfigDialogManager, this class also manages: restoring + * TDEConfigDialogManager, this class also manages: restoring * the settings, reseting them to the default values, and saving them. This * requires that the names of the widgets corresponding to configuration entries * have to have the same name plus an additional "kcfg_" prefix. For example the * widget named "kcfg_MyOption" would be associated with the configuration entry * "MyOption". * - * Here is an example usage of KConfigDialog: + * Here is an example usage of TDEConfigDialog: * * \code * void KCoolApp::showSettings(){ - * if(KConfigDialog::showDialog("settings")) + * if(TDEConfigDialog::showDialog("settings")) * return; - * KConfigDialog *dialog = new KConfigDialog(this, "settings", MySettings::self(), KDialogBase::IconList); + * TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", MySettings::self(), KDialogBase::IconList); * dialog->addPage(new General(0, "General"), i18n("General") ); * dialog->addPage(new Appearance(0, "Style"), i18n("Appearance") ); * connect(dialog, TQT_SIGNAL(settingsChanged()), mainWidget, TQT_SLOT(loadSettings())); @@ -65,11 +65,11 @@ class KConfigDialogManager; * Please note that using the setMainWidget method inherited from KDialogBase * currently yields broken behaviour at runtime; use @ref addPage() instead. * - * @see KConfigSkeleton + * @see TDEConfigSkeleton * @author Waldo Bastian <bastian@kde.org> * @since 3.2 */ -class TDEUI_EXPORT KConfigDialog : public KDialogBase { +class TDEUI_EXPORT TDEConfigDialog : public KDialogBase { Q_OBJECT signals: @@ -87,7 +87,7 @@ signals: /** * One or more of the settings have been permanently changed such as if * the user clicked on the Apply or Ok button. - * This signal is useful when using KConfigDialog to configure + * This signal is useful when using TDEConfigDialog to configure * items in a list. When emitted the main class would then know what * item in the list was actually changed. * @param dialogName the name of the dialog. @@ -116,12 +116,12 @@ public: * @param modal - Whether the dialog should be modal. To prevent more than one * non-modal settings dialog from showing the static function showDialog() can be * used in determining if the settings dialog already exists before creating - * a new KConfigDialog object. + * a new TDEConfigDialog object. */ // KDE4: Add the "separator" parameter as in KDialogBase // Make "dialogType" an int - KConfigDialog( TQWidget *parent, const char *name, - KConfigSkeleton *config, + TDEConfigDialog( TQWidget *parent, const char *name, + TDEConfigSkeleton *config, DialogType dialogType = IconList, int dialogButtons = Default|Ok|Apply|Cancel|Help, ButtonCode defaultButton = Ok, @@ -132,10 +132,10 @@ public: * Deletes private class. * @see exists() */ - ~KConfigDialog(); + ~TDEConfigDialog(); /** - * Adds page to the dialog and to KConfigDialogManager. When an + * Adds page to the dialog and to TDEConfigDialogManager. When an * application is done adding pages show() should be called to * display the dialog. * Note that after you call show() you can not add any more pages @@ -146,7 +146,7 @@ public: * @param pixmapName - Name of the pixmap that should be used if needed. * @param header - Header text use in the list modes. Ignored in Tabbed * mode. If empty, the itemName text is used when needed. - * @param manage - Whether KConfigDialogManager should manage the page or not. + * @param manage - Whether TDEConfigDialogManager should manage the page or not. */ // KDE4: Add a default value for itemName & pixmapName void addPage( TQWidget *page, const TQString &itemName, @@ -155,9 +155,9 @@ public: bool manage=true ); /** - * Adds page to the dialog that is managed by a custom KConfigDialogManager. + * Adds page to the dialog that is managed by a custom TDEConfigDialogManager. * This is useful for dialogs that contain settings spread over more than - * one configuration file and thus have/need more than one KConfigSkeleton. + * one configuration file and thus have/need more than one TDEConfigSkeleton. * When an application is done adding pages show() should be called to * display the dialog. * Note that after you call show() you can not add any more pages @@ -171,7 +171,7 @@ public: * mode. If empty, the itemName text is used when needed. */ // KDE4: Add a default value for itemName & pixmapName - void addPage( TQWidget *page, KConfigSkeleton *config, + void addPage( TQWidget *page, TDEConfigSkeleton *config, const TQString &itemName, const TQString &pixmapName, const TQString &header=TQString::null ); @@ -182,7 +182,7 @@ public: * @param name - Dialog name to look for. * @return Pointer to widget or NULL if it does not exist. */ - static KConfigDialog* exists( const char* name ); + static TDEConfigDialog* exists( const char* name ); /** * Attempts to show the dialog with the name 'name'. @@ -260,19 +260,19 @@ private: * Sets the connections from a manager to the dialog (and the other * way round) up. */ - void setupManagerConnections(KConfigDialogManager *manager); + void setupManagerConnections(TDEConfigDialogManager *manager); private: /** * The list of existing dialogs. */ - static TQAsciiDict<KConfigDialog> openDialogs; + static TQAsciiDict<TDEConfigDialog> openDialogs; - class KConfigDialogPrivate; + class TDEConfigDialogPrivate; /** * Private class. */ - KConfigDialogPrivate *d; + TDEConfigDialogPrivate *d; }; #endif //KCONFIGDIALOG_H diff --git a/tdeui/kfontcombo.cpp b/tdeui/tdefontcombo.cpp index 9ef3af912..cb250385f 100644 --- a/tdeui/kfontcombo.cpp +++ b/tdeui/tdefontcombo.cpp @@ -23,12 +23,12 @@ #include <tqregexp.h> #include <kcharsets.h> -#include <kconfig.h> -#include <kglobal.h> -#include <kfontdialog.h> +#include <tdeconfig.h> +#include <tdeglobal.h> +#include <tdefontdialog.h> -#include "kfontcombo.h" -#include "kfontcombo.moc" +#include "tdefontcombo.h" +#include "tdefontcombo.moc" #include <ft2build.h> #include <fontconfig/fontconfig.h> @@ -41,9 +41,9 @@ #include <X11/Xft/Xft.h> -struct KFontComboPrivate +struct TDEFontComboPrivate { - KFontComboPrivate() + TDEFontComboPrivate() : bold(false), italic(false), underline(false), @@ -65,11 +65,11 @@ struct KFontComboPrivate TQString defaultFamily; }; -class KFontListItem : public TQListBoxItem +class TDEFontListItem : public TQListBoxItem { public: - KFontListItem(const TQString &fontName, KFontCombo *combo); - virtual ~KFontListItem(); + TDEFontListItem(const TQString &fontName, TDEFontCombo *combo); + virtual ~TDEFontListItem(); virtual int width(const TQListBox *) const; virtual int height(const TQListBox *) const; @@ -83,13 +83,13 @@ private: void createFont(); private: - KFontCombo *m_combo; + TDEFontCombo *m_combo; TQString m_fontName; TQFont *m_font; bool m_canPaintName; }; -KFontListItem::KFontListItem(const TQString &fontName, KFontCombo *combo) +TDEFontListItem::TDEFontListItem(const TQString &fontName, TDEFontCombo *combo) : TQListBoxItem(combo->listBox()), m_combo(combo), m_fontName(fontName), @@ -99,19 +99,19 @@ KFontListItem::KFontListItem(const TQString &fontName, KFontCombo *combo) setText(fontName); } -KFontListItem::~KFontListItem() +TDEFontListItem::~TDEFontListItem() { delete m_font; } -int KFontListItem::width(const TQListBox *lb) const +int TDEFontListItem::width(const TQListBox *lb) const { if (m_font) return TQFontMetrics(*m_font).width(text()) + 6; return lb->fontMetrics().width(text()) + 6; } -int KFontListItem::height(const TQListBox *lb) const +int TDEFontListItem::height(const TQListBox *lb) const { if (m_combo->d->displayFonts) return m_combo->d->lineSpacing + 2; @@ -119,7 +119,7 @@ int KFontListItem::height(const TQListBox *lb) const return fm.lineSpacing() + 2; } -void KFontListItem::paint(TQPainter *p) +void TDEFontListItem::paint(TQPainter *p) { if (m_combo->d->displayFonts) { @@ -144,7 +144,7 @@ void KFontListItem::paint(TQPainter *p) } } -void KFontListItem::updateFont() +void TDEFontListItem::updateFont() { if (!m_font) return; @@ -156,7 +156,7 @@ void KFontListItem::updateFont() m_font->setPointSize(m_combo->d->size); } -void KFontListItem::createFont() +void TDEFontListItem::createFont() { if (m_font) return; @@ -172,33 +172,33 @@ void KFontListItem::createFont() updateFont(); } -KFontCombo::KFontCombo(TQWidget *parent, const char *name) +TDEFontCombo::TDEFontCombo(TQWidget *parent, const char *name) : KComboBox(true, parent, name) { init(); TQStringList families; - KFontChooser::getFontList(families, 0); + TDEFontChooser::getFontList(families, 0); setFonts(families); } -KFontCombo::KFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name) +TDEFontCombo::TDEFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name) : KComboBox(true, parent, name) { init(); setFonts(fonts); } -void KFontCombo::setFonts(const TQStringList &fonts) +void TDEFontCombo::setFonts(const TQStringList &fonts) { clear(); for (TQStringList::ConstIterator it = fonts.begin(); it != fonts.end(); ++it) - new KFontListItem(*it, this); + new TDEFontListItem(*it, this); } /* - * Maintenance note: Keep in sync with KFontAction::setFont() + * Maintenance note: Keep in sync with TDEFontAction::setFont() */ -void KFontCombo::setCurrentFont(const TQString &family) +void TDEFontCombo::setCurrentFont(const TQString &family) { TQString lowerName = family.lower(); int c = count(); @@ -257,27 +257,27 @@ void KFontCombo::setCurrentFont(const TQString &family) setCurrentFont( realFamily ); } -void KFontCombo::slotModified( int ) +void TDEFontCombo::slotModified( int ) { d->modified = 1; } -TQString KFontCombo::currentFont() const +TQString TDEFontCombo::currentFont() const { if (d->modified) return currentText(); return d->defaultFamily; } -void KFontCombo::setCurrentItem(int i) +void TDEFontCombo::setCurrentItem(int i) { d->modified = true; TQComboBox::setCurrentItem(i); } -void KFontCombo::init() +void TDEFontCombo::init() { - d = new KFontComboPrivate; + d = new TDEFontComboPrivate; d->displayFonts = displayFonts(); setInsertionPolicy(NoInsertion); setAutoCompletion(true); @@ -285,12 +285,12 @@ void KFontCombo::init() connect( this, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotModified(int))); } -KFontCombo::~KFontCombo() +TDEFontCombo::~TDEFontCombo() { delete d; } -void KFontCombo::setBold(bool bold) +void TDEFontCombo::setBold(bool bold) { if (d->bold == bold) return; @@ -298,12 +298,12 @@ void KFontCombo::setBold(bool bold) updateFonts(); } -bool KFontCombo::bold() const +bool TDEFontCombo::bold() const { return d->bold; } -void KFontCombo::setItalic(bool italic) +void TDEFontCombo::setItalic(bool italic) { if (d->italic == italic) return; @@ -311,12 +311,12 @@ void KFontCombo::setItalic(bool italic) updateFonts(); } -bool KFontCombo::italic() const +bool TDEFontCombo::italic() const { return d->italic; } -void KFontCombo::setUnderline(bool underline) +void TDEFontCombo::setUnderline(bool underline) { if (d->underline == underline) return; @@ -324,12 +324,12 @@ void KFontCombo::setUnderline(bool underline) updateFonts(); } -bool KFontCombo::underline() const +bool TDEFontCombo::underline() const { return d->underline; } -void KFontCombo::setStrikeOut(bool strikeOut) +void TDEFontCombo::setStrikeOut(bool strikeOut) { if (d->strikeOut == strikeOut) return; @@ -337,12 +337,12 @@ void KFontCombo::setStrikeOut(bool strikeOut) updateFonts(); } -bool KFontCombo::strikeOut() const +bool TDEFontCombo::strikeOut() const { return d->strikeOut; } -void KFontCombo::setSize(int size) +void TDEFontCombo::setSize(int size) { if (d->size == size) return; @@ -354,29 +354,29 @@ void KFontCombo::setSize(int size) updateFonts(); } -int KFontCombo::size() const +int TDEFontCombo::size() const { return d->size; } -void KFontCombo::updateFonts() +void TDEFontCombo::updateFonts() { if (!d->displayFonts) return; for (unsigned int i = 0; i < listBox()->count(); ++i) { - KFontListItem *item = static_cast<KFontListItem *>(listBox()->item(i)); + TDEFontListItem *item = static_cast<TDEFontListItem *>(listBox()->item(i)); item->updateFont(); } } -bool KFontCombo::displayFonts() +bool TDEFontCombo::displayFonts() { - KConfigGroupSaver saver(KGlobal::config(), "KDE"); - return KGlobal::config()->readBoolEntry("DisplayFontItems", true); + TDEConfigGroupSaver saver(TDEGlobal::config(), "KDE"); + return TDEGlobal::config()->readBoolEntry("DisplayFontItems", true); } -void KFontCombo::virtual_hook( int id, void* data ) +void TDEFontCombo::virtual_hook( int id, void* data ) { KComboBox::virtual_hook( id, data ); } diff --git a/tdeui/kfontcombo.h b/tdeui/tdefontcombo.h index 9b480ff18..13c55215b 100644 --- a/tdeui/kfontcombo.h +++ b/tdeui/tdefontcombo.h @@ -32,7 +32,7 @@ * * @author Malte Starostik <malte@kde.org> */ -class TDEUI_EXPORT KFontCombo : public KComboBox +class TDEUI_EXPORT TDEFontCombo : public KComboBox { Q_OBJECT TQ_PROPERTY(TQString family READ currentFont WRITE setCurrentFont) @@ -48,7 +48,7 @@ public: * @param parent The parent widget * @param name The object name for the widget */ - KFontCombo(TQWidget *parent, const char *name = 0); + TDEFontCombo(TQWidget *parent, const char *name = 0); /** * Constructor that takes an already initialzed font list * @@ -56,11 +56,11 @@ public: * @param parent The parent widget * @param name The object name for the widget */ - KFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name = 0); + TDEFontCombo(const TQStringList &fonts, TQWidget *parent, const char *name = 0); /** * Destructor */ - virtual ~KFontCombo(); + virtual ~TDEFontCombo(); /** * Sets the font list. @@ -168,11 +168,11 @@ private: void init(); private: - friend class KFontListItem; + friend class TDEFontListItem; protected: virtual void virtual_hook( int id, void* data ); private: - struct KFontComboPrivate *d; + struct TDEFontComboPrivate *d; }; #endif diff --git a/tdeui/kfontdialog.cpp b/tdeui/tdefontdialog.cpp index eb5b262f8..75f4599e0 100644 --- a/tdeui/kfontdialog.cpp +++ b/tdeui/tdefontdialog.cpp @@ -41,20 +41,20 @@ #include <tqwhatsthis.h> #include <tqtooltip.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kcharsets.h> -#include <kconfig.h> +#include <tdeconfig.h> #include <kdialog.h> -#include <kglobal.h> -#include <kglobalsettings.h> +#include <tdeglobal.h> +#include <tdeglobalsettings.h> #include <tqlineedit.h> -#include <klistbox.h> -#include <klocale.h> +#include <tdelistbox.h> +#include <tdelocale.h> #include <kstandarddirs.h> #include <kdebug.h> #include <knuminput.h> -#include "kfontdialog.moc" +#include "tdefontdialog.moc" static int minimumListWidth( const TQListBox *list ) { @@ -80,16 +80,16 @@ static int minimumListHeight( const TQListBox *list, int numVisibleEntry ) return ( w * numVisibleEntry + 2 * list->frameWidth() ); } -class KFontChooser::KFontChooserPrivate +class TDEFontChooser::TDEFontChooserPrivate { public: - KFontChooserPrivate() + TDEFontChooserPrivate() { m_palette.setColor(TQPalette::Active, TQColorGroup::Text, Qt::black); m_palette.setColor(TQPalette::Active, TQColorGroup::Base, Qt::white); } TQPalette m_palette; }; -KFontChooser::KFontChooser(TQWidget *parent, const char *name, +TDEFontChooser::TDEFontChooser(TQWidget *parent, const char *name, bool onlyFixed, const TQStringList &fontList, bool makeFrame, int visibleListSize, bool diff, TQButton::ToggleState *sizeIsRelativeState ) @@ -101,7 +101,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, i18n( "Here you can choose the font to be used." ); TQWhatsThis::add( this, mainWhatsThisText ); - d = new KFontChooserPrivate; + d = new TDEFontChooserPrivate; TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); int checkBoxGap = KDialog::spacingHint() / 2; @@ -192,7 +192,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, // // now create the actual boxes that hold the info // - familyListBox = new KListBox( page, "familyListBox"); + familyListBox = new TDEListBox( page, "familyListBox"); familyListBox->setEnabled( !diff ); gridLayout->addWidget( familyListBox, row, 0 ); TQString fontFamilyWhatsThisText = @@ -214,7 +214,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, familyListBox->setMinimumHeight( minimumListHeight( familyListBox, visibleListSize ) ); - styleListBox = new KListBox( page, "styleListBox"); + styleListBox = new TDEListBox( page, "styleListBox"); styleListBox->setEnabled( !diff ); gridLayout->addWidget(styleListBox, row, 1); TQString fontStyleWhatsThisText = @@ -233,7 +233,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, TQT_SLOT(style_chosen_slot(const TQString &))); - sizeListBox = new KListBox( page, "sizeListBox"); + sizeListBox = new TDEListBox( page, "sizeListBox"); sizeOfFont = new KIntNumInput( page, "sizeOfFont"); sizeOfFont->setMinValue(4); @@ -290,7 +290,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, row ++; sampleEdit = new TQLineEdit( page, "sampleEdit"); - TQFont tmpFont( KGlobalSettings::generalFont().family(), 64, TQFont::Black ); + TQFont tmpFont( TDEGlobalSettings::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")); @@ -325,22 +325,22 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, vbox->addWidget( xlfdEdit ); // lets initialize the display if possible - setFont( KGlobalSettings::generalFont(), usingFixed ); + setFont( TDEGlobalSettings::generalFont(), usingFixed ); // check or uncheck or gray out the "relative" checkbox if( sizeIsRelativeState && sizeIsRelativeCheckBox ) setSizeIsRelative( *sizeIsRelativeState ); - KConfig *config = KGlobal::config(); - KConfigGroupSaver saver(config, TQString::fromLatin1("General")); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver(config, TQString::fromLatin1("General")); showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false)); } -KFontChooser::~KFontChooser() +TDEFontChooser::~TDEFontChooser() { delete d; } -void KFontChooser::fillSizeList() { +void TDEFontChooser::fillSizeList() { if(! sizeListBox) return; //assertion. static const int c[] = @@ -359,7 +359,7 @@ void KFontChooser::fillSizeList() { } } -void KFontChooser::setColor( const TQColor & col ) +void TDEFontChooser::setColor( const TQColor & col ) { d->m_palette.setColor( TQPalette::Active, TQColorGroup::Text, col ); TQPalette pal = sampleEdit->palette(); @@ -367,12 +367,12 @@ void KFontChooser::setColor( const TQColor & col ) sampleEdit->setPalette( pal ); } -TQColor KFontChooser::color() const +TQColor TDEFontChooser::color() const { return d->m_palette.color( TQPalette::Active, TQColorGroup::Text ); } -void KFontChooser::setBackgroundColor( const TQColor & col ) +void TDEFontChooser::setBackgroundColor( const TQColor & col ) { d->m_palette.setColor( TQPalette::Active, TQColorGroup::Base, col ); TQPalette pal = sampleEdit->palette(); @@ -380,12 +380,12 @@ void KFontChooser::setBackgroundColor( const TQColor & col ) sampleEdit->setPalette( pal ); } -TQColor KFontChooser::backgroundColor() const +TQColor TDEFontChooser::backgroundColor() const { return d->m_palette.color( TQPalette::Active, TQColorGroup::Base ); } -void KFontChooser::setSizeIsRelative( TQButton::ToggleState relative ) +void TDEFontChooser::setSizeIsRelative( TQButton::ToggleState relative ) { // check or uncheck or gray out the "relative" checkbox if( sizeIsRelativeCheckBox ) { @@ -396,20 +396,20 @@ void KFontChooser::setSizeIsRelative( TQButton::ToggleState relative ) } } -TQButton::ToggleState KFontChooser::sizeIsRelative() const +TQButton::ToggleState TDEFontChooser::sizeIsRelative() const { return sizeIsRelativeCheckBox ? sizeIsRelativeCheckBox->state() : TQButton::NoChange; } -TQSize KFontChooser::sizeHint( void ) const +TQSize TDEFontChooser::sizeHint( void ) const { return minimumSizeHint(); } -void KFontChooser::enableColumn( int column, bool state ) +void TDEFontChooser::enableColumn( int column, bool state ) { if( column & FamilyList ) { @@ -426,7 +426,7 @@ void KFontChooser::enableColumn( int column, bool state ) } -void KFontChooser::setFont( const TQFont& aFont, bool onlyFixed ) +void TDEFontChooser::setFont( const TQFont& aFont, bool onlyFixed ) { selFont = aFont; selectedSize=aFont.pointSize(); @@ -443,7 +443,7 @@ void KFontChooser::setFont( const TQFont& aFont, bool onlyFixed ) } -int KFontChooser::fontDiffFlags() { +int TDEFontChooser::fontDiffFlags() { int diffFlags = 0; if (familyCheckbox && styleCheckbox && sizeCheckbox) { diffFlags = (int)(familyCheckbox->isChecked() ? FontDiffFamily : 0) @@ -453,7 +453,7 @@ int KFontChooser::fontDiffFlags() { return diffFlags; } -void KFontChooser::toggled_checkbox() +void TDEFontChooser::toggled_checkbox() { familyListBox->setEnabled( familyCheckbox->isChecked() ); styleListBox->setEnabled( styleCheckbox->isChecked() ); @@ -461,7 +461,7 @@ void KFontChooser::toggled_checkbox() sizeOfFont->setEnabled( sizeCheckbox->isChecked() ); } -void KFontChooser::family_chosen_slot(const TQString& family) +void TDEFontChooser::family_chosen_slot(const TQString& family) { TQFontDatabase dbase; TQStringList styles = TQStringList(dbase.styles(family)); @@ -496,7 +496,7 @@ void KFontChooser::family_chosen_slot(const TQString& family) style_chosen_slot(TQString::null); } -void KFontChooser::size_chosen_slot(const TQString& size){ +void TDEFontChooser::size_chosen_slot(const TQString& size){ selectedSize=size.toInt(); sizeOfFont->setValue(selectedSize); @@ -504,12 +504,12 @@ void KFontChooser::size_chosen_slot(const TQString& size){ emit fontSelected(selFont); } -void KFontChooser::size_value_slot(int val) { +void TDEFontChooser::size_value_slot(int val) { selFont.setPointSize(val); emit fontSelected(selFont); } -void KFontChooser::style_chosen_slot(const TQString& style) +void TDEFontChooser::style_chosen_slot(const TQString& style) { TQString currentStyle; if (style.isEmpty()) @@ -549,7 +549,7 @@ void KFontChooser::style_chosen_slot(const TQString& style) selectedStyle = style; } -void KFontChooser::displaySample(const TQFont& font) +void TDEFontChooser::displaySample(const TQFont& font) { sampleEdit->setFont(font); sampleEdit->setCursorPosition(0); @@ -561,7 +561,7 @@ void KFontChooser::displaySample(const TQFont& font) //kdDebug() << " (" << font.toString() << ")\n"; } -void KFontChooser::setupDisplay() +void TDEFontChooser::setupDisplay() { // Calling familyListBox->setCurrentItem() causes the value of selFont // to change, so we save the family, style and size beforehand. @@ -638,7 +638,7 @@ void KFontChooser::setupDisplay() } -void KFontChooser::getFontList( TQStringList &list, uint fontListCriteria) +void TDEFontChooser::getFontList( TQStringList &list, uint fontListCriteria) { TQFontDatabase dbase; TQStringList lstSys(dbase.families()); @@ -671,7 +671,7 @@ void KFontChooser::getFontList( TQStringList &list, uint fontListCriteria) list = lstSys; } -void KFontChooser::addFont( TQStringList &list, const char *xfont ) +void TDEFontChooser::addFont( TQStringList &list, const char *xfont ) { const char *ptr = strchr( xfont, '-' ); if ( !ptr ) @@ -699,7 +699,7 @@ void KFontChooser::addFont( TQStringList &list, const char *xfont ) } } -void KFontChooser::fillFamilyListBox(bool onlyFixedFonts) +void TDEFontChooser::fillFamilyListBox(bool onlyFixedFonts) { TQStringList fontList; getFontList(fontList, onlyFixedFonts?FixedWidthFonts:0); @@ -707,7 +707,7 @@ void KFontChooser::fillFamilyListBox(bool onlyFixedFonts) familyListBox->insertStringList(fontList); } -void KFontChooser::showXLFDArea(bool show) +void TDEFontChooser::showXLFDArea(bool show) { if( show ) { @@ -721,24 +721,24 @@ void KFontChooser::showXLFDArea(bool show) /////////////////////////////////////////////////////////////////////////////// -KFontDialog::KFontDialog( TQWidget *parent, const char* name, +TDEFontDialog::TDEFontDialog( TQWidget *parent, const char* name, bool onlyFixed, bool modal, const TQStringList &fontList, bool makeFrame, bool diff, TQButton::ToggleState *sizeIsRelativeState ) : KDialogBase( parent, name, modal, i18n("Select Font"), Ok|Cancel, Ok ) { - chooser = new KFontChooser( this, "fontChooser", + chooser = new TDEFontChooser( this, "fontChooser", onlyFixed, fontList, makeFrame, 8, diff, sizeIsRelativeState ); setMainWidget(chooser); } -int KFontDialog::getFontDiff( TQFont &theFont, int &diffFlags, bool onlyFixed, +int TDEFontDialog::getFontDiff( TQFont &theFont, int &diffFlags, bool onlyFixed, TQWidget *parent, bool makeFrame, TQButton::ToggleState *sizeIsRelativeState ) { - KFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(), + TDEFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(), makeFrame, true, sizeIsRelativeState ); dlg.setFont( theFont, onlyFixed ); @@ -753,11 +753,11 @@ int KFontDialog::getFontDiff( TQFont &theFont, int &diffFlags, bool onlyFixed, return result; } -int KFontDialog::getFont( TQFont &theFont, bool onlyFixed, +int TDEFontDialog::getFont( TQFont &theFont, bool onlyFixed, TQWidget *parent, bool makeFrame, TQButton::ToggleState *sizeIsRelativeState ) { - KFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(), + TDEFontDialog dlg( parent, "Font Selector", onlyFixed, true, TQStringList(), makeFrame, false, sizeIsRelativeState ); dlg.setFont( theFont, onlyFixed ); @@ -772,12 +772,12 @@ int KFontDialog::getFont( TQFont &theFont, bool onlyFixed, } -int KFontDialog::getFontAndText( TQFont &theFont, TQString &theString, +int TDEFontDialog::getFontAndText( TQFont &theFont, TQString &theString, bool onlyFixed, TQWidget *parent, bool makeFrame, TQButton::ToggleState *sizeIsRelativeState ) { - KFontDialog dlg( parent, "Font and Text Selector", onlyFixed, true, + TDEFontDialog dlg( parent, "Font and Text Selector", onlyFixed, true, TQStringList(), makeFrame, false, sizeIsRelativeState ); dlg.setFont( theFont, onlyFixed ); @@ -792,8 +792,8 @@ int KFontDialog::getFontAndText( TQFont &theFont, TQString &theString, return result; } -void KFontChooser::virtual_hook( int, void* ) +void TDEFontChooser::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KFontDialog::virtual_hook( int id, void* data ) +void TDEFontDialog::virtual_hook( int id, void* data ) { KDialogBase::virtual_hook( id, data ); } diff --git a/tdeui/kfontdialog.h b/tdeui/tdefontdialog.h index 7f859543c..02ffcbcd4 100644 --- a/tdeui/kfontdialog.h +++ b/tdeui/tdefontdialog.h @@ -36,22 +36,22 @@ class TQFont; class TQGroupBox; class TQLabel; class TQStringList; -class KListBox; +class TDEListBox; class KIntNumInput; /** * @short A font selection widget. * - * While KFontChooser as an ordinary widget can be embedded in + * While TDEFontChooser as an ordinary widget can be embedded in * custom dialogs and therefore is very flexible, in most cases * it is preferable to use the convenience functions in - * KFontDialog. + * TDEFontDialog. * - * \image html kfontchooser.png "KDE Font Chooser" + * \image html tdefontchooser.png "KDE Font Chooser" * * @author Preston Brown <pbrown@kde.org>, Bernd Wuebben <wuebben@kde.org> * @version $Id$ */ -class TDEUI_EXPORT KFontChooser : public TQWidget +class TDEUI_EXPORT TDEFontChooser : public TQWidget { Q_OBJECT TQ_PROPERTY( TQFont font READ font WRITE setFont ) @@ -79,8 +79,8 @@ public: * <p>Consider the following code snippet; * \code * TQStringList list; - * KFontChooser::getFontList(list,SmoothScalableFonts); - * KFontChooser chooseFont = new KFontChooser(0, "FontList", false, list); + * TDEFontChooser::getFontList(list,SmoothScalableFonts); + * TDEFontChooser chooseFont = new TDEFontChooser(0, "FontList", false, list); * \endcode * <p> * The above creates a font chooser dialog with only SmoothScaleble fonts. @@ -94,7 +94,7 @@ public: * If that has not been created, X is queried, and all fonts * available on the system are displayed. * @param diff Display the difference version dialog. - * See KFontDialog::getFontDiff(). + * See TDEFontDialog::getFontDiff(). * @param makeFrame Draws a frame with titles around the contents. * @param visibleListSize The minimum number of visible entries in the * fontlists. @@ -105,7 +105,7 @@ public: * *sizeIsRelativeState, user choice may be retrieved by * calling sizeIsRelative(). */ - KFontChooser(TQWidget *parent = 0L, const char *name = 0L, + TDEFontChooser(TQWidget *parent = 0L, const char *name = 0L, bool onlyFixed = false, const TQStringList &fontList = TQStringList(), bool makeFrame = true, int visibleListSize=8, @@ -114,7 +114,7 @@ public: /** * Destructs the font chooser. */ - virtual ~KFontChooser(); + virtual ~TDEFontChooser(); /** * Enables or disable a font column in the chooser. @@ -245,7 +245,7 @@ public: * * @param list The list is returned here. * @param fontListCriteria should contain all the restrictions for font selection as OR-ed values - * @see KFontChooser::FontListCriteria for the individual values + * @see TDEFontChooser::FontListCriteria for the individual values */ static void getFontList( TQStringList &list, uint fontListCriteria); @@ -291,9 +291,9 @@ private: TQCheckBox *styleCheckbox; TQCheckBox *sizeCheckbox; TQLabel *sizeLabel; - KListBox *familyListBox; - KListBox *styleListBox; - KListBox *sizeListBox; + TDEListBox *familyListBox; + TDEListBox *styleListBox; + TDEListBox *sizeListBox; TQComboBox *charsetsCombo; // BIC: remove in KDE4 TQCheckBox *sizeIsRelativeCheckBox; @@ -308,17 +308,17 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KFontChooserPrivate; - KFontChooserPrivate *d; + class TDEFontChooserPrivate; + TDEFontChooserPrivate *d; }; /** * @short A font selection dialog. * - * The KFontDialog provides a dialog for interactive font selection. - * It is basically a thin wrapper around the KFontChooser widget, + * The TDEFontDialog provides a dialog for interactive font selection. + * It is basically a thin wrapper around the TDEFontChooser widget, * which can also be used standalone. In most cases, the simplest - * use of this class is the static method KFontDialog::getFont(), + * use of this class is the static method TDEFontDialog::getFont(), * which pops up the dialog, allows the user to select a font, and * returns when the dialog is closed. * @@ -326,17 +326,17 @@ private: * * \code * TQFont myFont; - * int result = KFontDialog::getFont( myFont ); - * if ( result == KFontDialog::Accepted ) + * int result = TDEFontDialog::getFont( myFont ); + * if ( result == TDEFontDialog::Accepted ) * ... * \endcode * - * \image html kfontdialog.png "KDE Font Dialog" + * \image html tdefontdialog.png "KDE Font Dialog" * * @author Preston Brown <pbrown@kde.org>, Bernd Wuebben <wuebben@kde.org> * @version $Id$ */ -class TDEUI_EXPORT KFontDialog : public KDialogBase { +class TDEUI_EXPORT TDEFontDialog : public KDialogBase { Q_OBJECT public: @@ -362,7 +362,7 @@ public: * calling sizeIsRelative(). * */ - KFontDialog( TQWidget *parent = 0L, const char *name = 0, + TDEFontDialog( TQWidget *parent = 0L, const char *name = 0, bool onlyFixed = false, bool modal = false, const TQStringList &fontlist = TQStringList(), bool makeFrame = true, bool diff = false, @@ -434,11 +434,11 @@ public: * difference selection bitmask should be written. * Check the returned bitmask like: * \code - * if ( diffFlags & KFontChooser::FontDiffFamily ) + * if ( diffFlags & TDEFontChooser::FontDiffFamily ) * [...] - * if ( diffFlags & KFontChooser::FontDiffStyle ) + * if ( diffFlags & TDEFontChooser::FontDiffStyle ) * [...] - * if ( diffFlags & KFontChooser::FontDiffSize ) + * if ( diffFlags & TDEFontChooser::FontDiffSize ) * [...] * \endcode * @param onlyFixed if true, only select from fixed-width fonts. @@ -491,13 +491,13 @@ signals: void fontSelected( const TQFont &font ); protected: - KFontChooser *chooser; + TDEFontChooser *chooser; protected: virtual void virtual_hook( int id, void* data ); private: - class KFontDialogPrivate; - KFontDialogPrivate *d; + class TDEFontDialogPrivate; + TDEFontDialogPrivate *d; }; diff --git a/tdeui/kfontrequester.cpp b/tdeui/tdefontrequester.cpp index 293f9d546..459938d12 100644 --- a/tdeui/kfontrequester.cpp +++ b/tdeui/tdefontrequester.cpp @@ -17,7 +17,7 @@ Boston, MA 02110-1301, USA. */ -#include "kfontrequester.h" +#include "tdefontrequester.h" #include <tqlabel.h> #include <tqpushbutton.h> @@ -25,10 +25,10 @@ #include <tqtooltip.h> #include <tqwhatsthis.h> -#include <kfontdialog.h> -#include <klocale.h> +#include <tdefontdialog.h> +#include <tdelocale.h> -KFontRequester::KFontRequester( TQWidget *parent, const char *name, +TDEFontRequester::TDEFontRequester( TQWidget *parent, const char *name, bool onlyFixed ) : TQWidget( parent, name ), m_onlyFixed( onlyFixed ) { @@ -49,7 +49,7 @@ KFontRequester::KFontRequester( TQWidget *parent, const char *name, setToolTip(); } -void KFontRequester::setFont( const TQFont &font, bool onlyFixed ) +void TDEFontRequester::setFont( const TQFont &font, bool onlyFixed ) { m_selFont = font; m_onlyFixed = onlyFixed; @@ -58,21 +58,21 @@ void KFontRequester::setFont( const TQFont &font, bool onlyFixed ) emit fontSelected( m_selFont ); } -void KFontRequester::setSampleText( const TQString &text ) +void TDEFontRequester::setSampleText( const TQString &text ) { m_sampleText = text; displaySampleText(); } -void KFontRequester::setTitle( const TQString &title ) +void TDEFontRequester::setTitle( const TQString &title ) { m_title = title; setToolTip(); } -void KFontRequester::buttonClicked() +void TDEFontRequester::buttonClicked() { - int result = KFontDialog::getFont( m_selFont, m_onlyFixed, parentWidget() ); + int result = TDEFontDialog::getFont( m_selFont, m_onlyFixed, parentWidget() ); if ( result == KDialog::Accepted ) { @@ -81,7 +81,7 @@ void KFontRequester::buttonClicked() } } -void KFontRequester::displaySampleText() +void TDEFontRequester::displaySampleText() { m_sampleLabel->setFont( m_selFont ); @@ -96,7 +96,7 @@ void KFontRequester::displaySampleText() m_sampleLabel->setText( m_sampleText ); } -void KFontRequester::setToolTip() +void TDEFontRequester::setToolTip() { TQToolTip::remove( m_button ); TQToolTip::add( m_button, i18n( "Click to select a font" ) ); @@ -121,7 +121,7 @@ void KFontRequester::setToolTip() } } -#include "kfontrequester.moc" +#include "tdefontrequester.moc" /* vim: et sw=2 ts=2 */ diff --git a/tdeui/kfontrequester.h b/tdeui/tdefontrequester.h index 5d59f5897..7117585ef 100644 --- a/tdeui/kfontrequester.h +++ b/tdeui/tdefontrequester.h @@ -31,17 +31,17 @@ class TQPushButton; /** * This class provides a widget with a lineedit and a button, which invokes - * a font dialog (KFontDialog). + * a font dialog (TDEFontDialog). * * The lineedit provides a preview of the selected font. The preview text can * be customized. You can also have the font dialog show only the fixed fonts. * - * \image html kfontrequester.png "KDE Font Requester" + * \image html tdefontrequester.png "KDE Font Requester" * * @author Nadeem Hasan <nhasan@kde.org> * */ -class TDEUI_EXPORT KFontRequester : public TQWidget +class TDEUI_EXPORT TDEFontRequester : public TQWidget { Q_OBJECT @@ -59,7 +59,7 @@ class TDEUI_EXPORT KFontRequester : public TQWidget * @param onlyFixed Only display fonts which have fixed-width character * sizes. */ - KFontRequester( TQWidget *parent=0L, const char *name=0L, + TDEFontRequester( TQWidget *parent=0L, const char *name=0L, bool onlyFixed=false ); /** @@ -147,8 +147,8 @@ class TDEUI_EXPORT KFontRequester : public TQWidget private: - class KFontRequesterPrivate; - KFontRequesterPrivate *d; + class TDEFontRequesterPrivate; + TDEFontRequesterPrivate *d; }; #endif // KFONTREQUESTER_H diff --git a/tdeui/klistbox.cpp b/tdeui/tdelistbox.cpp index 13c5ab325..0e4c5d520 100644 --- a/tdeui/klistbox.cpp +++ b/tdeui/tdelistbox.cpp @@ -19,22 +19,22 @@ #include <tqtimer.h> -#include <kglobalsettings.h> +#include <tdeglobalsettings.h> #include <kcursor.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kipc.h> #include <kdebug.h> -#include "klistbox.h" +#include "tdelistbox.h" -KListBox::KListBox( TQWidget *parent, const char *name, WFlags f ) +TDEListBox::TDEListBox( TQWidget *parent, const char *name, WFlags f ) : TQListBox( parent, name, f ), d(0) { connect( this, TQT_SIGNAL( onViewport() ), this, TQT_SLOT( slotOnViewport() ) ); connect( this, TQT_SIGNAL( onItem( TQListBoxItem * ) ), this, TQT_SLOT( slotOnItem( TQListBoxItem * ) ) ); - slotSettingsChanged(KApplication::SETTINGS_MOUSE); + slotSettingsChanged(TDEApplication::SETTINGS_MOUSE); if (kapp) { connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) ); @@ -48,7 +48,7 @@ KListBox::KListBox( TQWidget *parent, const char *name, WFlags f ) this, TQT_SLOT( slotAutoSelect() ) ); } -void KListBox::slotOnItem( TQListBoxItem *item ) +void TDEListBox::slotOnItem( TQListBoxItem *item ) { if ( item && m_bChangeCursorOverItem && m_bUseSingle ) viewport()->setCursor( KCursor().handCursor() ); @@ -59,7 +59,7 @@ void KListBox::slotOnItem( TQListBoxItem *item ) } } -void KListBox::slotOnViewport() +void TDEListBox::slotOnViewport() { if ( m_bChangeCursorOverItem ) viewport()->unsetCursor(); @@ -69,11 +69,11 @@ void KListBox::slotOnViewport() } -void KListBox::slotSettingsChanged(int category) +void TDEListBox::slotSettingsChanged(int category) { - if (category != KApplication::SETTINGS_MOUSE) + if (category != TDEApplication::SETTINGS_MOUSE) return; - m_bUseSingle = KGlobalSettings::singleClick(); + m_bUseSingle = TDEGlobalSettings::singleClick(); disconnect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *, const TQPoint & ) ), @@ -99,14 +99,14 @@ void KListBox::slotSettingsChanged(int category) // const TQPoint & ) ) ); } - m_bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon(); - m_autoSelectDelay = KGlobalSettings::autoSelectDelay(); + m_bChangeCursorOverItem = TDEGlobalSettings::changeCursorOverIcon(); + m_autoSelectDelay = TDEGlobalSettings::autoSelectDelay(); if( !m_bUseSingle || !m_bChangeCursorOverItem ) viewport()->unsetCursor(); } -void KListBox::slotAutoSelect() +void TDEListBox::slotAutoSelect() { // check that the item still exists if( index( m_pCurrentItem ) == -1 ) @@ -116,7 +116,7 @@ void KListBox::slotAutoSelect() if( !hasFocus() ) setFocus(); - ButtonState keybstate = KApplication::keyboardMouseState(); + ButtonState keybstate = TDEApplication::keyboardMouseState(); TQListBoxItem* previousItem = item( currentItem() ); setCurrentItem( m_pCurrentItem ); @@ -176,9 +176,9 @@ void KListBox::slotAutoSelect() kdDebug() << "That´s not supposed to happen!!!!" << endl; } -void KListBox::emitExecute( TQListBoxItem *item, const TQPoint &pos ) +void TDEListBox::emitExecute( TQListBoxItem *item, const TQPoint &pos ) { - ButtonState keybstate = KApplication::keyboardMouseState(); + ButtonState keybstate = TDEApplication::keyboardMouseState(); m_pAutoSelect->stop(); @@ -196,7 +196,7 @@ void KListBox::emitExecute( TQListBoxItem *item, const TQPoint &pos ) // to start help or close the dialog. This functionality // should be done in TQListView but it is not (at least now) // -void KListBox::keyPressEvent(TQKeyEvent *e) +void TDEListBox::keyPressEvent(TQKeyEvent *e) { if( e->key() == Key_Escape ) { @@ -212,21 +212,21 @@ void KListBox::keyPressEvent(TQKeyEvent *e) } } -void KListBox::focusOutEvent( TQFocusEvent *fe ) +void TDEListBox::focusOutEvent( TQFocusEvent *fe ) { m_pAutoSelect->stop(); TQListBox::focusOutEvent( fe ); } -void KListBox::leaveEvent( TQEvent *e ) +void TDEListBox::leaveEvent( TQEvent *e ) { m_pAutoSelect->stop(); TQListBox::leaveEvent( e ); } -void KListBox::contentsMousePressEvent( TQMouseEvent *e ) +void TDEListBox::contentsMousePressEvent( TQMouseEvent *e ) { if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) { bool block = signalsBlocked(); @@ -240,7 +240,7 @@ void KListBox::contentsMousePressEvent( TQMouseEvent *e ) TQListBox::contentsMousePressEvent( e ); } -void KListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) +void TDEListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) { TQListBox::contentsMouseDoubleClickEvent( e ); @@ -254,13 +254,13 @@ void KListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) } } -void KListBox::slotMouseButtonClicked( int btn, TQListBoxItem *item, const TQPoint &pos ) +void TDEListBox::slotMouseButtonClicked( int btn, TQListBoxItem *item, const TQPoint &pos ) { if( (btn == Qt::LeftButton) && item ) emitExecute( item, pos ); } -void KListBox::virtual_hook( int, void* ) +void TDEListBox::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -#include "klistbox.moc" +#include "tdelistbox.moc" diff --git a/tdeui/klistbox.h b/tdeui/tdelistbox.h index 981cfa3a3..8ef949527 100644 --- a/tdeui/klistbox.h +++ b/tdeui/tdelistbox.h @@ -37,12 +37,12 @@ * settings. If you want to get informed when the user selects * something connect to the TQListBox::selectionChanged() signal. **/ -class TDEUI_EXPORT KListBox : public TQListBox +class TDEUI_EXPORT TDEListBox : public TQListBox { Q_OBJECT public: - KListBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); + TDEListBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); signals: @@ -121,8 +121,8 @@ private slots: protected: virtual void virtual_hook( int id, void* data ); private: - class KListBoxPrivate; - KListBoxPrivate* const d; + class TDEListBoxPrivate; + TDEListBoxPrivate* const d; }; #endif diff --git a/tdeui/klistview.cpp b/tdeui/tdelistview.cpp index b52fe6876..4750a7138 100644 --- a/tdeui/klistview.cpp +++ b/tdeui/tdelistview.cpp @@ -27,20 +27,20 @@ #include <tqstyle.h> #include <tqpainter.h> -#include <kglobalsettings.h> -#include <kconfig.h> +#include <tdeglobalsettings.h> +#include <tdeconfig.h> #include <kcursor.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kipc.h> #include <kdebug.h> -#include "klistview.h" -#include "klistviewlineedit.h" +#include "tdelistview.h" +#include "tdelistviewlineedit.h" -class KListView::Tooltip : public TQToolTip +class TDEListView::Tooltip : public TQToolTip { public: - Tooltip (KListView* parent, TQToolTipGroup* group = 0L); + Tooltip (TDEListView* parent, TQToolTipGroup* group = 0L); virtual ~Tooltip () {} protected: @@ -50,29 +50,29 @@ protected: virtual void maybeTip (const TQPoint&); private: - KListView* mParent; + TDEListView* mParent; }; -KListView::Tooltip::Tooltip (KListView* parent, TQToolTipGroup* group) +TDEListView::Tooltip::Tooltip (TDEListView* parent, TQToolTipGroup* group) : TQToolTip (parent, group), mParent (parent) { } -void KListView::Tooltip::maybeTip (const TQPoint&) +void TDEListView::Tooltip::maybeTip (const TQPoint&) { // FIXME } -class KListView::KListViewPrivate +class TDEListView::TDEListViewPrivate { public: - KListViewPrivate (KListView* listview) + TDEListViewPrivate (TDEListView* listview) : pCurrentItem (0), autoSelectDelay(0), dragOverItem(0), - dragDelay (KGlobalSettings::dndEventDelay()), - editor (new KListViewLineEdit (listview)), + dragDelay (TDEGlobalSettings::dndEventDelay()), + editor (new TDEListViewLineEdit (listview)), cursorInExecuteArea(false), itemsMovable (true), selectedBySimpleMove(false), @@ -94,20 +94,20 @@ public: selectionDirection(0), tooltipColumn (0), selectionMode (Single), - contextMenuKey (KGlobalSettings::contextMenuKey()), - showContextMenusOnPress (KGlobalSettings::showContextMenusOnPress()), + contextMenuKey (TDEGlobalSettings::contextMenuKey()), + showContextMenusOnPress (TDEGlobalSettings::showContextMenusOnPress()), mDropVisualizerWidth (4), paintAbove (0), paintCurrent (0), paintBelow (0), painting (false), - shadeSortColumn(KGlobalSettings::shadeSortColumn()) + shadeSortColumn(TDEGlobalSettings::shadeSortColumn()) { renameable.append(0); connect(editor, TQT_SIGNAL(done(TQListViewItem*,int)), listview, TQT_SLOT(doneEditing(TQListViewItem*,int))); } - ~KListViewPrivate () + ~TDEListViewPrivate () { delete editor; } @@ -124,7 +124,7 @@ public: TQPoint startDragPos; int dragDelay; - KListViewLineEdit *editor; + TDEListViewLineEdit *editor; TQValueList<int> renameable; bool cursorInExecuteArea:1; @@ -173,7 +173,7 @@ public: }; -KListViewLineEdit::KListViewLineEdit(KListView *parent) +TDEListViewLineEdit::TDEListViewLineEdit(TDEListView *parent) : KLineEdit(parent->viewport()), item(0), col(0), p(parent) { setFrame( false ); @@ -183,16 +183,16 @@ KListViewLineEdit::KListViewLineEdit(KListView *parent) TQT_SLOT( slotItemRemoved( TQListViewItem * ) )); } -KListViewLineEdit::~KListViewLineEdit() +TDEListViewLineEdit::~TDEListViewLineEdit() { } -TQListViewItem *KListViewLineEdit::currentItem() const +TQListViewItem *TDEListViewLineEdit::currentItem() const { return item; } -void KListViewLineEdit::load(TQListViewItem *i, int c) +void TDEListViewLineEdit::load(TQListViewItem *i, int c) { item=i; col=c; @@ -232,7 +232,7 @@ void KListViewLineEdit::load(TQListViewItem *i, int c) * tabOrderedRename functionality. */ -static int nextCol (KListView *pl, TQListViewItem *pi, int start, int dir) +static int nextCol (TDEListView *pl, TQListViewItem *pi, int start, int dir) { if (pi) { @@ -273,7 +273,7 @@ static TQListViewItem *lastQChild (TQListViewItem *pi) return pi; } -void KListViewLineEdit::selectNextCell (TQListViewItem *pitem, int column, bool forward) +void TDEListViewLineEdit::selectNextCell (TQListViewItem *pitem, int column, bool forward) { const int ncols = p->columns(); const int dir = forward ? +1 : -1; @@ -321,7 +321,7 @@ void KListViewLineEdit::selectNextCell (TQListViewItem *pitem, int column, bool #undef KeyPress #endif -bool KListViewLineEdit::event (TQEvent *pe) +bool TDEListViewLineEdit::event (TQEvent *pe) { if (pe->type() == TQEvent::KeyPress) { @@ -340,7 +340,7 @@ bool KListViewLineEdit::event (TQEvent *pe) return KLineEdit::event(pe); } -void KListViewLineEdit::keyPressEvent(TQKeyEvent *e) +void TDEListViewLineEdit::keyPressEvent(TQKeyEvent *e) { if(e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) terminate(true); @@ -355,16 +355,16 @@ void KListViewLineEdit::keyPressEvent(TQKeyEvent *e) KLineEdit::keyPressEvent(e); } -void KListViewLineEdit::terminate() +void TDEListViewLineEdit::terminate() { terminate(true); } -void KListViewLineEdit::terminate(bool commit) +void TDEListViewLineEdit::terminate(bool commit) { if ( item ) { - //kdDebug() << "KListViewLineEdit::terminate " << commit << endl; + //kdDebug() << "TDEListViewLineEdit::terminate " << commit << endl; if (commit) item->setText(col, text()); int c=col; @@ -378,7 +378,7 @@ void KListViewLineEdit::terminate(bool commit) } } -void KListViewLineEdit::focusOutEvent(TQFocusEvent *ev) +void TDEListViewLineEdit::focusOutEvent(TQFocusEvent *ev) { TQFocusEvent * focusEv = static_cast<TQFocusEvent*>(ev); // Don't let a RMB close the editor @@ -388,7 +388,7 @@ void KListViewLineEdit::focusOutEvent(TQFocusEvent *ev) KLineEdit::focusOutEvent(ev); } -void KListViewLineEdit::paintEvent( TQPaintEvent *e ) +void TDEListViewLineEdit::paintEvent( TQPaintEvent *e ) { KLineEdit::paintEvent( e ); @@ -402,7 +402,7 @@ void KListViewLineEdit::paintEvent( TQPaintEvent *e ) // selection changed -> terminate. As our "item" can be already deleted, // we can't call terminate(false), because that would emit done() with // a dangling pointer to "item". -void KListViewLineEdit::slotSelectionChanged() +void TDEListViewLineEdit::slotSelectionChanged() { item = 0; col = 0; @@ -411,7 +411,7 @@ void KListViewLineEdit::slotSelectionChanged() // if the current item was removed -> terminate. Can't call terminate(false) // due to same reason as slotSelectionChanged(). -void KListViewLineEdit::slotItemRemoved(TQListViewItem *i) +void TDEListViewLineEdit::slotItemRemoved(TQListViewItem *i) { if (currentItem() != i) return; @@ -422,9 +422,9 @@ void KListViewLineEdit::slotItemRemoved(TQListViewItem *i) } -KListView::KListView( TQWidget *parent, const char *name ) +TDEListView::TDEListView( TQWidget *parent, const char *name ) : TQListView( parent, name ), - d (new KListViewPrivate (this)) + d (new TDEListViewPrivate (this)) { setDragAutoScroll(true); @@ -438,7 +438,7 @@ KListView::KListView( TQWidget *parent, const char *name ) connect (this, TQT_SIGNAL(contentsMoving(int,int)), this, TQT_SLOT(cleanItemHighlighter())); - slotSettingsChanged(KApplication::SETTINGS_MOUSE); + slotSettingsChanged(TDEApplication::SETTINGS_MOUSE); if (kapp) { connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) ); @@ -462,17 +462,17 @@ KListView::KListView( TQWidget *parent, const char *name ) this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); } - connect (this, TQT_SIGNAL (menuShortCutPressed (KListView*, TQListViewItem*)), - this, TQT_SLOT (emitContextMenu (KListView*, TQListViewItem*))); - d->alternateBackground = KGlobalSettings::alternateBackgroundColor(); + connect (this, TQT_SIGNAL (menuShortCutPressed (TDEListView*, TQListViewItem*)), + this, TQT_SLOT (emitContextMenu (TDEListView*, TQListViewItem*))); + d->alternateBackground = TDEGlobalSettings::alternateBackgroundColor(); } -KListView::~KListView() +TDEListView::~TDEListView() { delete d; } -bool KListView::isExecuteArea( const TQPoint& point ) +bool TDEListView::isExecuteArea( const TQPoint& point ) { TQListViewItem* item = itemAt( point ); if ( item ) { @@ -482,12 +482,12 @@ bool KListView::isExecuteArea( const TQPoint& point ) return false; } -bool KListView::isExecuteArea( int x ) +bool TDEListView::isExecuteArea( int x ) { return isExecuteArea( x, 0 ); } -bool KListView::isExecuteArea( int x, TQListViewItem* item ) +bool TDEListView::isExecuteArea( int x, TQListViewItem* item ) { if( allColumnsShowFocus() ) return true; @@ -521,7 +521,7 @@ bool KListView::isExecuteArea( int x, TQListViewItem* item ) } } -void KListView::slotOnItem( TQListViewItem *item ) +void TDEListView::slotOnItem( TQListViewItem *item ) { TQPoint vp = viewport()->mapFromGlobal( TQCursor::pos() ); if ( item && isExecuteArea( vp.x() ) && (d->autoSelectDelay > -1) && d->bUseSingle ) { @@ -530,7 +530,7 @@ void KListView::slotOnItem( TQListViewItem *item ) } } -void KListView::slotOnViewport() +void TDEListView::slotOnViewport() { if ( d->bChangeCursorOverItem ) viewport()->unsetCursor(); @@ -539,13 +539,13 @@ void KListView::slotOnViewport() d->pCurrentItem = 0L; } -void KListView::slotSettingsChanged(int category) +void TDEListView::slotSettingsChanged(int category) { switch (category) { - case KApplication::SETTINGS_MOUSE: - d->dragDelay = KGlobalSettings::dndEventDelay(); - d->bUseSingle = KGlobalSettings::singleClick(); + case TDEApplication::SETTINGS_MOUSE: + d->dragDelay = TDEGlobalSettings::dndEventDelay(); + d->bUseSingle = TDEGlobalSettings::singleClick(); disconnect(this, TQT_SIGNAL (mouseButtonClicked (int, TQListViewItem*, const TQPoint &, int)), this, TQT_SLOT (slotMouseButtonClicked (int, TQListViewItem*, const TQPoint &, int))); @@ -554,18 +554,18 @@ void KListView::slotSettingsChanged(int category) connect (this, TQT_SIGNAL (mouseButtonClicked (int, TQListViewItem*, const TQPoint &, int)), this, TQT_SLOT (slotMouseButtonClicked( int, TQListViewItem*, const TQPoint &, int))); - d->bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon(); + d->bChangeCursorOverItem = TDEGlobalSettings::changeCursorOverIcon(); if ( !d->disableAutoSelection ) - d->autoSelectDelay = KGlobalSettings::autoSelectDelay(); + d->autoSelectDelay = TDEGlobalSettings::autoSelectDelay(); if( !d->bUseSingle || !d->bChangeCursorOverItem ) viewport()->unsetCursor(); break; - case KApplication::SETTINGS_POPUPMENU: - d->contextMenuKey = KGlobalSettings::contextMenuKey (); - d->showContextMenusOnPress = KGlobalSettings::showContextMenusOnPress (); + case TDEApplication::SETTINGS_POPUPMENU: + d->contextMenuKey = TDEGlobalSettings::contextMenuKey (); + d->showContextMenusOnPress = TDEGlobalSettings::showContextMenusOnPress (); if (d->showContextMenusOnPress) { @@ -588,7 +588,7 @@ void KListView::slotSettingsChanged(int category) } } -void KListView::slotAutoSelect() +void TDEListView::slotAutoSelect() { // check that the item still exists if( itemIndex( d->pCurrentItem ) == -1 ) @@ -604,7 +604,7 @@ void KListView::slotAutoSelect() if( !hasFocus() ) setFocus(); - ButtonState keybstate = KApplication::keyboardMouseState(); + ButtonState keybstate = TDEApplication::keyboardMouseState(); TQListViewItem* previousItem = currentItem(); setCurrentItem( d->pCurrentItem ); @@ -646,7 +646,7 @@ void KListView::slotAutoSelect() if( selectionMode() == TQListView::Single ) emit selectionChanged( d->pCurrentItem ); } - else if( (keybstate & KApplication::ControlModifier) ) + else if( (keybstate & TDEApplication::ControlModifier) ) setSelected( d->pCurrentItem, !d->pCurrentItem->isSelected() ); else { bool block = signalsBlocked(); @@ -661,10 +661,10 @@ void KListView::slotAutoSelect() } } else - kdDebug() << "KListView::slotAutoSelect: That�s not supposed to happen!!!!" << endl; + kdDebug() << "TDEListView::slotAutoSelect: That�s not supposed to happen!!!!" << endl; } -void KListView::slotHeaderChanged() +void TDEListView::slotHeaderChanged() { const int colCount = columns(); @@ -677,7 +677,7 @@ void KListView::slotHeaderChanged() } } -void KListView::emitExecute( TQListViewItem *item, const TQPoint &pos, int c ) +void TDEListView::emitExecute( TQListViewItem *item, const TQPoint &pos, int c ) { if( isExecuteArea( viewport()->mapFromGlobal(pos) ) ) { d->validDrag=false; @@ -691,7 +691,7 @@ void KListView::emitExecute( TQListViewItem *item, const TQPoint &pos, int c ) } else { - ButtonState keybstate = KApplication::keyboardMouseState(); + ButtonState keybstate = TDEApplication::keyboardMouseState(); d->autoSelect.stop(); @@ -705,9 +705,9 @@ void KListView::emitExecute( TQListViewItem *item, const TQPoint &pos, int c ) } } -void KListView::focusInEvent( TQFocusEvent *fe ) +void TDEListView::focusInEvent( TQFocusEvent *fe ) { - // kdDebug()<<"KListView::focusInEvent()"<<endl; + // kdDebug()<<"TDEListView::focusInEvent()"<<endl; TQListView::focusInEvent( fe ); if ((d->selectedBySimpleMove) && (d->selectionMode == FileManager) @@ -721,7 +721,7 @@ void KListView::focusInEvent( TQFocusEvent *fe ) }; } -void KListView::focusOutEvent( TQFocusEvent *fe ) +void TDEListView::focusOutEvent( TQFocusEvent *fe ) { cleanDropVisualizer(); cleanItemHighlighter(); @@ -743,22 +743,22 @@ void KListView::focusOutEvent( TQFocusEvent *fe ) TQListView::focusOutEvent( fe ); } -void KListView::leaveEvent( TQEvent *e ) +void TDEListView::leaveEvent( TQEvent *e ) { d->autoSelect.stop(); TQListView::leaveEvent( e ); } -bool KListView::event( TQEvent *e ) +bool TDEListView::event( TQEvent *e ) { if (e->type() == TQEvent::ApplicationPaletteChange) - d->alternateBackground=KGlobalSettings::alternateBackgroundColor(); + d->alternateBackground=TDEGlobalSettings::alternateBackgroundColor(); return TQListView::event(e); } -void KListView::contentsMousePressEvent( TQMouseEvent *e ) +void TDEListView::contentsMousePressEvent( TQMouseEvent *e ) { if( (selectionModeExt() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) { @@ -805,7 +805,7 @@ void KListView::contentsMousePressEvent( TQMouseEvent *e ) TQListView::contentsMousePressEvent( e ); } -void KListView::contentsMouseMoveEvent( TQMouseEvent *e ) +void TDEListView::contentsMouseMoveEvent( TQMouseEvent *e ) { if (!dragEnabled() || d->startDragPos.isNull() || !d->validDrag) TQListView::contentsMouseMoveEvent (e); @@ -845,7 +845,7 @@ void KListView::contentsMouseMoveEvent( TQMouseEvent *e ) } } -void KListView::contentsMouseReleaseEvent( TQMouseEvent *e ) +void TDEListView::contentsMouseReleaseEvent( TQMouseEvent *e ) { if (e->button() == Qt::LeftButton) { @@ -878,7 +878,7 @@ void KListView::contentsMouseReleaseEvent( TQMouseEvent *e ) TQListView::contentsMouseReleaseEvent( e ); } -void KListView::contentsMouseDoubleClickEvent ( TQMouseEvent *e ) +void TDEListView::contentsMouseDoubleClickEvent ( TQMouseEvent *e ) { // We don't want to call the parent method because it does setOpen, // whereas we don't do it in single click mode... (David) @@ -900,13 +900,13 @@ void KListView::contentsMouseDoubleClickEvent ( TQMouseEvent *e ) } } -void KListView::slotMouseButtonClicked( int btn, TQListViewItem *item, const TQPoint &pos, int c ) +void TDEListView::slotMouseButtonClicked( int btn, TQListViewItem *item, const TQPoint &pos, int c ) { if( (btn == Qt::LeftButton) && item ) emitExecute(item, pos, c); } -void KListView::contentsDropEvent(TQDropEvent* e) +void TDEListView::contentsDropEvent(TQDropEvent* e) { cleanDropVisualizer(); cleanItemHighlighter(); @@ -932,7 +932,7 @@ void KListView::contentsDropEvent(TQDropEvent* e) } } -void KListView::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme) +void TDEListView::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme) { TQPtrList<TQListViewItem> items, afterFirsts, afterNows; TQListViewItem *current=currentItem(); @@ -982,7 +982,7 @@ void KListView::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterm emit moved(); } -void KListView::contentsDragMoveEvent(TQDragMoveEvent *event) +void TDEListView::contentsDragMoveEvent(TQDragMoveEvent *event) { if (acceptDrag(event)) { @@ -1026,20 +1026,20 @@ void KListView::contentsDragMoveEvent(TQDragMoveEvent *event) event->ignore(); } -void KListView::slotDragExpand() +void TDEListView::slotDragExpand() { if ( itemAt( d->dragOverPoint ) == d->dragOverItem ) d->dragOverItem->setOpen( true ); } -void KListView::contentsDragLeaveEvent (TQDragLeaveEvent*) +void TDEListView::contentsDragLeaveEvent (TQDragLeaveEvent*) { d->dragExpand.stop(); cleanDropVisualizer(); cleanItemHighlighter(); } -void KListView::cleanDropVisualizer() +void TDEListView::cleanDropVisualizer() { if (d->mOldDropVisualizer.isValid()) { @@ -1049,12 +1049,12 @@ void KListView::cleanDropVisualizer() } } -int KListView::depthToPixels( int depth ) +int TDEListView::depthToPixels( int depth ) { return treeStepSize() * ( depth + (rootIsDecorated() ? 1 : 0) ) + itemMargin(); } -void KListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after) +void TDEListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after) { TQPoint p (contentsToViewport(pos)); @@ -1123,7 +1123,7 @@ void KListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListView parent = after ? after->parent() : 0L ; } -TQListViewItem* KListView::lastChild () const +TQListViewItem* TDEListView::lastChild () const { TQListViewItem* lastchild = firstChild(); @@ -1133,7 +1133,7 @@ TQListViewItem* KListView::lastChild () const return lastchild; } -TQListViewItem *KListView::lastItem() const +TQListViewItem *TDEListView::lastItem() const { TQListViewItem* last = lastChild(); @@ -1143,12 +1143,12 @@ TQListViewItem *KListView::lastItem() const return last; } -KLineEdit *KListView::renameLineEdit() const +KLineEdit *TDEListView::renameLineEdit() const { return d->editor; } -void KListView::startDrag() +void TDEListView::startDrag() { TQDragObject *drag = dragObject(); @@ -1159,7 +1159,7 @@ void KListView::startDrag() emit moved(); } -TQDragObject *KListView::dragObject() +TQDragObject *TDEListView::dragObject() { if (!currentItem()) return 0; @@ -1168,63 +1168,63 @@ TQDragObject *KListView::dragObject() return new TQStoredDrag("application/x-qlistviewitem", viewport()); } -void KListView::setItemsMovable(bool b) +void TDEListView::setItemsMovable(bool b) { d->itemsMovable=b; } -bool KListView::itemsMovable() const +bool TDEListView::itemsMovable() const { return d->itemsMovable; } -void KListView::setItemsRenameable(bool b) +void TDEListView::setItemsRenameable(bool b) { d->itemsRenameable=b; } -bool KListView::itemsRenameable() const +bool TDEListView::itemsRenameable() const { return d->itemsRenameable; } -void KListView::setDragEnabled(bool b) +void TDEListView::setDragEnabled(bool b) { d->dragEnabled=b; } -bool KListView::dragEnabled() const +bool TDEListView::dragEnabled() const { return d->dragEnabled; } -void KListView::setAutoOpen(bool b) +void TDEListView::setAutoOpen(bool b) { d->autoOpen=b; } -bool KListView::autoOpen() const +bool TDEListView::autoOpen() const { return d->autoOpen; } -bool KListView::dropVisualizer() const +bool TDEListView::dropVisualizer() const { return d->dropVisualizer; } -void KListView::setDropVisualizer(bool b) +void TDEListView::setDropVisualizer(bool b) { d->dropVisualizer=b; } -TQPtrList<TQListViewItem> KListView::selectedItems() const +TQPtrList<TQListViewItem> TDEListView::selectedItems() const { return selectedItems(true); } -TQPtrList<TQListViewItem> KListView::selectedItems(bool includeHiddenItems) const +TQPtrList<TQListViewItem> TDEListView::selectedItems(bool includeHiddenItems) const { TQPtrList<TQListViewItem> list; @@ -1248,7 +1248,7 @@ TQPtrList<TQListViewItem> KListView::selectedItems(bool includeHiddenItems) cons flags |= TQListViewItemIterator::Visible; } - TQListViewItemIterator it(const_cast<KListView *>(this), flags); + TQListViewItemIterator it(const_cast<TDEListView *>(this), flags); for(; it.current(); ++it) list.append(it.current()); @@ -1261,7 +1261,7 @@ TQPtrList<TQListViewItem> KListView::selectedItems(bool includeHiddenItems) cons } -void KListView::moveItem(TQListViewItem *item, TQListViewItem *parent, TQListViewItem *after) +void TDEListView::moveItem(TQListViewItem *item, TQListViewItem *parent, TQListViewItem *after) { // sanity check - don't move a item into its own child structure TQListViewItem *i = parent; @@ -1291,18 +1291,18 @@ void KListView::moveItem(TQListViewItem *item, TQListViewItem *parent, TQListVie insertItem(item); } -void KListView::contentsDragEnterEvent(TQDragEnterEvent *event) +void TDEListView::contentsDragEnterEvent(TQDragEnterEvent *event) { if (acceptDrag (event)) event->accept(); } -void KListView::setDropVisualizerWidth (int w) +void TDEListView::setDropVisualizerWidth (int w) { d->mDropVisualizerWidth = w > 0 ? w : 1; } -TQRect KListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, +TQRect TDEListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, TQListViewItem *after) { TQRect insertmarker; @@ -1341,7 +1341,7 @@ TQRect KListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, insertmarker.setBottom (insertmarker.bottom() + d->mDropVisualizerWidth/2); } - // This is not used anymore, at least by KListView itself (see viewportPaintEvent) + // This is not used anymore, at least by TDEListView itself (see viewportPaintEvent) // Remove for KDE 4.0. if (p) p->fillRect(insertmarker, Dense4Pattern); @@ -1349,7 +1349,7 @@ TQRect KListView::drawDropVisualizer(TQPainter *p, TQListViewItem *parent, return insertmarker; } -TQRect KListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item) +TQRect TDEListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item) { TQRect r; @@ -1365,7 +1365,7 @@ TQRect KListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item) return r; } -void KListView::cleanItemHighlighter () +void TDEListView::cleanItemHighlighter () { if (d->mOldDropHighlighter.isValid()) { @@ -1375,7 +1375,7 @@ void KListView::cleanItemHighlighter () } } -void KListView::rename(TQListViewItem *item, int c) +void TDEListView::rename(TQListViewItem *item, int c) { if (d->renameable.contains(c)) { @@ -1384,12 +1384,12 @@ void KListView::rename(TQListViewItem *item, int c) } } -bool KListView::isRenameable (int col) const +bool TDEListView::isRenameable (int col) const { return d->renameable.contains(col); } -void KListView::setRenameable (int col, bool renameable) +void TDEListView::setRenameable (int col, bool renameable) { if (col>=header()->count()) return; @@ -1398,69 +1398,69 @@ void KListView::setRenameable (int col, bool renameable) d->renameable+=col; } -void KListView::doneEditing(TQListViewItem *item, int row) +void TDEListView::doneEditing(TQListViewItem *item, int row) { emit itemRenamed(item, item->text(row), row); emit itemRenamed(item); } -bool KListView::acceptDrag(TQDropEvent* e) const +bool TDEListView::acceptDrag(TQDropEvent* e) const { return acceptDrops() && itemsMovable() && (e->source()==viewport()); } -void KListView::setCreateChildren(bool b) +void TDEListView::setCreateChildren(bool b) { d->createChildren=b; } -bool KListView::createChildren() const +bool TDEListView::createChildren() const { return d->createChildren; } -int KListView::tooltipColumn() const +int TDEListView::tooltipColumn() const { return d->tooltipColumn; } -void KListView::setTooltipColumn(int column) +void TDEListView::setTooltipColumn(int column) { d->tooltipColumn=column; } -void KListView::setDropHighlighter(bool b) +void TDEListView::setDropHighlighter(bool b) { d->dropHighlighter=b; } -bool KListView::dropHighlighter() const +bool TDEListView::dropHighlighter() const { return d->dropHighlighter; } -bool KListView::showTooltip(TQListViewItem *item, const TQPoint &, int column) const +bool TDEListView::showTooltip(TQListViewItem *item, const TQPoint &, int column) const { return ((column==tooltipColumn()) && !tooltip(item, column).isEmpty()); } -TQString KListView::tooltip(TQListViewItem *item, int column) const +TQString TDEListView::tooltip(TQListViewItem *item, int column) const { return item->text(column); } -void KListView::setTabOrderedRenaming(bool b) +void TDEListView::setTabOrderedRenaming(bool b) { d->tabRename = b; } -bool KListView::tabOrderedRenaming() const +bool TDEListView::tabOrderedRenaming() const { return d->tabRename; } -void KListView::keyPressEvent (TQKeyEvent* e) +void TDEListView::keyPressEvent (TQKeyEvent* e) { //don't we need a contextMenuModifier too ? (aleXXX) if (e->key() == d->contextMenuKey) @@ -1475,7 +1475,7 @@ void KListView::keyPressEvent (TQKeyEvent* e) fileManagerKeyPressEvent (e); } -void KListView::activateAutomaticSelection() +void TDEListView::activateAutomaticSelection() { d->selectedBySimpleMove=true; d->selectedUsingMouse=false; @@ -1487,17 +1487,17 @@ void KListView::activateAutomaticSelection() }; } -void KListView::deactivateAutomaticSelection() +void TDEListView::deactivateAutomaticSelection() { d->selectedBySimpleMove=false; } -bool KListView::automaticSelection() const +bool TDEListView::automaticSelection() const { return d->selectedBySimpleMove; } -void KListView::fileManagerKeyPressEvent (TQKeyEvent* e) +void TDEListView::fileManagerKeyPressEvent (TQKeyEvent* e) { //don't care whether it's on the keypad or not int e_state=(e->state() & ~Keypad); @@ -1827,7 +1827,7 @@ void KListView::fileManagerKeyPressEvent (TQKeyEvent* e) emit selectionChanged(); } -void KListView::setSelectionModeExt (SelectionModeExt mode) +void TDEListView::setSelectionModeExt (SelectionModeExt mode) { d->selectionMode = mode; @@ -1850,12 +1850,12 @@ void KListView::setSelectionModeExt (SelectionModeExt mode) } } -KListView::SelectionModeExt KListView::selectionModeExt () const +TDEListView::SelectionModeExt TDEListView::selectionModeExt () const { return d->selectionMode; } -int KListView::itemIndex( const TQListViewItem *item ) const +int TDEListView::itemIndex( const TQListViewItem *item ) const { if ( !item ) return -1; @@ -1874,7 +1874,7 @@ int KListView::itemIndex( const TQListViewItem *item ) const } } -TQListViewItem* KListView::itemAtIndex(int index) +TQListViewItem* TDEListView::itemAtIndex(int index) { if (index<0) return 0; @@ -1890,7 +1890,7 @@ TQListViewItem* KListView::itemAtIndex(int index) } -void KListView::emitContextMenu (KListView*, TQListViewItem* i) +void TDEListView::emitContextMenu (TDEListView*, TQListViewItem* i) { TQPoint p; @@ -1902,24 +1902,24 @@ void KListView::emitContextMenu (KListView*, TQListViewItem* i) emit contextMenu (this, i, p); } -void KListView::emitContextMenu (TQListViewItem* i, const TQPoint& p, int) +void TDEListView::emitContextMenu (TQListViewItem* i, const TQPoint& p, int) { emit contextMenu (this, i, p); } -void KListView::setAcceptDrops (bool val) +void TDEListView::setAcceptDrops (bool val) { TQListView::setAcceptDrops (val); viewport()->setAcceptDrops (val); } -int KListView::dropVisualizerWidth () const +int TDEListView::dropVisualizerWidth () const { return d->mDropVisualizerWidth; } -void KListView::viewportPaintEvent(TQPaintEvent *e) +void TDEListView::viewportPaintEvent(TQPaintEvent *e) { d->paintAbove = 0; d->paintCurrent = 0; @@ -1946,23 +1946,23 @@ void KListView::viewportPaintEvent(TQPaintEvent *e) d->painting = false; } -void KListView::setFullWidth() +void TDEListView::setFullWidth() { setFullWidth(true); } -void KListView::setFullWidth(bool fullWidth) +void TDEListView::setFullWidth(bool fullWidth) { d->fullWidth = fullWidth; header()->setStretchEnabled(fullWidth, columns()-1); } -bool KListView::fullWidth() const +bool TDEListView::fullWidth() const { return d->fullWidth; } -int KListView::addColumn(const TQString& label, int width) +int TDEListView::addColumn(const TQString& label, int width) { int result = TQListView::addColumn(label, width); if (d->fullWidth) { @@ -1972,7 +1972,7 @@ int KListView::addColumn(const TQString& label, int width) return result; } -int KListView::addColumn(const TQIconSet& iconset, const TQString& label, int width) +int TDEListView::addColumn(const TQIconSet& iconset, const TQString& label, int width) { int result = TQListView::addColumn(iconset, label, width); if (d->fullWidth) { @@ -1982,42 +1982,42 @@ int KListView::addColumn(const TQIconSet& iconset, const TQString& label, int wi return result; } -void KListView::removeColumn(int index) +void TDEListView::removeColumn(int index) { TQListView::removeColumn(index); if (d->fullWidth && index == columns()) header()->setStretchEnabled(true, columns()-1); } -void KListView::viewportResizeEvent(TQResizeEvent* e) +void TDEListView::viewportResizeEvent(TQResizeEvent* e) { TQListView::viewportResizeEvent(e); } -const TQColor &KListView::alternateBackground() const +const TQColor &TDEListView::alternateBackground() const { return d->alternateBackground; } -void KListView::setAlternateBackground(const TQColor &c) +void TDEListView::setAlternateBackground(const TQColor &c) { d->alternateBackground = c; repaint(); } -void KListView::setShadeSortColumn(bool shadeSortColumn) +void TDEListView::setShadeSortColumn(bool shadeSortColumn) { d->shadeSortColumn = shadeSortColumn; repaint(); } -bool KListView::shadeSortColumn() const +bool TDEListView::shadeSortColumn() const { return d->shadeSortColumn; } -void KListView::saveLayout(KConfig *config, const TQString &group) const +void TDEListView::saveLayout(TDEConfig *config, const TQString &group) const { - KConfigGroupSaver saver(config, group); + TDEConfigGroupSaver saver(config, group); TQStringList widths, order; const int colCount = columns(); @@ -2033,9 +2033,9 @@ void KListView::saveLayout(KConfig *config, const TQString &group) const config->writeEntry("SortAscending", d->sortAscending); } -void KListView::restoreLayout(KConfig *config, const TQString &group) +void TDEListView::restoreLayout(TDEConfig *config, const TQString &group) { - KConfigGroupSaver saver(config, group); + TDEConfigGroupSaver saver(config, group); TQStringList cols = config->readListEntry("ColumnWidths"); int i = 0; { // scope the iterators @@ -2068,7 +2068,7 @@ void KListView::restoreLayout(KConfig *config, const TQString &group) setSorting(config->readNumEntry("SortColumn"), config->readBoolEntry("SortAscending", true)); } -void KListView::setSorting(int column, bool ascending) +void TDEListView::setSorting(int column, bool ascending) { TQListViewItem *selected = 0; @@ -2095,23 +2095,23 @@ void KListView::setSorting(int column, bool ascending) TQListViewItem* item = firstChild(); while ( item ) { - KListViewItem *kItem = dynamic_cast<KListViewItem*>(item); + TDEListViewItem *kItem = dynamic_cast<TDEListViewItem*>(item); if (kItem) kItem->m_known = false; item = item->itemBelow(); } } -int KListView::columnSorted(void) const +int TDEListView::columnSorted(void) const { return d->sortColumn; } -bool KListView::ascendingSort(void) const +bool TDEListView::ascendingSort(void) const { return d->sortAscending; } -void KListView::takeItem(TQListViewItem *item) +void TDEListView::takeItem(TQListViewItem *item) { if(item && item == d->editor->currentItem()) d->editor->terminate(); @@ -2119,7 +2119,7 @@ void KListView::takeItem(TQListViewItem *item) TQListView::takeItem(item); } -void KListView::disableAutoSelection() +void TDEListView::disableAutoSelection() { if ( d->disableAutoSelection ) return; @@ -2129,45 +2129,45 @@ void KListView::disableAutoSelection() d->autoSelectDelay = -1; } -void KListView::resetAutoSelection() +void TDEListView::resetAutoSelection() { if ( !d->disableAutoSelection ) return; d->disableAutoSelection = false; - d->autoSelectDelay = KGlobalSettings::autoSelectDelay(); + d->autoSelectDelay = TDEGlobalSettings::autoSelectDelay(); } -void KListView::doubleClicked( TQListViewItem *item, const TQPoint &pos, int c ) +void TDEListView::doubleClicked( TQListViewItem *item, const TQPoint &pos, int c ) { emit TQListView::doubleClicked( item, pos, c ); } -KListViewItem::KListViewItem(TQListView *parent) +TDEListViewItem::TDEListViewItem(TQListView *parent) : TQListViewItem(parent) { init(); } -KListViewItem::KListViewItem(TQListViewItem *parent) +TDEListViewItem::TDEListViewItem(TQListViewItem *parent) : TQListViewItem(parent) { init(); } -KListViewItem::KListViewItem(TQListView *parent, TQListViewItem *after) +TDEListViewItem::TDEListViewItem(TQListView *parent, TQListViewItem *after) : TQListViewItem(parent, after) { init(); } -KListViewItem::KListViewItem(TQListViewItem *parent, TQListViewItem *after) +TDEListViewItem::TDEListViewItem(TQListViewItem *parent, TQListViewItem *after) : TQListViewItem(parent, after) { init(); } -KListViewItem::KListViewItem(TQListView *parent, +TDEListViewItem::TDEListViewItem(TQListView *parent, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) : TQListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) @@ -2175,7 +2175,7 @@ KListViewItem::KListViewItem(TQListView *parent, init(); } -KListViewItem::KListViewItem(TQListViewItem *parent, +TDEListViewItem::TDEListViewItem(TQListViewItem *parent, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) : TQListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) @@ -2183,7 +2183,7 @@ KListViewItem::KListViewItem(TQListViewItem *parent, init(); } -KListViewItem::KListViewItem(TQListView *parent, TQListViewItem *after, +TDEListViewItem::TDEListViewItem(TQListView *parent, TQListViewItem *after, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) : TQListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) @@ -2191,7 +2191,7 @@ KListViewItem::KListViewItem(TQListView *parent, TQListViewItem *after, init(); } -KListViewItem::KListViewItem(TQListViewItem *parent, TQListViewItem *after, +TDEListViewItem::TDEListViewItem(TQListViewItem *parent, TQListViewItem *after, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) : TQListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) @@ -2199,44 +2199,44 @@ KListViewItem::KListViewItem(TQListViewItem *parent, TQListViewItem *after, init(); } -KListViewItem::~KListViewItem() +TDEListViewItem::~TDEListViewItem() { if(listView()) - emit static_cast<KListView *>(listView())->itemRemoved(this); + emit static_cast<TDEListView *>(listView())->itemRemoved(this); } -void KListViewItem::init() +void TDEListViewItem::init() { m_odd = m_known = false; - KListView *lv = static_cast<KListView *>(listView()); + TDEListView *lv = static_cast<TDEListView *>(listView()); setDragEnabled( dragEnabled() || lv->dragEnabled() ); emit lv->itemAdded(this); } -void KListViewItem::insertItem(TQListViewItem *item) +void TDEListViewItem::insertItem(TQListViewItem *item) { TQListViewItem::insertItem(item); if(listView()) - emit static_cast<KListView *>(listView())->itemAdded(item); + emit static_cast<TDEListView *>(listView())->itemAdded(item); } -void KListViewItem::takeItem(TQListViewItem *item) +void TDEListViewItem::takeItem(TQListViewItem *item) { TQListViewItem::takeItem(item); if(listView()) - emit static_cast<KListView *>(listView())->itemRemoved(item); + emit static_cast<TDEListView *>(listView())->itemRemoved(item); } -const TQColor &KListViewItem::backgroundColor() +const TQColor &TDEListViewItem::backgroundColor() { if (isAlternate()) - return static_cast< KListView* >(listView())->alternateBackground(); + return static_cast< TDEListView* >(listView())->alternateBackground(); return listView()->viewport()->colorGroup().base(); } -TQColor KListViewItem::backgroundColor(int column) +TQColor TDEListViewItem::backgroundColor(int column) { - KListView* view = static_cast< KListView* >(listView()); + TDEListView* view = static_cast< TDEListView* >(listView()); TQColor color = isAlternate() ? view->alternateBackground() : view->viewport()->colorGroup().base(); @@ -2260,14 +2260,14 @@ TQColor KListViewItem::backgroundColor(int column) return color; } -bool KListViewItem::isAlternate() +bool TDEListViewItem::isAlternate() { - KListView* const lv = static_cast<KListView *>(listView()); + TDEListView* const lv = static_cast<TDEListView *>(listView()); if (lv && lv->alternateBackground().isValid()) { - KListViewItem *above; + TDEListViewItem *above; - KListView::KListViewPrivate* const lvD = lv->d; + TDEListView::TDEListViewPrivate* const lvD = lv->d; // Ok, there's some weirdness here that requires explanation as this is a // speed hack. itemAbove() is a O(n) operation (though this isn't @@ -2294,11 +2294,11 @@ bool KListViewItem::isAlternate() lvD->paintBelow = itemBelow(); } - above = dynamic_cast<KListViewItem *>(lvD->paintAbove); + above = dynamic_cast<TDEListViewItem *>(lvD->paintAbove); } else { - above = dynamic_cast<KListViewItem *>(itemAbove()); + above = dynamic_cast<TDEListViewItem *>(itemAbove()); } m_known = above ? above->m_known : true; @@ -2308,18 +2308,18 @@ bool KListViewItem::isAlternate() } else { - KListViewItem *item; + TDEListViewItem *item; bool previous = true; if (parent()) { - item = dynamic_cast<KListViewItem *>(parent()); + item = dynamic_cast<TDEListViewItem *>(parent()); if (item) previous = item->m_odd; - item = dynamic_cast<KListViewItem *>(parent()->firstChild()); + item = dynamic_cast<TDEListViewItem *>(parent()->firstChild()); } else { - item = dynamic_cast<KListViewItem *>(lv->firstChild()); + item = dynamic_cast<TDEListViewItem *>(lv->firstChild()); } while(item) @@ -2327,7 +2327,7 @@ bool KListViewItem::isAlternate() previous = !previous; item->m_odd = previous; item->m_known = true; - item = dynamic_cast<KListViewItem *>(item->nextSibling()); + item = dynamic_cast<TDEListViewItem *>(item->nextSibling()); } } return m_odd; @@ -2335,7 +2335,7 @@ bool KListViewItem::isAlternate() return false; } -void KListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) +void TDEListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { TQColorGroup _cg = cg; TQListView* lv = listView(); @@ -2363,7 +2363,7 @@ void KListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, selection of the current item is just set to \a select. */ -void KListView::selectAll( bool select ) +void TDEListView::selectAll( bool select ) { if ( selectionMode() == Multi || selectionMode() == Extended ) { bool b = signalsBlocked(); @@ -2402,10 +2402,10 @@ void KListView::selectAll( bool select ) } } -void KListView::virtual_hook( int, void* ) +void TDEListView::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -#include "klistview.moc" -#include "klistviewlineedit.moc" +#include "tdelistview.moc" +#include "tdelistviewlineedit.moc" // vim: noet diff --git a/tdeui/klistview.h b/tdeui/tdelistview.h index e60ae70b8..995e2b678 100644 --- a/tdeui/klistview.h +++ b/tdeui/tdelistview.h @@ -20,13 +20,14 @@ #ifndef KLISTVIEW_H #define KLISTVIEW_H +#include <tqheader.h> #include <tqlistview.h> #include <tqptrlist.h> #include <tdelibs_export.h> class TQDragObject; -class KConfig; +class TDEConfig; class KLineEdit; /** * This Widget extends the functionality of TQListView to honor the system @@ -46,13 +47,13 @@ class KLineEdit; * To see where you are dropping, setDropVisualizer(true). * And also you'll need acceptDrag(TQDropEvent*) * - * KListView is drag-enabled, too: to benefit from that you have to derive from it. + * TDEListView is drag-enabled, too: to benefit from that you have to derive from it. * Reimplement dragObject() and (possibly) startDrag(), * and setDragEnabled(true). */ -class TDEUI_EXPORT KListView : public TQListView +class TDEUI_EXPORT TDEListView : public TQListView { - friend class KListViewItem; + friend class TDEListViewItem; Q_OBJECT @@ -116,12 +117,12 @@ public: * The parameters @p parent and @p name are handled by * TQListView, as usual. */ - KListView (TQWidget *parent = 0, const char *name = 0); + TDEListView (TQWidget *parent = 0, const char *name = 0); /** * Destructor. */ - virtual ~KListView(); + virtual ~TDEListView(); /** * Reimplemented for internal reasons. @@ -193,7 +194,7 @@ public: /** * @return the lineedit used for inline renaming. - * Use that to setup a KCompletion or TQValidator for the lineedit + * Use that to setup a TDECompletion or TQValidator for the lineedit * * @since 3.2 */ @@ -333,7 +334,7 @@ public: /** * sets the alternate background background color. - * This only has an effect if the items are KListViewItems + * This only has an effect if the items are TDEListViewItems * * @param c the color to use for every other item. Set to an invalid * color to disable alternate colors. @@ -350,20 +351,20 @@ public: /** * Saves the list view's layout (column widtsh, column order, sort column) - * to a KConfig group + * to a TDEConfig group * - * @param config the KConfig object to write to + * @param config the TDEConfig object to write to * @param group the config group to use */ - void saveLayout(KConfig *config, const TQString &group) const; + void saveLayout(TDEConfig *config, const TQString &group) const; /** - * Reads the list view's layout from a KConfig group as stored with + * Reads the list view's layout from a TDEConfig group as stored with * saveLayout * - * @param config the KConfig object to read from + * @param config the TDEConfig object to read from * @param group the config group to use */ - void restoreLayout(KConfig *config, const TQString &group); + void restoreLayout(TDEConfig *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 @@ -452,7 +453,7 @@ signals: * @param after is the item after which the drop occurred (or 0L, if * the drop was above all items */ - void dropped (KListView* list, TQDropEvent* e, TQListViewItem* after); + void dropped (TDEListView* list, TQDropEvent* e, TQListViewItem* after); /** * This signal gets emitted whenever something acceptable is @@ -466,7 +467,7 @@ signals: * @param after is the item after which the drop occurred (or 0L, if * the drop was above all items */ - void dropped (KListView* list, TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after); + void dropped (TDEListView* list, TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after); /** * This signal gets emitted whenever something acceptable is @@ -494,7 +495,7 @@ signals: * a move is made, for example, to disable sorting * * This is sent only once per each groups of moves. That is, for each - * drop that is a move this will be emitted once, before KListView calls + * drop that is a move this will be emitted once, before TDEListView calls * @see moveItem() */ void aboutToMove(); @@ -538,13 +539,13 @@ signals: * This signal is emitted when the shortcut key for popup-menus is pressed. * * Normally you should not use this, just connect a slot to signal - * contextMenu (KListView*, TQListViewItem*, const TQPoint&) to correctly + * contextMenu (TDEListView*, TQListViewItem*, const TQPoint&) to correctly * handle showing context menus regardless of settings. * * @param list is this listview. * @param item is the currentItem() at the time the key was pressed. May be 0L. */ - void menuShortCutPressed (KListView* list, TQListViewItem* item); + void menuShortCutPressed (TDEListView* list, TQListViewItem* item); /** * This signal is emitted whenever a context-menu should be shown for item @p i. @@ -554,7 +555,7 @@ signals: * @param i is the item for which the menu should be shown. May be 0L. * @param p is the point at which the menu should be shown. */ - void contextMenu (KListView* l, TQListViewItem* i, const TQPoint& p); + void contextMenu (TDEListView* l, TQListViewItem* i, const TQPoint& p); void itemAdded(TQListViewItem *item); void itemRemoved(TQListViewItem *item); @@ -571,7 +572,7 @@ public slots: * Use this function to enable the feature on other columns. * * If you want more intelligent (dynamic) selection, - * you'll have to derive from KListView, + * you'll have to derive from TDEListView, * and override rename() and call only call it * if you want the item to be renamed. */ @@ -947,7 +948,7 @@ protected slots: /** * Emit the contextMenu signal. This slot is for key presses. */ - void emitContextMenu (KListView*, TQListViewItem*); + void emitContextMenu (TDEListView*, TQListViewItem*); /** * Accessory slot for AutoSelect @@ -1004,8 +1005,8 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KListViewPrivate; - KListViewPrivate* const d; + class TDEListViewPrivate; + TDEListViewPrivate* const d; bool isExecuteArea( int x, TQListViewItem* item ); }; @@ -1015,46 +1016,46 @@ private: * * @short listview item with alternate background color support */ -class TDEUI_EXPORT KListViewItem : public TQListViewItem +class TDEUI_EXPORT TDEListViewItem : public TQListViewItem { - friend class KListView; + friend class TDEListView; public: /** * constructors. The semantics remain as in TQListViewItem. * Although they accept a TQListViewItem as parent, please - * don't mix KListViewItem (or subclasses) with QListViewItem + * don't mix TDEListViewItem (or subclasses) with QListViewItem * (or subclasses). */ - KListViewItem(TQListView *parent); - KListViewItem(TQListViewItem *parent); - KListViewItem(TQListView *parent, TQListViewItem *after); - KListViewItem(TQListViewItem *parent, TQListViewItem *after); + TDEListViewItem(TQListView *parent); + TDEListViewItem(TQListViewItem *parent); + TDEListViewItem(TQListView *parent, TQListViewItem *after); + TDEListViewItem(TQListViewItem *parent, TQListViewItem *after); - KListViewItem(TQListView *parent, + TDEListViewItem(TQListView *parent, TQString, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null); - KListViewItem(TQListViewItem *parent, + TDEListViewItem(TQListViewItem *parent, TQString, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null); - KListViewItem(TQListView *parent, TQListViewItem *after, + TDEListViewItem(TQListView *parent, TQListViewItem *after, TQString, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null); - KListViewItem(TQListViewItem *parent, TQListViewItem *after, + TDEListViewItem(TQListViewItem *parent, TQListViewItem *after, TQString, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null, TQString = TQString::null); - virtual ~KListViewItem(); + virtual ~TDEListViewItem(); virtual void insertItem(TQListViewItem *item); virtual void takeItem(TQListViewItem *item); diff --git a/tdeui/klistviewlineedit.h b/tdeui/tdelistviewlineedit.h index f08997925..0c19e90f5 100644 --- a/tdeui/klistviewlineedit.h +++ b/tdeui/tdelistviewlineedit.h @@ -19,18 +19,18 @@ #define KLISTVIEWLINEEDIT_H #include <klineedit.h> -#include <klistview.h> +#include <tdelistview.h> /** - * the editor for a KListView. please don't use this. + * the editor for a TDEListView. please don't use this. * @internal **/ -class TDEUI_EXPORT KListViewLineEdit : public KLineEdit +class TDEUI_EXPORT TDEListViewLineEdit : public KLineEdit { Q_OBJECT public: - KListViewLineEdit(KListView *parent); - ~KListViewLineEdit(); + TDEListViewLineEdit(TDEListView *parent); + ~TDEListViewLineEdit(); TQListViewItem *currentItem() const; @@ -52,7 +52,7 @@ protected: void terminate(bool commit); TQListViewItem *item; int col; - KListView* const p; + TDEListView* const p; protected slots: void slotSelectionChanged(); diff --git a/tdeui/klistviewsearchline.cpp b/tdeui/tdelistviewsearchline.cpp index 7f96ed94d..b74b4d1c1 100644 --- a/tdeui/klistviewsearchline.cpp +++ b/tdeui/tdelistviewsearchline.cpp @@ -16,14 +16,14 @@ Boston, MA 02110-1301, USA. */ -#include "klistviewsearchline.h" +#include "tdelistviewsearchline.h" -#include <klistview.h> +#include <tdelistview.h> #include <kiconloader.h> -#include <ktoolbar.h> -#include <ktoolbarbutton.h> +#include <tdetoolbar.h> +#include <tdetoolbarbutton.h> #include <kdebug.h> -#include <klocale.h> +#include <tdelocale.h> #include <tqapplication.h> #include <tqtimer.h> @@ -33,17 +33,17 @@ #define KLISTVIEWSEARCHLINE_ALLVISIBLECOLUMNS_ID 2004 -class KListViewSearchLine::KListViewSearchLinePrivate +class TDEListViewSearchLine::TDEListViewSearchLinePrivate { public: - KListViewSearchLinePrivate() : + TDEListViewSearchLinePrivate() : listView(0), caseSensitive(false), activeSearch(false), keepParentsVisible(true), queuedSearches(0) {} - KListView *listView; + TDEListView *listView; bool caseSensitive; bool activeSearch; bool keepParentsVisible; @@ -56,10 +56,10 @@ public: // public methods //////////////////////////////////////////////////////////////////////////////// -KListViewSearchLine::KListViewSearchLine(TQWidget *parent, KListView *listView, const char *name) : +TDEListViewSearchLine::TDEListViewSearchLine(TQWidget *parent, TDEListView *listView, const char *name) : KLineEdit(parent, name) { - d = new KListViewSearchLinePrivate; + d = new TDEListViewSearchLinePrivate; d->listView = listView; @@ -77,10 +77,10 @@ KListViewSearchLine::KListViewSearchLine(TQWidget *parent, KListView *listView, setEnabled(false); } -KListViewSearchLine::KListViewSearchLine(TQWidget *parent, const char *name) : +TDEListViewSearchLine::TDEListViewSearchLine(TQWidget *parent, const char *name) : KLineEdit(parent, name) { - d = new KListViewSearchLinePrivate; + d = new TDEListViewSearchLinePrivate; d->listView = 0; @@ -90,27 +90,27 @@ KListViewSearchLine::KListViewSearchLine(TQWidget *parent, const char *name) : setEnabled(false); } -KListViewSearchLine::~KListViewSearchLine() +TDEListViewSearchLine::~TDEListViewSearchLine() { delete d; } -bool KListViewSearchLine::caseSensitive() const +bool TDEListViewSearchLine::caseSensitive() const { return d->caseSensitive; } -TQValueList<int> KListViewSearchLine::searchColumns() const +TQValueList<int> TDEListViewSearchLine::searchColumns() const { return d->searchColumns; } -bool KListViewSearchLine::keepParentsVisible() const +bool TDEListViewSearchLine::keepParentsVisible() const { return d->keepParentsVisible; } -KListView *KListViewSearchLine::listView() const +TDEListView *TDEListViewSearchLine::listView() const { return d->listView; } @@ -119,7 +119,7 @@ KListView *KListViewSearchLine::listView() const // public slots //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::updateSearch(const TQString &s) +void TDEListViewSearchLine::updateSearch(const TQString &s) { if(!d->listView) return; @@ -133,9 +133,9 @@ void KListViewSearchLine::updateSearch(const TQString &s) switch(d->listView->selectionMode()) { - case KListView::NoSelection: + case TDEListView::NoSelection: break; - case KListView::Single: + case TDEListView::Single: currentItem = d->listView->selectedItem(); break; default: @@ -160,22 +160,22 @@ void KListViewSearchLine::updateSearch(const TQString &s) d->listView->ensureItemVisible(currentItem); } -void KListViewSearchLine::setCaseSensitive(bool cs) +void TDEListViewSearchLine::setCaseSensitive(bool cs) { d->caseSensitive = cs; } -void KListViewSearchLine::setKeepParentsVisible(bool v) +void TDEListViewSearchLine::setKeepParentsVisible(bool v) { d->keepParentsVisible = v; } -void KListViewSearchLine::setSearchColumns(const TQValueList<int> &columns) +void TDEListViewSearchLine::setSearchColumns(const TQValueList<int> &columns) { d->searchColumns = columns; } -void KListViewSearchLine::setListView(KListView *lv) +void TDEListViewSearchLine::setListView(TDEListView *lv) { if(d->listView) { disconnect(d->listView, TQT_SIGNAL(destroyed()), @@ -202,7 +202,7 @@ void KListViewSearchLine::setListView(KListView *lv) // protected members //////////////////////////////////////////////////////////////////////////////// -bool KListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString &s) const +bool TDEListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString &s) const { if(s.isEmpty()) return true; @@ -231,7 +231,7 @@ bool KListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString return false; } -TQPopupMenu *KListViewSearchLine::createPopupMenu() +TQPopupMenu *TDEListViewSearchLine::createPopupMenu() { TQPopupMenu *popup = KLineEdit::createPopupMenu(); @@ -281,14 +281,14 @@ TQPopupMenu *KListViewSearchLine::createPopupMenu() // protected slots //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::queueSearch(const TQString &search) +void TDEListViewSearchLine::queueSearch(const TQString &search) { d->queuedSearches++; d->search = search; TQTimer::singleShot(200, this, TQT_SLOT(activateSearch())); } -void KListViewSearchLine::activateSearch() +void TDEListViewSearchLine::activateSearch() { --(d->queuedSearches); @@ -300,18 +300,18 @@ void KListViewSearchLine::activateSearch() // private slots //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::itemAdded(TQListViewItem *item) const +void TDEListViewSearchLine::itemAdded(TQListViewItem *item) const { item->setVisible(itemMatches(item, text())); } -void KListViewSearchLine::listViewDeleted() +void TDEListViewSearchLine::listViewDeleted() { d->listView = 0; setEnabled(false); } -void KListViewSearchLine::searchColumnsMenuActivated(int id) +void TDEListViewSearchLine::searchColumnsMenuActivated(int id) { if(id == KLISTVIEWSEARCHLINE_ALLVISIBLECOLUMNS_ID) { if(d->searchColumns.isEmpty()) @@ -340,7 +340,7 @@ void KListViewSearchLine::searchColumnsMenuActivated(int id) // private methods //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::checkItemParentsNotVisible() +void TDEListViewSearchLine::checkItemParentsNotVisible() { TQListViewItemIterator it(d->listView); for(; it.current(); ++it) @@ -364,7 +364,7 @@ void KListViewSearchLine::checkItemParentsNotVisible() * \return \c true if an item which should be visible is found, \c false if all items found should be hidden. If this function * returns true and \p highestHiddenParent was not 0, highestHiddenParent will have been shown. */ -bool KListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent) +bool TDEListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent) { bool visible = false; TQListViewItem * first = item; @@ -403,24 +403,24 @@ bool KListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListVi } //////////////////////////////////////////////////////////////////////////////// -// KListViewSearchLineWidget +// TDEListViewSearchLineWidget //////////////////////////////////////////////////////////////////////////////// -class KListViewSearchLineWidget::KListViewSearchLineWidgetPrivate +class TDEListViewSearchLineWidget::TDEListViewSearchLineWidgetPrivate { public: - KListViewSearchLineWidgetPrivate() : listView(0), searchLine(0), clearButton(0) {} - KListView *listView; - KListViewSearchLine *searchLine; + TDEListViewSearchLineWidgetPrivate() : listView(0), searchLine(0), clearButton(0) {} + TDEListView *listView; + TDEListViewSearchLine *searchLine; TQToolButton *clearButton; }; -KListViewSearchLineWidget::KListViewSearchLineWidget(KListView *listView, +TDEListViewSearchLineWidget::TDEListViewSearchLineWidget(TDEListView *listView, TQWidget *parent, const char *name) : TQHBox(parent, name) { - d = new KListViewSearchLineWidgetPrivate; + d = new TDEListViewSearchLineWidgetPrivate; d->listView = listView; setSpacing(5); @@ -428,19 +428,19 @@ KListViewSearchLineWidget::KListViewSearchLineWidget(KListView *listView, TQTimer::singleShot(0, this, TQT_SLOT(createWidgets())); } -KListViewSearchLineWidget::~KListViewSearchLineWidget() +TDEListViewSearchLineWidget::~TDEListViewSearchLineWidget() { delete d; } -KListViewSearchLine *KListViewSearchLineWidget::createSearchLine(KListView *listView) +TDEListViewSearchLine *TDEListViewSearchLineWidget::createSearchLine(TDEListView *listView) { if(!d->searchLine) - d->searchLine = new KListViewSearchLine(this, listView); + d->searchLine = new TDEListViewSearchLine(this, listView); return d->searchLine; } -void KListViewSearchLineWidget::createWidgets() +void TDEListViewSearchLineWidget::createWidgets() { positionInToolBar(); @@ -463,14 +463,14 @@ void KListViewSearchLineWidget::createWidgets() connect(d->clearButton, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(clear())); } -KListViewSearchLine *KListViewSearchLineWidget::searchLine() const +TDEListViewSearchLine *TDEListViewSearchLineWidget::searchLine() const { return d->searchLine; } -void KListViewSearchLineWidget::positionInToolBar() +void TDEListViewSearchLineWidget::positionInToolBar() { - KToolBar *toolBar = tqt_dynamic_cast<KToolBar *>(parent()); + TDEToolBar *toolBar = tqt_dynamic_cast<TDEToolBar *>(parent()); if(toolBar) { @@ -486,7 +486,7 @@ void KListViewSearchLineWidget::positionInToolBar() toolBar->setItemAutoSized(id); if(!d->clearButton) { TQString icon = TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase"; - d->clearButton = new KToolBarButton(icon, 2005, toolBar); + d->clearButton = new TDEToolBarButton(icon, 2005, toolBar); } toolBar->insertWidget(2005, d->clearButton->width(), d->clearButton, index); break; @@ -498,4 +498,4 @@ void KListViewSearchLineWidget::positionInToolBar() d->searchLine->show(); } -#include "klistviewsearchline.moc" +#include "tdelistviewsearchline.moc" diff --git a/tdeui/klistviewsearchline.h b/tdeui/tdelistviewsearchline.h index f763aad72..4c278a9d9 100644 --- a/tdeui/klistviewsearchline.h +++ b/tdeui/tdelistviewsearchline.h @@ -22,7 +22,7 @@ #include <klineedit.h> #include <tqhbox.h> -class KListView; +class TDEListView; class TQListViewItem; class TQToolButton; @@ -31,12 +31,12 @@ class TQToolButton; * listview based on a simple text search. * * No changes to the application other than instantiating this class with an - * appropriate KListView should be needed. + * appropriate TDEListView should be needed. * * If you want the clear button and the search label, you should take a look at - * the KListViewSearchLineWidget + * the TDEListViewSearchLineWidget * - * @note { When iterating over items in the KListView, make sure that + * @note { When iterating over items in the TDEListView, make sure that * the iterator only includes visible items (for example, by adding * TQListViewItemIterator::Visible to the iterator flags). Otherwise, * actions (such as deletion) may be taken on items that have been @@ -44,31 +44,31 @@ class TQToolButton; * @since 3.3 */ -class TDEUI_EXPORT KListViewSearchLine : public KLineEdit +class TDEUI_EXPORT TDEListViewSearchLine : public KLineEdit { Q_OBJECT public: /** - * Constructs a KListViewSearchLine with \a listView being the KListView to + * Constructs a TDEListViewSearchLine with \a listView being the TDEListView to * be filtered. * * If \a listView is null then the widget will be disabled until a listview * is set with setListView(). */ - KListViewSearchLine(TQWidget *parent = 0, KListView *listView = 0, const char *name = 0); + TDEListViewSearchLine(TQWidget *parent = 0, TDEListView *listView = 0, const char *name = 0); /** - * Constructs a KListViewSearchLine without any KListView to filter. The - * KListView object has to be set later with setListView(). + * Constructs a TDEListViewSearchLine without any TDEListView to filter. The + * TDEListView object has to be set later with setListView(). */ - KListViewSearchLine(TQWidget *parent, const char *name); + TDEListViewSearchLine(TQWidget *parent, const char *name); /** - * Destroys the KListViewSearchLine. + * Destroys the TDEListViewSearchLine. */ - virtual ~KListViewSearchLine(); + virtual ~TDEListViewSearchLine(); /** * Returns true if the search is case sensitive. This defaults to false. @@ -98,7 +98,7 @@ public: * * @see setListView() */ - KListView *listView() const; + TDEListView *listView() const; public slots: /** @@ -136,12 +136,12 @@ public slots: void setSearchColumns(const TQValueList<int> &columns); /** - * Sets the KListView that is filtered by this search line. If \a lv is null + * Sets the TDEListView that is filtered by this search line. If \a lv is null * then the widget will be disabled. * * @see listView() */ - void setListView(KListView *lv); + void setListView(TDEListView *lv); protected: @@ -206,43 +206,43 @@ private slots: void searchColumnsMenuActivated(int); private: - class KListViewSearchLinePrivate; - KListViewSearchLinePrivate *d; + class TDEListViewSearchLinePrivate; + TDEListViewSearchLinePrivate *d; }; /** - * Creates a widget featuring a KListViewSearchLine, a label with the text + * Creates a widget featuring a TDEListViewSearchLine, a label with the text * "Search" and a button to clear the search. * * @since 3.4 */ -class TDEUI_EXPORT KListViewSearchLineWidget : public TQHBox +class TDEUI_EXPORT TDEListViewSearchLineWidget : public TQHBox { Q_OBJECT public: /** - * Creates a KListViewSearchLineWidget for \a listView with \a parent as the + * Creates a TDEListViewSearchLineWidget for \a listView with \a parent as the * parent with and \a name. */ - KListViewSearchLineWidget(KListView *listView = 0, TQWidget *parent = 0, + TDEListViewSearchLineWidget(TDEListView *listView = 0, TQWidget *parent = 0, const char *name = 0); /** - * Destroys the KListViewSearchLineWidget + * Destroys the TDEListViewSearchLineWidget */ - ~KListViewSearchLineWidget(); + ~TDEListViewSearchLineWidget(); /** * Creates the search line. This can be useful to reimplement in cases where - * a KListViewSearchLine subclass is used. + * a TDEListViewSearchLine subclass is used. */ - virtual KListViewSearchLine *createSearchLine(KListView *listView); + virtual TDEListViewSearchLine *createSearchLine(TDEListView *listView); /** * Returns a pointer to the search line. */ - KListViewSearchLine *searchLine() const; + TDEListViewSearchLine *searchLine() const; protected slots: /** @@ -257,8 +257,8 @@ private slots: void positionInToolBar(); private: - class KListViewSearchLineWidgetPrivate; - KListViewSearchLineWidgetPrivate *d; + class TDEListViewSearchLineWidgetPrivate; + TDEListViewSearchLineWidgetPrivate *d; }; #endif diff --git a/tdeui/kmainwindow.cpp b/tdeui/tdemainwindow.cpp index ffb59588b..ba9c51556 100644 --- a/tdeui/kmainwindow.cpp +++ b/tdeui/tdemainwindow.cpp @@ -23,9 +23,9 @@ */ #include "config.h" -#include "kmainwindow.h" -#include "kmainwindowiface.h" -#include "ktoolbarhandler.h" +#include "tdemainwindow.h" +#include "tdemainwindowiface.h" +#include "tdetoolbarhandler.h" #include "kwhatsthismanager_p.h" #include <tqsessionmanager.h> #include <tqobjectlist.h> @@ -34,19 +34,19 @@ #include <tqwidgetlist.h> #include <tqtimer.h> -#include <kaccel.h> -#include <kaction.h> -#include <kapplication.h> -#include <kconfig.h> +#include <tdeaccel.h> +#include <tdeaction.h> +#include <tdeapplication.h> +#include <tdeconfig.h> #include <kdebug.h> #include <khelpmenu.h> -#include <kmenubar.h> +#include <tdemenubar.h> #include <kstatusbar.h> #include <twin.h> #include <kedittoolbar.h> -#include <kmainwindow.h> +#include <tdemainwindow.h> -#include <klocale.h> +#include <tdelocale.h> #include <kstandarddirs.h> #include <kstaticdeleter.h> #if defined Q_WS_X11 @@ -57,7 +57,7 @@ #include <ctype.h> #include <assert.h> -class KMainWindowPrivate { +class TDEMainWindowPrivate { public: bool showHelpMenu:1; @@ -67,16 +67,16 @@ public: bool care_about_geometry:1; bool shuttingDown:1; TQString autoSaveGroup; - KAccel * kaccel; - KMainWindowInterface *m_interface; + TDEAccel * tdeaccel; + TDEMainWindowInterface *m_interface; KDEPrivate::ToolBarHandler *toolBarHandler; TQTimer* settingsTimer; - KToggleAction *showStatusBarAction; + TDEToggleAction *showStatusBarAction; TQRect defaultWindowSize; TQPtrList<TQDockWindow> hiddenDockWindows; }; -TQPtrList<KMainWindow>* KMainWindow::memberList = 0L; +TQPtrList<TDEMainWindow>* TDEMainWindow::memberList = 0L; static bool no_query_exit = false; static KMWSessionManaged* ksm = 0; static KStaticDeleter<KMWSessionManaged> ksmd; @@ -92,14 +92,14 @@ public: } bool saveState( TQSessionManager& ) { - KConfig* config = KApplication::kApplication()->sessionConfig(); - if ( KMainWindow::memberList->first() ){ + TDEConfig* config = TDEApplication::kApplication()->sessionConfig(); + if ( TDEMainWindow::memberList->first() ){ // According to Jochen Wilhelmy <digisnap@cs.tu-berlin.de>, this // hook is useful for better document orientation - KMainWindow::memberList->first()->saveGlobalProperties(config); + TDEMainWindow::memberList->first()->saveGlobalProperties(config); } - TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList); + TQPtrListIterator<TDEMainWindow> it(*TDEMainWindow::memberList); int n = 0; for (it.toFirst(); it.current(); ++it){ n++; @@ -115,10 +115,10 @@ public: // not really a fast method but the only compatible one if ( sm.allowsInteraction() ) { bool canceled = false; - TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList); + TQPtrListIterator<TDEMainWindow> it(*TDEMainWindow::memberList); ::no_query_exit = true; for (it.toFirst(); it.current() && !canceled;){ - KMainWindow *window = *it; + TDEMainWindow *window = *it; ++it; // Update now, the current window might get deleted if ( !window->testWState( TQt::WState_ForceHide ) ) { TQCloseEvent e; @@ -144,9 +144,9 @@ public: if (canceled) return false; - KMainWindow* last = 0; + TDEMainWindow* last = 0; for (it.toFirst(); it.current() && !canceled; ++it){ - KMainWindow *window = *it; + TDEMainWindow *window = *it; if ( !window->testWState( TQt::WState_ForceHide ) ) { last = window; } @@ -164,19 +164,19 @@ public: static bool being_first = true; -KMainWindow::KMainWindow( TQWidget* parent, const char *name, WFlags f ) +TDEMainWindow::TDEMainWindow( TQWidget* parent, const char *name, WFlags f ) : TQMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 ) { - initKMainWindow(name, 0); + initTDEMainWindow(name, 0); } -KMainWindow::KMainWindow( int cflags, TQWidget* parent, const char *name, WFlags f ) +TDEMainWindow::TDEMainWindow( int cflags, TQWidget* parent, const char *name, WFlags f ) : TQMainWindow( parent, name, f ), KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 ) { - initKMainWindow(name, cflags); + initTDEMainWindow(name, cflags); } -void KMainWindow::initKMainWindow(const char *name, int cflags) +void TDEMainWindow::initTDEMainWindow(const char *name, int cflags) { KWhatsThisManager::init (); setDockMenuEnabled( false ); @@ -185,7 +185,7 @@ void KMainWindow::initKMainWindow(const char *name, int cflags) actionCollection()->setWidget( this ); connect(kapp, TQT_SIGNAL(shutDown()), this, TQT_SLOT(shuttingDown())); if( !memberList ) - memberList = new TQPtrList<KMainWindow>; + memberList = new TQPtrList<TDEMainWindow>; if ( !ksm ) ksm = ksmd.setObject(ksm, new KMWSessionManaged()); @@ -233,12 +233,12 @@ void KMainWindow::initKMainWindow(const char *name, int cflags) memberList->append( this ); - d = new KMainWindowPrivate; + d = new TDEMainWindowPrivate; d->showHelpMenu = true; d->settingsDirty = false; d->autoSaveSettings = false; d->autoSaveWindowSize = true; // for compatibility - d->kaccel = actionCollection()->kaccel(); + d->tdeaccel = actionCollection()->tdeaccel(); d->toolBarHandler = 0; d->settingsTimer = 0; d->showStatusBarAction = NULL; @@ -255,13 +255,13 @@ void KMainWindow::initKMainWindow(const char *name, int cflags) if ( cflags & NoDCOPObject) d->m_interface = 0; else - d->m_interface = new KMainWindowInterface(this); + d->m_interface = new TDEMainWindowInterface(this); if (!kapp->authorize("movable_toolbars")) setDockWindowsMovable(false); } -KAction *KMainWindow::toolBarMenuAction() +TDEAction *TDEMainWindow::toolBarMenuAction() { if ( !d->toolBarHandler ) return 0; @@ -270,13 +270,13 @@ KAction *KMainWindow::toolBarMenuAction() } -void KMainWindow::setupToolbarMenuActions() +void TDEMainWindow::setupToolbarMenuActions() { if ( d->toolBarHandler ) d->toolBarHandler->setupActions(); } -void KMainWindow::parseGeometry(bool parsewidth) +void TDEMainWindow::parseGeometry(bool parsewidth) { assert ( !kapp->geometryArgument().isNull() ); assert ( d->care_about_geometry ); @@ -303,15 +303,15 @@ void KMainWindow::parseGeometry(bool parsewidth) if ( parsewidth && !(m & YValue) ) y = geometry().y(); if ( (m & XNegative) ) - x = KApplication::desktop()->width() + x - w; + x = TDEApplication::desktop()->width() + x - w; if ( (m & YNegative) ) - y = KApplication::desktop()->height() + y - h; + y = TDEApplication::desktop()->height() + y - h; move(x, y); } #endif } -KMainWindow::~KMainWindow() +TDEMainWindow::~TDEMainWindow() { delete d->settingsTimer; TQMenuBar* mb = internalMenuBar(); @@ -321,7 +321,7 @@ KMainWindow::~KMainWindow() memberList->remove( this ); } -KPopupMenu* KMainWindow::helpMenu( const TQString &aboutAppText, bool showWhatsThis ) +TDEPopupMenu* TDEMainWindow::helpMenu( const TQString &aboutAppText, bool showWhatsThis ) { if( !mHelpMenu ) { if ( aboutAppText.isEmpty() ) @@ -338,7 +338,7 @@ KPopupMenu* KMainWindow::helpMenu( const TQString &aboutAppText, bool showWhatsT return mHelpMenu->menu(); } -KPopupMenu* KMainWindow::customHelpMenu( bool showWhatsThis ) +TDEPopupMenu* TDEMainWindow::customHelpMenu( bool showWhatsThis ) { if( !mHelpMenu ) { mHelpMenu = new KHelpMenu( this, TQString::null, showWhatsThis ); @@ -349,11 +349,11 @@ KPopupMenu* KMainWindow::customHelpMenu( bool showWhatsThis ) return mHelpMenu->menu(); } -bool KMainWindow::canBeRestored( int number ) +bool TDEMainWindow::canBeRestored( int number ) { if ( !kapp->isRestored() ) return false; - KConfig *config = kapp->sessionConfig(); + TDEConfig *config = kapp->sessionConfig(); if ( !config ) return false; config->setGroup( TQString::fromLatin1("Number") ); @@ -361,11 +361,11 @@ bool KMainWindow::canBeRestored( int number ) return number >= 1 && number <= n; } -const TQString KMainWindow::classNameOfToplevel( int number ) +const TQString TDEMainWindow::classNameOfToplevel( int number ) { if ( !kapp->isRestored() ) return TQString::null; - KConfig *config = kapp->sessionConfig(); + TDEConfig *config = kapp->sessionConfig(); if ( !config ) return TQString::null; TQString s; @@ -378,7 +378,7 @@ const TQString KMainWindow::classNameOfToplevel( int number ) return config->readEntry( TQString::fromLatin1("ClassName") ); } -void KMainWindow::show() +void TDEMainWindow::show() { TQMainWindow::show(); @@ -388,7 +388,7 @@ void KMainWindow::show() d->hiddenDockWindows.clear(); } -void KMainWindow::hide() +void TDEMainWindow::hide() { if ( isVisible() ) { @@ -408,45 +408,45 @@ void KMainWindow::hide() TQWidget::hide(); } -bool KMainWindow::restore( int number, bool show ) +bool TDEMainWindow::restore( int number, bool show ) { if ( !canBeRestored( number ) ) return false; - KConfig *config = kapp->sessionConfig(); + TDEConfig *config = kapp->sessionConfig(); if ( readPropertiesInternal( config, number ) ){ if ( show ) - KMainWindow::show(); + TDEMainWindow::show(); return false; } return false; } -KXMLGUIFactory *KMainWindow::guiFactory() +KXMLGUIFactory *TDEMainWindow::guiFactory() { if ( !factory_ ) factory_ = new KXMLGUIFactory( this, TQT_TQOBJECT(this), "guifactory" ); return factory_; } -int KMainWindow::configureToolbars() +int TDEMainWindow::configureToolbars() { - saveMainWindowSettings(KGlobal::config()); + saveMainWindowSettings(TDEGlobal::config()); KEditToolbar dlg(actionCollection(), xmlFile(), true, this); connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(saveNewToolbarConfig())); return dlg.exec(); } -void KMainWindow::saveNewToolbarConfig() +void TDEMainWindow::saveNewToolbarConfig() { createGUI(xmlFile()); - applyMainWindowSettings( KGlobal::config() ); + applyMainWindowSettings( TDEGlobal::config() ); } -void KMainWindow::setupGUI( int options, const TQString & xmlfile ) { +void TDEMainWindow::setupGUI( int options, const TQString & xmlfile ) { setupGUI(TQSize(), options, xmlfile); } -void KMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xmlfile ) { +void TDEMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xmlfile ) { if( options & Keys ){ KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); @@ -488,7 +488,7 @@ void KMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xm } -void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) +void TDEMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) { // disabling the updates prevents unnecessary redraws setUpdatesEnabled( false ); @@ -544,7 +544,7 @@ void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) // using stuff like the toolbar editor ). // In addition we have to take care of not removing containers // like popupmenus, defined in the XML document. - // this code should probably go into a separate method in KMainWindow. + // this code should probably go into a separate method in TDEMainWindow. // there's just one problem: I'm bad in finding names ;-) , so // I skipped this ;-) @@ -568,27 +568,27 @@ void KMainWindow::createGUI( const TQString &xmlfile, bool _conserveMemory ) updateGeometry(); } -void KMainWindow::setHelpMenuEnabled(bool showHelpMenu) +void TDEMainWindow::setHelpMenuEnabled(bool showHelpMenu) { d->showHelpMenu = showHelpMenu; } -bool KMainWindow::isHelpMenuEnabled() +bool TDEMainWindow::isHelpMenuEnabled() { return d->showHelpMenu; } -void KMainWindow::setCaption( const TQString &caption ) +void TDEMainWindow::setCaption( const TQString &caption ) { setPlainCaption( kapp->makeStdCaption(caption) ); } -void KMainWindow::setCaption( const TQString &caption, bool modified ) +void TDEMainWindow::setCaption( const TQString &caption, bool modified ) { setPlainCaption( kapp->makeStdCaption(caption, true, modified) ); } -void KMainWindow::setPlainCaption( const TQString &caption ) +void TDEMainWindow::setPlainCaption( const TQString &caption ) { TQMainWindow::setCaption( caption ); #if defined Q_WS_X11 @@ -597,7 +597,7 @@ void KMainWindow::setPlainCaption( const TQString &caption ) #endif } -void KMainWindow::appHelpActivated( void ) +void TDEMainWindow::appHelpActivated( void ) { if( !mHelpMenu ) { mHelpMenu = new KHelpMenu( this ); @@ -607,7 +607,7 @@ void KMainWindow::appHelpActivated( void ) mHelpMenu->appHelpActivated(); } -void KMainWindow::slotStateChanged(const TQString &newstate) +void TDEMainWindow::slotStateChanged(const TQString &newstate) { stateChanged(newstate, KXMLGUIClient::StateNoReverse); } @@ -615,7 +615,7 @@ void KMainWindow::slotStateChanged(const TQString &newstate) /* * Get rid of this for KDE 4.0 */ -void KMainWindow::slotStateChanged(const TQString &newstate, +void TDEMainWindow::slotStateChanged(const TQString &newstate, KXMLGUIClient::ReverseStateChange reverse) { stateChanged(newstate, reverse); @@ -624,14 +624,14 @@ void KMainWindow::slotStateChanged(const TQString &newstate, /* * Enable this for KDE 4.0 */ -// void KMainWindow::slotStateChanged(const TQString &newstate, +// void TDEMainWindow::slotStateChanged(const TQString &newstate, // bool reverse) // { // stateChanged(newstate, // reverse ? KXMLGUIClient::StateReverse : KXMLGUIClient::StateNoReverse); // } -void KMainWindow::closeEvent ( TQCloseEvent *e ) +void TDEMainWindow::closeEvent ( TQCloseEvent *e ) { // Save settings if auto-save is enabled, and settings have changed if (d->settingsDirty && d->autoSaveSettings) @@ -641,7 +641,7 @@ void KMainWindow::closeEvent ( TQCloseEvent *e ) e->accept(); int not_withdrawn = 0; - TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList); + TQPtrListIterator<TDEMainWindow> it(*TDEMainWindow::memberList); for (it.toFirst(); it.current(); ++it){ if ( !it.current()->isHidden() && it.current()->isTopLevel() && it.current() != this ) not_withdrawn++; @@ -661,35 +661,35 @@ void KMainWindow::closeEvent ( TQCloseEvent *e ) } } -bool KMainWindow::queryExit() +bool TDEMainWindow::queryExit() { return true; } -bool KMainWindow::queryClose() +bool TDEMainWindow::queryClose() { return true; } -void KMainWindow::saveGlobalProperties( KConfig* ) +void TDEMainWindow::saveGlobalProperties( TDEConfig* ) { } -void KMainWindow::readGlobalProperties( KConfig* ) +void TDEMainWindow::readGlobalProperties( TDEConfig* ) { } #if defined(KDE_COMPAT) -void KMainWindow::updateRects() +void TDEMainWindow::updateRects() { } #endif -void KMainWindow::showAboutApplication() +void TDEMainWindow::showAboutApplication() { } -void KMainWindow::savePropertiesInternal( KConfig *config, int number ) +void TDEMainWindow::savePropertiesInternal( TDEConfig *config, int number ) { bool oldASWS = d->autoSaveWindowSize; d->autoSaveWindowSize = true; // make saveMainWindowSettings save the window size @@ -713,9 +713,9 @@ void KMainWindow::savePropertiesInternal( KConfig *config, int number ) d->autoSaveWindowSize = oldASWS; } -void KMainWindow::saveMainWindowSettings(KConfig *config, const TQString &configGroup) +void TDEMainWindow::saveMainWindowSettings(TDEConfig *config, const TQString &configGroup) { - kdDebug(200) << "KMainWindow::saveMainWindowSettings " << configGroup << endl; + kdDebug(200) << "TDEMainWindow::saveMainWindowSettings " << configGroup << endl; TQString oldGroup; if (!configGroup.isEmpty()) @@ -746,8 +746,8 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const TQString &config } int n = 1; // Toolbar counter. toolbars are counted from 1, - KToolBar *toolbar = 0; - TQPtrListIterator<KToolBar> it( toolBarIterator() ); + TDEToolBar *toolbar = 0; + TQPtrListIterator<TDEToolBar> it( toolBarIterator() ); while ( ( toolbar = it.current() ) ) { ++it; TQString group; @@ -766,7 +766,7 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const TQString &config config->setGroup(oldGroup); } -void KMainWindow::setStandardToolBarMenuEnabled( bool enable ) +void TDEMainWindow::setStandardToolBarMenuEnabled( bool enable ) { if ( enable ) { if ( d->toolBarHandler ) @@ -788,12 +788,12 @@ void KMainWindow::setStandardToolBarMenuEnabled( bool enable ) } } -bool KMainWindow::isStandardToolBarMenuEnabled() const +bool TDEMainWindow::isStandardToolBarMenuEnabled() const { return ( d->toolBarHandler ); } -void KMainWindow::createStandardStatusBarAction(){ +void TDEMainWindow::createStandardStatusBarAction(){ if(!d->showStatusBarAction){ d->showStatusBarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(setSettingsDirty()), actionCollection()); KStatusBar *sb = statusBar(); // Creates statusbar if it doesn't exist already. @@ -802,7 +802,7 @@ void KMainWindow::createStandardStatusBarAction(){ } } -bool KMainWindow::readPropertiesInternal( KConfig *config, int number ) +bool TDEMainWindow::readPropertiesInternal( TDEConfig *config, int number ) { if ( number == 1 ) readGlobalProperties( config ); @@ -826,16 +826,16 @@ bool KMainWindow::readPropertiesInternal( KConfig *config, int number ) return true; } -void KMainWindow::applyMainWindowSettings(KConfig *config, const TQString &configGroup) +void TDEMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup) { return applyMainWindowSettings(config,configGroup,false); } -void KMainWindow::applyMainWindowSettings(KConfig *config, const TQString &configGroup,bool force) +void TDEMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup,bool force) { - kdDebug(200) << "KMainWindow::applyMainWindowSettings" << endl; + kdDebug(200) << "TDEMainWindow::applyMainWindowSettings" << endl; - KConfigGroupSaver saver( config, configGroup.isEmpty() ? config->group() : configGroup ); + TDEConfigGroupSaver saver( config, configGroup.isEmpty() ? config->group() : configGroup ); restoreWindowSize(config); @@ -860,8 +860,8 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const TQString &confi } int n = 1; // Toolbar counter. toolbars are counted from 1, - KToolBar *toolbar; - TQPtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator + TDEToolBar *toolbar; + TQPtrListIterator<TDEToolBar> it( toolBarIterator() ); // must use own iterator for ( ; it.current(); ++it) { toolbar= it.current(); @@ -881,9 +881,9 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const TQString &confi finalizeGUI( true ); } -void KMainWindow::finalizeGUI( bool force ) +void TDEMainWindow::finalizeGUI( bool force ) { - //kdDebug(200) << "KMainWindow::finalizeGUI force=" << force << endl; + //kdDebug(200) << "TDEMainWindow::finalizeGUI force=" << force << endl; // The whole reason for this is that moveToolBar relies on the indexes // of the other toolbars, so in theory it should be called only once per // toolbar, but in increasing order of indexes. @@ -891,7 +891,7 @@ void KMainWindow::finalizeGUI( bool force ) // we call positionYourself again for each of them, but this time // the toolbariterator should give them in the proper order. // Both the XMLGUI and applySettings call this, hence "force" for the latter. - TQPtrListIterator<KToolBar> it( toolBarIterator() ); + TQPtrListIterator<TDEToolBar> it( toolBarIterator() ); for ( ; it.current() ; ++it ) { it.current()->positionYourself( force ); } @@ -899,7 +899,7 @@ void KMainWindow::finalizeGUI( bool force ) d->settingsDirty = false; } -void KMainWindow::saveWindowSize( KConfig * config ) const +void TDEMainWindow::saveWindowSize( TDEConfig * config ) const { int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); @@ -931,7 +931,7 @@ void KMainWindow::saveWindowSize( KConfig * config ) const config->writeEntry(heightString, h ); } -void KMainWindow::restoreWindowSize( KConfig * config ) +void TDEMainWindow::restoreWindowSize( TDEConfig * config ) { if (d->care_about_geometry) { parseGeometry(true); @@ -977,19 +977,19 @@ void KMainWindow::restoreWindowSize( KConfig * config ) } } -bool KMainWindow::initialGeometrySet() const +bool TDEMainWindow::initialGeometrySet() const { return d->care_about_geometry; } -void KMainWindow::ignoreInitialGeometry() +void TDEMainWindow::ignoreInitialGeometry() { d->care_about_geometry = false; } -void KMainWindow::setSettingsDirty() +void TDEMainWindow::setSettingsDirty() { - //kdDebug(200) << "KMainWindow::setSettingsDirty" << endl; + //kdDebug(200) << "TDEMainWindow::setSettingsDirty" << endl; d->settingsDirty = true; if ( d->autoSaveSettings ) { @@ -1004,17 +1004,17 @@ void KMainWindow::setSettingsDirty() } } -bool KMainWindow::settingsDirty() const +bool TDEMainWindow::settingsDirty() const { return d->settingsDirty; } -TQString KMainWindow::settingsGroup() const +TQString TDEMainWindow::settingsGroup() const { return d->autoSaveGroup; } -void KMainWindow::setAutoSaveSettings( const TQString & groupName, bool saveWindowSize ) +void TDEMainWindow::setAutoSaveSettings( const TQString & groupName, bool saveWindowSize ) { d->autoSaveSettings = true; d->autoSaveGroup = groupName; @@ -1026,49 +1026,49 @@ void KMainWindow::setAutoSaveSettings( const TQString & groupName, bool saveWind this, TQT_SLOT( setSettingsDirty() ) ); // Now read the previously saved settings - applyMainWindowSettings( KGlobal::config(), groupName ); + applyMainWindowSettings( TDEGlobal::config(), groupName ); } -void KMainWindow::resetAutoSaveSettings() +void TDEMainWindow::resetAutoSaveSettings() { d->autoSaveSettings = false; if ( d->settingsTimer ) d->settingsTimer->stop(); } -bool KMainWindow::autoSaveSettings() const +bool TDEMainWindow::autoSaveSettings() const { return d->autoSaveSettings; } -TQString KMainWindow::autoSaveGroup() const +TQString TDEMainWindow::autoSaveGroup() const { return d->autoSaveGroup; } -void KMainWindow::saveAutoSaveSettings() +void TDEMainWindow::saveAutoSaveSettings() { Q_ASSERT( d->autoSaveSettings ); - //kdDebug(200) << "KMainWindow::saveAutoSaveSettings -> saving settings" << endl; - saveMainWindowSettings( KGlobal::config(), d->autoSaveGroup ); - KGlobal::config()->sync(); + //kdDebug(200) << "TDEMainWindow::saveAutoSaveSettings -> saving settings" << endl; + saveMainWindowSettings( TDEGlobal::config(), d->autoSaveGroup ); + TDEGlobal::config()->sync(); d->settingsDirty = false; if ( d->settingsTimer ) d->settingsTimer->stop(); } -void KMainWindow::resizeEvent( TQResizeEvent * ) +void TDEMainWindow::resizeEvent( TQResizeEvent * ) { if ( d->autoSaveWindowSize ) setSettingsDirty(); } -bool KMainWindow::hasMenuBar() +bool TDEMainWindow::hasMenuBar() { return (internalMenuBar()); } -KMenuBar *KMainWindow::menuBar() +KMenuBar *TDEMainWindow::menuBar() { KMenuBar * mb = internalMenuBar(); if ( !mb ) { @@ -1080,7 +1080,7 @@ KMenuBar *KMainWindow::menuBar() return mb; } -KStatusBar *KMainWindow::statusBar() +KStatusBar *TDEMainWindow::statusBar() { KStatusBar * sb = internalStatusBar(); if ( !sb ) { @@ -1092,7 +1092,7 @@ KStatusBar *KMainWindow::statusBar() return sb; } -void KMainWindow::shuttingDown() +void TDEMainWindow::shuttingDown() { // Needed for Qt <= 3.0.3 at least to prevent reentrancy // when queryExit() shows a dialog. Check before removing! @@ -1107,7 +1107,7 @@ void KMainWindow::shuttingDown() } -KMenuBar *KMainWindow::internalMenuBar() +KMenuBar *TDEMainWindow::internalMenuBar() { TQObjectList *l = queryList( "KMenuBar", 0, false, false ); if ( !l || !l->first() ) { @@ -1120,7 +1120,7 @@ KMenuBar *KMainWindow::internalMenuBar() return m; } -KStatusBar *KMainWindow::internalStatusBar() +KStatusBar *TDEMainWindow::internalStatusBar() { TQObjectList *l = queryList( "KStatusBar", 0, false, false ); if ( !l || !l->first() ) { @@ -1133,70 +1133,70 @@ KStatusBar *KMainWindow::internalStatusBar() return s; } -void KMainWindow::childEvent( TQChildEvent* e) +void TDEMainWindow::childEvent( TQChildEvent* e) { TQMainWindow::childEvent( e ); } -KToolBar *KMainWindow::toolBar( const char * name ) +TDEToolBar *TDEMainWindow::toolBar( const char * name ) { if (!name) name = "mainToolBar"; - KToolBar *tb = (KToolBar*)child( name, "KToolBar" ); + TDEToolBar *tb = (TDEToolBar*)child( name, "TDEToolBar" ); if ( tb ) return tb; bool honor_mode = (!strcmp(name, "mainToolBar")); if ( builderClient() ) - return new KToolBar(this, name, honor_mode); // XMLGUI constructor + return new TDEToolBar(this, name, honor_mode); // XMLGUI constructor else - return new KToolBar(this, DockTop, false, name, honor_mode ); // non-XMLGUI + return new TDEToolBar(this, DockTop, false, name, honor_mode ); // non-XMLGUI } -TQPtrListIterator<KToolBar> KMainWindow::toolBarIterator() +TQPtrListIterator<TDEToolBar> TDEMainWindow::toolBarIterator() { toolbarList.clear(); TQPtrList<TQToolBar> lst; for ( int i = (int)TQMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) { lst = toolBars( (ToolBarDock)i ); for ( TQToolBar *tb = lst.first(); tb; tb = lst.next() ) { - if ( !tb->inherits( "KToolBar" ) ) + if ( !tb->inherits( "TDEToolBar" ) ) continue; - toolbarList.append( (KToolBar*)tb ); + toolbarList.append( (TDEToolBar*)tb ); } } - return TQPtrListIterator<KToolBar>( toolbarList ); + return TQPtrListIterator<TDEToolBar>( toolbarList ); } -KAccel * KMainWindow::accel() +TDEAccel * TDEMainWindow::accel() { - if ( !d->kaccel ) - d->kaccel = new KAccel( this, "kmw-kaccel" ); - return d->kaccel; + if ( !d->tdeaccel ) + d->tdeaccel = new TDEAccel( this, "kmw-tdeaccel" ); + return d->tdeaccel; } -void KMainWindow::paintEvent( TQPaintEvent * pe ) +void TDEMainWindow::paintEvent( TQPaintEvent * pe ) { TQMainWindow::paintEvent(pe); //Upcall to handle SH_MainWindow_SpaceBelowMenuBar rendering } -TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size) +TQSize TDEMainWindow::sizeForCentralWidgetSize(TQSize size) { - KToolBar *tb = (KToolBar*)child( "mainToolBar", "KToolBar" ); + TDEToolBar *tb = (TDEToolBar*)child( "mainToolBar", "TDEToolBar" ); if (tb && !tb->isHidden()) { switch( tb->barPos() ) { - case KToolBar::Top: - case KToolBar::Bottom: + case TDEToolBar::Top: + case TDEToolBar::Bottom: size += TQSize(0, tb->sizeHint().height()); break; - case KToolBar::Left: - case KToolBar::Right: + case TDEToolBar::Left: + case TDEToolBar::Right: size += TQSize(toolBar()->sizeHint().width(), 0); break; - case KToolBar::Flat: + case TDEToolBar::Flat: size += TQSize(0, 3+kapp->style().pixelMetric( TQStyle::PM_DockWindowHandleExtent )); break; @@ -1222,28 +1222,28 @@ TQSize KMainWindow::sizeForCentralWidgetSize(TQSize size) #warning Remove, should be in Qt #endif #endif -void KMainWindow::setIcon( const TQPixmap& p ) +void TDEMainWindow::setIcon( const TQPixmap& p ) { TQMainWindow::setIcon( p ); #ifdef Q_WS_X11 - // Qt3 doesn't support _NET_WM_ICON, but KApplication::setTopWidget(), which - // is used by KMainWindow, sets it + // Qt3 doesn't support _NET_WM_ICON, but TDEApplication::setTopWidget(), which + // is used by TDEMainWindow, sets it KWin::setIcons( winId(), p, TQPixmap()); #endif } -TQPtrList<KMainWindow>* KMainWindow::getMemberList() { return memberList; } +TQPtrList<TDEMainWindow>* TDEMainWindow::getMemberList() { return memberList; } // why do we support old gcc versions? using KXMLGUIBuilder::finalizeGUI; // DF: because they compile KDE much faster :) -void KMainWindow::finalizeGUI( KXMLGUIClient *client ) +void TDEMainWindow::finalizeGUI( KXMLGUIClient *client ) { KXMLGUIBuilder::finalizeGUI( client ); } -void KMainWindow::virtual_hook( int id, void* data ) +void TDEMainWindow::virtual_hook( int id, void* data ) { KXMLGUIBuilder::virtual_hook( id, data ); KXMLGUIClient::virtual_hook( id, data ); } -#include "kmainwindow.moc" +#include "tdemainwindow.moc" diff --git a/tdeui/kmainwindow.h b/tdeui/tdemainwindow.h index 8aba596f1..571a13797 100644 --- a/tdeui/kmainwindow.h +++ b/tdeui/tdemainwindow.h @@ -26,19 +26,19 @@ #include "kxmlguibuilder.h" #include <tqmainwindow.h> #include <tqmetaobject.h> -#include <ktoolbar.h> +#include <tdetoolbar.h> -class KPopupMenu; +class TDEPopupMenu; class KXMLGUIFactory; -class KConfig; +class TDEConfig; class KHelpMenu; class KStatusBar; class TQStatusBar; class KMenuBar; class KMWSessionManaged; -class KMainWindowPrivate; -class KAccel; -class KToolBarMenuAction; +class TDEMainWindowPrivate; +class TDEAccel; +class TDEToolBarMenuAction; class DCOPObject; #define KDE_DEFAULT_WINDOWFLAGS WType_TopLevel | WDestructiveClose @@ -53,7 +53,7 @@ class DCOPObject; * It manages the geometry for all its children, including your * main widget. * - * Normally, you will inherit from KMainWindow, + * Normally, you will inherit from TDEMainWindow, * then construct (or use some existing) widget as * your main view. You can set only one main view. * @@ -61,19 +61,19 @@ class DCOPObject; * and only one statusbar. * * The toolbars, menubar, and statusbar can be created by the - * KMainWindow and - unlike the old KMainWindow - may, but do not - * have to, be deleted by you. KMainWindow will handle that internally. + * TDEMainWindow and - unlike the old TDEMainWindow - may, but do not + * have to, be deleted by you. TDEMainWindow will handle that internally. * * Height and width can be operated independently from each other. Simply * define the minimum/maximum height/width of your main widget and - * KMainWindow will take this into account. For fixed size windows set + * TDEMainWindow will take this into account. For fixed size windows set * your main widget to a fixed size. * * Fixed aspect ratios (heightForWidth()) and fixed width widgets are * not supported. * - * KMainWindow will set icon, mini icon and caption, which it gets - * from KApplication. It provides full session management, and + * TDEMainWindow will set icon, mini icon and caption, which it gets + * from TDEApplication. It provides full session management, and * will save its position, geometry and positions of toolbars and * menubar on logout. If you want to save additional data, reimplement * saveProperties() and (to read them again on next login) @@ -85,17 +85,17 @@ class DCOPObject; * There are also kRestoreMainWindows convenience functions which * can restore all your windows on next login. * - * Note that a KMainWindow per-default is created with the + * Note that a TDEMainWindow per-default is created with the * WDestructiveClose flag, i.e. it is automatically destroyed when the * window is closed. If you do not want this behavior, specify 0 as * widget flag in the constructor. * - * @see KApplication + * @see TDEApplication * @author Reginald Stadlbauer (reggie@kde.org) Stephan Kulow (coolo@kde.org), Matthias Ettrich (ettrich@kde.org), Chris Schlaeger (cs@kde.org), Sven Radej (radej@kde.org). Maintained by Sven Radej (radej@kde.org) */ -class TDEUI_EXPORT KMainWindow : public TQMainWindow, public KXMLGUIBuilder, virtual public KXMLGUIClient +class TDEUI_EXPORT TDEMainWindow : public TQMainWindow, public KXMLGUIBuilder, virtual public KXMLGUIClient { friend class KMWSessionManaged; Q_OBJECT @@ -105,15 +105,15 @@ public: * Construct a main window. * * @param parent The widget parent. This is usually 0 but it may also be the window - * group leader. In that case, the KMainWindow becomes sort of a + * group leader. In that case, the TDEMainWindow becomes sort of a * secondary window. * * @param name The object name. For session management and window management to work * properly, all main windows in the application should have a - * different name. When passing 0 (the default), KMainWindow will create + * different name. When passing 0 (the default), TDEMainWindow will create * a unique name, but it's recommended to explicitly pass a window name that will * also describe the type of the window. If there can be several windows of the same - * type, append '#' (hash) to the name, and KMainWindow will append numbers to make + * type, append '#' (hash) to the name, and TDEMainWindow will append numbers to make * the names unique. For example, for a mail client which has one main window showing * the mails and folders, and which can also have one or more windows for composing * mails, the name for the folders window should be e.g. "mainwindow" and @@ -128,25 +128,25 @@ public: * * @see http://doc.trolltech.com/3.2/tqt.html#WidgetFlags-enum * - * KMainWindows must be created on the heap with 'new', like: + * TDEMainWindows must be created on the heap with 'new', like: * \code - * KMainWindow *kmw = new KMainWindow (...); + * TDEMainWindow *kmw = new TDEMainWindow (...); * \endcode **/ #ifdef qdoc - KMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); + TDEMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); #else - KMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = (WFlags)(WType_TopLevel | WDestructiveClose) ); + TDEMainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = (WFlags)(WType_TopLevel | WDestructiveClose) ); #endif /** * Flags that can be passed in an argument to the constructor to * change the behavior. * - * NoDCOPObject tells KMainWindow not to create a KMainWindowInterface. + * NoDCOPObject tells TDEMainWindow not to create a TDEMainWindowInterface. * This can be useful in particular for inherited classes, which * might want to create more specific dcop interfaces. It's a good - * idea to use KMainWindowInterface as the base class for such interfaces + * idea to use TDEMainWindowInterface as the base class for such interfaces * though (to provide the standard mainwindow functionality via DCOP). */ enum CreationFlags @@ -155,14 +155,14 @@ public: }; /** - * Overloaded constructor which allows passing some KMainWindow::CreationFlags. + * Overloaded constructor which allows passing some TDEMainWindow::CreationFlags. * * @since 3.2 */ #ifdef qdoc - KMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); + TDEMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); #else - KMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = (WFlags)(WType_TopLevel | WDestructiveClose) ); + TDEMainWindow( int cflags, TQWidget* parent = 0, const char *name = 0, WFlags f = (WFlags)(WType_TopLevel | WDestructiveClose) ); #endif /** @@ -171,7 +171,7 @@ public: * Will also destroy the toolbars, and menubar if * needed. */ - virtual ~KMainWindow(); + virtual ~TDEMainWindow(); /** * Retrieve the standard help menu. @@ -183,13 +183,13 @@ public: * * Example (adding a standard help menu to your application): * \code - * KPopupMenu *help = helpMenu( <myTextString> ); + * TDEPopupMenu *help = helpMenu( <myTextString> ); * menuBar()->insertItem( i18n("&Help"), help ); * \endcode * * @param aboutAppText The string that is used in the application * specific dialog box. If you leave this string empty the - * information in the global KAboutData of the + * information in the global TDEAboutData of the * application will be used to make a standard dialog box. * * @param showWhatsThis Set this to false if you do not want to include @@ -197,7 +197,7 @@ public: * * @return A standard help menu. */ - KPopupMenu* helpMenu( const TQString &aboutAppText = TQString::null, + TDEPopupMenu* helpMenu( const TQString &aboutAppText = TQString::null, bool showWhatsThis = true ); /** @@ -222,7 +222,7 @@ public: * * @return A standard help menu. */ - KPopupMenu* customHelpMenu( bool showWhatsThis = true ); + TDEPopupMenu* customHelpMenu( bool showWhatsThis = true ); /** * <b>Session Management</b> @@ -236,7 +236,7 @@ public: * \code * if (kapp->isRestored()){ * int n = 1; - * while (KMainWindow::canBeRestored(n)){ + * while (TDEMainWindow::canBeRestored(n)){ * (new childMW)->restore(n); * n++; * } @@ -250,7 +250,7 @@ public: * application. * * If your application uses different kinds of toplevel - * windows, then you can use KMainWindow::classNameOfToplevel(n) + * windows, then you can use TDEMainWindow::classNameOfToplevel(n) * to determine the exact type before calling the childMW * constructor in the example from above. * @@ -270,7 +270,7 @@ public: * less code to write. * * For new code or if you have more than one kind of toplevel - * widget (each derived from KMainWindow, of course), you can + * widget (each derived from TDEMainWindow, of course), you can * use the templated kRestoreMainWindows global functions: * * \code @@ -379,25 +379,25 @@ public: * * If there is no status bar yet, one will be created. * - * Note that tooltips for kactions in actionCollection() are not + * Note that tooltips for tdeactions in actionCollection() are not * automatically connected to this statusBar. - * See the KActionCollection documentation for more details. + * See the TDEActionCollection documentation for more details. * - * @see KActionCollection + * @see TDEActionCollection */ KStatusBar *statusBar(); /** - * List of members of KMainWindow class. + * List of members of TDEMainWindow class. */ - static TQPtrList<KMainWindow>* memberList; + static TQPtrList<TDEMainWindow>* memberList; //KDE4: replace with memberList() and make memberList member private /** - * List of members of KMainWindow class. + * List of members of TDEMainWindow class. * @since 3.4 */ - static TQPtrList<KMainWindow>* getMemberList(); + static TQPtrList<TDEMainWindow>* getMemberList(); /** * Returns a pointer to the toolbar with the specified name. @@ -409,18 +409,18 @@ public: * * @return A pointer to the toolbar **/ - KToolBar *toolBar( const char *name=0 ); + TDEToolBar *toolBar( const char *name=0 ); /** * @return An iterator over the list of all toolbars for this window. */ - TQPtrListIterator<KToolBar> toolBarIterator(); + TQPtrListIterator<TDEToolBar> toolBarIterator(); /** - * @return A KAccel instance bound to this mainwindow. Used automatically - * by KAction to make keybindings work in all cases. + * @return A TDEAccel instance bound to this mainwindow. Used automatically + * by TDEAction to make keybindings work in all cases. */ - KAccel *accel(); + TDEAccel *accel(); void setFrameBorderWidth( int ) {} @@ -428,7 +428,7 @@ public: * Call this to enable "auto-save" of toolbar/menubar/statusbar settings * (and optionally window size). * If the *bars were moved around/shown/hidden when the window is closed, - * saveMainWindowSettings( KGlobal::config(), groupName ) will be called. + * saveMainWindowSettings( TDEGlobal::config(), groupName ) will be called. * * @param groupName a name that identifies this "type of window". * You can have several types of window in the same application. @@ -437,11 +437,11 @@ public: * when saving. * * Typically, you will call setAutoSaveSettings() in your - * KMainWindow-inherited class constructor, and it will take care + * TDEMainWindow-inherited class constructor, and it will take care * of restoring and saving automatically. Make sure you call this * _after all_ your *bars have been created. * - * To make sure that KMainWindow propertly obtains the default + * To make sure that TDEMainWindow propertly obtains the default * size of the window you should do the following: * - Remove hard coded resize() calls in the constructor or main, they * should be removed in favor of letting the automatic resizing @@ -489,9 +489,9 @@ public: * group name is used. * @param force if set, even default settings are re-applied */ - void applyMainWindowSettings(KConfig *config, const TQString &groupName, bool force); + void applyMainWindowSettings(TDEConfig *config, const TQString &groupName, bool force); // KDE4 merge with force=false - void applyMainWindowSettings(KConfig *config, const TQString &groupName = TQString::null); + void applyMainWindowSettings(TDEConfig *config, const TQString &groupName = TQString::null); /** * Save settings for statusbar, menubar and toolbar to their respective @@ -501,11 +501,11 @@ public: * @param groupName Group name to use. If not specified, the last used * group name is used */ - void saveMainWindowSettings(KConfig *config, const TQString &groupName = TQString::null); + void saveMainWindowSettings(TDEConfig *config, const TQString &groupName = TQString::null); /** - * Sets whether KMainWindow should provide a menu that allows showing/hiding - * the available toolbars ( using KToggleToolBarAction ) . In case there + * Sets whether TDEMainWindow should provide a menu that allows showing/hiding + * the available toolbars ( using TDEToggleToolBarAction ) . In case there * is only one toolbar configured a simple 'Show \<toolbar name here\>' menu item * is shown. * @@ -527,8 +527,8 @@ public: /** - * Sets whether KMainWindow should provide a menu that allows showing/hiding - * of the statusbar ( using KToggleStatusBarAction ). + * Sets whether TDEMainWindow should provide a menu that allows showing/hiding + * of the statusbar ( using TDEToggleStatusBarAction ). * * The menu / menu item is implemented using xmlgui. It will be inserted * in your menu structure in the 'Settings' menu. @@ -537,13 +537,13 @@ public: * ( or similar ). * * If an application maintains the action on its own (i.e. never calls - * this function) a connection needs to be made to let KMainWindow + * this function) a connection needs to be made to let TDEMainWindow * know when that status (hidden/shown) of the statusbar has changed. * For example: * connect(action, TQT_SIGNAL(activated()), - * kmainwindow, TQT_SLOT(setSettingsDirty())); + * tdemainwindow, TQT_SLOT(setSettingsDirty())); * Otherwise the status (hidden/show) of the statusbar might not be saved - * by KMainWindow. + * by TDEMainWindow. * @since 3.2 */ void createStandardStatusBarAction(); @@ -622,10 +622,10 @@ public: * Returns a pointer to the mainwindows action responsible for the toolbars menu * @since 3.1 */ - KAction *toolBarMenuAction(); + TDEAction *toolBarMenuAction(); /** - * @internal for KToolBar + * @internal for TDEToolBar * @since 3.3.1 */ void setupToolbarMenuActions(); @@ -731,7 +731,7 @@ public slots: * Example (adding a help button to the first toolbar): * * \code - * KIconLoader &loader = *KGlobal::iconLoader(); + * TDEIconLoader &loader = *TDEGlobal::iconLoader(); * TQPixmap pixmap = loader.loadIcon( "help" ); * toolBar(0)->insertButton( pixmap, 0, TQT_SIGNAL(clicked()), * this, TQT_SLOT(appHelpActivated()), true, i18n("Help") ); @@ -798,9 +798,9 @@ protected: // would be useful only for the annoying 'really quit' dialog, which // also doesn't make sense in apps with multiple mainwindows. // And saving configuration in something called queryExit()? IMHO - // one can e.g. use KApplication::shutDown(), which if nothing else + // one can e.g. use TDEApplication::shutDown(), which if nothing else // has at least better fitting name. - // See also KApplication::sessionSaving(). + // See also TDEApplication::sessionSaving(). // This stuff should get changed somehow, so that it at least doesn't // mess with session management. /** @@ -820,15 +820,15 @@ protected: If you need to do serious things on exit (like shutting a dial-up connection down), connect to the signal - KApplication::shutDown(). + TDEApplication::shutDown(). Default implementation returns @p true. Returning @p false will cancel the exiting. In the latter case, the last window will - remain visible. If KApplication::sessionSaving() is true, refusing + remain visible. If TDEApplication::sessionSaving() is true, refusing the exit will also cancel KDE logout. @see queryClose() - @see KApplication::sessionSaving() + @see TDEApplication::sessionSaving() */ virtual bool queryExit(); @@ -840,7 +840,7 @@ protected: safe to close it, i.e. without the user losing some data. Default implementation returns true. Returning @p false will cancel - the closing, and, if KApplication::sessionSaving() is true, it will also + the closing, and, if TDEApplication::sessionSaving() is true, it will also cancel KDE logout. Reimplement this function to prevent the user from losing data. @@ -864,7 +864,7 @@ protected: may be canceled, in which case the document should remain open. @see queryExit() - @see KApplication::sessionSaving() + @see TDEApplication::sessionSaving() */ virtual bool queryClose(); @@ -873,20 +873,20 @@ protected: * invoked when the session manager requests your application * to save its state. * - * You @em must @em not change the group of the @p kconfig object, since - * KMainWindow uses one group for each window. Please + * You @em must @em not change the group of the @p tdeconfig object, since + * TDEMainWindow uses one group for each window. Please * reimplement these function in childclasses. * * Note: No user interaction is allowed * in this function! * */ - virtual void saveProperties( KConfig* ) {} + virtual void saveProperties( TDEConfig* ) {} /** * Read your instance-specific properties. */ - virtual void readProperties( KConfig* ) {} + virtual void readProperties( TDEConfig* ) {} /** * Save your application-wide properties. The function is @@ -904,16 +904,16 @@ protected: * * Default implementation does nothing. */ - virtual void saveGlobalProperties( KConfig* sessionConfig ); + virtual void saveGlobalProperties( TDEConfig* sessionConfig ); /** * The counterpart of saveGlobalProperties(). * * Read the application-specific properties in again. */ - virtual void readGlobalProperties( KConfig* sessionConfig ); - void savePropertiesInternal( KConfig*, int ); - bool readPropertiesInternal( KConfig*, int ); + virtual void readGlobalProperties( TDEConfig* sessionConfig ); + void savePropertiesInternal( TDEConfig*, int ); + bool readPropertiesInternal( TDEConfig*, int ); /** * For inherited classes @@ -927,13 +927,13 @@ protected: * For inherited classes * Note that the group must be set before calling */ - void saveWindowSize( KConfig * config ) const; + void saveWindowSize( TDEConfig * config ) const; /** * For inherited classes * Note that the group must be set before calling, and that * a -geometry on the command line has priority. */ - void restoreWindowSize( KConfig * config ); + void restoreWindowSize( TDEConfig * config ); /// parse the geometry from the geometry command line argument void parseGeometry(bool parsewidth); @@ -1007,16 +1007,16 @@ private: KStatusBar *internalStatusBar(); KHelpMenu *mHelpMenu, *helpMenu2; KXMLGUIFactory *factory_; - TQPtrList<KToolBar> toolbarList; + TQPtrList<TDEToolBar> toolbarList; protected: virtual void virtual_hook( int id, void* data ); private: - KMainWindowPrivate *d; - void initKMainWindow(const char *name, int cflags); + TDEMainWindowPrivate *d; + void initTDEMainWindow(const char *name, int cflags); }; #define RESTORE(type) { int n = 1;\ - while (KMainWindow::canBeRestored(n)){\ + while (TDEMainWindow::canBeRestored(n)){\ (new type)->restore(n);\ n++;}} @@ -1027,15 +1027,15 @@ private: * number of template arguments) are a replacement for the RESTORE * macro provided in earlier versions of KDE. The old RESTORE macro * is still provided for backwards compatibility. See - * KMainWindow documentation for more. + * TDEMainWindow documentation for more. * * \since KDE 3.2 * **/ template <typename T> inline void kRestoreMainWindows() { - for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { - const TQString className = KMainWindow::classNameOfToplevel( n ); + for ( int n = 1 ; TDEMainWindow::canBeRestored( n ) ; ++n ) { + const TQString className = TDEMainWindow::classNameOfToplevel( n ); if ( className == TQString::fromLatin1( T::staticMetaObject()->className() ) ) (new T)->restore( n ); } @@ -1046,8 +1046,8 @@ inline void kRestoreMainWindows() { const char * classNames[2]; classNames[0] = T0::staticMetaObject()->className(); classNames[1] = T1::staticMetaObject()->className(); - for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { - const TQString className = KMainWindow::classNameOfToplevel( n ); + for ( int n = 1 ; TDEMainWindow::canBeRestored( n ) ; ++n ) { + const TQString className = TDEMainWindow::classNameOfToplevel( n ); if ( className == TQString::fromLatin1( classNames[0] ) ) (new T0)->restore( n ); else if ( className == TQString::fromLatin1( classNames[1] ) ) @@ -1061,8 +1061,8 @@ inline void kRestoreMainWindows() { classNames[0] = T0::staticMetaObject()->className(); classNames[1] = T1::staticMetaObject()->className(); classNames[2] = T2::staticMetaObject()->className(); - for ( int n = 1 ; KMainWindow::canBeRestored( n ) ; ++n ) { - const TQString className = KMainWindow::classNameOfToplevel( n ); + for ( int n = 1 ; TDEMainWindow::canBeRestored( n ) ; ++n ) { + const TQString className = TDEMainWindow::classNameOfToplevel( n ); if ( className == TQString::fromLatin1( classNames[0] ) ) (new T0)->restore( n ); else if ( className == TQString::fromLatin1( classNames[1] ) ) diff --git a/tdeui/kmainwindowiface.cpp b/tdeui/tdemainwindowiface.cpp index f8ef88c31..8f8a9d40c 100644 --- a/tdeui/kmainwindowiface.cpp +++ b/tdeui/tdemainwindowiface.cpp @@ -17,18 +17,18 @@ Boston, MA 02110-1301, USA. */ -#include "kmainwindowiface.h" +#include "tdemainwindowiface.h" #include <dcopclient.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kdcopactionproxy.h> #include <kdcoppropertyproxy.h> -#include <kmainwindow.h> -#include <kaction.h> +#include <tdemainwindow.h> +#include <tdeaction.h> #include <tqclipboard.h> -KMainWindowInterface::KMainWindowInterface(KMainWindow * mainWindow) +TDEMainWindowInterface::TDEMainWindowInterface(TDEMainWindow * mainWindow) : DCOPObject( mainWindow->name()) { m_MainWindow = mainWindow; @@ -36,30 +36,30 @@ KMainWindowInterface::KMainWindowInterface(KMainWindow * mainWindow) m_dcopPropertyProxy = new KDCOPPropertyProxy(TQT_TQOBJECT(m_MainWindow)); } -KMainWindowInterface::~KMainWindowInterface() +TDEMainWindowInterface::~TDEMainWindowInterface() { delete m_dcopActionProxy; delete m_dcopPropertyProxy; } -QCStringList KMainWindowInterface::actions() +QCStringList TDEMainWindowInterface::actions() { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); QCStringList tmp_actions; - TQValueList<KAction *> lst = m_dcopActionProxy->actions(); - TQValueList<KAction *>::ConstIterator it = lst.begin(); - TQValueList<KAction *>::ConstIterator end = lst.end(); + TQValueList<TDEAction *> lst = m_dcopActionProxy->actions(); + TQValueList<TDEAction *>::ConstIterator it = lst.begin(); + TQValueList<TDEAction *>::ConstIterator end = lst.end(); for (; it != end; ++it ) if ((*it)->isPlugged()) tmp_actions.append( (TQCString)(*it)->name() ); return tmp_actions; } -bool KMainWindowInterface::activateAction( TQCString action) +bool TDEMainWindowInterface::activateAction( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { tmp_Action->activate(); @@ -68,11 +68,11 @@ bool KMainWindowInterface::activateAction( TQCString action) else return false; } -bool KMainWindowInterface::disableAction( TQCString action) +bool TDEMainWindowInterface::disableAction( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { tmp_Action->setEnabled(false); @@ -81,11 +81,11 @@ bool KMainWindowInterface::disableAction( TQCString action) else return false; } -bool KMainWindowInterface::enableAction( TQCString action) +bool TDEMainWindowInterface::enableAction( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { tmp_Action->setEnabled(true); @@ -94,11 +94,11 @@ bool KMainWindowInterface::enableAction( TQCString action) else return false; } -bool KMainWindowInterface::actionIsEnabled( TQCString action) +bool TDEMainWindowInterface::actionIsEnabled( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { return tmp_Action->isEnabled(); @@ -106,11 +106,11 @@ bool KMainWindowInterface::actionIsEnabled( TQCString action) else return false; } -TQCString KMainWindowInterface::actionToolTip( TQCString action) +TQCString TDEMainWindowInterface::actionToolTip( TQCString action) { delete m_dcopActionProxy; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - KAction *tmp_Action = m_dcopActionProxy->action(action); + TDEAction *tmp_Action = m_dcopActionProxy->action(action); if (tmp_Action) { return tmp_Action->toolTip().utf8(); @@ -119,74 +119,74 @@ TQCString KMainWindowInterface::actionToolTip( TQCString action) return "Error no such object!"; } -DCOPRef KMainWindowInterface::action( const TQCString &name ) +DCOPRef TDEMainWindowInterface::action( const TQCString &name ) { return DCOPRef( kapp->dcopClient()->appId(), m_dcopActionProxy->actionObjectId( name ) ); } -TQMap<TQCString,DCOPRef> KMainWindowInterface::actionMap() +TQMap<TQCString,DCOPRef> TDEMainWindowInterface::actionMap() { return m_dcopActionProxy->actionMap(); } -int KMainWindowInterface::getWinID() +int TDEMainWindowInterface::getWinID() { return (int) m_MainWindow->winId(); } -void KMainWindowInterface::grabWindowToClipBoard() +void TDEMainWindowInterface::grabWindowToClipBoard() { TQClipboard *clipboard = TQApplication::clipboard(); clipboard->setPixmap(TQPixmap::grabWidget(m_MainWindow)); } -void KMainWindowInterface::hide() +void TDEMainWindowInterface::hide() { m_MainWindow->hide(); } -void KMainWindowInterface::maximize() +void TDEMainWindowInterface::maximize() { m_MainWindow->showMaximized(); } -void KMainWindowInterface::minimize() +void TDEMainWindowInterface::minimize() { m_MainWindow->showMinimized(); } -void KMainWindowInterface::resize(int newX, int newY) +void TDEMainWindowInterface::resize(int newX, int newY) { m_MainWindow->resize(newX, newY); } -void KMainWindowInterface::move(int newX, int newY) +void TDEMainWindowInterface::move(int newX, int newY) { m_MainWindow->move(newX, newY); } -void KMainWindowInterface::setGeometry(int newX, int newY, int newWidth, int newHeight) +void TDEMainWindowInterface::setGeometry(int newX, int newY, int newWidth, int newHeight) { m_MainWindow->setGeometry(newX, newY, newWidth, newHeight); } -void KMainWindowInterface::raise() +void TDEMainWindowInterface::raise() { m_MainWindow->raise(); } -void KMainWindowInterface::lower() +void TDEMainWindowInterface::lower() { m_MainWindow->lower(); } -void KMainWindowInterface::restore() +void TDEMainWindowInterface::restore() { m_MainWindow->showNormal(); } -void KMainWindowInterface::close() +void TDEMainWindowInterface::close() { m_MainWindow->close(); } -void KMainWindowInterface::show() +void TDEMainWindowInterface::show() { m_MainWindow->show(); } -QCStringList KMainWindowInterface::functionsDynamic() +QCStringList TDEMainWindowInterface::functionsDynamic() { return m_dcopPropertyProxy->functions(); } -bool KMainWindowInterface::processDynamic(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData) +bool TDEMainWindowInterface::processDynamic(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData) { return m_dcopPropertyProxy->processPropertyRequest( fun, data, replyType, replyData); diff --git a/tdeui/kmainwindowiface.h b/tdeui/tdemainwindowiface.h index 58ca74e2c..f469096ef 100644 --- a/tdeui/kmainwindowiface.h +++ b/tdeui/tdemainwindowiface.h @@ -27,32 +27,32 @@ class KDCOPActionProxy; class KDCOPPropertyProxy; -class KMainWindow; +class TDEMainWindow; /** - * @short DCOP interface to KMainWindow. + * @short DCOP interface to TDEMainWindow. * - * This is the main interface to the KMainWindow. This will provide a consistent + * This is the main interface to the TDEMainWindow. This will provide a consistent * DCOP interface to all KDE applications that use it. * * @author Ian Reinhart Geiser <geiseri@yahoo.com> */ -class TDEUI_EXPORT KMainWindowInterface : virtual public DCOPObject +class TDEUI_EXPORT TDEMainWindowInterface : virtual public DCOPObject { K_DCOP public: /** Construct a new interface object. - @param mainWindow - The parent KMainWindow object - that will provide us with the KAction objects. + @param mainWindow - The parent TDEMainWindow object + that will provide us with the TDEAction objects. */ - KMainWindowInterface( KMainWindow * mainWindow ); + TDEMainWindowInterface( TDEMainWindow * mainWindow ); /** Destructor Cleans up the dcop action proxy object. **/ - ~KMainWindowInterface(); + ~TDEMainWindowInterface(); QCStringList functionsDynamic(); bool processDynamic(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData); @@ -106,10 +106,10 @@ k_dcop: TQCString actionToolTip( TQCString action); /** - Returns a dcop reference to the selected KAction + Returns a dcop reference to the selected TDEAction @param name The name of the action. The names of valid actions can be found by calling actions(). - @return A DCOPRef for the kaction. + @return A DCOPRef for the tdeaction. **/ DCOPRef action( const TQCString &name ); @@ -151,7 +151,7 @@ k_dcop: // QCStringList getQTProperties(); private: - KMainWindow *m_MainWindow; + TDEMainWindow *m_MainWindow; KDCOPActionProxy *m_dcopActionProxy; KDCOPPropertyProxy *m_dcopPropertyProxy; }; diff --git a/tdeui/kmenubar.cpp b/tdeui/tdemenubar.cpp index 7f6983275..0a5fe0188 100644 --- a/tdeui/kmenubar.cpp +++ b/tdeui/tdemenubar.cpp @@ -32,11 +32,11 @@ #include <tqstyle.h> #include <tqtimer.h> -#include <kconfig.h> -#include <kglobalsettings.h> -#include <kmenubar.h> -#include <kapplication.h> -#include <kglobal.h> +#include <tdeconfig.h> +#include <tdeglobalsettings.h> +#include <tdemenubar.h> +#include <tdeapplication.h> +#include <tdeglobal.h> #include <kdebug.h> #include <kmanagerselection.h> @@ -94,7 +94,7 @@ public: int margin; // dtto bool fallback_mode; // dtto #ifdef Q_WS_X11 - KSelectionWatcher* selection; + TDESelectionWatcher* selection; #endif TQTimer selection_timer; TQSize min_size; @@ -177,7 +177,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level) if ( isTopLevelMenu() ) { #ifdef Q_WS_X11 - d->selection = new KSelectionWatcher( KMenuBarPrivate::makeSelectionAtom(), + d->selection = new TDESelectionWatcher( KMenuBarPrivate::makeSelectionAtom(), DefaultScreen( tqt_xdisplay())); connect( d->selection, TQT_SIGNAL( newOwner( Window )), this, TQT_SLOT( updateFallbackSize())); @@ -235,8 +235,8 @@ void KMenuBar::show() void KMenuBar::slotReadConfig() { - KConfig *config = KGlobal::config(); - KConfigGroupSaver saver( config, "KDE" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "KDE" ); setTopLevelMenuInternal( config->readBoolEntry( "macStyle", false ) ); } @@ -329,7 +329,7 @@ void KMenuBar::selectionTimeout() if ( d->topLevel ) { d->fallback_mode = true; // KMenuBar is handling its position itself - KConfigGroup xineramaConfig(KGlobal::config(),"Xinerama"); + TDEConfigGroup xineramaConfig(TDEGlobal::config(),"Xinerama"); int screen = xineramaConfig.readNumEntry("MenubarScreen", TQApplication::desktop()->screenNumber(TQPoint(0,0)) ); TQRect area; @@ -568,4 +568,4 @@ void KMenuBar::drawContents( TQPainter* p ) void KMenuBar::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -#include "kmenubar.moc" +#include "tdemenubar.moc" diff --git a/tdeui/kmenubar.h b/tdeui/tdemenubar.h index e657671e3..e657671e3 100644 --- a/tdeui/kmenubar.h +++ b/tdeui/tdemenubar.h diff --git a/tdeui/kmessagebox.cpp b/tdeui/tdemessagebox.cpp index ee526dcdb..3208e94d8 100644 --- a/tdeui/kmessagebox.cpp +++ b/tdeui/tdemessagebox.cpp @@ -31,19 +31,19 @@ #include <tqpushbutton.h> #include <tqlayout.h> -#include <kapplication.h> -#include <kconfig.h> +#include <tdeapplication.h> +#include <tdeconfig.h> #include <kdebug.h> #include <kdialogbase.h> #include <kguiitem.h> -#include <klistbox.h> -#include <klocale.h> -#include <kmessagebox.h> +#include <tdelistbox.h> +#include <tdelocale.h> +#include <tdemessagebox.h> #include <knotifyclient.h> #include <kstdguiitem.h> #include <kactivelabel.h> #include <kiconloader.h> -#include <kglobalsettings.h> +#include <tdeglobalsettings.h> #ifdef Q_WS_X11 #include <X11/Xlib.h> @@ -82,7 +82,7 @@ static TQPixmap themedMessageBoxIcon(TQMessageBox::Icon icon) break; } - TQPixmap ret = KGlobal::iconLoader()->loadIcon(icon_name, KIcon::NoGroup, KIcon::SizeMedium, KIcon::DefaultState, 0, true); + TQPixmap ret = TDEGlobal::iconLoader()->loadIcon(icon_name, TDEIcon::NoGroup, TDEIcon::SizeMedium, TDEIcon::DefaultState, 0, true); if (ret.isNull()) return TQMessageBox::standardIcon(icon); @@ -174,7 +174,7 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, TQPixmap icon, // Calculate a proper size for the text. { TQSimpleRichText rt(qt_text, dialog->font()); - TQRect d = KGlobalSettings::desktopGeometry(dialog); + TQRect d = TDEGlobalSettings::desktopGeometry(dialog); pref_width = d.width() / 3; rt.setWidth(pref_width); @@ -224,10 +224,10 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, TQPixmap icon, lay->addWidget( label2 ); lay->addStretch(); - KListBox *listbox = 0; + TDEListBox *listbox = 0; if (!strlist.isEmpty()) { - listbox=new KListBox( topcontents ); + listbox=new TDEListBox( topcontents ); listbox->insertStringList( strlist ); listbox->setSelectionMode( TQListBox::NoSelection ); topcontents->setStretchFactor(listbox, 1); @@ -343,8 +343,8 @@ KMessageBox::shouldBeShownYesNo(const TQString &dontShowAgainName, { if ( dontShowAgainName.isEmpty() ) return true; TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); - KConfig *config = againConfig ? againConfig : KGlobal::config(); - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); TQString dontAsk = config->readEntry(dontShowAgainName).lower(); if (dontAsk == "yes") { result = Yes; @@ -362,8 +362,8 @@ KMessageBox::shouldBeShownContinue(const TQString &dontShowAgainName) { if ( dontShowAgainName.isEmpty() ) return true; TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); - KConfig *config = againConfig ? againConfig : KGlobal::config(); - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); return config->readBoolEntry(dontShowAgainName, true); } @@ -373,8 +373,8 @@ KMessageBox::saveDontShowAgainYesNo(const TQString &dontShowAgainName, { if ( dontShowAgainName.isEmpty() ) return; TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); - KConfig *config = againConfig ? againConfig : KGlobal::config(); - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); config->writeEntry( dontShowAgainName, result==Yes ? "yes" : "no", true, (dontShowAgainName[0] == ':')); config->sync(); } @@ -384,15 +384,15 @@ KMessageBox::saveDontShowAgainContinue(const TQString &dontShowAgainName) { if ( dontShowAgainName.isEmpty() ) return; TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); - KConfig *config = againConfig ? againConfig : KGlobal::config(); - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); config->writeEntry( dontShowAgainName, false, true, (dontShowAgainName[0] == ':')); config->sync(); } -KConfig* KMessageBox::againConfig = NULL; +TDEConfig* KMessageBox::againConfig = NULL; void -KMessageBox::setDontShowAskAgainConfig(KConfig* cfg) +KMessageBox::setDontShowAskAgainConfig(TDEConfig* cfg) { againConfig = cfg; } @@ -935,12 +935,12 @@ KMessageBox::informationListWId(WId parent_id,const TQString &text, const TQStri void KMessageBox::enableAllMessages() { - KConfig *config = againConfig ? againConfig : KGlobal::config(); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); if (!config->hasGroup(grpNotifMsgs)) return; - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); typedef TQMap<TQString, TQString> configMap; @@ -955,12 +955,12 @@ KMessageBox::enableAllMessages() void KMessageBox::enableMessage(const TQString &dontShowAgainName) { - KConfig *config = againConfig ? againConfig : KGlobal::config(); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); if (!config->hasGroup(grpNotifMsgs)) return; - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); config->deleteEntry(dontShowAgainName); config->sync(); @@ -981,7 +981,7 @@ KMessageBox::about(TQWidget *parent, const TQString &text, parent, "about", true, true, KStdGuiItem::ok() ); - TQPixmap ret = KApplication::kApplication()->icon(); + TQPixmap ret = TDEApplication::kApplication()->icon(); if (ret.isNull()) ret = TQMessageBox::standardIcon(TQMessageBox::Information); dialog->setIcon(ret); diff --git a/tdeui/kmessagebox.h b/tdeui/tdemessagebox.h index 419d1edc7..b7724f5ce 100644 --- a/tdeui/kmessagebox.h +++ b/tdeui/tdemessagebox.h @@ -27,7 +27,7 @@ class TQWidget; class TQStringList; -class KConfig; +class TDEConfig; class KDialogBase; /** @@ -74,7 +74,7 @@ public: Notify = 1, ///< Emit a KNotifyClient event AllowLink = 2, ///< The message may contain links. Dangerous = 4, ///< The action to be confirmed by the dialog is a potentially destructive one - PlainCaption = 8, /**< Do not use KApplication::makeStdCaption() + PlainCaption = 8, /**< Do not use TDEApplication::makeStdCaption() @since 3.4 */ NoExec = 16 /**< Do not call exec() in createKMessageBox() @@ -1094,10 +1094,10 @@ public: /** * Use @p cfg for all settings related to the dontShowAgainName feature. - * If @p cfg is 0 (default) KGlobal::config() will be used. + * If @p cfg is 0 (default) TDEGlobal::config() will be used. * @since 3.2 */ - static void setDontShowAskAgainConfig(KConfig* cfg); + static void setDontShowAskAgainConfig(TDEConfig* cfg); /** * Create content and layout of a standard dialog @@ -1160,7 +1160,7 @@ public: TQMessageBox::Icon notifyType=TQMessageBox::Information); private: - static KConfig* againConfig; + static TDEConfig* againConfig; }; #endif diff --git a/tdeui/kpopupmenu.cpp b/tdeui/tdepopupmenu.cpp index d910b7781..46d5c758f 100644 --- a/tdeui/kpopupmenu.cpp +++ b/tdeui/tdepopupmenu.cpp @@ -27,18 +27,18 @@ #include <tqstyle.h> -#include "kpopupmenu.h" +#include "tdepopupmenu.h" #include <kdebug.h> -#include <kapplication.h> +#include <tdeapplication.h> -KPopupTitle::KPopupTitle(TQWidget *parent, const char *name) +TDEPopupTitle::TDEPopupTitle(TQWidget *parent, const char *name) : TQWidget(parent, name) { setMinimumSize(16, fontMetrics().height()+8); } -KPopupTitle::KPopupTitle(KPixmapEffect::GradientType /* gradient */, +TDEPopupTitle::TDEPopupTitle(KPixmapEffect::GradientType /* gradient */, const TQColor &/* color */, const TQColor &/* textColor */, TQWidget *parent, const char *name) : TQWidget(parent, name) @@ -46,7 +46,7 @@ KPopupTitle::KPopupTitle(KPixmapEffect::GradientType /* gradient */, calcSize(); } -KPopupTitle::KPopupTitle(const KPixmap & /* background */, const TQColor &/* color */, +TDEPopupTitle::TDEPopupTitle(const KPixmap & /* background */, const TQColor &/* color */, const TQColor &/* textColor */, TQWidget *parent, const char *name) : TQWidget(parent, name) @@ -54,7 +54,7 @@ KPopupTitle::KPopupTitle(const KPixmap & /* background */, const TQColor &/* col calcSize(); } -void KPopupTitle::setTitle(const TQString &text, const TQPixmap *icon) +void TDEPopupTitle::setTitle(const TQString &text, const TQPixmap *icon) { titleStr = text; if (icon) @@ -65,19 +65,19 @@ void KPopupTitle::setTitle(const TQString &text, const TQPixmap *icon) calcSize(); } -void KPopupTitle::setText( const TQString &text ) +void TDEPopupTitle::setText( const TQString &text ) { titleStr = text; calcSize(); } -void KPopupTitle::setIcon( const TQPixmap &pix ) +void TDEPopupTitle::setIcon( const TQPixmap &pix ) { miniicon = pix; calcSize(); } -void KPopupTitle::calcSize() +void TDEPopupTitle::calcSize() { TQFont f = font(); f.setBold(true); @@ -86,7 +86,7 @@ void KPopupTitle::calcSize() setMinimumSize( w+16, h+8 ); } -void KPopupTitle::paintEvent(TQPaintEvent *) +void TDEPopupTitle::paintEvent(TQPaintEvent *) { TQRect r(rect()); TQPainter p(this); @@ -115,15 +115,15 @@ void KPopupTitle::paintEvent(TQPaintEvent *) } } -TQSize KPopupTitle::sizeHint() const +TQSize TDEPopupTitle::sizeHint() const { return minimumSize(); } -class KPopupMenu::KPopupMenuPrivate +class TDEPopupMenu::TDEPopupMenuPrivate { public: - KPopupMenuPrivate () + TDEPopupMenuPrivate () : noMatches(false) , shortcuts(false) , autoExec(false) @@ -132,7 +132,7 @@ public: , m_ctxMenu(0) {} - ~KPopupMenuPrivate () + ~TDEPopupMenuPrivate () { delete m_ctxMenu; } @@ -156,112 +156,112 @@ public: TQPopupMenu* m_ctxMenu; static bool s_continueCtxMenuShow; static int s_highlightedItem; - static KPopupMenu* s_contextedMenu; + static TDEPopupMenu* s_contextedMenu; }; -int KPopupMenu::KPopupMenuPrivate::s_highlightedItem(-1); -KPopupMenu* KPopupMenu::KPopupMenuPrivate::s_contextedMenu(0); -bool KPopupMenu::KPopupMenuPrivate::s_continueCtxMenuShow(true); +int TDEPopupMenu::TDEPopupMenuPrivate::s_highlightedItem(-1); +TDEPopupMenu* TDEPopupMenu::TDEPopupMenuPrivate::s_contextedMenu(0); +bool TDEPopupMenu::TDEPopupMenuPrivate::s_continueCtxMenuShow(true); -KPopupMenu::KPopupMenu(TQWidget *parent, const char *name) +TDEPopupMenu::TDEPopupMenu(TQWidget *parent, const char *name) : TQPopupMenu(parent, name) { - d = new KPopupMenuPrivate; + d = new TDEPopupMenuPrivate; resetKeyboardVars(); connect(&(d->clearTimer), TQT_SIGNAL(timeout()), TQT_SLOT(resetKeyboardVars())); } -KPopupMenu::~KPopupMenu() +TDEPopupMenu::~TDEPopupMenu() { - if (KPopupMenuPrivate::s_contextedMenu == this) + if (TDEPopupMenuPrivate::s_contextedMenu == this) { - KPopupMenuPrivate::s_contextedMenu = 0; - KPopupMenuPrivate::s_highlightedItem = -1; + TDEPopupMenuPrivate::s_contextedMenu = 0; + TDEPopupMenuPrivate::s_highlightedItem = -1; } delete d; } -int KPopupMenu::insertTitle(const TQString &text, int id, int index) +int TDEPopupMenu::insertTitle(const TQString &text, int id, int index) { - KPopupTitle *titleItem = new KPopupTitle(); + TDEPopupTitle *titleItem = new TDEPopupTitle(); titleItem->setTitle(text); int ret = insertItem(titleItem, id, index); setItemEnabled(ret, false); return ret; } -int KPopupMenu::insertTitle(const TQPixmap &icon, const TQString &text, int id, +int TDEPopupMenu::insertTitle(const TQPixmap &icon, const TQString &text, int id, int index) { - KPopupTitle *titleItem = new KPopupTitle(); + TDEPopupTitle *titleItem = new TDEPopupTitle(); titleItem->setTitle(text, &icon); int ret = insertItem(titleItem, id, index); setItemEnabled(ret, false); return ret; } -void KPopupMenu::changeTitle(int id, const TQString &text) +void TDEPopupMenu::changeTitle(int id, const TQString &text) { TQMenuItem *item = findItem(id); if(item){ if(item->widget()) - ((KPopupTitle *)item->widget())->setTitle(text); + ((TDEPopupTitle *)item->widget())->setTitle(text); #ifndef NDEBUG else - kdWarning() << "KPopupMenu: changeTitle() called with non-title id "<< id << endl; + kdWarning() << "TDEPopupMenu: changeTitle() called with non-title id "<< id << endl; #endif } #ifndef NDEBUG else - kdWarning() << "KPopupMenu: changeTitle() called with invalid id " << id << endl; + kdWarning() << "TDEPopupMenu: changeTitle() called with invalid id " << id << endl; #endif } -void KPopupMenu::changeTitle(int id, const TQPixmap &icon, const TQString &text) +void TDEPopupMenu::changeTitle(int id, const TQPixmap &icon, const TQString &text) { TQMenuItem *item = findItem(id); if(item){ if(item->widget()) - ((KPopupTitle *)item->widget())->setTitle(text, &icon); + ((TDEPopupTitle *)item->widget())->setTitle(text, &icon); #ifndef NDEBUG else - kdWarning() << "KPopupMenu: changeTitle() called with non-title id "<< id << endl; + kdWarning() << "TDEPopupMenu: changeTitle() called with non-title id "<< id << endl; #endif } #ifndef NDEBUG else - kdWarning() << "KPopupMenu: changeTitle() called with invalid id " << id << endl; + kdWarning() << "TDEPopupMenu: changeTitle() called with invalid id " << id << endl; #endif } -TQString KPopupMenu::title(int id) const +TQString TDEPopupMenu::title(int id) const { if(id == -1) // obsolete return d->m_lastTitle; TQMenuItem *item = findItem(id); if(item){ if(item->widget()) - return ((KPopupTitle *)item->widget())->title(); + return ((TDEPopupTitle *)item->widget())->title(); else - tqWarning("KPopupMenu: title() called with non-title id %d.", id); + tqWarning("TDEPopupMenu: title() called with non-title id %d.", id); } else - tqWarning("KPopupMenu: title() called with invalid id %d.", id); + tqWarning("TDEPopupMenu: title() called with invalid id %d.", id); return TQString::null; } -TQPixmap KPopupMenu::titlePixmap(int id) const +TQPixmap TDEPopupMenu::titlePixmap(int id) const { TQMenuItem *item = findItem(id); if(item){ if(item->widget()) - return ((KPopupTitle *)item->widget())->icon(); + return ((TDEPopupTitle *)item->widget())->icon(); else - tqWarning("KPopupMenu: titlePixmap() called with non-title id %d.", id); + tqWarning("TDEPopupMenu: titlePixmap() called with non-title id %d.", id); } else - tqWarning("KPopupMenu: titlePixmap() called with invalid id %d.", id); + tqWarning("TDEPopupMenu: titlePixmap() called with invalid id %d.", id); TQPixmap tmp; return tmp; } @@ -269,25 +269,25 @@ TQPixmap KPopupMenu::titlePixmap(int id) const /** * This is re-implemented for keyboard navigation. */ -void KPopupMenu::closeEvent(TQCloseEvent*e) +void TDEPopupMenu::closeEvent(TQCloseEvent*e) { if (d->shortcuts) resetKeyboardVars(); TQPopupMenu::closeEvent(e); } -void KPopupMenu::activateItemAt(int index) +void TDEPopupMenu::activateItemAt(int index) { d->state = Qt::NoButton; TQPopupMenu::activateItemAt(index); } -TQt::ButtonState KPopupMenu::state() const +TQt::ButtonState TDEPopupMenu::state() const { return d->state; } -void KPopupMenu::keyPressEvent(TQKeyEvent* e) +void TDEPopupMenu::keyPressEvent(TQKeyEvent* e) { d->state = Qt::NoButton; if (!d->shortcuts) { @@ -445,13 +445,13 @@ void KPopupMenu::keyPressEvent(TQKeyEvent* e) TQPopupMenu::keyPressEvent(e); } -bool KPopupMenu::focusNextPrevChild( bool next ) +bool TDEPopupMenu::focusNextPrevChild( bool next ) { resetKeyboardVars(); return TQPopupMenu::focusNextPrevChild( next ); } -TQString KPopupMenu::underlineText(const TQString& text, uint length) +TQString TDEPopupMenu::underlineText(const TQString& text, uint length) { TQString ret = text; for (uint i = 0; i < length; i++) { @@ -461,7 +461,7 @@ TQString KPopupMenu::underlineText(const TQString& text, uint length) return ret; } -void KPopupMenu::resetKeyboardVars(bool noMatches /* = false */) +void TDEPopupMenu::resetKeyboardVars(bool noMatches /* = false */) { // Clean up keyboard variables if (d->lastHitIndex != -1) { @@ -476,12 +476,12 @@ void KPopupMenu::resetKeyboardVars(bool noMatches /* = false */) d->noMatches = noMatches; } -void KPopupMenu::setKeyboardShortcutsEnabled(bool enable) +void TDEPopupMenu::setKeyboardShortcutsEnabled(bool enable) { d->shortcuts = enable; } -void KPopupMenu::setKeyboardShortcutsExecute(bool enable) +void TDEPopupMenu::setKeyboardShortcutsExecute(bool enable) { d->autoExec = enable; } @@ -493,7 +493,7 @@ void KPopupMenu::setKeyboardShortcutsExecute(bool enable) * RMB menus on menus */ -void KPopupMenu::mousePressEvent(TQMouseEvent* e) +void TDEPopupMenu::mousePressEvent(TQMouseEvent* e) { if (d->m_ctxMenu && d->m_ctxMenu->isVisible()) { @@ -504,7 +504,7 @@ void KPopupMenu::mousePressEvent(TQMouseEvent* e) TQPopupMenu::mousePressEvent(e); } -void KPopupMenu::mouseReleaseEvent(TQMouseEvent* e) +void TDEPopupMenu::mouseReleaseEvent(TQMouseEvent* e) { // Save the button, and the modifiers from state() d->state = TQt::ButtonState(e->button() | (e->state() & KeyButtonMask)); @@ -513,7 +513,7 @@ void KPopupMenu::mouseReleaseEvent(TQMouseEvent* e) TQPopupMenu::mouseReleaseEvent(e); } -TQPopupMenu* KPopupMenu::contextMenu() +TQPopupMenu* TDEPopupMenu::contextMenu() { if (!d->m_ctxMenu) { @@ -524,27 +524,27 @@ TQPopupMenu* KPopupMenu::contextMenu() return d->m_ctxMenu; } -const TQPopupMenu* KPopupMenu::contextMenu() const +const TQPopupMenu* TDEPopupMenu::contextMenu() const { - return const_cast< KPopupMenu* >( this )->contextMenu(); + return const_cast< TDEPopupMenu* >( this )->contextMenu(); } -void KPopupMenu::hideContextMenu() +void TDEPopupMenu::hideContextMenu() { - KPopupMenuPrivate::s_continueCtxMenuShow = false; + TDEPopupMenuPrivate::s_continueCtxMenuShow = false; } -int KPopupMenu::contextMenuFocusItem() +int TDEPopupMenu::contextMenuFocusItem() { - return KPopupMenuPrivate::s_highlightedItem; + return TDEPopupMenuPrivate::s_highlightedItem; } -KPopupMenu* KPopupMenu::contextMenuFocus() +TDEPopupMenu* TDEPopupMenu::contextMenuFocus() { - return KPopupMenuPrivate::s_contextedMenu; + return TDEPopupMenuPrivate::s_contextedMenu; } -void KPopupMenu::itemHighlighted(int /* whichItem */) +void TDEPopupMenu::itemHighlighted(int /* whichItem */) { if (!d->m_ctxMenu || !d->m_ctxMenu->isVisible()) { @@ -555,9 +555,9 @@ void KPopupMenu::itemHighlighted(int /* whichItem */) showCtxMenu(mapFromGlobal(TQCursor::pos())); } -void KPopupMenu::showCtxMenu(TQPoint pos) +void TDEPopupMenu::showCtxMenu(TQPoint pos) { - TQMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem); + TQMenuItem* item = findItem(TDEPopupMenuPrivate::s_highlightedItem); if (item) { TQPopupMenu* subMenu = item->popup(); @@ -567,30 +567,30 @@ void KPopupMenu::showCtxMenu(TQPoint pos) } } - KPopupMenuPrivate::s_highlightedItem = idAt(pos); + TDEPopupMenuPrivate::s_highlightedItem = idAt(pos); - if (KPopupMenuPrivate::s_highlightedItem == -1) + if (TDEPopupMenuPrivate::s_highlightedItem == -1) { - KPopupMenuPrivate::s_contextedMenu = 0; + TDEPopupMenuPrivate::s_contextedMenu = 0; return; } - emit aboutToShowContextMenu(this, KPopupMenuPrivate::s_highlightedItem, d->m_ctxMenu); + emit aboutToShowContextMenu(this, TDEPopupMenuPrivate::s_highlightedItem, d->m_ctxMenu); - TQPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup(); + TQPopupMenu* subMenu = findItem(TDEPopupMenuPrivate::s_highlightedItem)->popup(); if (subMenu) { connect(subMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(ctxMenuHideShowingMenu())); TQTimer::singleShot(100, subMenu, TQT_SLOT(hide())); } - if (!KPopupMenuPrivate::s_continueCtxMenuShow) + if (!TDEPopupMenuPrivate::s_continueCtxMenuShow) { - KPopupMenuPrivate::s_continueCtxMenuShow = true; + TDEPopupMenuPrivate::s_continueCtxMenuShow = true; return; } - KPopupMenuPrivate::s_contextedMenu = this; + TDEPopupMenuPrivate::s_contextedMenu = this; d->m_ctxMenu->popup(this->mapToGlobal(pos)); connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(itemHighlighted(int))); } @@ -599,9 +599,9 @@ void KPopupMenu::showCtxMenu(TQPoint pos) * this method helps prevent submenus popping up while we have a context menu * showing */ -void KPopupMenu::ctxMenuHideShowingMenu() +void TDEPopupMenu::ctxMenuHideShowingMenu() { - TQMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem); + TQMenuItem* item = findItem(TDEPopupMenuPrivate::s_highlightedItem); if (item) { TQPopupMenu* subMenu = item->popup(); @@ -612,11 +612,11 @@ void KPopupMenu::ctxMenuHideShowingMenu() } } -void KPopupMenu::ctxMenuHiding() +void TDEPopupMenu::ctxMenuHiding() { - if (KPopupMenuPrivate::s_highlightedItem) + if (TDEPopupMenuPrivate::s_highlightedItem) { - TQPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup(); + TQPopupMenu* subMenu = findItem(TDEPopupMenuPrivate::s_highlightedItem)->popup(); if (subMenu) { disconnect(subMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(ctxMenuHideShowingMenu())); @@ -624,10 +624,10 @@ void KPopupMenu::ctxMenuHiding() } disconnect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(itemHighlighted(int))); - KPopupMenuPrivate::s_continueCtxMenuShow = true; + TDEPopupMenuPrivate::s_continueCtxMenuShow = true; } -void KPopupMenu::contextMenuEvent(TQContextMenuEvent* e) +void TDEPopupMenu::contextMenuEvent(TQContextMenuEvent* e) { if (d->m_ctxMenu) { @@ -647,7 +647,7 @@ void KPopupMenu::contextMenuEvent(TQContextMenuEvent* e) TQPopupMenu::contextMenuEvent(e); } -void KPopupMenu::hideEvent(TQHideEvent*) +void TDEPopupMenu::hideEvent(TQHideEvent*) { if (d->m_ctxMenu && d->m_ctxMenu->isVisible()) { @@ -669,26 +669,26 @@ void KPopupMenu::hideEvent(TQHideEvent*) */ // Obsolete -KPopupMenu::KPopupMenu(const TQString& title, TQWidget *parent, const char *name) +TDEPopupMenu::TDEPopupMenu(const TQString& title, TQWidget *parent, const char *name) : TQPopupMenu(parent, name) { - d = new KPopupMenuPrivate; + d = new TDEPopupMenuPrivate; insertTitle(title); } // Obsolete -void KPopupMenu::setTitle(const TQString &title) +void TDEPopupMenu::setTitle(const TQString &title) { - KPopupTitle *titleItem = new KPopupTitle(); + TDEPopupTitle *titleItem = new TDEPopupTitle(); titleItem->setTitle(title); insertItem(titleItem); d->m_lastTitle = title; } -void KPopupTitle::virtual_hook( int, void* ) +void TDEPopupTitle::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KPopupMenu::virtual_hook( int, void* ) +void TDEPopupMenu::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -#include "kpopupmenu.moc" +#include "tdepopupmenu.moc" diff --git a/tdeui/kpopupmenu.h b/tdeui/tdepopupmenu.h index 5c29fd2f9..2d50e2d56 100644 --- a/tdeui/kpopupmenu.h +++ b/tdeui/tdepopupmenu.h @@ -25,17 +25,17 @@ #include <kpixmap.h> #include <tdelibs_export.h> /** - * @short KPopupMenu title widget. + * @short TDEPopupMenu title widget. * - * Title widget for use in KPopupMenu. + * Title widget for use in TDEPopupMenu. * * You usually don't have to create this manually since - * KPopupMenu::insertTitle will do it for you, but it is allowed if + * TDEPopupMenu::insertTitle will do it for you, but it is allowed if * you wish to customize it's look. * * @author Daniel M. Duley <mosfet@kde.org> */ -class TDEUI_EXPORT KPopupTitle : public TQWidget +class TDEUI_EXPORT TDEPopupTitle : public TQWidget { Q_OBJECT @@ -44,19 +44,19 @@ public: * Constructs a title widget with the user specified gradient, pixmap, * and colors. */ - KPopupTitle(TQWidget *parent=0, const char *name=0); + TDEPopupTitle(TQWidget *parent=0, const char *name=0); /** * @deprecated * Constructs a title widget with the specified gradient and colors. */ - KPopupTitle(KPixmapEffect::GradientType gradient, const TQColor &color, + TDEPopupTitle(KPixmapEffect::GradientType gradient, const TQColor &color, const TQColor &textColor, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; /** * @deprecated * Constructs a title widget with the specified pixmap and colors. */ - KPopupTitle(const KPixmap &background, const TQColor &color, + TDEPopupTitle(const KPixmap &background, const TQColor &color, const TQColor &textColor, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; /** @@ -98,14 +98,14 @@ protected: protected: virtual void virtual_hook( int id, void* data ); private: - class KPopupTitlePrivate; - KPopupTitlePrivate *d; + class TDEPopupTitlePrivate; + TDEPopupTitlePrivate *d; }; /** * @short A menu with title items. * - * KPopupMenu is a class for menus with standard title items and keyboard + * TDEPopupMenu is a class for menus with standard title items and keyboard * accessibility for popups with many options and/or varying options. It acts * identically to TQPopupMenu, with the addition of insertTitle(), * changeTitle(), setKeyboardShortcutsEnabled() and @@ -120,19 +120,19 @@ private: * @author Daniel M. Duley <mosfet@kde.org> * @author Hamish Rodda <rodda@kde.org> */ -class TDEUI_EXPORT KPopupMenu : public TQPopupMenu { +class TDEUI_EXPORT TDEPopupMenu : public TQPopupMenu { Q_OBJECT public: /** - * Constructs a KPopupMenu. + * Constructs a TDEPopupMenu. */ - KPopupMenu(TQWidget *parent=0, const char *name=0); + TDEPopupMenu(TQWidget *parent=0, const char *name=0); /** * Destructs the object */ - ~KPopupMenu(); + ~TDEPopupMenu(); /** * Inserts a title item with no icon. @@ -191,7 +191,7 @@ public: * Obsolete method provided for backwards compatibility only. Use the * normal constructor and insertTitle instead. */ - KPopupMenu(const TQString &title, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; + TDEPopupMenu(const TQString &title, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; /** * @deprecated @@ -219,10 +219,10 @@ public: void hideContextMenu(); /** - * Returns the KPopupMenu associated with the current context menu + * Returns the TDEPopupMenu associated with the current context menu * @since 3.2 */ - static KPopupMenu* contextMenuFocus(); + static TDEPopupMenu* contextMenuFocus(); /** * returns the ID of the menuitem associated with the current context menu @@ -250,7 +250,7 @@ signals: * @param ctxMenu The context menu itself * @since 3.2 */ - void aboutToShowContextMenu(KPopupMenu* menu, int menuItem, TQPopupMenu* ctxMenu); + void aboutToShowContextMenu(TDEPopupMenu* menu, int menuItem, TQPopupMenu* ctxMenu); protected: virtual void closeEvent(TQCloseEvent *); @@ -275,8 +275,8 @@ protected slots: void ctxMenuHideShowingMenu(); private: - class KPopupMenuPrivate; - KPopupMenuPrivate *d; + class TDEPopupMenuPrivate; + TDEPopupMenuPrivate *d; }; #endif diff --git a/tdeui/kselect.cpp b/tdeui/tdeselect.cpp index 70a63a9a8..272f7a144 100644 --- a/tdeui/kselect.cpp +++ b/tdeui/tdeselect.cpp @@ -22,7 +22,7 @@ #include <tqdrawutil.h> #include <tqstyle.h> #include <kimageeffect.h> -#include "kselect.h" +#include "tdeselect.h" #define STORE_W 8 #define STORE_W2 STORE_W * 2 @@ -235,14 +235,14 @@ void KXYSelector::drawCursor( TQPainter *p, int xp, int yp ) */ -KSelector::KSelector( TQWidget *parent, const char *name ) +TDESelector::TDESelector( TQWidget *parent, const char *name ) : TQWidget( parent, name ), TQRangeControl() { _orientation = Qt::Horizontal; _indent = true; } -KSelector::KSelector( Orientation o, TQWidget *parent, const char *name ) +TDESelector::TDESelector( Orientation o, TQWidget *parent, const char *name ) : TQWidget( parent, name ), TQRangeControl() { _orientation = o; @@ -250,11 +250,11 @@ KSelector::KSelector( Orientation o, TQWidget *parent, const char *name ) } -KSelector::~KSelector() +TDESelector::~TDESelector() {} -TQRect KSelector::contentsRect() const +TQRect TDESelector::contentsRect() const { int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; @@ -264,7 +264,7 @@ TQRect KSelector::contentsRect() const return TQRect( iw, w, width() - 2 * iw, height() - w * 2 - 5 ); } -void KSelector::paintEvent( TQPaintEvent * ) +void TDESelector::paintEvent( TQPaintEvent * ) { TQPainter painter; int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth); @@ -292,23 +292,23 @@ void KSelector::paintEvent( TQPaintEvent * ) painter.end(); } -void KSelector::mousePressEvent( TQMouseEvent *e ) +void TDESelector::mousePressEvent( TQMouseEvent *e ) { moveArrow( e->pos() ); } -void KSelector::mouseMoveEvent( TQMouseEvent *e ) +void TDESelector::mouseMoveEvent( TQMouseEvent *e ) { moveArrow( e->pos() ); } -void KSelector::wheelEvent( TQWheelEvent *e ) +void TDESelector::wheelEvent( TQWheelEvent *e ) { int val = value() + e->delta()/120; setValue( val ); } -void KSelector::valueChange() +void TDESelector::valueChange() { TQPainter painter; TQPoint pos; @@ -326,7 +326,7 @@ void KSelector::valueChange() emit valueChanged( value() ); } -void KSelector::moveArrow( const TQPoint &pos ) +void TDESelector::moveArrow( const TQPoint &pos ) { int val; int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth); @@ -342,7 +342,7 @@ void KSelector::moveArrow( const TQPoint &pos ) setValue( val ); } -TQPoint KSelector::calcArrowPos( int val ) +TQPoint TDESelector::calcArrowPos( int val ) { TQPoint p; @@ -364,10 +364,10 @@ TQPoint KSelector::calcArrowPos( int val ) return p; } -void KSelector::drawContents( TQPainter * ) +void TDESelector::drawContents( TQPainter * ) {} -void KSelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) +void TDESelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) { if ( show ) { @@ -404,7 +404,7 @@ void KSelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) //---------------------------------------------------------------------------- KGradientSelector::KGradientSelector( TQWidget *parent, const char *name ) - : KSelector( parent, name ) + : TDESelector( parent, name ) { init(); } @@ -412,7 +412,7 @@ KGradientSelector::KGradientSelector( TQWidget *parent, const char *name ) KGradientSelector::KGradientSelector( Orientation o, TQWidget *parent, const char *name ) - : KSelector( o, parent, name ) + : TDESelector( o, parent, name ) { init(); } @@ -524,11 +524,11 @@ void KGradientSelector::drawContents( TQPainter *painter ) void KXYSelector::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KSelector::virtual_hook( int, void* ) +void TDESelector::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void KGradientSelector::virtual_hook( int id, void* data ) -{ KSelector::virtual_hook( id, data ); } +{ TDESelector::virtual_hook( id, data ); } -#include "kselect.moc" +#include "tdeselect.moc" diff --git a/tdeui/kselect.h b/tdeui/tdeselect.h index 77b35a175..fd9a90ccd 100644 --- a/tdeui/kselect.h +++ b/tdeui/tdeselect.h @@ -148,7 +148,7 @@ private: /** - * KSelector is the base class for other widgets which + * TDESelector is the base class for other widgets which * provides the ability to choose from a one-dimensional * range of values. An example is the KGradientSelector * which allows to choose from a range of colors. @@ -156,7 +156,7 @@ private: * A custom drawing routine for the widget surface has * to be provided by the subclass. */ -class TDEUI_EXPORT KSelector : public TQWidget, public TQRangeControl +class TDEUI_EXPORT TDESelector : public TQWidget, public TQRangeControl { Q_OBJECT TQ_PROPERTY( int value READ value WRITE setValue ) @@ -167,16 +167,16 @@ public: /** * Constructs a horizontal one-dimensional selection widget. */ - KSelector( TQWidget *parent=0, const char *name=0 ); + TDESelector( TQWidget *parent=0, const char *name=0 ); /** * Constructs a one-dimensional selection widget with * a given orientation. */ - KSelector( Orientation o, TQWidget *parent = 0L, const char *name = 0L ); + TDESelector( Orientation o, TQWidget *parent = 0L, const char *name = 0L ); /* * Destructs the widget. */ - ~KSelector(); + ~TDESelector(); /** * @return the orientation of the widget. @@ -277,8 +277,8 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - class KSelectorPrivate; - KSelectorPrivate *d; + class TDESelectorPrivate; + TDESelectorPrivate *d; }; @@ -290,7 +290,7 @@ private: * \image html kgradientselector.png "KDE Gradient Selector Widget" * **/ -class TDEUI_EXPORT KGradientSelector : public KSelector +class TDEUI_EXPORT KGradientSelector : public TDESelector { Q_OBJECT diff --git a/tdeui/kshortcutdialog.cpp b/tdeui/tdeshortcutdialog.cpp index 27d721626..35a7706c7 100644 --- a/tdeui/kshortcutdialog.cpp +++ b/tdeui/tdeshortcutdialog.cpp @@ -17,7 +17,7 @@ Boston, MA 02110-1301, USA. */ -#include "kshortcutdialog.h" +#include "tdeshortcutdialog.h" #include <tqvariant.h> @@ -41,8 +41,8 @@ # include <kkeyserver.h> #endif -#include <kshortcutdialog_simple.h> -#include <kshortcutdialog_advanced.h> +#include <tdeshortcutdialog_simple.h> +#include <tdeshortcutdialog_advanced.h> #include <tqbuttongroup.h> #include <tqcheckbox.h> @@ -52,19 +52,19 @@ #include <tqtimer.h> #include <tqvbox.h> -#include <kapplication.h> -#include <kconfig.h> +#include <tdeapplication.h> +#include <tdeconfig.h> #include <kdebug.h> -#include <kglobal.h> +#include <tdeglobal.h> #include <kiconloader.h> #include <kkeynative.h> -#include <klocale.h> +#include <tdelocale.h> #include <kstdguiitem.h> #include <kpushbutton.h> -bool KShortcutDialog::s_showMore = false; +bool TDEShortcutDialog::s_showMore = false; -KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, TQWidget* parent, const char* name ) +TDEShortcutDialog::TDEShortcutDialog( const TDEShortcut& shortcut, bool bQtShortcut, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n("Configure Shortcut"), KDialogBase::Details|KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Cancel, true ) { @@ -75,9 +75,9 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, T m_stack->setMargin(0); setMainWidget(m_stack); - m_simple = new KShortcutDialogSimple(m_stack); + m_simple = new TDEShortcutDialogSimple(m_stack); - m_adv = new KShortcutDialogAdvanced(m_stack); + m_adv = new TDEShortcutDialogAdvanced(m_stack); m_adv->hide(); m_bQtShortcut = bQtShortcut; @@ -119,7 +119,7 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, T setShortcut( shortcut ); resize( 0, 0 ); - s_showMore = KConfigGroup(KGlobal::config(), "General").readBoolEntry("ShowAlternativeShortcutConfig", s_showMore); + s_showMore = TDEConfigGroup(TDEGlobal::config(), "General").readBoolEntry("ShowAlternativeShortcutConfig", s_showMore); updateDetails(); #ifdef Q_WS_X11 @@ -127,19 +127,19 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, T #endif } -KShortcutDialog::~KShortcutDialog() +TDEShortcutDialog::~TDEShortcutDialog() { - KConfigGroup group(KGlobal::config(), "General"); + TDEConfigGroup group(TDEGlobal::config(), "General"); group.writeEntry("ShowAlternativeShortcutConfig", s_showMore); } -void KShortcutDialog::setShortcut( const KShortcut & shortcut ) +void TDEShortcutDialog::setShortcut( const TDEShortcut & shortcut ) { m_shortcut = shortcut; updateShortcutDisplay(); } -void KShortcutDialog::updateShortcutDisplay() +void TDEShortcutDialog::updateShortcutDisplay() { TQString s[2] = { m_shortcut.seq(0).toString(), m_shortcut.seq(1).toString() }; @@ -190,13 +190,13 @@ void KShortcutDialog::updateShortcutDisplay() enableButton(Details, bLessOk); } -void KShortcutDialog::slotDetails() +void TDEShortcutDialog::slotDetails() { s_showMore = (m_adv->isHidden()); updateDetails(); } -void KShortcutDialog::updateDetails() +void TDEShortcutDialog::updateDetails() { bool showAdvanced = s_showMore || (m_shortcut.count() > 1); setDetails(showAdvanced); @@ -224,7 +224,7 @@ void KShortcutDialog::updateDetails() adjustSize(); } -void KShortcutDialog::slotSelectPrimary() +void TDEShortcutDialog::slotSelectPrimary() { m_bRecording = false; m_iSeq = 0; @@ -235,7 +235,7 @@ void KShortcutDialog::slotSelectPrimary() updateShortcutDisplay(); } -void KShortcutDialog::slotSelectAlternate() +void TDEShortcutDialog::slotSelectAlternate() { m_bRecording = false; m_iSeq = 1; @@ -246,20 +246,20 @@ void KShortcutDialog::slotSelectAlternate() updateShortcutDisplay(); } -void KShortcutDialog::slotClearShortcut() +void TDEShortcutDialog::slotClearShortcut() { m_shortcut.setSeq( 0, KKeySequence() ); updateShortcutDisplay(); } -void KShortcutDialog::slotClearPrimary() +void TDEShortcutDialog::slotClearPrimary() { m_shortcut.setSeq( 0, KKeySequence() ); m_adv->m_btnPrimary->setChecked( true ); slotSelectPrimary(); } -void KShortcutDialog::slotClearAlternate() +void TDEShortcutDialog::slotClearAlternate() { if( m_shortcut.count() == 2 ) m_shortcut.init( m_shortcut.seq(0) ); @@ -267,7 +267,7 @@ void KShortcutDialog::slotClearAlternate() slotSelectAlternate(); } -void KShortcutDialog::slotMultiKeyMode( bool bOn ) +void TDEShortcutDialog::slotMultiKeyMode( bool bOn ) { // If turning off multi-key mode during a recording, if( !bOn && m_bRecording ) { @@ -281,7 +281,7 @@ void KShortcutDialog::slotMultiKeyMode( bool bOn ) /* we don't use the generic Qt code on X11 because it allows us to grab the keyboard so that all keypresses are seen */ -bool KShortcutDialog::x11Event( XEvent *pEvent ) +bool TDEShortcutDialog::x11Event( XEvent *pEvent ) { switch( pEvent->type ) { case XKeyPress: @@ -348,7 +348,7 @@ static bool convertSymXToMod( uint keySymX, uint* pmod ) return true; } -void KShortcutDialog::x11KeyPressEvent( XEvent* pEvent ) +void TDEShortcutDialog::x11KeyPressEvent( XEvent* pEvent ) { KKeyNative keyNative( pEvent ); uint keyModX = keyNative.mod(); @@ -370,7 +370,7 @@ void KShortcutDialog::x11KeyPressEvent( XEvent* pEvent ) updateShortcutDisplay(); } -void KShortcutDialog::x11KeyReleaseEvent( XEvent* pEvent ) +void TDEShortcutDialog::x11KeyReleaseEvent( XEvent* pEvent ) { // We're only interested in the release of modifier keys, // and then only when it's for the first key in a sequence. @@ -391,7 +391,7 @@ void KShortcutDialog::x11KeyReleaseEvent( XEvent* pEvent ) } } #elif defined(Q_WS_WIN) -void KShortcutDialog::keyPressEvent( TQKeyEvent * e ) +void TDEShortcutDialog::keyPressEvent( TQKeyEvent * e ) { kdDebug() << e->text() << " " << (int)e->text()[0].latin1()<< " " << (int)e->ascii() << endl; //if key is a letter, it must be stored as lowercase @@ -457,7 +457,7 @@ void KShortcutDialog::keyPressEvent( TQKeyEvent * e ) } } -bool KShortcutDialog::event ( TQEvent * e ) +bool TDEShortcutDialog::event ( TQEvent * e ) { if (e->type()==TQEvent::KeyRelease) { int modQt = KKeyServer::qtButtonStateToMod( static_cast<TQKeyEvent*>(e)->state() ); @@ -488,7 +488,7 @@ bool KShortcutDialog::event ( TQEvent * e ) } #endif -void KShortcutDialog::keyPressed( KKey key ) +void TDEShortcutDialog::keyPressed( KKey key ) { kdDebug(125) << "keyPressed: " << key.toString() << endl; @@ -526,4 +526,4 @@ void KShortcutDialog::keyPressed( KKey key ) TQTimer::singleShot(500, this, TQT_SLOT(accept())); } -#include "kshortcutdialog.moc" +#include "tdeshortcutdialog.moc" diff --git a/tdeui/kshortcutdialog.h b/tdeui/tdeshortcutdialog.h index e1f7643be..f989e0191 100644 --- a/tdeui/kshortcutdialog.h +++ b/tdeui/tdeshortcutdialog.h @@ -21,46 +21,46 @@ #define _KSHORTCUTDIALOG_H_ #include "kdialogbase.h" -#include "kshortcut.h" +#include "tdeshortcut.h" class TQVBox; class KPushButton; -class KShortcutDialogSimple; -class KShortcutDialogAdvanced; +class TDEShortcutDialogSimple; +class TDEShortcutDialogAdvanced; /** * @short Dialog for configuring a shortcut. * - * This dialog allows configuring a single KShortcut. KKeyDialog + * This dialog allows configuring a single TDEShortcut. KKeyDialog * should be usually used instead. * * @internal * @see KKeyDialog * @since 3.4 */ -class TDEUI_EXPORT KShortcutDialog : public KDialogBase +class TDEUI_EXPORT TDEShortcutDialog : public KDialogBase { Q_OBJECT public: - KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, TQWidget* parent = 0, const char* name = 0 ); - ~KShortcutDialog(); + TDEShortcutDialog( const TDEShortcut& shortcut, bool bQtShortcut, TQWidget* parent = 0, const char* name = 0 ); + ~TDEShortcutDialog(); - void setShortcut( const KShortcut & shortcut ); - const KShortcut& shortcut() const { return m_shortcut; } + void setShortcut( const TDEShortcut & shortcut ); + const TDEShortcut& shortcut() const { return m_shortcut; } private: // true if qt shortcut, false if native shortcut bool m_bQtShortcut; - KShortcut m_shortcut; + TDEShortcut m_shortcut; bool m_bGrab; KPushButton* m_ptxtCurrent; uint m_iSeq; uint m_iKey; bool m_bRecording; uint m_mod; - KShortcutDialogSimple *m_simple; - KShortcutDialogAdvanced *m_adv; + TDEShortcutDialogSimple *m_simple; + TDEShortcutDialogAdvanced *m_adv; TQVBox *m_stack; void updateShortcutDisplay(); @@ -89,7 +89,7 @@ protected slots: void slotMultiKeyMode( bool bOn ); private: - class KShortcutDialogPrivate* d; + class TDEShortcutDialogPrivate* d; static bool s_showMore; }; diff --git a/tdeui/kshortcutdialog_advanced.ui b/tdeui/tdeshortcutdialog_advanced.ui index 6466174d2..b1cc70460 100644 --- a/tdeui/kshortcutdialog_advanced.ui +++ b/tdeui/tdeshortcutdialog_advanced.ui @@ -1,8 +1,8 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> -<class>KShortcutDialogAdvanced</class> +<class>TDEShortcutDialogAdvanced</class> <widget class="TQWidget"> <property name="name"> - <cstring>KShortcutDialogAdvanced</cstring> + <cstring>TDEShortcutDialogAdvanced</cstring> </property> <property name="geometry"> <rect> @@ -238,12 +238,12 @@ </connection> </connections> <includes> - <include location="global" impldecl="in declaration">kshortcut.h</include> + <include location="global" impldecl="in declaration">tdeshortcut.h</include> <include location="global" impldecl="in declaration">kdialog.h</include> <include location="global" impldecl="in implementation">kpushbutton.h</include> </includes> <forwards> - <forward>class KShortcut</forward> + <forward>class TDEShortcut</forward> </forwards> <layoutdefaults spacing="6" margin="11"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> diff --git a/tdeui/kshortcutdialog_simple.ui b/tdeui/tdeshortcutdialog_simple.ui index 97d87b582..c21b6f940 100644 --- a/tdeui/kshortcutdialog_simple.ui +++ b/tdeui/tdeshortcutdialog_simple.ui @@ -1,8 +1,8 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> -<class>KShortcutDialogSimple</class> +<class>TDEShortcutDialogSimple</class> <widget class="TQWidget"> <property name="name"> - <cstring>KShortcutDialogSimple</cstring> + <cstring>TDEShortcutDialogSimple</cstring> </property> <property name="geometry"> <rect> @@ -105,12 +105,12 @@ </grid> </widget> <includes> - <include location="global" impldecl="in declaration">kshortcut.h</include> + <include location="global" impldecl="in declaration">tdeshortcut.h</include> <include location="global" impldecl="in declaration">kdialog.h</include> <include location="global" impldecl="in implementation">kpushbutton.h</include> </includes> <forwards> - <forward>class KShortcut</forward> + <forward>class TDEShortcut</forward> </forwards> <layoutdefaults spacing="6" margin="11"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> diff --git a/tdeui/kspell.cpp b/tdeui/tdespell.cpp index 7a17ad607..d764fa89d 100644 --- a/tdeui/kspell.cpp +++ b/tdeui/tdespell.cpp @@ -37,12 +37,12 @@ #include <tqtextcodec.h> #include <tqtimer.h> -#include <kapplication.h> -#include <kmessagebox.h> +#include <tdeapplication.h> +#include <tdemessagebox.h> #include <kdebug.h> -#include <klocale.h> -#include "kspell.h" -#include "kspelldlg.h" +#include <tdelocale.h> +#include "tdespell.h" +#include "tdespelldlg.h" #include <twin.h> #include <kprocio.h> @@ -236,7 +236,7 @@ KSpell::startIspell() //Note to potential debuggers: -Tlatin2 _is_ being added on the // _first_ try. But, some versions of ispell will fail with this - // option, so kspell tries again without it. That's why as 'ps -ax' + // option, so tdespell tries again without it. That's why as 'ps -ax' // shows "ispell -a -S ..." withou the "-Tlatin2" option. if ( trystart<1 ) { @@ -296,11 +296,11 @@ KSpell::startIspell() if (trystart == 0) //don't connect these multiple times { - connect( proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), - this, TQT_SLOT(ispellErrors(KProcess *, char *, int)) ); + connect( proc, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + this, TQT_SLOT(ispellErrors(TDEProcess *, char *, int)) ); - connect( proc, TQT_SIGNAL(processExited(KProcess *)), - this, TQT_SLOT(ispellExit (KProcess *)) ); + connect( proc, TQT_SIGNAL(processExited(TDEProcess *)), + this, TQT_SLOT(ispellExit (TDEProcess *)) ); OUTPUT(KSpell2); } @@ -313,7 +313,7 @@ KSpell::startIspell() } void -KSpell::ispellErrors( KProcess *, char *buffer, int buflen ) +KSpell::ispellErrors( TDEProcess *, char *buffer, int buflen ) { buffer[buflen-1] = '\0'; // kdDebug(750) << "ispellErrors [" << buffer << "]\n" << endl; @@ -595,7 +595,7 @@ void KSpell::checkWord2( KProcIO* ) void KSpell::checkNext() { -// Queue words to prevent kspell from turning into a fork bomb +// Queue words to prevent tdespell from turning into a fork bomb d->checking = false; if (!d->unchecked.empty()) { BufferedWord buf = d->unchecked.front(); @@ -1313,7 +1313,7 @@ void KSpell::cleanUp() proc->closeStdin(); } -void KSpell::ispellExit( KProcess* ) +void KSpell::ispellExit( TDEProcess* ) { kdDebug() << "KSpell::ispellExit() " << m_status << endl; @@ -1558,7 +1558,7 @@ void KSpell::initialize( TQWidget *_parent, const TQString &_caption, maxtrystart = 2; if ( obj && slot ) - // caller wants to know when kspell is ready + // caller wants to know when tdespell is ready connect( this, TQT_SIGNAL(ready(KSpell *)), obj, slot); else // Hack for modal spell checking @@ -1573,5 +1573,5 @@ TQString KSpell::modaltext; int KSpell::modalreturn = 0; TQWidget* KSpell::modalWidgetHack = 0; -#include "kspell.moc" +#include "tdespell.moc" diff --git a/tdeui/kspell.h b/tdeui/tdespell.h index e96b61a2e..812c3e0d7 100644 --- a/tdeui/kspell.h +++ b/tdeui/tdespell.h @@ -28,7 +28,7 @@ class TQTextCodec; class KProcIO; -class KProcess; +class TDEProcess; class KSpellDlg; /** @@ -227,7 +227,7 @@ public: * After calling checkWord, you can use this to get the dialog box's * result code. * The possible - * values are (from kspelldlg.h): + * values are (from tdespelldlg.h): * @li KS_CANCEL * @li KS_REPLACE * @li KS_REPLACEALL @@ -461,9 +461,9 @@ protected slots: void suggestWord( KProcIO * ); void slotStopCancel (int); - void ispellExit (KProcess *); + void ispellExit (TDEProcess *); void emitDeath(); - void ispellErrors (KProcess *, char *, int); + void ispellErrors (TDEProcess *, char *, int); void checkNext(); private slots: diff --git a/tdeui/kspelldlg.cpp b/tdeui/tdespelldlg.cpp index d21b6975e..9e8206505 100644 --- a/tdeui/kspelldlg.cpp +++ b/tdeui/tdespelldlg.cpp @@ -24,11 +24,11 @@ #include <tqlabel.h> #include <tqlayout.h> -#include <kapplication.h> -#include <klocale.h> -#include <klistbox.h> +#include <tdeapplication.h> +#include <tdelocale.h> +#include <tdelistbox.h> #include <kcombobox.h> -#include <klistview.h> +#include <tdelistview.h> #include <klineedit.h> #include <kpushbutton.h> #include <kprogress.h> @@ -36,8 +36,8 @@ #include <kdebug.h> #include "ksconfig.h" -#include "kspelldlg.h" -#include "kspellui.h" +#include "tdespelldlg.h" +#include "tdespellui.h" //to initially disable sorting in the suggestions listview #define NONSORTINGCOLUMN 2 @@ -99,7 +99,7 @@ KSpellDlg::KSpellDlg( TQWidget * parent, const char * name, bool _progressbar, b connect( d->spellConfig, TQT_SIGNAL(configChanged()), TQT_SLOT(slotConfigChanged()) ); - setHelp( "spelldlg", "kspell" ); + setHelp( "spelldlg", "tdespell" ); setMinimumSize( sizeHint() ); emit ready( false ); } @@ -282,4 +282,4 @@ KSpellDlg::slotConfigChanged() done( KS_CONFIG ); } -#include "kspelldlg.moc" +#include "tdespelldlg.moc" diff --git a/tdeui/kspelldlg.h b/tdeui/tdespelldlg.h index c42476814..9b0da8205 100644 --- a/tdeui/kspelldlg.h +++ b/tdeui/tdespelldlg.h @@ -26,7 +26,7 @@ class TQStringList; class TQLabel; class TQListViewItem; class TQPushButton; -class KListBox; +class TDEListBox; class KLineEdit; class KProgress; @@ -51,7 +51,7 @@ class TDEUI_EXPORT KSpellDlg : public KDialogBase KSpellDlgPrivate *d; KLineEdit *editbox; KProgress *progbar; - KListBox *listbox; + TDEListBox *listbox; TQStringList *sugg; TQPushButton *qpbrep, *qpbrepa; TQLabel *wordlabel; diff --git a/tdeui/kspellui.ui b/tdeui/tdespellui.ui index ac1deecd7..ac1deecd7 100644 --- a/tdeui/kspellui.ui +++ b/tdeui/tdespellui.ui diff --git a/tdeui/ktoolbar.cpp b/tdeui/tdetoolbar.cpp index 32e5b9f14..a3ced3a19 100644 --- a/tdeui/ktoolbar.cpp +++ b/tdeui/tdetoolbar.cpp @@ -42,25 +42,25 @@ #include <tqstyle.h> #include <tqlayout.h> -#include <ktoolbar.h> -#include <kmainwindow.h> +#include <tdetoolbar.h> +#include <tdemainwindow.h> #include <klineedit.h> #include <kseparator.h> -#include <klocale.h> -#include <kapplication.h> -#include <kaction.h> +#include <tdelocale.h> +#include <tdeapplication.h> +#include <tdeaction.h> #include <kstdaction.h> -#include <kglobal.h> -#include <kconfig.h> +#include <tdeglobal.h> +#include <tdeconfig.h> #include <kiconloader.h> #include <kcombobox.h> -#include <kpopupmenu.h> +#include <tdepopupmenu.h> #include <kanimwidget.h> #include <kedittoolbar.h> #include <kipc.h> #include <twin.h> #include <kdebug.h> -#include <ktoolbarbutton.h> +#include <tdetoolbarbutton.h> enum { CONTEXT_TOP = 0, @@ -76,12 +76,12 @@ enum { CONTEXT_ICONSIZES = 50 // starting point for the icon size list, put everything else before }; -class KToolBarPrivate +class TDEToolBarPrivate { public: - KToolBarPrivate() { + TDEToolBarPrivate() { m_iconSize = 0; - m_iconText = KToolBar::IconOnly; + m_iconText = TDEToolBar::IconOnly; m_highlight = true; m_transparent = true; m_honorStyle = false; @@ -105,7 +105,7 @@ public: } int m_iconSize; - KToolBar::IconText m_iconText; + TDEToolBar::IconText m_iconText; bool m_highlight : 1; bool m_transparent : 1; bool m_honorStyle : 1; @@ -144,7 +144,7 @@ public: TQPtrList<TQWidget> idleButtons; }; -KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, TQToolBar *parent, +TDEToolBarSeparator::TDEToolBarSeparator(Orientation o , bool l, TQToolBar *parent, const char* name ) :TQFrame( parent, name ), line( l ) { @@ -155,13 +155,13 @@ KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, TQToolBar *parent, setBackgroundOrigin( ParentOrigin ); } -void KToolBarSeparator::setOrientation( Orientation o ) +void TDEToolBarSeparator::setOrientation( Orientation o ) { orient = o; setFrameStyle( NoFrame ); } -void KToolBarSeparator::drawContents( TQPainter* p ) +void TDEToolBarSeparator::drawContents( TQPainter* p ) { if ( line ) { TQStyle::SFlags flags = TQStyle::Style_Default; @@ -176,23 +176,23 @@ void KToolBarSeparator::drawContents( TQPainter* p ) } } -void KToolBarSeparator::styleChange( TQStyle& ) +void TDEToolBarSeparator::styleChange( TQStyle& ) { setOrientation( orient ); } -TQSize KToolBarSeparator::sizeHint() const +TQSize TDEToolBarSeparator::sizeHint() const { int dim = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); return orientation() == Qt::Vertical ? TQSize( 0, dim ) : TQSize( dim, 0 ); } -TQSizePolicy KToolBarSeparator::sizePolicy() const +TQSizePolicy TDEToolBarSeparator::sizePolicy() const { return TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ); } -KToolBar::KToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig ) +TDEToolBar::TDEToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig ) : TQToolBar( TQString::fromLatin1( name ), tqt_dynamic_cast<TQMainWindow*>(parent), parent, false, @@ -201,7 +201,7 @@ KToolBar::KToolBar( TQWidget *parent, const char *name, bool honorStyle, bool re init( readConfig, honorStyle ); } -KToolBar::KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) +TDEToolBar::TDEToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) : TQToolBar( TQString::fromLatin1( name ), parentWindow, dock, newLine, name ? name : "mainToolBar") @@ -209,7 +209,7 @@ KToolBar::KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock, init( readConfig, honorStyle ); } -KToolBar::KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) +TDEToolBar::TDEToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) : TQToolBar( TQString::fromLatin1( name ), parentWindow, dock, newLine, name ? name : "mainToolBar") @@ -217,15 +217,15 @@ KToolBar::KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine, co init( readConfig, honorStyle ); } -KToolBar::~KToolBar() +TDEToolBar::~TDEToolBar() { emit toolbarDestroyed(); delete d; } -void KToolBar::init( bool readConfig, bool honorStyle ) +void TDEToolBar::init( bool readConfig, bool honorStyle ) { - d = new KToolBarPrivate; + d = new TDEToolBarPrivate; setFullSize( true ); d->m_honorStyle = honorStyle; context = 0; @@ -254,10 +254,10 @@ void KToolBar::init( bool readConfig, bool honorStyle ) connect( this, TQT_SIGNAL(placeChanged(TQDockWindow::Place)), TQT_SLOT(rebuildLayout()) ); } -int KToolBar::insertButton(const TQString& icon, int id, bool enabled, - const TQString& text, int index, KInstance *_instance ) +int TDEToolBar::insertButton(const TQString& icon, int id, bool enabled, + const TQString& text, int index, TDEInstance *_instance ) { - KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text, _instance ); + TDEToolBarButton *button = new TDEToolBarButton( icon, id, this, 0, text, _instance ); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); @@ -266,11 +266,11 @@ int KToolBar::insertButton(const TQString& icon, int id, bool enabled, } -int KToolBar::insertButton(const TQString& icon, int id, const char *signal, +int TDEToolBar::insertButton(const TQString& icon, int id, const char *signal, const TQObject *receiver, const char *slot, - bool enabled, const TQString& text, int index, KInstance *_instance ) + bool enabled, const TQString& text, int index, TDEInstance *_instance ) { - KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text, _instance); + TDEToolBarButton *button = new TDEToolBarButton( icon, id, this, 0, text, _instance); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); connect( button, signal, receiver, slot ); @@ -279,10 +279,10 @@ int KToolBar::insertButton(const TQString& icon, int id, const char *signal, } -int KToolBar::insertButton(const TQPixmap& pixmap, int id, bool enabled, +int TDEToolBar::insertButton(const TQPixmap& pixmap, int id, bool enabled, const TQString& text, int index ) { - KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text); + TDEToolBarButton *button = new TDEToolBarButton( pixmap, id, this, 0, text); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); doConnections( button ); @@ -290,12 +290,12 @@ int KToolBar::insertButton(const TQPixmap& pixmap, int id, bool enabled, } -int KToolBar::insertButton(const TQPixmap& pixmap, int id, const char *signal, +int TDEToolBar::insertButton(const TQPixmap& pixmap, int id, const char *signal, const TQObject *receiver, const char *slot, bool enabled, const TQString& text, int index ) { - KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text); + TDEToolBarButton *button = new TDEToolBarButton( pixmap, id, this, 0, text); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); connect( button, signal, receiver, slot ); @@ -304,10 +304,10 @@ int KToolBar::insertButton(const TQPixmap& pixmap, int id, const char *signal, } -int KToolBar::insertButton(const TQString& icon, int id, TQPopupMenu *popup, +int TDEToolBar::insertButton(const TQString& icon, int id, TQPopupMenu *popup, bool enabled, const TQString &text, int index ) { - KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text ); + TDEToolBarButton *button = new TDEToolBarButton( icon, id, this, 0, text ); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); button->setPopup( popup ); @@ -316,10 +316,10 @@ int KToolBar::insertButton(const TQString& icon, int id, TQPopupMenu *popup, } -int KToolBar::insertButton(const TQPixmap& pixmap, int id, TQPopupMenu *popup, +int TDEToolBar::insertButton(const TQPixmap& pixmap, int id, TQPopupMenu *popup, bool enabled, const TQString &text, int index ) { - KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text ); + TDEToolBarButton *button = new TDEToolBarButton( pixmap, id, this, 0, text ); insertWidgetInternal( button, index, id ); button->setEnabled( enabled ); button->setPopup( popup ); @@ -328,7 +328,7 @@ int KToolBar::insertButton(const TQPixmap& pixmap, int id, TQPopupMenu *popup, } -int KToolBar::insertLined (const TQString& text, int id, +int TDEToolBar::insertLined (const TQString& text, int id, const char *signal, const TQObject *receiver, const char *slot, bool enabled , @@ -347,7 +347,7 @@ int KToolBar::insertLined (const TQString& text, int id, return index; } -int KToolBar::insertCombo (const TQStringList &list, int id, bool writable, +int TDEToolBar::insertCombo (const TQStringList &list, int id, bool writable, const char *signal, const TQObject *receiver, const char *slot, bool enabled, const TQString& tooltiptext, @@ -371,7 +371,7 @@ int KToolBar::insertCombo (const TQStringList &list, int id, bool writable, } -int KToolBar::insertCombo (const TQString& text, int id, bool writable, +int TDEToolBar::insertCombo (const TQString& text, int id, bool writable, const char *signal, TQObject *receiver, const char *slot, bool enabled, const TQString& tooltiptext, @@ -391,29 +391,29 @@ int KToolBar::insertCombo (const TQString& text, int id, bool writable, return index; } -int KToolBar::insertSeparator(int index, int id) +int TDEToolBar::insertSeparator(int index, int id) { - TQWidget *w = new KToolBarSeparator( orientation(), false, this, "tool bar separator" ); + TQWidget *w = new TDEToolBarSeparator( orientation(), false, this, "tool bar separator" ); insertWidgetInternal( w, index, id ); return index; } -int KToolBar::insertLineSeparator(int index, int id) +int TDEToolBar::insertLineSeparator(int index, int id) { - TQWidget *w = new KToolBarSeparator( orientation(), true, this, "tool bar separator" ); + TQWidget *w = new TDEToolBarSeparator( orientation(), true, this, "tool bar separator" ); insertWidgetInternal( w, index, id ); return index; } -int KToolBar::insertWidget(int id, int /*width*/, TQWidget *widget, int index) +int TDEToolBar::insertWidget(int id, int /*width*/, TQWidget *widget, int index) { removeWidgetInternal( widget ); // in case we already have it ? insertWidgetInternal( widget, index, id ); return index; } -int KToolBar::insertAnimatedWidget(int id, TQObject *receiver, const char *slot, +int TDEToolBar::insertAnimatedWidget(int id, TQObject *receiver, const char *slot, const TQString& icons, int index ) { KAnimWidget *anim = new KAnimWidget( icons, d->m_iconSize, this ); @@ -425,7 +425,7 @@ int KToolBar::insertAnimatedWidget(int id, TQObject *receiver, const char *slot, return index; } -KAnimWidget *KToolBar::animatedWidget( int id ) +KAnimWidget *TDEToolBar::animatedWidget( int id ) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) @@ -453,7 +453,7 @@ KAnimWidget *KToolBar::animatedWidget( int id ) } -void KToolBar::addConnection (int id, const char *signal, +void TDEToolBar::addConnection (int id, const char *signal, const TQObject *receiver, const char *slot) { TQWidget* w = getWidget( id ); @@ -461,7 +461,7 @@ void KToolBar::addConnection (int id, const char *signal, connect( w, signal, receiver, slot ); } -void KToolBar::setItemEnabled( int id, bool enabled ) +void TDEToolBar::setItemEnabled( int id, bool enabled ) { TQWidget* w = getWidget( id ); if ( w ) @@ -469,77 +469,77 @@ void KToolBar::setItemEnabled( int id, bool enabled ) } -void KToolBar::setButtonPixmap( int id, const TQPixmap& _pixmap ) +void TDEToolBar::setButtonPixmap( int id, const TQPixmap& _pixmap ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setPixmap( _pixmap ); } -void KToolBar::setButtonIcon( int id, const TQString& _icon ) +void TDEToolBar::setButtonIcon( int id, const TQString& _icon ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setIcon( _icon ); } -void KToolBar::setButtonIconSet( int id, const TQIconSet& iconset ) +void TDEToolBar::setButtonIconSet( int id, const TQIconSet& iconset ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setIconSet( iconset ); } -void KToolBar::setDelayedPopup (int id , TQPopupMenu *_popup, bool toggle ) +void TDEToolBar::setDelayedPopup (int id , TQPopupMenu *_popup, bool toggle ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setDelayedPopup( _popup, toggle ); } -void KToolBar::setAutoRepeat (int id, bool flag) +void TDEToolBar::setAutoRepeat (int id, bool flag) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setAutoRepeat( flag ); } -void KToolBar::setToggle (int id, bool flag ) +void TDEToolBar::setToggle (int id, bool flag ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->setToggle( flag ); } -void KToolBar::toggleButton (int id) +void TDEToolBar::toggleButton (int id) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->toggle(); } -void KToolBar::setButton (int id, bool flag) +void TDEToolBar::setButton (int id, bool flag) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if ( button ) button->on( flag ); } -bool KToolBar::isButtonOn (int id) const +bool TDEToolBar::isButtonOn (int id) const { - KToolBarButton * button = const_cast<KToolBar*>( this )->getButton( id ); + TDEToolBarButton * button = const_cast<TDEToolBar*>( this )->getButton( id ); return button ? button->isOn() : false; } -void KToolBar::setLinedText (int id, const TQString& text) +void TDEToolBar::setLinedText (int id, const TQString& text) { KLineEdit * lineEdit = getLined( id ); if ( lineEdit ) @@ -547,21 +547,21 @@ void KToolBar::setLinedText (int id, const TQString& text) } -TQString KToolBar::getLinedText (int id) const +TQString TDEToolBar::getLinedText (int id) const { - KLineEdit * lineEdit = const_cast<KToolBar*>( this )->getLined( id ); + KLineEdit * lineEdit = const_cast<TDEToolBar*>( this )->getLined( id ); return lineEdit ? lineEdit->text() : TQString::null; } -void KToolBar::insertComboItem (int id, const TQString& text, int index) +void TDEToolBar::insertComboItem (int id, const TQString& text, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) comboBox->insertItem( text, index ); } -void KToolBar::insertComboList (int id, const TQStringList &list, int index) +void TDEToolBar::insertComboList (int id, const TQStringList &list, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -569,7 +569,7 @@ void KToolBar::insertComboList (int id, const TQStringList &list, int index) } -void KToolBar::removeComboItem (int id, int index) +void TDEToolBar::removeComboItem (int id, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -577,7 +577,7 @@ void KToolBar::removeComboItem (int id, int index) } -void KToolBar::setCurrentComboItem (int id, int index) +void TDEToolBar::setCurrentComboItem (int id, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -585,7 +585,7 @@ void KToolBar::setCurrentComboItem (int id, int index) } -void KToolBar::changeComboItem (int id, const TQString& text, int index) +void TDEToolBar::changeComboItem (int id, const TQString& text, int index) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -593,7 +593,7 @@ void KToolBar::changeComboItem (int id, const TQString& text, int index) } -void KToolBar::clearCombo (int id) +void TDEToolBar::clearCombo (int id) { KComboBox * comboBox = getCombo( id ); if (comboBox) @@ -601,14 +601,14 @@ void KToolBar::clearCombo (int id) } -TQString KToolBar::getComboItem (int id, int index) const +TQString TDEToolBar::getComboItem (int id, int index) const { - KComboBox * comboBox = const_cast<KToolBar*>( this )->getCombo( id ); + KComboBox * comboBox = const_cast<TDEToolBar*>( this )->getCombo( id ); return comboBox ? comboBox->text( index ) : TQString::null; } -KComboBox * KToolBar::getCombo(int id) +KComboBox * TDEToolBar::getCombo(int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) @@ -617,7 +617,7 @@ KComboBox * KToolBar::getCombo(int id) } -KLineEdit * KToolBar::getLined (int id) +KLineEdit * TDEToolBar::getLined (int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) @@ -626,16 +626,16 @@ KLineEdit * KToolBar::getLined (int id) } -KToolBarButton * KToolBar::getButton (int id) +TDEToolBarButton * TDEToolBar::getButton (int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; - return tqt_dynamic_cast<KToolBarButton *>( *it ); + return tqt_dynamic_cast<TDEToolBarButton *>( *it ); } -void KToolBar::alignItemRight (int id, bool right ) +void TDEToolBar::alignItemRight (int id, bool right ) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) @@ -647,14 +647,14 @@ void KToolBar::alignItemRight (int id, bool right ) } -TQWidget *KToolBar::getWidget (int id) +TQWidget *TDEToolBar::getWidget (int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); return ( it == id2widget.end() ) ? 0 : (*it); } -void KToolBar::setItemAutoSized (int id, bool yes ) +void TDEToolBar::setItemAutoSized (int id, bool yes ) { TQWidget *w = getWidget(id); if ( w && yes ) @@ -662,7 +662,7 @@ void KToolBar::setItemAutoSized (int id, bool yes ) } -void KToolBar::clear () +void TDEToolBar::clear () { /* Delete any idle buttons, so TQToolBar doesn't delete them itself, making a mess */ for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next()) @@ -675,12 +675,12 @@ void KToolBar::clear () } -void KToolBar::removeItem(int id) +void TDEToolBar::removeItem(int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) { - kdDebug(220) << name() << " KToolBar::removeItem item " << id << " not found" << endl; + kdDebug(220) << name() << " TDEToolBar::removeItem item " << id << " not found" << endl; return; } TQWidget * w = (*it); @@ -691,12 +691,12 @@ void KToolBar::removeItem(int id) } -void KToolBar::removeItemDelayed(int id) +void TDEToolBar::removeItemDelayed(int id) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) { - kdDebug(220) << name() << " KToolBar::removeItem item " << id << " not found" << endl; + kdDebug(220) << name() << " TDEToolBar::removeItem item " << id << " not found" << endl; return; } TQWidget * w = (*it); @@ -710,7 +710,7 @@ void KToolBar::removeItemDelayed(int id) } -void KToolBar::hideItem (int id) +void TDEToolBar::hideItem (int id) { TQWidget *w = getWidget(id); if ( w ) @@ -718,7 +718,7 @@ void KToolBar::hideItem (int id) } -void KToolBar::showItem (int id) +void TDEToolBar::showItem (int id) { TQWidget *w = getWidget(id); if ( w ) @@ -726,38 +726,38 @@ void KToolBar::showItem (int id) } -int KToolBar::itemIndex (int id) +int TDEToolBar::itemIndex (int id) { TQWidget *w = getWidget(id); return w ? widgets.findRef(w) : -1; } -int KToolBar::idAt (int index) +int TDEToolBar::idAt (int index) { TQWidget *w = widgets.at(index); return widget2id[w]; } -void KToolBar::setFullSize(bool flag ) +void TDEToolBar::setFullSize(bool flag ) { setHorizontalStretchable( flag ); setVerticalStretchable( flag ); } -bool KToolBar::fullSize() const +bool TDEToolBar::fullSize() const { return isHorizontalStretchable() || isVerticalStretchable(); } -void KToolBar::enableMoving(bool flag ) +void TDEToolBar::enableMoving(bool flag ) { setMovingEnabled(flag); } -void KToolBar::setBarPos (BarPosition bpos) +void TDEToolBar::setBarPos (BarPosition bpos) { if ( !mainWindow() ) return; @@ -766,22 +766,22 @@ void KToolBar::setBarPos (BarPosition bpos) } -KToolBar::BarPosition KToolBar::barPos() const +TDEToolBar::BarPosition TDEToolBar::barPos() const { if ( !this->mainWindow() ) - return place() == TQDockWindow::InDock ? KToolBar::Top : KToolBar::Floating; + return place() == TQDockWindow::InDock ? TDEToolBar::Top : TDEToolBar::Floating; Dock dock; int dm1, dm2; bool dm3; this->mainWindow()->getLocation( (TQToolBar*)this, dock, dm1, dm3, dm2 ); if ( dock == DockUnmanaged ) { - return (KToolBar::BarPosition)DockTop; + return (TDEToolBar::BarPosition)DockTop; } return (BarPosition)dock; } -bool KToolBar::enable(BarStatus stat) +bool TDEToolBar::enable(BarStatus stat) { bool mystat = isVisible(); @@ -794,47 +794,47 @@ bool KToolBar::enable(BarStatus stat) } -void KToolBar::setMaxHeight ( int h ) +void TDEToolBar::setMaxHeight ( int h ) { setMaximumHeight( h ); } -int KToolBar::maxHeight() +int TDEToolBar::maxHeight() { return maximumHeight(); } -void KToolBar::setMaxWidth (int dw) +void TDEToolBar::setMaxWidth (int dw) { setMaximumWidth( dw ); } -int KToolBar::maxWidth() +int TDEToolBar::maxWidth() { return maximumWidth(); } -void KToolBar::setTitle (const TQString& _title) +void TDEToolBar::setTitle (const TQString& _title) { setLabel( _title ); } -void KToolBar::enableFloating (bool ) +void TDEToolBar::enableFloating (bool ) { } -void KToolBar::setIconText(IconText it) +void TDEToolBar::setIconText(IconText it) { setIconText( it, true ); } -void KToolBar::setIconText(IconText icontext, bool update) +void TDEToolBar::setIconText(IconText icontext, bool update) { bool doUpdate=false; @@ -865,18 +865,18 @@ void KToolBar::setIconText(IconText icontext, bool update) } -KToolBar::IconText KToolBar::iconText() const +TDEToolBar::IconText TDEToolBar::iconText() const { return d->m_iconText; } -void KToolBar::setIconSize(int size) +void TDEToolBar::setIconSize(int size) { setIconSize( size, true ); } -void KToolBar::setIconSize(int size, bool update) +void TDEToolBar::setIconSize(int size, bool update) { bool doUpdate=false; @@ -902,7 +902,7 @@ void KToolBar::setIconSize(int size, bool update) } } -int KToolBar::iconSize() const +int TDEToolBar::iconSize() const { if ( !d->m_iconSize ) // default value? return iconSizeDefault(); @@ -910,35 +910,35 @@ int KToolBar::iconSize() const return d->m_iconSize; } -int KToolBar::iconSizeDefault() const +int TDEToolBar::iconSizeDefault() const { if (!::qstrcmp(name(), "mainToolBar")) - return KGlobal::iconLoader()->currentSize(KIcon::MainToolbar); + return TDEGlobal::iconLoader()->currentSize(TDEIcon::MainToolbar); - return KGlobal::iconLoader()->currentSize(KIcon::Toolbar); + return TDEGlobal::iconLoader()->currentSize(TDEIcon::Toolbar); } -void KToolBar::setEnableContextMenu(bool enable ) +void TDEToolBar::setEnableContextMenu(bool enable ) { d->m_enableContext = enable; } -bool KToolBar::contextMenuEnabled() const +bool TDEToolBar::contextMenuEnabled() const { return d->m_enableContext; } -void KToolBar::setItemNoStyle(int id, bool no_style ) +void TDEToolBar::setItemNoStyle(int id, bool no_style ) { - KToolBarButton * button = getButton( id ); + TDEToolBarButton * button = getButton( id ); if (button) button->setNoStyle( no_style ); } -void KToolBar::setFlat (bool flag) +void TDEToolBar::setFlat (bool flag) { if ( !mainWindow() ) return; @@ -947,19 +947,19 @@ void KToolBar::setFlat (bool flag) else mainWindow()->moveDockWindow( this, DockTop ); // And remember to save the new look later - KMainWindow *kmw = tqt_dynamic_cast<KMainWindow *>(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } -int KToolBar::count() const +int TDEToolBar::count() const { return id2widget.count(); } -void KToolBar::saveState() +void TDEToolBar::saveState() { // first, try to save to the xml file if ( d->m_xmlguiClient && !d->m_xmlguiClient->xmlFile().isEmpty() ) { @@ -1020,12 +1020,12 @@ void KToolBar::saveState() } // if that didn't work, we save to the config file - KConfig *config = KGlobal::config(); + TDEConfig *config = TDEGlobal::config(); saveSettings(config, TQString::null); config->sync(); } -TQString KToolBar::settingsGroup() const +TQString TDEToolBar::settingsGroup() const { TQString configGroup; if (!::qstrcmp(name(), "unnamed") || !::qstrcmp(name(), "mainToolBar")) @@ -1040,7 +1040,7 @@ TQString KToolBar::settingsGroup() const return configGroup; } -void KToolBar::saveSettings(KConfig *config, const TQString &_configGroup) +void TDEToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup) { TQString configGroup = _configGroup; if (configGroup.isEmpty()) @@ -1053,7 +1053,7 @@ void KToolBar::saveSettings(KConfig *config, const TQString &_configGroup) //kdDebug(220) << name() << " position=" << position << " index=" << index << " offset=" << offset() << " newLine=" << newLine() << endl; - KConfigGroupSaver saver(config, configGroup); + TDEConfigGroupSaver saver(config, configGroup); if(!config->hasDefault("Position") && position == d->PositionDefault ) config->revertToDefault("Position"); @@ -1093,22 +1093,22 @@ void KToolBar::saveSettings(KConfig *config, const TQString &_configGroup) // reappear at the same position the next time. // The whole set of indexes has to be saved. //kdDebug(220) << name() << " writing index " << index << endl; - KMainWindow *kmw = tqt_dynamic_cast<KMainWindow *>(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); // don't save if there's only one toolbar // Don't use kmw->toolBarIterator() because you might // mess up someone else's iterator. Make the list on your own - TQPtrList<KToolBar> toolbarList; + TQPtrList<TDEToolBar> toolbarList; TQPtrList<TQToolBar> lst; for ( int i = (int)TQMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) { lst = kmw->toolBars( (ToolBarDock)i ); for ( TQToolBar *tb = lst.first(); tb; tb = lst.next() ) { - if ( !tb->inherits( "KToolBar" ) ) + if ( !tb->inherits( "TDEToolBar" ) ) continue; - toolbarList.append( (KToolBar*)tb ); + toolbarList.append( (TDEToolBar*)tb ); } } - TQPtrListIterator<KToolBar> toolbarIterator( toolbarList ); + TQPtrListIterator<TDEToolBar> toolbarIterator( toolbarList ); if ( !kmw || toolbarIterator.count() > 1 ) config->writeEntry("Index", index); else @@ -1126,24 +1126,24 @@ void KToolBar::saveSettings(KConfig *config, const TQString &_configGroup) } -void KToolBar::setXMLGUIClient( KXMLGUIClient *client ) +void TDEToolBar::setXMLGUIClient( KXMLGUIClient *client ) { d->m_xmlguiClient = client; } -void KToolBar::setText( const TQString & txt ) +void TDEToolBar::setText( const TQString & txt ) { setLabel( txt + " (" + kapp->caption() + ") " ); } -TQString KToolBar::text() const +TQString TDEToolBar::text() const { return label(); } -void KToolBar::doConnections( KToolBarButton *button ) +void TDEToolBar::doConnections( TDEToolBarButton *button ) { connect(button, TQT_SIGNAL(clicked(int)), this, TQT_SIGNAL( clicked( int ) ) ); connect(button, TQT_SIGNAL(doubleClicked(int)), this, TQT_SIGNAL( doubleClicked( int ) ) ); @@ -1153,14 +1153,14 @@ void KToolBar::doConnections( KToolBarButton *button ) connect(button, TQT_SIGNAL(highlighted(int, bool)), this, TQT_SIGNAL( highlighted( int, bool ) ) ); } -void KToolBar::mousePressEvent ( TQMouseEvent *m ) +void TDEToolBar::mousePressEvent ( TQMouseEvent *m ) { if ( !mainWindow() ) return; TQMainWindow *mw = mainWindow(); if ( mw->toolBarsMovable() && d->m_enableContext ) { if ( m->button() == Qt::RightButton ) { - TQGuardedPtr<KToolBar> guard( this ); + TQGuardedPtr<TDEToolBar> guard( this ); int i = contextMenu()->exec( m->globalPos(), 0 ); // "Configure Toolbars" recreates toolbars, so we might not exist anymore. if ( guard ) @@ -1204,14 +1204,14 @@ void KToolBar::mousePressEvent ( TQMouseEvent *m ) else return; // assume this was an action handled elsewhere, no need for setSettingsDirty() } - KMainWindow *kmw = tqt_dynamic_cast<KMainWindow *>(mw); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mw); if ( kmw ) kmw->setSettingsDirty(); } } } -void KToolBar::doModeChange() +void TDEToolBar::doModeChange() { for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next()) w->blockSignals(false); @@ -1220,7 +1220,7 @@ void KToolBar::doModeChange() emit modechange(); } -void KToolBar::rebuildLayout() +void TDEToolBar::rebuildLayout() { for(TQWidget *w=d->idleButtons.first(); w; w=d->idleButtons.next()) w->blockSignals(false); @@ -1238,7 +1238,7 @@ void KToolBar::rebuildLayout() for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( w == rightAligned ) continue; - KToolBarSeparator *ktbs = tqt_dynamic_cast<KToolBarSeparator *>(w); + TDEToolBarSeparator *ktbs = tqt_dynamic_cast<TDEToolBarSeparator *>(w); if ( ktbs && !ktbs->showLine() ) { l->addSpacing( orientation() == Qt::Vertical ? w->sizeHint().height() : w->sizeHint().width() ); w->hide(); @@ -1267,7 +1267,7 @@ void KToolBar::rebuildLayout() TQApplication::postEvent( this, new TQEvent( TQEvent::LayoutHint ) ); } -void KToolBar::childEvent( TQChildEvent *e ) +void TDEToolBar::childEvent( TQChildEvent *e ) { if ( e->child()->isWidgetType() ) { TQWidget * w = tqt_dynamic_cast<TQWidget *>(e->child()); @@ -1304,7 +1304,7 @@ void KToolBar::childEvent( TQChildEvent *e ) TQToolBar::childEvent( e ); } -void KToolBar::insertWidgetInternal( TQWidget *w, int &index, int id ) +void TDEToolBar::insertWidgetInternal( TQWidget *w, int &index, int id ) { // we can't have it in widgets, or something is really wrong //widgets.removeRef( w ); @@ -1323,19 +1323,19 @@ void KToolBar::insertWidgetInternal( TQWidget *w, int &index, int id ) widget2id.insert( w, id ); } -void KToolBar::showEvent( TQShowEvent *e ) +void TDEToolBar::showEvent( TQShowEvent *e ) { TQToolBar::showEvent( e ); rebuildLayout(); } -void KToolBar::setStretchableWidget( TQWidget *w ) +void TDEToolBar::setStretchableWidget( TQWidget *w ) { TQToolBar::setStretchableWidget( w ); stretchableWidget = w; } -TQSizePolicy KToolBar::sizePolicy() const +TQSizePolicy TDEToolBar::sizePolicy() const { if ( orientation() == Qt::Horizontal ) return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); @@ -1343,18 +1343,18 @@ TQSizePolicy KToolBar::sizePolicy() const return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding ); } -TQSize KToolBar::sizeHint() const +TQSize TDEToolBar::sizeHint() const { TQSize minSize(0,0); - KToolBar *ncThis = const_cast<KToolBar *>(this); + TDEToolBar *ncThis = const_cast<TDEToolBar *>(this); ncThis->polish(); int margin = static_cast<TQWidget*>(ncThis)->layout()->margin() + frameWidth(); switch( barPos() ) { - case KToolBar::Top: - case KToolBar::Bottom: + case TDEToolBar::Top: + case TDEToolBar::Bottom: for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() ) { TQSize sh = w->sizeHint(); @@ -1375,8 +1375,8 @@ TQSize KToolBar::sizeHint() const minSize += TQSize(margin*2, margin*2); break; - case KToolBar::Left: - case KToolBar::Right: + case TDEToolBar::Left: + case TDEToolBar::Right: for ( TQWidget *w = ncThis->widgets.first(); w; w = ncThis->widgets.next() ) { TQSize sh = w->sizeHint(); @@ -1401,32 +1401,32 @@ TQSize KToolBar::sizeHint() const return minSize; } -TQSize KToolBar::minimumSize() const +TQSize TDEToolBar::minimumSize() const { return minimumSizeHint(); } -TQSize KToolBar::minimumSizeHint() const +TQSize TDEToolBar::minimumSizeHint() const { return sizeHint(); } -bool KToolBar::highlight() const +bool TDEToolBar::highlight() const { return d->m_highlight; } -void KToolBar::hide() +void TDEToolBar::hide() { TQToolBar::hide(); } -void KToolBar::show() +void TDEToolBar::show() { TQToolBar::show(); } -void KToolBar::resizeEvent( TQResizeEvent *e ) +void TDEToolBar::resizeEvent( TQResizeEvent *e ) { bool b = isUpdatesEnabled(); setUpdatesEnabled( false ); @@ -1445,16 +1445,16 @@ void KToolBar::resizeEvent( TQResizeEvent *e ) } } // else { -// printf("[WARNING] In KToolBar::resizeEvent, but this code block should not be executing. Preventing toolbar lockup. [Code 0045]\n\r"); +// printf("[WARNING] In TDEToolBar::resizeEvent, but this code block should not be executing. Preventing toolbar lockup. [Code 0045]\n\r"); // setUpdatesEnabled( true ); // } } -void KToolBar::slotIconChanged(int group) +void TDEToolBar::slotIconChanged(int group) { - if ((group != KIcon::Toolbar) && (group != KIcon::MainToolbar)) + if ((group != TDEIcon::Toolbar) && (group != TDEIcon::MainToolbar)) return; - if ((group == KIcon::MainToolbar) != !::qstrcmp(name(), "mainToolBar")) + if ((group == TDEIcon::MainToolbar) != !::qstrcmp(name(), "mainToolBar")) return; doModeChange(); @@ -1463,48 +1463,48 @@ void KToolBar::slotIconChanged(int group) updateGeometry(); } -void KToolBar::slotReadConfig() +void TDEToolBar::slotReadConfig() { //kdDebug(220) << name() << " slotReadConfig" << endl; // Read appearance settings (hmm, we used to do both here, // but a well behaved application will call applyMainWindowSettings // anyway, right ?) - applyAppearanceSettings(KGlobal::config(), TQString::null ); + applyAppearanceSettings(TDEGlobal::config(), TQString::null ); } -void KToolBar::slotAppearanceChanged() +void TDEToolBar::slotAppearanceChanged() { // Read appearance settings from global file. - applyAppearanceSettings(KGlobal::config(), TQString::null, true /* lose local settings */ ); + applyAppearanceSettings(TDEGlobal::config(), TQString::null, true /* lose local settings */ ); // And remember to save the new look later - KMainWindow *kmw = tqt_dynamic_cast<KMainWindow *>(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } //static -bool KToolBar::highlightSetting() +bool TDEToolBar::highlightSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); - KConfigGroupSaver saver(KGlobal::config(), grpToolbar); - return KGlobal::config()->readBoolEntry(TQString::fromLatin1("Highlighting"),true); + TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); + return TDEGlobal::config()->readBoolEntry(TQString::fromLatin1("Highlighting"),true); } //static -bool KToolBar::transparentSetting() +bool TDEToolBar::transparentSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); - KConfigGroupSaver saver(KGlobal::config(), grpToolbar); - return KGlobal::config()->readBoolEntry(TQString::fromLatin1("TransparentMoving"),true); + TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); + return TDEGlobal::config()->readBoolEntry(TQString::fromLatin1("TransparentMoving"),true); } //static -KToolBar::IconText KToolBar::iconTextSetting() +TDEToolBar::IconText TDEToolBar::iconTextSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); - KConfigGroupSaver saver(KGlobal::config(), grpToolbar); - TQString icontext = KGlobal::config()->readEntry(TQString::fromLatin1("IconText"),TQString::fromLatin1("IconOnly")); + TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); + TQString icontext = TDEGlobal::config()->readEntry(TQString::fromLatin1("IconText"),TQString::fromLatin1("IconOnly")); if ( icontext == "IconTextRight" ) return IconTextRight; else if ( icontext == "IconTextBottom" ) @@ -1515,7 +1515,7 @@ KToolBar::IconText KToolBar::iconTextSetting() return IconOnly; } -void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configGroup, bool forceGlobal) +void TDEToolBar::applyAppearanceSettings(TDEConfig *config, const TQString &_configGroup, bool forceGlobal) { TQString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup; //kdDebug(220) << name() << " applyAppearanceSettings: configGroup=" << configGroup << " forceGlobal=" << forceGlobal << endl; @@ -1527,12 +1527,12 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG // This is the reason for the xmlgui tests below. bool xmlgui = d->m_xmlguiClient && !d->m_xmlguiClient->xmlFile().isEmpty(); - KConfig *gconfig = KGlobal::config(); + TDEConfig *gconfig = TDEGlobal::config(); - 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"); + static const TQString &attrIconText = TDEGlobal::staticQString("IconText"); + static const TQString &attrHighlight = TDEGlobal::staticQString("Highlighting"); + static const TQString &attrTrans = TDEGlobal::staticQString("TransparentMoving"); + static const TQString &attrIconSize = TDEGlobal::staticQString("IconSize"); // we actually do this in two steps. // First, we read in the global styles [Toolbar style] (from the KControl module). @@ -1547,8 +1547,8 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG // this is the first iteration TQString grpToolbar(TQString::fromLatin1("Toolbar style")); - { // start block for KConfigGroupSaver - KConfigGroupSaver saver(gconfig, grpToolbar); + { // start block for TDEConfigGroupSaver + TDEConfigGroupSaver saver(gconfig, grpToolbar); // first, get the generic settings highlight = gconfig->readBoolEntry(attrHighlight, true); @@ -1590,7 +1590,7 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG } // revert back to the old group - } // end block for KConfigGroupSaver + } // end block for TDEConfigGroupSaver bool doUpdate = false; @@ -1637,12 +1637,12 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG updateGeometry(); } -void KToolBar::applySettings(KConfig *config, const TQString &_configGroup) +void TDEToolBar::applySettings(TDEConfig *config, const TQString &_configGroup) { return applySettings(config,_configGroup,false); } -void KToolBar::applySettings(KConfig *config, const TQString &_configGroup, bool force) +void TDEToolBar::applySettings(TDEConfig *config, const TQString &_configGroup, bool force) { //kdDebug(220) << name() << " applySettings group=" << _configGroup << endl; @@ -1654,7 +1654,7 @@ void KToolBar::applySettings(KConfig *config, const TQString &_configGroup, bool Global config / <appnamerc> user settings if no XMLGUI is used Global config / App-XML attributes / <appnamerc> user settings if XMLGUI is used - So in the first case, we simply read everything from KConfig as below, + So in the first case, we simply read everything from TDEConfig as below, but in the second case we don't do anything here if there is no app-specific config, and the XMLGUI-related code (loadState()) uses the static methods of this class to get the global defaults. @@ -1668,13 +1668,13 @@ void KToolBar::applySettings(KConfig *config, const TQString &_configGroup, bool // ...and now the position stuff if ( config->hasGroup(configGroup) || force ) { - KConfigGroupSaver cgs(config, configGroup); + TDEConfigGroupSaver cgs(config, configGroup); - 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"); + static const TQString &attrPosition = TDEGlobal::staticQString("Position"); + static const TQString &attrIndex = TDEGlobal::staticQString("Index"); + static const TQString &attrOffset = TDEGlobal::staticQString("Offset"); + static const TQString &attrNewLine = TDEGlobal::staticQString("NewLine"); + static const TQString &attrHidden = TDEGlobal::staticQString("Hidden"); TQString position = config->readEntry(attrPosition, d->PositionDefault); int index = config->readNumEntry(attrIndex, -1); @@ -1705,7 +1705,7 @@ void KToolBar::applySettings(KConfig *config, const TQString &_configGroup, bool if ( mainWindow() ) { //kdDebug(220) << name() << " applySettings updating ToolbarInfo" << endl; - d->toolBarInfo = KToolBarPrivate::ToolBarInfo( pos, index, newLine, offset ); + d->toolBarInfo = TDEToolBarPrivate::ToolBarInfo( pos, index, newLine, offset ); positionYourself( true ); } if (isVisible ()) @@ -1713,7 +1713,7 @@ void KToolBar::applySettings(KConfig *config, const TQString &_configGroup, bool } } -bool KToolBar::event( TQEvent *e ) +bool TDEToolBar::event( TQEvent *e ) { if ( (e->type() == TQEvent::LayoutHint) && isUpdatesEnabled() ) d->repaintTimer.start( 100, true ); @@ -1730,7 +1730,7 @@ bool KToolBar::event( TQEvent *e ) return TQToolBar::event( e ); } -void KToolBar::slotRepaint() +void TDEToolBar::slotRepaint() { setUpdatesEnabled( false ); // Send a resizeEvent to update the "toolbar extension arrow" @@ -1743,40 +1743,40 @@ void KToolBar::slotRepaint() repaint( true ); } -void KToolBar::toolBarPosChanged( TQToolBar *tb ) +void TDEToolBar::toolBarPosChanged( TQToolBar *tb ) { if ( tb != this ) return; if ( d->oldPos == DockMinimized ) rebuildLayout(); d->oldPos = (TQMainWindow::ToolBarDock)barPos(); - KMainWindow *kmw = tqt_dynamic_cast<KMainWindow *>(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } -static KToolBar::Dock stringToDock( const TQString& attrPosition ) +static TDEToolBar::Dock stringToDock( const TQString& attrPosition ) { - KToolBar::Dock dock = KToolBar::DockTop; + TDEToolBar::Dock dock = TDEToolBar::DockTop; if ( !attrPosition.isEmpty() ) { if ( attrPosition == "top" ) - dock = KToolBar::DockTop; + dock = TDEToolBar::DockTop; else if ( attrPosition == "left" ) - dock = KToolBar::DockLeft; + dock = TDEToolBar::DockLeft; else if ( attrPosition == "right" ) - dock = KToolBar::DockRight; + dock = TDEToolBar::DockRight; else if ( attrPosition == "bottom" ) - dock = KToolBar::DockBottom; + dock = TDEToolBar::DockBottom; else if ( attrPosition == "floating" ) - dock = KToolBar::DockTornOff; + dock = TDEToolBar::DockTornOff; else if ( attrPosition == "flat" ) - dock = KToolBar::DockMinimized; + dock = TDEToolBar::DockMinimized; } return dock; } -void KToolBar::loadState( const TQDomElement &element ) +void TDEToolBar::loadState( const TQDomElement &element ) { TQMainWindow *mw = mainWindow(); @@ -1801,9 +1801,9 @@ void KToolBar::loadState( const TQDomElement &element ) This method is called in order to load toolbar settings from XML. However this can be used in two rather different cases: - for the initial loading of the app's XML. In that case the settings - are only the defaults, the user's KConfig settings will override them + are only the defaults, the user's TDEConfig settings will override them (KDE4 TODO: how about saving those user settings into the local XML file instead? - Then this whole thing would be simpler, no KConfig settings to apply afterwards. + Then this whole thing would be simpler, no TDEConfig settings to apply afterwards. OTOH we'd have to migrate those settings when the .rc version increases, like we do for shortcuts) @@ -1834,13 +1834,13 @@ void KToolBar::loadState( const TQDomElement &element ) if ( !attrIconText.isEmpty() ) { //kdDebug(220) << name() << " loadState attrIconText=" << attrIconText << endl; if ( attrIconText == "icontextright" ) - setIconText( KToolBar::IconTextRight ); + setIconText( TDEToolBar::IconTextRight ); else if ( attrIconText == "textonly" ) - setIconText( KToolBar::TextOnly ); + setIconText( TDEToolBar::TextOnly ); else if ( attrIconText == "icontextbottom" ) - setIconText( KToolBar::IconTextBottom ); + setIconText( TDEToolBar::IconTextBottom ); else if ( attrIconText == "icononly" ) - setIconText( KToolBar::IconOnly ); + setIconText( TDEToolBar::IconOnly ); } else { //kdDebug(220) << name() << " loadState no iconText attribute in XML, using iconTextSetting=" << iconTextSetting() << endl; @@ -1889,7 +1889,7 @@ void KToolBar::loadState( const TQDomElement &element ) } } - d->toolBarInfo = KToolBarPrivate::ToolBarInfo( dock, index, newLine, offset ); + d->toolBarInfo = TDEToolBarPrivate::ToolBarInfo( dock, index, newLine, offset ); mw->addDockWindow( this, dock, newLine ); mw->moveDockWindow( this, dock, newLine, index, offset ); @@ -1914,12 +1914,12 @@ void KToolBar::loadState( const TQDomElement &element ) // Apply transparent-toolbar-moving setting (ok, this is global to the mainwindow, // but we do it only if there are toolbars...) - // KDE4: move to KMainWindow + // KDE4: move to TDEMainWindow if ( transparentSetting() != !mw->opaqueMoving() ) mw->setOpaqueMoving( !transparentSetting() ); } -int KToolBar::dockWindowIndex() +int TDEToolBar::dockWindowIndex() { int index = 0; Q_ASSERT( mainWindow() ); @@ -1932,26 +1932,26 @@ int KToolBar::dockWindowIndex() return index; } -void KToolBar::getAttributes( TQString &position, TQString &icontext, int &index ) +void TDEToolBar::getAttributes( TQString &position, TQString &icontext, int &index ) { // get all of the stuff to save switch ( barPos() ) { - case KToolBar::Flat: + case TDEToolBar::Flat: position = "Flat"; break; - case KToolBar::Bottom: + case TDEToolBar::Bottom: position = "Bottom"; break; - case KToolBar::Left: + case TDEToolBar::Left: position = "Left"; break; - case KToolBar::Right: + case TDEToolBar::Right: position = "Right"; break; - case KToolBar::Floating: + case TDEToolBar::Floating: position = "Floating"; break; - case KToolBar::Top: + case TDEToolBar::Top: default: position = "Top"; break; @@ -1960,16 +1960,16 @@ void KToolBar::getAttributes( TQString &position, TQString &icontext, int &index index = dockWindowIndex(); switch (d->m_iconText) { - case KToolBar::IconTextRight: + case TDEToolBar::IconTextRight: icontext = "IconTextRight"; break; - case KToolBar::IconTextBottom: + case TDEToolBar::IconTextBottom: icontext = "IconTextBottom"; break; - case KToolBar::TextOnly: + case TDEToolBar::TextOnly: icontext = "TextOnly"; break; - case KToolBar::IconOnly: + case TDEToolBar::IconOnly: default: icontext = "IconOnly"; break; @@ -1977,7 +1977,7 @@ void KToolBar::getAttributes( TQString &position, TQString &icontext, int &index //kdDebug(220) << name() << " getAttributes: icontext=" << icontext << endl; } -void KToolBar::saveState( TQDomElement ¤t ) +void TDEToolBar::saveState( TQDomElement ¤t ) { Q_ASSERT( !current.isNull() ); TQString position, icontext; @@ -2006,8 +2006,8 @@ void KToolBar::saveState( TQDomElement ¤t ) //kdDebug(220) << name() << " saveState: saving index=" << index << " iconText=" << icontext << " hidden=" << isHidden() << endl; } -// Called by KMainWindow::finalizeGUI -void KToolBar::positionYourself( bool force ) +// Called by TDEMainWindow::finalizeGUI +void TDEToolBar::positionYourself( bool force ) { if (force) d->positioned = false; @@ -2035,16 +2035,16 @@ void KToolBar::positionYourself( bool force ) d->positioned = true; } -KPopupMenu *KToolBar::contextMenu() +TDEPopupMenu *TDEToolBar::contextMenu() { if ( context ) return context; // Construct our context popup menu. Name it qt_dockwidget_internal so it // won't be deleted by TQToolBar::clear(). - context = new KPopupMenu( this, "qt_dockwidget_internal" ); + context = new TDEPopupMenu( this, "qt_dockwidget_internal" ); context->insertTitle(i18n("Toolbar Menu")); - KPopupMenu *orient = new KPopupMenu( context, "orient" ); + TDEPopupMenu *orient = new TDEPopupMenu( context, "orient" ); orient->insertItem( i18n("toolbar position string","Top"), CONTEXT_TOP ); orient->insertItem( i18n("toolbar position string","Left"), CONTEXT_LEFT ); orient->insertItem( i18n("toolbar position string","Right"), CONTEXT_RIGHT ); @@ -2053,23 +2053,23 @@ KPopupMenu *KToolBar::contextMenu() orient->insertItem( i18n("toolbar position string","Floating"), CONTEXT_FLOAT ); orient->insertItem( i18n("min toolbar", "Flat"), CONTEXT_FLAT ); - KPopupMenu *mode = new KPopupMenu( context, "mode" ); + TDEPopupMenu *mode = new TDEPopupMenu( context, "mode" ); mode->insertItem( i18n("Icons Only"), CONTEXT_ICONS ); mode->insertItem( i18n("Text Only"), CONTEXT_TEXT ); mode->insertItem( i18n("Text Alongside Icons"), CONTEXT_TEXTRIGHT ); mode->insertItem( i18n("Text Under Icons"), CONTEXT_TEXTUNDER ); - KPopupMenu *size = new KPopupMenu( context, "size" ); + TDEPopupMenu *size = new TDEPopupMenu( context, "size" ); size->insertItem( i18n("Default"), CONTEXT_ICONSIZES ); // Query the current theme for available sizes - KIconTheme *theme = KGlobal::instance()->iconLoader()->theme(); + TDEIconTheme *theme = TDEGlobal::instance()->iconLoader()->theme(); TQValueList<int> avSizes; if (theme) { if (!::qstrcmp(name(), "mainToolBar")) - avSizes = theme->querySizes( KIcon::MainToolbar); + avSizes = theme->querySizes( TDEIcon::MainToolbar); else - avSizes = theme->querySizes( KIcon::Toolbar); + avSizes = theme->querySizes( TDEIcon::Toolbar); } d->iconSizes = avSizes; @@ -2131,24 +2131,24 @@ KPopupMenu *KToolBar::contextMenu() return context; } -void KToolBar::slotContextAboutToShow() +void TDEToolBar::slotContextAboutToShow() { // The idea here is to reuse the "static" part of the menu to save time. // But the "Toolbars" action is dynamic (can be a single action or a submenu) // and ToolBarHandler::setupActions() deletes it, so better not keep it around. // So we currently plug/unplug the last two actions of the menu. // Another way would be to keep around the actions and plug them all into a (new each time) popupmenu. - KMainWindow *kmw = tqt_dynamic_cast<KMainWindow *>(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); if ( kmw ) { kmw->setupToolbarMenuActions(); // Only allow hiding a toolbar if the action is also plugged somewhere else (e.g. menubar) - KAction *tbAction = kmw->toolBarMenuAction(); + TDEAction *tbAction = kmw->toolBarMenuAction(); if ( tbAction && tbAction->containerCount() > 0 ) tbAction->plug(context); } // try to find "configure toolbars" action - KAction *configureAction = 0; + TDEAction *configureAction = 0; const char* actionName = KStdAction::name(KStdAction::ConfigureToolbars); if ( d->m_xmlguiClient ) configureAction = d->m_xmlguiClient->actionCollection()->action(actionName); @@ -2192,39 +2192,39 @@ void KToolBar::slotContextAboutToShow() switch ( barPos() ) { - case KToolBar::Flat: + case TDEToolBar::Flat: context->setItemChecked( CONTEXT_FLAT, true ); break; - case KToolBar::Bottom: + case TDEToolBar::Bottom: context->setItemChecked( CONTEXT_BOTTOM, true ); break; - case KToolBar::Left: + case TDEToolBar::Left: context->setItemChecked( CONTEXT_LEFT, true ); break; - case KToolBar::Right: + case TDEToolBar::Right: context->setItemChecked( CONTEXT_RIGHT, true ); break; - case KToolBar::Floating: + case TDEToolBar::Floating: context->setItemChecked( CONTEXT_FLOAT, true ); break; - case KToolBar::Top: + case TDEToolBar::Top: context->setItemChecked( CONTEXT_TOP, true ); break; default: break; } } -void KToolBar::slotContextAboutToHide() +void TDEToolBar::slotContextAboutToHide() { // We have to unplug whatever slotContextAboutToShow plugged into the menu. // Unplug the toolbar menu action - KMainWindow *kmw = tqt_dynamic_cast<KMainWindow *>(mainWindow()); + TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); if ( kmw && kmw->toolBarMenuAction() ) if ( kmw->toolBarMenuAction()->containerCount() > 1 ) kmw->toolBarMenuAction()->unplug(context); // Unplug the configure toolbars action too, since it's afterwards anyway - KAction *configureAction = 0; + TDEAction *configureAction = 0; const char* actionName = KStdAction::name(KStdAction::ConfigureToolbars); if ( d->m_xmlguiClient ) configureAction = d->m_xmlguiClient->actionCollection()->action(actionName); @@ -2242,12 +2242,12 @@ void KToolBar::slotContextAboutToHide() } } -void KToolBar::widgetDestroyed() +void TDEToolBar::widgetDestroyed() { removeWidgetInternal( (TQWidget*)sender() ); } -void KToolBar::removeWidgetInternal( TQWidget * w ) +void TDEToolBar::removeWidgetInternal( TQWidget * w ) { widgets.removeRef( w ); TQMap< TQWidget*, int >::Iterator it = widget2id.find( w ); @@ -2257,8 +2257,8 @@ void KToolBar::removeWidgetInternal( TQWidget * w ) widget2id.remove( it ); } -void KToolBar::virtual_hook( int, void* ) +void TDEToolBar::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -#include "ktoolbar.moc" +#include "tdetoolbar.moc" diff --git a/tdeui/ktoolbar.h b/tdeui/tdetoolbar.h index aa447ed5c..857673f28 100644 --- a/tdeui/ktoolbar.h +++ b/tdeui/tdetoolbar.h @@ -33,7 +33,7 @@ #include <tqframe.h> #include <tqiconset.h> -#include <kglobal.h> +#include <tdeglobal.h> class TQDomElement; class TQSize; @@ -44,23 +44,23 @@ class TQDomDocument; class TQTimer; class KLineEdit; -class KToolBar; -class KToolBarButton; -class KToolBoxManager; +class TDEToolBar; +class TDEToolBarButton; +class TDEToolBoxManager; class KAnimWidget; -class KPopupMenu; -class KInstance; +class TDEPopupMenu; +class TDEInstance; class KComboBox; class KXMLGUIClient; -class KToolBarPrivate; +class TDEToolBarPrivate; -class TDEUI_EXPORT KToolBarSeparator : public TQFrame +class TDEUI_EXPORT TDEToolBarSeparator : public TQFrame { Q_OBJECT public: - KToolBarSeparator( Orientation, bool l, TQToolBar *parent, const char* name=0 ); + TDEToolBarSeparator( Orientation, bool l, TQToolBar *parent, const char* name=0 ); TQSize sizeHint() const; Orientation orientation() const { return orient; } @@ -82,26 +82,26 @@ private: * * A KDE-style toolbar. * - * KToolBar can be dragged around in and between different docks. + * TDEToolBar can be dragged around in and between different docks. * - * A KToolBar can contain all sorts of widgets. + * A TDEToolBar can contain all sorts of widgets. * - * KToolBar can be used as a standalone widget, but KMainWindow + * TDEToolBar can be used as a standalone widget, but TDEMainWindow * provides easy factories and management of one or more toolbars. - * Once you have a KToolBar object, you can insert items into it with the + * Once you have a TDEToolBar object, you can insert items into it with the * insert... methods, or remove them with the removeItem() method. This * can be done at any time; the toolbar will be automatically updated. * There are also many methods to set per-child properties like alignment * and toggle behavior. * - * KToolBar uses a global config group to load toolbar settings on + * TDEToolBar uses a global config group to load toolbar settings on * construction. It will reread this config group on a - * KApplication::appearanceChanged() signal. + * TDEApplication::appearanceChanged() signal. * * @author Reginald Stadlbauer <reggie@kde.org>, Stephan Kulow <coolo@kde.org>, Sven Radej <radej@kde.org>. */ -class TDEUI_EXPORT KToolBar : public TQToolBar +class TDEUI_EXPORT TDEToolBar : public TQToolBar { Q_OBJECT @@ -136,12 +136,12 @@ public: * true. All other toolbars will be IconOnly and use Medium icons. * * @param parent The standard toolbar parent (usually a - * KMainWindow) + * TDEMainWindow) * @param name The standard internal name * @param honorStyle If true, then global settings for IconSize and IconText will be honored * @param readConfig whether to apply the configuration (global and application-specific) */ - KToolBar( TQWidget *parent, const char *name = 0, bool honorStyle = false, bool readConfig = true ); + TDEToolBar( TQWidget *parent, const char *name = 0, bool honorStyle = false, bool readConfig = true ); /** * Constructor for non-XML-GUI applications. @@ -158,7 +158,7 @@ public: * @param honorStyle If true, then global settings for IconSize and IconText will be honored * @param readConfig whether to apply the configuration (global and application-specific) */ - KToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock /*= TQMainWindow::Top*/, bool newLine = false, + TDEToolBar( TQMainWindow *parentWindow, TQMainWindow::ToolBarDock dock /*= TQMainWindow::Top*/, bool newLine = false, const char *name = 0, bool honorStyle = false, bool readConfig = true ); /** @@ -176,20 +176,20 @@ public: * @param honorStyle If true, then global settings for IconSize and IconText will be honored * @param readConfig whether to apply the configuration (global and application-specific) */ - KToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine = false, + TDEToolBar( TQMainWindow *parentWindow, TQWidget *dock, bool newLine = false, const char *name = 0, bool honorStyle = false, bool readConfig = true ); /** * Destructor */ - virtual ~KToolBar(); + virtual ~TDEToolBar(); /** - * Insert a button (a KToolBarButton) with a pixmap. The + * Insert a button (a TDEToolBarButton) with a pixmap. The * pixmap is loaded by the button itself based on the global icon * settings. * - * You should connect to one or more signals in KToolBar: + * You should connect to one or more signals in TDEToolBar: * clicked() , pressed() , released() , or * highlighted() and if the button is a toggle button * ( setToggle() ) toggled() . Those signals have @p id @@ -207,7 +207,7 @@ public: */ int insertButton(const TQString& icon, int id, bool enabled = true, const TQString& text = TQString::null, int index=-1, - KInstance *_instance = KGlobal::instance()); + TDEInstance *_instance = TDEGlobal::instance()); /** * This is the same as above, but with specified signals and @@ -230,10 +230,10 @@ public: 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() ); + int index=-1, TDEInstance *_instance = TDEGlobal::instance() ); /** - * Inserts a button (a KToolBarButton) with the specified + * Inserts a button (a TDEToolBarButton) with the specified * pixmap. This pixmap will be used as the "active" one and the * disabled and default ones will be autogenerated. * @@ -241,7 +241,7 @@ public: * allows you to specify the icon name rather then the pixmap * itself. Specifying the icon name is much more flexible. * - * You should connect to one or more signals in KToolBar: + * You should connect to one or more signals in TDEToolBar: * clicked() , pressed() , released() , or * highlighted() and if the button is a toggle button * ( setToggle() ) toggled() . Those signals have @p id @@ -602,12 +602,12 @@ public: KComboBox * getCombo(int id); /** - * Returns a pointer to KToolBarLined with @p id. - * @return a pointer to KToolBarLined with @p id. + * Returns a pointer to TDEToolBarLined with @p id. + * @return a pointer to TDEToolBarLined with @p id. * * Example: * \code - * KLineEdit * lined = toolbar->getKToolBarLined(lined_id); + * KLineEdit * lined = toolbar->getTDEToolBarLined(lined_id); * \endcode * That way you can get access to other public methods * that KLineEdit provides. KLineEdit is the same thing @@ -616,18 +616,18 @@ public: KLineEdit * getLined (int id); /** - * Returns a pointer to KToolBarButton. + * Returns a pointer to TDEToolBarButton. * * Example: * \code - * KToolBarButton * button = toolbar->getButton(button_id); + * TDEToolBarButton * button = toolbar->getButton(button_id); * \endcode * That way you can get access to other public methods - * that KToolBarButton provides. + * that TDEToolBarButton provides. * * Using this method is not recommended. */ - KToolBarButton * getButton (int id); + TDEToolBarButton * getButton (int id); /** * Align item to the right. @@ -830,11 +830,11 @@ public: /** * Set the icon size to load. Usually you should not call - * this, the icon size is taken care of by KIconLoader + * this, the icon size is taken care of by TDEIconLoader * and globally configured. * By default, the toolbar will load icons of size 32 for main * toolbars and 22 for other toolbars - * @see KIconLoader. + * @see TDEIconLoader. * * @param size The size to use */ @@ -900,25 +900,25 @@ public: * precedence). */ void saveState(); // BIC: remove for KDE4? This doesn't appear to be used internally, - // and apps use saveMainWindowSettings in KMainWindow anyway. + // and apps use saveMainWindowSettings in TDEMainWindow anyway. /** * Save the toolbar settings to group @p configGroup in @p config. */ - void saveSettings(KConfig *config, const TQString &configGroup); + void saveSettings(TDEConfig *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 TQString &configGroup,bool force); + void applySettings(TDEConfig *config, const TQString &configGroup,bool force); // KDE4 merge with force=false - void applySettings(KConfig *config, const TQString &configGroup); + void applySettings(TDEConfig *config, const TQString &configGroup); /* * Tell the toolbar what XML-GUI resource file it should use to save * it's state. The state of the toolbar (position, size, etc) is - * saved in KConfig files if the application does not use XML-GUI + * saved in TDEConfig files if the application does not use XML-GUI * but if the app does, then it's saved the XML file. This function * allows this to happen. * @@ -1036,8 +1036,8 @@ signals: * Emitted when toolbar changes position, or when * an item is removed from toolbar. * - * If you subclass KMainWindow and reimplement - * KMainWindow::resizeEvent() be sure to connect to + * If you subclass TDEMainWindow and reimplement + * TDEMainWindow::resizeEvent() be sure to connect to * this signal. Note: You can connect this signal to a slot that * doesn't take parameter. */ @@ -1054,7 +1054,7 @@ signals: /** * This signal is emitted when the toolbar is getting deleted, - * and before ~KToolbar finishes (so it's still time to remove + * and before ~TDEToolbar finishes (so it's still time to remove * widgets from the toolbar). * Used by KWidgetAction. * @since 3.2 @@ -1090,7 +1090,7 @@ protected: void showEvent( TQShowEvent *e ); void resizeEvent( TQResizeEvent *e ); bool event( TQEvent *e ); - void applyAppearanceSettings(KConfig *config, const TQString &_configGroup, bool forceGlobal = false); + void applyAppearanceSettings(TDEConfig *config, const TQString &_configGroup, bool forceGlobal = false); TQString settingsGroup() const; private slots: @@ -1106,25 +1106,25 @@ private slots: private: void init( bool readConfig = true, bool honorStyle = false ); - void doConnections( KToolBarButton *button ); + void doConnections( TDEToolBarButton *button ); void insertWidgetInternal( TQWidget *w, int &index, int id ); void removeWidgetInternal( TQWidget *w ); void getAttributes( TQString &position, TQString &icontext, int &index ); int dockWindowIndex(); - KPopupMenu *contextMenu(); + TDEPopupMenu *contextMenu(); void doModeChange(); TQMap<TQWidget*, int > widget2id; typedef TQMap<int, TQWidget* > Id2WidgetMap; Id2WidgetMap id2widget; - KPopupMenu *context; + TDEPopupMenu *context; TQPtrList<TQWidget> widgets; TQTimer *layoutTimer; TQGuardedPtr<TQWidget> stretchableWidget, rightAligned; protected: virtual void virtual_hook( int id, void* data ); private: - KToolBarPrivate *d; + TDEToolBarPrivate *d; }; #endif diff --git a/tdeui/ktoolbarbutton.cpp b/tdeui/tdetoolbarbutton.cpp index a2d3c27fe..abf23ffc7 100644 --- a/tdeui/ktoolbarbutton.cpp +++ b/tdeui/tdetoolbarbutton.cpp @@ -24,8 +24,8 @@ #include <config.h> #include <string.h> -#include "ktoolbarbutton.h" -#include "ktoolbar.h" +#include "tdetoolbarbutton.h" +#include "tdetoolbar.h" #include <tqstyle.h> #include <tqimage.h> @@ -38,22 +38,22 @@ #include <tqpainter.h> #include <tqlayout.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kdebug.h> -#include <kglobal.h> -#include <kglobalsettings.h> +#include <tdeglobal.h> +#include <tdeglobalsettings.h> #include <kiconeffect.h> #include <kiconloader.h> // needed to get our instance -#include <kmainwindow.h> +#include <tdemainwindow.h> -template class TQIntDict<KToolBarButton>; +template class TQIntDict<TDEToolBarButton>; -class KToolBarButtonPrivate +class TDEToolBarButtonPrivate { public: - KToolBarButtonPrivate() + TDEToolBarButtonPrivate() { m_buttonDown = false; @@ -65,13 +65,13 @@ public: m_isActive = false; m_iconName = TQString::null; - m_iconText = KToolBar::IconOnly; + m_iconText = TDEToolBar::IconOnly; m_iconSize = 0; m_parent = 0; - m_instance = KGlobal::instance(); + m_instance = TDEGlobal::instance(); } - ~KToolBarButtonPrivate() + ~TDEToolBarButtonPrivate() { } @@ -86,39 +86,39 @@ public: TQString m_iconName; - KToolBar *m_parent; - KToolBar::IconText m_iconText; + TDEToolBar *m_parent; + TDEToolBar::IconText m_iconText; int m_iconSize; TQSize size; TQPoint m_mousePressPos; - KInstance *m_instance; + TDEInstance *m_instance; }; // This will construct a separator -KToolBarButton::KToolBarButton( TQWidget *_parent, const char *_name ) +TDEToolBarButton::TDEToolBarButton( TQWidget *_parent, const char *_name ) : TQToolButton( _parent , _name) { - d = new KToolBarButtonPrivate; + d = new TDEToolBarButtonPrivate; resize(6,6); hide(); d->m_isSeparator = true; } -KToolBarButton::KToolBarButton( const TQString& _icon, int _id, +TDEToolBarButton::TDEToolBarButton( const TQString& _icon, int _id, TQWidget *_parent, const char *_name, - const TQString &_txt, KInstance *_instance ) + const TQString &_txt, TDEInstance *_instance ) : TQToolButton( _parent, _name ), d( 0 ) { - d = new KToolBarButtonPrivate; + d = new TDEToolBarButtonPrivate; d->m_id = _id; TQToolButton::setTextLabel(_txt); d->m_instance = _instance; - d->m_parent = tqt_dynamic_cast<KToolBar*>(_parent); + d->m_parent = tqt_dynamic_cast<TDEToolBar*>(_parent); if (d->m_parent) { connect(d->m_parent, TQT_SIGNAL( modechange() ), this, TQT_SLOT( modeChange() )); @@ -141,17 +141,17 @@ KToolBarButton::KToolBarButton( const TQString& _icon, int _id, modeChange(); } -KToolBarButton::KToolBarButton( const TQPixmap& pixmap, int _id, +TDEToolBarButton::TDEToolBarButton( const TQPixmap& pixmap, int _id, TQWidget *_parent, const char *name, const TQString& txt) : TQToolButton( _parent, name ), d( 0 ) { - d = new KToolBarButtonPrivate; + d = new TDEToolBarButtonPrivate; d->m_id = _id; TQToolButton::setTextLabel(txt); - d->m_parent = tqt_dynamic_cast<KToolBar*>(_parent); + d->m_parent = tqt_dynamic_cast<TDEToolBar*>(_parent); if (d->m_parent) { connect(d->m_parent, TQT_SIGNAL( modechange() ), this, TQT_SLOT( modeChange() )); @@ -173,12 +173,12 @@ KToolBarButton::KToolBarButton( const TQPixmap& pixmap, int _id, modeChange(); } -KToolBarButton::~KToolBarButton() +TDEToolBarButton::~TDEToolBarButton() { delete d; d = 0; } -void KToolBarButton::modeChange() +void TDEToolBarButton::modeChange() { TQSize mysize; @@ -196,9 +196,9 @@ void KToolBarButton::modeChange() int pix_width = d->m_iconSize; if ( d->m_iconSize == 0 ) { if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar")) - pix_width = IconSize( KIcon::MainToolbar ); + pix_width = IconSize( TDEIcon::MainToolbar ); else - pix_width = IconSize( KIcon::Toolbar ); + pix_width = IconSize( TDEIcon::Toolbar ); } int pix_height = pix_width; @@ -206,10 +206,10 @@ void KToolBarButton::modeChange() int text_width = 0; TQToolTip::remove(this); - if (d->m_iconText != KToolBar::IconOnly) + if (d->m_iconText != TDEToolBar::IconOnly) { // okay, we have to deal with fonts. let's get our information now - TQFont tmp_font = KGlobalSettings::toolBarFont(); + TQFont tmp_font = TDEGlobalSettings::toolBarFont(); // now parse out our font sizes from our chosen font TQFontMetrics fm(tmp_font); @@ -226,19 +226,19 @@ void KToolBarButton::modeChange() switch (d->m_iconText) { - case KToolBar::IconOnly: + case TDEToolBar::IconOnly: mysize = TQSize(pix_width, pix_height); break; - case KToolBar::IconTextRight: + case TDEToolBar::IconTextRight: mysize = TQSize(pix_width + text_width + 4, pix_height); break; - case KToolBar::TextOnly: + case TDEToolBar::TextOnly: mysize = TQSize(text_width + 4, text_height); break; - case KToolBar::IconTextBottom: + case TDEToolBar::IconTextBottom: mysize = TQSize((text_width + 4 > pix_width) ? text_width + 4 : pix_width, pix_height + text_height); break; @@ -257,7 +257,7 @@ void KToolBarButton::modeChange() updateGeometry(); } -void KToolBarButton::setTextLabel( const TQString& text, bool tipToo) +void TDEToolBarButton::setTextLabel( const TQString& text, bool tipToo) { if (text.isNull()) return; @@ -270,13 +270,13 @@ void KToolBarButton::setTextLabel( const TQString& text, bool tipToo) update(); } -void KToolBarButton::setText( const TQString& text) +void TDEToolBarButton::setText( const TQString& text) { setTextLabel(text, true); modeChange(); } -void KToolBarButton::setIcon( const TQString &icon ) +void TDEToolBarButton::setIcon( const TQString &icon ) { d->m_iconName = icon; if (d->m_parent) @@ -284,19 +284,19 @@ void KToolBarButton::setIcon( const TQString &icon ) // TQObject::name() return "const char *" instead of TQString. if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar")) TQToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet( - d->m_iconName, KIcon::MainToolbar, d->m_iconSize )); + d->m_iconName, TDEIcon::MainToolbar, d->m_iconSize )); else TQToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet( - d->m_iconName, KIcon::Toolbar, d->m_iconSize )); + d->m_iconName, TDEIcon::Toolbar, d->m_iconSize )); } -void KToolBarButton::setIconSet( const TQIconSet &iconset ) +void TDEToolBarButton::setIconSet( const TQIconSet &iconset ) { TQToolButton::setIconSet( iconset ); } // remove? -void KToolBarButton::setPixmap( const TQPixmap &pixmap ) +void TDEToolBarButton::setPixmap( const TQPixmap &pixmap ) { if( pixmap.isNull()) // called by TQToolButton { @@ -308,69 +308,69 @@ void KToolBarButton::setPixmap( const TQPixmap &pixmap ) TQToolButton::setIconSet( set ); } -void KToolBarButton::setDefaultPixmap( const TQPixmap &pixmap ) +void TDEToolBarButton::setDefaultPixmap( const TQPixmap &pixmap ) { TQIconSet set = iconSet(); set.setPixmap( pixmap, TQIconSet::Automatic, TQIconSet::Normal ); TQToolButton::setIconSet( set ); } -void KToolBarButton::setDisabledPixmap( const TQPixmap &pixmap ) +void TDEToolBarButton::setDisabledPixmap( const TQPixmap &pixmap ) { TQIconSet set = iconSet(); set.setPixmap( pixmap, TQIconSet::Automatic, TQIconSet::Disabled ); TQToolButton::setIconSet( set ); } -void KToolBarButton::setDefaultIcon( const TQString& icon ) +void TDEToolBarButton::setDefaultIcon( const TQString& icon ) { TQIconSet set = iconSet(); TQPixmap pm; if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar")) - pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::MainToolbar, + pm = d->m_instance->iconLoader()->loadIcon( icon, TDEIcon::MainToolbar, d->m_iconSize ); else - pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::Toolbar, + pm = d->m_instance->iconLoader()->loadIcon( icon, TDEIcon::Toolbar, d->m_iconSize ); set.setPixmap( pm, TQIconSet::Automatic, TQIconSet::Normal ); TQToolButton::setIconSet( set ); } -void KToolBarButton::setDisabledIcon( const TQString& icon ) +void TDEToolBarButton::setDisabledIcon( const TQString& icon ) { TQIconSet set = iconSet(); TQPixmap pm; if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar")) - pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::MainToolbar, + pm = d->m_instance->iconLoader()->loadIcon( icon, TDEIcon::MainToolbar, d->m_iconSize ); else - pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::Toolbar, + pm = d->m_instance->iconLoader()->loadIcon( icon, TDEIcon::Toolbar, d->m_iconSize ); set.setPixmap( pm, TQIconSet::Automatic, TQIconSet::Disabled ); TQToolButton::setIconSet( set ); } -TQPopupMenu *KToolBarButton::popup() +TQPopupMenu *TDEToolBarButton::popup() { // obsolete // KDE4: remove me return TQToolButton::popup(); } -void KToolBarButton::setPopup(TQPopupMenu *p, bool) +void TDEToolBarButton::setPopup(TQPopupMenu *p, bool) { TQToolButton::setPopup(p); TQToolButton::setPopupDelay(-1); } -void KToolBarButton::setDelayedPopup (TQPopupMenu *p, bool) +void TDEToolBarButton::setDelayedPopup (TQPopupMenu *p, bool) { TQToolButton::setPopup(p); TQToolButton::setPopupDelay(TQApplication::startDragTime()); } -void KToolBarButton::leaveEvent(TQEvent *) +void TDEToolBarButton::leaveEvent(TQEvent *) { if( d->m_isRaised || d->m_isActive ) { @@ -382,7 +382,7 @@ void KToolBarButton::leaveEvent(TQEvent *) emit highlighted(d->m_id, false); } -void KToolBarButton::enterEvent(TQEvent *) +void TDEToolBarButton::enterEvent(TQEvent *) { if (d->m_highlight) { @@ -403,7 +403,7 @@ void KToolBarButton::enterEvent(TQEvent *) emit highlighted(d->m_id, true); } -bool KToolBarButton::eventFilter(TQObject *o, TQEvent *ev) +bool TDEToolBarButton::eventFilter(TQObject *o, TQEvent *ev) { if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this)) { @@ -421,7 +421,7 @@ bool KToolBarButton::eventFilter(TQObject *o, TQEvent *ev) { TQMouseEvent* mev = TQT_TQMOUSEEVENT(ev); if ((mev->pos() - d->m_mousePressPos).manhattanLength() - > KGlobalSettings::dndEventDelay()) + > TDEGlobalSettings::dndEventDelay()) { openPopup(); return true; @@ -446,7 +446,7 @@ bool KToolBarButton::eventFilter(TQObject *o, TQEvent *ev) return TQToolButton::eventFilter(o, ev); } -void KToolBarButton::mousePressEvent( TQMouseEvent * e ) +void TDEToolBarButton::mousePressEvent( TQMouseEvent * e ) { d->m_buttonDown = true; @@ -460,7 +460,7 @@ void KToolBarButton::mousePressEvent( TQMouseEvent * e ) TQToolButton::mousePressEvent(e); } -void KToolBarButton::mouseReleaseEvent( TQMouseEvent * e ) +void TDEToolBarButton::mouseReleaseEvent( TQMouseEvent * e ) { TQt::ButtonState state = TQt::ButtonState(e->button() | (e->state() & KeyButtonMask)); if ( e->button() == Qt::MidButton ) @@ -479,7 +479,7 @@ void KToolBarButton::mouseReleaseEvent( TQMouseEvent * e ) emit buttonClicked( d->m_id, state ); } -void KToolBarButton::drawButton( TQPainter *_painter ) +void TDEToolBarButton::drawButton( TQPainter *_painter ) { TQStyle::SFlags flags = TQStyle::Style_Default; TQStyle::SCFlags active = TQStyle::SC_None; @@ -498,12 +498,12 @@ void KToolBarButton::drawButton( TQPainter *_painter ) colorGroup(), flags, TQStyle::SC_ToolButton, active, TQStyleOption()); int dx, dy; - TQFont tmp_font(KGlobalSettings::toolBarFont()); + TQFont tmp_font(TDEGlobalSettings::toolBarFont()); TQFontMetrics fm(tmp_font); TQRect textRect; int textFlags = 0; - if (d->m_iconText == KToolBar::IconOnly) // icon only + if (d->m_iconText == TDEToolBar::IconOnly) // icon only { TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic, isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) : @@ -521,7 +521,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) _painter->drawPixmap( dx, dy, pixmap ); } } - else if (d->m_iconText == KToolBar::IconTextRight) // icon and text (if any) + else if (d->m_iconText == TDEToolBar::IconTextRight) // icon and text (if any) { TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic, isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) : @@ -555,7 +555,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) textRect = TQRect(dx, dy, width()-dx, height()); } } - else if (d->m_iconText == KToolBar::TextOnly) + else if (d->m_iconText == TDEToolBar::TextOnly) { if (!textLabel().isNull()) { @@ -570,7 +570,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) textRect = TQRect( dx, dy, fm.width(textLabel()), fm.lineSpacing() ); } } - else if (d->m_iconText == KToolBar::IconTextBottom) + else if (d->m_iconText == TDEToolBar::IconTextBottom) { TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic, isEnabled() ? (d->m_isActive ? TQIconSet::Active : TQIconSet::Normal) : @@ -606,11 +606,11 @@ void KToolBarButton::drawButton( TQPainter *_painter ) // Draw the text at the position given by textRect, and using textFlags if (!textLabel().isNull() && !textRect.isNull()) { - _painter->setFont(KGlobalSettings::toolBarFont()); + _painter->setFont(TDEGlobalSettings::toolBarFont()); if (!isEnabled()) _painter->setPen(palette().disabled().dark()); else if(d->m_isRaised) - _painter->setPen(KGlobalSettings::toolBarHighlightColor()); + _painter->setPen(TDEGlobalSettings::toolBarHighlightColor()); else _painter->setPen( colorGroup().buttonText() ); _painter->drawText(textRect, textFlags, textLabel()); @@ -629,7 +629,7 @@ void KToolBarButton::drawButton( TQPainter *_painter ) } } -void KToolBarButton::paletteChange(const TQPalette &) +void TDEToolBarButton::paletteChange(const TQPalette &) { if(!d->m_isSeparator) { @@ -638,12 +638,12 @@ void KToolBarButton::paletteChange(const TQPalette &) } } -bool KToolBarButton::event(TQEvent *e) +bool TDEToolBarButton::event(TQEvent *e) { if (e->type() == TQEvent::ParentFontChange || e->type() == TQEvent::ApplicationFontChange) { //If we use toolbar text, apply the settings again, to relayout... - if (d->m_iconText != KToolBar::IconOnly) + if (d->m_iconText != TDEToolBar::IconOnly) modeChange(); return true; } @@ -652,62 +652,62 @@ bool KToolBarButton::event(TQEvent *e) } -void KToolBarButton::showMenu() +void TDEToolBarButton::showMenu() { // obsolete // KDE4: remove me } -void KToolBarButton::slotDelayTimeout() +void TDEToolBarButton::slotDelayTimeout() { // obsolete // KDE4: remove me } -void KToolBarButton::slotClicked() +void TDEToolBarButton::slotClicked() { emit clicked( d->m_id ); // emit buttonClicked when the button was clicked while being in an extension popupmenu if ( d->m_parent && !d->m_parent->rect().contains( geometry().center() ) ) { - ButtonState state = KApplication::keyboardMouseState(); + ButtonState state = TDEApplication::keyboardMouseState(); if ( ( state & Qt::MouseButtonMask ) == Qt::NoButton ) state = ButtonState( Qt::LeftButton | state ); emit buttonClicked( d->m_id, state ); // Doesn't work with MidButton } } -void KToolBarButton::slotPressed() +void TDEToolBarButton::slotPressed() { emit pressed( d->m_id ); } -void KToolBarButton::slotReleased() +void TDEToolBarButton::slotReleased() { emit released( d->m_id ); } -void KToolBarButton::slotToggled() +void TDEToolBarButton::slotToggled() { emit toggled( d->m_id ); } -void KToolBarButton::setNoStyle(bool no_style) +void TDEToolBarButton::setNoStyle(bool no_style) { d->m_noStyle = no_style; modeChange(); - d->m_iconText = KToolBar::IconTextRight; + d->m_iconText = TDEToolBar::IconTextRight; repaint(false); } -void KToolBarButton::setRadio (bool f) +void TDEToolBarButton::setRadio (bool f) { if ( d ) d->m_isRadio = f; } -void KToolBarButton::on(bool flag) +void TDEToolBarButton::on(bool flag) { if(isToggleButton()) setOn(flag); @@ -719,13 +719,13 @@ void KToolBarButton::on(bool flag) repaint(); } -void KToolBarButton::toggle() +void TDEToolBarButton::toggle() { setOn(!isOn()); repaint(); } -void KToolBarButton::setToggle(bool flag) +void TDEToolBarButton::setToggle(bool flag) { setToggleButton(flag); if (flag) @@ -734,48 +734,48 @@ void KToolBarButton::setToggle(bool flag) disconnect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled())); } -TQSize KToolBarButton::sizeHint() const +TQSize TDEToolBarButton::sizeHint() const { return d->size; } -TQSize KToolBarButton::minimumSizeHint() const +TQSize TDEToolBarButton::minimumSizeHint() const { return d->size; } -TQSize KToolBarButton::minimumSize() const +TQSize TDEToolBarButton::minimumSize() const { return d->size; } -bool KToolBarButton::isRaised() const +bool TDEToolBarButton::isRaised() const { return d->m_isRaised; } -bool KToolBarButton::isActive() const +bool TDEToolBarButton::isActive() const { return d->m_isActive; } -int KToolBarButton::iconTextMode() const +int TDEToolBarButton::iconTextMode() const { return static_cast<int>( d->m_iconText ); } -int KToolBarButton::id() const +int TDEToolBarButton::id() const { return d->m_id; } -// KToolBarButtonList -KToolBarButtonList::KToolBarButtonList() +// TDEToolBarButtonList +TDEToolBarButtonList::TDEToolBarButtonList() { setAutoDelete(false); } -void KToolBarButton::virtual_hook( int, void* ) +void TDEToolBarButton::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -#include "ktoolbarbutton.moc" +#include "tdetoolbarbutton.moc" diff --git a/tdeui/ktoolbarbutton.h b/tdeui/tdetoolbarbutton.h index 340761bd0..c73c1145a 100644 --- a/tdeui/ktoolbarbutton.h +++ b/tdeui/tdetoolbarbutton.h @@ -27,21 +27,21 @@ #include <tqtoolbutton.h> #include <tqintdict.h> #include <tqstring.h> -#include <kglobal.h> +#include <tdeglobal.h> -class KToolBar; -class KToolBarButtonPrivate; -class KInstance; +class TDEToolBar; +class TDEToolBarButtonPrivate; +class TDEInstance; class TQEvent; class TQPopupMenu; class TQPainter; /** - * A toolbar button. This is used internally by KToolBar, use the - * KToolBar methods instead. + * A toolbar button. This is used internally by TDEToolBar, use the + * TDEToolBar methods instead. * @internal */ -class TDEUI_EXPORT KToolBarButton : public TQToolButton +class TDEUI_EXPORT TDEToolBarButton : public TQToolButton { Q_OBJECT @@ -59,9 +59,9 @@ public: * @param txt This button's text (in a tooltip or otherwise) * @param _instance the instance to use for this button */ - KToolBarButton(const TQString& icon, int id, TQWidget *parent, + TDEToolBarButton(const TQString& icon, int id, TQWidget *parent, const char *name=0L, const TQString &txt=TQString::null, - KInstance *_instance = KGlobal::instance()); + TDEInstance *_instance = TDEGlobal::instance()); /** * Construct a button with an existing pixmap. It is not @@ -74,7 +74,7 @@ public: * @param name This button's internal name * @param txt This button's text (in a tooltip or otherwise) */ - KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent, + TDEToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent, const char *name=0L, const TQString &txt=TQString::null); /** @@ -83,12 +83,12 @@ public: * @param parent This button's parent * @param name This button's internal name */ - KToolBarButton(TQWidget *parent=0L, const char *name=0L); + TDEToolBarButton(TQWidget *parent=0L, const char *name=0L); /** * Standard destructor */ - ~KToolBarButton(); + ~TDEToolBarButton(); #ifndef KDE_NO_COMPAT /** @@ -313,19 +313,19 @@ protected slots: protected: virtual void virtual_hook( int id, void* data ); private: - KToolBarButtonPrivate *d; + TDEToolBarButtonPrivate *d; }; /** -* List of KToolBarButton objects. +* List of TDEToolBarButton objects. * @internal * @version $Id$ */ -class TDEUI_EXPORT KToolBarButtonList : public TQIntDict<KToolBarButton> +class TDEUI_EXPORT TDEToolBarButtonList : public TQIntDict<TDEToolBarButton> { public: - KToolBarButtonList(); - ~KToolBarButtonList() {} + TDEToolBarButtonList(); + ~TDEToolBarButtonList() {} }; #endif diff --git a/tdeui/ktoolbarhandler.cpp b/tdeui/tdetoolbarhandler.cpp index bdeba7281..da621fadd 100644 --- a/tdeui/ktoolbarhandler.cpp +++ b/tdeui/tdetoolbarhandler.cpp @@ -16,14 +16,14 @@ Boston, MA 02110-1301, USA. */ -#include "ktoolbarhandler.h" +#include "tdetoolbarhandler.h" #include <tqpopupmenu.h> -#include <kapplication.h> -#include <ktoolbar.h> -#include <kmainwindow.h> -#include <klocale.h> -#include <kaction.h> +#include <tdeapplication.h> +#include <tdetoolbar.h> +#include <tdemainwindow.h> +#include <tdelocale.h> +#include <tdeaction.h> #include <assert.h> namespace @@ -44,14 +44,14 @@ namespace class BarActionBuilder { public: - BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, TQPtrList<KToolBar> &oldToolBarList ) + BarActionBuilder( TDEActionCollection *actionCollection, TDEMainWindow *mainWindow, TQPtrList<TDEToolBar> &oldToolBarList ) : m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false ) { TQPtrList<TQDockWindow> dockWindows = m_mainWindow->dockWindows(); TQPtrListIterator<TQDockWindow> dockWindowIt( dockWindows ); for ( ; dockWindowIt.current(); ++dockWindowIt ) { - KToolBar *toolBar = tqt_dynamic_cast<KToolBar *>( dockWindowIt.current() ); + TDEToolBar *toolBar = tqt_dynamic_cast<TDEToolBar *>( dockWindowIt.current() ); if ( !toolBar ) continue; @@ -67,30 +67,30 @@ namespace bool needsRebuild() const { return m_needsRebuild; } - TQPtrList<KAction> create() + TQPtrList<TDEAction> create() { if ( !m_needsRebuild ) - return TQPtrList<KAction>(); + return TQPtrList<TDEAction>(); - TQPtrListIterator<KToolBar> toolBarIt( m_toolBars ); + TQPtrListIterator<TDEToolBar> toolBarIt( m_toolBars ); for ( ; toolBarIt.current(); ++toolBarIt ) handleToolBar( toolBarIt.current() ); - TQPtrList<KAction> actions; + TQPtrList<TDEAction> actions; if ( m_toolBarActions.count() == 0 ) return actions; if ( m_toolBarActions.count() == 1 ) { - KToggleToolBarAction* action = static_cast<KToggleToolBarAction *>( m_toolBarActions.getFirst() ); + TDEToggleToolBarAction* action = static_cast<TDEToggleToolBarAction *>( m_toolBarActions.getFirst() ); action->setText( i18n( "Show Toolbar" ) ); action->setCheckedState( i18n( "Hide Toolbar" ) ); return m_toolBarActions; } - KActionMenu *menuAction = new KActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" ); + TDEActionMenu *menuAction = new TDEActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" ); - TQPtrListIterator<KAction> actionIt( m_toolBarActions ); + TQPtrListIterator<TDEAction> actionIt( m_toolBarActions ); for ( ; actionIt.current(); ++actionIt ) menuAction->insert( actionIt.current() ); @@ -98,12 +98,12 @@ namespace return actions; } - const TQPtrList<KToolBar> &toolBars() const { return m_toolBars; } + const TQPtrList<TDEToolBar> &toolBars() const { return m_toolBars; } private: - void handleToolBar( KToolBar *toolBar ) + void handleToolBar( TDEToolBar *toolBar ) { - KToggleToolBarAction *action = new KToggleToolBarAction( + TDEToggleToolBarAction *action = new TDEToggleToolBarAction( toolBar, toolBar->label(), m_actionCollection, @@ -112,11 +112,11 @@ namespace m_toolBarActions.append( action ); } - KActionCollection *m_actionCollection; - KMainWindow *m_mainWindow; + TDEActionCollection *m_actionCollection; + TDEMainWindow *m_mainWindow; - TQPtrList<KToolBar> m_toolBars; - TQPtrList<KAction> m_toolBarActions; + TQPtrList<TDEToolBar> m_toolBars; + TQPtrList<TDEAction> m_toolBarActions; bool m_needsRebuild : 1; }; @@ -124,13 +124,13 @@ namespace using namespace KDEPrivate; -ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, const char *name ) +ToolBarHandler::ToolBarHandler( TDEMainWindow *mainWindow, const char *name ) : TQObject( mainWindow, name ), KXMLGUIClient( mainWindow ) { init( mainWindow ); } -ToolBarHandler::ToolBarHandler( KMainWindow *mainWindow, TQObject *parent, const char *name ) +ToolBarHandler::ToolBarHandler( TDEMainWindow *mainWindow, TQObject *parent, const char *name ) : TQObject( parent, name ), KXMLGUIClient( mainWindow ) { init( mainWindow ); @@ -142,7 +142,7 @@ ToolBarHandler::~ToolBarHandler() m_actions.clear(); } -KAction *ToolBarHandler::toolBarMenuAction() +TDEAction *ToolBarHandler::toolBarMenuAction() { assert( m_actions.count() == 1 ); return m_actions.getFirst(); @@ -167,7 +167,7 @@ void ToolBarHandler::setupActions() m_actions = builder.create(); /* - for ( TQPtrListIterator<KToolBar> toolBarIt( m_toolBars ); + for ( TQPtrListIterator<TDEToolBar> toolBarIt( m_toolBars ); toolBarIt.current(); ++toolBarIt ) toolBarIt.current()->disconnect( this ); */ @@ -175,13 +175,13 @@ void ToolBarHandler::setupActions() m_toolBars = builder.toolBars(); /* - for ( TQPtrListIterator<KToolBar> toolBarIt( m_toolBars ); + for ( TQPtrListIterator<TDEToolBar> toolBarIt( m_toolBars ); toolBarIt.current(); ++toolBarIt ) connect( toolBarIt.current(), TQT_SIGNAL( destroyed() ), this, TQT_SLOT( setupActions() ) ); */ - if (kapp && kapp->authorizeKAction("options_show_toolbar")) + if (kapp && kapp->authorizeTDEAction("options_show_toolbar")) plugActionList( actionListName, m_actions ); connectToActionContainers(); @@ -193,7 +193,7 @@ void ToolBarHandler::clientAdded( KXMLGUIClient *client ) setupActions(); } -void ToolBarHandler::init( KMainWindow *mainWindow ) +void ToolBarHandler::init( TDEMainWindow *mainWindow ) { d = 0; m_mainWindow = mainWindow; @@ -218,12 +218,12 @@ void ToolBarHandler::init( KMainWindow *mainWindow ) void ToolBarHandler::connectToActionContainers() { - TQPtrListIterator<KAction> actionIt( m_actions ); + TQPtrListIterator<TDEAction> actionIt( m_actions ); for ( ; actionIt.current(); ++actionIt ) connectToActionContainer( actionIt.current() ); } -void ToolBarHandler::connectToActionContainer( KAction *action ) +void ToolBarHandler::connectToActionContainer( TDEAction *action ) { uint containerCount = action->containerCount(); for ( uint i = 0; i < containerCount; ++i ) @@ -240,7 +240,7 @@ void ToolBarHandler::connectToActionContainer( TQWidget *container ) this, TQT_SLOT( setupActions() ) ); } -#include "ktoolbarhandler.moc" +#include "tdetoolbarhandler.moc" /* vim: et sw=4 ts=4 */ diff --git a/tdeui/ktoolbarhandler.h b/tdeui/tdetoolbarhandler.h index e6336967f..729129a67 100644 --- a/tdeui/ktoolbarhandler.h +++ b/tdeui/tdetoolbarhandler.h @@ -23,8 +23,8 @@ #include <tqguardedptr.h> #include <kxmlguiclient.h> -class KMainWindow; -class KToolBar; +class TDEMainWindow; +class TDEToolBar; namespace KDEPrivate { @@ -35,11 +35,11 @@ class ToolBarHandler : public TQObject, { Q_OBJECT public: - ToolBarHandler( KMainWindow *mainWindow, const char *name = 0 ); - ToolBarHandler( KMainWindow *mainWindow, TQObject *parent, const char *name = 0 ); + ToolBarHandler( TDEMainWindow *mainWindow, const char *name = 0 ); + ToolBarHandler( TDEMainWindow *mainWindow, TQObject *parent, const char *name = 0 ); virtual ~ToolBarHandler(); - KAction *toolBarMenuAction(); + TDEAction *toolBarMenuAction(); public slots: void setupActions(); @@ -48,17 +48,17 @@ private slots: void clientAdded( KXMLGUIClient *client ); private: - void init( KMainWindow *mainWindow ); + void init( TDEMainWindow *mainWindow ); void connectToActionContainers(); - void connectToActionContainer( KAction *action ); + void connectToActionContainer( TDEAction *action ); void connectToActionContainer( TQWidget *container ); struct Data; Data *d; - TQGuardedPtr<KMainWindow> m_mainWindow; - TQPtrList<KAction> m_actions; - TQPtrList<KToolBar> m_toolBars; + TQGuardedPtr<TDEMainWindow> m_mainWindow; + TQPtrList<TDEAction> m_actions; + TQPtrList<TDEToolBar> m_toolBars; }; } // namespace KDEPrivate diff --git a/tdeui/ktoolbarlabelaction.cpp b/tdeui/tdetoolbarlabelaction.cpp index b86906e57..dcac8fc8b 100644 --- a/tdeui/ktoolbarlabelaction.cpp +++ b/tdeui/tdetoolbarlabelaction.cpp @@ -16,15 +16,15 @@ Boston, MA 02110-1301, USA. */ -#include "ktoolbarlabelaction.h" +#include "tdetoolbarlabelaction.h" #include <tqlabel.h> #include <tqapplication.h> -class KToolBarLabelAction::KToolBarLabelActionPrivate +class TDEToolBarLabelAction::TDEToolBarLabelActionPrivate { public: - KToolBarLabelActionPrivate() + TDEToolBarLabelActionPrivate() : m_label(0) { } @@ -32,53 +32,53 @@ public: }; -KToolBarLabelAction::KToolBarLabelAction(const TQString &text, - const KShortcut &cut, +TDEToolBarLabelAction::TDEToolBarLabelAction(const TQString &text, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection *parent, + TDEActionCollection *parent, const char *name) : KWidgetAction(new TQLabel(text, 0, "kde toolbar widget"), text, cut, receiver, slot, parent, name), - d(new KToolBarLabelActionPrivate) + d(new TDEToolBarLabelActionPrivate) { init(); } -KToolBarLabelAction::KToolBarLabelAction(TQWidget* buddy, +TDEToolBarLabelAction::TDEToolBarLabelAction(TQWidget* buddy, const TQString &text, - const KShortcut &cut, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection *parent, + TDEActionCollection *parent, const char *name) : KWidgetAction(new TQLabel(buddy, text, 0, "kde toolbar widget"), text, cut, receiver, slot, parent, name), - d(new KToolBarLabelActionPrivate) + d(new TDEToolBarLabelActionPrivate) { init(); } -KToolBarLabelAction::KToolBarLabelAction(TQLabel* label, - const KShortcut &cut, +TDEToolBarLabelAction::TDEToolBarLabelAction(TQLabel* label, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection* parent, + TDEActionCollection* parent, const char *name) : KWidgetAction(label, label->text(), cut, receiver, slot, parent, name), - d(new KToolBarLabelActionPrivate) + d(new TDEToolBarLabelActionPrivate) { Q_ASSERT(TQString::fromLatin1("kde toolbar widget") == label->name()); init(); } -KToolBarLabelAction::~KToolBarLabelAction() +TDEToolBarLabelAction::~TDEToolBarLabelAction() { delete d; d = 0; } -void KToolBarLabelAction::init() +void TDEToolBarLabelAction::init() { d->m_label = static_cast<TQLabel*>(widget()); /* these lines were copied from Konqueror's KonqDraggableLabel class in @@ -90,28 +90,28 @@ void KToolBarLabelAction::init() d->m_label->adjustSize(); } -void KToolBarLabelAction::setText(const TQString& text) +void TDEToolBarLabelAction::setText(const TQString& text) { KWidgetAction::setText(text); d->m_label->setText(text); } -void KToolBarLabelAction::setBuddy(TQWidget* buddy) +void TDEToolBarLabelAction::setBuddy(TQWidget* buddy) { d->m_label->setBuddy(buddy); } -TQWidget* KToolBarLabelAction::buddy() const +TQWidget* TDEToolBarLabelAction::buddy() const { return d->m_label->buddy(); } -TQLabel* KToolBarLabelAction::label() const +TQLabel* TDEToolBarLabelAction::label() const { return d->m_label; } -void KToolBarLabelAction::virtual_hook(int, void*) +void TDEToolBarLabelAction::virtual_hook(int, void*) { } diff --git a/tdeui/ktoolbarlabelaction.h b/tdeui/tdetoolbarlabelaction.h index 2cf7c99be..0bf893cc2 100644 --- a/tdeui/ktoolbarlabelaction.h +++ b/tdeui/tdetoolbarlabelaction.h @@ -18,14 +18,14 @@ #ifndef KTOOLBARLABELACTION_H #define KTOOLBARLABELACTION_H -#include <kactionclasses.h> +#include <tdeactionclasses.h> class TQLabel; /** * @short Class to display a label in a toolbar. * - * KToolBarLabelAction is a convenience class for displaying a label in a + * TDEToolBarLabelAction is a convenience class for displaying a label in a * toolbar. * * It provides easy access to the label's #setBuddy(TQWidget*) and #buddy() @@ -38,7 +38,7 @@ class TQLabel; * = new KWidgetAction(findCombo, i18n("F&ind Combo"), Qt::Key_F6, this, * TQT_SLOT(slotFocus()), actionCollection(), "find_combo"); * - * new KToolBarLabelAction(findCombo, i18n("F&ind "), 0, this, + * new TDEToolBarLabelAction(findCombo, i18n("F&ind "), 0, this, * TQT_SLOT(slotFocus()), actionCollection(), * "find_label"); * @@ -46,7 +46,7 @@ class TQLabel; * * @author Felix Berger <felixberger@beldesign.de> */ -class TDEUI_EXPORT KToolBarLabelAction : public KWidgetAction +class TDEUI_EXPORT TDEToolBarLabelAction : public KWidgetAction { public: /** @@ -59,10 +59,10 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarLabelAction(const TQString &text, - const KShortcut &cut, + TDEToolBarLabelAction(const TQString &text, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection *parent, const char *name); + TDEActionCollection *parent, const char *name); /** * Constructs a toolbar label setting a buddy for the label. * @@ -75,10 +75,10 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarLabelAction(TQWidget* buddy, const TQString &text, - const KShortcut &cut, + TDEToolBarLabelAction(TQWidget* buddy, const TQString &text, + const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection *parent, const char *name); + TDEActionCollection *parent, const char *name); /** * Constructs a toolbar label for a label. * @@ -98,11 +98,11 @@ public: * @param parent This action's parent. * @param name An internal name for this action. */ - KToolBarLabelAction(TQLabel* label, const KShortcut &cut, + TDEToolBarLabelAction(TQLabel* label, const TDEShortcut &cut, const TQObject *receiver, const char *slot, - KActionCollection* parent, const char *name); + TDEActionCollection* parent, const char *name); - virtual ~KToolBarLabelAction(); + virtual ~TDEToolBarLabelAction(); /** * Reimplemented to update both the action's text and the label's text. */ @@ -128,8 +128,8 @@ protected: virtual void virtual_hook(int id, void* data); private: - class KToolBarLabelActionPrivate; - KToolBarLabelActionPrivate *d; + class TDEToolBarLabelActionPrivate; + TDEToolBarLabelActionPrivate *d; void init(); }; diff --git a/tdeui/ktoolbarradiogroup.cpp b/tdeui/tdetoolbarradiogroup.cpp index ab8e50e08..937354357 100644 --- a/tdeui/ktoolbarradiogroup.cpp +++ b/tdeui/tdetoolbarradiogroup.cpp @@ -22,36 +22,36 @@ #include <config.h> -#include "ktoolbarradiogroup.h" -#include "ktoolbar.h" -#include "ktoolbarbutton.h" +#include "tdetoolbarradiogroup.h" +#include "tdetoolbar.h" +#include "tdetoolbarbutton.h" /************************************************************************* - * KToolBarRadioGroup * + * TDEToolBarRadioGroup * *************************************************************************/ -KToolBarRadioGroup::KToolBarRadioGroup (KToolBar *_parent, const char *_name) +TDEToolBarRadioGroup::TDEToolBarRadioGroup (TDEToolBar *_parent, const char *_name) : TQObject(_parent, _name) { - buttons = new KToolBarButtonList(); + buttons = new TDEToolBarButtonList(); tb = _parent; connect (tb, TQT_SIGNAL(toggled(int)), this, TQT_SLOT(slotToggled(int))); } -KToolBarRadioGroup::~KToolBarRadioGroup() +TDEToolBarRadioGroup::~TDEToolBarRadioGroup() { delete buttons; } -void KToolBarRadioGroup::addButton (int id) +void TDEToolBarRadioGroup::addButton (int id) { - KToolBarButton *b = tb->getButton( id ); + TDEToolBarButton *b = tb->getButton( id ); b->setRadio( true ); buttons->insert( id, b ); } -void KToolBarRadioGroup::removeButton (int id) +void TDEToolBarRadioGroup::removeButton (int id) { if (!buttons->find(id)) return; @@ -59,11 +59,11 @@ void KToolBarRadioGroup::removeButton (int id) buttons->remove(id); } -void KToolBarRadioGroup::slotToggled(int id) +void TDEToolBarRadioGroup::slotToggled(int id) { if (buttons->find(id) && buttons->find(id)->isOn()) { - TQIntDictIterator<KToolBarButton> it(*buttons); + TQIntDictIterator<TDEToolBarButton> it(*buttons); while (it.current()) { if (it.currentKey() != id) @@ -73,5 +73,5 @@ void KToolBarRadioGroup::slotToggled(int id) } } -#include "ktoolbarradiogroup.moc" +#include "tdetoolbarradiogroup.moc" diff --git a/tdeui/ktoolbarradiogroup.h b/tdeui/tdetoolbarradiogroup.h index 6b2cc5140..de567ae62 100644 --- a/tdeui/ktoolbarradiogroup.h +++ b/tdeui/tdetoolbarradiogroup.h @@ -26,19 +26,19 @@ #include <tdelibs_export.h> -class KToolBar; -class KToolBarButtonList; -class KToolBarRadioGroupPrivate; +class TDEToolBar; +class TDEToolBarButtonList; +class TDEToolBarRadioGroupPrivate; /************************************************************************* - * KToolBarRadioGroup * + * TDEToolBarRadioGroup * *************************************************************************/ /** * @short Class for group of radio butons in toolbar. * - * KToolBarRadioGroup is class for group of radio butons in toolbar. + * TDEToolBarRadioGroup is class for group of radio butons in toolbar. * Take toggle buttons which you already inserted into toolbar, - * create KToolBarRadioGroup instance and add them here. + * create TDEToolBarRadioGroup instance and add them here. * All buttons will emit signals toggled (bool) (or you can * use sitgnal toggled (int id) from toolbar). When one button is set * down, all others are unset. All buttons emit signals - those who @@ -46,19 +46,19 @@ class KToolBarRadioGroupPrivate; * * @author Sven Radej <radej@kde.org> */ -class TDEUI_EXPORT KToolBarRadioGroup : public TQObject +class TDEUI_EXPORT TDEToolBarRadioGroup : public TQObject { Q_OBJECT public: /** - * Constructor. Parent must be KToolBar . + * Constructor. Parent must be TDEToolBar . */ - KToolBarRadioGroup (KToolBar *_parent, const char *_name=0); + TDEToolBarRadioGroup (TDEToolBar *_parent, const char *_name=0); /** * Destructor. */ - ~KToolBarRadioGroup (); + ~TDEToolBarRadioGroup (); /** * Adds button to group. Button cannot be unset by mouse clicks (you @@ -79,10 +79,10 @@ public slots: void slotToggled (int); private: - KToolBarButtonList *buttons; - KToolBar *tb; + TDEToolBarButtonList *buttons; + TDEToolBar *tb; - KToolBarRadioGroupPrivate *d; + TDEToolBarRadioGroupPrivate *d; }; #endif diff --git a/tdeui/tests/CMakeLists.txt b/tdeui/tests/CMakeLists.txt index 9b3cc6568..719902623 100644 --- a/tdeui/tests/CMakeLists.txt +++ b/tdeui/tests/CMakeLists.txt @@ -27,21 +27,21 @@ set( test_PROGS kcolortest kcolordlgtest kcomboboxtest kcompletiontest kdatepicktest kdatewidgettest kdialogbasetest kdockwidgetdemo kdockwidgettest - kdualcolortest keditlistboxtest kfontdialogtest + kdualcolortest keditlistboxtest tdefontdialogtest kgradienttest khashtest kdesattest kledtest klineedittest klineeditdlgtest kmessageboxtest knuminputtest kpalettetest - kpopuptest kprogresstest krulertest kseparatortest + tdepopuptest kprogresstest krulertest kseparatortest kstatusbartest ktabctltest kunbalancedgrdtest twindowtest kwizardtest itemcontainertest kpanelmenutest kedittest - kxmlguitest kaccelgentest ksystemtraytest klistviewtest - ktextedittest kmainwindowtest kmainwindowrestoretest - kactiontest kdatetimewidgettest ktimewidgettest - kspelltest kinputdialogtest ktabwidgettest kwordwraptest + kxmlguitest tdeaccelgentest ksystemtraytest tdelistviewtest + ktextedittest tdemainwindowtest tdemainwindowrestoretest + tdeactiontest kdatetimewidgettest ktimewidgettest + tdespelltest kinputdialogtest ktabwidgettest kwordwraptest kdocktest qxembedtest ksqueezedtextlabeltest - kpixmapregionselectordialogtest kjanuswidgettest ktoolbarlabelactiontest + kpixmapregionselectordialogtest kjanuswidgettest tdetoolbarlabelactiontest ) foreach( PROG ${test_PROGS} ) diff --git a/tdeui/tests/Makefile.am b/tdeui/tests/Makefile.am index a7c0cb26d..361d437a9 100644 --- a/tdeui/tests/Makefile.am +++ b/tdeui/tests/Makefile.am @@ -26,21 +26,21 @@ check_PROGRAMS = kaboutdialogtest kblendtest kbuttonboxtest kcharselecttest \ kcolortest kcolordlgtest kcomboboxtest kcompletiontest \ kdatepicktest kdatewidgettest kdialogbasetest \ kdockwidgetdemo kdockwidgettest \ - kdualcolortest keditlistboxtest kfontdialogtest \ + kdualcolortest keditlistboxtest tdefontdialogtest \ kgradienttest khashtest kdesattest\ kledtest klineedittest klineeditdlgtest \ kmessageboxtest knuminputtest \ kpalettetest \ - kpopuptest kprogresstest krulertest kseparatortest \ + tdepopuptest kprogresstest krulertest kseparatortest \ kstatusbartest ktabctltest \ kunbalancedgrdtest twindowtest kwizardtest \ itemcontainertest kpanelmenutest kedittest \ - kxmlguitest kaccelgentest ksystemtraytest klistviewtest \ - ktextedittest kmainwindowtest kmainwindowrestoretest \ - kactiontest kdatetimewidgettest ktimewidgettest \ - kspelltest kinputdialogtest ktabwidgettest kwordwraptest \ + kxmlguitest tdeaccelgentest ksystemtraytest tdelistviewtest \ + ktextedittest tdemainwindowtest tdemainwindowrestoretest \ + tdeactiontest kdatetimewidgettest ktimewidgettest \ + tdespelltest kinputdialogtest ktabwidgettest kwordwraptest \ kdocktest qxembedtest ksqueezedtextlabeltest \ - kpixmapregionselectordialogtest kjanuswidgettest ktoolbarlabelactiontest + kpixmapregionselectordialogtest kjanuswidgettest tdetoolbarlabelactiontest METASOURCES = AUTO @@ -62,7 +62,7 @@ kdialogbasetest_SOURCES = kdialogbasetest.cpp kdualcolortest_SOURCES = kdualcolortest.cpp kedittest_SOURCES = kedittest.cpp keditlistboxtest_SOURCES = keditlistboxtest.cpp -kfontdialogtest_SOURCES = kfontdialogtest.cpp +tdefontdialogtest_SOURCES = tdefontdialogtest.cpp kgradienttest_SOURCES = kgradienttest.cpp khashtest_SOURCES = khashtest.cpp kledtest_SOURCES = kledtest.cpp @@ -71,7 +71,7 @@ klineeditdlgtest_SOURCES = klineeditdlgtest.cpp kmessageboxtest_SOURCES = kmessageboxtest.cpp knuminputtest_SOURCES = knuminputtest.cpp kpalettetest_SOURCES = kpalettetest.cpp -kpopuptest_SOURCES = kpopuptest.cpp +tdepopuptest_SOURCES = tdepopuptest.cpp kprogresstest_SOURCES = kprogresstest.cpp krulertest_SOURCES = krulertest.cpp kseparatortest_SOURCES = kseparatortest.cpp @@ -86,14 +86,14 @@ kpanelmenutest_SOURCES = kpanelmenutest.cpp kdockwidgetdemo_SOURCES = kdockwidgetdemo.cpp kdockwidgettest_SOURCES = kdockwidgettest.cpp kxmlguitest_SOURCES = kxmlguitest.cpp -kaccelgentest_SOURCES = kaccelgentest.cpp +tdeaccelgentest_SOURCES = tdeaccelgentest.cpp ksystemtraytest_SOURCES = ksystemtraytest.cpp -klistviewtest_SOURCES = klistviewtest.cpp +tdelistviewtest_SOURCES = tdelistviewtest.cpp ktextedittest_SOURCES = ktextedittest.cpp -kmainwindowtest_SOURCES = kmainwindowtest.cpp -kmainwindowrestoretest_SOURCES = kmainwindowrestoretest.cpp -kactiontest_SOURCES = kactiontest.cpp -kspelltest_SOURCES = kspelltest.cpp +tdemainwindowtest_SOURCES = tdemainwindowtest.cpp +tdemainwindowrestoretest_SOURCES = tdemainwindowrestoretest.cpp +tdeactiontest_SOURCES = tdeactiontest.cpp +tdespelltest_SOURCES = tdespelltest.cpp kinputdialogtest_SOURCES = kinputdialogtest.cpp ktabwidgettest_SOURCES = ktabwidgettest.cpp kwordwraptest_SOURCES = kwordwraptest.cpp @@ -102,4 +102,4 @@ qxembedtest_SOURCES=qxembedtest.cpp ksqueezedtextlabeltest_SOURCES = ksqueezedtextlabeltest.cpp kjanuswidgettest_SOURCES = kjanuswidgettest.cpp kpixmapregionselectordialogtest_SOURCES = kpixmapregionselectordialogtest.cpp -ktoolbarlabelactiontest_SOURCES = ktoolbarlabelactiontest.cpp +tdetoolbarlabelactiontest_SOURCES = tdetoolbarlabelactiontest.cpp diff --git a/tdeui/tests/itemcontainertest.cpp b/tdeui/tests/itemcontainertest.cpp index 1767bec5f..c3b6d1ddc 100644 --- a/tdeui/tests/itemcontainertest.cpp +++ b/tdeui/tests/itemcontainertest.cpp @@ -1,5 +1,5 @@ /* -* Tests the item container widgets KIconView, KListView, KListBox +* Tests the item container widgets TDEIconView, TDEListView, TDEListBox * * Copyright (c) 2000 by Michael Reiher <michael.reiher@gmx.de> * @@ -16,12 +16,12 @@ #include <tqcheckbox.h> #include <tqlabel.h> -#include <kapplication.h> -#include <kglobal.h> -#include <kconfig.h> +#include <tdeapplication.h> +#include <tdeglobal.h> +#include <tdeconfig.h> #include <kiconview.h> -#include <klistview.h> -#include <klistbox.h> +#include <tdelistview.h> +#include <tdelistbox.h> #include "itemcontainertest.h" @@ -54,7 +54,7 @@ static const char * item_xpm[] = { " ...... "}; -KApplication *app; +TDEApplication *app; TopLevel::TopLevel(TQWidget *parent, const char *name) : TQWidget(parent, name) @@ -88,25 +88,25 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) m_plblItem = new TQLabel( gbItem ); vBox->addWidget( gbItem ); - TQButtonGroup* bgListView = new TQButtonGroup( 1, Qt::Horizontal, "KListView", this); + TQButtonGroup* bgListView = new TQButtonGroup( 1, Qt::Horizontal, "TDEListView", this); TQCheckBox* cbListView = new TQCheckBox("Single Column", bgListView); vBox->addWidget( bgListView ); connect( cbListView, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotToggleSingleColumn( bool ) ) ); - KGlobal::config()->reparseConfiguration(); + TDEGlobal::config()->reparseConfiguration(); //Create IconView - TQGroupBox* gbIconView = new TQGroupBox( 1, Qt::Horizontal, "KIconView", this); - m_pIconView = new KIconView( gbIconView ); + TQGroupBox* gbIconView = new TQGroupBox( 1, Qt::Horizontal, "TDEIconView", this); + m_pIconView = new TDEIconView( gbIconView ); hBox->addWidget( gbIconView ); hBox->addSpacing( 5 ); connect( m_pIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ), this, TQT_SLOT( slotIconViewExec( TQIconViewItem* ) ) ); //Create ListView - TQGroupBox* gbListView = new TQGroupBox( 1, Qt::Horizontal, "KListView", this); - m_pListView = new KListView( gbListView ); + TQGroupBox* gbListView = new TQGroupBox( 1, Qt::Horizontal, "TDEListView", this); + m_pListView = new TDEListView( gbListView ); m_pListView->addColumn("Item"); m_pListView->addColumn("Text"); hBox->addWidget( gbListView ); @@ -115,8 +115,8 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) this, TQT_SLOT( slotListViewExec( TQListViewItem* ) ) ); //Create ListBox - TQGroupBox* gbListBox = new TQGroupBox( 1, Qt::Horizontal, "KListBox", this); - m_pListBox = new KListBox( gbListBox ); + TQGroupBox* gbListBox = new TQGroupBox( 1, Qt::Horizontal, "TDEListBox", this); + m_pListBox = new TDEListBox( gbListBox ); hBox->addWidget( gbListBox ); connect( m_pListBox, TQT_SIGNAL( executed( TQListBoxItem* ) ), this, TQT_SLOT( slotListBoxExec( TQListBoxItem* ) ) ); @@ -151,24 +151,24 @@ void TopLevel::slotSwitchMode( int id ) switch( id ) { case TopLevel::NoSelection: - m_pIconView->setSelectionMode( KIconView::NoSelection ); + m_pIconView->setSelectionMode( TDEIconView::NoSelection ); m_pListView->setSelectionMode( TQListView::NoSelection ); - m_pListBox->setSelectionMode( KListBox::NoSelection ); + m_pListBox->setSelectionMode( TDEListBox::NoSelection ); break; case TopLevel::Single: - m_pIconView->setSelectionMode( KIconView::Single ); + m_pIconView->setSelectionMode( TDEIconView::Single ); m_pListView->setSelectionMode( TQListView::Single ); - m_pListBox->setSelectionMode( KListBox::Single ); + m_pListBox->setSelectionMode( TDEListBox::Single ); break; case TopLevel::Multi: - m_pIconView->setSelectionMode( KIconView::Multi ); + m_pIconView->setSelectionMode( TDEIconView::Multi ); m_pListView->setSelectionMode( TQListView::Multi ); - m_pListBox->setSelectionMode( KListBox::Multi ); + m_pListBox->setSelectionMode( TDEListBox::Multi ); break; case TopLevel::Extended: - m_pIconView->setSelectionMode( KIconView::Extended ); + m_pIconView->setSelectionMode( TDEIconView::Extended ); m_pListView->setSelectionMode( TQListView::Extended ); - m_pListBox->setSelectionMode( KListBox::Extended ); + m_pListBox->setSelectionMode( TDEListBox::Extended ); break; default: Q_ASSERT(0); @@ -177,7 +177,7 @@ void TopLevel::slotSwitchMode( int id ) void TopLevel::slotIconViewExec( TQIconViewItem* item ) { - m_plblWidget->setText("KIconView"); + m_plblWidget->setText("TDEIconView"); m_plblSignal->setText("executed"); if( item ) m_plblItem->setText( item->text() ); @@ -187,7 +187,7 @@ void TopLevel::slotIconViewExec( TQIconViewItem* item ) void TopLevel::slotListViewExec( TQListViewItem* item ) { - m_plblWidget->setText("KListView"); + m_plblWidget->setText("TDEListView"); m_plblSignal->setText("executed"); if( item ) m_plblItem->setText( item->text(0) ); @@ -197,7 +197,7 @@ void TopLevel::slotListViewExec( TQListViewItem* item ) void TopLevel::slotListBoxExec( TQListBoxItem* item ) { - m_plblWidget->setText("KListBox"); + m_plblWidget->setText("TDEListBox"); m_plblSignal->setText("executed"); if( item ) m_plblItem->setText( item->text() ); @@ -212,7 +212,7 @@ void TopLevel::slotToggleSingleColumn( bool b ) int main( int argc, char ** argv ) { - app = new KApplication ( argc, argv, "ItemContainerTest" ); + app = new TDEApplication ( argc, argv, "ItemContainerTest" ); TopLevel *toplevel = new TopLevel(0, "itemcontainertest"); diff --git a/tdeui/tests/itemcontainertest.h b/tdeui/tests/itemcontainertest.h index 86a356ab3..cb6cc3a51 100644 --- a/tdeui/tests/itemcontainertest.h +++ b/tdeui/tests/itemcontainertest.h @@ -3,9 +3,9 @@ #include <tqwidget.h> -class KIconView; -class KListView; -class KListBox; +class TDEIconView; +class TDEListView; +class TDEListBox; class TQButtonGroup; class TQLabel; @@ -31,9 +31,9 @@ public slots: void slotClicked( TQIconViewItem* ) { tqDebug("CLICK");} void slotDoubleClicked( TQIconViewItem* ) { tqDebug("DOUBLE CLICK");} protected: - KIconView* m_pIconView; - KListView* m_pListView; - KListBox* m_pListBox; + TDEIconView* m_pIconView; + TDEListView* m_pListView; + TDEListBox* m_pListBox; TQButtonGroup* m_pbgView; TQButtonGroup* m_pbgMode; diff --git a/tdeui/tests/kaboutdialogtest.cpp b/tdeui/tests/kaboutdialogtest.cpp index 6103c6ba4..e0680b52f 100644 --- a/tdeui/tests/kaboutdialogtest.cpp +++ b/tdeui/tests/kaboutdialogtest.cpp @@ -8,19 +8,19 @@ * $Revision$ */ -#include "kaboutdialog.h" +#include "tdeaboutdialog.h" // #include <kimgio.h> #include <tqimage.h> -#include <kapplication.h> -#include <klocale.h> +#include <tdeapplication.h> +#include <tdelocale.h> int main(int argc, char** argv) { - (void)new KApplication(argc, argv, "KAboutDialogTest"); + (void)new TDEApplication(argc, argv, "TDEAboutDialogTest"); TQImage logo; TQImage bg; TQPixmap pix; - KAboutDialog about; + TDEAboutDialog about; // ----- // kimgioRegister(); if(logo.load("RayTracedGear.png")) @@ -45,8 +45,8 @@ int main(int argc, char** argv) // ("Cl&ose", "Close this dialog.", // "<b>Close</b> the dialog<br>" // "<i>(there are no settings to save).</i>"); - about.setCaption("KAboutDialog example"); - about.setVersion("KAboutDialog, Draft Study"); + about.setCaption("TDEAboutDialog example"); + about.setVersion("TDEAboutDialog, Draft Study"); about.setHelp("kdehelp/intro.html", "intro"); // ----- set the application author: about.setAuthor diff --git a/tdeui/tests/kactiontest.cpp b/tdeui/tests/kactiontest.cpp deleted file mode 100644 index ea97883c8..000000000 --- a/tdeui/tests/kactiontest.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -#include <tqguardedptr.h> - -#include <kapplication.h> -#include <kaction.h> - -#include <assert.h> - -int main( int argc, char **argv ) -{ - KApplication app( argc, argv, "kactiontest" ); - - KActionCollection coll( static_cast<TQObject *>( 0 ) ); - - TQGuardedPtr<KAction> action1 = new KRadioAction("test",0, &coll); - TQGuardedPtr<KAction> action2 = new KRadioAction("test",0, &coll); - TQGuardedPtr<KAction> action3 = new KRadioAction("test",0, &coll); - TQGuardedPtr<KAction> action4 = new KRadioAction("test",0, &coll); - TQGuardedPtr<KAction> action5 = new KRadioAction("test",0, &coll); - TQGuardedPtr<KAction> action6 = new KRadioAction("test",0, &coll); - TQGuardedPtr<KAction> action7 = new KRadioAction("test",0, &coll); - - coll.clear(); - assert( coll.isEmpty() ); - - assert( action1.isNull() ); - assert( action2.isNull() ); - assert( action3.isNull() ); - assert( action4.isNull() ); - assert( action5.isNull() ); - assert( action6.isNull() ); - assert( action7.isNull() ); - - return 0; -} - -/* vim: et sw=4 ts=4 - */ diff --git a/tdeui/tests/kblendtest.cpp b/tdeui/tests/kblendtest.cpp index 59a57dc6a..4672b76ee 100644 --- a/tdeui/tests/kblendtest.cpp +++ b/tdeui/tests/kblendtest.cpp @@ -1,5 +1,5 @@ #include "kblendtest.h" -#include <kapplication.h> +#include <tdeapplication.h> #include <kimageeffect.h> #include <tqpainter.h> #include <tqdatetime.h> @@ -89,7 +89,7 @@ void KBlendWidget::paintEvent(TQPaintEvent */*ev*/) int main(int argc, char **argv) { - KApplication app(argc, argv, "KBlendTest"); + TDEApplication app(argc, argv, "KBlendTest"); KBlendWidget w; app.setMainWidget(&w); w.show(); diff --git a/tdeui/tests/kbuttonboxtest.cpp b/tdeui/tests/kbuttonboxtest.cpp index 1773c47f9..c9eb1134b 100644 --- a/tdeui/tests/kbuttonboxtest.cpp +++ b/tdeui/tests/kbuttonboxtest.cpp @@ -16,7 +16,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <kapplication.h> +#include <tdeapplication.h> #include "kbuttonbox.h" #include <tqlayout.h> #include <tqlabel.h> @@ -24,7 +24,7 @@ #include <tqpushbutton.h> int main(int argc, char **argv) { - KApplication a(argc, argv, "dummy"); + TDEApplication a(argc, argv, "dummy"); // example 1 { diff --git a/tdeui/tests/kcharselecttest.cpp b/tdeui/tests/kcharselecttest.cpp index facd17bca..5ee4ee381 100644 --- a/tdeui/tests/kcharselecttest.cpp +++ b/tdeui/tests/kcharselecttest.cpp @@ -1,10 +1,10 @@ -#include <kapplication.h> -#include <klocale.h> +#include <tdeapplication.h> +#include <tdelocale.h> #include "kcharselect.h" int main (int argc,char **argv) { - KApplication app( argc, argv, "kcharselecttest" ); + TDEApplication app( argc, argv, "kcharselecttest" ); KCharSelect selector( 0, "char selector" ); selector.resize( selector.sizeHint() ); diff --git a/tdeui/tests/kcolordlgtest.cpp b/tdeui/tests/kcolordlgtest.cpp index f372e6a96..dbe39484c 100644 --- a/tdeui/tests/kcolordlgtest.cpp +++ b/tdeui/tests/kcolordlgtest.cpp @@ -17,19 +17,19 @@ Boston, MA 02110-1301, USA. */ -#include <kapplication.h> +#include <tdeapplication.h> #include "kcolordialog.h" -#include <kconfig.h> -#include <klocale.h> +#include <tdeconfig.h> +#include <tdelocale.h> int main( int argc, char *argv[] ) { TQColor color; - KLocale::setMainCatalogue("tdelibs"); + TDELocale::setMainCatalogue("tdelibs"); TQApplication::setColorMode( TQApplication::CustomColors ); - KApplication a( argc, argv, "KColorDialogTest" ); - KConfig aConfig; + TDEApplication a( argc, argv, "KColorDialogTest" ); + TDEConfig aConfig; aConfig.setGroup( "KColorDialog-test" ); color = aConfig.readColorEntry( "Chosen" ); diff --git a/tdeui/tests/kcolortest.cpp b/tdeui/tests/kcolortest.cpp index 68f50371b..243de265b 100644 --- a/tdeui/tests/kcolortest.cpp +++ b/tdeui/tests/kcolortest.cpp @@ -1,6 +1,6 @@ #include "kcolortest.h" -#include <kapplication.h> +#include <tdeapplication.h> #include <kimageeffect.h> #include <stdio.h> #include <tqdatetime.h> @@ -160,7 +160,7 @@ int main(int argc, char **argv) else printf("Usage: %s [int_vs_fade | fullscreen [old_way]]\n ", argv[0]); } - KApplication *app = new KApplication(argc, argv, "KColorTest"); + TDEApplication *app = new TDEApplication(argc, argv, "KColorTest"); KColorWidget w; app->setMainWidget(&w); w.show(); diff --git a/tdeui/tests/kcomboboxtest.cpp b/tdeui/tests/kcomboboxtest.cpp index 44b849b44..d2b59a4c2 100644 --- a/tdeui/tests/kcomboboxtest.cpp +++ b/tdeui/tests/kcomboboxtest.cpp @@ -6,10 +6,10 @@ #include <assert.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kdebug.h> #include <kdialog.h> -#include <klocale.h> +#include <tdelocale.h> #include <kiconloader.h> #include <ksimpleconfig.h> @@ -52,7 +52,7 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name ) m_ro = new KComboBox(hbox, "ReadOnlyCombo" ); lbl->setBuddy (m_ro); - m_ro->setCompletionMode( KGlobalSettings::CompletionAuto ); + m_ro->setCompletionMode( TDEGlobalSettings::CompletionAuto ); 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); @@ -139,10 +139,10 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name ) // Setup konq's combobox KSimpleConfig historyConfig( "konq_history" ); historyConfig.setGroup( "Location Bar" ); - KCompletion * s_pCompletion = new KCompletion; - s_pCompletion->setOrder( KCompletion::Weighted ); + TDECompletion * s_pCompletion = new TDECompletion; + s_pCompletion->setOrder( TDECompletion::Weighted ); s_pCompletion->setItems( historyConfig.readListEntry( "ComboContents" ) ); - s_pCompletion->setCompletionMode( KGlobalSettings::completionMode() ); + s_pCompletion->setCompletionMode( TDEGlobalSettings::completionMode() ); m_konqc->setCompletionObject( s_pCompletion ); TQPixmap pix = SmallIcon("www"); @@ -217,7 +217,7 @@ void KComboBoxTest::quitApp() int main ( int argc, char **argv) { - KApplication a(argc, argv, "kcomboboxtest"); + TDEApplication a(argc, argv, "kcomboboxtest"); KComboBoxTest* t= new KComboBoxTest; a.setMainWidget (t); t->show (); diff --git a/tdeui/tests/kcompletiontest.cpp b/tdeui/tests/kcompletiontest.cpp index 3e60a0ddd..261534465 100644 --- a/tdeui/tests/kcompletiontest.cpp +++ b/tdeui/tests/kcompletiontest.cpp @@ -1,4 +1,4 @@ -#include <klocale.h> +#include <tdelocale.h> /**************************************************************************** ** Form implementation generated from reading ui file './kcompletiontest.ui' ** @@ -18,7 +18,7 @@ #include <tqtooltip.h> #include <tqwhatsthis.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <klineedit.h> #include <kcombobox.h> /* @@ -186,7 +186,7 @@ TQStringList Form1::defaultItems() const int main(int argc, char **argv ) { - KApplication app( argc, argv, "kcompletiontest" ); + TDEApplication app( argc, argv, "kcompletiontest" ); Form1 *form = new Form1(); form->show(); diff --git a/tdeui/tests/kdatepicktest.cpp b/tdeui/tests/kdatepicktest.cpp index bea01a434..8bdab90a4 100644 --- a/tdeui/tests/kdatepicktest.cpp +++ b/tdeui/tests/kdatepicktest.cpp @@ -1,12 +1,12 @@ #include "kdatepicker.h" #include <tqlineedit.h> -#include <kapplication.h> -#include <klocale.h> +#include <tdeapplication.h> +#include <tdelocale.h> int main(int argc, char** argv) { - KLocale::setMainCatalogue("tdelibs"); - KApplication app(argc, argv, "KDatePickertest"); + TDELocale::setMainCatalogue("tdelibs"); + TDEApplication app(argc, argv, "KDatePickertest"); KDatePicker picker; app.setMainWidget(&picker); picker.show(); diff --git a/tdeui/tests/kdatetimewidgettest.cpp b/tdeui/tests/kdatetimewidgettest.cpp index ab55b0a32..f94a2a9f7 100644 --- a/tdeui/tests/kdatetimewidgettest.cpp +++ b/tdeui/tests/kdatetimewidgettest.cpp @@ -1,11 +1,11 @@ #include "kdatetimewidget.h" -#include <kapplication.h> -#include <klocale.h> +#include <tdeapplication.h> +#include <tdelocale.h> int main(int argc, char** argv) { - KLocale::setMainCatalogue("tdelibs"); - KApplication app(argc, argv, "KDateTimeWidgettest"); + TDELocale::setMainCatalogue("tdelibs"); + TDEApplication app(argc, argv, "KDateTimeWidgettest"); KDateTimeWidget dateTimeWidget; app.setMainWidget(&dateTimeWidget); dateTimeWidget.show(); diff --git a/tdeui/tests/kdatewidgettest.cpp b/tdeui/tests/kdatewidgettest.cpp index af75b42bc..22340b4c9 100644 --- a/tdeui/tests/kdatewidgettest.cpp +++ b/tdeui/tests/kdatewidgettest.cpp @@ -1,12 +1,12 @@ #include "kdatewidget.h" #include <tqlineedit.h> -#include <kapplication.h> -#include <klocale.h> +#include <tdeapplication.h> +#include <tdelocale.h> int main(int argc, char** argv) { - KLocale::setMainCatalogue("tdelibs"); - KApplication app(argc, argv, "KDateWidgettest"); + TDELocale::setMainCatalogue("tdelibs"); + TDEApplication app(argc, argv, "KDateWidgettest"); KDateWidget dateWidget; app.setMainWidget(&dateWidget); dateWidget.show(); diff --git a/tdeui/tests/kdesattest.cpp b/tdeui/tests/kdesattest.cpp index 28f7d4cf2..8eab0b125 100644 --- a/tdeui/tests/kdesattest.cpp +++ b/tdeui/tests/kdesattest.cpp @@ -1,5 +1,5 @@ #include "kdesattest.h" -#include <kapplication.h> +#include <tdeapplication.h> #include <kimageeffect.h> #include <tqpainter.h> #include <tqdatetime.h> @@ -55,7 +55,7 @@ void KDesatWidget::paintEvent(TQPaintEvent */*ev*/) int main(int argc, char **argv) { - KApplication *app = new KApplication(argc, argv, "KDesatTest"); + TDEApplication *app = new TDEApplication(argc, argv, "KDesatTest"); KDesatWidget w; app->setMainWidget(&w); w.show(); diff --git a/tdeui/tests/kdialogbasetest.cpp b/tdeui/tests/kdialogbasetest.cpp index c3653b59f..7f8023bd2 100644 --- a/tdeui/tests/kdialogbasetest.cpp +++ b/tdeui/tests/kdialogbasetest.cpp @@ -1,4 +1,4 @@ -#include <kapplication.h> +#include <tdeapplication.h> #include <kdialogbase.h> #include <tqstring.h> @@ -6,7 +6,7 @@ int main(int argc, char** argv) { - KApplication app(argc, argv, "DialogBaseTest"); + TDEApplication app(argc, argv, "DialogBaseTest"); // ----- TQString text= // the explanation shown by the example dialog "<center><h1>DialogBase Example</h1></center><hr><br>" diff --git a/tdeui/tests/kdocktest.cpp b/tdeui/tests/kdocktest.cpp index 84895c414..538e2b888 100644 --- a/tdeui/tests/kdocktest.cpp +++ b/tdeui/tests/kdocktest.cpp @@ -1,6 +1,6 @@ #include "kdocktest.h" -#include <kapplication.h> +#include <tdeapplication.h> #include <kiconloader.h> #include <tqwidget.h> @@ -54,7 +54,7 @@ DockTest::DockTest( TQWidget* parent ) int main( int argc, char** argv ) { - KApplication a( argc,argv, "docktest" ); + TDEApplication a( argc,argv, "docktest" ); DockTest* ap = new DockTest(); ap->setCaption("DockWidget demo"); a.setMainWidget( ap ); diff --git a/tdeui/tests/kdockwidgetdemo.cpp b/tdeui/tests/kdockwidgetdemo.cpp index 7847a6299..a922acf2d 100644 --- a/tdeui/tests/kdockwidgetdemo.cpp +++ b/tdeui/tests/kdockwidgetdemo.cpp @@ -19,8 +19,8 @@ #include <tqstrlist.h> #include <tqpainter.h> -#include <kconfig.h> -#include <kapplication.h> +#include <tdeconfig.h> +#include <tdeapplication.h> //#include <kimgio.h> #include <stdlib.h> @@ -81,7 +81,7 @@ static const char *preview_xpm[] = { SFileDialog::SFileDialog( TQString initially, const TQStringList& filter, const char* name ) :TQDialog(0L,name,true) { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup( TQString::fromLatin1("SFileDialogData:") + name ); if ( initially.isNull() ){ initially = config->readPathEntry( "InitiallyDir", TQDir::currentDirPath() ); @@ -166,7 +166,7 @@ void SFileDialog::dockChange() SFileDialog::~SFileDialog() { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup( TQString("SFileDialogData:") + name() ); config->writeEntry( "Bookmarks", fd->getBookmark() ); @@ -188,7 +188,7 @@ void SFileDialog::setDockDefaultPos( KDockWidget* d ) void SFileDialog::changeDir( const TQString& f ) { if ( !f.isEmpty() ){ - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup( TQString("SFileDialogData:") + name() ); config->writePathEntry( "InitiallyDir", f ); } @@ -768,7 +768,7 @@ TQString DirectoryView::selectedDir() /**********************************************************************************************/ int main(int argc, char* argv[]) { - KApplication app(argc,argv,"kdockwidgetdemo"); + TDEApplication app(argc,argv,"kdockwidgetdemo"); #if 0 SFileDialog* openfile = new SFileDialog(); diff --git a/tdeui/tests/kdockwidgettest.cpp b/tdeui/tests/kdockwidgettest.cpp index 74d8ecac4..aacac19a0 100644 --- a/tdeui/tests/kdockwidgettest.cpp +++ b/tdeui/tests/kdockwidgettest.cpp @@ -15,11 +15,11 @@ #include "kdockwidgettest.h" #include <tqpushbutton.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kiconloader.h> #include <kstatusbar.h> -#include <kmenubar.h> -#include <ktoolbar.h> +#include <tdemenubar.h> +#include <tdetoolbar.h> #include <tqvbox.h> static const char*folder[]={ @@ -184,7 +184,7 @@ void DockApplication::initMenuBar() void DockApplication::initToolBars() { TQPixmap p(folder); - KToolBar* tool_bar_0 = toolBar(0); + TDEToolBar* tool_bar_0 = toolBar(0); tool_bar_0->setFullSize(false); tool_bar_0->insertButton( p, 1 ); tool_bar_0->insertButton(p, 2 ); @@ -242,7 +242,7 @@ void DockApplication::gSetPix2() { } int main(int argc, char* argv[]) { - KApplication a(argc,argv, "kdockdemoapp1"); + TDEApplication a(argc,argv, "kdockdemoapp1"); DockApplication* ap = new DockApplication("DockWidget demo"); ap->setCaption("DockWidget demo"); a.setMainWidget(ap); diff --git a/tdeui/tests/kdualcolortest.cpp b/tdeui/tests/kdualcolortest.cpp index 6fa2d1571..512bfc610 100644 --- a/tdeui/tests/kdualcolortest.cpp +++ b/tdeui/tests/kdualcolortest.cpp @@ -1,7 +1,7 @@ #include "kdualcolortest.h" #include <kdualcolorbutton.h> -#include <kapplication.h> -#include <klocale.h> +#include <tdeapplication.h> +#include <tdelocale.h> #include <tqlayout.h> #include <tqpalette.h> @@ -51,7 +51,7 @@ void KDualColorWidget::slotCurrentChanged(KDualColorButton::DualColor current) int main(int argc, char **argv) { - KApplication *app = new KApplication(argc, argv, "KDualColorTest"); + TDEApplication *app = new TDEApplication(argc, argv, "KDualColorTest"); KDualColorWidget w; app->setMainWidget(&w); w.show(); diff --git a/tdeui/tests/keditlistboxtest.cpp b/tdeui/tests/keditlistboxtest.cpp index 90dbb74d0..5b4e45ddb 100644 --- a/tdeui/tests/keditlistboxtest.cpp +++ b/tdeui/tests/keditlistboxtest.cpp @@ -1,10 +1,10 @@ -#include <kapplication.h> +#include <tdeapplication.h> #include <keditlistbox.h> #include <kcombobox.h> int main( int argc, char **argv ) { - KApplication app( argc, argv, "keditlistboxtest" ); + TDEApplication app( argc, argv, "keditlistboxtest" ); KEditListBox::CustomEditor editor( new KComboBox( true, 0L, "test" ) ); KEditListBox *box = new KEditListBox( TQString::fromLatin1("KEditListBox"), diff --git a/tdeui/tests/kedittest.cpp b/tdeui/tests/kedittest.cpp index 17a593e74..f806c3bdf 100644 --- a/tdeui/tests/kedittest.cpp +++ b/tdeui/tests/kedittest.cpp @@ -1,10 +1,10 @@ -#include <kapplication.h> +#include <tdeapplication.h> #include <keditcl.h> #include <tqpopupmenu.h> int main( int argc, char **argv ) { - KApplication app( argc, argv, "kedittest" ); + TDEApplication app( argc, argv, "kedittest" ); KEdit *edit = new KEdit( 0L ); TQPopupMenu *pop = new TQPopupMenu( 0L ); pop->insertItem( "Popupmenu item" ); diff --git a/tdeui/tests/kgradienttest.cpp b/tdeui/tests/kgradienttest.cpp index 6942ca55d..4ee8c0f93 100644 --- a/tdeui/tests/kgradienttest.cpp +++ b/tdeui/tests/kgradienttest.cpp @@ -1,5 +1,5 @@ #include "kgradienttest.h" -#include <kapplication.h> +#include <tdeapplication.h> #include <kpixmapeffect.h> #include <tqpainter.h> #include <tqdatetime.h> @@ -98,7 +98,7 @@ void KGradientWidget::paintEvent(TQPaintEvent */*ev*/) int main(int argc, char **argv) { - KApplication *app = new KApplication(argc, argv, "KGradientTest"); + TDEApplication *app = new TDEApplication(argc, argv, "KGradientTest"); KGradientWidget w; w.resize(250 * cols, 250 * rows); app->setMainWidget(&w); diff --git a/tdeui/tests/khashtest.cpp b/tdeui/tests/khashtest.cpp index 2f00c9296..d392fcbc5 100644 --- a/tdeui/tests/khashtest.cpp +++ b/tdeui/tests/khashtest.cpp @@ -1,5 +1,5 @@ #include "khashtest.h" -#include <kapplication.h> +#include <tdeapplication.h> #include <kpixmapeffect.h> #include <kimageeffect.h> #include <tqpainter.h> @@ -126,7 +126,7 @@ void KHashWidget::paintEvent(TQPaintEvent * /*ev*/) int main(int argc, char **argv) { - KApplication *app = new KApplication(argc, argv, "KHashTest"); + TDEApplication *app = new TDEApplication(argc, argv, "KHashTest"); KHashWidget w; w.resize(250 * cols, 250 * rows); app->setMainWidget(&w); diff --git a/tdeui/tests/kinputdialogtest.cpp b/tdeui/tests/kinputdialogtest.cpp index 66db4617a..b40b5c562 100644 --- a/tdeui/tests/kinputdialogtest.cpp +++ b/tdeui/tests/kinputdialogtest.cpp @@ -3,7 +3,7 @@ * License: GPL V2 */ -#include <kapplication.h> +#include <tdeapplication.h> #include <kinputdialog.h> #include <kdebug.h> @@ -12,7 +12,7 @@ int main( int argc, char *argv[] ) { - KApplication app( argc, argv, "kinputdialogtest" ); + TDEApplication app( argc, argv, "kinputdialogtest" ); bool ok; TQString svalue; diff --git a/tdeui/tests/kjanuswidgettest.cpp b/tdeui/tests/kjanuswidgettest.cpp index 59db252e2..71e72fb13 100644 --- a/tdeui/tests/kjanuswidgettest.cpp +++ b/tdeui/tests/kjanuswidgettest.cpp @@ -1,4 +1,4 @@ -#include <kapplication.h> +#include <tdeapplication.h> #include <kjanuswidget.h> #include <tqstring.h> @@ -7,7 +7,7 @@ int main(int argc, char** argv) { - KApplication app(argc, argv, "JanusWidgetTest"); + TDEApplication app(argc, argv, "JanusWidgetTest"); // ----- KJanusWidget* janus = new KJanusWidget( 0, 0, KJanusWidget::IconList ); diff --git a/tdeui/tests/kledtest.cpp b/tdeui/tests/kledtest.cpp index 54ae8b6e1..4ba158776 100644 --- a/tdeui/tests/kledtest.cpp +++ b/tdeui/tests/kledtest.cpp @@ -1,4 +1,4 @@ -#include <kapplication.h> +#include <tdeapplication.h> #include <tqwidget.h> #include <tqtimer.h> #include <stdlib.h> @@ -134,7 +134,7 @@ KLedTest::timeout() int main( int argc, char **argv ) { - KApplication a( argc, argv, "KLedTest" ); + TDEApplication a( argc, argv, "KLedTest" ); KLedTest widget; // ----- /* diff --git a/tdeui/tests/klineeditdlgtest.cpp b/tdeui/tests/klineeditdlgtest.cpp index 7db673bb1..ecc6ac984 100644 --- a/tdeui/tests/klineeditdlgtest.cpp +++ b/tdeui/tests/klineeditdlgtest.cpp @@ -1,4 +1,4 @@ -#include <kapplication.h> +#include <tdeapplication.h> #include <klineeditdlg.h> #include <tqstring.h> @@ -6,7 +6,7 @@ int main(int argc, char** argv) { - KApplication app(argc, argv, "klineedittest"); + TDEApplication app(argc, argv, "klineedittest"); KLineEditDlg dialog( "_text", "_value", 0L ); if(dialog.exec()) { diff --git a/tdeui/tests/klineedittest.cpp b/tdeui/tests/klineedittest.cpp index 3508982fa..20e9b6ca8 100644 --- a/tdeui/tests/klineedittest.cpp +++ b/tdeui/tests/klineedittest.cpp @@ -4,15 +4,15 @@ #include <tqhbox.h> #include <tqtimer.h> -#include <kaboutdata.h> -#include <kcmdlineargs.h> -#include <kapplication.h> +#include <tdeaboutdata.h> +#include <tdecmdlineargs.h> +#include <tdeapplication.h> #include <kdebug.h> #include <kdialog.h> -#include <klocale.h> +#include <tdelocale.h> #include <klineedit.h> -#include <kglobalsettings.h> -#include <kcompletionbox.h> +#include <tdeglobalsettings.h> +#include <tdecompletionbox.h> #include "klineedittest.h" @@ -118,11 +118,11 @@ void KLineEditTest::slotHide() int main ( int argc, char **argv) { - KAboutData aboutData( "klineedittest", "klineedittest", "1.0" ); - KCmdLineArgs::init(argc, argv, &aboutData); - KApplication::addCmdLineOptions(); + TDEAboutData aboutData( "klineedittest", "klineedittest", "1.0" ); + TDECmdLineArgs::init(argc, argv, &aboutData); + TDEApplication::addCmdLineOptions(); - KApplication a; + TDEApplication a; KLineEditTest *t = new KLineEditTest(); //t->lineEdit()->setTrapReturnKey( true ); //t->lineEdit()->completionBox()->setTabHandling( false ); diff --git a/tdeui/tests/klistviewtest.cpp b/tdeui/tests/klistviewtest.cpp deleted file mode 100644 index 6189c76e9..000000000 --- a/tdeui/tests/klistviewtest.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include <klistview.h> -#include <kapplication.h> -#include <kdialogbase.h> -#include <tqvbox.h> - - -int main( int argc, char **argv ) -{ - KApplication app( argc, argv, "klistviewtest" ); - KDialogBase dialog; - KListView *view = new KListView( dialog.makeVBoxMainWidget() ); - view->setSelectionModeExt( KListView::FileManager ); - view->setDragEnabled( true ); - view->setItemsMovable( false ); - view->setAcceptDrops( true ); - view->addColumn("Column 1"); - view->addColumn("Column 2"); - view->addColumn("Column 3"); - - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 1"); - new KListViewItem( view, "Item 2", "Some more", "Hi Mom :)" ); - - view->restoreLayout( KGlobal::config(), "ListView" ); - - new KListViewItem( view, "Item 3" ); - - dialog.exec(); - view->saveLayout( KGlobal::config(), "ListView" ); - - return 0; -} diff --git a/tdeui/tests/kmainwindowrestoretest.h b/tdeui/tests/kmainwindowrestoretest.h deleted file mode 100644 index f29ae2fca..000000000 --- a/tdeui/tests/kmainwindowrestoretest.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef _TDEUI_TESTS_KMAINWINDOWRESTORETEST_H_ -#define _TDEUI_TESTS_KMAINWINDOWRESTORETEST_H_ - -#include <kmainwindow.h> - -class MainWin1 : public KMainWindow { - Q_OBJECT -public: - MainWin1() : KMainWindow() {} - virtual ~MainWin1() {} -}; - -class MainWin2 : public KMainWindow { - Q_OBJECT -public: - MainWin2() : KMainWindow() {} - virtual ~MainWin2() {} -}; - -class MainWin3 : public KMainWindow { - Q_OBJECT -public: - MainWin3() : KMainWindow() {} - virtual ~MainWin3() {} -}; - -class MainWin4 : public KMainWindow { - Q_OBJECT -public: - MainWin4() : KMainWindow() {} - virtual ~MainWin4() {} -}; - -class MainWin5 : public KMainWindow { - Q_OBJECT -public: - MainWin5() : KMainWindow() {} - virtual ~MainWin5() {} -}; - -class MainWin6 : public KMainWindow { - Q_OBJECT -public: - MainWin6() : KMainWindow() {} - virtual ~MainWin6() {} -}; - -#endif // _TDEUI_TESTS_KMAINWINDOWRESTORETEST_H_ diff --git a/tdeui/tests/kmessageboxtest.cpp b/tdeui/tests/kmessageboxtest.cpp index 3603edf57..2a56a7ead 100644 --- a/tdeui/tests/kmessageboxtest.cpp +++ b/tdeui/tests/kmessageboxtest.cpp @@ -1,4 +1,4 @@ -#include "kmessagebox.h" +#include "tdemessagebox.h" #include <tqdialog.h> #include <tqlayout.h> @@ -8,9 +8,9 @@ #include <stdio.h> #include <kstatusbar.h> -#include <kapplication.h> +#include <tdeapplication.h> -#include <kglobal.h> +#include <tdeglobal.h> class ExampleWidget : public QLabel { @@ -63,7 +63,7 @@ void showResult(int test, int i) int main( int argc, char *argv[] ) { int i, test; - new KApplication( argc, argv, "MyApplication" ); + new TDEApplication( argc, argv, "MyApplication" ); ExampleWidget *w = new ExampleWidget(); w->show(); diff --git a/tdeui/tests/knuminputtest.cpp b/tdeui/tests/knuminputtest.cpp index fdf8697e9..9a333dfda 100644 --- a/tdeui/tests/knuminputtest.cpp +++ b/tdeui/tests/knuminputtest.cpp @@ -11,12 +11,12 @@ #include <tqlayout.h> #include <tqvgroupbox.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <knuminput.h> #include "knuminputtest.h" -KApplication *a; +TDEApplication *a; #include <kdebug.h> void TopLevel::slotPrint( int n ) { @@ -132,7 +132,7 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) int main( int argc, char ** argv ) { - a = new KApplication ( argc, argv, "KNuminputTest" ); + a = new TDEApplication ( argc, argv, "KNuminputTest" ); TopLevel *toplevel = new TopLevel(0, "knuminputtest"); diff --git a/tdeui/tests/kpalettetest.cpp b/tdeui/tests/kpalettetest.cpp index 32b91ff96..94036244e 100644 --- a/tdeui/tests/kpalettetest.cpp +++ b/tdeui/tests/kpalettetest.cpp @@ -1,5 +1,5 @@ -#include <kapplication.h> +#include <tdeapplication.h> #include <tqwidget.h> #include <tqtimer.h> #include <stdlib.h> @@ -12,7 +12,7 @@ int main( int argc, char **argv ) { - KApplication a( argc, argv, "KPalettetest" ); + TDEApplication a( argc, argv, "KPalettetest" ); TQStringList palettes = KPalette::getPaletteList(); for(TQStringList::ConstIterator it = palettes.begin(); diff --git a/tdeui/tests/kpanelmenutest.cpp b/tdeui/tests/kpanelmenutest.cpp index 678a1eeb6..a14cb3366 100644 --- a/tdeui/tests/kpanelmenutest.cpp +++ b/tdeui/tests/kpanelmenutest.cpp @@ -1,5 +1,5 @@ #include "kpanelmenutest.h" -#include <kapplication.h> +#include <tdeapplication.h> #include <kstandarddirs.h> #include <dcopclient.h> @@ -57,7 +57,7 @@ void TestWidget::slotSubMenuCalled(int id) int main(int argc, char **argv) { - KApplication *app = new KApplication(argc, argv, "menutest"); + TDEApplication *app = new TDEApplication(argc, argv, "menutest"); TestWidget w; app->setMainWidget(&w); diff --git a/tdeui/tests/kpixmapregionselectordialogtest.cpp b/tdeui/tests/kpixmapregionselectordialogtest.cpp index c698c66f2..28a51a3f7 100644 --- a/tdeui/tests/kpixmapregionselectordialogtest.cpp +++ b/tdeui/tests/kpixmapregionselectordialogtest.cpp @@ -1,23 +1,23 @@ #include "kpixmapregionselectordialog.h" #include <tqpixmap.h> #include <tqimage.h> -#include <kapplication.h> -#include <kcmdlineargs.h> +#include <tdeapplication.h> +#include <tdecmdlineargs.h> #include <iostream> -static const KCmdLineOptions options[] = +static const TDECmdLineOptions options[] = { { "+file", "The image file to open", 0 }, - KCmdLineLastOption + TDECmdLineLastOption }; int main(int argc, char**argv) { - KCmdLineArgs::init(argc, argv, "test", "test" ,"test" ,"1.0"); - KCmdLineArgs::addCmdLineOptions( options ); - KApplication app("test"); + TDECmdLineArgs::init(argc, argv, "test", "test" ,"test" ,"1.0"); + TDECmdLineArgs::addCmdLineOptions( options ); + TDEApplication app("test"); - KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); if (args->count()!=1) { std::cout << "Usage: kpixmapregionselectordialogtest <imageFile>" << std::endl; diff --git a/tdeui/tests/kprogresstest.cpp b/tdeui/tests/kprogresstest.cpp index 7b7024135..6106a236b 100644 --- a/tdeui/tests/kprogresstest.cpp +++ b/tdeui/tests/kprogresstest.cpp @@ -1,4 +1,4 @@ -#include <kapplication.h> +#include <tdeapplication.h> #include <tqwidget.h> #include "kprogress.h" @@ -46,7 +46,7 @@ void MyWidget::timerEvent(TQTimerEvent *) int main(int argc, char *argv[]) { - KApplication app(argc, argv, "KProgressTest"); + TDEApplication app(argc, argv, "KProgressTest"); MyWidget w; app.setMainWidget(&w); diff --git a/tdeui/tests/krulertest.cpp b/tdeui/tests/krulertest.cpp index 2f16605d9..628c5096e 100644 --- a/tdeui/tests/krulertest.cpp +++ b/tdeui/tests/krulertest.cpp @@ -51,7 +51,7 @@ MouseWidget::resizeEvent( TQResizeEvent *r ) KRulerTest::KRulerTest( const char *name ) - : KMainWindow(0, name) + : TDEMainWindow(0, name) { mainframe = new TQFrame(this); @@ -358,10 +358,10 @@ KRulerTest::slotSetYTrans(double d) /* --- MAIN -----------------------*/ int main(int argc, char **argv) { - KApplication *testapp; + TDEApplication *testapp; KRulerTest *window; - testapp = new KApplication(argc, argv,"krulertest"); + testapp = new TDEApplication(argc, argv,"krulertest"); testapp->setFont(TQFont("Helvetica",12),true); window = new KRulerTest("main"); diff --git a/tdeui/tests/krulertest.h b/tdeui/tests/krulertest.h index d180e93a0..0242fb5d7 100644 --- a/tdeui/tests/krulertest.h +++ b/tdeui/tests/krulertest.h @@ -3,8 +3,8 @@ #ifndef krulertest_h #define krulertest_h -#include <kapplication.h> -#include <kmainwindow.h> +#include <tdeapplication.h> +#include <tdemainwindow.h> #include <tqwidget.h> #include <tqcheckbox.h> #include <tqradiobutton.h> @@ -42,7 +42,7 @@ private: }; -class KRulerTest : public KMainWindow +class KRulerTest : public TDEMainWindow { Q_OBJECT public: diff --git a/tdeui/tests/kseparatortest.cpp b/tdeui/tests/kseparatortest.cpp index 17e965ca8..a791fa930 100644 --- a/tdeui/tests/kseparatortest.cpp +++ b/tdeui/tests/kseparatortest.cpp @@ -18,7 +18,7 @@ */ -#include <kapplication.h> +#include <tdeapplication.h> #include <tqlayout.h> #include <tqwidget.h> diff --git a/tdeui/tests/ksqueezedtextlabeltest.cpp b/tdeui/tests/ksqueezedtextlabeltest.cpp index 62f3c1a76..7c3fd413c 100644 --- a/tdeui/tests/ksqueezedtextlabeltest.cpp +++ b/tdeui/tests/ksqueezedtextlabeltest.cpp @@ -1,9 +1,9 @@ #include "ksqueezedtextlabel.h" -#include <kapplication.h> +#include <tdeapplication.h> int main( int argc, char **argv ) { - KApplication app( argc, argv, "KSqueezedTextLabelTest" ); + TDEApplication app( argc, argv, "KSqueezedTextLabelTest" ); KSqueezedTextLabel l( "This is a rather long string", 0); app.setMainWidget( &l ); diff --git a/tdeui/tests/kstatusbartest.cpp b/tdeui/tests/kstatusbartest.cpp index 669044c55..0a8c6d10c 100644 --- a/tdeui/tests/kstatusbartest.cpp +++ b/tdeui/tests/kstatusbartest.cpp @@ -10,19 +10,19 @@ #include <stdlib.h> #include "kstatusbar.h" -#include <kapplication.h> -#include <kmainwindow.h> -#include <kmenubar.h> +#include <tdeapplication.h> +#include <tdemainwindow.h> +#include <tdemenubar.h> #include "kstatusbartest.h" testWindow::testWindow (TQWidget *, const char *name) - : KMainWindow (0, name) + : TDEMainWindow (0, name) { // Setup Menus menuBar = new KMenuBar (this); fileMenu = new TQPopupMenu; menuBar->insertItem ("&File", fileMenu); - fileMenu->insertItem ("&Exit", KApplication::kApplication(), + fileMenu->insertItem ("&Exit", TDEApplication::kApplication(), TQT_SLOT( quit() ), ALT + Key_Q ); statusbar = new KStatusBar (this); statusbar->insertItem("Zoom: XXXX", 0); @@ -41,7 +41,7 @@ testWindow::testWindow (TQWidget *, const char *name) setCentralWidget(widget); - setCaption( KApplication::kApplication()->caption() ); + setCaption( TDEApplication::kApplication()->caption() ); smenu = new TQPopupMenu; @@ -104,7 +104,7 @@ testWindow::~testWindow () int main( int argc, char *argv[] ) { - KApplication *myApp = new KApplication( argc, argv, "KStatusBarTest" ); + TDEApplication *myApp = new TDEApplication( argc, argv, "KStatusBarTest" ); testWindow *test = new testWindow; myApp->setMainWidget(test); diff --git a/tdeui/tests/kstatusbartest.h b/tdeui/tests/kstatusbartest.h index 37f500334..712f24352 100644 --- a/tdeui/tests/kstatusbartest.h +++ b/tdeui/tests/kstatusbartest.h @@ -1,14 +1,14 @@ #ifndef test_kstatusbar_h #define test_kstatusbar_h -#include <kmenubar.h> +#include <tdemenubar.h> #include <tqpopupmenu.h> #include <kstatusbar.h> -#include <kmainwindow.h> +#include <tdemainwindow.h> class TQMultiLineEdit; -class testWindow : public KMainWindow +class testWindow : public TDEMainWindow { Q_OBJECT diff --git a/tdeui/tests/ksystemtraytest.cpp b/tdeui/tests/ksystemtraytest.cpp index dcee78346..27a6629d9 100644 --- a/tdeui/tests/ksystemtraytest.cpp +++ b/tdeui/tests/ksystemtraytest.cpp @@ -1,9 +1,9 @@ #include <ksystemtray.h> -#include <kapplication.h> +#include <tdeapplication.h> int main(int argc, char **argv) { - KApplication app( argc, argv, "ksystemtraytest" ); + TDEApplication app( argc, argv, "ksystemtraytest" ); TQLabel *l = new TQLabel("System Tray Main Window", 0L); KSystemTray *tray = new KSystemTray( l ); tray->setText("Test"); diff --git a/tdeui/tests/ktabctltest.cpp b/tdeui/tests/ktabctltest.cpp index 33e7fc5b7..05fe2aeb3 100644 --- a/tdeui/tests/ktabctltest.cpp +++ b/tdeui/tests/ktabctltest.cpp @@ -2,7 +2,7 @@ * */ -#include <kapplication.h> +#include <tdeapplication.h> #include <tqpushbutton.h> #include <tqlabel.h> #include <tqobject.h> @@ -30,7 +30,7 @@ TQFont default_font("Helvetica", 12); -KApplication *a; +TDEApplication *a; TopLevel::TopLevel(TQWidget *parent, const char *name) : TQWidget(parent, name) @@ -90,7 +90,7 @@ void TopLevel::okPressed() int main( int argc, char ** argv ) { - a = new KApplication ( argc, argv, "KTabCtlTest" ); + a = new TDEApplication ( argc, argv, "KTabCtlTest" ); a->setFont(default_font); diff --git a/tdeui/tests/ktabwidgettest.cpp b/tdeui/tests/ktabwidgettest.cpp index 32ed5c89f..64d2795fc 100644 --- a/tdeui/tests/ktabwidgettest.cpp +++ b/tdeui/tests/ktabwidgettest.cpp @@ -2,8 +2,8 @@ #include <tqlayout.h> #include <tqdragobject.h> -#include <kapplication.h> -#include <kcmdlineargs.h> +#include <tdeapplication.h> +#include <tdecmdlineargs.h> #include <kinputdialog.h> #include <kdebug.h> @@ -354,8 +354,8 @@ void Test::toggleLabels(bool state) int main(int argc, char** argv ) { - KCmdLineArgs::init(argc, argv, "ktabwidgettest", "ktabwidget test app", "1.0"); - KApplication app(argc, argv); + TDECmdLineArgs::init(argc, argv, "ktabwidgettest", "ktabwidget test app", "1.0"); + TDEApplication app(argc, argv); Test *t = new Test(); app.setMainWidget( t ); diff --git a/tdeui/tests/ktextedittest.cpp b/tdeui/tests/ktextedittest.cpp index d43f77260..6570bf26d 100644 --- a/tdeui/tests/ktextedittest.cpp +++ b/tdeui/tests/ktextedittest.cpp @@ -17,14 +17,14 @@ Boston, MA 02110-1301, USA. */ -#include <kapplication.h> +#include <tdeapplication.h> #include <ktextedit.h> #include <tqfile.h> int main( int argc, char **argv ) { - KApplication app( argc, argv, "ktextedittest" ); + TDEApplication app( argc, argv, "ktextedittest" ); KTextEdit *edit = new KTextEdit(); edit->setReadOnly( true ); edit->setCheckSpellingEnabled( true ); diff --git a/tdeui/tests/ktimewidgettest.cpp b/tdeui/tests/ktimewidgettest.cpp index 324accc7d..731dc3219 100644 --- a/tdeui/tests/ktimewidgettest.cpp +++ b/tdeui/tests/ktimewidgettest.cpp @@ -1,11 +1,11 @@ #include "ktimewidget.h" -#include <kapplication.h> -#include <klocale.h> +#include <tdeapplication.h> +#include <tdelocale.h> int main(int argc, char** argv) { - KLocale::setMainCatalogue("tdelibs"); - KApplication app(argc, argv, "KTimeWidgettest"); + TDELocale::setMainCatalogue("tdelibs"); + TDEApplication app(argc, argv, "KTimeWidgettest"); KTimeWidget timeWidget; app.setMainWidget(&timeWidget); timeWidget.show(); diff --git a/tdeui/tests/kunbalancedgrdtest.cpp b/tdeui/tests/kunbalancedgrdtest.cpp index 7f5b2cc78..40904000b 100644 --- a/tdeui/tests/kunbalancedgrdtest.cpp +++ b/tdeui/tests/kunbalancedgrdtest.cpp @@ -1,5 +1,5 @@ #include "kunbalancedgrdtest.h" -#include <kapplication.h> +#include <tdeapplication.h> #include <kpixmapeffect.h> #include <tqpainter.h> #include <tqstring.h> @@ -166,7 +166,7 @@ void myTopWidget::rebalance() int main(int argc, char **argv) { - KApplication *app = new KApplication(argc, argv, "KUnbalancedGradientTest"); + TDEApplication *app = new TDEApplication(argc, argv, "KUnbalancedGradientTest"); myTopWidget w; app->setMainWidget(&w); w.show(); diff --git a/tdeui/tests/kwizardtest.cpp b/tdeui/tests/kwizardtest.cpp index 91974263e..0635188d0 100644 --- a/tdeui/tests/kwizardtest.cpp +++ b/tdeui/tests/kwizardtest.cpp @@ -20,12 +20,12 @@ #include <tqlabel.h> #include <tqlayout.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kwizard.h> int main(int argc, char **argv) { - KApplication a(argc,argv,"kwizardtest"); + TDEApplication a(argc,argv,"kwizardtest"); KWizard *wiz = new KWizard(0, "kwizardtest", false); TQObject::connect((TQObject*) wiz->cancelButton(), TQT_SIGNAL(clicked()), &a, TQT_SLOT(quit())); diff --git a/tdeui/tests/kwordwraptest.cpp b/tdeui/tests/kwordwraptest.cpp index ad60bd897..690fbf157 100644 --- a/tdeui/tests/kwordwraptest.cpp +++ b/tdeui/tests/kwordwraptest.cpp @@ -16,14 +16,14 @@ * Boston, MA 02110-1301, USA. */ -#include <kapplication.h> +#include <tdeapplication.h> #include <kdebug.h> #include <tqwidget.h> #include "kwordwrap.h" int main(int argc, char *argv[]) { - KApplication app(argc, argv, "KWordWrapTest"); + TDEApplication app(argc, argv, "KWordWrapTest"); TQFont font( "helvetica", 12 ); // let's hope we all have the same... TQFontMetrics fm( font ); diff --git a/tdeui/tests/kxmlguitest.cpp b/tdeui/tests/kxmlguitest.cpp index a903aeb3f..1a79526aa 100644 --- a/tdeui/tests/kxmlguitest.cpp +++ b/tdeui/tests/kxmlguitest.cpp @@ -1,10 +1,10 @@ #include "kxmlguitest.h" -#include <kapplication.h> -#include <kmainwindow.h> +#include <tdeapplication.h> +#include <tdemainwindow.h> #include <kxmlguifactory.h> #include <kxmlguiclient.h> #include <kxmlguibuilder.h> -#include <kaction.h> +#include <tdeaction.h> #include <kdebug.h> #include <kstdaction.h> #include <kstandarddirs.h> @@ -18,13 +18,13 @@ void Client::slotSec() int main( int argc, char **argv ) { - KApplication app( argc, argv, "kxmlguitest" ); + TDEApplication app( argc, argv, "kxmlguitest" ); // KXMLGUIClient looks in the "data" resource for the .rc files // Let's add $PWD (ideally $srcdir instead...) to it - KGlobal::dirs()->addResourceDir( "data", TQDir::currentDirPath() ); + TDEGlobal::dirs()->addResourceDir( "data", TQDir::currentDirPath() ); - KMainWindow *mainwindow = new KMainWindow; + TDEMainWindow *mainwindow = new TDEMainWindow; TQLineEdit* line = new TQLineEdit( mainwindow ); mainwindow->setCentralWidget( line ); @@ -36,10 +36,10 @@ int main( int argc, char **argv ) KXMLGUIFactory *factory = new KXMLGUIFactory( builder ); Client *shell = new Client; - shell->setInstance( new KInstance( "konqueror" ) ); + shell->setInstance( new TDEInstance( "konqueror" ) ); shell->instance()->dirs()->addResourceDir( "data", TQDir::currentDirPath() ); - (void)new KAction( "Split", "view_left_right", 0, 0, 0, shell->actionCollection(), "splitviewh" ); + (void)new TDEAction( "Split", "view_left_right", 0, 0, 0, shell->actionCollection(), "splitviewh" ); shell->setXMLFile( "./kxmlguitest_shell.rc" ); @@ -47,8 +47,8 @@ int main( int argc, char **argv ) Client *part = new Client; - (void)new KAction( "decfont", "viewmag-", 0, 0, 0, part->actionCollection(), "decFontSizes" ); - (void)new KAction( "sec", "unlock", Qt::ALT + Qt::Key_1, part, TQT_SLOT( slotSec() ), part->actionCollection(), "security" ); + (void)new TDEAction( "decfont", "viewmag-", 0, 0, 0, part->actionCollection(), "decFontSizes" ); + (void)new TDEAction( "sec", "unlock", Qt::ALT + Qt::Key_1, part, TQT_SLOT( slotSec() ), part->actionCollection(), "security" ); part->setXMLFile( "./kxmlguitest_part.rc" ); diff --git a/tdeui/tests/kxmlguitest.h b/tdeui/tests/kxmlguitest.h index 1adb1a14b..bc88711f7 100644 --- a/tdeui/tests/kxmlguitest.h +++ b/tdeui/tests/kxmlguitest.h @@ -11,7 +11,7 @@ public: Client() {} void setXMLFile( const TQString &f, bool merge = true ) { KXMLGUIClient::setXMLFile( f, merge ); } - void setInstance( KInstance *inst ) { KXMLGUIClient::setInstance( inst ); } + void setInstance( TDEInstance *inst ) { KXMLGUIClient::setInstance( inst ); } public slots: void slotSec(); diff --git a/tdeui/tests/kxmlguitest_part.rc b/tdeui/tests/kxmlguitest_part.rc index 84f5e4f57..b6454cf30 100644 --- a/tdeui/tests/kxmlguitest_part.rc +++ b/tdeui/tests/kxmlguitest_part.rc @@ -1,5 +1,5 @@ <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"> -<kpartgui name="khtmlpart" version="7"> +<kpartgui name="tdehtmlpart" version="7"> <ToolBar name="mainToolBar"><text>Main Toolbar</text> <Action name="decFontSizes" /> <Separator /> diff --git a/tdeui/tests/kaccelgentest.cpp b/tdeui/tests/tdeaccelgentest.cpp index f5f95ac57..bd456aefd 100644 --- a/tdeui/tests/kaccelgentest.cpp +++ b/tdeui/tests/tdeaccelgentest.cpp @@ -1,4 +1,4 @@ -#include "kaccelgen.h" +#include "tdeaccelgen.h" #include <tqstringlist.h> @@ -30,7 +30,7 @@ int main() << "&yoyo && dyne"; TQStringList output; - KAccelGen::generate( input, output ); + TDEAccelGen::generate( input, output ); check( "TQStringList value generation", expected, output ); TQMap<TQString,TQString> map; @@ -39,13 +39,13 @@ int main() } input.sort(); expected.clear(); - KAccelGen::generate( input, expected ); + TDEAccelGen::generate( input, expected ); output.clear(); - KAccelGen::generateFromValues( map, output ); + TDEAccelGen::generateFromValues( map, output ); check( "map value generation", expected, output ); output.clear(); - KAccelGen::generateFromKeys( map, output ); + TDEAccelGen::generateFromKeys( map, output ); check( "map key generation", expected, output ); } diff --git a/tdeui/tests/tdeactiontest.cpp b/tdeui/tests/tdeactiontest.cpp new file mode 100644 index 000000000..dcec16189 --- /dev/null +++ b/tdeui/tests/tdeactiontest.cpp @@ -0,0 +1,38 @@ + +#include <tqguardedptr.h> + +#include <tdeapplication.h> +#include <tdeaction.h> + +#include <assert.h> + +int main( int argc, char **argv ) +{ + TDEApplication app( argc, argv, "tdeactiontest" ); + + TDEActionCollection coll( static_cast<TQObject *>( 0 ) ); + + TQGuardedPtr<TDEAction> action1 = new TDERadioAction("test",0, &coll); + TQGuardedPtr<TDEAction> action2 = new TDERadioAction("test",0, &coll); + TQGuardedPtr<TDEAction> action3 = new TDERadioAction("test",0, &coll); + TQGuardedPtr<TDEAction> action4 = new TDERadioAction("test",0, &coll); + TQGuardedPtr<TDEAction> action5 = new TDERadioAction("test",0, &coll); + TQGuardedPtr<TDEAction> action6 = new TDERadioAction("test",0, &coll); + TQGuardedPtr<TDEAction> action7 = new TDERadioAction("test",0, &coll); + + coll.clear(); + assert( coll.isEmpty() ); + + assert( action1.isNull() ); + assert( action2.isNull() ); + assert( action3.isNull() ); + assert( action4.isNull() ); + assert( action5.isNull() ); + assert( action6.isNull() ); + assert( action7.isNull() ); + + return 0; +} + +/* vim: et sw=4 ts=4 + */ diff --git a/tdeui/tests/kfontdialogtest.cpp b/tdeui/tests/tdefontdialogtest.cpp index 205fd48f7..ff7ac2840 100644 --- a/tdeui/tests/kfontdialogtest.cpp +++ b/tdeui/tests/tdefontdialogtest.cpp @@ -24,26 +24,26 @@ */ -#include <kapplication.h> -#include "kfontdialog.h" -#include <kconfig.h> +#include <tdeapplication.h> +#include "tdefontdialog.h" +#include <tdeconfig.h> int main( int argc, char **argv ) { - KApplication app( argc, argv, "KFontDialogTest" ); + TDEApplication app( argc, argv, "TDEFontDialogTest" ); - KConfig aConfig; - aConfig.setGroup( "KFontDialog-test" ); + TDEConfig aConfig; + aConfig.setGroup( "TDEFontDialog-test" ); app.setFont(TQFont("Helvetica",12)); // TQFont font = TQFont("Times",18,TQFont::Bold); TQFont font = aConfig.readFontEntry( "Chosen" ); - int nRet = KFontDialog::getFont(font); + int nRet = TDEFontDialog::getFont(font); int flags; - nRet = KFontDialog::getFontDiff(font, flags); + nRet = TDEFontDialog::getFontDiff(font, flags); aConfig.writeEntry( "Chosen", font, true ); aConfig.sync(); diff --git a/tdeui/tests/tdelistviewtest.cpp b/tdeui/tests/tdelistviewtest.cpp new file mode 100644 index 000000000..c2a0e78cf --- /dev/null +++ b/tdeui/tests/tdelistviewtest.cpp @@ -0,0 +1,39 @@ +#include <tdelistview.h> +#include <tdeapplication.h> +#include <kdialogbase.h> +#include <tqvbox.h> + + +int main( int argc, char **argv ) +{ + TDEApplication app( argc, argv, "tdelistviewtest" ); + KDialogBase dialog; + TDEListView *view = new TDEListView( dialog.makeVBoxMainWidget() ); + view->setSelectionModeExt( TDEListView::FileManager ); + view->setDragEnabled( true ); + view->setItemsMovable( false ); + view->setAcceptDrops( true ); + view->addColumn("Column 1"); + view->addColumn("Column 2"); + view->addColumn("Column 3"); + + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 1"); + new TDEListViewItem( view, "Item 2", "Some more", "Hi Mom :)" ); + + view->restoreLayout( TDEGlobal::config(), "ListView" ); + + new TDEListViewItem( view, "Item 3" ); + + dialog.exec(); + view->saveLayout( TDEGlobal::config(), "ListView" ); + + return 0; +} diff --git a/tdeui/tests/kmainwindowrestoretest.cpp b/tdeui/tests/tdemainwindowrestoretest.cpp index 7415085ac..559348ec0 100644 --- a/tdeui/tests/kmainwindowrestoretest.cpp +++ b/tdeui/tests/tdemainwindowrestoretest.cpp @@ -1,7 +1,7 @@ -#include "kmainwindowrestoretest.h" +#include "tdemainwindowrestoretest.h" -#include <kapplication.h> +#include <tdeapplication.h> #include <tqlabel.h> @@ -14,7 +14,7 @@ int main( int argc, char * argv[] ) { - KApplication app( argc, argv, "kmainwindowrestoretest" ); + TDEApplication app( argc, argv, "tdemainwindowrestoretest" ); if ( kapp->isRestored() ) { kRestoreMainWindows< MainWin1, MainWin2, MainWin3 >(); @@ -38,4 +38,4 @@ int main( int argc, char * argv[] ) { return app.exec(); } -#include "kmainwindowrestoretest.moc" +#include "tdemainwindowrestoretest.moc" diff --git a/tdeui/tests/tdemainwindowrestoretest.h b/tdeui/tests/tdemainwindowrestoretest.h new file mode 100644 index 000000000..7d02e4aca --- /dev/null +++ b/tdeui/tests/tdemainwindowrestoretest.h @@ -0,0 +1,48 @@ +#ifndef _TDEUI_TESTS_KMAINWINDOWRESTORETEST_H_ +#define _TDEUI_TESTS_KMAINWINDOWRESTORETEST_H_ + +#include <tdemainwindow.h> + +class MainWin1 : public TDEMainWindow { + Q_OBJECT +public: + MainWin1() : TDEMainWindow() {} + virtual ~MainWin1() {} +}; + +class MainWin2 : public TDEMainWindow { + Q_OBJECT +public: + MainWin2() : TDEMainWindow() {} + virtual ~MainWin2() {} +}; + +class MainWin3 : public TDEMainWindow { + Q_OBJECT +public: + MainWin3() : TDEMainWindow() {} + virtual ~MainWin3() {} +}; + +class MainWin4 : public TDEMainWindow { + Q_OBJECT +public: + MainWin4() : TDEMainWindow() {} + virtual ~MainWin4() {} +}; + +class MainWin5 : public TDEMainWindow { + Q_OBJECT +public: + MainWin5() : TDEMainWindow() {} + virtual ~MainWin5() {} +}; + +class MainWin6 : public TDEMainWindow { + Q_OBJECT +public: + MainWin6() : TDEMainWindow() {} + virtual ~MainWin6() {} +}; + +#endif // _TDEUI_TESTS_KMAINWINDOWRESTORETEST_H_ diff --git a/tdeui/tests/kmainwindowtest.cpp b/tdeui/tests/tdemainwindowtest.cpp index 5b7afd36f..b19818d4c 100644 --- a/tdeui/tests/kmainwindowtest.cpp +++ b/tdeui/tests/tdemainwindowtest.cpp @@ -1,11 +1,11 @@ #include <tqtimer.h> #include <tqlabel.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kstatusbar.h> -#include <kmenubar.h> +#include <tdemenubar.h> -#include "kmainwindowtest.h" +#include "tdemainwindowtest.h" MainWindow::MainWindow() { @@ -24,7 +24,7 @@ void MainWindow::showMessage() int main( int argc, char **argv ) { - KApplication app( argc, argv, "kmainwindowtest" ); + TDEApplication app( argc, argv, "tdemainwindowtest" ); MainWindow* mw = new MainWindow; // deletes itself when closed mw->show(); @@ -32,7 +32,7 @@ int main( int argc, char **argv ) return app.exec(); } -#include "kmainwindowtest.moc" +#include "tdemainwindowtest.moc" /* vim: et sw=4 ts=4 */ diff --git a/tdeui/tests/kmainwindowtest.h b/tdeui/tests/tdemainwindowtest.h index 4fb426ac5..b7c5d9e3c 100644 --- a/tdeui/tests/kmainwindowtest.h +++ b/tdeui/tests/tdemainwindowtest.h @@ -1,9 +1,9 @@ #ifndef KMAINWINDOWTEST_H #define KMAINWINDOWTEST_H -#include <kmainwindow.h> +#include <tdemainwindow.h> -class MainWindow : public KMainWindow +class MainWindow : public TDEMainWindow { Q_OBJECT public: diff --git a/tdeui/tests/kpopuptest.cpp b/tdeui/tests/tdepopuptest.cpp index 3db71106b..f9a97bad4 100644 --- a/tdeui/tests/kpopuptest.cpp +++ b/tdeui/tests/tdepopuptest.cpp @@ -1,11 +1,11 @@ -#include <kapplication.h> +#include <tdeapplication.h> #include <tqwidget.h> #include <tqcursor.h> -#include "kpopupmenu.h" +#include "tdepopupmenu.h" class DemoWidget : public TQWidget { private: - KPopupMenu *menu; + TDEPopupMenu *menu; void mousePressEvent(TQMouseEvent *) { @@ -20,7 +20,7 @@ void paintEvent(TQPaintEvent *) public: DemoWidget() : TQWidget() { - menu = new KPopupMenu("Popup Menu:"); + menu = new TDEPopupMenu("Popup Menu:"); menu->insertItem("Item1"); menu->insertItem("Item2"); menu->insertSeparator(); @@ -30,7 +30,7 @@ public: int main(int argc, char **argv) { - KApplication app(argc, argv, "kpopupmenutest"); + TDEApplication app(argc, argv, "tdepopupmenutest"); DemoWidget w; app.setMainWidget(&w); w.setFont(TQFont("helvetica", 12, TQFont::Bold), true); diff --git a/tdeui/tests/kspelltest.cpp b/tdeui/tests/tdespelltest.cpp index 9180ed376..5ec103b99 100644 --- a/tdeui/tests/kspelltest.cpp +++ b/tdeui/tests/tdespelltest.cpp @@ -16,8 +16,8 @@ Boston, MA 02110-1301, USA. */ -#include "kspell.h" -#include <kapplication.h> +#include "tdespell.h" +#include <tdeapplication.h> #include <kdebug.h> #include <tqstring.h> @@ -26,7 +26,7 @@ int main(int argc, char **argv) { - KApplication *app = new KApplication(argc, argv, "KSpellTest"); + TDEApplication *app = new TDEApplication(argc, argv, "KSpellTest"); // test ASCII //TQString text( "I have noo idee of how to wride englisch or englisch" ); diff --git a/tdeui/tests/ktoolbarlabelactiontest.cpp b/tdeui/tests/tdetoolbarlabelactiontest.cpp index 020834605..b919c2725 100644 --- a/tdeui/tests/ktoolbarlabelactiontest.cpp +++ b/tdeui/tests/tdetoolbarlabelactiontest.cpp @@ -18,19 +18,19 @@ #include <tqguardedptr.h> -#include <kapplication.h> -#include <kmainwindow.h> +#include <tdeapplication.h> +#include <tdemainwindow.h> #include <klineedit.h> -#include <klistview.h> +#include <tdelistview.h> #include <kstandarddirs.h> -#include <ktoolbarlabelaction.h> +#include <tdetoolbarlabelaction.h> #include <ksqueezedtextlabel.h> #include <kdebug.h> #include <tqvbox.h> #include <assert.h> -class MainWindow : public KMainWindow +class MainWindow : public TDEMainWindow { public: MainWindow() @@ -47,7 +47,7 @@ public: // first constructor - KToolBarLabelAction* label1 = new KToolBarLabelAction("&Label 1", 0, + TDEToolBarLabelAction* label1 = new TDEToolBarLabelAction("&Label 1", 0, 0, 0, actionCollection(), "label1"); @@ -55,8 +55,8 @@ public: KLineEdit* lineEdit = new KLineEdit(this); new KWidgetAction(lineEdit, "Line Edit", 0, this, 0, actionCollection(), "lineEdit"); - KToolBarLabelAction* label2 = - new KToolBarLabelAction(lineEdit, "L&abel 2", 0, 0, 0, + TDEToolBarLabelAction* label2 = + new TDEToolBarLabelAction(lineEdit, "L&abel 2", 0, 0, 0, actionCollection(), "label2"); @@ -69,7 +69,7 @@ public: ("&Really long, long, long and boring text goes here", this, "kde toolbar widget"); - KToolBarLabelAction* label3 = new KToolBarLabelAction(customLabel, 0, 0, 0, + TDEToolBarLabelAction* label3 = new TDEToolBarLabelAction(customLabel, 0, 0, 0, actionCollection(), "label3"); @@ -78,15 +78,15 @@ public: // customLabel->setText("&test me again some time soon"); - createGUI("ktoolbarlabelactiontestui.rc"); + createGUI("tdetoolbarlabelactiontestui.rc"); } }; int main( int argc, char **argv ) { - KApplication app( argc, argv, "ktoolbarlabelactiontest" ); + TDEApplication app( argc, argv, "tdetoolbarlabelactiontest" ); - KGlobal::instance()->dirs()->addResourceDir("data", "."); + TDEGlobal::instance()->dirs()->addResourceDir("data", "."); MainWindow* mw = new MainWindow; app.setMainWidget(mw); diff --git a/tdeui/tests/ktoolbarlabelactiontestui.rc b/tdeui/tests/tdetoolbarlabelactiontestui.rc index 75d02e54e..0a0e03091 100644 --- a/tdeui/tests/ktoolbarlabelactiontestui.rc +++ b/tdeui/tests/tdetoolbarlabelactiontestui.rc @@ -1,5 +1,5 @@ <!DOCTYPE kpartgui> -<kpartgui name="ktoolbarlabelactiontest" version="0.1"> +<kpartgui name="tdetoolbarlabelactiontest" version="0.1"> <ToolBar> <Action name="label1"/> <Action name="label2"/> diff --git a/tdeui/tests/twindowtest.cpp b/tdeui/tests/twindowtest.cpp index 02b47c2d8..77e01d289 100644 --- a/tdeui/tests/twindowtest.cpp +++ b/tdeui/tests/twindowtest.cpp @@ -9,36 +9,36 @@ #include <stdlib.h> #include <kstatusbar.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kcombobox.h> #include <khelpmenu.h> -#include <kcmdlineargs.h> -#include <kmenubar.h> -#include <ktoolbarradiogroup.h> +#include <tdecmdlineargs.h> +#include <tdemenubar.h> +#include <tdetoolbarradiogroup.h> #include <kiconloader.h> -#include <kpopupmenu.h> +#include <tdepopupmenu.h> #include <tqmultilineedit.h> #include "twindowtest.h" -#include <kglobal.h> +#include <tdeglobal.h> //#include <dclock.h> /* - Ok this is a constructor of our top widget. It inherits KMainWindow. + Ok this is a constructor of our top widget. It inherits TDEMainWindow. In constructor wi will create all of our interface elements: menubar, toolbar(s), statusbar, and main widget. Non of those interface is obligatory, i.e. you don't have to use menubar, toolbars or statusbar if you don't want to. Theoreticly, you don't need even main widget (but in that case, you'll get blank - KMainWindow). + TDEMainWindow). */ static int itemId = 0; testWindow::testWindow (TQWidget *parent, const char *name) - : KMainWindow (parent,name) + : TDEMainWindow (parent,name) { ena=false; setCaption("test window"); @@ -55,7 +55,7 @@ setAutoSaveSettings(); menuBar->insertItem ("&File", fileMenu); // We insert item "Exit" with accelerator ALT-Q, and connect // it to application's exit-slot. - fileMenu->insertItem ("&Exit", KApplication::kApplication(), + fileMenu->insertItem ("&Exit", TDEApplication::kApplication(), TQT_SLOT( quit() ), ALT + Key_Q ); // Another popup... @@ -148,12 +148,12 @@ setAutoSaveSettings(); // Now add another button and align it right pix = BarIcon("exit"); - tb->insertButton(pix, 6, TQT_SIGNAL(clicked()), KApplication::kApplication(), + tb->insertButton(pix, 6, TQT_SIGNAL(clicked()), TDEApplication::kApplication(), TQT_SLOT( quit() ), true, "Exit"); tb->alignItemRight (6); // Another toolbar - tb1 = new KToolBar(this, TQMainWindow::DockTop); // this one is normal and has separators + tb1 = new TDEToolBar(this, TQMainWindow::DockTop); // this one is normal and has separators pix = BarIcon("filenew"); @@ -194,7 +194,7 @@ setAutoSaveSettings(); tb1->setToggle(7); //Create - rg = new KToolBarRadioGroup (tb1); + rg = new TDEToolBarRadioGroup (tb1); rg->addButton(4); rg->addButton(5); @@ -230,7 +230,7 @@ setAutoSaveSettings(); //... and main widget setCentralWidget (widget); - // This is not strictly related to toolbars, menubars or KMainWindow. + // This is not strictly related to toolbars, menubars or TDEMainWindow. // Setup popup for completions completions = new TQPopupMenu; @@ -328,7 +328,7 @@ void testWindow::slotCompletion() completions->popup(TQCursor::pos()); // This popup should understunf keys up and down /* This is just an example. KLined automatically sets cursor at end of string - when ctrl-d or ctrl-s is pressed. KToolBar will also put cursor at end of text in Lined + when ctrl-d or ctrl-s is pressed. TDEToolBar will also put cursor at end of text in Lined after inserting text with setLinedText (...). */ @@ -408,7 +408,7 @@ void testWindow::slotExit () { TQPixmap pix; pix = BarIcon("exit"); - tb->insertButton(pix, 6, TQT_SIGNAL(clicked()), KApplication::kApplication(), + tb->insertButton(pix, 6, TQT_SIGNAL(clicked()), TDEApplication::kApplication(), TQT_SLOT( quit() ), true, "Exit"); tb->alignItemRight (6); exitB = true; @@ -502,9 +502,9 @@ void testWindow::slotMakeItem3Current() int main( int argc, char *argv[] ) { int i; - KCmdLineArgs::init(argc, argv, "KWindowTest", "description", "version"); + TDECmdLineArgs::init(argc, argv, "KWindowTest", "description", "version"); - KApplication *myApp = new KApplication(); + TDEApplication *myApp = new TDEApplication(); testWindow *test = new testWindow; myApp->setMainWidget(test); diff --git a/tdeui/tests/twindowtest.h b/tdeui/tests/twindowtest.h index 14e2a6da8..d1d9d460e 100644 --- a/tdeui/tests/twindowtest.h +++ b/tdeui/tests/twindowtest.h @@ -4,16 +4,16 @@ #include <tqpopupmenu.h> #include <tqtimer.h> #include <tqprogressbar.h> -#include <kmenubar.h> +#include <tdemenubar.h> #include <kstatusbar.h> -#include <ktoolbar.h> -#include <kmainwindow.h> +#include <tdetoolbar.h> +#include <tdemainwindow.h> class TQMultiLineEdit; -class KToolBarRadioGroup; +class TDEToolBarRadioGroup; class KHelpMenu; -class testWindow : public KMainWindow +class testWindow : public TDEMainWindow { Q_OBJECT @@ -56,8 +56,8 @@ protected: TQPopupMenu *toolBarMenu; KStatusBar *statusBar; KHelpMenu *helpMenu; - KToolBar *tb; - KToolBar *tb1; + TDEToolBar *tb; + TDEToolBar *tb1; bool lineL; bool exitB; bool greenF; @@ -65,7 +65,7 @@ protected: TQMultiLineEdit *widget; TQTimer *timer; TQProgressBar *pr; - KToolBarRadioGroup *rg; + TDEToolBarRadioGroup *rg; }; #endif diff --git a/tdeui/twindowlistmenu.cpp b/tdeui/twindowlistmenu.cpp index b1d05c57e..bc2df2f66 100644 --- a/tdeui/twindowlistmenu.cpp +++ b/tdeui/twindowlistmenu.cpp @@ -33,12 +33,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <twin.h> #include <twinmodule.h> -#include <klocale.h> +#include <tdelocale.h> #include <kstringhandler.h> #include <netwm.h> -#include <kapplication.h> -#include <kstyle.h> +#include <tdeapplication.h> +#include <tdestyle.h> #include <dcopclient.h> #undef Bool @@ -83,7 +83,7 @@ int NameSortedInfoList::compareItems( TQPtrCollection::Item s1, TQPtrCollection: } // namespace KWindowListMenu::KWindowListMenu(TQWidget *parent, const char *name) - : KPopupMenu(parent, name) + : TDEPopupMenu(parent, name) { twin_module = new KWinModule(TQT_TQOBJECT(this)); @@ -251,7 +251,7 @@ void KWindowListMenu::slotCascadeWindows() } void KWindowListMenu::virtual_hook( int id, void* data ) -{ KPopupMenu::virtual_hook( id, data ); } +{ TDEPopupMenu::virtual_hook( id, data ); } #endif // Q_WS_X11 diff --git a/tdeui/twindowlistmenu.h b/tdeui/twindowlistmenu.h index dcd81826f..20da236f1 100644 --- a/tdeui/twindowlistmenu.h +++ b/tdeui/twindowlistmenu.h @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __twindowlistmenu_h__ #define __twindowlistmenu_h__ -#include <kpopupmenu.h> +#include <tdepopupmenu.h> #include <tqmap.h> #ifdef Q_MOC_RUN @@ -37,7 +37,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class KWinModule; class KWindowListMenuPrivate; -class TDEUI_EXPORT KWindowListMenu : public KPopupMenu +class TDEUI_EXPORT KWindowListMenu : public TDEPopupMenu { Q_OBJECT |