diff options
Diffstat (limited to 'src/kmplayerapp.cpp')
-rw-r--r-- | src/kmplayerapp.cpp | 793 |
1 files changed, 397 insertions, 396 deletions
diff --git a/src/kmplayerapp.cpp b/src/kmplayerapp.cpp index 91e01a8..66d942f 100644 --- a/src/kmplayerapp.cpp +++ b/src/kmplayerapp.cpp @@ -18,22 +18,22 @@ #undef Always // include files for QT -#include <qdatastream.h> -#include <qregexp.h> -#include <qiodevice.h> -#include <qprinter.h> -#include <qcursor.h> -#include <qpainter.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qkeysequence.h> -#include <qapplication.h> -#include <qslider.h> -#include <qlayout.h> -#include <qwhatsthis.h> -#include <qtimer.h> -#include <qfile.h> -#include <qmetaobject.h> +#include <tqdatastream.h> +#include <tqregexp.h> +#include <tqiodevice.h> +#include <tqprinter.h> +#include <tqcursor.h> +#include <tqpainter.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqkeysequence.h> +#include <tqapplication.h> +#include <tqslider.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> +#include <tqtimer.h> +#include <tqfile.h> +#include <tqmetaobject.h> // include files for KDE #include <kdeversion.h> @@ -92,7 +92,7 @@ public: void jump (KMPlayer::NodePtr e); void activate (); void setDocument (KMPlayer::NodePtr doc, KMPlayer::NodePtr cur); - QString prettyName () { return m_document->mrl ()->pretty_name; } + TQString prettyName () { return m_document->mrl ()->pretty_name; } }; class KMPLAYER_NO_EXPORT Recents : public FileDocument { @@ -101,14 +101,14 @@ public: void defer (); void activate (); void childDone (KMPlayer::NodePtr); - KMPlayer::NodePtr childFromTag (const QString & tag); + KMPlayer::NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "playlist"; } KMPlayerApp * app; }; class KMPLAYER_NO_EXPORT Recent : public KMPlayer::Mrl { public: - Recent (KMPlayer::NodePtr & doc, KMPlayerApp *a, const QString &url = QString()); + Recent (KMPlayer::NodePtr & doc, KMPlayerApp *a, const TQString &url = TQString()); void activate (); void closed (); KDE_NO_EXPORT const char * nodeName () const { return "item"; } @@ -117,8 +117,8 @@ public: class KMPLAYER_NO_EXPORT Group : public KMPlayer::Mrl { public: - Group (KMPlayer::NodePtr &doc, KMPlayerApp *a, const QString &pn=QString()); - KMPlayer::NodePtr childFromTag (const QString & tag); + Group (KMPlayer::NodePtr &doc, KMPlayerApp *a, const TQString &pn=TQString()); + KMPlayer::NodePtr childFromTag (const TQString & tag); void defer () {} // TODO lazy loading of largish sub trees void closed (); KDE_NO_EXPORT const char * nodeName () const { return "group"; } @@ -131,7 +131,7 @@ public: void childDone (KMPlayer::NodePtr); void defer (); void activate (); - KMPlayer::NodePtr childFromTag (const QString & tag); + KMPlayer::NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "playlist"; } KMPlayerApp * app; bool playmode; @@ -148,21 +148,21 @@ public: class KMPLAYER_NO_EXPORT PlaylistItem : public PlaylistItemBase { public: - PlaylistItem (KMPlayer::NodePtr & doc, KMPlayerApp *a, bool playmode, const QString &url = QString()); + PlaylistItem (KMPlayer::NodePtr & doc, KMPlayerApp *a, bool playmode, const TQString &url = TQString()); void closed (); void begin (); PlayType playType () { return play_type_unknown; } - void setNodeName (const QString &); + void setNodeName (const TQString &); const char * nodeName () const KDE_NO_EXPORT { return "item"; } }; class KMPLAYER_NO_EXPORT PlaylistGroup : public KMPlayer::Mrl { public: - PlaylistGroup (KMPlayer::NodePtr &doc, KMPlayerApp *a, const QString &pn); + PlaylistGroup (KMPlayer::NodePtr &doc, KMPlayerApp *a, const TQString &pn); PlaylistGroup (KMPlayer::NodePtr &doc, KMPlayerApp *a, bool plmode=false); - KMPlayer::NodePtr childFromTag (const QString & tag); + KMPlayer::NodePtr childFromTag (const TQString & tag); void closed (); - void setNodeName (const QString &); + void setNodeName (const TQString &); KDE_NO_EXPORT const char * nodeName () const { return "group"; } KMPlayerApp * app; bool playmode; @@ -173,7 +173,7 @@ public: HtmlObject (KMPlayer::NodePtr & doc, KMPlayerApp *a, bool playmode); void activate (); void closed (); - KMPlayer::NodePtr childFromTag (const QString & tag); + KMPlayer::NodePtr childFromTag (const TQString & tag); const char * nodeName () const KDE_NO_EXPORT { return "object"; } }; @@ -196,33 +196,33 @@ KDE_NO_EXPORT void ListsSource::setDocument (KMPlayer::NodePtr doc, KMPlayer::No //kdDebug () << "setDocument: " << m_document->outerXML () << endl; } -KDE_NO_CDTOR_EXPORT FileDocument::FileDocument (short i, const QString &s, KMPlayer::PlayListNotify * n) +KDE_NO_CDTOR_EXPORT FileDocument::FileDocument (short i, const TQString &s, KMPlayer::PlayListNotify * n) : KMPlayer::Document (s, n) { id = i; } -KDE_NO_EXPORT KMPlayer::NodePtr FileDocument::childFromTag(const QString &tag) { - if (tag == QString::fromLatin1 (nodeName ())) +KDE_NO_EXPORT KMPlayer::NodePtr FileDocument::childFromTag(const TQString &tag) { + if (tag == TQString::tqfromLatin1 (nodeName ())) return this; return 0L; } -void FileDocument::readFromFile (const QString & fn) { - QFile file (fn); +void FileDocument::readFromFile (const TQString & fn) { + TQFile file (fn); kdDebug () << "readFromFile " << fn << endl; if (file.exists ()) { file.open (IO_ReadOnly); - QTextStream inxml (&file); - KMPlayer::readXML (this, inxml, QString (), false); + TQTextStream inxml (&file); + KMPlayer::readXML (this, inxml, TQString (), false); normalize (); } } -void FileDocument::writeToFile (const QString & fn) { - QFile file (fn); +void FileDocument::writeToFile (const TQString & fn) { + TQFile file (fn); kdDebug () << "writeToFile " << fn << endl; file.open (IO_WriteOnly); - QCString utf = outerXML ().utf8 (); + TQCString utf = outerXML ().utf8 (); file.writeBlock (utf, utf.length ()); } @@ -244,11 +244,11 @@ KDE_NO_EXPORT void Recents::defer () { } } -KDE_NO_EXPORT KMPlayer::NodePtr Recents::childFromTag (const QString & tag) { +KDE_NO_EXPORT KMPlayer::NodePtr Recents::childFromTag (const TQString & tag) { // kdDebug () << nodeName () << " childFromTag " << tag << endl; - if (tag == QString::fromLatin1 ("item")) + if (tag == TQString::tqfromLatin1 ("item")) return new Recent (m_doc, app); - else if (tag == QString::fromLatin1 ("group")) + else if (tag == TQString::tqfromLatin1 ("group")) return new Group (m_doc, app); return FileDocument::childFromTag (tag); } @@ -258,7 +258,7 @@ KDE_NO_EXPORT void Recents::childDone (KMPlayer::NodePtr) { } KDE_NO_CDTOR_EXPORT -Recent::Recent (KMPlayer::NodePtr & doc, KMPlayerApp * a, const QString &url) +Recent::Recent (KMPlayer::NodePtr & doc, KMPlayerApp * a, const TQString &url) : KMPlayer::Mrl (doc, id_node_recent_node), app (a) { src = url; setAttribute (KMPlayer::StringPool::attr_url, url); @@ -274,17 +274,17 @@ KDE_NO_EXPORT void Recent::activate () { } KDE_NO_CDTOR_EXPORT -Group::Group (KMPlayer::NodePtr & doc, KMPlayerApp * a, const QString & pn) +Group::Group (KMPlayer::NodePtr & doc, KMPlayerApp * a, const TQString & pn) : KMPlayer::Mrl (doc, KMPlayer::id_node_group_node), app (a) { pretty_name = pn; if (!pn.isEmpty ()) setAttribute (KMPlayer::StringPool::attr_title, pn); } -KDE_NO_EXPORT KMPlayer::NodePtr Group::childFromTag (const QString & tag) { - if (tag == QString::fromLatin1 ("item")) +KDE_NO_EXPORT KMPlayer::NodePtr Group::childFromTag (const TQString & tag) { + if (tag == TQString::tqfromLatin1 ("item")) return new Recent (m_doc, app); - else if (tag == QString::fromLatin1 ("group")) + else if (tag == TQString::tqfromLatin1 ("group")) return new Group (m_doc, app); return 0L; } @@ -317,7 +317,7 @@ KDE_NO_CDTOR_EXPORT Playlist::Playlist (KMPlayerApp *a, KMPlayer::PlayListNotify pretty_name = i18n ("Persistent Playlists"); } -KDE_NO_EXPORT KMPlayer::NodePtr Playlist::childFromTag (const QString & tag) { +KDE_NO_EXPORT KMPlayer::NodePtr Playlist::childFromTag (const TQString & tag) { // kdDebug () << nodeName () << " childFromTag " << tag << endl; const char * name = tag.ascii (); if (!strcmp (name, "item")) @@ -347,24 +347,24 @@ KDE_NO_EXPORT void PlaylistItemBase::activate () { } else { ListsSource * source = static_cast <ListsSource *> (app->player ()->sources () ["listssource"]); KMPlayer::NodePtr pl = new Playlist (app, source, true); - QString data; - QString pn; - if (parentNode ()->id == KMPlayer::id_node_group_node) { - data = parentNode ()->innerXML (); - pn = parentNode ()->mrl ()->pretty_name; + TQString data; + TQString pn; + if (tqparentNode ()->id == KMPlayer::id_node_group_node) { + data = tqparentNode ()->innerXML (); + pn = tqparentNode ()->mrl ()->pretty_name; } else { data = outerXML (); pn = pretty_name.isEmpty () ? src : pretty_name; } pl->mrl ()->pretty_name = pn; //kdDebug () << "cloning to " << data << endl; - QTextStream inxml (data, IO_ReadOnly); - KMPlayer::readXML (pl, inxml, QString (), false); + TQTextStream inxml (data, IO_ReadOnly); + KMPlayer::readXML (pl, inxml, TQString (), false); pl->normalize (); KMPlayer::NodePtr cur = pl->firstChild (); pl->mrl ()->resolved = !!cur; - if (parentNode ()->id == KMPlayer::id_node_group_node && cur) { - KMPlayer::NodePtr sister = parentNode ()->firstChild (); + if (tqparentNode ()->id == KMPlayer::id_node_group_node && cur) { + KMPlayer::NodePtr sister = tqparentNode ()->firstChild (); while (sister && cur && sister.ptr () != this) { sister = sister->nextSibling (); cur = cur->nextSibling (); @@ -388,7 +388,7 @@ void PlaylistItemBase::closed () { } KDE_NO_CDTOR_EXPORT -PlaylistItem::PlaylistItem (KMPlayer::NodePtr & doc, KMPlayerApp *a, bool pm, const QString &url) +PlaylistItem::PlaylistItem (KMPlayer::NodePtr & doc, KMPlayerApp *a, bool pm, const TQString &url) : PlaylistItemBase (doc, KMPlayer::id_node_playlist_item, a, pm) { src = url; setAttribute (KMPlayer::StringPool::attr_url, url); @@ -407,13 +407,13 @@ KDE_NO_EXPORT void PlaylistItem::begin () { Mrl::begin (); } -KDE_NO_EXPORT void PlaylistItem::setNodeName (const QString & s) { +KDE_NO_EXPORT void PlaylistItem::setNodeName (const TQString & s) { src = s; setAttribute (KMPlayer::StringPool::attr_url, s); } KDE_NO_CDTOR_EXPORT -PlaylistGroup::PlaylistGroup (KMPlayer::NodePtr & doc, KMPlayerApp * a, const QString & pn) +PlaylistGroup::PlaylistGroup (KMPlayer::NodePtr & doc, KMPlayerApp * a, const TQString & pn) : KMPlayer::Mrl (doc, KMPlayer::id_node_group_node), app (a), playmode (false) { pretty_name = pn; if (!pn.isEmpty ()) @@ -425,7 +425,7 @@ PlaylistGroup::PlaylistGroup (KMPlayer::NodePtr & doc, KMPlayerApp * a, bool lm) : KMPlayer::Mrl (doc, KMPlayer::id_node_group_node), app (a), playmode (lm) { } -KDE_NO_EXPORT KMPlayer::NodePtr PlaylistGroup::childFromTag (const QString & tag) { +KDE_NO_EXPORT KMPlayer::NodePtr PlaylistGroup::childFromTag (const TQString & tag) { const char * name = tag.ascii (); if (!strcmp (name, "item")) return new PlaylistItem (m_doc, app, playmode); @@ -441,7 +441,7 @@ KDE_NO_EXPORT void PlaylistGroup::closed () { pretty_name = getAttribute (KMPlayer::StringPool::attr_title); } -KDE_NO_EXPORT void PlaylistGroup::setNodeName (const QString & t) { +KDE_NO_EXPORT void PlaylistGroup::setNodeName (const TQString & t) { pretty_name = t; setAttribute (KMPlayer::StringPool::attr_title, t); } @@ -461,17 +461,17 @@ KDE_NO_EXPORT void HtmlObject::closed () { for (Node *n = firstChild ().ptr (); n; n = n->nextSibling ().ptr ()) { if (n->id == KMPlayer::id_node_param) { KMPlayer::Element *e = static_cast <KMPlayer::Element *> (n); - QString name = e->getAttribute (KMPlayer::StringPool::attr_name); + TQString name = e->getAttribute (KMPlayer::StringPool::attr_name); if (name == "type") mimetype = e->getAttribute (KMPlayer::StringPool::attr_value); else if (name == "movie") src = e->getAttribute (KMPlayer::StringPool::attr_value); } else if (n->id == KMPlayer::id_node_html_embed) { KMPlayer::Element *e = static_cast <KMPlayer::Element *> (n); - QString type = e->getAttribute (KMPlayer::StringPool::attr_type); + TQString type = e->getAttribute (KMPlayer::StringPool::attr_type); if (!type.isEmpty ()) mimetype = type; - QString asrc = e->getAttribute (KMPlayer::StringPool::attr_src); + TQString asrc = e->getAttribute (KMPlayer::StringPool::attr_src); if (!asrc.isEmpty ()) src = asrc; } @@ -479,7 +479,7 @@ KDE_NO_EXPORT void HtmlObject::closed () { PlaylistItemBase::closed (); } -KDE_NO_EXPORT KMPlayer::NodePtr HtmlObject::childFromTag (const QString & tag) { +KDE_NO_EXPORT KMPlayer::NodePtr HtmlObject::childFromTag (const TQString & tag) { const char *name = tag.ascii (); if (!strcasecmp (name, "param")) return new KMPlayer::DarkNode (m_doc, name, KMPlayer::id_node_param); @@ -488,17 +488,17 @@ KDE_NO_EXPORT KMPlayer::NodePtr HtmlObject::childFromTag (const QString & tag) { return NULL; } -KDE_NO_CDTOR_EXPORT KMPlayerApp::KMPlayerApp(QWidget* , const char* name) +KDE_NO_CDTOR_EXPORT KMPlayerApp::KMPlayerApp(TQWidget* , const char* name) : KMainWindow(0, name), config (kapp->config ()), m_systray (0L), m_player (new KMPlayer::PartBase (this, 0L, 0L, 0L, config)), m_view (static_cast <KMPlayer::View*> (m_player->view())), - m_dvdmenu (new QPopupMenu (this)), - m_dvdnavmenu (new QPopupMenu (this)), - m_vcdmenu (new QPopupMenu (this)), - m_audiocdmenu (new QPopupMenu (this)), - m_tvmenu (new QPopupMenu (this)), + m_dvdmenu (new TQPopupMenu (this)), + m_dvdnavmenu (new TQPopupMenu (this)), + m_vcdmenu (new TQPopupMenu (this)), + m_audiocdmenu (new TQPopupMenu (this)), + m_tvmenu (new TQPopupMenu (this)), m_ffserverconfig (new KMPlayerFFServerConfig), m_broadcastconfig (new KMPlayerBroadcastConfig (m_player, m_ffserverconfig)), edit_tree_id (-1), @@ -508,11 +508,11 @@ KDE_NO_CDTOR_EXPORT KMPlayerApp::KMPlayerApp(QWidget* , const char* name) m_minimal_mode (false) { setCentralWidget (m_view); - connect (m_broadcastconfig, SIGNAL (broadcastStarted()), this, SLOT (broadcastStarted())); - connect (m_broadcastconfig, SIGNAL (broadcastStopped()), this, SLOT (broadcastStopped())); + connect (m_broadcastconfig, TQT_SIGNAL (broadcastStarted()), TQT_TQOBJECT(this), TQT_SLOT (broadcastStarted())); + connect (m_broadcastconfig, TQT_SIGNAL (broadcastStopped()), TQT_TQOBJECT(this), TQT_SLOT (broadcastStopped())); initStatusBar(); #ifdef HAVE_DBUS - m_player->setServiceName (QString ("org.kde.kmplayer-%1").arg (getpid ())); + m_player->setServiceName (TQString ("org.kde.kmplayer-%1").arg (getpid ())); #endif m_player->init (actionCollection ()); m_player->players () ["xvideo"] = new XVideo(m_player,m_player->settings()); @@ -548,47 +548,47 @@ KDE_NO_CDTOR_EXPORT KMPlayerApp::~KMPlayerApp () { KDE_NO_EXPORT void KMPlayerApp::initActions () { KActionCollection * ac = actionCollection (); - fileNewWindow = new KAction(i18n("New &Window"), 0, 0, this, SLOT(slotFileNewWindow()), ac, "new_window"); - fileOpen = KStdAction::open(this, SLOT(slotFileOpen()), ac, "open"); - fileOpenRecent = KStdAction::openRecent(this, SLOT(slotFileOpenRecent(const KURL&)), ac, "open_recent"); - KStdAction::saveAs (this, SLOT (slotSaveAs ()), ac, "save_as"); - new KAction (i18n ("Clear &History"), 0, 0, this, SLOT (slotClearHistory ()), ac, "clear_history"); - fileClose = KStdAction::close (this, SLOT (slotFileClose ()), ac); - fileQuit = KStdAction::quit (this, SLOT (slotFileQuit ()), ac); - new KAction (i18n ("&Open DVD"), QString ("dvd_mount"), KShortcut (), this, SLOT(openDVD ()), ac, "opendvd"); - new KAction (i18n ("&Open VCD"), QString ("cdrom_mount"), KShortcut (), this, SLOT(openVCD ()), ac, "openvcd"); - new KAction (i18n ("&Open Audio CD"), QString ("cdrom_mount"), KShortcut (), this, SLOT(openAudioCD ()), ac, "openaudiocd"); - new KAction (i18n ("&Open Pipe..."), QString ("pipe"), KShortcut (), this, SLOT(openPipe ()), ac, "source_pipe"); - //KGlobal::iconLoader ()->loadIconSet (QString ("tv"), KIcon::Small, 0,true) - new KAction (i18n ("&Connect"), QString ("connect_established"), KShortcut (), this, SLOT (openVDR ()), ac, "vdr_connect"); - editVolumeInc = new KAction (i18n ("Increase Volume"), QString ("player_volume"), KShortcut (), m_player, SLOT (increaseVolume ()), ac, "edit_volume_up"); - editVolumeDec = new KAction (i18n ("Decrease Volume"), QString ("player_volume"), KShortcut (), m_player, SLOT(decreaseVolume ()), ac, "edit_volume_down"); - toggleView = new KAction (i18n ("C&onsole"), QString ("konsole"), KShortcut (), m_player->view(), SLOT (toggleVideoConsoleWindow ()), ac, "view_video"); - //new KAction (i18n ("V&ideo"), QString ("video"), KShortcut (), m_view, SLOT (toggleVideoConsoleWindow ()), ac, "view_video"); - new KAction (i18n ("Pla&y List"), QString ("player_playlist"), KShortcut (), m_player, SLOT (showPlayListWindow ()), ac, "view_playlist"); - new KAction (i18n ("Minimal mode"), QString ("empty"), KShortcut (), this, SLOT (slotMinimalMode ()), ac, "view_minimal"); - new KAction (i18n ("50%"), 0, 0, this, SLOT (zoom50 ()), ac, "view_zoom_50"); - new KAction (i18n ("100%"), QString ("viewmagfit"), KShortcut (), this, SLOT (zoom100 ()), ac, "view_zoom_100"); - new KAction (i18n ("150%"), 0, 0, this, SLOT (zoom150 ()), ac, "view_zoom_150"); - viewEditMode = new KToggleAction (i18n ("&Edit mode"), 0, 0, this, SLOT (editMode ()), ac, "edit_mode"); - viewSyncEditMode = new KAction (i18n ("Sync &with playlist"), QString ("reload"), KShortcut (), this, SLOT (syncEditMode ()), ac, "sync_edit_mode"); + fileNewWindow = new KAction(i18n("New &Window"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewWindow()), ac, "new_window"); + fileOpen = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), ac, "open"); + fileOpenRecent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpenRecent(const KURL&)), ac, "open_recent"); + KStdAction::saveAs (TQT_TQOBJECT(this), TQT_SLOT (slotSaveAs ()), ac, "save_as"); + new KAction (i18n ("Clear &History"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT (slotClearHistory ()), ac, "clear_history"); + fileClose = KStdAction::close (TQT_TQOBJECT(this), TQT_SLOT (slotFileClose ()), ac); + fileQuit = KStdAction::quit (TQT_TQOBJECT(this), TQT_SLOT (slotFileQuit ()), ac); + new KAction (i18n ("&Open DVD"), TQString ("dvd_mount"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT(openDVD ()), ac, "opendvd"); + new KAction (i18n ("&Open VCD"), TQString ("cdrom_mount"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT(openVCD ()), ac, "openvcd"); + new KAction (i18n ("&Open Audio CD"), TQString ("cdrom_mount"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT(openAudioCD ()), ac, "openaudiocd"); + new KAction (i18n ("&Open Pipe..."), TQString ("pipe"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT(openPipe ()), ac, "source_pipe"); + //KGlobal::iconLoader ()->loadIconSet (TQString ("tv"), KIcon::Small, 0,true) + new KAction (i18n ("&Connect"), TQString ("connect_established"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT (openVDR ()), ac, "vdr_connect"); + editVolumeInc = new KAction (i18n ("Increase Volume"), TQString ("player_volume"), KShortcut (), m_player, TQT_SLOT (increaseVolume ()), ac, "edit_volume_up"); + editVolumeDec = new KAction (i18n ("Decrease Volume"), TQString ("player_volume"), KShortcut (), m_player, TQT_SLOT(decreaseVolume ()), ac, "edit_volume_down"); + toggleView = new KAction (i18n ("C&onsole"), TQString ("konsole"), KShortcut (), TQT_TQOBJECT(m_player->view()), TQT_SLOT (toggleVideoConsoleWindow ()), ac, "view_video"); + //new KAction (i18n ("V&ideo"), TQString ("video"), KShortcut (), m_view, TQT_SLOT (toggleVideoConsoleWindow ()), ac, "view_video"); + new KAction (i18n ("Pla&y List"), TQString ("player_playlist"), KShortcut (), m_player, TQT_SLOT (showPlayListWindow ()), ac, "view_playlist"); + new KAction (i18n ("Minimal mode"), TQString ("empty"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT (slotMinimalMode ()), ac, "view_minimal"); + new KAction (i18n ("50%"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT (zoom50 ()), ac, "view_zoom_50"); + new KAction (i18n ("100%"), TQString ("viewmagfit"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT (zoom100 ()), ac, "view_zoom_100"); + new KAction (i18n ("150%"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT (zoom150 ()), ac, "view_zoom_150"); + viewEditMode = new KToggleAction (i18n ("&Edit mode"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT (editMode ()), ac, "edit_mode"); + viewSyncEditMode = new KAction (i18n ("Sync &with playlist"), TQString ("reload"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT (syncEditMode ()), ac, "sync_edit_mode"); viewSyncEditMode->setEnabled (false); - new KAction (i18n ("Show Popup Menu"), KShortcut (), m_view->controlPanel (), SLOT (showPopupMenu ()), ac, "view_show_popup_menu"); - new KAction (i18n ("Show Language Menu"), KShortcut (Qt::Key_L), m_view->controlPanel (), SLOT (showLanguageMenu ()), ac, "view_show_lang_menu"); - viewKeepRatio = new KToggleAction (i18n ("&Keep Width/Height Ratio"), 0, this, SLOT (keepSizeRatio ()), ac, "view_keep_ratio"); + new KAction (i18n ("Show Popup Menu"), KShortcut (), TQT_TQOBJECT(m_view->controlPanel ()), TQT_SLOT (showPopupMenu ()), ac, "view_show_popup_menu"); + new KAction (i18n ("Show Language Menu"), KShortcut (TQt::Key_L), TQT_TQOBJECT(m_view->controlPanel ()), TQT_SLOT (showLanguageMenu ()), ac, "view_show_lang_menu"); + viewKeepRatio = new KToggleAction (i18n ("&Keep Width/Height Ratio"), 0, TQT_TQOBJECT(this), TQT_SLOT (keepSizeRatio ()), ac, "view_keep_ratio"); #if KDE_IS_VERSION(3,1,90) - viewFullscreen = KStdAction::fullScreen (this, SLOT(fullScreen ()), ac, 0, "view_fullscreen"); + viewFullscreen = KStdAction::fullScreen (TQT_TQOBJECT(this), TQT_SLOT(fullScreen ()), ac, 0, "view_fullscreen"); #else - viewFullscreen = new KAction (i18n("&Full Screen"), 0, 0, this, SLOT(fullScreen ()), ac, "view_fullscreen"); + viewFullscreen = new KAction (i18n("&Full Screen"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(fullScreen ()), ac, "view_fullscreen"); #endif - /*KAction *playact =*/ new KAction (i18n ("P&lay"), QString ("player_play"), KShortcut (), m_player, SLOT (play ()), ac, "play"); - /*KAction *pauseact =*/ new KAction (i18n ("&Pause"), QString ("player_pause"), KShortcut (), m_player, SLOT (pause ()), ac, "pause"); - /*KAction *stopact =*/ new KAction (i18n ("&Stop"), QString ("player_stop"), KShortcut (), m_player, SLOT (stop ()), ac, "stop"); - /*KAction *artsctrl =*/ new KAction (i18n ("&Arts Control"), QString ("player_volume"), KShortcut (), this, SLOT (startArtsControl ()), ac, "view_arts_control"); - viewToolBar = KStdAction::showToolbar(this, SLOT(slotViewToolBar()), ac, "showtoolbar"); - viewStatusBar =KStdAction::showStatusbar(this,SLOT(slotViewStatusBar()),ac, "showstatusbar"); - viewMenuBar = KStdAction::showMenubar(this, SLOT(slotViewMenuBar()), ac, "showmenu"); - KStdAction::preferences(m_player, SLOT(showConfigDialog()), ac,"configure"); + /*KAction *playact =*/ new KAction (i18n ("P&lay"), TQString ("player_play"), KShortcut (), m_player, TQT_SLOT (play ()), ac, "play"); + /*KAction *pauseact =*/ new KAction (i18n ("&Pause"), TQString ("player_pause"), KShortcut (), m_player, TQT_SLOT (pause ()), ac, "pause"); + /*KAction *stopact =*/ new KAction (i18n ("&Stop"), TQString ("player_stop"), KShortcut (), m_player, TQT_SLOT (stop ()), ac, "stop"); + /*KAction *artsctrl =*/ new KAction (i18n ("&Arts Control"), TQString ("player_volume"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT (startArtsControl ()), ac, "view_arts_control"); + viewToolBar = KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(slotViewToolBar()), ac, "showtoolbar"); + viewStatusBar =KStdAction::showStatusbar(TQT_TQOBJECT(this),TQT_SLOT(slotViewStatusBar()),ac, "showstatusbar"); + viewMenuBar = KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(slotViewMenuBar()), ac, "showmenu"); + KStdAction::preferences(m_player, TQT_SLOT(showConfigDialog()), ac,"configure"); fileNewWindow->setStatusText(i18n("Opens a new application window")); fileOpen->setStatusText(i18n("Opens an existing file")); fileOpenRecent->setStatusText(i18n("Opens a recently used file")); @@ -597,87 +597,87 @@ KDE_NO_EXPORT void KMPlayerApp::initActions () { //viewToolBar->setStatusText(i18n("Enables/disables the toolbar")); viewStatusBar->setStatusText(i18n("Enables/disables the statusbar")); viewMenuBar->setStatusText(i18n("Enables/disables the menubar")); - KStdAction::keyBindings( this, SLOT(slotConfigureKeys()), ac, "configkeys"); - KStdAction::configureToolbars (this, SLOT (slotConfigureToolbars ()), ac, "configtoolbars"); + KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT(slotConfigureKeys()), ac, "configkeys"); + KStdAction::configureToolbars (TQT_TQOBJECT(this), TQT_SLOT (slotConfigureToolbars ()), ac, "configtoolbars"); } KDE_NO_EXPORT void KMPlayerApp::initStatusBar () { KStatusBar *sb = statusBar (); sb->insertItem (i18n ("Ready."), id_status_msg); - sb->insertItem (QString ("--:--"), id_status_timer, 0, true); + sb->insertItem (TQString ("--:--"), id_status_timer, 0, true); } KDE_NO_EXPORT void KMPlayerApp::initMenu () { createGUI (); // first build the one from the kmplayerui.rc - QPopupMenu * bookmarkmenu = m_view->controlPanel()->bookmarkMenu (); + TQPopupMenu * bookmarkmenu = m_view->controlPanel()->bookmarkMenu (); m_view->controlPanel()->popupMenu ()->removeItem (KMPlayer::ControlPanel::menu_bookmark); menuBar ()->insertItem (i18n ("&Bookmarks"), bookmarkmenu, -1, 2); - m_sourcemenu = menuBar ()->findItem (menuBar ()->idAt (0)); + m_sourcemenu = menuBar ()->tqfindItem (menuBar ()->idAt (0)); m_sourcemenu->setText (i18n ("S&ource")); - m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("dvd_mount"), KIcon::Small, 0, true), i18n ("&DVD"), m_dvdmenu, -1, 5); + m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("dvd_mount"), KIcon::Small, 0, true), i18n ("&DVD"), m_dvdmenu, -1, 5); m_dvdmenu->clear (); #ifdef HAVE_XINE m_dvdnavmenu->clear (); - m_dvdnavmenu->insertItem (i18n ("&Start"), this, SLOT (dvdNav ())); + m_dvdnavmenu->insertItem (i18n ("&Start"), TQT_TQOBJECT(this), TQT_SLOT (dvdNav ())); m_dvdmenu->insertItem (i18n ("&DVD Navigator"), m_dvdnavmenu, -1, 1); - m_dvdmenu->insertItem (i18n ("&Open DVD"), this, SLOT(openDVD ()), 0,-1, 2); + m_dvdmenu->insertItem (i18n ("&Open DVD"), TQT_TQOBJECT(this), TQT_SLOT(openDVD ()), 0,-1, 2); #else - m_dvdmenu->insertItem (i18n ("&Open DVD"), this, SLOT(openDVD ()), 0,-1, 1); + m_dvdmenu->insertItem (i18n ("&Open DVD"), TQT_TQOBJECT(this), TQT_SLOT(openDVD ()), 0,-1, 1); #endif - m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("cdrom_mount"), KIcon::Small, 0, true), i18n ("V&CD"), m_vcdmenu, -1, 6); + m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("cdrom_mount"), KIcon::Small, 0, true), i18n ("V&CD"), m_vcdmenu, -1, 6); m_vcdmenu->clear (); - m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("tv"), KIcon::Small, 0, true), i18n ("&TV"), m_tvmenu, -1, 8); - m_vcdmenu->insertItem (i18n ("&Open VCD"), this, SLOT(openVCD ()), 0,-1, 1); - m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("cdrom_mount"), KIcon::Small, 0, true), i18n ("&Audio CD"), m_audiocdmenu, -1, 7); - m_audiocdmenu->insertItem (i18n ("&Open Audio CD"), this, SLOT(openAudioCD ()), 0,-1, 1); + m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("tv"), KIcon::Small, 0, true), i18n ("&TV"), m_tvmenu, -1, 8); + m_vcdmenu->insertItem (i18n ("&Open VCD"), TQT_TQOBJECT(this), TQT_SLOT(openVCD ()), 0,-1, 1); + m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("cdrom_mount"), KIcon::Small, 0, true), i18n ("&Audio CD"), m_audiocdmenu, -1, 7); + m_audiocdmenu->insertItem (i18n ("&Open Audio CD"), TQT_TQOBJECT(this), TQT_SLOT(openAudioCD ()), 0,-1, 1); } KDE_NO_EXPORT void KMPlayerApp::initView () { - //m_view->docArea ()->readDockConfig (config, QString ("Window Layout")); + //m_view->docArea ()->readDockConfig (config, TQString ("Window Layout")); m_player->connectPanel (m_view->controlPanel ()); initMenu (); - new KAction (i18n ("Increase Volume"), editVolumeInc->shortcut (), m_player, SLOT (increaseVolume ()), m_view->viewArea ()->actionCollection (), "edit_volume_up"); - new KAction (i18n ("Decrease Volume"), editVolumeDec->shortcut (), m_player, SLOT(decreaseVolume ()), m_view->viewArea ()->actionCollection (), "edit_volume_down"); - connect (m_player->settings (), SIGNAL (configChanged ()), - this, SLOT (configChanged ())); - connect (m_player, SIGNAL (loading (int)), - this, SLOT (loadingProgress (int))); - connect (m_player, SIGNAL (positioned (int, int)), - this, SLOT (positioned (int, int))); - connect (m_player, SIGNAL (statusUpdated (const QString &)), - this, SLOT (slotStatusMsg (const QString &))); - connect (m_view, SIGNAL (windowVideoConsoleToggled (int)), - this, SLOT (windowVideoConsoleToggled (int))); - connect (m_player, SIGNAL (sourceChanged (KMPlayer::Source *, KMPlayer::Source *)), this, SLOT (slotSourceChanged(KMPlayer::Source *, KMPlayer::Source *))); + new KAction (i18n ("Increase Volume"), editVolumeInc->shortcut (), m_player, TQT_SLOT (increaseVolume ()), m_view->viewArea ()->actionCollection (), "edit_volume_up"); + new KAction (i18n ("Decrease Volume"), editVolumeDec->shortcut (), m_player, TQT_SLOT(decreaseVolume ()), m_view->viewArea ()->actionCollection (), "edit_volume_down"); + connect (m_player->settings (), TQT_SIGNAL (configChanged ()), + TQT_TQOBJECT(this), TQT_SLOT (configChanged ())); + connect (m_player, TQT_SIGNAL (loading (int)), + TQT_TQOBJECT(this), TQT_SLOT (loadingProgress (int))); + connect (m_player, TQT_SIGNAL (positioned (int, int)), + TQT_TQOBJECT(this), TQT_SLOT (positioned (int, int))); + connect (m_player, TQT_SIGNAL (statusUpdated (const TQString &)), + TQT_TQOBJECT(this), TQT_SLOT (slotStatusMsg (const TQString &))); + connect (m_view, TQT_SIGNAL (windowVideoConsoleToggled (int)), + TQT_TQOBJECT(this), TQT_SLOT (windowVideoConsoleToggled (int))); + connect (m_player, TQT_SIGNAL (sourceChanged (KMPlayer::Source *, KMPlayer::Source *)), TQT_TQOBJECT(this), TQT_SLOT (slotSourceChanged(KMPlayer::Source *, KMPlayer::Source *))); m_view->controlPanel ()->zoomMenu ()->connectItem (KMPlayer::ControlPanel::menu_zoom50, - this, SLOT (zoom50 ())); + TQT_TQOBJECT(this), TQT_SLOT (zoom50 ())); m_view->controlPanel ()->zoomMenu ()->connectItem (KMPlayer::ControlPanel::menu_zoom100, - this, SLOT (zoom100 ())); + TQT_TQOBJECT(this), TQT_SLOT (zoom100 ())); m_view->controlPanel ()->zoomMenu ()->connectItem (KMPlayer::ControlPanel::menu_zoom150, - this, SLOT (zoom150 ())); - connect (m_view->controlPanel()->broadcastButton (), SIGNAL (clicked ()), - this, SLOT (broadcastClicked ())); + TQT_TQOBJECT(this), TQT_SLOT (zoom150 ())); + connect (m_view->controlPanel()->broadcastButton (), TQT_SIGNAL (clicked ()), + TQT_TQOBJECT(this), TQT_SLOT (broadcastClicked ())); m_auto_resize = m_player->settings ()->autoresize; if (m_auto_resize) - connect (m_player, SIGNAL (sourceDimensionChanged ()), - this, SLOT (zoom100 ())); - connect (m_view, SIGNAL (fullScreenChanged ()), - this, SLOT (fullScreen ())); - connect (m_view->playList (), SIGNAL (selectionChanged (QListViewItem *)), - this, SLOT (playListItemSelected (QListViewItem *))); - connect (m_view->playList(), SIGNAL (dropped (QDropEvent*, QListViewItem*)), - this, SLOT (playListItemDropped (QDropEvent *, QListViewItem *))); - connect (m_view->playList(), SIGNAL (moved ()), - this, SLOT (playListItemMoved ())); - connect (m_view->playList(), SIGNAL (prepareMenu (KMPlayer::PlayListItem *, QPopupMenu *)), this, SLOT (preparePlaylistMenu (KMPlayer::PlayListItem *, QPopupMenu *))); - m_dropmenu = new QPopupMenu (m_view->playList ()); - m_dropmenu->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("player_playlist"), KIcon::Small, 0, true), i18n ("&Add to list"), this, SLOT (menuDropInList ())); - m_dropmenu->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("folder_grey"), KIcon::Small, 0, true), i18n ("Add in new &Group"), this, SLOT (menuDropInGroup ())); - m_dropmenu->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("editcopy"), KIcon::Small, 0, true), i18n ("&Copy here"), this, SLOT (menuCopyDrop ())); - m_dropmenu->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("editdelete"), KIcon::Small, 0, true), i18n ("&Delete"), this, SLOT (menuDeleteNode ())); - /*QPopupMenu * viewmenu = new QPopupMenu; - viewmenu->insertItem (i18n ("Full Screen"), this, SLOT(fullScreen ()), - QKeySequence ("CTRL + Key_F")); + connect (m_player, TQT_SIGNAL (sourceDimensionChanged ()), + TQT_TQOBJECT(this), TQT_SLOT (zoom100 ())); + connect (m_view, TQT_SIGNAL (fullScreenChanged ()), + TQT_TQOBJECT(this), TQT_SLOT (fullScreen ())); + connect (m_view->playList (), TQT_SIGNAL (selectionChanged (TQListViewItem *)), + TQT_TQOBJECT(this), TQT_SLOT (playListItemSelected (TQListViewItem *))); + connect (m_view->playList(), TQT_SIGNAL (dropped (TQDropEvent*, TQListViewItem*)), + TQT_TQOBJECT(this), TQT_SLOT (playListItemDropped (TQDropEvent *, TQListViewItem *))); + connect (m_view->playList(), TQT_SIGNAL (moved ()), + TQT_TQOBJECT(this), TQT_SLOT (playListItemMoved ())); + connect (m_view->playList(), TQT_SIGNAL (prepareMenu (KMPlayer::PlayListItem *, TQPopupMenu *)), TQT_TQOBJECT(this), TQT_SLOT (preparePlaylistMenu (KMPlayer::PlayListItem *, TQPopupMenu *))); + m_dropmenu = new TQPopupMenu (m_view->playList ()); + m_dropmenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("player_playlist"), KIcon::Small, 0, true), i18n ("&Add to list"), TQT_TQOBJECT(this), TQT_SLOT (menuDropInList ())); + m_dropmenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("folder_grey"), KIcon::Small, 0, true), i18n ("Add in new &Group"), TQT_TQOBJECT(this), TQT_SLOT (menuDropInGroup ())); + m_dropmenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("editcopy"), KIcon::Small, 0, true), i18n ("&Copy here"), TQT_TQOBJECT(this), TQT_SLOT (menuCopyDrop ())); + m_dropmenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("editdelete"), KIcon::Small, 0, true), i18n ("&Delete"), TQT_TQOBJECT(this), TQT_SLOT (menuDeleteNode ())); + /*TQPopupMenu * viewmenu = new TQPopupMenu; + viewmenu->insertItem (i18n ("Full Screen"), TQT_TQOBJECT(this), TQT_SLOT(fullScreen ()), + TQKeySequence ("CTRL + Key_F")); menuBar ()->insertItem (i18n ("&View"), viewmenu, -1, 2);*/ //toolBar("mainToolBar")->hide(); setAcceptDrops (true); @@ -685,16 +685,16 @@ KDE_NO_EXPORT void KMPlayerApp::initView () { KDE_NO_EXPORT void KMPlayerApp::loadingProgress (int perc) { if (perc < 100) - statusBar ()->changeItem (QString ("%1%").arg (perc), id_status_timer); + statusBar ()->changeItem (TQString ("%1%").arg (perc), id_status_timer); else - statusBar ()->changeItem (QString ("--:--"), id_status_timer); + statusBar ()->changeItem (TQString ("--:--"), id_status_timer); } KDE_NO_EXPORT void KMPlayerApp::positioned (int pos, int length) { int left = (length - pos) / 10; if (left != last_time_left) { last_time_left = left; - QString text ("--:--"); + TQString text ("--:--"); if (left > 0) { int h = left / 3600; int m = (left % 3600) / 60; @@ -711,10 +711,10 @@ KDE_NO_EXPORT void KMPlayerApp::positioned (int pos, int length) { KDE_NO_EXPORT void KMPlayerApp::windowVideoConsoleToggled (int wt) { if (wt == int (KMPlayer::View::WT_Video)) { toggleView->setText (i18n ("C&onsole")); - toggleView->setIcon (QString ("konsole")); + toggleView->setIcon (TQString ("konsole")); } else { toggleView->setText (i18n ("V&ideo")); - toggleView->setIcon (QString ("video")); + toggleView->setIcon (TQString ("video")); } } @@ -779,17 +779,17 @@ KDE_NO_EXPORT void KMPlayerApp::playerStarted () { KDE_NO_EXPORT void KMPlayerApp::slotSourceChanged (KMPlayer::Source *olds, KMPlayer::Source * news) { if (olds) { - disconnect (olds, SIGNAL (titleChanged (const QString &)), this, - SLOT (setCaption (const QString &))); - disconnect (olds, SIGNAL (startPlaying ()), - this, SLOT (playerStarted ())); + disconnect (olds, TQT_SIGNAL (titleChanged (const TQString &)), this, + TQT_SLOT (setCaption (const TQString &))); + disconnect (olds, TQT_SIGNAL (startPlaying ()), + TQT_TQOBJECT(this), TQT_SLOT (playerStarted ())); } if (news) { setCaption (news->prettyName (), false); - connect (news, SIGNAL (titleChanged (const QString &)), - this, SLOT (setCaption (const QString &))); - connect (news, SIGNAL (startPlaying ()), - this, SLOT (playerStarted ())); + connect (news, TQT_SIGNAL (titleChanged (const TQString &)), + TQT_TQOBJECT(this), TQT_SLOT (setCaption (const TQString &))); + connect (news, TQT_SIGNAL (startPlaying ()), + TQT_TQOBJECT(this), TQT_SLOT (playerStarted ())); viewSyncEditMode->setEnabled (m_view->editMode () || !strcmp (m_player->source ()->name (), "urlsource")); } @@ -819,7 +819,7 @@ KDE_NO_EXPORT void KMPlayerApp::openAudioCD () { KDE_NO_EXPORT void KMPlayerApp::openPipe () { slotStatusMsg(i18n("Opening pipe...")); bool ok; - QString cmd = KLineEditDlg::getText (i18n("Read From Pipe"), + TQString cmd = KLineEditDlg::getText (i18n("Read From Pipe"), i18n ("Enter a command that will output an audio/video stream\nto the stdout. This will be piped to a player's stdin.\n\nCommand:"), m_player->sources () ["pipesource"]->pipeCmd (), &ok, m_player->view()); if (!ok) { slotStatusMsg (i18n ("Ready.")); @@ -844,7 +844,7 @@ struct IntroSource : public KMPlayer::Source { : KMPlayer::Source (i18n ("Intro"), p, "introsource"), m_app (a) {} KDE_NO_EXPORT bool hasLength () { return false; } KDE_NO_EXPORT bool isSeekable () { return false; } - KDE_NO_EXPORT QString prettyName () { return i18n ("Intro"); } + KDE_NO_EXPORT TQString prettyName () { return i18n ("Intro"); } void activate (); void deactivate (); void stateElementChanged (KMPlayer::Node * node, KMPlayer::Node::State os, KMPlayer::Node::State ns); @@ -854,22 +854,22 @@ struct IntroSource : public KMPlayer::Source { KDE_NO_EXPORT void IntroSource::activate () { if (m_player->settings ()->autoresize) - m_app->disconnect(m_player, SIGNAL(sourceDimensionChanged()),m_app,SLOT(zoom100())); - m_document = new KMPlayer::Document (QString (""), this); - QString introfile = locate ("data", "kmplayer/intro.xml"); - QFile file (introfile); + m_app->disconnect(m_player, TQT_SIGNAL(sourceDimensionChanged()),m_app,TQT_SLOT(zoom100())); + m_document = new KMPlayer::Document (TQString (""), this); + TQString introfile = locate ("data", "kmplayer/intro.xml"); + TQFile file (introfile); if (file.exists () && file.open (IO_ReadOnly)) { - QTextStream ts (&file); - KMPlayer::readXML (m_document, ts, QString (), false); + TQTextStream ts (&file); + KMPlayer::readXML (m_document, ts, TQString (), false); } else { - QString smil = QString::fromLatin1 ( - "<smil><head><layout>" - "<root-layout width='320' height='240' background-color='black'/>" + TQString smil = TQString::tqfromLatin1 ( + "<smil><head><tqlayout>" + "<root-tqlayout width='320' height='240' background-color='black'/>" "<region id='image1' left='31.25%' top='25%' width='37.5%' height='50%' z-order='1'/>" "<region id='reg1' top='10%' height='80%' z-order='2'>" "<region id='image2' left='128' top='72' width='64' bottom='56'/>" "</region>" - "</layout>" + "</tqlayout>" "<transition id='fadein-1' dur='0.6' type='fade'/>" "<transition id='iris1' dur='0.3' type='irisWipe'/>" "</head>" @@ -882,9 +882,9 @@ KDE_NO_EXPORT void IntroSource::activate () { "<seq begin='reg1.activateEvent'/>" "</excl>" "</body></smil>" - ).arg (locate ("data", "kmplayer/noise.gif")).arg (KGlobal::iconLoader()->iconPath (QString::fromLatin1 ("kmplayer"), -64)); - QTextStream ts (smil.utf8 (), IO_ReadOnly); - KMPlayer::readXML (m_document, ts, QString (), false); + ).arg (locate ("data", "kmplayer/noise.gif")).arg (KGlobal::iconLoader()->iconPath (TQString::tqfromLatin1 ("kmplayer"), -64)); + TQTextStream ts (smil.utf8 (), IO_ReadOnly); + KMPlayer::readXML (m_document, ts, TQString (), false); } //m_document->normalize (); m_current = m_document; //mrl->self (); @@ -916,7 +916,7 @@ KDE_NO_EXPORT void IntroSource::stateElementChanged (KMPlayer::Node * node, KMPl KDE_NO_EXPORT void IntroSource::deactivate () { deactivated = true; if (m_player->settings ()->autoresize) - m_app->connect(m_player, SIGNAL(sourceDimensionChanged()),m_app,SLOT(zoom100())); + m_app->connect(m_player, TQT_SIGNAL(sourceDimensionChanged()),m_app,TQT_SLOT(zoom100())); if (!finished && m_document) // user opens a source while introducing m_document->reset (); } @@ -925,9 +925,9 @@ KDE_NO_EXPORT void IntroSource::deactivate () { KDE_NO_EXPORT void KMPlayerApp::restoreFromConfig () { if (m_player->view ()) { m_view->docArea ()->hide (); - m_view->docArea ()->readDockConfig (m_player->config (), QString ("Window Layout")); + m_view->docArea ()->readDockConfig (m_player->config (), TQString ("Window Layout")); m_view->docArea ()->show (); - m_view->layout ()->activate (); + m_view->tqlayout ()->activate (); } } @@ -979,7 +979,7 @@ KDE_NO_EXPORT void KMPlayerApp::saveProperties (KConfig * config) { } KDE_NO_EXPORT void KMPlayerApp::readProperties (KConfig * config) { - KURL url (config->readEntry ("URL", QString ())); + KURL url (config->readEntry ("URL", TQString ())); openDocumentFile (url); if (!config->readBoolEntry ("Visible", true) && m_systray) hide (); @@ -1000,15 +1000,15 @@ KDE_NO_EXPORT void KMPlayerApp::resizePlayer (int percentage) { if (w > 0 && h > 0) { if (m_view->controlPanel ()->isVisible ()) h += m_view->controlPanel ()->size ().height (); - QSize s1 = size (); - QSize s2 = m_view->viewArea ()->size (); + TQSize s1 = size (); + TQSize s2 = m_view->viewArea ()->size (); w += s1.width () - s2.width (); h += s1.height () - s2.height (); w = int (1.0 * w * percentage/100.0); h = int (1.0 * h * percentage/100.0); - QSize s = sizeForCentralWidgetSize (QSize (w, h)); + TQSize s = sizeForCentralWidgetSize (TQSize (w, h)); if (s.width () != width () || s.height () != height ()) { - QSize oldsize = m_view->viewArea ()->size (); + TQSize oldsize = m_view->viewArea ()->size (); resize (s); } } @@ -1054,9 +1054,9 @@ KDE_NO_EXPORT void KMPlayerApp::syncEditMode () { KMPlayer::PlayListItem *si = m_view->playList()->selectedPlayListItem(); if (si && si->node) { si->node->clearChildren (); - QString txt = m_view->infoPanel ()->text (); - QTextStream ts (txt, IO_ReadOnly); - KMPlayer::readXML (si->node, ts, QString (), false); + TQString txt = m_view->infoPanel ()->text (); + TQTextStream ts (txt, IO_ReadOnly); + KMPlayer::readXML (si->node, ts, TQString (), false); m_view->playList ()->updateTree (edit_tree_id, si->node->document(), si->node, true, false); } } else @@ -1092,7 +1092,7 @@ KDE_NO_EXPORT void KMPlayerApp::broadcastStopped () { m_view->controlPanel()->broadcastButton ()->toggle (); if (m_player->source () != m_player->sources () ["tvsource"]) m_view->controlPanel()->broadcastButton ()->hide (); - setCursor (QCursor (Qt::ArrowCursor)); + setCursor (TQCursor (TQt::ArrowCursor)); } KDE_NO_EXPORT bool KMPlayerApp::broadcasting () const { @@ -1112,8 +1112,8 @@ KDE_NO_EXPORT void KMPlayerApp::saveOptions() config->setGroup ("Pipe Command"); config->writeEntry ("Command1", m_player->sources () ["pipesource"]->pipeCmd ()); } - m_view->setInfoMessage (QString ()); - m_view->docArea ()->writeDockConfig (config, QString ("Window Layout")); + m_view->setInfoMessage (TQString ()); + m_view->docArea ()->writeDockConfig (config, TQString ("Window Layout")); Recents * rc = static_cast <Recents *> (recents.ptr ()); if (rc && rc->resolved) { fileOpenRecent->saveEntries (config,"Recent Files"); @@ -1145,11 +1145,11 @@ KDE_NO_EXPORT void KMPlayerApp::readOptions() { viewMenuBar->setChecked (config->readBoolEntry("Show Menubar", true)); slotViewMenuBar(); - QSize size = config->readSizeEntry ("Geometry"); + TQSize size = config->readSizeEntry ("Geometry"); if (!size.isEmpty ()) resize (size); else if (m_player->settings ()->remembersize) - resize (QSize (640, 480)); + resize (TQSize (640, 480)); config->setGroup ("Pipe Command"); static_cast <KMPlayerPipeSource *> (m_player->sources () ["pipesource"])->setCommand (config->readEntry ("Command1", "")); @@ -1165,7 +1165,7 @@ KDE_NO_EXPORT void KMPlayerApp::readOptions() { #include <netwm.h> #undef Always #undef Never -#undef Status +#undef tqStatus #undef Unsorted #undef Bool @@ -1176,7 +1176,7 @@ KDE_NO_EXPORT void KMPlayerApp::minimalMode (bool by_user) { winfo.setWindowType (NET::Normal); readOptions (); if (by_user) - disconnect (m_view->controlPanel ()->button (KMPlayer::ControlPanel::button_playlist), SIGNAL (clicked ()), this, SLOT (slotMinimalMode ())); + disconnect (m_view->controlPanel ()->button (KMPlayer::ControlPanel::button_playlist), TQT_SIGNAL (clicked ()), TQT_TQOBJECT(this), TQT_SLOT (slotMinimalMode ())); restoreFromConfig (); } else { saveOptions (); @@ -1184,7 +1184,7 @@ KDE_NO_EXPORT void KMPlayerApp::minimalMode (bool by_user) { toolBar("mainToolBar")->hide(); statusBar()->hide(); if (by_user) - connect (m_view->controlPanel ()->button (KMPlayer::ControlPanel::button_playlist), SIGNAL (clicked ()), this, SLOT (slotMinimalMode ())); + connect (m_view->controlPanel ()->button (KMPlayer::ControlPanel::button_playlist), TQT_SIGNAL (clicked ()), TQT_TQOBJECT(this), TQT_SLOT (slotMinimalMode ())); if (by_user) #if KDE_IS_VERSION(3, 1, 90) winfo.setWindowType (NET::Utility); @@ -1194,9 +1194,9 @@ KDE_NO_EXPORT void KMPlayerApp::minimalMode (bool by_user) { } m_view->viewArea ()->minimalMode (); if (by_user) { - QRect rect = m_view->viewArea ()->topWindowRect (); + TQRect rect = m_view->viewArea ()->topWindowRect (); hide (); - QTimer::singleShot (0, this, SLOT (zoom100 ())); + TQTimer::singleShot (0, TQT_TQOBJECT(this), TQT_SLOT (zoom100 ())); show (); move (rect.x (), rect.y ()); } @@ -1211,7 +1211,7 @@ KDE_NO_EXPORT void KMPlayerApp::slotMinimalMode () { struct ExitSource : public KMPlayer::Source { KDE_NO_CDTOR_EXPORT ExitSource (KMPlayer::PartBase *p) : KMPlayer::Source (i18n ("Exit"), p, "exitsource") {} - KDE_NO_EXPORT QString prettyName () { return i18n ("Exit"); } + KDE_NO_EXPORT TQString prettyName () { return i18n ("Exit"); } KDE_NO_EXPORT bool hasLength () { return false; } KDE_NO_EXPORT bool isSeekable () { return false; } void activate (); @@ -1220,27 +1220,27 @@ struct ExitSource : public KMPlayer::Source { }; KDE_NO_EXPORT void ExitSource::activate () { - m_document = new KMPlayer::Document (QString (""), this); - QString exitfile = locate ("data", "kmplayer/exit.xml"); - QFile file (exitfile); + m_document = new KMPlayer::Document (TQString (""), this); + TQString exitfile = locate ("data", "kmplayer/exit.xml"); + TQFile file (exitfile); if (file.exists () && file.open (IO_ReadOnly)) { - QTextStream ts (&file); - KMPlayer::readXML (m_document, ts, QString (), false); + TQTextStream ts (&file); + KMPlayer::readXML (m_document, ts, TQString (), false); } else { - QString smil = QString::fromLatin1 ("<smil><head><layout>" - "<root-layout width='320' height='240' background-color='black'/>" + TQString smil = TQString::tqfromLatin1 ("<smil><head><tqlayout>" + "<root-tqlayout width='320' height='240' background-color='black'/>" "<region id='reg1' top='10%' height='80%' z-order='2'>" "<region id='image' left='128' top='72' width='64' bottom='56'/>" - "</region></layout>" + "</region></tqlayout>" "<transition id='pw' dur='0.3' type='pushWipe' subtype='fromBottom'/>" "</head><body>" "<par>" //"<animate target='reg1' attribute='background-color' calcMode='discrete' values='#FFFFFF;#E4E4E4;#CCCCCC;#B4B4B4;#9E9E9E;#8A8A8A;#777777;#656565;#555555;#464646;#393939;#2D2D2D;#222222;#191919;#111111;#0B0B0B;#060606;#020202;#000000;#000000' dur='0.6'/>" "<img src='%2' id='img1' region='image' dur='0.4' fit='hidden' transOut='pw'/>" "</par>" - "</body></smil>").arg (KGlobal::iconLoader()->iconPath (QString::fromLatin1 ("kmplayer"), -64)); - QTextStream ts (smil.utf8 (), IO_ReadOnly); - KMPlayer::readXML (m_document, ts, QString (), false); + "</body></smil>").arg (KGlobal::iconLoader()->iconPath (TQString::tqfromLatin1 ("kmplayer"), -64)); + TQTextStream ts (smil.utf8 (), IO_ReadOnly); + KMPlayer::readXML (m_document, ts, TQString (), false); } //m_document->normalize (); m_current = m_document; @@ -1254,14 +1254,14 @@ KDE_NO_EXPORT void ExitSource::activate () { return; } } - qApp->quit (); + tqApp->quit (); } KDE_NO_EXPORT void ExitSource::stateElementChanged (KMPlayer::Node * node, KMPlayer::Node::State, KMPlayer::Node::State new_state) { if (new_state == KMPlayer::Node::state_deactivated && m_document == node && m_player->view ()) - m_player->view ()->topLevelWidget ()->close (); + m_player->view ()->tqtopLevelWidget ()->close (); } #endif @@ -1271,14 +1271,14 @@ KDE_NO_EXPORT bool KMPlayerApp::queryClose () { static_cast <KMPlayerVDRSource *> (m_player->sources () ["vdrsource"])->waitForConnectionClose (); // is arts control still running if (!m_dcopName.isEmpty ()) { - QCString replytype; - QByteArray data, replydata; + TQCString replytype; + TQByteArray data, replydata; kapp->dcopClient ()->call (m_dcopName, "MainApplication-Interface", "quit()", data, replytype, replydata); } if (m_played_exit || m_player->settings ()->no_intro || kapp->sessionSaving() ) return true; if (m_auto_resize) - disconnect(m_player, SIGNAL(sourceDimensionChanged()),this,SLOT(zoom100())); + disconnect(m_player, TQT_SIGNAL(sourceDimensionChanged()),this,TQT_SLOT(zoom100())); m_played_exit = true; if (!m_minimal_mode) minimalMode (false); @@ -1294,8 +1294,8 @@ KDE_NO_EXPORT bool KMPlayerApp::queryExit() { if (!m_minimal_mode) saveOptions(); - disconnect (m_player->settings (), SIGNAL (configChanged ()), - this, SLOT (configChanged ())); + disconnect (m_player->settings (), TQT_SIGNAL (configChanged ()), + TQT_TQOBJECT(this), TQT_SLOT (configChanged ())); m_player->settings ()->writeConfig (); return true; } @@ -1311,7 +1311,7 @@ KDE_NO_EXPORT void KMPlayerApp::slotFileNewWindow() } KDE_NO_EXPORT void KMPlayerApp::slotFileOpen () { - KURL::List urls = KFileDialog::getOpenURLs (QString (), i18n ("*|All Files"), this, i18n ("Open File")); + KURL::List urls = KFileDialog::getOpenURLs (TQString (), i18n ("*|All Files"), this, i18n ("Open File")); if (urls.size () == 1) { openDocumentFile (urls [0]); } else if (urls.size () > 1) { @@ -1330,9 +1330,9 @@ KDE_NO_EXPORT void KMPlayerApp::slotFileOpenRecent(const KURL& url) } KDE_NO_EXPORT void KMPlayerApp::slotSaveAs () { - QString url = KFileDialog::getSaveFileName (QString (), QString (), this, i18n ("Save File")); + TQString url = KFileDialog::getSaveFileName (TQString (), TQString (), this, i18n ("Save File")); if (!url.isEmpty ()) { - QFile file (url); + TQFile file (url); if (!file.open (IO_WriteOnly)) { KMessageBox::error (this, i18n ("Error opening file %1.\n%2.").arg (url).arg (file.errorString ()), i18n("Error")); return; @@ -1340,9 +1340,9 @@ KDE_NO_EXPORT void KMPlayerApp::slotSaveAs () { if (m_player->source ()) { KMPlayer::NodePtr doc = m_player->source ()->document (); if (doc) { - QTextStream ts (&file); - ts.setEncoding (QTextStream::UnicodeUTF8); - ts << QString ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); + TQTextStream ts (&file); + ts.setEncoding (TQTextStream::UnicodeUTF8); + ts << TQString ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); if (doc->childNodes ()->length () == 1) ts << doc->innerXML (); else @@ -1384,7 +1384,7 @@ KDE_NO_EXPORT void KMPlayerApp::slotFileQuit() if (memberList->count () > 1) deleteLater (); else - qApp->quit (); + tqApp->quit (); // close the first window, the list makes the next one the first again. // This ensures that queryClose() is called on each window to ask for closing /*KMainWindow* w; @@ -1437,22 +1437,23 @@ KDE_NO_EXPORT void KMPlayerApp::slotViewMenuBar() { slotStatusMsg(i18n("Ready")); } else { menuBar()->hide(); - slotStatusMsg (i18n ("Show Menubar with %1").arg(viewMenuBar->shortcutText())); + slotStatusMsg (i18n ("Show Menubar with %1").tqarg(viewMenuBar->shortcutText())); if (!m_showStatusbar) { statusBar()->show(); - QTimer::singleShot (3000, statusBar(), SLOT (hide ())); + TQTimer::singleShot (3000, statusBar(), TQT_SLOT (hide ())); } } } -KDE_NO_EXPORT void KMPlayerApp::slotStatusMsg (const QString &text) { +KDE_NO_EXPORT void KMPlayerApp::slotStatusMsg (const TQString &text) { KStatusBar * sb = statusBar (); sb->clear (); sb->changeItem (text, id_status_msg); } KDE_NO_EXPORT void KMPlayerApp::fullScreen () { - if (sender ()->metaObject ()->inherits ("KAction")) +// if (TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender ()))->tqmetaObject ()->inherits ("KAction")) + if (TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender ()))->inherits ("KAction")) m_view->fullScreen(); #if KDE_IS_VERSION(3,1,90) viewFullscreen->setChecked (m_view->isFullScreen ()); @@ -1465,24 +1466,24 @@ KDE_NO_EXPORT void KMPlayerApp::fullScreen () { } } -KDE_NO_EXPORT void KMPlayerApp::playListItemSelected (QListViewItem * item) { +KDE_NO_EXPORT void KMPlayerApp::playListItemSelected (TQListViewItem * item) { KMPlayer::PlayListItem * vi = static_cast <KMPlayer::PlayListItem *> (item); if (edit_tree_id > -1) { if (vi->playListView ()->rootItem (item)->id != edit_tree_id) editMode (); - m_view->setInfoMessage (edit_tree_id > -1 ? vi->node->innerXML () : QString ()); + m_view->setInfoMessage (edit_tree_id > -1 ? vi->node->innerXML () : TQString ()); } viewEditMode->setEnabled (vi->playListView ()->rootItem (item)->flags & KMPlayer::PlayListView::TreeEdit); } KDE_NO_EXPORT -void KMPlayerApp::playListItemDropped (QDropEvent * de, QListViewItem * after) { +void KMPlayerApp::playListItemDropped (TQDropEvent * de, TQListViewItem * after) { if (!after) { // could still be a descendent after = m_view->playList()->itemAt (m_view->playList()->contentsToViewport (de->pos ())); if (after) { - QListViewItem * p = after->itemAbove (); + TQListViewItem * p = after->itemAbove (); if (p && p->nextSibling () != after) - after = after->parent (); + after = after->tqparent (); } } if (!after) @@ -1503,9 +1504,9 @@ void KMPlayerApp::playListItemDropped (QDropEvent * de, QListViewItem * after) { if (!manip_node && ritem->id == playlist_id) { if (KURLDrag::canDecode (de)) { KURLDrag::decode (de, m_drop_list); - } else if (QTextDrag::canDecode (de)) { - QString text; - QTextDrag::decode (de, text); + } else if (TQTextDrag::canDecode (de)) { + TQString text; + TQTextDrag::decode (de, text); m_drop_list.push_back (KURL (text)); } } @@ -1521,16 +1522,16 @@ KDE_NO_EXPORT void KMPlayerApp::menuDropInList () { KMPlayer::NodePtr n = static_cast<KMPlayer::PlayListItem*>(m_drop_after)->node; KMPlayer::NodePtr pi; for (int i = m_drop_list.size (); n && (i > 0 || manip_node); i--) { - if (manip_node && manip_node->parentNode ()) { + if (manip_node && manip_node->tqparentNode ()) { pi = manip_node; manip_node = 0L; - pi->parentNode ()->removeChild (pi); + pi->tqparentNode ()->removeChild (pi); } else pi = new PlaylistItem(playlist, this,false, m_drop_list[i-1].url()); if (n == playlist || m_drop_after->isOpen ()) n->insertBefore (pi, n->firstChild ()); else - n->parentNode ()->insertBefore (pi, n->nextSibling ()); + n->tqparentNode ()->insertBefore (pi, n->nextSibling ()); } m_view->playList()->updateTree (playlist_id, playlist, pi, true, false); } @@ -1543,13 +1544,13 @@ KDE_NO_EXPORT void KMPlayerApp::menuDropInGroup () { if (n == playlist || m_drop_after->isOpen ()) n->insertBefore (g, n->firstChild ()); else - n->parentNode ()->insertBefore (g, n->nextSibling ()); + n->tqparentNode ()->insertBefore (g, n->nextSibling ()); KMPlayer::NodePtr pi; for (int i = 0; i < m_drop_list.size () || manip_node; ++i) { - if (manip_node && manip_node->parentNode ()) { + if (manip_node && manip_node->tqparentNode ()) { pi = manip_node; manip_node = 0L; - pi->parentNode ()->removeChild (pi); + pi->tqparentNode ()->removeChild (pi); } else pi = new PlaylistItem (playlist,this, false, m_drop_list[i].url ()); g->appendChild (pi); @@ -1564,36 +1565,36 @@ KDE_NO_EXPORT void KMPlayerApp::menuCopyDrop () { if (n == playlist || m_drop_after->isOpen ()) n->insertBefore (pi, n->firstChild ()); else - n->parentNode ()->insertBefore (pi, n->nextSibling ()); + n->tqparentNode ()->insertBefore (pi, n->nextSibling ()); m_view->playList()->updateTree (playlist_id, playlist, pi, true, false); } } KDE_NO_EXPORT void KMPlayerApp::menuDeleteNode () { KMPlayer::NodePtr n; - if (manip_node && manip_node->parentNode ()) { - n = manip_node->previousSibling() ? manip_node->previousSibling() : manip_node->parentNode (); - manip_node->parentNode ()->removeChild (manip_node); + if (manip_node && manip_node->tqparentNode ()) { + n = manip_node->previousSibling() ? manip_node->previousSibling() : manip_node->tqparentNode (); + manip_node->tqparentNode ()->removeChild (manip_node); } m_view->playList()->updateTree (manip_tree_id, 0L, n, true, false); } KDE_NO_EXPORT void KMPlayerApp::menuMoveUpNode () { KMPlayer::NodePtr n = manip_node; - if (n && n->parentNode () && n->previousSibling ()) { + if (n && n->tqparentNode () && n->previousSibling ()) { KMPlayer::NodePtr prev = n->previousSibling (); - n->parentNode ()->removeChild (n); - prev->parentNode ()->insertBefore (n, prev); + n->tqparentNode ()->removeChild (n); + prev->tqparentNode ()->insertBefore (n, prev); } m_view->playList()->updateTree (manip_tree_id, 0L, n, true, false); } KDE_NO_EXPORT void KMPlayerApp::menuMoveDownNode () { KMPlayer::NodePtr n = manip_node; - if (n && n->parentNode () && n->nextSibling ()) { + if (n && n->tqparentNode () && n->nextSibling ()) { KMPlayer::NodePtr next = n->nextSibling (); - n->parentNode ()->removeChild (n); - next->parentNode ()->insertBefore (n, next->nextSibling ()); + n->tqparentNode ()->removeChild (n); + next->tqparentNode ()->insertBefore (n, next->nextSibling ()); } m_view->playList()->updateTree (manip_tree_id, 0L, n, true, false); } @@ -1603,7 +1604,7 @@ KDE_NO_EXPORT void KMPlayerApp::playListItemMoved () { KMPlayer::RootPlayListItem * ri = m_view->playList ()->rootItem (si); kdDebug() << "playListItemMoved " << (ri->id == playlist_id) << !! si->node << endl; if (ri->id == playlist_id && si->node) { - KMPlayer::NodePtr p = si->node->parentNode (); + KMPlayer::NodePtr p = si->node->tqparentNode (); if (p) { p->removeChild (si->node); m_view->playList()->updateTree(playlist_id,playlist,0L,false,false); @@ -1611,7 +1612,7 @@ KDE_NO_EXPORT void KMPlayerApp::playListItemMoved () { } } -KDE_NO_EXPORT void KMPlayerApp::preparePlaylistMenu (KMPlayer::PlayListItem * item, QPopupMenu * pm) { +KDE_NO_EXPORT void KMPlayerApp::preparePlaylistMenu (KMPlayer::PlayListItem * item, TQPopupMenu * pm) { KMPlayer::RootPlayListItem * ri = m_view->playList ()->rootItem (item); if (item->node && ri->flags & (KMPlayer::PlayListView::Moveable | KMPlayer::PlayListView::Deleteable)) { @@ -1619,20 +1620,20 @@ KDE_NO_EXPORT void KMPlayerApp::preparePlaylistMenu (KMPlayer::PlayListItem * it pm->insertSeparator (); manip_node = item->node; if (ri->flags & KMPlayer::PlayListView::Deleteable) - pm->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("editdelete"), KIcon::Small, 0, true), i18n ("&Delete item"), this, SLOT (menuDeleteNode ())); + pm->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("editdelete"), KIcon::Small, 0, true), i18n ("&Delete item"), TQT_TQOBJECT(this), TQT_SLOT (menuDeleteNode ())); if (ri->flags & KMPlayer::PlayListView::Moveable) { if (manip_node->previousSibling ()) - pm->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("up"), KIcon::Small, 0, true), i18n ("&Move up"), this, SLOT (menuMoveUpNode ())); + pm->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("up"), KIcon::Small, 0, true), i18n ("&Move up"), TQT_TQOBJECT(this), TQT_SLOT (menuMoveUpNode ())); if (manip_node->nextSibling ()) - pm->insertItem (KGlobal::iconLoader()->loadIconSet (QString ("down"), KIcon::Small, 0, true), i18n ("Move &down"), this, SLOT (menuMoveDownNode ())); + pm->insertItem (KGlobal::iconLoader()->loadIconSet (TQString ("down"), KIcon::Small, 0, true), i18n ("Move &down"), TQT_TQOBJECT(this), TQT_SLOT (menuMoveDownNode ())); } } } KDE_NO_EXPORT void KMPlayerApp::startArtsControl () { - QCString fApp, fObj; - QByteArray data, replydata; + TQCString fApp, fObj; + TQByteArray data, replydata; QCStringList apps = kapp->dcopClient ()->registeredApplications(); QCStringList::ConstIterator end( apps.end() ); for( QCStringList::ConstIterator it = apps.begin(); it != end; ++it) @@ -1641,13 +1642,13 @@ KDE_NO_EXPORT void KMPlayerApp::startArtsControl () { (*it, "artscontrol-mainwindow#1", "raise()", data, fApp, fObj); return; } - QStringList args; - QCString replytype; - QDataStream stream (data, IO_WriteOnly); - stream << QString ("aRts Control Tool") << args; - if (kapp->dcopClient ()->call ("klauncher", "klauncher", "start_service_by_name(QString,QStringList)", data, replytype, replydata)) { + TQStringList args; + TQCString replytype; + TQDataStream stream (data, IO_WriteOnly); + stream << TQString ("aRts Control Tool") << args; + if (kapp->dcopClient ()->call ("klauncher", "klauncher", "start_service_by_name(TQString,TQStringList)", data, replytype, replydata)) { int result; - QDataStream replystream (replydata, IO_ReadOnly); + TQDataStream replystream (replydata, IO_ReadOnly); replystream >> result >> m_dcopName; } } @@ -1656,16 +1657,16 @@ KDE_NO_EXPORT void KMPlayerApp::configChanged () { viewKeepRatio->setChecked (m_player->settings ()->sizeratio); if (m_player->settings ()->docksystray && !m_systray) { m_systray = new KSystemTray (this); - m_systray->setPixmap (KGlobal::iconLoader ()->loadIcon (QString ("kmplayer"), KIcon::NoGroup, 22)); + m_systray->setPixmap (KGlobal::iconLoader ()->loadIcon (TQString ("kmplayer"), KIcon::NoGroup, 22)); m_systray->show (); } else if (!m_player->settings ()->docksystray && m_systray) { delete m_systray; m_systray = 0L; } if (m_player->settings ()->autoresize && !m_auto_resize) - connect(m_player,SIGNAL(sourceDimensionChanged()),this,SLOT(zoom100())); + connect(m_player,TQT_SIGNAL(sourceDimensionChanged()),this,TQT_SLOT(zoom100())); else if (!m_player->settings ()->autoresize && m_auto_resize) - disconnect(m_player, SIGNAL(sourceDimensionChanged()),this,SLOT(zoom100())); + disconnect(m_player, TQT_SIGNAL(sourceDimensionChanged()),this,TQT_SLOT(zoom100())); m_auto_resize = m_player->settings ()->autoresize; static_cast <KMPlayerTVSource *> (m_player->sources () ["tvsource"])->buildMenu (); } @@ -1678,14 +1679,14 @@ KDE_NO_EXPORT void KMPlayerApp::keepSizeRatio () { //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT KMPlayerMenuSource::KMPlayerMenuSource (const QString & n, KMPlayerApp * a, QPopupMenu * m, const char * src) +KDE_NO_CDTOR_EXPORT KMPlayerMenuSource::KMPlayerMenuSource (const TQString & n, KMPlayerApp * a, TQPopupMenu * m, const char * src) : KMPlayer::Source (n, a->player (), src), m_menu (m), m_app (a) { } KDE_NO_CDTOR_EXPORT KMPlayerMenuSource::~KMPlayerMenuSource () { } -KDE_NO_EXPORT void KMPlayerMenuSource::menuItemClicked (QPopupMenu * menu, int id) { +KDE_NO_EXPORT void KMPlayerMenuSource::menuItemClicked (TQPopupMenu * menu, int id) { int unsetmenuid = -1; for (unsigned i = 0; i < menu->count(); i++) { int menuid = menu->idAt (i); @@ -1701,19 +1702,19 @@ KDE_NO_EXPORT void KMPlayerMenuSource::menuItemClicked (QPopupMenu * menu, int i //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageDVD::KMPlayerPrefSourcePageDVD (QWidget * parent) - : QFrame(parent) { - QVBoxLayout *layout = new QVBoxLayout (this, 5, 2); - autoPlayDVD = new QCheckBox (i18n ("Auto play after opening DVD"), this, 0); - QWhatsThis::add(autoPlayDVD, i18n ("Start playing DVD right after opening DVD")); - QLabel *dvdDevicePathLabel = new QLabel (i18n("DVD device:"), this, 0); +KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageDVD::KMPlayerPrefSourcePageDVD (TQWidget * tqparent) + : TQFrame(tqparent) { + TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5, 2); + autoPlayDVD = new TQCheckBox (i18n ("Auto play after opening DVD"), this, 0); + TQWhatsThis::add(autoPlayDVD, i18n ("Start playing DVD right after opening DVD")); + TQLabel *dvdDevicePathLabel = new TQLabel (i18n("DVD device:"), this, 0); dvddevice = new KURLRequester ("/dev/dvd", this, 0); - QWhatsThis::add(dvddevice, i18n ("Path to your DVD device, you must have read rights to this device")); - layout->addWidget (autoPlayDVD); - layout->addItem (new QSpacerItem (0, 10, QSizePolicy::Minimum, QSizePolicy::Minimum)); - layout->addWidget (dvdDevicePathLabel); - layout->addWidget (dvddevice); - layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); + TQWhatsThis::add(dvddevice, i18n ("Path to your DVD device, you must have read rights to this device")); + tqlayout->addWidget (autoPlayDVD); + tqlayout->addItem (new TQSpacerItem (0, 10, TQSizePolicy::Minimum, TQSizePolicy::Minimum)); + tqlayout->addWidget (dvdDevicePathLabel); + tqlayout->addWidget (dvddevice); + tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); } //----------------------------------------------------------------------------- @@ -1727,7 +1728,7 @@ public: class KMPLAYER_NO_EXPORT Disk : public KMPlayer::Mrl { public: - Disk (KMPlayer::NodePtr & doc, KMPlayerApp *a, const QString &url, const QString &pn); + Disk (KMPlayer::NodePtr & doc, KMPlayerApp *a, const TQString &url, const TQString &pn); void activate (); KMPlayerApp * app; }; @@ -1742,7 +1743,7 @@ KDE_NO_EXPORT void Disks::childDone (KMPlayer::NodePtr) { finish (); } -KDE_NO_CDTOR_EXPORT Disk::Disk (KMPlayer::NodePtr & doc, KMPlayerApp * a, const QString &url, const QString &pn) +KDE_NO_CDTOR_EXPORT Disk::Disk (KMPlayer::NodePtr & doc, KMPlayerApp * a, const TQString &url, const TQString &pn) : KMPlayer::Mrl (doc, id_node_disk_node), app (a) { src = url; pretty_name = pn; @@ -1761,13 +1762,13 @@ KDE_NO_EXPORT void Disk::activate () { //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT KMPlayerDVDSource::KMPlayerDVDSource (KMPlayerApp * a, QPopupMenu * m) +KDE_NO_CDTOR_EXPORT KMPlayerDVDSource::KMPlayerDVDSource (KMPlayerApp * a, TQPopupMenu * m) : KMPlayerMenuSource (i18n ("DVD"), a, m, "dvdsource"), m_configpage (0L) { m_menu->insertTearOffHandle (); - m_dvdtitlemenu = new QPopupMenu (m_app); - m_dvdsubtitlemenu = new QPopupMenu (m_app); - m_dvdchaptermenu = new QPopupMenu (m_app); - m_dvdlanguagemenu = new QPopupMenu (m_app); + m_dvdtitlemenu = new TQPopupMenu (m_app); + m_dvdsubtitlemenu = new TQPopupMenu (m_app); + m_dvdchaptermenu = new TQPopupMenu (m_app); + m_dvdlanguagemenu = new TQPopupMenu (m_app); m_dvdtitlemenu->setCheckable (true); m_dvdsubtitlemenu->setCheckable (true); m_dvdchaptermenu->setCheckable (true); @@ -1785,22 +1786,22 @@ KDE_NO_CDTOR_EXPORT KMPlayerDVDSource::~KMPlayerDVDSource () { disks->document ()->dispose (); } -KDE_NO_EXPORT bool KMPlayerDVDSource::processOutput (const QString & str) { +KDE_NO_EXPORT bool KMPlayerDVDSource::processOutput (const TQString & str) { if (KMPlayer::Source::processOutput (str)) return true; if (m_identified) return false; //kdDebug () << "scanning " << cstr << endl; - QRegExp * patterns = static_cast <KMPlayer::MPlayer *> (m_player->players () ["mplayer"])->configPage ()->m_patterns; - QRegExp & langRegExp = patterns[KMPlayer::MPlayerPreferencesPage::pat_dvdlang]; - QRegExp & subtitleRegExp = patterns[KMPlayer::MPlayerPreferencesPage::pat_dvdsub]; - QRegExp & titleRegExp = patterns[KMPlayer::MPlayerPreferencesPage::pat_dvdtitle]; - QRegExp & chapterRegExp = patterns[KMPlayer::MPlayerPreferencesPage::pat_dvdchapter]; + TQRegExp * patterns = static_cast <KMPlayer::MPlayer *> (m_player->players () ["mplayer"])->configPage ()->m_patterns; + TQRegExp & langRegExp = patterns[KMPlayer::MPlayerPreferencesPage::pat_dvdlang]; + TQRegExp & subtitleRegExp = patterns[KMPlayer::MPlayerPreferencesPage::pat_dvdsub]; + TQRegExp & titleRegExp = patterns[KMPlayer::MPlayerPreferencesPage::pat_dvdtitle]; + TQRegExp & chapterRegExp = patterns[KMPlayer::MPlayerPreferencesPage::pat_dvdchapter]; bool post090 = m_player->settings ()->mplayerpost090; if (!post090 && subtitleRegExp.search (str) > -1) { bool ok; int sub_id = subtitleRegExp.cap (1).toInt (&ok); - QString sub_title = ok ? subtitleRegExp.cap (2) : subtitleRegExp.cap(1); + TQString sub_title = ok ? subtitleRegExp.cap (2) : subtitleRegExp.cap(1); if (!ok) sub_id = subtitleRegExp.cap (2).toInt (&ok); m_dvdsubtitlemenu->insertItem (sub_title, sub_id); @@ -1808,7 +1809,7 @@ KDE_NO_EXPORT bool KMPlayerDVDSource::processOutput (const QString & str) { } else if (!post090 && langRegExp.search (str) > -1) { bool ok; int lang_id = langRegExp.cap (1).toInt (&ok); - QString lang_title = ok ? langRegExp.cap (2) : langRegExp.cap (1); + TQString lang_title = ok ? langRegExp.cap (2) : langRegExp.cap (1); if (!ok) lang_id = langRegExp.cap (2).toInt (&ok); m_dvdlanguagemenu->insertItem (lang_title, lang_id); @@ -1818,13 +1819,13 @@ KDE_NO_EXPORT bool KMPlayerDVDSource::processOutput (const QString & str) { unsigned ts = titleRegExp.cap (1).toInt (); if ( ts > 100) ts = 100; for (unsigned t = 1; t <= ts; t++) - m_dvdtitlemenu->insertItem (QString::number (t), t); + m_dvdtitlemenu->insertItem (TQString::number (t), t); } else if (chapterRegExp.search (str) > -1) { kdDebug () << "chapter " << chapterRegExp.cap (1) << endl; unsigned chs = chapterRegExp.cap (1).toInt (); if ( chs > 100) chs = 100; for (unsigned c = 1; c <= chs; c++) - m_dvdchaptermenu->insertItem (QString::number (c), c); + m_dvdchaptermenu->insertItem (TQString::number (c), c); } else return false; return true; @@ -1840,17 +1841,17 @@ KDE_NO_EXPORT void KMPlayerDVDSource::activate () { if (!m_player->settings ()->mplayerpost090) { m_menu->insertItem (i18n ("Audio &Language"), m_dvdlanguagemenu); m_menu->insertItem (i18n ("&SubTitles"), m_dvdsubtitlemenu); - connect (m_dvdsubtitlemenu, SIGNAL (activated (int)), - this, SLOT (subtitleMenuClicked (int))); - connect (m_dvdlanguagemenu, SIGNAL (activated (int)), - this, SLOT (languageMenuClicked (int))); + connect (m_dvdsubtitlemenu, TQT_SIGNAL (activated (int)), + TQT_TQOBJECT(this), TQT_SLOT (subtitleMenuClicked (int))); + connect (m_dvdlanguagemenu, TQT_SIGNAL (activated (int)), + TQT_TQOBJECT(this), TQT_SLOT (languageMenuClicked (int))); } - connect (m_dvdtitlemenu, SIGNAL (activated (int)), - this, SLOT (titleMenuClicked (int))); - connect (m_dvdchaptermenu, SIGNAL (activated (int)), - this, SLOT (chapterMenuClicked (int))); + connect (m_dvdtitlemenu, TQT_SIGNAL (activated (int)), + TQT_TQOBJECT(this), TQT_SLOT (titleMenuClicked (int))); + connect (m_dvdchaptermenu, TQT_SIGNAL (activated (int)), + TQT_TQOBJECT(this), TQT_SLOT (chapterMenuClicked (int))); if (m_start_play) - QTimer::singleShot (0, m_player, SLOT (play ())); + TQTimer::singleShot (0, m_player, TQT_SLOT (play ())); } KDE_NO_EXPORT void KMPlayerDVDSource::setIdentified (bool b) { @@ -1881,48 +1882,48 @@ KDE_NO_EXPORT void KMPlayerDVDSource::deactivate () { if (!m_player->settings ()->mplayerpost090) { m_menu->removeItemAt (m_menu->count () - 1); m_menu->removeItemAt (m_menu->count () - 1); - disconnect (m_dvdsubtitlemenu, SIGNAL (activated (int)), - this, SLOT (subtitleMenuClicked (int))); - disconnect (m_dvdlanguagemenu, SIGNAL (activated (int)), - this, SLOT (languageMenuClicked (int))); + disconnect (m_dvdsubtitlemenu, TQT_SIGNAL (activated (int)), + TQT_TQOBJECT(this), TQT_SLOT (subtitleMenuClicked (int))); + disconnect (m_dvdlanguagemenu, TQT_SIGNAL (activated (int)), + TQT_TQOBJECT(this), TQT_SLOT (languageMenuClicked (int))); } - disconnect (m_dvdtitlemenu, SIGNAL (activated (int)), - this, SLOT (titleMenuClicked (int))); - disconnect (m_dvdchaptermenu, SIGNAL (activated (int)), - this, SLOT (chapterMenuClicked (int))); + disconnect (m_dvdtitlemenu, TQT_SIGNAL (activated (int)), + TQT_TQOBJECT(this), TQT_SLOT (titleMenuClicked (int))); + disconnect (m_dvdchaptermenu, TQT_SIGNAL (activated (int)), + TQT_TQOBJECT(this), TQT_SLOT (chapterMenuClicked (int))); } } KDE_NO_EXPORT void KMPlayerDVDSource::buildArguments () { - QString url ("dvd://"); + TQString url ("dvd://"); if (m_document) { if (m_current_title > 0) - url += QString::number (m_current_title); + url += TQString::number (m_current_title); m_document->mrl ()->src = url; } else setURL (KURL (url)); - m_options = QString (m_identified ? "" : "-v "); + m_options = TQString (m_identified ? "" : "-v "); if (m_identified) { for (unsigned i = 0; i < m_dvdsubtitlemenu->count (); i++) if (m_dvdsubtitlemenu->isItemChecked (m_dvdsubtitlemenu->idAt (i))) - m_options += "-sid " + QString::number (m_dvdsubtitlemenu->idAt(i)); + m_options += "-sid " + TQString::number (m_dvdsubtitlemenu->idAt(i)); for (unsigned i = 0; i < m_dvdchaptermenu->count (); i++) if (m_dvdchaptermenu->isItemChecked (i)) - m_options += QString (" -chapter %1").arg (i); + m_options += TQString (" -chapter %1").arg (i); for (unsigned i = 0; i < m_dvdlanguagemenu->count (); i++) if (m_dvdlanguagemenu->isItemChecked (m_dvdlanguagemenu->idAt (i))) - m_options += " -aid " + QString::number(m_dvdlanguagemenu->idAt(i)); + m_options += " -aid " + TQString::number(m_dvdlanguagemenu->idAt(i)); if (m_player->settings ()->dvddevice.length () > 0) - m_options += QString(" -dvd-device ") + m_player->settings()->dvddevice; + m_options += TQString(" -dvd-device ") + m_player->settings()->dvddevice; } - m_recordcmd = m_options + QString (" -vf scale -zoom"); + m_recordcmd = m_options + TQString (" -vf scale -zoom"); } -KDE_NO_EXPORT QString KMPlayerDVDSource::filterOptions () { +KDE_NO_EXPORT TQString KMPlayerDVDSource::filterOptions () { KMPlayer::Settings * settings = m_player->settings (); if (!settings->disableppauto) return KMPlayer::Source::filterOptions (); - return QString (""); + return TQString (""); } KDE_NO_EXPORT void KMPlayerDVDSource::titleMenuClicked (int id) { @@ -1936,7 +1937,7 @@ KDE_NO_EXPORT void KMPlayerDVDSource::titleMenuClicked (int id) { m_dvdchaptermenu->clear (); m_dvdlanguagemenu->clear (); if (m_start_play) - QTimer::singleShot (0, m_player, SLOT (play ())); + TQTimer::singleShot (0, m_player, TQT_SLOT (play ())); } } @@ -1944,7 +1945,7 @@ KDE_NO_EXPORT void KMPlayerDVDSource::play () { buildArguments (); if (m_start_play) { m_player->stop (); - QTimer::singleShot (0, m_player, SLOT (play ())); + TQTimer::singleShot (0, m_player, TQT_SLOT (play ())); } } @@ -1963,7 +1964,7 @@ KDE_NO_EXPORT void KMPlayerDVDSource::chapterMenuClicked (int id) { play (); } -KDE_NO_EXPORT QString KMPlayerDVDSource::prettyName () { +KDE_NO_EXPORT TQString KMPlayerDVDSource::prettyName () { return i18n ("DVD"); } @@ -1989,20 +1990,20 @@ KDE_NO_EXPORT void KMPlayerDVDSource::sync (bool fromUI) { } } -KDE_NO_EXPORT void KMPlayerDVDSource::prefLocation (QString & item, QString & icon, QString & tab) { +KDE_NO_EXPORT void KMPlayerDVDSource::prefLocation (TQString & item, TQString & icon, TQString & tab) { item = i18n ("Source"); - icon = QString ("source"); + icon = TQString ("source"); tab = i18n ("DVD"); } -KDE_NO_EXPORT QFrame * KMPlayerDVDSource::prefPage (QWidget * parent) { - m_configpage = new KMPlayerPrefSourcePageDVD (parent); +KDE_NO_EXPORT TQFrame * KMPlayerDVDSource::prefPage (TQWidget * tqparent) { + m_configpage = new KMPlayerPrefSourcePageDVD (tqparent); return m_configpage; } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT KMPlayerDVDNavSource::KMPlayerDVDNavSource (KMPlayerApp * app, QPopupMenu * m) +KDE_NO_CDTOR_EXPORT KMPlayerDVDNavSource::KMPlayerDVDNavSource (KMPlayerApp * app, TQPopupMenu * m) : KMPlayerMenuSource (i18n ("DVDNav"), app, m, "dvdnavsource") { m_menu->insertTearOffHandle (-1, 0); setURL (KURL ("dvd://")); @@ -2019,18 +2020,18 @@ KDE_NO_EXPORT void KMPlayerDVDNavSource::deactivate () { } KDE_NO_EXPORT void KMPlayerDVDNavSource::play () { - if (!m_menu->findItem (DVDNav_previous)) { - m_menu->insertItem (i18n ("&Previous"), this, SLOT (navMenuClicked (int)), 0, DVDNav_previous); - m_menu->insertItem (i18n ("&Next"), this, SLOT (navMenuClicked (int)), 0, DVDNav_next); - m_menu->insertItem (i18n ("&Root"), this, SLOT (navMenuClicked (int)), 0, DVDNav_root); - m_menu->insertItem (i18n ("&Up"), this, SLOT (navMenuClicked (int)), 0, DVDNav_up); + if (!m_menu->tqfindItem (DVDNav_previous)) { + m_menu->insertItem (i18n ("&Previous"), TQT_TQOBJECT(this), TQT_SLOT (navMenuClicked (int)), 0, DVDNav_previous); + m_menu->insertItem (i18n ("&Next"), TQT_TQOBJECT(this), TQT_SLOT (navMenuClicked (int)), 0, DVDNav_next); + m_menu->insertItem (i18n ("&Root"), TQT_TQOBJECT(this), TQT_SLOT (navMenuClicked (int)), 0, DVDNav_root); + m_menu->insertItem (i18n ("&Up"), TQT_TQOBJECT(this), TQT_SLOT (navMenuClicked (int)), 0, DVDNav_up); } - QTimer::singleShot (0, m_player, SLOT (play ())); - connect (this, SIGNAL (stopPlaying ()), this, SLOT(finished ())); + TQTimer::singleShot (0, m_player, TQT_SLOT (play ())); + connect (TQT_TQOBJECT(this), TQT_SIGNAL (stopPlaying ()), TQT_TQOBJECT(this), TQT_SLOT(finished ())); } KDE_NO_EXPORT void KMPlayerDVDNavSource::finished () { - disconnect (this, SIGNAL (stopPlaying ()), this, SLOT(finished ())); + disconnect (TQT_TQOBJECT(this), TQT_SIGNAL (stopPlaying ()), TQT_TQOBJECT(this), TQT_SLOT(finished ())); m_menu->removeItem (DVDNav_previous); m_menu->removeItem (DVDNav_next); m_menu->removeItem (DVDNav_root); @@ -2056,30 +2057,30 @@ KDE_NO_EXPORT void KMPlayerDVDNavSource::navMenuClicked (int id) { } } -KDE_NO_EXPORT QString KMPlayerDVDNavSource::prettyName () { +KDE_NO_EXPORT TQString KMPlayerDVDNavSource::prettyName () { return i18n ("DVD"); } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageVCD::KMPlayerPrefSourcePageVCD (QWidget * parent) - : QFrame (parent) { - QVBoxLayout *layout = new QVBoxLayout (this, 5, 2); - autoPlayVCD = new QCheckBox (i18n ("Auto play after opening a VCD"), this, 0); - QWhatsThis::add(autoPlayVCD, i18n ("Start playing VCD right after opening VCD")); - QLabel *vcdDevicePathLabel = new QLabel (i18n ("VCD (CDROM) device:"), this, 0); +KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageVCD::KMPlayerPrefSourcePageVCD (TQWidget * tqparent) + : TQFrame (tqparent) { + TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5, 2); + autoPlayVCD = new TQCheckBox (i18n ("Auto play after opening a VCD"), this, 0); + TQWhatsThis::add(autoPlayVCD, i18n ("Start playing VCD right after opening VCD")); + TQLabel *vcdDevicePathLabel = new TQLabel (i18n ("VCD (CDROM) device:"), this, 0); vcddevice= new KURLRequester ("/dev/cdrom", this, 0); - QWhatsThis::add(vcddevice, i18n ("Path to your CDROM/DVD device, you must have read rights to this device")); - layout->addWidget (autoPlayVCD); - layout->addItem (new QSpacerItem (0, 10, QSizePolicy::Minimum, QSizePolicy::Minimum)); - layout->addWidget (vcdDevicePathLabel); - layout->addWidget (vcddevice); - layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); + TQWhatsThis::add(vcddevice, i18n ("Path to your CDROM/DVD device, you must have read rights to this device")); + tqlayout->addWidget (autoPlayVCD); + tqlayout->addItem (new TQSpacerItem (0, 10, TQSizePolicy::Minimum, TQSizePolicy::Minimum)); + tqlayout->addWidget (vcdDevicePathLabel); + tqlayout->addWidget (vcddevice); + tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT KMPlayerVCDSource::KMPlayerVCDSource (KMPlayerApp * a, QPopupMenu * m) +KDE_NO_CDTOR_EXPORT KMPlayerVCDSource::KMPlayerVCDSource (KMPlayerApp * a, TQPopupMenu * m) : KMPlayerMenuSource (i18n ("VCD"), a, m, "vcdsource"), m_configpage (0L) { m_player->settings ()->addPage (this); setURL (KURL ("vcd://")); @@ -2088,17 +2089,17 @@ KDE_NO_CDTOR_EXPORT KMPlayerVCDSource::KMPlayerVCDSource (KMPlayerApp * a, QPopu KDE_NO_CDTOR_EXPORT KMPlayerVCDSource::~KMPlayerVCDSource () { } -KDE_NO_EXPORT bool KMPlayerVCDSource::processOutput (const QString & str) { +KDE_NO_EXPORT bool KMPlayerVCDSource::processOutput (const TQString & str) { if (KMPlayer::Source::processOutput (str)) return true; if (m_identified) return false; //kdDebug () << "scanning " << cstr << endl; - QRegExp * patterns = static_cast<KMPlayer::MPlayer *> (m_player->players () ["mplayer"])->configPage ()->m_patterns; - QRegExp & trackRegExp = patterns [KMPlayer::MPlayerPreferencesPage::pat_vcdtrack]; + TQRegExp * patterns = static_cast<KMPlayer::MPlayer *> (m_player->players () ["mplayer"])->configPage ()->m_patterns; + TQRegExp & trackRegExp = patterns [KMPlayer::MPlayerPreferencesPage::pat_vcdtrack]; if (trackRegExp.search (str) > -1) { m_document->state = KMPlayer::Element::state_deferred; - m_document->appendChild (new KMPlayer::GenericMrl (m_document, QString ("vcd://") + trackRegExp.cap (1), i18n ("Track ") + trackRegExp.cap (1))); + m_document->appendChild (new KMPlayer::GenericMrl (m_document, TQString ("vcd://") + trackRegExp.cap (1), i18n ("Track ") + trackRegExp.cap (1))); kdDebug () << "track " << trackRegExp.cap (1) << endl; return true; } @@ -2112,7 +2113,7 @@ KDE_NO_EXPORT void KMPlayerVCDSource::activate () { setURL (KURL ("vcd://")); buildArguments (); if (m_start_play) - QTimer::singleShot (0, m_player, SLOT (play ())); + TQTimer::singleShot (0, m_player, TQT_SLOT (play ())); } KDE_NO_EXPORT void KMPlayerVCDSource::deactivate () { @@ -2130,16 +2131,16 @@ KDE_NO_EXPORT void KMPlayerVCDSource::setIdentified (bool b) { } KDE_NO_EXPORT void KMPlayerVCDSource::buildArguments () { - QString url ("vcd://"); + TQString url ("vcd://"); if (m_current && m_current != m_document) url += m_current->mrl ()->src; m_options.truncate (0); if (m_player->settings ()->vcddevice.length () > 0) - m_options+=QString(" -cdrom-device ") + m_player->settings()->vcddevice; + m_options+=TQString(" -cdrom-device ") + m_player->settings()->vcddevice; m_recordcmd = m_options; } -KDE_NO_EXPORT QString KMPlayerVCDSource::prettyName () { +KDE_NO_EXPORT TQString KMPlayerVCDSource::prettyName () { return i18n ("VCD"); } @@ -2165,20 +2166,20 @@ KDE_NO_EXPORT void KMPlayerVCDSource::sync (bool fromUI) { } } -KDE_NO_EXPORT void KMPlayerVCDSource::prefLocation (QString & item, QString & icon, QString & tab) { +KDE_NO_EXPORT void KMPlayerVCDSource::prefLocation (TQString & item, TQString & icon, TQString & tab) { item = i18n ("Source"); - icon = QString ("source"); + icon = TQString ("source"); tab = i18n ("VCD"); } -KDE_NO_EXPORT QFrame * KMPlayerVCDSource::prefPage (QWidget * parent) { - m_configpage = new KMPlayerPrefSourcePageVCD (parent); +KDE_NO_EXPORT TQFrame * KMPlayerVCDSource::prefPage (TQWidget * tqparent) { + m_configpage = new KMPlayerPrefSourcePageVCD (tqparent); return m_configpage; } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT KMPlayerAudioCDSource::KMPlayerAudioCDSource (KMPlayerApp * a, QPopupMenu * m) +KDE_NO_CDTOR_EXPORT KMPlayerAudioCDSource::KMPlayerAudioCDSource (KMPlayerApp * a, TQPopupMenu * m) : KMPlayerMenuSource (i18n ("Audio CD"), a, m, "audiocdsource") { setURL (KURL ("cdda://")); } @@ -2186,21 +2187,21 @@ KDE_NO_CDTOR_EXPORT KMPlayerAudioCDSource::KMPlayerAudioCDSource (KMPlayerApp * KDE_NO_CDTOR_EXPORT KMPlayerAudioCDSource::~KMPlayerAudioCDSource () { } -KDE_NO_EXPORT bool KMPlayerAudioCDSource::processOutput (const QString & str) { +KDE_NO_EXPORT bool KMPlayerAudioCDSource::processOutput (const TQString & str) { if (KMPlayer::Source::processOutput (str)) return true; if (m_identified) return false; //kdDebug () << "scanning " << str << endl; - QRegExp * patterns = static_cast<KMPlayer::MPlayer *> (m_player->players () ["mplayer"])->configPage ()->m_patterns; - QRegExp & trackRegExp = patterns [KMPlayer::MPlayerPreferencesPage::pat_cdromtracks]; + TQRegExp * patterns = static_cast<KMPlayer::MPlayer *> (m_player->players () ["mplayer"])->configPage ()->m_patterns; + TQRegExp & trackRegExp = patterns [KMPlayer::MPlayerPreferencesPage::pat_cdromtracks]; if (trackRegExp.search (str) > -1) { //if (m_document->state != KMPlayer::Element::state_deferred) // m_document->defer (); int nt = trackRegExp.cap (1).toInt (); kdDebug () << "tracks " << trackRegExp.cap (1) << endl; for (int i = 0; i < nt; i++) - m_document->appendChild (new KMPlayer::GenericMrl (m_document, QString ("cdda://%1").arg (i+1), i18n ("Track %1").arg (i+1))); + m_document->appendChild (new KMPlayer::GenericMrl (m_document, TQString ("cdda://%1").arg (i+1), i18n ("Track %1").arg (i+1))); return true; } return false; @@ -2213,7 +2214,7 @@ KDE_NO_EXPORT void KMPlayerAudioCDSource::activate () { setURL (KURL ("cdda://")); buildArguments (); //if (m_start_play) - QTimer::singleShot (0, m_player, SLOT (play ())); + TQTimer::singleShot (0, m_player, TQT_SLOT (play ())); } KDE_NO_EXPORT void KMPlayerAudioCDSource::deactivate () { @@ -2235,16 +2236,16 @@ KDE_NO_EXPORT void KMPlayerAudioCDSource::setIdentified (bool b) { } KDE_NO_EXPORT void KMPlayerAudioCDSource::buildArguments () { - QString url ("cdda://"); + TQString url ("cdda://"); if (m_current && m_current != m_document) url += m_current->mrl ()->src; m_options = "-cdda speed=3"; if (m_player->settings ()->vcddevice.length () > 0) - m_options+=QString(" -cdrom-device ") + m_player->settings()->vcddevice; + m_options+=TQString(" -cdrom-device ") + m_player->settings()->vcddevice; m_recordcmd = m_options; } -KDE_NO_EXPORT QString KMPlayerAudioCDSource::prettyName () { +KDE_NO_EXPORT TQString KMPlayerAudioCDSource::prettyName () { return i18n ("Audio CD"); } @@ -2269,24 +2270,24 @@ KDE_NO_EXPORT void KMPlayerPipeSource::activate () { // dangerous !! if (!m_url.protocol ().compare ("kmplayer")) // m_pipecmd = KURL::decode_string (m_url.path ()).mid (1); setURL (KURL ("stdin://")); - KMPlayer::GenericMrl * gen = new KMPlayer::GenericMrl (m_document, QString ("stdin://"), m_pipecmd); + KMPlayer::GenericMrl * gen = new KMPlayer::GenericMrl (m_document, TQString ("stdin://"), m_pipecmd); gen->bookmarkable = false; m_document->appendChild (gen); - m_recordcmd = m_options = QString ("-"); // or m_url? + m_recordcmd = m_options = TQString ("-"); // or m_url? m_identified = true; reset (); - QTimer::singleShot (0, m_player, SLOT (play ())); + TQTimer::singleShot (0, m_player, TQT_SLOT (play ())); m_app->slotStatusMsg (i18n ("Ready.")); } KDE_NO_EXPORT void KMPlayerPipeSource::deactivate () { } -KDE_NO_EXPORT QString KMPlayerPipeSource::prettyName () { +KDE_NO_EXPORT TQString KMPlayerPipeSource::prettyName () { return i18n ("Pipe - %1").arg (m_pipecmd); } -KDE_NO_EXPORT void KMPlayerPipeSource::setCommand (const QString & cmd) { +KDE_NO_EXPORT void KMPlayerPipeSource::setCommand (const TQString & cmd) { m_pipecmd = cmd; if (m_document) m_document->mrl ()->pretty_name = cmd; |