summaryrefslogtreecommitdiffstats
path: root/noatun/library/app.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /noatun/library/app.cpp
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/library/app.cpp')
-rw-r--r--noatun/library/app.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/noatun/library/app.cpp b/noatun/library/app.cpp
index 04167fe7..cf340f68 100644
--- a/noatun/library/app.cpp
+++ b/noatun/library/app.cpp
@@ -30,11 +30,11 @@
#include <kmessagebox.h>
#include <knotifyclient.h>
#include <kpopupmenu.h>
-#include <qfile.h>
-#include <qimage.h>
+#include <tqfile.h>
+#include <tqimage.h>
#include <qiomanager.h>
-#include <qsessionmanager.h>
-#include <qtextstream.h>
+#include <tqsessionmanager.h>
+#include <tqtextstream.h>
#include <signal.h>
#include <kmimetype.h>
@@ -69,10 +69,10 @@ NoatunApp::NoatunApp()
// set the default config data
// TODO: Maybe a first time wizard instead?
KConfig *config=KGlobal::config(); // +
- config->setGroup(QString::null); // 1
+ config->setGroup(TQString::null); // 1
if (!config->readEntry("Modules").length())
{
- QStringList modules;
+ TQStringList modules;
modules.append("excellent.plugin");
modules.append("splitplaylist.plugin");
modules.append("marquis.plugin");
@@ -101,7 +101,7 @@ NoatunApp::NoatunApp()
mEffectView=new EffectView; // 859
mEqualizerView=new EqualizerView; // 24
- QTimer::singleShot(0, mDownloader, SLOT(start()));
+ TQTimer::singleShot(0, mDownloader, TQT_SLOT(start()));
::globalVideo = new GlobalVideo;
@@ -122,7 +122,7 @@ NoatunApp::NoatunApp()
}
else
{
- config->setGroup(QString::null); // 0
+ config->setGroup(TQString::null); // 0
player()->setVolume(config->readNumEntry("Volume", 100)); // 10
player()->loop(config->readNumEntry("LoopStyle", (int)Player::None));
mPlayer->engine()->setInitialized(); // 0
@@ -147,11 +147,11 @@ NoatunApp::~NoatunApp()
{
saveEngineState();
KConfig *config = KGlobal::config();
- config->setGroup(QString::null);
+ config->setGroup(TQString::null);
config->writeEntry("Volume", player()->volume());
config->writeEntry("LoopStyle", player()->loopStyle());
// for version continuity in the future
- config->writeEntry("Version", QString(version())); // 1
+ config->writeEntry("Version", TQString(version())); // 1
config->sync(); // 40
mPlayer->stop();
@@ -171,7 +171,7 @@ NoatunApp::~NoatunApp()
delete d;
}
-QCString NoatunApp::version() const
+TQCString NoatunApp::version() const
{
return aboutData()->version().ascii();
}
@@ -212,14 +212,14 @@ bool NoatunApp::clearOnStart() const
int NoatunApp::startupPlayMode() const
{
KConfig *config=KGlobal::config();
- config->setGroup(QString::null);
+ config->setGroup(TQString::null);
return config->readNumEntry("StartupPlayMode", autoPlay() ? Play : Restore);
}
void NoatunApp::setStartupPlayMode(int mode)
{
KConfig *config=KGlobal::config();
- config->setGroup(QString::null);
+ config->setGroup(TQString::null);
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(QString::null);
+ config->setGroup(TQString::null);
config->writeEntry("HackUpPlaylist", b);
config->sync();
}
@@ -238,7 +238,7 @@ void NoatunApp::setFastMixer(bool b)
if (whatBefore!=b)
{
KConfig *config=KGlobal::config();
- config->setGroup(QString::null);
+ config->setGroup(TQString::null);
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(QString::null);
+ config->setGroup(TQString::null);
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(QString::null);
+ config->setGroup(TQString::null);
config->writeEntry("AutoPlay", b);
KGlobal::config()->sync();
}
@@ -272,37 +272,37 @@ void NoatunApp::setAutoPlay(bool b)
void NoatunApp::setRememberPositions(bool b)
{
KConfig *config=KGlobal::config();
- config->setGroup(QString::null);
+ config->setGroup(TQString::null);
config->writeEntry("RememberPositions", b);
KGlobal::config()->sync();
}
-void NoatunApp::setSaveDirectory(const QString &s)
+void NoatunApp::setSaveDirectory(const TQString &s)
{
KConfig *config=KGlobal::config();
- config->setGroup(QString::null);
+ config->setGroup(TQString::null);
config->writePathEntry("SaveDirectory", s);
config->sync();
}
-QString NoatunApp::saveDirectory() const
+TQString NoatunApp::saveDirectory() const
{
KConfig *c=KGlobal::config();
- c->setGroup(QString::null);
- return c->readPathEntry("SaveDirectory", QString(getenv("HOME")));
+ c->setGroup(TQString::null);
+ return c->readPathEntry("SaveDirectory", TQString(getenv("HOME")));
}
-QString NoatunApp::titleFormat() const
+TQString NoatunApp::titleFormat() const
{
KConfig *c=KGlobal::config();
- c->setGroup(QString::null);
+ c->setGroup(TQString::null);
return c->readEntry("TitleFormat", "$(\"[\"author\"] - \")$(title)$(\" (\"bitrate\"kbps)\")");
}
-void NoatunApp::setTitleFormat(const QString &format)
+void NoatunApp::setTitleFormat(const TQString &format)
{
KConfig *c=KGlobal::config();
- c->setGroup(QString::null);
+ c->setGroup(TQString::null);
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(QString::null);
+ config->setGroup(TQString::null);
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(QString::null);
+ config->setGroup(TQString::null);
config->writeEntry("DisplayRemaining", b);
config->sync();
}
@@ -350,7 +350,7 @@ void NoatunApp::hideInterfaces()
}
-int NoatunApp::pluginMenuAdd(const QString &text, const QObject *receiver, const char *member)
+int NoatunApp::pluginMenuAdd(const TQString &text, const TQObject *receiver, const char *member)
{
return pluginActionMenu()->menuAdd(text, receiver, member);
}
@@ -432,9 +432,9 @@ Effects *NoatunApp::effects() const
return d->effects;
}
-QString NoatunApp::mimeTypes()
+TQString NoatunApp::mimeTypes()
{
- QString mimeTypes;
+ TQString mimeTypes;
Arts::TraderQuery q;
vector<Arts::TraderOffer> *results = q.query();
vector<Arts::TraderOffer>::iterator i;
@@ -484,16 +484,16 @@ void NoatunApp::commitData(QSessionManager &)
void NoatunApp::saveState(QSessionManager &sm)
{
- QStringList restartCommand = sm.restartCommand();
+ TQStringList restartCommand = sm.restartCommand();
sm.setRestartCommand( restartCommand );
KApplication::saveState(sm);
}
// Deprecated
-QImage NoatunApp::readPNG(const QString &filename)
+TQImage NoatunApp::readPNG(const TQString &filename)
{
- QImageIO file(filename, "PNG");
+ TQImageIO file(filename, "PNG");
file.setGamma(0.0);
file.read();
return file.image();
@@ -502,7 +502,7 @@ QImage NoatunApp::readPNG(const QString &filename)
void NoatunApp::restoreEngineState()
{
KConfig* config = KGlobal::config();
- config->setGroup(QString::null);
+ config->setGroup(TQString::null);
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(QString::null);
+ config->setGroup(TQString::null);
config->writeEntry("EngineState", player()->engine()->state());
// we don't sync here since it's done in the destructor afterwards anyway
}