diff options
author | Slávek Banko <[email protected]> | 2016-03-25 20:06:45 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2016-03-25 20:06:45 +0100 |
commit | 88b7febc2393324ee14940c1c41a8ddc342c35f6 (patch) | |
tree | b9a917fd3a40988e6e0134490f5357e5335c1c70 /bab/main.cpp | |
parent | 2ee99ab520931c5efe91123c85ba10064a45e95d (diff) | |
download | tde-style-baghira-88b7febc2393324ee14940c1c41a8ddc342c35f6.tar.gz tde-style-baghira-88b7febc2393324ee14940c1c41a8ddc342c35f6.zip |
Initial TDE conversion
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'bab/main.cpp')
-rw-r--r-- | bab/main.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
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, "[email protected]"); + TDEAboutData about("bab", I18N_NOOP("BAB - Baghira Aqua/Brushed Switcher"), version, description, + TDEAboutData::License_GPL, "(C) 2004/2005 Thomas Lübking", 0, 0, "[email protected]"); about.addAuthor( "Thomas Lübking", 0, "[email protected]" ); - 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(); } |