summaryrefslogtreecommitdiffstats
path: root/noatun/library/app.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
commitb1057f437bf65300831a0ccb45b920787c6b318d (patch)
treef8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /noatun/library/app.cpp
parent4ddfca384ced9ad654213aef9dc2c3973720b980 (diff)
downloadtdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz
tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/library/app.cpp')
-rw-r--r--noatun/library/app.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/noatun/library/app.cpp b/noatun/library/app.cpp
index cf340f68..aaa4b9e6 100644
--- a/noatun/library/app.cpp
+++ b/noatun/library/app.cpp
@@ -69,7 +69,7 @@ NoatunApp::NoatunApp()
// set the default config data
// TODO: Maybe a first time wizard instead?
KConfig *config=KGlobal::config(); // +
- config->setGroup(TQString::null); // 1
+ config->setGroup(TQString()); // 1
if (!config->readEntry("Modules").length())
{
TQStringList modules;
@@ -88,9 +88,9 @@ NoatunApp::NoatunApp()
mLibraryLoader->add("dcopiface.plugin");
- new General(this); // 25
- new Plugins(this); // 149
-// new Types(this);
+ new General(TQT_TQOBJECT(this)); // 25
+ new Plugins(TQT_TQOBJECT(this)); // 149
+// new Types(TQT_TQOBJECT(this));
mPlayer=new Player; // 139
d->effects=new Effects; // 1
@@ -122,7 +122,7 @@ NoatunApp::NoatunApp()
}
else
{
- config->setGroup(TQString::null); // 0
+ config->setGroup(TQString()); // 0
player()->setVolume(config->readNumEntry("Volume", 100)); // 10
player()->loop(config->readNumEntry("LoopStyle", (int)Player::None));
mPlayer->engine()->setInitialized(); // 0
@@ -147,7 +147,7 @@ NoatunApp::~NoatunApp()
{
saveEngineState();
KConfig *config = KGlobal::config();
- config->setGroup(TQString::null);
+ config->setGroup(TQString());
config->writeEntry("Volume", player()->volume());
config->writeEntry("LoopStyle", player()->loopStyle());
// for version continuity in the future
@@ -212,14 +212,14 @@ bool NoatunApp::clearOnStart() const
int NoatunApp::startupPlayMode() const
{
KConfig *config=KGlobal::config();
- config->setGroup(TQString::null);
+ config->setGroup(TQString());
return config->readNumEntry("StartupPlayMode", autoPlay() ? Play : Restore);
}
void NoatunApp::setStartupPlayMode(int mode)
{
KConfig *config=KGlobal::config();
- config->setGroup(TQString::null);
+ config->setGroup(TQString());
config->writeEntry("StartupPlayMode", mode);
config->sync();
}
@@ -227,7 +227,7 @@ void NoatunApp::setStartupPlayMode(int mode)
void NoatunApp::setHackUpPlaylist(bool b)
{
KConfig *config=KGlobal::config();
- config->setGroup(TQString::null);
+ config->setGroup(TQString());
config->writeEntry("HackUpPlaylist", b);
config->sync();
}
@@ -238,7 +238,7 @@ void NoatunApp::setFastMixer(bool b)
if (whatBefore!=b)
{
KConfig *config=KGlobal::config();
- config->setGroup(TQString::null);
+ config->setGroup(TQString());
config->writeEntry("FastMixer", b);
config->sync();
player()->engine()->useHardwareMixer(b);
@@ -256,7 +256,7 @@ void NoatunApp::setOneInstance(bool b)
void NoatunApp::setLoopList(bool b)
{
KConfig *config=KGlobal::config();
- config->setGroup(TQString::null);
+ config->setGroup(TQString());
config->writeEntry("LoopList", b);
KGlobal::config()->sync();
}
@@ -264,7 +264,7 @@ void NoatunApp::setLoopList(bool b)
void NoatunApp::setAutoPlay(bool b)
{
KConfig *config=KGlobal::config();
- config->setGroup(TQString::null);
+ config->setGroup(TQString());
config->writeEntry("AutoPlay", b);
KGlobal::config()->sync();
}
@@ -272,7 +272,7 @@ void NoatunApp::setAutoPlay(bool b)
void NoatunApp::setRememberPositions(bool b)
{
KConfig *config=KGlobal::config();
- config->setGroup(TQString::null);
+ config->setGroup(TQString());
config->writeEntry("RememberPositions", b);
KGlobal::config()->sync();
}
@@ -280,7 +280,7 @@ void NoatunApp::setRememberPositions(bool b)
void NoatunApp::setSaveDirectory(const TQString &s)
{
KConfig *config=KGlobal::config();
- config->setGroup(TQString::null);
+ config->setGroup(TQString());
config->writePathEntry("SaveDirectory", s);
config->sync();
}
@@ -288,21 +288,21 @@ void NoatunApp::setSaveDirectory(const TQString &s)
TQString NoatunApp::saveDirectory() const
{
KConfig *c=KGlobal::config();
- c->setGroup(TQString::null);
+ c->setGroup(TQString());
return c->readPathEntry("SaveDirectory", TQString(getenv("HOME")));
}
TQString NoatunApp::titleFormat() const
{
KConfig *c=KGlobal::config();
- c->setGroup(TQString::null);
+ c->setGroup(TQString());
return c->readEntry("TitleFormat", "$(\"[\"author\"] - \")$(title)$(\" (\"bitrate\"kbps)\")");
}
void NoatunApp::setTitleFormat(const TQString &format)
{
KConfig *c=KGlobal::config();
- c->setGroup(TQString::null);
+ c->setGroup(TQString());
return c->writeEntry("TitleFormat", format);
}
@@ -314,7 +314,7 @@ void NoatunApp::setClearOnStart(bool b)
void NoatunApp::setClearOnOpen(bool b)
{
KConfig *config=KGlobal::config();
- config->setGroup(TQString::null);
+ config->setGroup(TQString());
config->writeEntry("ClearOnOpen", b);
config->sync();
}
@@ -322,7 +322,7 @@ void NoatunApp::setClearOnOpen(bool b)
void NoatunApp::setDisplayRemaining(bool b)
{
KConfig *config=KGlobal::config();
- config->setGroup(TQString::null);
+ config->setGroup(TQString());
config->writeEntry("DisplayRemaining", b);
config->sync();
}
@@ -363,7 +363,7 @@ void NoatunApp::pluginMenuRemove(int id)
NoatunStdAction::PluginActionMenu *NoatunApp::pluginActionMenu()
{
if (!mPluginActionMenu)
- mPluginActionMenu = new NoatunStdAction::PluginActionMenu(this, "menu_actions");
+ mPluginActionMenu = new NoatunStdAction::PluginActionMenu(TQT_TQOBJECT(this), "menu_actions");
return mPluginActionMenu;
}
@@ -450,7 +450,7 @@ TQString NoatunApp::mimeTypes()
continue;
const char *m = (*istr).c_str();
- if ((KServiceType::serviceType(m)) && !mimeTypes.contains(m))
+ if ((KServiceType::serviceType(m)) && !mimeTypes.tqcontains(m))
{
mimeTypes += m;
mimeTypes += ' ';
@@ -478,11 +478,11 @@ Playlist *NoatunApp::playlist() const
return mLibraryLoader->playlist();
}
-void NoatunApp::commitData(QSessionManager &)
+void NoatunApp::commitData(TQSessionManager &)
{
}
-void NoatunApp::saveState(QSessionManager &sm)
+void NoatunApp::saveState(TQSessionManager &sm)
{
TQStringList restartCommand = sm.restartCommand();
sm.setRestartCommand( restartCommand );
@@ -502,7 +502,7 @@ TQImage NoatunApp::readPNG(const TQString &filename)
void NoatunApp::restoreEngineState()
{
KConfig* config = KGlobal::config();
- config->setGroup(TQString::null);
+ config->setGroup(TQString());
int state = config->readNumEntry("EngineState", Arts::posPlaying);
switch (state)
{
@@ -522,7 +522,7 @@ void NoatunApp::restoreEngineState()
void NoatunApp::saveEngineState()
{
KConfig* config=KGlobal::config();
- config->setGroup(TQString::null);
+ config->setGroup(TQString());
config->writeEntry("EngineState", player()->engine()->state());
// we don't sync here since it's done in the destructor afterwards anyway
}