summaryrefslogtreecommitdiffstats
path: root/src/kmplayerconfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kmplayerconfig.cpp')
-rw-r--r--src/kmplayerconfig.cpp98
1 files changed, 45 insertions, 53 deletions
diff --git a/src/kmplayerconfig.cpp b/src/kmplayerconfig.cpp
index bbc13b1..0bdaa5c 100644
--- a/src/kmplayerconfig.cpp
+++ b/src/kmplayerconfig.cpp
@@ -19,16 +19,16 @@
#include <algorithm>
#include <functional>
#include <config.h>
-#include <qcheckbox.h>
-#include <qtextedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qfileinfo.h>
+#include <tqcheckbox.h>
+#include <tqtextedit.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqfileinfo.h>
#include <kurlrequester.h>
#include <klineedit.h>
@@ -65,7 +65,7 @@ static OutputDriver _ads[] = {
{ "alsa5", i18n ("Advanced Linux Sound Architecture v0.5") },
{ "alsa9", i18n ("Advanced Linux Sound Architecture v0.9") },
{ "", i18n ("Use back-end defaults") },
- { 0, QString () }
+ { 0, TQString () }
};
static OutputDriver _vds [] = {
@@ -77,7 +77,7 @@ static OutputDriver _vds [] = {
{ "gl", i18n ("OpenGL") },
{ "gl2", i18n ("OpenGL MT") },
{ "xv", i18n ("XVideo") },
- { 0, QString () }
+ { 0, TQString () }
};
static const int ADRIVER_ARTS_INDEX = 4;
@@ -98,16 +98,16 @@ KDE_NO_CDTOR_EXPORT Settings::Settings (PartBase * player, KConfig * config)
colors [ColorSetting::playlist_active].option = "PlaylistActive";
colors [ColorSetting::playlist_active].color = KGlobalSettings::linkColor();
colors [ColorSetting::console_background].option = "ConsoleBackground";
- colors [ColorSetting::console_background].color = QColor (0, 0, 0);
+ colors [ColorSetting::console_background].color = TQColor (0, 0, 0);
colors [ColorSetting::console_foreground].title = i18n ("Console foreground");
colors [ColorSetting::console_foreground].option = "ConsoleForeground";
- colors [ColorSetting::console_foreground].color = QColor (0xB2, 0xB2, 0xB2);
+ colors [ColorSetting::console_foreground].color = TQColor (0xB2, 0xB2, 0xB2);
colors [ColorSetting::video_background].title = i18n ("Video background");
colors [ColorSetting::video_background].option = "VideoBackground";
- colors [ColorSetting::video_background].color = QColor (0, 0, 0);
+ colors [ColorSetting::video_background].color = TQColor (0, 0, 0);
colors [ColorSetting::area_background].title = i18n ("Viewing area background");
colors [ColorSetting::area_background].option = "ViewingAreaBackground";
- colors [ColorSetting::area_background].color = QColor (0, 0, 0);
+ colors [ColorSetting::area_background].color = TQColor (0, 0, 0);
colors [ColorSetting::infowindow_background].title = i18n ("Info window background");
colors [ColorSetting::infowindow_background].option ="InfoWindowBackground";
colors [ColorSetting::infowindow_background].color = KGlobalSettings::baseColor ();
@@ -223,7 +223,7 @@ KDE_NO_EXPORT void Settings::applyColorSetting (bool only_changed_ones) {
view->playList()->setActiveForegroundColor (colors[i].color);
break;
case ColorSetting::console_background:
- view->console()->setPaper (QBrush (colors[i].color));
+ view->console()->setPaper (TQBrush (colors[i].color));
break;
case ColorSetting::console_foreground:
view->console()->setColor(colors[i].color);
@@ -235,7 +235,7 @@ KDE_NO_EXPORT void Settings::applyColorSetting (bool only_changed_ones) {
view->viewArea()->setPaletteBackgroundColor(colors[i].color);
break;
case ColorSetting::infowindow_background:
- view->infoPanel ()->setPaper (QBrush (colors[i].color));
+ view->infoPanel ()->setPaper (TQBrush (colors[i].color));
break;
case ColorSetting::infowindow_foreground:
view->infoPanel()->setPaletteForegroundColor(colors[i].color);
@@ -277,8 +277,8 @@ KDE_NO_EXPORT void Settings::readConfig () {
brightness = m_config->readNumEntry (strBrightness, 0);
hue = m_config->readNumEntry (strHue, 0);
saturation = m_config->readNumEntry (strSaturation, 0);
- const QMap <QString, Source*>::const_iterator e = m_player->sources ().end ();
- QMap <QString, Source *>::const_iterator i = m_player->sources().begin ();
+ const TQMap <TQString, Source*>::const_iterator e = m_player->sources ().end ();
+ TQMap <TQString, Source *>::const_iterator i = m_player->sources().begin ();
for (; i != e; ++i)
backends[i.data()->name ()] = m_config->readEntry (i.data()->name ());
for (int i = 0; i < int (ColorSetting::last_target); i++)
@@ -311,7 +311,7 @@ KDE_NO_EXPORT void Settings::readConfig () {
m_config->setGroup (strRecordingGroup);
mencoderarguments = m_config->readEntry (strMencoderArgs, "-oac mp3lame -ovc lavc");
ffmpegarguments = m_config->readEntry (strFFMpegArgs, "-f avi -acodec mp3 -vcodec mpeg4");
- recordfile = m_config->readPathEntry(strRecordingFile, QDir::homeDirPath () + "/record.avi");
+ recordfile = m_config->readPathEntry(strRecordingFile, TQDir::homeDirPath () + "/record.avi");
recorder = Recorder (m_config->readNumEntry (strRecorder, int (MEncoder)));
replayoption = ReplayOption (m_config->readNumEntry (strAutoPlayAfterRecording, ReplayFinished));
replaytime = m_config->readNumEntry (strAutoPlayAfterTime, 60);
@@ -363,15 +363,15 @@ KDE_NO_EXPORT bool Settings::createDialog () {
for (PartBase::ProcessMap::const_iterator i = m_player->players ().begin(); i != e; ++i) {
Process * p = i.data ();
if (p->supports ("urlsource"))
- configdialog->m_SourcePageURL->backend->insertItem (p->menuName ().remove (QChar ('&')), id++);
+ configdialog->m_SourcePageURL->backend->insertItem (p->menuName ().remove (TQChar ('&')), id++);
}
- connect (configdialog, SIGNAL (okClicked ()),
- this, SLOT (okPressed ()));
- connect (configdialog, SIGNAL (applyClicked ()),
- this, SLOT (okPressed ()));
+ connect (configdialog, TQT_SIGNAL (okClicked ()),
+ this, TQT_SLOT (okPressed ()));
+ connect (configdialog, TQT_SIGNAL (applyClicked ()),
+ this, TQT_SLOT (okPressed ()));
if (KApplication::kApplication())
- connect (configdialog, SIGNAL (helpClicked ()),
- this, SLOT (getHelp ()));
+ connect (configdialog, TQT_SIGNAL (helpClicked ()),
+ this, TQT_SLOT (getHelp ()));
return true;
}
@@ -429,18 +429,18 @@ void Settings::show (const char * pagename) {
configdialog->m_SourcePageURL->sub_urllist->insertStringList (sub_urllist);
configdialog->m_SourcePageURL->sub_urllist->setCurrentText (m_player->source ()->subUrl ().prettyURL ());
configdialog->m_SourcePageURL->changed = false;
- configdialog->m_SourcePageURL->prefBitRate->setText (QString::number (prefbitrate));
- configdialog->m_SourcePageURL->maxBitRate->setText (QString::number (maxbitrate));
+ configdialog->m_SourcePageURL->prefBitRate->setText (TQString::number (prefbitrate));
+ configdialog->m_SourcePageURL->maxBitRate->setText (TQString::number (maxbitrate));
configdialog->m_GeneralPageOutput->videoDriver->setCurrentItem (videodriver);
configdialog->m_GeneralPageOutput->audioDriver->setCurrentItem (audiodriver);
- configdialog->m_SourcePageURL->backend->setCurrentItem (configdialog->m_SourcePageURL->backend->findItem (backends["urlsource"]));
+ configdialog->m_SourcePageURL->backend->setCurrentItem (configdialog->m_SourcePageURL->backend->tqfindItem (backends["urlsource"]));
int id = 0;
const PartBase::ProcessMap::const_iterator e = m_player->players ().end ();
for (PartBase::ProcessMap::const_iterator i = m_player->players ().begin(); i != e; ++i) {
Process * p = i.data ();
if (p->supports ("urlsource")) {
- if (backends["urlsource"] == QString (p->name()))
+ if (backends["urlsource"] == TQString (p->name()))
configdialog->m_SourcePageURL->backend->setCurrentItem (id);
id++;
}
@@ -484,7 +484,7 @@ void Settings::show (const char * pagename) {
configdialog->m_RecordPage->recorder->setButton (int (recorder));
configdialog->m_RecordPage->replayClicked (int (replayoption));
configdialog->m_RecordPage->recorderClicked (int (recorder));
- configdialog->m_RecordPage->replaytime->setText (QString::number (replaytime));
+ configdialog->m_RecordPage->replaytime->setText (TQString::number (replaytime));
configdialog->m_MEncoderPage->arguments->setText (mencoderarguments);
configdialog->m_MEncoderPage->format->setButton (recordcopy ? 0 : 1);
configdialog->m_MEncoderPage->formatClicked (recordcopy ? 0 : 1);
@@ -497,7 +497,7 @@ void Settings::show (const char * pagename) {
if (pagename)
configDialog ()->setPage (pagename);
if (created)
- configdialog->resize (configdialog->minimumSize ());
+ configdialog->resize (configdialog->tqminimumSize ());
configdialog->show ();
}
@@ -512,8 +512,8 @@ void Settings::writeConfig () {
m_config->writeEntry (strBrightness, brightness);
m_config->writeEntry (strHue, hue);
m_config->writeEntry (strSaturation, saturation);
- const QMap<QString,QString>::iterator b_end = backends.end ();
- for (QMap<QString,QString>::iterator i = backends.begin(); i != b_end; ++i)
+ const TQMap<TQString,TQString>::iterator b_end = backends.end ();
+ for (TQMap<TQString,TQString>::iterator i = backends.begin(); i != b_end; ++i)
m_config->writeEntry (i.key (), i.data ());
for (int i = 0; i < int (ColorSetting::last_target); i++)
m_config->writeEntry (colors[i].option, colors[i].color);
@@ -598,13 +598,13 @@ void Settings::okPressed () {
else {
if (KURL::fromPathOrURL (configdialog->m_SourcePageURL->url->url ()).isLocalFile () ||
KURL::isRelativeURL (configdialog->m_SourcePageURL->url->url ())) {
- QFileInfo fi (configdialog->m_SourcePageURL->url->url ());
- int hpos = configdialog->m_SourcePageURL->url->url ().findRev ('#');
- QString xine_directives ("");
+ TQFileInfo fi (configdialog->m_SourcePageURL->url->url ());
+ int hpos = configdialog->m_SourcePageURL->url->url ().tqfindRev ('#');
+ TQString xine_directives ("");
while (!fi.exists () && hpos > -1) {
xine_directives = configdialog->m_SourcePageURL->url->url ().mid (hpos);
fi.setFile (configdialog->m_SourcePageURL->url->url ().left (hpos));
- hpos = configdialog->m_SourcePageURL->url->url ().findRev ('#', hpos-1);
+ hpos = configdialog->m_SourcePageURL->url->url ().tqfindRev ('#', hpos-1);
}
if (!fi.exists ()) {
urlchanged = false;
@@ -616,10 +616,10 @@ void Settings::okPressed () {
!configdialog->m_SourcePageURL->sub_url->url ().isEmpty () &&
(KURL::fromPathOrURL (configdialog->m_SourcePageURL->sub_url->url ()).isLocalFile () ||
KURL::isRelativeURL (configdialog->m_SourcePageURL->sub_url->url ()))) {
- QFileInfo sfi (configdialog->m_SourcePageURL->sub_url->url ());
+ TQFileInfo sfi (configdialog->m_SourcePageURL->sub_url->url ());
if (!sfi.exists ()) {
KMessageBox::error (m_player->view (), i18n ("Sub title file %1 does not exist.").arg (configdialog->m_SourcePageURL->sub_url->url ()), i18n ("Error"));
- configdialog->m_SourcePageURL->sub_url->setURL (QString ());
+ configdialog->m_SourcePageURL->sub_url->setURL (TQString ());
} else
configdialog->m_SourcePageURL->sub_url->setURL (sfi.absFilePath ());
}
@@ -628,10 +628,10 @@ void Settings::okPressed () {
if (urlchanged) {
KURL url = KURL::fromPathOrURL (configdialog->m_SourcePageURL->url->url ());
m_player->setURL (url);
- if (urllist.find (url.prettyURL ()) == urllist.end ())
+ if (urllist.tqfind (url.prettyURL ()) == urllist.end ())
configdialog->m_SourcePageURL->urllist->insertItem (url.prettyURL (), 0);
KURL sub_url = KURL::fromPathOrURL (configdialog->m_SourcePageURL->sub_url->url ());
- if (sub_urllist.find (sub_url.prettyURL ()) == sub_urllist.end ())
+ if (sub_urllist.tqfind (sub_url.prettyURL ()) == sub_urllist.end ())
configdialog->m_SourcePageURL->sub_urllist->insertItem (sub_url.prettyURL (), 0);
}
urllist.clear ();
@@ -709,21 +709,13 @@ void Settings::okPressed () {
pp_med_int = configdialog->m_OPPagePostproc->MedianDeinterlacer->isChecked();
pp_ffmpeg_int = configdialog->m_OPPagePostproc->FfmpegDeinterlacer->isChecked();
// recording
-#if (QT_VERSION < 0x030200)
- recorder = Recorder (configdialog->m_RecordPage->recorder->id (configdialog->m_RecordPage->recorder->selected ()));
-#else
recorder = Recorder (configdialog->m_RecordPage->recorder->selectedId ());
-#endif
replaytime = configdialog->m_RecordPage->replaytime->text ().toInt ();
- configdialog->m_RecordPage->replaytime->setText (QString::number (replaytime));
+ configdialog->m_RecordPage->replaytime->setText (TQString::number (replaytime));
recordfile = configdialog->m_RecordPage->url->lineEdit()->text ();
mencoderarguments = configdialog->m_MEncoderPage->arguments->text ();
ffmpegarguments = configdialog->m_FFMpegPage->arguments->text ();
-#if (QT_VERSION < 0x030200)
- recordcopy = !configdialog->m_MEncoderPage->format->id (configdialog->m_MEncoderPage->format->selected ());
-#else
recordcopy = !configdialog->m_MEncoderPage->format->selectedId ();
-#endif
//dynamic stuff
for (PreferencesPage * p = pagelist; p; p = p->next)