summaryrefslogtreecommitdiffstats
path: root/src/kmplayerbroadcast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kmplayerbroadcast.cpp')
-rw-r--r--src/kmplayerbroadcast.cpp396
1 files changed, 196 insertions, 200 deletions
diff --git a/src/kmplayerbroadcast.cpp b/src/kmplayerbroadcast.cpp
index 34045e2..470f9c1 100644
--- a/src/kmplayerbroadcast.cpp
+++ b/src/kmplayerbroadcast.cpp
@@ -18,20 +18,20 @@
*/
#include <algorithm>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtable.h>
-#include <qstringlist.h>
-#include <qcombobox.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
-#include <qtabwidget.h>
-#include <qcursor.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqtable.h>
+#include <tqstringlist.h>
+#include <tqcombobox.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
+#include <tqtabwidget.h>
+#include <tqcursor.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kdebug.h>
@@ -58,17 +58,17 @@ static const char * strFFServerCustomSetting = "Custom Setting";
static const char * strFFServerProfiles = "Profiles";
-KDE_NO_CDTOR_EXPORT FFServerSetting::FFServerSetting (int i, const QString & n, const QString & f, const QString & ac, int abr, int asr, const QString & vc, int vbr, int q, int fr, int gs, int w, int h)
+KDE_NO_CDTOR_EXPORT FFServerSetting::FFServerSetting (int i, const TQString & n, const TQString & f, const TQString & ac, int abr, int asr, const TQString & vc, int vbr, int q, int fr, int gs, int w, int h)
: index (i), name (n), format (f), audiocodec (ac),
- audiobitrate (abr > 0 ? QString::number (abr) : QString ()),
- audiosamplerate (asr > 0 ? QString::number (asr) : QString ()),
+ audiobitrate (abr > 0 ? TQString::number (abr) : TQString ()),
+ audiosamplerate (asr > 0 ? TQString::number (asr) : TQString ()),
videocodec (vc),
- videobitrate (vbr > 0 ? QString::number (vbr) : QString ()),
- quality (q > 0 ? QString::number (q) : QString ()),
- framerate (fr > 0 ? QString::number (fr) : QString ()),
- gopsize (gs > 0 ? QString::number (gs) : QString ()),
- width (w > 0 ? QString::number (w) : QString ()),
- height (h > 0 ? QString::number (h) : QString ()) {}
+ videobitrate (vbr > 0 ? TQString::number (vbr) : TQString ()),
+ quality (q > 0 ? TQString::number (q) : TQString ()),
+ framerate (fr > 0 ? TQString::number (fr) : TQString ()),
+ gopsize (gs > 0 ? TQString::number (gs) : TQString ()),
+ width (w > 0 ? TQString::number (w) : TQString ()),
+ height (h > 0 ? TQString::number (h) : TQString ()) {}
KDE_NO_EXPORT FFServerSetting & FFServerSetting::operator = (const FFServerSetting & fs) {
format = fs.format;
@@ -85,11 +85,11 @@ KDE_NO_EXPORT FFServerSetting & FFServerSetting::operator = (const FFServerSetti
return *this;
}
-KDE_NO_EXPORT FFServerSetting & FFServerSetting::operator = (const QStringList & sl) {
+KDE_NO_EXPORT FFServerSetting & FFServerSetting::operator = (const TQStringList & sl) {
if (sl.count () < 11) {
return *this;
}
- QStringList::const_iterator it = sl.begin ();
+ TQStringList::const_iterator it = sl.begin ();
format = *it++;
audiocodec = *it++;
audiobitrate = *it++;
@@ -102,38 +102,38 @@ KDE_NO_EXPORT FFServerSetting & FFServerSetting::operator = (const QStringList &
width = *it++;
height = *it++;
acl.clear ();
- QStringList::const_iterator end( sl.end() );
+ TQStringList::const_iterator end( sl.end() );
for (; it != end; ++it)
acl.push_back (*it);
return *this;
}
-KDE_NO_EXPORT QString & FFServerSetting::ffconfig (QString & buf) {
- QString nl ("\n");
- buf = QString ("Format ") + format + nl;
+KDE_NO_EXPORT TQString & FFServerSetting::ffconfig (TQString & buf) {
+ TQString nl ("\n");
+ buf = TQString ("Format ") + format + nl;
if (!audiocodec.isEmpty ())
- buf += QString ("AudioCodec ") + audiocodec + nl;
+ buf += TQString ("AudioCodec ") + audiocodec + nl;
if (!audiobitrate.isEmpty ())
- buf += QString ("AudioBitRate ") + audiobitrate + nl;
+ buf += TQString ("AudioBitRate ") + audiobitrate + nl;
if (!audiosamplerate.isEmpty () > 0)
- buf += QString ("AudioSampleRate ") + audiosamplerate + nl;
+ buf += TQString ("AudioSampleRate ") + audiosamplerate + nl;
if (!videocodec.isEmpty ())
- buf += QString ("VideoCodec ") + videocodec + nl;
+ buf += TQString ("VideoCodec ") + videocodec + nl;
if (!videobitrate.isEmpty ())
- buf += QString ("VideoBitRate ") + videobitrate + nl;
+ buf += TQString ("VideoBitRate ") + videobitrate + nl;
if (!quality.isEmpty ())
- buf += QString ("VideoQMin ") + quality + nl;
+ buf += TQString ("VideoTQMin ") + quality + nl;
if (!framerate.isEmpty ())
- buf += QString ("VideoFrameRate ") + framerate + nl;
+ buf += TQString ("VideoFrameRate ") + framerate + nl;
if (!gopsize.isEmpty ())
- buf += QString ("VideoGopSize ") + gopsize + nl;
+ buf += TQString ("VideoGopSize ") + gopsize + nl;
if (!width.isEmpty () && !height.isEmpty ())
- buf += QString ("VideoSize ") + width + QString ("x") + height + nl;
+ buf += TQString ("VideoSize ") + width + TQString ("x") + height + nl;
return buf;
}
-KDE_NO_EXPORT const QStringList FFServerSetting::list () {
- QStringList sl;
+KDE_NO_EXPORT const TQStringList FFServerSetting::list () {
+ TQStringList sl;
sl.push_back (format);
sl.push_back (audiocodec);
sl.push_back (audiobitrate);
@@ -145,8 +145,8 @@ KDE_NO_EXPORT const QStringList FFServerSetting::list () {
sl.push_back (gopsize);
sl.push_back (width);
sl.push_back (height);
- QStringList::const_iterator it = acl.begin ();
- QStringList::const_iterator end( acl.end () );
+ TQStringList::const_iterator it = acl.begin ();
+ TQStringList::const_iterator end( acl.end () );
for (; it != end; ++it)
sl.push_back (*it);
return sl;
@@ -154,134 +154,130 @@ KDE_NO_EXPORT const QStringList FFServerSetting::list () {
//-----------------------------------------------------------------------------
-KDE_NO_CDTOR_EXPORT KMPlayerPrefBroadcastPage::KMPlayerPrefBroadcastPage (QWidget *parent) : QFrame (parent) {
- QVBoxLayout *layout = new QVBoxLayout (this, 5);
- QGridLayout *gridlayout = new QGridLayout (layout, 6, 2, 2);
- QLabel *label = new QLabel (i18n ("Bind address:"), this);
- bindaddress = new QLineEdit ("", this);
- QWhatsThis::add (bindaddress, i18n ("If you have multiple network devices, you can limit access"));
- gridlayout->addWidget (label, 0, 0);
- gridlayout->addWidget (bindaddress, 0, 1);
- label = new QLabel (i18n ("Listen port:"), this);
- port = new QLineEdit ("", this);
- gridlayout->addWidget (label, 1, 0);
- gridlayout->addWidget (port, 1, 1);
- label = new QLabel (i18n ("Maximum connections:"), this);
- maxclients = new QLineEdit ("", this);
- gridlayout->addWidget (label, 2, 0);
- gridlayout->addWidget (maxclients, 2, 1);
- label = new QLabel (i18n ("Maximum bandwidth (kbit):"), this);
- maxbandwidth = new QLineEdit ("", this);
- gridlayout->addWidget (label, 3, 0);
- gridlayout->addWidget (maxbandwidth, 3, 1);
- label = new QLabel (i18n ("Temporary feed file:"), this);
- feedfile = new QLineEdit ("", this);
- gridlayout->addWidget (label, 4, 0);
- gridlayout->addWidget (feedfile, 4, 1);
- label = new QLabel (i18n ("Feed file size (kB):"), this);
- feedfilesize = new QLineEdit ("", this);
- gridlayout->addWidget (label, 5, 0);
- gridlayout->addWidget (feedfilesize, 5, 1);
- layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
+KDE_NO_CDTOR_EXPORT KMPlayerPrefBroadcastPage::KMPlayerPrefBroadcastPage (TQWidget *tqparent) : TQFrame (tqparent) {
+ TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5);
+ TQGridLayout *gridtqlayout = new TQGridLayout (tqlayout, 6, 2, 2);
+ TQLabel *label = new TQLabel (i18n ("Bind address:"), this);
+ bindaddress = new TQLineEdit ("", this);
+ TQWhatsThis::add (bindaddress, i18n ("If you have multiple network devices, you can limit access"));
+ gridtqlayout->addWidget (label, 0, 0);
+ gridtqlayout->addWidget (bindaddress, 0, 1);
+ label = new TQLabel (i18n ("Listen port:"), this);
+ port = new TQLineEdit ("", this);
+ gridtqlayout->addWidget (label, 1, 0);
+ gridtqlayout->addWidget (port, 1, 1);
+ label = new TQLabel (i18n ("Maximum connections:"), this);
+ maxclients = new TQLineEdit ("", this);
+ gridtqlayout->addWidget (label, 2, 0);
+ gridtqlayout->addWidget (maxclients, 2, 1);
+ label = new TQLabel (i18n ("Maximum bandwidth (kbit):"), this);
+ maxbandwidth = new TQLineEdit ("", this);
+ gridtqlayout->addWidget (label, 3, 0);
+ gridtqlayout->addWidget (maxbandwidth, 3, 1);
+ label = new TQLabel (i18n ("Temporary feed file:"), this);
+ feedfile = new TQLineEdit ("", this);
+ gridtqlayout->addWidget (label, 4, 0);
+ gridtqlayout->addWidget (feedfile, 4, 1);
+ label = new TQLabel (i18n ("Feed file size (kB):"), this);
+ feedfilesize = new TQLineEdit ("", this);
+ gridtqlayout->addWidget (label, 5, 0);
+ gridtqlayout->addWidget (feedfilesize, 5, 1);
+ tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
}
//-----------------------------------------------------------------------------
#undef ADDPROPERTY
-#define ADDPROPERTY(label,qedit,gridlayout,row,parent) \
- qedit = new QLineEdit ("", parent); \
- gridlayout->addWidget (new QLabel (qedit, label, parent), row, 0); \
- gridlayout->addWidget (qedit, row, 1);
+#define ADDPROPERTY(label,qedit,gridtqlayout,row,tqparent) \
+ qedit = new TQLineEdit ("", tqparent); \
+ gridtqlayout->addWidget (new TQLabel (qedit, label, tqparent), row, 0); \
+ gridtqlayout->addWidget (qedit, row, 1);
-KDE_NO_CDTOR_EXPORT KMPlayerPrefBroadcastFormatPage::KMPlayerPrefBroadcastFormatPage (QWidget *parent, FFServerSettingList & ffs) : QFrame (parent, "BroadcastPage"), profiles (ffs)
+KDE_NO_CDTOR_EXPORT KMPlayerPrefBroadcastFormatPage::KMPlayerPrefBroadcastFormatPage (TQWidget *tqparent, FFServerSettingList & ffs) : TQFrame (tqparent, "BroadcastPage"), profiles (ffs)
{
- QHBoxLayout *layout = new QHBoxLayout (this, 5);
- QGridLayout *formatlayout = new QGridLayout (11, 2, 2);
- formatlayout->setAlignment (Qt::AlignTop);
- QVBoxLayout *leftlayout = new QVBoxLayout (15);
- QHBoxLayout *ledlayout = new QHBoxLayout (5);
- format = new QComboBox (this);
- QLabel * label = new QLabel (format, i18n ("Format:"), this);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout (this, 5);
+ TQGridLayout *formattqlayout = new TQGridLayout (11, 2, 2);
+ formattqlayout->tqsetAlignment (TQt::AlignTop);
+ TQVBoxLayout *lefttqlayout = new TQVBoxLayout (15);
+ TQHBoxLayout *ledtqlayout = new TQHBoxLayout (5);
+ format = new TQComboBox (this);
+ TQLabel * label = new TQLabel (format, i18n ("Format:"), this);
format->clear ();
- format->insertItem (QString ("asf"));
- format->insertItem (QString ("avi"));
- format->insertItem (QString ("mpjpeg"));
- format->insertItem (QString ("mpeg"));
- format->insertItem (QString ("rm"));
- format->insertItem (QString ("swf"));
- QWhatsThis::add (format, i18n ("Only avi, mpeg and rm work for mplayer playback"));
- formatlayout->addWidget (label, 0, 0);
- formatlayout->addWidget (format, 0, 1);
- ADDPROPERTY (i18n ("Audio codec:"), audiocodec, formatlayout, 1, this);
- ADDPROPERTY (i18n ("Audio bit rate (kbit):"), audiobitrate, formatlayout, 2, this);
- ADDPROPERTY (i18n ("Audio sample rate (Hz):"), audiosamplerate, formatlayout, 3, this);
- ADDPROPERTY (i18n ("Video codec:"), videocodec, formatlayout, 4, this);
- ADDPROPERTY (i18n ("Video bit rate (kbit):"), videobitrate, formatlayout, 5, this);
- ADDPROPERTY (i18n ("Quality (1-31):"), quality, formatlayout, 6, this);
- ADDPROPERTY (i18n ("Frame rate (Hz):"), framerate, formatlayout, 7, this);
- ADDPROPERTY (i18n ("Gop size:"), gopsize, formatlayout, 8, this);
- ADDPROPERTY (i18n ("Width (pixels):"), moviewidth, formatlayout, 9, this);
- ADDPROPERTY (i18n ("Height (pixels):"), movieheight, formatlayout, 10, this);
- label = new QLabel (i18n ("Allow access from:"), this);
- accesslist = new QTable (40, 1, this);
+ format->insertItem (TQString ("asf"));
+ format->insertItem (TQString ("avi"));
+ format->insertItem (TQString ("mpjpeg"));
+ format->insertItem (TQString ("mpeg"));
+ format->insertItem (TQString ("rm"));
+ format->insertItem (TQString ("swf"));
+ TQWhatsThis::add (format, i18n ("Only avi, mpeg and rm work for mplayer playback"));
+ formattqlayout->addWidget (label, 0, 0);
+ formattqlayout->addWidget (format, 0, 1);
+ ADDPROPERTY (i18n ("Audio codec:"), audiocodec, formattqlayout, 1, this);
+ ADDPROPERTY (i18n ("Audio bit rate (kbit):"), audiobitrate, formattqlayout, 2, this);
+ ADDPROPERTY (i18n ("Audio sample rate (Hz):"), audiosamplerate, formattqlayout, 3, this);
+ ADDPROPERTY (i18n ("Video codec:"), videocodec, formattqlayout, 4, this);
+ ADDPROPERTY (i18n ("Video bit rate (kbit):"), videobitrate, formattqlayout, 5, this);
+ ADDPROPERTY (i18n ("Quality (1-31):"), quality, formattqlayout, 6, this);
+ ADDPROPERTY (i18n ("Frame rate (Hz):"), framerate, formattqlayout, 7, this);
+ ADDPROPERTY (i18n ("Gop size:"), gopsize, formattqlayout, 8, this);
+ ADDPROPERTY (i18n ("Width (pixels):"), moviewidth, formattqlayout, 9, this);
+ ADDPROPERTY (i18n ("Height (pixels):"), movieheight, formattqlayout, 10, this);
+ label = new TQLabel (i18n ("Allow access from:"), this);
+ accesslist = new TQTable (40, 1, this);
accesslist->verticalHeader ()->hide ();
accesslist->setLeftMargin (0);
accesslist->setColumnWidth (0, 250);
- QWhatsThis::add (accesslist, i18n ("'Single IP' or 'start-IP end-IP' for IP ranges"));
- QHeader *header = accesslist->horizontalHeader ();
+ TQWhatsThis::add (accesslist, i18n ("'Single IP' or 'start-IP end-IP' for IP ranges"));
+ TQHeader *header = accesslist->horizontalHeader ();
header->setLabel (0, i18n ("Host/IP or IP Range"));
- QFrame *profileframe = new QFrame (this);
- QGridLayout *profileslayout = new QGridLayout (profileframe, 5, 2, 2);
- profile = new QLineEdit ("", profileframe);
- connect (profile, SIGNAL(textChanged (const QString &)),
- this, SLOT (slotTextChanged (const QString &)));
- profilelist = new QListBox (profileframe);
+ TQFrame *profileframe = new TQFrame (this);
+ TQGridLayout *profilestqlayout = new TQGridLayout (profileframe, 5, 2, 2);
+ profile = new TQLineEdit ("", profileframe);
+ connect (profile, TQT_SIGNAL(textChanged (const TQString &)),
+ this, TQT_SLOT (slotTextChanged (const TQString &)));
+ profilelist = new TQListBox (profileframe);
for (int i = 0; i < (int) profiles.size (); i++)
profilelist->insertItem (profiles[i]->name, i);
- connect (profilelist, SIGNAL (selected (int)),
- this, SLOT (slotIndexChanged (int)));
- connect (profilelist, SIGNAL (highlighted (int)),
- this, SLOT (slotItemHighlighted (int)));
- load = new QPushButton (i18n ("Load"), profileframe);
- save = new QPushButton (i18n ("Save"), profileframe);
- del = new QPushButton (i18n ("Delete"), profileframe);
+ connect (profilelist, TQT_SIGNAL (selected (int)),
+ this, TQT_SLOT (slotIndexChanged (int)));
+ connect (profilelist, TQT_SIGNAL (highlighted (int)),
+ this, TQT_SLOT (slotItemHighlighted (int)));
+ load = new TQPushButton (i18n ("Load"), profileframe);
+ save = new TQPushButton (i18n ("Save"), profileframe);
+ del = new TQPushButton (i18n ("Delete"), profileframe);
load->setEnabled (false);
save->setEnabled (false);
del->setEnabled (false);
- connect (load, SIGNAL (clicked ()), this, SLOT (slotLoad ()));
- connect (save, SIGNAL (clicked ()), this, SLOT (slotSave ()));
- connect (del, SIGNAL (clicked ()), this, SLOT (slotDelete ()));
- profileslayout->addWidget (profile, 0, 0);
-#if (QT_VERSION < 0x030200)
- profileslayout->addRowSpacing (4, 60);
-#else
- profileslayout->setRowSpacing (4, 60);
-#endif
- profileslayout->addMultiCellWidget (profilelist, 1, 4, 0, 0);
- profileslayout->addWidget (load, 1, 1);
- profileslayout->addWidget (save, 2, 1);
- profileslayout->addWidget (del, 3, 1);
- leftlayout->addWidget (profileframe);
- startbutton = new QPushButton (i18n ("Start"), this);
- serverled = new KLed (Qt::green, KLed::Off, KLed::Raised, KLed::Circular, this);
- feedled = new KLed (Qt::green, KLed::Off, KLed::Raised, KLed::Circular, this);
- ledlayout->addWidget (startbutton);
- ledlayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- ledlayout->addWidget (serverled);
- ledlayout->addWidget (feedled);
- leftlayout->addLayout (ledlayout);
- QFrame * line = new QFrame (this);
- line->setFrameShape (QFrame::HLine);
- leftlayout->addWidget (line);
- leftlayout->addWidget (label);
- leftlayout->addWidget (accesslist);
- leftlayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
- layout->addLayout (leftlayout);
- line = new QFrame (this);
- line->setFrameShape (QFrame::VLine);
- layout->addWidget (line);
- layout->addLayout (formatlayout);
- layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
+ connect (load, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotLoad ()));
+ connect (save, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotSave ()));
+ connect (del, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotDelete ()));
+ profilestqlayout->addWidget (profile, 0, 0);
+ profilestqlayout->setRowSpacing (4, 60);
+ profilestqlayout->addMultiCellWidget (profilelist, 1, 4, 0, 0);
+ profilestqlayout->addWidget (load, 1, 1);
+ profilestqlayout->addWidget (save, 2, 1);
+ profilestqlayout->addWidget (del, 3, 1);
+ lefttqlayout->addWidget (profileframe);
+ startbutton = new TQPushButton (i18n ("Start"), this);
+ serverled = new KLed (TQt::green, KLed::Off, KLed::Raised, KLed::Circular, this);
+ feedled = new KLed (TQt::green, KLed::Off, KLed::Raised, KLed::Circular, this);
+ ledtqlayout->addWidget (startbutton);
+ ledtqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ ledtqlayout->addWidget (serverled);
+ ledtqlayout->addWidget (feedled);
+ lefttqlayout->addLayout (ledtqlayout);
+ TQFrame * line = new TQFrame (this);
+ line->setFrameShape (TQFrame::HLine);
+ lefttqlayout->addWidget (line);
+ lefttqlayout->addWidget (label);
+ lefttqlayout->addWidget (accesslist);
+ lefttqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
+ tqlayout->addLayout (lefttqlayout);
+ line = new TQFrame (this);
+ line->setFrameShape (TQFrame::VLine);
+ tqlayout->addWidget (line);
+ tqlayout->addLayout (formattqlayout);
+ tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
}
#undef ADDPROPERTY
@@ -301,10 +297,10 @@ KDE_NO_EXPORT void KMPlayerPrefBroadcastFormatPage::setSettings (const FFServerS
movieheight->setText (fs.height);
accesslist->setNumRows (0);
accesslist->setNumRows (50);
- QStringList::const_iterator it = fs.acl.begin ();
- QStringList::const_iterator end( fs.acl.end () );
+ TQStringList::const_iterator it = fs.acl.begin ();
+ TQStringList::const_iterator end( fs.acl.end () );
for (int i = 0; it != end; ++i, ++it)
- accesslist->setItem (i, 0, new QTableItem (accesslist, QTableItem::Always, *it));
+ accesslist->setItem (i, 0, new TQTableItem (accesslist, TQTableItem::Always, *it));
}
KDE_NO_EXPORT void KMPlayerPrefBroadcastFormatPage::getSettings (FFServerSetting & fs) {
@@ -332,7 +328,7 @@ KDE_NO_EXPORT void KMPlayerPrefBroadcastFormatPage::slotIndexChanged (int index)
setSettings (*profiles[index]);
}
-KDE_NO_EXPORT void KMPlayerPrefBroadcastFormatPage::slotTextChanged (const QString & txt) {
+KDE_NO_EXPORT void KMPlayerPrefBroadcastFormatPage::slotTextChanged (const TQString & txt) {
save->setEnabled (txt.length ());
}
@@ -419,10 +415,10 @@ KDE_NO_CDTOR_EXPORT KMPlayerBroadcastConfig::~KMPlayerBroadcastConfig () {
KDE_NO_EXPORT void KMPlayerBroadcastConfig::write (KConfig * config) {
config->setGroup (strBroadcast);
config->writeEntry (strFFServerCustomSetting, ffserversettings.list (), ';');
- QStringList sl;
+ TQStringList sl;
for (int i = 0; i < (int) ffserversettingprofiles.size (); i++) {
sl.push_back (ffserversettingprofiles[i]->name);
- config->writeEntry (QString ("Profile_") + ffserversettingprofiles[i]->name, ffserversettingprofiles[i]->list(), ';');
+ config->writeEntry (TQString ("Profile_") + ffserversettingprofiles[i]->name, ffserversettingprofiles[i]->list(), ';');
}
config->writeEntry (strFFServerProfiles, sl, ';');
}
@@ -432,11 +428,11 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::read (KConfig * config) {
ffserversettingprofiles.clear ();
config->setGroup (strBroadcast);
ffserversettings = config->readListEntry (strFFServerCustomSetting, ';');
- QStringList profiles = config->readListEntry (strFFServerProfiles, ';');
- QStringList::iterator pr_it = profiles.begin ();
- QStringList::iterator pr_end( profiles.end () );
+ TQStringList profiles = config->readListEntry (strFFServerProfiles, ';');
+ TQStringList::iterator pr_it = profiles.begin ();
+ TQStringList::iterator pr_end( profiles.end () );
for (; pr_it != pr_end; ++pr_it) {
- QStringList sl = config->readListEntry (QString ("Profile_") + *pr_it, ';');
+ TQStringList sl = config->readListEntry (TQString ("Profile_") + *pr_it, ';');
if (sl.size () > 10) {
FFServerSetting * ffs = new FFServerSetting (sl);
ffs->name = *pr_it;
@@ -450,21 +446,21 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::sync (bool fromUI) {
m_configpage->getSettings(ffserversettings);
} else {
m_configpage->setSettings (ffserversettings);
- m_configpage->profile->setText (QString ());
+ m_configpage->profile->setText (TQString ());
}
}
-KDE_NO_EXPORT void KMPlayerBroadcastConfig::prefLocation (QString & item, QString & icon, QString & tab) {
+KDE_NO_EXPORT void KMPlayerBroadcastConfig::prefLocation (TQString & item, TQString & icon, TQString & tab) {
item = i18n ("Broadcasting");
- icon = QString ("share");
+ icon = TQString ("share");
tab = i18n ("Profiles");
}
-QFrame * KMPlayerBroadcastConfig::prefPage (QWidget * parent) {
+TQFrame * KMPlayerBroadcastConfig::prefPage (TQWidget * tqparent) {
if (!m_configpage) {
- m_configpage = new KMPlayerPrefBroadcastFormatPage (parent, ffserversettingprofiles);
- connect (m_configpage->startbutton, SIGNAL (clicked ()), this, SLOT (startServer ()));
- connect (m_player, SIGNAL (sourceChanged (KMPlayer::Source *, KMPlayer::Source *)), this, SLOT (sourceChanged (KMPlayer::Source *,KMPlayer::Source *)));
+ m_configpage = new KMPlayerPrefBroadcastFormatPage (tqparent, ffserversettingprofiles);
+ connect (m_configpage->startbutton, TQT_SIGNAL (clicked ()), this, TQT_SLOT (startServer ()));
+ connect (m_player, TQT_SIGNAL (sourceChanged (KMPlayer::Source *, KMPlayer::Source *)), this, TQT_SLOT (sourceChanged (KMPlayer::Source *,KMPlayer::Source *)));
m_configpage->startbutton->setEnabled
(!m_player->source ()->videoDevice ().isEmpty ());
}
@@ -489,25 +485,25 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::startServer () {
stopServer ();
return;
}
- m_configpage->setCursor (QCursor (Qt::WaitCursor));
+ m_configpage->setCursor (TQCursor (TQt::WaitCursor));
m_ffserver_process = new KProcess;
m_ffserver_process->setUseShell (true);
- connect (m_ffserver_process, SIGNAL (processExited (KProcess *)),
- this, SLOT (processStopped (KProcess *)));
- QString conffile = locateLocal ("data", "kmplayer/ffserver.conf");
+ connect (m_ffserver_process, TQT_SIGNAL (processExited (KProcess *)),
+ this, TQT_SLOT (processStopped (KProcess *)));
+ TQString conffile = locateLocal ("data", "kmplayer/ffserver.conf");
const char * noaudio = m_player->source ()->audioDevice ().isEmpty () ? "NoAudio" : "";
FFServerSetting ffs;
m_configpage->getSettings (ffs);
- QString acl;
- QStringList::iterator it = ffs.acl.begin ();
- QStringList::iterator end( ffs.acl.end () );
+ TQString acl;
+ TQStringList::iterator it = ffs.acl.begin ();
+ TQStringList::iterator end( ffs.acl.end () );
for (; it != end; ++it)
- acl += QString ("ACL allow ") + *it + QString ("\n");
+ acl += TQString ("ACL allow ") + *it + TQString ("\n");
unlink (m_ffserverconfig->feedfile.ascii ());
- QFile qfile (conffile);
+ TQFile qfile (conffile);
qfile.open (IO_WriteOnly);
- QString configdata;
- QString buf;
+ TQString configdata;
+ TQString buf;
configdata.sprintf (ffserverconf, m_ffserverconfig->ffserverport, m_ffserverconfig->bindaddress.ascii (), m_ffserverconfig->maxclients, m_ffserverconfig->maxbandwidth, m_ffserverconfig->feedfile.ascii (), m_ffserverconfig->feedfilesize, ffs.format.ascii (), acl.ascii (), ffs.ffconfig (buf).ascii (), noaudio);
qfile.writeBlock (configdata.ascii (), configdata.length ());
qfile.close ();
@@ -516,15 +512,15 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::startServer () {
*m_ffserver_process << "ffserver -f " << conffile;
m_ffserver_out.truncate (0);
connect (m_ffserver_process,
- SIGNAL (receivedStderr (KProcess *, char *, int)),
- this, SLOT (processOutput (KProcess *, char *, int)));
+ TQT_SIGNAL (receivedStderr (KProcess *, char *, int)),
+ this, TQT_SLOT (processOutput (KProcess *, char *, int)));
m_ffserver_process->start (KProcess::NotifyOnExit, KProcess::Stderr);
if (m_ffserver_process->isRunning ()) {
m_configpage->startbutton->setText (i18n ("Stop"));
m_configpage->serverled->setState (KLed::On);
emit broadcastStarted ();
}
- QTimer::singleShot (500, this, SLOT (startFeed ()));
+ TQTimer::singleShot (500, this, TQT_SLOT (startFeed ()));
}
KDE_NO_EXPORT void KMPlayerBroadcastConfig::stopServer () {
@@ -537,7 +533,7 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::stopServer () {
KDE_NO_EXPORT void KMPlayerBroadcastConfig::processOutput (KProcess * p, char * s, int) {
if (p == m_ffserver_process)
- m_ffserver_out += QString (s);
+ m_ffserver_out += TQString (s);
}
KDE_NO_EXPORT void KMPlayerBroadcastConfig::startFeed () {
@@ -547,18 +543,18 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::startFeed () {
}
FFServerSetting ffs;
m_configpage->getSettings (ffs);
- QString ffurl;
+ TQString ffurl;
if (!m_ffserver_process || !m_ffserver_process->isRunning ()) {
KMessageBox::error (m_configpage, i18n ("Failed to start ffserver.\n") + m_ffserver_out, i18n ("Error"));
goto bail_out;
}
- disconnect (m_ffserver_process, SIGNAL (receivedStderr (KProcess *, char *, int)),
- this, SLOT (processOutput (KProcess *, char *, int)));
+ disconnect (m_ffserver_process, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)),
+ this, TQT_SLOT (processOutput (KProcess *, char *, int)));
if (m_ffmpeg_process)
m_ffmpeg_process->stop ();
delete m_ffmpeg_process;
m_ffmpeg_process = new KMPlayer::FFMpeg (m_player, m_player->settings ());
- connect (m_ffmpeg_process, SIGNAL (stateChange (KMPlayer::Process::State, KMPlayer::Process::State)), this, SLOT (stateChange (KMPlayer::Process::State, KMPlayer::Process::State)));
+ connect (m_ffmpeg_process, TQT_SIGNAL (stateChange (KMPlayer::Process::State, KMPlayer::Process::State)), this, TQT_SLOT (stateChange (KMPlayer::Process::State, KMPlayer::Process::State)));
ffurl.sprintf ("http://localhost:%d/kmplayer.ffm", m_ffserverconfig->ffserverport);
m_ffmpeg_process->setURL (KURL(ffurl));
if (!m_ffmpeg_process->play (m_player->source (), KMPlayer::NodePtr())) {
@@ -574,7 +570,7 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::startFeed () {
} else
stopServer ();
bail_out:
- m_configpage->setCursor (QCursor (Qt::ArrowCursor));
+ m_configpage->setCursor (TQCursor (TQt::ArrowCursor));
}
KDE_NO_EXPORT void KMPlayerBroadcastConfig::stateChange (KMPlayer::Process::State old, KMPlayer::Process::State state) {
@@ -586,8 +582,8 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::stateChange (KMPlayer::Process::Stat
kdDebug () << "ffmpeg process stopped " << m_endserver << endl;
if (m_endserver && !stopProcess (m_ffserver_process)) {
disconnect (m_ffserver_process,
- SIGNAL (receivedStderr (KProcess *, char *, int)),
- this, SLOT (processOutput (KProcess *, char *, int)));
+ TQT_SIGNAL (receivedStderr (KProcess *, char *, int)),
+ this, TQT_SLOT (processOutput (KProcess *, char *, int)));
KMessageBox::error (m_configpage, i18n ("Failed to end ffserver process."), i18n ("Error"));
processStopped (0L);
}
@@ -646,23 +642,23 @@ KDE_NO_EXPORT void KMPlayerFFServerConfig::sync (bool fromUI) {
feedfilesize = m_configpage->feedfilesize->text ().toInt();
} else {
m_configpage->bindaddress->setText (bindaddress);
- m_configpage->port->setText (QString::number (ffserverport));
- m_configpage->maxclients->setText (QString::number (maxclients));
- m_configpage->maxbandwidth->setText (QString::number (maxbandwidth));
+ m_configpage->port->setText (TQString::number (ffserverport));
+ m_configpage->maxclients->setText (TQString::number (maxclients));
+ m_configpage->maxbandwidth->setText (TQString::number (maxbandwidth));
m_configpage->feedfile->setText (feedfile);
- m_configpage->feedfilesize->setText (QString::number (feedfilesize));
+ m_configpage->feedfilesize->setText (TQString::number (feedfilesize));
}
}
-KDE_NO_EXPORT void KMPlayerFFServerConfig::prefLocation (QString & item, QString & icon, QString & tab) {
+KDE_NO_EXPORT void KMPlayerFFServerConfig::prefLocation (TQString & item, TQString & icon, TQString & tab) {
item = i18n ("Broadcasting");
- icon = QString ("share");
+ icon = TQString ("share");
tab = i18n ("FFServer");
}
-KDE_NO_EXPORT QFrame *KMPlayerFFServerConfig::prefPage (QWidget * parent) {
+KDE_NO_EXPORT TQFrame *KMPlayerFFServerConfig::prefPage (TQWidget * tqparent) {
if (!m_configpage)
- m_configpage = new KMPlayerPrefBroadcastPage (parent);
+ m_configpage = new KMPlayerPrefBroadcastPage (tqparent);
return m_configpage;
}