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 /bab | |
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 'bab')
-rw-r--r-- | bab/Makefile.am | 2 | ||||
-rw-r--r-- | bab/bab.desktop | 2 | ||||
-rw-r--r-- | bab/bab.h | 4 | ||||
-rw-r--r-- | bab/main.cpp | 56 | ||||
-rw-r--r-- | bab/styleconfdialog.cpp | 2 | ||||
-rw-r--r-- | bab/styleconfdialog.h | 4 |
6 files changed, 35 insertions, 35 deletions
diff --git a/bab/Makefile.am b/bab/Makefile.am index 7f65671..90f203a 100644 --- a/bab/Makefile.am +++ b/bab/Makefile.am @@ -19,4 +19,4 @@ bin_PROGRAMS = bab # the application source, library search path, and link libraries bab_SOURCES = main.cpp styleconfdialog.cpp bab_iface.skel bab_LDFLAGS = $(KDE_RPATH) $(all_libraries) -bab_LDADD = $(LIB_QT) -lDCOP $(LIB_KDECORE) $(LIB_KDEUI) +bab_LDADD = $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) diff --git a/bab/bab.desktop b/bab/bab.desktop index 534daa4..65206f5 100644 --- a/bab/bab.desktop +++ b/bab/bab.desktop @@ -5,6 +5,6 @@ Name[xx]=xxbabxx Exec=bab %i %m -caption "%c" Icon=baghira Type=Application -DocPath= +X-DocPath= Comment=Access to the big black cat Terminal=0 @@ -29,7 +29,7 @@ #include <tqwidget.h> #include <tqpixmap.h> #include <tqsettings.h> -#include <kmainwindow.h> +#include <tdemainwindow.h> #include <ksystemtray.h> class bab; @@ -75,7 +75,7 @@ class TQCheckBox; * @author Thomas Lübking <baghira-style@gmx.net> * @version 0.1 */ -class bab : public KMainWindow +class bab : public TDEMainWindow { Q_OBJECT public: diff --git a/bab/main.cpp b/bab/main.cpp index b530769..4adf380 100644 --- a/bab/main.cpp +++ b/bab/main.cpp @@ -31,17 +31,17 @@ #include <tqvbox.h> #include <tqpainter.h> #include <dcopclient.h> -#include <kapplication.h> -// #include <kconfig.h> +#include <tdeapplication.h> +// #include <tdeconfig.h> #include <kiconloader.h> -#include <kaboutdata.h> -#include <kcmdlineargs.h> +#include <tdeaboutdata.h> +#include <tdecmdlineargs.h> #include <kipc.h> #include <klibloader.h> -#include <klocale.h> +#include <tdelocale.h> #include <kprocess.h> #if KDE_IS_VERSION(3,4,0) -#include <kwin.h> +#include <twin.h> #endif #include <stdio.h> #include <X11/Xlib.h> @@ -54,20 +54,20 @@ static const char description[] = static const char version[] = "cvs"; -static KCmdLineOptions options[] = +static TDECmdLineOptions options[] = { // { "+[URL]", I18N_NOOP( "Document to open." ), 0 }, - KCmdLineLastOption + TDECmdLineLastOption }; int main(int argc, char **argv) { - KAboutData about("bab", I18N_NOOP("BAB - Baghira Aqua/Brushed Switcher"), version, description, - KAboutData::License_GPL, "(C) 2004/2005 Thomas Lübking", 0, 0, "baghira-style@gmx.net"); + TDEAboutData about("bab", I18N_NOOP("BAB - Baghira Aqua/Brushed Switcher"), version, description, + TDEAboutData::License_GPL, "(C) 2004/2005 Thomas Lübking", 0, 0, "baghira-style@gmx.net"); about.addAuthor( "Thomas Lübking", 0, "baghira-style@gmx.net" ); - KCmdLineArgs::init(argc, argv, &about); - KCmdLineArgs::addCmdLineOptions( options ); - KApplication app; + TDECmdLineArgs::init(argc, argv, &about); + TDECmdLineArgs::addCmdLineOptions( options ); + TDEApplication app; DCOPClient* client = app.dcopClient(); client->registerAs( "bab", false); client->setDefaultObject( "babInterface" ); @@ -94,7 +94,7 @@ int main(int argc, char **argv) } -bab::bab() : KMainWindow(0,"bab",TQt::WStyle_StaysOnTop | TQt::WX11BypassWM ){ +bab::bab() : TDEMainWindow(0,"bab",TQt::WStyle_StaysOnTop | TQt::WX11BypassWM ){ bSwitcher = new BabSwitcher(this,"switcher"); TQToolTip::add(bSwitcher, i18n("leftclick toggles state<br>rightclick toggles setupmenu")); bSwitcher->show(); @@ -195,7 +195,7 @@ bab::~ bab() if (bSwitcher) delete bSwitcher; } -/*Taken from kcontrol, kcmshell style*/ +/*Taken from kcontrol, tdecmshell style*/ void bab::configureBaghira() { @@ -235,7 +235,7 @@ void bab::configureBaghira() TQObject *decoObject = 0; if (tw) { - KLibrary* library2 = loader->library( TQFile::encodeName("kwin_baghira_config") ); + KLibrary* library2 = loader->library( TQFile::encodeName("twin_baghira_config") ); if (!library2) { tqWarning("There was an error loading the configuration dialog for the deco."); @@ -247,7 +247,7 @@ void bab::configureBaghira() tqWarning("There was an error loading the configuration dialog for this style."); return; } - typedef TQObject*(* factoryRoutine2)( KConfig* conf, TQWidget* parent ); + typedef TQObject*(* factoryRoutine2)( TDEConfig* conf, TQWidget* parent ); factoryRoutine2 factory2 = (factoryRoutine2)(allocPtr2); decoObject = factory2( 0, tw ); decoConfig = (TQWidget*)tw->child("ConfigDialog"); @@ -266,7 +266,7 @@ void bab::configureBaghira() connect(dial, SIGNAL(defaults()), styleConfig, SLOT(defaults())); connect(dial, SIGNAL(save()), styleConfig, SLOT(save())); connect(dial, SIGNAL(defaults()), decoObject, SLOT(defaults())); - connect(dial, SIGNAL(save(KConfig*)), decoObject, SLOT(save(KConfig*))); + connect(dial, SIGNAL(save(TDEConfig*)), decoObject, SLOT(save(TDEConfig*))); if (dial->exec() == TQDialog::Accepted) { @@ -277,7 +277,7 @@ void bab::configureBaghira() KIPC::sendMessageAll(KIPC::ToolbarStyleChanged); } if (dial->isDecoDirty()) - kapp->dcopClient()->send("kwin", "KWinInterface", "reconfigure()", TQByteArray()); + kapp->dcopClient()->send("twin", "KWinInterface", "reconfigure()", TQByteArray()); } tw->removeChild( decoObject ); dial->insertChild( decoObject ); @@ -322,7 +322,7 @@ void bab::showEvent(TQShowEvent *e){ void bab::saveSettings(){ TQSettings *config = new TQSettings(); -// KConfig *config = new KConfig("baghirarc"); +// TDEConfig *config = new TDEConfig("baghirarc"); config->beginGroup("/baghira/BAB"); config->writeEntry("defaultState", DefStyle->currentItem()); config->writeEntry("roundCorners", cornerCheck->isChecked()); @@ -334,12 +334,12 @@ TQPoint *BabSwitcher::globalPos = new TQPoint(0,0); BabSwitcher::BabSwitcher(bab *parent, const char *name) : KSystemTray(parent,name), DCOPObject("babInterface") { - KIconLoader* iLoader = KGlobal::iconLoader(); - JaguarIcon = iLoader->loadIcon("bab_jaguar", KIcon::Small, 22); - PantherIcon = iLoader->loadIcon("bab_panther", KIcon::Small, 22); - iTunesIcon = iLoader->loadIcon("bab_itunes", KIcon::Small, 22); - TigerIcon = iLoader->loadIcon("bab_tiger", KIcon::Small, 22); - MilkIcon = iLoader->loadIcon("bab_milk", KIcon::Small, 22); + TDEIconLoader* iLoader = TDEGlobal::iconLoader(); + JaguarIcon = iLoader->loadIcon("bab_jaguar", TDEIcon::Small, 22); + PantherIcon = iLoader->loadIcon("bab_panther", TDEIcon::Small, 22); + iTunesIcon = iLoader->loadIcon("bab_itunes", TDEIcon::Small, 22); + TigerIcon = iLoader->loadIcon("bab_tiger", TDEIcon::Small, 22); + MilkIcon = iLoader->loadIcon("bab_milk", TDEIcon::Small, 22); installEventFilter(this); } @@ -462,7 +462,7 @@ TQString BabSwitcher::deco() void BabSwitcher::start(TQString name, TQString settings) { - KProcess proc; + TDEProcess proc; TQString section; int i = 0; bool done = false; if (name.contains(' ')) { @@ -491,7 +491,7 @@ void BabSwitcher::start(TQString name, TQString settings) symlink (tmpString.latin1(), tmpString2.latin1()); proc << name; } - proc.start(KProcess::DontCare); + proc.start(TDEProcess::DontCare); proc.detach(); } diff --git a/bab/styleconfdialog.cpp b/bab/styleconfdialog.cpp index e78cc46..5ab768d 100644 --- a/bab/styleconfdialog.cpp +++ b/bab/styleconfdialog.cpp @@ -19,7 +19,7 @@ */ #include "styleconfdialog.h" -#include <klocale.h> +#include <tdelocale.h> StyleConfigDialog::StyleConfigDialog(TQWidget* parent, TQString styleName): KDialogBase(parent, "StyleConfigDialog", diff --git a/bab/styleconfdialog.h b/bab/styleconfdialog.h index c4d8fc8..4eed340 100644 --- a/bab/styleconfdialog.h +++ b/bab/styleconfdialog.h @@ -23,7 +23,7 @@ #include <kdialogbase.h> -class KConfig; +class TDEConfig; class StyleConfigDialog: public KDialogBase { Q_OBJECT @@ -43,7 +43,7 @@ private slots: signals: void defaults(); void save(); - void save(KConfig*); + void save(TDEConfig*); private: bool m_styleDirty; |