summaryrefslogtreecommitdiffstats
path: root/src/kmplayertvsource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kmplayertvsource.cpp')
-rw-r--r--src/kmplayertvsource.cpp322
1 files changed, 161 insertions, 161 deletions
diff --git a/src/kmplayertvsource.cpp b/src/kmplayertvsource.cpp
index 8ccdcd6..eaa73c6 100644
--- a/src/kmplayertvsource.cpp
+++ b/src/kmplayertvsource.cpp
@@ -17,21 +17,21 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qtable.h>
-#include <qstringlist.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qgroupbox.h>
-#include <qwhatsthis.h>
-#include <qtabwidget.h>
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qfontmetrics.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqtable.h>
+#include <tqstringlist.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqgroupbox.h>
+#include <tqwhatsthis.h>
+#include <tqtabwidget.h>
+#include <tqmessagebox.h>
+#include <tqpopupmenu.h>
+#include <tqfontmetrics.h>
#include <klocale.h>
#include <kdebug.h>
@@ -55,84 +55,84 @@ static const char * strTV = "TV";
static const char * strTVDriver = "Driver";
-KDE_NO_CDTOR_EXPORT TVDevicePage::TVDevicePage (QWidget *parent, KMPlayer::NodePtr dev)
-: QFrame (parent, "PageTVDevice"), device_doc (dev) {
+KDE_NO_CDTOR_EXPORT TVDevicePage::TVDevicePage (TQWidget *tqparent, KMPlayer::NodePtr dev)
+: TQFrame (tqparent, "PageTVDevice"), device_doc (dev) {
TVDevice * device = KMPlayer::convertNode <TVDevice> (device_doc);
- QVBoxLayout *layout = new QVBoxLayout (this, 5, 2);
- QLabel * deviceLabel = new QLabel (i18n ("Video device:") + device->src, this, 0);
- layout->addWidget (deviceLabel);
- QGridLayout *gridlayout = new QGridLayout (layout, 3, 4);
- QLabel * audioLabel = new QLabel (i18n ("Audio device:"), this);
+ TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5, 2);
+ TQLabel * deviceLabel = new TQLabel (i18n ("Video device:") + device->src, this, 0);
+ tqlayout->addWidget (deviceLabel);
+ TQGridLayout *gridtqlayout = new TQGridLayout (tqlayout, 3, 4);
+ TQLabel * audioLabel = new TQLabel (i18n ("Audio device:"), this);
audiodevice = new KURLRequester (device->getAttribute ("audio"), this);
- QLabel * nameLabel = new QLabel (i18n ("Name:"), this, 0);
- name = new QLineEdit (device->pretty_name, this, 0);
- QLabel *sizewidthLabel = new QLabel (i18n ("Width:"), this, 0);
- sizewidth = new QLineEdit (device->getAttribute (KMPlayer::StringPool::attr_width), this, 0);
- QLabel *sizeheightLabel = new QLabel (i18n ("Height:"), this, 0);
- sizeheight = new QLineEdit (device->getAttribute (KMPlayer::StringPool::attr_height), this, 0);
- noplayback = new QCheckBox (i18n ("Do not immediately play"), this);
+ TQLabel * nameLabel = new TQLabel (i18n ("Name:"), this, 0);
+ name = new TQLineEdit (device->pretty_name, this, 0);
+ TQLabel *sizewidthLabel = new TQLabel (i18n ("Width:"), this, 0);
+ sizewidth = new TQLineEdit (device->getAttribute (KMPlayer::StringPool::attr_width), this, 0);
+ TQLabel *sizeheightLabel = new TQLabel (i18n ("Height:"), this, 0);
+ sizeheight = new TQLineEdit (device->getAttribute (KMPlayer::StringPool::attr_height), this, 0);
+ noplayback = new TQCheckBox (i18n ("Do not immediately play"), this);
noplayback->setChecked (!device->getAttribute ("playback").toInt ());
- QWhatsThis::add (noplayback, i18n ("Only start playing after clicking the play button"));
- inputsTab = new QTabWidget (this);
+ TQWhatsThis::add (noplayback, i18n ("Only start playing after clicking the play button"));
+ inputsTab = new TQTabWidget (this);
for (KMPlayer::NodePtr ip = device->firstChild (); ip; ip = ip->nextSibling ()) {
if (ip->id != id_node_tv_input)
continue;
TVInput * input = KMPlayer::convertNode <TVInput> (ip);
- QWidget * widget = new QWidget (this);
- QHBoxLayout *tablayout = new QHBoxLayout (widget, 5, 2);
+ TQWidget * widget = new TQWidget (this);
+ TQHBoxLayout *tabtqlayout = new TQHBoxLayout (widget, 5, 2);
if (!input->getAttribute ("tuner").isEmpty ()) {
- QHBoxLayout *horzlayout = new QHBoxLayout ();
- QVBoxLayout *vertlayout = new QVBoxLayout ();
- horzlayout->addWidget (new QLabel (i18n ("Norm:"), widget));
- QComboBox * norms = new QComboBox (widget, "PageTVNorm");
- norms->insertItem (QString ("NTSC"), 0);
- norms->insertItem (QString ("PAL"), 1);
- norms->insertItem (QString ("SECAM"), 2);
+ TQHBoxLayout *horztqlayout = new TQHBoxLayout ();
+ TQVBoxLayout *verttqlayout = new TQVBoxLayout ();
+ horztqlayout->addWidget (new TQLabel (i18n ("Norm:"), widget));
+ TQComboBox * norms = new TQComboBox (widget, "PageTVNorm");
+ norms->insertItem (TQString ("NTSC"), 0);
+ norms->insertItem (TQString ("PAL"), 1);
+ norms->insertItem (TQString ("SECAM"), 2);
norms->setCurrentText (input->getAttribute ("norm"));
- horzlayout->addWidget (norms);
- vertlayout->addLayout (horzlayout);
- vertlayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
- QTable * table = new QTable (90, 2, widget, "PageTVChannels");
- QFontMetrics metrics (table->font ());
- QHeader *header = table->horizontalHeader();
+ horztqlayout->addWidget (norms);
+ verttqlayout->addLayout (horztqlayout);
+ verttqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
+ TQTable * table = new TQTable (90, 2, widget, "PageTVChannels");
+ TQFontMetrics metrics (table->font ());
+ TQHeader *header = table->horizontalHeader();
header->setLabel (0, i18n ("Channel"));
header->setLabel (1, i18n ("Frequency (MHz)"));
int index = 0;
- int first_column_width = QFontMetrics (header->font ()).boundingRect (header->label (0)).width () + 20;
+ int first_column_width = TQFontMetrics (header->font ()).boundingRect (header->label (0)).width () + 20;
for (KMPlayer::NodePtr c=input->firstChild();c;c=c->nextSibling()) {
if (c->id != id_node_tv_channel)
continue;
int strwid = metrics.boundingRect (c->mrl ()->pretty_name).width ();
if (strwid > first_column_width)
first_column_width = strwid + 4;
- table->setItem (index, 0, new QTableItem (table, QTableItem::Always, c->mrl ()->pretty_name));
- table->setItem (index++, 1, new QTableItem (table, QTableItem::Always, KMPlayer::convertNode<TVChannel>(c)->getAttribute ("frequency")));
+ table->setItem (index, 0, new TQTableItem (table, TQTableItem::Always, c->mrl ()->pretty_name));
+ table->setItem (index++, 1, new TQTableItem (table, TQTableItem::Always, KMPlayer::convertNode<TVChannel>(c)->getAttribute ("frequency")));
}
table->setColumnWidth (0, first_column_width);
table->setColumnStretchable (1, true);
- tablayout->addWidget (table);
- tablayout->addLayout (vertlayout);
+ tabtqlayout->addWidget (table);
+ tabtqlayout->addLayout (verttqlayout);
}
inputsTab->addTab (widget, input->mrl ()->pretty_name);
}
- QPushButton * delButton = new QPushButton (i18n ("Delete"), this);
- connect (delButton, SIGNAL (clicked ()), this, SLOT (slotDelete ()));
- gridlayout->addWidget (audioLabel, 0, 0);
- gridlayout->addMultiCellWidget (audiodevice, 0, 0, 1, 3);
- gridlayout->addWidget (nameLabel, 1, 0);
- gridlayout->addMultiCellWidget (name, 1, 1, 1, 3);
- gridlayout->addWidget (sizewidthLabel, 2, 0);
- gridlayout->addWidget (sizewidth, 2, 1);
- gridlayout->addWidget (sizeheightLabel, 2, 2);
- gridlayout->addWidget (sizeheight, 2, 3);
- layout->addWidget (inputsTab);
- layout->addSpacing (5);
- layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum));
- QHBoxLayout *buttonlayout = new QHBoxLayout ();
- buttonlayout->addWidget (noplayback);
- buttonlayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- buttonlayout->addWidget (delButton);
- layout->addLayout (buttonlayout);
+ TQPushButton * delButton = new TQPushButton (i18n ("Delete"), this);
+ connect (delButton, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotDelete ()));
+ gridtqlayout->addWidget (audioLabel, 0, 0);
+ gridtqlayout->addMultiCellWidget (audiodevice, 0, 0, 1, 3);
+ gridtqlayout->addWidget (nameLabel, 1, 0);
+ gridtqlayout->addMultiCellWidget (name, 1, 1, 1, 3);
+ gridtqlayout->addWidget (sizewidthLabel, 2, 0);
+ gridtqlayout->addWidget (sizewidth, 2, 1);
+ gridtqlayout->addWidget (sizeheightLabel, 2, 2);
+ gridtqlayout->addWidget (sizeheight, 2, 3);
+ tqlayout->addWidget (inputsTab);
+ tqlayout->addSpacing (5);
+ tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum));
+ TQHBoxLayout *buttontqlayout = new TQHBoxLayout ();
+ buttontqlayout->addWidget (noplayback);
+ buttontqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ buttontqlayout->addWidget (delButton);
+ tqlayout->addLayout (buttontqlayout);
}
KDE_NO_EXPORT void TVDevicePage::slotDelete () {
@@ -142,58 +142,58 @@ KDE_NO_EXPORT void TVDevicePage::slotDelete () {
//-----------------------------------------------------------------------------
-KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageTV::KMPlayerPrefSourcePageTV (QWidget *parent, KMPlayerTVSource * tvsource)
-: QFrame (parent), m_tvsource (tvsource) {
- QVBoxLayout * mainlayout = new QVBoxLayout (this, 5);
- notebook = new QTabWidget (this);
- notebook->setTabPosition (QTabWidget::Bottom);
- mainlayout->addWidget (notebook);
- QWidget * general = new QWidget (notebook);
- QVBoxLayout *layout = new QVBoxLayout (general);
- QGridLayout *gridlayout = new QGridLayout (layout, 2, 2, 2);
- QLabel *driverLabel = new QLabel (i18n ("Driver:"), general, 0);
- driver = new QLineEdit ("", general, 0);
- QWhatsThis::add (driver, i18n ("dummy, v4l or bsdbt848"));
- QLabel *deviceLabel = new QLabel (i18n ("Device:"), general, 0);
+KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageTV::KMPlayerPrefSourcePageTV (TQWidget *tqparent, KMPlayerTVSource * tvsource)
+: TQFrame (tqparent), m_tvsource (tvsource) {
+ TQVBoxLayout * maintqlayout = new TQVBoxLayout (this, 5);
+ notebook = new TQTabWidget (this);
+ notebook->setTabPosition (TQTabWidget::Bottom);
+ maintqlayout->addWidget (notebook);
+ TQWidget * general = new TQWidget (notebook);
+ TQVBoxLayout *tqlayout = new TQVBoxLayout (general);
+ TQGridLayout *gridtqlayout = new TQGridLayout (tqlayout, 2, 2, 2);
+ TQLabel *driverLabel = new TQLabel (i18n ("Driver:"), general, 0);
+ driver = new TQLineEdit ("", general, 0);
+ TQWhatsThis::add (driver, i18n ("dummy, v4l or bsdbt848"));
+ TQLabel *deviceLabel = new TQLabel (i18n ("Device:"), general, 0);
device = new KURLRequester ("/dev/video", general);
- QWhatsThis::add(device, i18n("Path to your video device, eg. /dev/video0"));
- scan = new QPushButton (i18n ("Scan..."), general);
- gridlayout->addWidget (driverLabel, 0, 0);
- gridlayout->addWidget (driver, 0, 1);
- gridlayout->addWidget (deviceLabel, 1, 0);
- gridlayout->addWidget (device, 1, 1);
- QHBoxLayout *buttonlayout = new QHBoxLayout ();
- buttonlayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum));
- buttonlayout->addWidget (scan);
- layout->addLayout (buttonlayout);
- layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
+ TQWhatsThis::add(device, i18n("Path to your video device, eg. /dev/video0"));
+ scan = new TQPushButton (i18n ("Scan..."), general);
+ gridtqlayout->addWidget (driverLabel, 0, 0);
+ gridtqlayout->addWidget (driver, 0, 1);
+ gridtqlayout->addWidget (deviceLabel, 1, 0);
+ gridtqlayout->addWidget (device, 1, 1);
+ TQHBoxLayout *buttontqlayout = new TQHBoxLayout ();
+ buttontqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum));
+ buttontqlayout->addWidget (scan);
+ tqlayout->addLayout (buttontqlayout);
+ tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
notebook->insertTab (general, i18n ("General"));
}
-KDE_NO_EXPORT void KMPlayerPrefSourcePageTV::showEvent (QShowEvent *) {
+KDE_NO_EXPORT void KMPlayerPrefSourcePageTV::showEvent (TQShowEvent *) {
m_tvsource->readXML ();
}
//-----------------------------------------------------------------------------
-KDE_NO_CDTOR_EXPORT TVNode::TVNode (KMPlayer::NodePtr &d, const QString & s, const char * t, short id, const QString & n) : KMPlayer::GenericMrl (d, s, n, t) {
+KDE_NO_CDTOR_EXPORT TVNode::TVNode (KMPlayer::NodePtr &d, const TQString & s, const char * t, short id, const TQString & n) : KMPlayer::GenericMrl (d, s, n, t) {
this->id = id;
editable = true;
}
-KDE_NO_EXPORT void TVNode::setNodeName (const QString & nn) {
+KDE_NO_EXPORT void TVNode::setNodeName (const TQString & nn) {
pretty_name = nn;
setAttribute (KMPlayer::StringPool::attr_name, nn);
}
//-----------------------------------------------------------------------------
-KDE_NO_CDTOR_EXPORT TVChannel::TVChannel (KMPlayer::NodePtr & d, const QString & n, double freq) : TVNode (d, QString ("tv://"), "channel", id_node_tv_channel, n) {
+KDE_NO_CDTOR_EXPORT TVChannel::TVChannel (KMPlayer::NodePtr & d, const TQString & n, double freq) : TVNode (d, TQString ("tv://"), "channel", id_node_tv_channel, n) {
setAttribute (KMPlayer::StringPool::attr_name, n);
- setAttribute ("frequency", QString::number (freq, 'f', 2));
+ setAttribute ("frequency", TQString::number (freq, 'f', 2));
}
-KDE_NO_CDTOR_EXPORT TVChannel::TVChannel (KMPlayer::NodePtr & d) : TVNode (d, QString ("tv://"), "channel", id_node_tv_channel) {
+KDE_NO_CDTOR_EXPORT TVChannel::TVChannel (KMPlayer::NodePtr & d) : TVNode (d, TQString ("tv://"), "channel", id_node_tv_channel) {
}
KDE_NO_EXPORT void TVChannel::closed () {
@@ -202,18 +202,18 @@ KDE_NO_EXPORT void TVChannel::closed () {
//-----------------------------------------------------------------------------
-TVInput::TVInput (KMPlayer::NodePtr & d, const QString & n, int id)
- : TVNode (d, QString ("tv://"), "input", id_node_tv_input, n) {
+TVInput::TVInput (KMPlayer::NodePtr & d, const TQString & n, int id)
+ : TVNode (d, TQString ("tv://"), "input", id_node_tv_input, n) {
setAttribute (KMPlayer::StringPool::attr_name, n);
- setAttribute (KMPlayer::StringPool::attr_id, QString::number (id));
+ setAttribute (KMPlayer::StringPool::attr_id, TQString::number (id));
}
-KDE_NO_CDTOR_EXPORT TVInput::TVInput (KMPlayer::NodePtr & d) : TVNode (d, QString ("tv://"), "input", id_node_tv_input) {
+KDE_NO_CDTOR_EXPORT TVInput::TVInput (KMPlayer::NodePtr & d) : TVNode (d, TQString ("tv://"), "input", id_node_tv_input) {
}
-KDE_NO_EXPORT KMPlayer::NodePtr TVInput::childFromTag (const QString & tag) {
+KDE_NO_EXPORT KMPlayer::NodePtr TVInput::childFromTag (const TQString & tag) {
// kdDebug () << nodeName () << " childFromTag " << tag << endl;
- if (tag == QString::fromLatin1 ("channel")) {
+ if (tag == TQString::tqfromLatin1 ("channel")) {
return new TVChannel (m_doc);
} else
return 0L;
@@ -223,21 +223,21 @@ KDE_NO_EXPORT void TVInput::closed () {
//pretty_name = getAttribute (KMPlayer::StringPool::attr_name);
}
-KDE_NO_EXPORT void TVInput::setNodeName (const QString & name) {
- Node * p = parentNode ().ptr ();
- QString nm (name);
+KDE_NO_EXPORT void TVInput::setNodeName (const TQString & name) {
+ Node * p = tqparentNode ().ptr ();
+ TQString nm (name);
if (p && p->id == id_node_tv_device) {
- int pos = name.find (QString (" - ") + p->mrl ()->pretty_name);
+ int pos = name.tqfind (TQString (" - ") + p->mrl ()->pretty_name);
if (pos > -1)
nm.truncate (pos);
}
- pretty_name = nm + QString (" - ") + pretty_name;
+ pretty_name = nm + TQString (" - ") + pretty_name;
TVNode::setNodeName (nm);
}
//-----------------------------------------------------------------------------
-KDE_NO_CDTOR_EXPORT TVDevice::TVDevice (KMPlayer::NodePtr & doc, const QString & d) : TVNode (doc, d, "device", id_node_tv_device), zombie (false) {
+KDE_NO_CDTOR_EXPORT TVDevice::TVDevice (KMPlayer::NodePtr & doc, const TQString & d) : TVNode (doc, d, "device", id_node_tv_device), zombie (false) {
setAttribute ("path", d);
}
@@ -250,9 +250,9 @@ KDE_NO_CDTOR_EXPORT TVDevice::~TVDevice () {
device_page->deleteLater ();
}
-KDE_NO_EXPORT KMPlayer::NodePtr TVDevice::childFromTag (const QString & tag) {
+KDE_NO_EXPORT KMPlayer::NodePtr TVDevice::childFromTag (const TQString & tag) {
// kdDebug () << nodeName () << " childFromTag " << tag << endl;
- if (tag == QString::fromLatin1 ("input"))
+ if (tag == TQString::tqfromLatin1 ("input"))
return new TVInput (m_doc);
return 0L;
}
@@ -265,7 +265,7 @@ KDE_NO_EXPORT void TVDevice::childDone (KMPlayer::NodePtr) {
finish ();
}
-KDE_NO_EXPORT void TVDevice::setNodeName (const QString & name) {
+KDE_NO_EXPORT void TVDevice::setNodeName (const TQString & name) {
TVNode::setNodeName (name);
updateNodeName ();
}
@@ -277,7 +277,7 @@ KDE_NO_EXPORT void TVDevice::updateNodeName () {
if (c->id == id_node_tv_input) {
TVInput * i = static_cast <TVInput *> (c.ptr ());
i->pretty_name = i->getAttribute (KMPlayer::StringPool::attr_name) +
- QString (" - ") + pretty_name;
+ TQString (" - ") + pretty_name;
}
}
@@ -297,15 +297,15 @@ KDE_NO_EXPORT void TVDevice::updateDevicePage () {
TVInput * input = KMPlayer::convertNode <TVInput> (ip);
bool ok;
if (input->getAttribute ("tuner").toInt (&ok) && ok) {
- QWidget * widget = device_page->inputsTab->page (i);
- QTable * table = static_cast <QTable *> (widget->child ("PageTVChannels", "QTable"));
+ TQWidget * widget = device_page->inputsTab->page (i);
+ TQTable * table = static_cast <TQTable *> (TQT_TQWIDGET(widget->child ("PageTVChannels", TQTABLE_OBJECT_NAME_STRING)));
if (table) {
input->clearChildren ();
for (int j = 0; j<table->numRows() && table->item (j, 1); ++j) {
input->appendChild (new TVChannel (m_doc, table->item (j, 0)->text (), table->item (j, 1)->text ().toDouble ()));
}
}
- QComboBox * norms = static_cast <QComboBox *> (widget->child ("PageTVNorm", "QComboBox"));
+ TQComboBox * norms = static_cast <TQComboBox *> (TQT_TQWIDGET(widget->child ("PageTVNorm", TQCOMBOBOX_OBJECT_NAME_STRING)));
if (norms) {
input->setAttribute ("norm", norms->currentText ());
}
@@ -321,9 +321,9 @@ TVDocument::TVDocument (KMPlayerTVSource * source)
pretty_name = i18n ("Television");
}
-KDE_NO_EXPORT KMPlayer::NodePtr TVDocument::childFromTag (const QString & tag) {
+KDE_NO_EXPORT KMPlayer::NodePtr TVDocument::childFromTag (const TQString & tag) {
// kdDebug () << nodeName () << " childFromTag " << tag << endl;
- if (tag == QString::fromLatin1 ("device"))
+ if (tag == TQString::tqfromLatin1 ("device"))
return new TVDevice (m_doc);
return FileDocument::childFromTag (tag);
}
@@ -341,11 +341,11 @@ KDE_NO_EXPORT void TVDocument::defer () {
//-----------------------------------------------------------------------------
-KDE_NO_CDTOR_EXPORT KMPlayerTVSource::KMPlayerTVSource (KMPlayerApp * a, QPopupMenu * m)
+KDE_NO_CDTOR_EXPORT KMPlayerTVSource::KMPlayerTVSource (KMPlayerApp * a, TQPopupMenu * m)
: KMPlayerMenuSource (i18n ("TV"), a, m, "tvsource"), m_configpage (0L), scanner (0L), config_read (false) {
m_url = "tv://";
m_menu->insertTearOffHandle ();
- connect (m_menu, SIGNAL (aboutToShow ()), this, SLOT (menuAboutToShow ()));
+ connect (m_menu, TQT_SIGNAL (aboutToShow ()), this, TQT_SLOT (menuAboutToShow ()));
m_document = new TVDocument (this);
m_player->settings ()->addPage (this);
tree_id = static_cast <KMPlayer::View*>(m_player->view ())->playList ()->addTree (m_document, "tvsource", "tv", KMPlayer::PlayListView::TreeEdit | KMPlayer::PlayListView::Moveable | KMPlayer::PlayListView::Deleteable);
@@ -377,9 +377,9 @@ KDE_NO_EXPORT void KMPlayerTVSource::activate () {
KMPlayer::Source::reset ();
buildArguments ();
if (m_cur_tvdevice) {
- QString playback = static_cast <KMPlayer::Element *> (m_cur_tvdevice.ptr ())->getAttribute (QString::fromLatin1 ("playback"));
+ TQString playback = static_cast <KMPlayer::Element *> (m_cur_tvdevice.ptr ())->getAttribute (TQString::tqfromLatin1 ("playback"));
if (playback.isEmpty () || playback.toInt ())
- QTimer::singleShot (0, m_player, SLOT (play ()));
+ TQTimer::singleShot (0, m_player, TQT_SLOT (play ()));
}
}
/* TODO: playback by
@@ -397,7 +397,7 @@ KDE_NO_EXPORT void KMPlayerTVSource::buildMenu () {
int counter = 0;
for (KMPlayer::NodePtr dp = m_document->firstChild (); dp; dp = dp->nextSibling ())
if (dp->id == id_node_tv_device)
- m_menu->insertItem (KMPlayer::convertNode <TVDevice> (dp)->pretty_name, this, SLOT (menuClicked (int)), 0, counter++);
+ m_menu->insertItem (KMPlayer::convertNode <TVDevice> (dp)->pretty_name, this, TQT_SLOT (menuClicked (int)), 0, counter++);
}
KDE_NO_EXPORT void KMPlayerTVSource::menuAboutToShow () {
@@ -409,7 +409,7 @@ void KMPlayerTVSource::jump (KMPlayer::NodePtr e) {
readXML ();
} else {
m_current = e;
- for (; e; e = e->parentNode ()) {
+ for (; e; e = e->tqparentNode ()) {
if (e->id == id_node_tv_device) {
m_cur_tvdevice = e;
break;
@@ -436,14 +436,14 @@ KDE_NO_EXPORT void KMPlayerTVSource::buildArguments () {
KMPlayer::NodePtr elm = m_current;
if (elm && elm->id == id_node_tv_channel) {
channel = KMPlayer::convertNode <TVChannel> (elm);
- elm = elm->parentNode ();
+ elm = elm->tqparentNode ();
}
if (elm && elm->id == id_node_tv_input)
input = KMPlayer::convertNode <TVInput> (elm);
if (!(channel || (input && input->getAttribute ("tuner").isEmpty ())))
return;
m_cur_tvinput = input;
- m_cur_tvdevice = input->parentNode ();
+ m_cur_tvdevice = input->tqparentNode ();
static_cast <KMPlayer::View*>(m_player->view ())->playList ()->updateTree (0, m_cur_tvinput, m_current, true, false);
if (m_cur_tvdevice->id != id_node_tv_device) {
return;
@@ -454,39 +454,39 @@ KDE_NO_EXPORT void KMPlayerTVSource::buildArguments () {
m_videodevice = tvdevice->src;
m_videonorm = input->getAttribute ("norm");
m_tuner = input->getAttribute (KMPlayer::StringPool::attr_name);
- QString xvport = tvdevice->getAttribute ("xvport");
+ TQString xvport = tvdevice->getAttribute ("xvport");
if (!xvport.isEmpty ())
m_xvport = xvport.toInt ();
- QString xvenc = input->getAttribute ("xvenc");
+ TQString xvenc = input->getAttribute ("xvenc");
if (!xvenc.isEmpty ())
m_xvencoding = xvenc.toInt ();
- QString command;
+ TQString command;
command.sprintf ("device=%s:input=%s",
tvdevice->src.ascii (),
input->getAttribute (KMPlayer::StringPool::attr_id).ascii ());
if (channel) {
- QString freq = channel->getAttribute ("frequency");
+ TQString freq = channel->getAttribute ("frequency");
m_frequency = (int)(1000 * freq.toDouble ());
- command += QString (":freq=%1").arg (freq);
+ command += TQString (":freq=%1").arg (freq);
} else
m_frequency = 0;
if (!m_videonorm.isEmpty ())
- command += QString (":norm=%1").arg (m_videonorm);
+ command += TQString (":norm=%1").arg (m_videonorm);
m_app->setCaption (i18n ("TV: ") + (channel ? channel->mrl ()->pretty_name : input->mrl ()->pretty_name), false);
setDimensions (m_cur_tvdevice,
tvdevice->getAttribute (KMPlayer::StringPool::attr_width).toInt (),
tvdevice->getAttribute (KMPlayer::StringPool::attr_height).toInt ());
m_options.sprintf ("-tv noaudio:driver=%s:%s:width=%d:height=%d -slave -nocache -quiet", tvdriver.ascii (), command.ascii (), width (), height ());
if (m_player->settings ()->mplayerpost090)
- m_recordcmd.sprintf ("-tv %s:driver=%s:%s:width=%d:height=%d", m_audiodevice.isEmpty () ? "noaudio" : (QString ("forceaudio:adevice=") + m_audiodevice).ascii(), tvdriver.ascii (), command.ascii (), width (), height ());
+ m_recordcmd.sprintf ("-tv %s:driver=%s:%s:width=%d:height=%d", m_audiodevice.isEmpty () ? "noaudio" : (TQString ("forceaudio:adevice=") + m_audiodevice).ascii(), tvdriver.ascii (), command.ascii (), width (), height ());
else
- m_recordcmd.sprintf ("-tv on:%s:driver=%s:%s:width=%d:height=%d", m_audiodevice.isEmpty () ? "noaudio" : (QString ("forceaudio:adevice=") + m_audiodevice).ascii(), tvdriver.ascii (), command.ascii (), width (), height ());
+ m_recordcmd.sprintf ("-tv on:%s:driver=%s:%s:width=%d:height=%d", m_audiodevice.isEmpty () ? "noaudio" : (TQString ("forceaudio:adevice=") + m_audiodevice).ascii(), tvdriver.ascii (), command.ascii (), width (), height ());
}
KDE_NO_EXPORT void KMPlayerTVSource::playCurrent () {
buildArguments ();
if (m_app->broadcasting ())
- QTimer::singleShot (0, m_app->broadcastConfig (), SLOT (startFeed ()));
+ TQTimer::singleShot (0, m_app->broadcastConfig (), TQT_SLOT (startFeed ()));
else
KMPlayer::Source::playCurrent ();
}
@@ -501,10 +501,10 @@ KDE_NO_EXPORT void KMPlayerTVSource::menuClicked (int id) {
m_player->setSource (this);
}
-KDE_NO_EXPORT QString KMPlayerTVSource::filterOptions () {
+KDE_NO_EXPORT TQString KMPlayerTVSource::filterOptions () {
if (! m_player->settings ()->disableppauto)
return KMPlayer::Source::filterOptions ();
- return QString ("-vf pp=lb");
+ return TQString ("-vf pp=lb");
}
KDE_NO_EXPORT bool KMPlayerTVSource::hasLength () {
@@ -515,8 +515,8 @@ KDE_NO_EXPORT bool KMPlayerTVSource::isSeekable () {
return true;
}
-KDE_NO_EXPORT QString KMPlayerTVSource::prettyName () {
- QString name (i18n ("TV"));
+KDE_NO_EXPORT TQString KMPlayerTVSource::prettyName () {
+ TQString name (i18n ("TV"));
//if (m_tvsource)
// name += ' ' + m_tvsource->title;
return name;
@@ -565,22 +565,22 @@ KDE_NO_EXPORT void KMPlayerTVSource::sync (bool fromUI) {
}
}
-KDE_NO_EXPORT void KMPlayerTVSource::prefLocation (QString & item, QString & icon, QString & tab) {
+KDE_NO_EXPORT void KMPlayerTVSource::prefLocation (TQString & item, TQString & icon, TQString & tab) {
item = i18n ("Source");
- icon = QString ("source");
+ icon = TQString ("source");
tab = i18n ("TV");
}
-KDE_NO_EXPORT QFrame * KMPlayerTVSource::prefPage (QWidget * parent) {
+KDE_NO_EXPORT TQFrame * KMPlayerTVSource::prefPage (TQWidget * tqparent) {
if (!m_configpage) {
- m_configpage = new KMPlayerPrefSourcePageTV (parent, this);
+ m_configpage = new KMPlayerPrefSourcePageTV (tqparent, this);
scanner = new TVDeviceScannerSource (this);
- connect (m_configpage->scan, SIGNAL(clicked()), this, SLOT(slotScan()));
+ connect (m_configpage->scan, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotScan()));
}
return m_configpage;
}
-static bool hasTVDevice (KMPlayer::NodePtr doc, const QString & devstr) {
+static bool hasTVDevice (KMPlayer::NodePtr doc, const TQString & devstr) {
for (KMPlayer::NodePtr e = doc->firstChild (); e; e = e->nextSibling ())
if (e->id == id_node_tv_device &&
KMPlayer::convertNode <TVDevice> (e)->src == devstr)
@@ -589,19 +589,19 @@ static bool hasTVDevice (KMPlayer::NodePtr doc, const QString & devstr) {
}
KDE_NO_EXPORT void KMPlayerTVSource::slotScan () {
- QString devstr = m_configpage->device->lineEdit()->text ();
+ TQString devstr = m_configpage->device->lineEdit()->text ();
if (!hasTVDevice(m_document, devstr)) {
scanner->scan (devstr, m_configpage->driver->text());
- connect (scanner, SIGNAL (scanFinished (TVDevice *)),
- this, SLOT (slotScanFinished (TVDevice *)));
+ connect (scanner, TQT_SIGNAL (scanFinished (TVDevice *)),
+ this, TQT_SLOT (slotScanFinished (TVDevice *)));
} else
KMessageBox::error (m_configpage, i18n ("Device already present."),
i18n ("Error"));
}
KDE_NO_EXPORT void KMPlayerTVSource::slotScanFinished (TVDevice * tvdevice) {
- disconnect (scanner, SIGNAL (scanFinished (TVDevice *)),
- this, SLOT (slotScanFinished (TVDevice *)));
+ disconnect (scanner, TQT_SIGNAL (scanFinished (TVDevice *)),
+ this, TQT_SLOT (slotScanFinished (TVDevice *)));
if (tvdevice) {
tvdevice->zombie = false;
addTVDevicePage (tvdevice, true);
@@ -614,8 +614,8 @@ KDE_NO_EXPORT void KMPlayerTVSource::addTVDevicePage(TVDevice *dev, bool show) {
dev->device_page->deleteLater ();
dev->device_page = new TVDevicePage (m_configpage->notebook, dev);
m_configpage->notebook->insertTab (dev->device_page, dev->pretty_name);
- connect (dev->device_page, SIGNAL (deleted (TVDevicePage *)),
- this, SLOT (slotDeviceDeleted (TVDevicePage *)));
+ connect (dev->device_page, TQT_SIGNAL (deleted (TVDevicePage *)),
+ this, TQT_SLOT (slotDeviceDeleted (TVDevicePage *)));
if (show)
m_configpage->notebook->setCurrentPage (m_configpage->notebook->count ()-1);
}
@@ -634,7 +634,7 @@ KDE_NO_CDTOR_EXPORT TVDeviceScannerSource::TVDeviceScannerSource (KMPlayerTVSour
KDE_NO_EXPORT void TVDeviceScannerSource::init () {
}
-KDE_NO_EXPORT bool TVDeviceScannerSource::processOutput (const QString & line) {
+KDE_NO_EXPORT bool TVDeviceScannerSource::processOutput (const TQString & line) {
if (m_nameRegExp.search (line) > -1) {
m_tvdevice->pretty_name = m_nameRegExp.cap (1);
m_tvdevice->setAttribute(KMPlayer::StringPool::attr_name,m_tvdevice->pretty_name);
@@ -661,8 +661,8 @@ KDE_NO_EXPORT bool TVDeviceScannerSource::processOutput (const QString & line) {
return true;
}
-KDE_NO_EXPORT QString TVDeviceScannerSource::filterOptions () {
- return QString ("");
+KDE_NO_EXPORT TQString TVDeviceScannerSource::filterOptions () {
+ return TQString ("");
}
KDE_NO_EXPORT bool TVDeviceScannerSource::hasLength () {
@@ -673,7 +673,7 @@ KDE_NO_EXPORT bool TVDeviceScannerSource::isSeekable () {
return false;
}
-KDE_NO_EXPORT bool TVDeviceScannerSource::scan (const QString & dev, const QString & dri) {
+KDE_NO_EXPORT bool TVDeviceScannerSource::scan (const TQString & dev, const TQString & dri) {
if (m_tvdevice)
return false;
setURL (KURL ("tv://"));
@@ -698,8 +698,8 @@ KDE_NO_EXPORT void TVDeviceScannerSource::activate () {
KDE_NO_EXPORT void TVDeviceScannerSource::deactivate () {
kdDebug () << "TVDeviceScannerSource::deactivate" << endl;
if (m_tvdevice) {
- if (m_tvdevice->parentNode ())
- m_tvdevice->parentNode ()->removeChild (m_tvdevice);
+ if (m_tvdevice->tqparentNode ())
+ m_tvdevice->tqparentNode ()->removeChild (m_tvdevice);
m_tvdevice = 0L;
emit scanFinished (m_tvdevice);
}
@@ -708,7 +708,7 @@ KDE_NO_EXPORT void TVDeviceScannerSource::deactivate () {
KDE_NO_EXPORT void TVDeviceScannerSource::play () {
if (!m_tvdevice)
return;
- QString args;
+ TQString args;
args.sprintf ("tv:// -tv driver=%s:device=%s -identify -frames 0", m_driver.ascii (), m_tvdevice->src.ascii ());
m_tvsource->player ()->stop ();
m_tvsource->player ()->process ()->initProcess (m_player->settings ()->defaultView ()->viewer ());