diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-03-25 20:06:45 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-03-25 20:06:45 +0100 |
commit | 88b7febc2393324ee14940c1c41a8ddc342c35f6 (patch) | |
tree | b9a917fd3a40988e6e0134490f5357e5335c1c70 /config | |
parent | 2ee99ab520931c5efe91123c85ba10064a45e95d (diff) | |
download | tde-style-baghira-88b7febc2393324ee14940c1c41a8ddc342c35f6.tar.gz tde-style-baghira-88b7febc2393324ee14940c1c41a8ddc342c35f6.zip |
Initial TDE conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'config')
-rw-r--r-- | config/Makefile.am | 2 | ||||
-rw-r--r-- | config/colordialog.cpp | 8 | ||||
-rw-r--r-- | config/kstyle_baghira_config.cpp | 64 | ||||
-rw-r--r-- | config/kstyle_baghira_config.h | 12 |
4 files changed, 43 insertions, 43 deletions
diff --git a/config/Makefile.am b/config/Makefile.am index 4c8bc59..fb84c20 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -7,7 +7,7 @@ kde_module_LTLIBRARIES = kstyle_baghira_config.la kstyle_baghira_config_la_SOURCES = kstyle_baghira_config.cpp colordialog.cpp colorpicker.cpp configdialog.ui help.ui about.ui # kstyle_baghira_config_la_METASOURCES = AUTO -kstyle_baghira_config_la_LIBADD = $(LIB_QT) -lDCOP $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) +kstyle_baghira_config_la_LIBADD = $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEIO) kstyle_baghira_config_la_LDFLAGS = -module -avoid-version $(all_libraries) -no-undefined $(KDE_PLUGIN) diff --git a/config/colordialog.cpp b/config/colordialog.cpp index 38279c8..3ad5504 100644 --- a/config/colordialog.cpp +++ b/config/colordialog.cpp @@ -7,8 +7,8 @@ #include <tqpixmap.h> #include <tqpushbutton.h> #include <tqstyle.h> -#include <kglobal.h> -#include <kglobalsettings.h> +#include <tdeglobal.h> +#include <tdeglobalsettings.h> #include <kcolordialog.h> #include <kiconloader.h> #include "colorpicker.h" @@ -45,7 +45,7 @@ ColorDialog::ColorDialog(TQWidget* parent, const char* name) : TQDialog( parent, TQVBoxLayout *topRight = new TQVBoxLayout(top); TQLabel *info = new TQLabel("<qt>Select custom colors or grab directly from screen.<br>Click image left to switch between items.</qt>",this); topRight->addWidget(info); - TQIconSet icon = KGlobal::iconLoader()->loadIconSet("colorpicker", KIcon::Small); + TQIconSet icon = TDEGlobal::iconLoader()->loadIconSet("colorpicker", TDEIcon::Small); buttonCP = new TQPushButton(icon, TQString::null, this); topRight->addWidget(buttonCP); TQLabel *lb = new TQLabel("From other app:",this); @@ -74,7 +74,7 @@ ColorDialog::ColorDialog(TQWidget* parent, const char* name) : TQDialog( parent, picker[High]->setColor(colorGroup().highlight()); picker[HighText]->setColor(colorGroup().highlightedText()); picker[ButText]->setColor(colorGroup().buttonText ()); - picker[Alternate]->setColor(KGlobalSettings::alternateBackgroundColor()); + picker[Alternate]->setColor(TDEGlobalSettings::alternateBackgroundColor()); for (int i = 0; i < NUMCOLORS; i++) picker[i]->blockSignals(false); // demo->repaint(false); diff --git a/config/kstyle_baghira_config.cpp b/config/kstyle_baghira_config.cpp index 337e810..ad43805 100644 --- a/config/kstyle_baghira_config.cpp +++ b/config/kstyle_baghira_config.cpp @@ -27,7 +27,7 @@ #include <tqfile.h> #include <tqfileinfo.h> #include <tqgroupbox.h> -#include <kfiledialog.h> +#include <tdefiledialog.h> #include <tqpainter.h> //#include <tqpalette.h> // #include <tqsettings.h> @@ -37,20 +37,20 @@ #include <tqlabel.h> #include <tqlineedit.h> #include <tqpixmap.h> -#include <klistview.h> +#include <tdelistview.h> #include <tqtabwidget.h> #include <tqtimer.h> #include <dcopclient.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kcolorbutton.h> -#include <kconfig.h> +#include <tdeconfig.h> #include <kimageeffect.h> -#include <klocale.h> -#include <kmessagebox.h> -#include <kglobal.h> -#include <kglobalsettings.h> +#include <tdelocale.h> +#include <tdemessagebox.h> +#include <tdeglobal.h> +#include <tdeglobalsettings.h> #include <kprocess.h> -#include <kparts/genericfactory.h> +#include <tdeparts/genericfactory.h> #include <X11/Xlib.h> #include <X11/Xatom.h> @@ -66,8 +66,8 @@ //#define VERSION "0.7" -#ifndef KDE_VERSION_STRING -#define KDE_VERSION_STRING "error" +#ifndef TDE_VERSION_STRING +#define TDE_VERSION_STRING "error" #endif #ifndef TQT_BUILD_KEY #define TQT_BUILD_KEY "error error error error" @@ -105,24 +105,24 @@ void kstyle_baghira_config::openHtml1() { TQStringList args; args << "exec" << "http://baghira.sf.net/"; - kapp->kdeinitExec("kfmclient", args); + kapp->tdeinitExec("kfmclient", args); } void kstyle_baghira_config::openHtml2() { TQStringList args; args << "exec" << "http://www.sf.net/projects/baghira/files/"; - kapp->kdeinitExec("kfmclient", args); + kapp->tdeinitExec("kfmclient", args); } void kstyle_baghira_config::startBab() { - kapp->kdeinitExec("bab"); + kapp->tdeinitExec("bab"); } void kstyle_baghira_config::startKRuler() { - kapp->kdeinitExec("kruler"); + kapp->tdeinitExec("kruler"); } TQImage* kstyle_baghira_config::tintButton(TQImage &src, TQColor c) @@ -296,7 +296,7 @@ kstyle_baghira_config::kstyle_baghira_config(TQWidget *parent, const char *name, TQWidget *rulesWidget = new TQWidget(dialog_->tabWidget); TQHBoxLayout *rwlh = new TQHBoxLayout(rulesWidget); - applist = new KListView(rulesWidget); + applist = new TDEListView(rulesWidget); applist->setFullWidth(true); #if KDE_IS_VERSION(3,3,91) applist->setShadeSortColumn(false); @@ -314,9 +314,9 @@ kstyle_baghira_config::kstyle_baghira_config(TQWidget *parent, const char *name, { TQFileInfo FI = TQFileInfo(d, d[i]); if (FI.isSymLink()) - applist->insertItem(new KListViewItem(applist, d[i], FI.readLink().section('/',-1,-1))); + applist->insertItem(new TDEListViewItem(applist, d[i], FI.readLink().section('/',-1,-1))); else - applist->insertItem(new KListViewItem(applist, d[i])); + applist->insertItem(new TDEListViewItem(applist, d[i])); } } rwlh->addWidget(applist); @@ -351,7 +351,7 @@ kstyle_baghira_config::kstyle_baghira_config(TQWidget *parent, const char *name, help_ = new Help(dialog_); about_ = new About(dialog_); about_->versionLabel->setText(VERSION); - about_->kdeLabel->setText(KDE_VERSION_STRING); + about_->kdeLabel->setText(TDE_VERSION_STRING); crCurrent = 0; crNotes[0] = "<qt>© 2003-2005 by Thomas Lübking<br>http://baghira.SourceForge.net</qt>"; crNotes[1] = "<qt>© \"Design\" 2001-2005 by Apple inc.<br>http://www.apple.com"; @@ -481,7 +481,7 @@ void kstyle_baghira_config::load() void kstyle_baghira_config::load(TQString &fileName) { - KConfig *config = new KConfig(fileName); + TDEConfig *config = new TDEConfig(fileName); // TQSettings config; config->setGroup("BAB"); // general Design @@ -576,7 +576,7 @@ void kstyle_baghira_config::load(TQString &fileName) config->setGroup("Sidebar"); delete config; - config = new KConfig("kdeglobals"); + config = new TDEConfig("kdeglobals"); config->setGroup( "Toolbar style" ); dialog_->toolbuttonHighColor->setColor(config->readColorEntry("HighlightColor", new TQColor(103,141,178)) ); delete config; @@ -666,7 +666,7 @@ void kstyle_baghira_config::save() void kstyle_baghira_config::changeTooluttonHighlightColor(const TQColor & color) { - KConfig *config = new KConfig("kdeglobals"); + TDEConfig *config = new TDEConfig("kdeglobals"); config->setGroup( "Toolbar style" ); config->writeEntry("HighlightColor", color); delete config; @@ -684,7 +684,7 @@ void kstyle_baghira_config::handleButtonStyles(int i) void kstyle_baghira_config::save(TQString &fileName) { // TQSettings *config = new TQSettings; - KConfig *config = new KConfig(fileName); + TDEConfig *config = new TDEConfig(fileName); config->setGroup("BAB"); //General Design config->writeEntry("defaultState", dialog_->defaultStyle->currentItem()); @@ -739,15 +739,15 @@ Hidden=true\n\ Type=Plugin\n\ Encoding=UTF-8\n\ Name=BaghiraMenu\n\ -X-KDE-Library=b_menu_panelapplet\n\ -X-KDE-UniqueApplet=true\n"; +X-TDE-Library=b_menu_panelapplet\n\ +X-TDE-UniqueApplet=true\n"; file.writeBlock( msg, tqstrlen(msg) ); file.close(); } else file.remove(); if (dialog_->replaceMenubar->isOn() != menuReplaced) - KApplication::dcopClient()->send("kicker", "default", "restart()", ""); + TDEApplication::dcopClient()->send("kicker", "default", "restart()", ""); //Srollbars config->writeEntry("Special_AnimateSlider", dialog_->animateSlider->isOn()); config->writeEntry("Special_ShadowSlider", dialog_->shadowSlider->isOn()); @@ -868,7 +868,7 @@ void kstyle_baghira_config::removeApp(TQString name) void kstyle_baghira_config::addApp(TQString string, TQString linkString) { - applist->insertItem(new KListViewItem(applist, string, linkString)); + applist->insertItem(new TDEListViewItem(applist, string, linkString)); applist->sort(); } @@ -950,13 +950,13 @@ void kstyle_baghira_config::menuToggled(bool active) { if (!active || !loadDone) return; - KConfigGroup menuConfig(KGlobal::config(), "KDE"); + TDEConfigGroup menuConfig(TDEGlobal::config(), "KDE"); if (!menuConfig.readBoolEntry("macStyle", false)) if (KMessageBox::questionYesNo(0, i18n("<qt>You just selected to replace kickers menu applet for the Mac like Menubar on top of the screen, but the Mac like style isn't selected anyway<br>Do you want to activate it now?</qt>"), 0L, KStdGuiItem::yes(), KStdGuiItem::no()) == KMessageBox::Yes) { - KProcess proc; - proc << "kcmshell" << "desktopbehavior"; - proc.start(KProcess::DontCare); + TDEProcess proc; + proc << "tdecmshell" << "desktopbehavior"; + proc.start(TDEProcess::DontCare); proc.detach(); } configChanged(); @@ -1179,7 +1179,7 @@ void AppSetter::resetColorPicker() colorDialog->picker[High]->setColor(colorGroup().highlight()); colorDialog->picker[HighText]->setColor(colorGroup().highlightedText()); colorDialog->picker[ButText]->setColor(colorGroup().buttonText ()); - colorDialog->picker[Alternate]->setColor(KGlobalSettings::alternateBackgroundColor()); + colorDialog->picker[Alternate]->setColor(TDEGlobalSettings::alternateBackgroundColor()); for (int i = 0; i < 8; i++) colorDialog->picker[i]->blockSignals(false); ((TQWidget*)colorDialog->demo)->repaint(false); diff --git a/config/kstyle_baghira_config.h b/config/kstyle_baghira_config.h index df97cc3..8b5afe1 100644 --- a/config/kstyle_baghira_config.h +++ b/config/kstyle_baghira_config.h @@ -21,15 +21,15 @@ #ifndef _KSTYLE_BAGHIRA_CONFIG_H_ #define _KSTYLE_BAGHIRA_CONFIG_H_ -//#include <kcmodule.h> +//#include <tdecmodule.h> #include <tqcolor.h> #include <tqimage.h> -#include <kaboutdata.h> +#include <tdeaboutdata.h> #include "configdialog.h" #include "help.h" #include "about.h" -class KListView; +class TDEListView; class TQPushButton; class AppSetter; class TQTimer; @@ -50,7 +50,7 @@ public: void save(TQString &fileName); // virtual int buttons(); virtual TQString quickHelp() const; - virtual const KAboutData *aboutData()const + virtual const TDEAboutData *aboutData()const { return myAboutData; }; public slots: @@ -78,11 +78,11 @@ protected: private: TQString crNotes[3]; AppSetter *appsetter; - KListView *applist; + TDEListView *applist; TQImage* tintButton(TQImage &src, TQColor c); TQImage* tintBrush( TQImage &img, TQColor c/*, int saturation*/ ); WId findWindow(); - KAboutData *myAboutData; + TDEAboutData *myAboutData; Config *dialog_; Help* help_; About* about_; |